From de3fd0945bc944a933a67875899b285d98bfd0e0 Mon Sep 17 00:00:00 2001 From: Dinger Date: Mon, 6 Apr 2026 23:19:41 +0800 Subject: [PATCH] v3.0.1 Signed-off-by: Dinger --- backend_api_python/app/routes/quick_trade.py | 318 ++++++++--- backend_api_python/app/routes/strategy.py | 103 +++- backend_api_python/app/services/backtest.py | 72 ++- .../app/services/live_trading/binance.py | 98 +++- .../app/services/live_trading/binance_spot.py | 59 +- .../app/services/live_trading/bitget.py | 195 ++++++- backend_api_python/app/services/strategy.py | 33 +- .../app/services/strategy_script_runtime.py | 193 +++++++ .../app/services/trading_executor.py | 521 +++++++++++++----- frontend/dist/css/140.cc4abc36.css | 1 - frontend/dist/css/161.a7b2f719.css | 1 + frontend/dist/css/19.a7b2f719.css | 1 + frontend/dist/css/194.c5842a33.css | 1 + frontend/dist/css/230.2035e6e3.css | 1 + frontend/dist/css/254.2035e6e3.css | 1 + frontend/dist/css/303.ec5418ba.css | 1 - frontend/dist/css/328.d911c6d3.css | 1 - frontend/dist/css/345.c5842a33.css | 1 + frontend/dist/css/419.d911c6d3.css | 1 - frontend/dist/css/44.62d3ef3b.css | 1 - frontend/dist/css/447.091cab00.css | 1 + frontend/dist/css/593.3efaa629.css | 1 + frontend/dist/css/605.0eaa2706.css | 1 + frontend/dist/css/747.b2c1db3f.css | 1 - frontend/dist/css/755.091cab00.css | 1 + frontend/dist/css/762.d202dad2.css | 1 + frontend/dist/css/797.b2c1db3f.css | 1 - frontend/dist/css/843.ec5418ba.css | 1 - frontend/dist/css/846.4eddae0f.css | 1 - frontend/dist/css/878.0eaa2706.css | 1 + frontend/dist/css/878.62d3ef3b.css | 1 - frontend/dist/css/971.cc4abc36.css | 1 - ...590b2867.css => theme-colors-ed7e9530.css} | 210 +++---- frontend/dist/index.html | 2 +- frontend/dist/js/11.e5204d5e.js | 1 + frontend/dist/js/140.98593fae.js | 1 - ...acy.b1e9550b.js => 161-legacy.48ab2cbb.js} | 2 +- frontend/dist/js/19.5d40ba7c.js | 1 + frontend/dist/js/194.8925812b.js | 1 + frontend/dist/js/22-legacy.9a48b372.js | 1 - frontend/dist/js/230.1c4c46a6.js | 1 + frontend/dist/js/254-legacy.f0b6cf6d.js | 1 + frontend/dist/js/328-legacy.4f412768.js | 1 - frontend/dist/js/345-legacy.99093ede.js | 1 + frontend/dist/js/371.50d5a7d0.js | 1 - frontend/dist/js/402-legacy.2bdb2b0f.js | 1 + frontend/dist/js/419.0b9ef592.js | 1 - frontend/dist/js/44-legacy.f8218480.js | 1 - ...acy.548ae0f9.js => 447-legacy.998c00ff.js} | 2 +- frontend/dist/js/500.2f2276c5.js | 1 + frontend/dist/js/593-legacy.c237259d.js | 1 + frontend/dist/js/593.fe3216c1.js | 1 + frontend/dist/js/605-legacy.11940272.js | 1 + .../js/{843.be0077e1.js => 755.1226be89.js} | 2 +- ...915.bb68aa5d.js => 762-legacy.e3a47300.js} | 2 +- ...915-legacy.04c29e15.js => 762.e3a47300.js} | 2 +- frontend/dist/js/797.743504ff.js | 1 - frontend/dist/js/846-legacy.0359cda8.js | 1 - frontend/dist/js/846.db514e9f.js | 1 - frontend/dist/js/878.2260ef30.js | 1 - frontend/dist/js/878.badb4eef.js | 1 + frontend/dist/js/945-legacy.6efa43e3.js | 1 + frontend/dist/js/971-legacy.90a32800.js | 1 - frontend/dist/js/app-legacy.5c46ff8f.js | 1 - frontend/dist/js/app-legacy.abf8ca7f.js | 1 + frontend/dist/js/app.1b0410d5.js | 1 + frontend/dist/js/app.5b7d4d9e.js | 1 - ...94.js => chunk-vendors-legacy.e8633248.js} | 4 +- ....ebabb02b.js => chunk-vendors.7a650f0b.js} | 4 +- ...c98c4.js => lang-ar-SA-legacy.6abb9d1b.js} | 2 +- ...-SA.f3c0e2cb.js => lang-ar-SA.655cc3aa.js} | 2 +- ...abde7.js => lang-de-DE-legacy.381031d0.js} | 2 +- ...acy.a8e48bd9.js => lang-de-DE.87483dcb.js} | 2 +- ...01831.js => lang-fr-FR-legacy.69dd3ef3.js} | 2 +- ...acy.618f7c18.js => lang-fr-FR.d8fb1359.js} | 2 +- ...ed421.js => lang-ja-JP-legacy.e3ca6ce6.js} | 2 +- ...-JP.d7f69ad0.js => lang-ja-JP.3f074e98.js} | 2 +- ...8c121.js => lang-ko-KR-legacy.e8863684.js} | 2 +- ...-KR.c124c7c2.js => lang-ko-KR.e14e1020.js} | 2 +- ...e4f8a.js => lang-th-TH-legacy.fcd9f16a.js} | 2 +- ...-TH.057906f9.js => lang-th-TH.6cdef8b5.js} | 2 +- ...15115.js => lang-vi-VN-legacy.1457d3b4.js} | 2 +- ...-VN.543b8bcb.js => lang-vi-VN.97e95cfb.js} | 2 +- .../dist/js/lang-zh-CN-legacy.2e758fed.js | 1 - .../dist/js/lang-zh-CN-legacy.81e81890.js | 1 + frontend/dist/js/lang-zh-CN.6751831d.js | 1 + frontend/dist/js/lang-zh-CN.e2c7905a.js | 1 - .../dist/js/lang-zh-TW-legacy.458c8a6a.js | 1 - .../dist/js/lang-zh-TW-legacy.bcd61a63.js | 1 + frontend/dist/js/lang-zh-TW.5ed48957.js | 1 + frontend/dist/js/lang-zh-TW.d92186ba.js | 1 - 91 files changed, 1504 insertions(+), 405 deletions(-) create mode 100644 backend_api_python/app/services/strategy_script_runtime.py delete mode 100644 frontend/dist/css/140.cc4abc36.css create mode 100644 frontend/dist/css/161.a7b2f719.css create mode 100644 frontend/dist/css/19.a7b2f719.css create mode 100644 frontend/dist/css/194.c5842a33.css create mode 100644 frontend/dist/css/230.2035e6e3.css create mode 100644 frontend/dist/css/254.2035e6e3.css delete mode 100644 frontend/dist/css/303.ec5418ba.css delete mode 100644 frontend/dist/css/328.d911c6d3.css create mode 100644 frontend/dist/css/345.c5842a33.css delete mode 100644 frontend/dist/css/419.d911c6d3.css delete mode 100644 frontend/dist/css/44.62d3ef3b.css create mode 100644 frontend/dist/css/447.091cab00.css create mode 100644 frontend/dist/css/593.3efaa629.css create mode 100644 frontend/dist/css/605.0eaa2706.css delete mode 100644 frontend/dist/css/747.b2c1db3f.css create mode 100644 frontend/dist/css/755.091cab00.css create mode 100644 frontend/dist/css/762.d202dad2.css delete mode 100644 frontend/dist/css/797.b2c1db3f.css delete mode 100644 frontend/dist/css/843.ec5418ba.css delete mode 100644 frontend/dist/css/846.4eddae0f.css create mode 100644 frontend/dist/css/878.0eaa2706.css delete mode 100644 frontend/dist/css/878.62d3ef3b.css delete mode 100644 frontend/dist/css/971.cc4abc36.css rename frontend/dist/css/{theme-colors-590b2867.css => theme-colors-ed7e9530.css} (87%) create mode 100644 frontend/dist/js/11.e5204d5e.js delete mode 100644 frontend/dist/js/140.98593fae.js rename frontend/dist/js/{747-legacy.b1e9550b.js => 161-legacy.48ab2cbb.js} (80%) create mode 100644 frontend/dist/js/19.5d40ba7c.js create mode 100644 frontend/dist/js/194.8925812b.js delete mode 100644 frontend/dist/js/22-legacy.9a48b372.js create mode 100644 frontend/dist/js/230.1c4c46a6.js create mode 100644 frontend/dist/js/254-legacy.f0b6cf6d.js delete mode 100644 frontend/dist/js/328-legacy.4f412768.js create mode 100644 frontend/dist/js/345-legacy.99093ede.js delete mode 100644 frontend/dist/js/371.50d5a7d0.js create mode 100644 frontend/dist/js/402-legacy.2bdb2b0f.js delete mode 100644 frontend/dist/js/419.0b9ef592.js delete mode 100644 frontend/dist/js/44-legacy.f8218480.js rename frontend/dist/js/{303-legacy.548ae0f9.js => 447-legacy.998c00ff.js} (99%) create mode 100644 frontend/dist/js/500.2f2276c5.js create mode 100644 frontend/dist/js/593-legacy.c237259d.js create mode 100644 frontend/dist/js/593.fe3216c1.js create mode 100644 frontend/dist/js/605-legacy.11940272.js rename frontend/dist/js/{843.be0077e1.js => 755.1226be89.js} (99%) rename frontend/dist/js/{915.bb68aa5d.js => 762-legacy.e3a47300.js} (99%) rename frontend/dist/js/{915-legacy.04c29e15.js => 762.e3a47300.js} (99%) delete mode 100644 frontend/dist/js/797.743504ff.js delete mode 100644 frontend/dist/js/846-legacy.0359cda8.js delete mode 100644 frontend/dist/js/846.db514e9f.js delete mode 100644 frontend/dist/js/878.2260ef30.js create mode 100644 frontend/dist/js/878.badb4eef.js create mode 100644 frontend/dist/js/945-legacy.6efa43e3.js delete mode 100644 frontend/dist/js/971-legacy.90a32800.js delete mode 100644 frontend/dist/js/app-legacy.5c46ff8f.js create mode 100644 frontend/dist/js/app-legacy.abf8ca7f.js create mode 100644 frontend/dist/js/app.1b0410d5.js delete mode 100644 frontend/dist/js/app.5b7d4d9e.js rename frontend/dist/js/{chunk-vendors-legacy.f624f594.js => chunk-vendors-legacy.e8633248.js} (99%) rename frontend/dist/js/{chunk-vendors.ebabb02b.js => chunk-vendors.7a650f0b.js} (99%) rename frontend/dist/js/{lang-ar-SA-legacy.339c98c4.js => lang-ar-SA-legacy.6abb9d1b.js} (66%) rename frontend/dist/js/{lang-ar-SA.f3c0e2cb.js => lang-ar-SA.655cc3aa.js} (66%) rename frontend/dist/js/{lang-de-DE.05eabde7.js => lang-de-DE-legacy.381031d0.js} (65%) rename frontend/dist/js/{lang-de-DE-legacy.a8e48bd9.js => lang-de-DE.87483dcb.js} (65%) rename frontend/dist/js/{lang-fr-FR.6be01831.js => lang-fr-FR-legacy.69dd3ef3.js} (64%) rename frontend/dist/js/{lang-fr-FR-legacy.618f7c18.js => lang-fr-FR.d8fb1359.js} (64%) rename frontend/dist/js/{lang-ja-JP-legacy.e7fed421.js => lang-ja-JP-legacy.e3ca6ce6.js} (65%) rename frontend/dist/js/{lang-ja-JP.d7f69ad0.js => lang-ja-JP.3f074e98.js} (65%) rename frontend/dist/js/{lang-ko-KR-legacy.c488c121.js => lang-ko-KR-legacy.e8863684.js} (64%) rename frontend/dist/js/{lang-ko-KR.c124c7c2.js => lang-ko-KR.e14e1020.js} (64%) rename frontend/dist/js/{lang-th-TH-legacy.121e4f8a.js => lang-th-TH-legacy.fcd9f16a.js} (69%) rename frontend/dist/js/{lang-th-TH.057906f9.js => lang-th-TH.6cdef8b5.js} (69%) rename frontend/dist/js/{lang-vi-VN-legacy.df015115.js => lang-vi-VN-legacy.1457d3b4.js} (79%) rename frontend/dist/js/{lang-vi-VN.543b8bcb.js => lang-vi-VN.97e95cfb.js} (79%) delete mode 100644 frontend/dist/js/lang-zh-CN-legacy.2e758fed.js create mode 100644 frontend/dist/js/lang-zh-CN-legacy.81e81890.js create mode 100644 frontend/dist/js/lang-zh-CN.6751831d.js delete mode 100644 frontend/dist/js/lang-zh-CN.e2c7905a.js delete mode 100644 frontend/dist/js/lang-zh-TW-legacy.458c8a6a.js create mode 100644 frontend/dist/js/lang-zh-TW-legacy.bcd61a63.js create mode 100644 frontend/dist/js/lang-zh-TW.5ed48957.js delete mode 100644 frontend/dist/js/lang-zh-TW.d92186ba.js diff --git a/backend_api_python/app/routes/quick_trade.py b/backend_api_python/app/routes/quick_trade.py index 1281f73..e3a5404 100644 --- a/backend_api_python/app/routes/quick_trade.py +++ b/backend_api_python/app/routes/quick_trade.py @@ -273,6 +273,13 @@ def place_order(): tp_price = float(body.get("tp_price") or 0) sl_price = float(body.get("sl_price") or 0) source = str(body.get("source") or "manual").strip() + margin_mode = str(body.get("margin_mode") or body.get("marginMode") or "").strip().lower() + if margin_mode in ("cross", "crossed"): + margin_mode = "cross" + elif margin_mode in ("iso", "isolated"): + margin_mode = "isolated" + else: + margin_mode = "" # ---- validation ---- if not credential_id: @@ -286,28 +293,35 @@ def place_order(): if order_type == "limit" and price <= 0: return jsonify({"code": 0, "msg": "price required for limit orders"}), 400 - # ---- Auto-determine market_type from leverage ---- - # leverage = 1 -> spot, leverage > 1 -> swap - if not market_type: - market_type = "spot" if leverage == 1 else "swap" + # ---- market_type: leverage 1 => spot API, else perpetual (swap) ---- if market_type in ("futures", "future", "perp", "perpetual"): market_type = "swap" - # Override only when user did not explicitly choose market_type. if leverage > 1: market_type = "swap" - elif leverage == 1 and not str(body.get("market_type") or "").strip(): + else: market_type = "spot" # ---- build exchange client ---- - exchange_config = _build_exchange_config(credential_id, user_id, { - "market_type": market_type, - }) + cfg_overrides: Dict[str, Any] = {"market_type": market_type} + if margin_mode in ("cross", "isolated"): + cfg_overrides["margin_mode"] = margin_mode + cfg_overrides["td_mode"] = margin_mode + exchange_config = _build_exchange_config(credential_id, user_id, cfg_overrides) exchange_id = (exchange_config.get("exchange_id") or "").strip().lower() if not exchange_id: return jsonify({"code": 0, "msg": "Invalid credential: missing exchange_id"}), 400 client = _create_client(exchange_config, market_type=market_type) + # Binance USDT-M: sync isolated/cross margin mode (best-effort; may fail if open orders exist) + if market_type != "spot" and margin_mode in ("cross", "isolated"): + try: + from app.services.live_trading.binance import BinanceFuturesClient + if isinstance(client, BinanceFuturesClient): + client.set_margin_type(symbol=symbol, margin_mode=margin_mode) + except Exception as me: + logger.warning(f"Binance set_margin_type failed (non-fatal): {me}") + # ---- Convert USDT amount to base asset quantity ---- # Quick trade always accepts USDT amount, convert to base qty for all exchanges # For limit orders, use the provided price; for market orders, fetch current price @@ -543,7 +557,16 @@ def get_balance(): raw = client.get_account() balance_data = _parse_balance(raw, exchange_id, market_type) elif hasattr(client, "get_accounts"): - raw = client.get_accounts() + from app.services.live_trading.bitget import BitgetMixClient + + if isinstance(client, BitgetMixClient): + pt = str(exchange_config.get("product_type") or exchange_config.get("productType") or "USDT-FUTURES") + raw = client.get_accounts(product_type=pt) + else: + raw = client.get_accounts() + balance_data = _parse_balance(raw, exchange_id, market_type) + elif (exchange_id or "").lower() == "bitget" and market_type == "spot" and hasattr(client, "get_assets"): + raw = client.get_assets() balance_data = _parse_balance(raw, exchange_id, market_type) except Exception as be: logger.warning(f"Balance fetch failed: {be}") @@ -575,22 +598,62 @@ def _parse_balance(raw: Any, exchange_id: str, market_type: str) -> Dict[str, An result["total"] = float(b.get("free") or 0) + float(b.get("locked") or 0) return result return result + ex = (exchange_id or "").lower() + # Bitget mix: { code, data: [ { marginCoin, available, accountEquity, ... } ] } + # Must run before OKX — both use data as a list; OKX fallback would zero Bitget. + if ex == "bitget" and (market_type or "").lower() != "spot": + bg_data = raw.get("data") + if isinstance(bg_data, list) and bg_data: + row = None + for item in bg_data: + if isinstance(item, dict) and str(item.get("marginCoin") or "").upper() == "USDT": + row = item + break + if row is None and isinstance(bg_data[0], dict): + row = bg_data[0] + if isinstance(row, dict): + av = ( + row.get("available") + or row.get("availableBalance") + or row.get("crossedMaxAvailable") + or row.get("isolatedMaxAvailable") + or 0 + ) + eq = row.get("accountEquity") or row.get("usdtEquity") or row.get("equity") or av + result["available"] = float(av or 0) + result["total"] = float(eq or 0) if eq is not None else result["available"] + return result + # Bitget spot: GET /api/v2/spot/account/assets + if ex == "bitget" and (market_type or "").lower() == "spot": + bg_data = raw.get("data") + if isinstance(bg_data, list): + for b in bg_data: + if isinstance(b, dict) and str(b.get("coin") or "").upper() == "USDT": + avail = float(b.get("available") or 0) + frozen = float(b.get("frozen") or b.get("locked") or 0) + result["available"] = avail + result["total"] = avail + frozen + return result + return result # OKX data = raw.get("data") if isinstance(data, list) and data: first = data[0] if isinstance(data[0], dict) else {} # Account balance details = first.get("details", []) - if isinstance(details, list): + if isinstance(details, list) and details: for d in details: if str(d.get("ccy") or "").upper() == "USDT": result["available"] = float(d.get("availBal") or d.get("availEq") or 0) result["total"] = float(d.get("eq") or d.get("cashBal") or 0) return result - # Fallback - result["available"] = float(first.get("availBal") or first.get("totalEq") or 0) - result["total"] = float(first.get("totalEq") or 0) - return result + # OKX-style single-account row (not Bitget — Bitget handled above) + if "availBal" in first or "availEq" in first or "totalEq" in first or "adjEq" in first: + result["available"] = float( + first.get("availBal") or first.get("availEq") or first.get("adjEq") or first.get("totalEq") or 0 + ) + result["total"] = float(first.get("totalEq") or first.get("adjEq") or 0) + return result # Bybit if "result" in raw: res = raw["result"] @@ -636,6 +699,106 @@ def _parse_balance(raw: Any, exchange_id: str, market_type: str) -> Dict[str, An return result +def _fetch_exchange_positions_raw( + client: Any, + exchange_config: Dict[str, Any], + *, + symbol: str, + market_type: str, +) -> Any: + """ + Fetch raw position payload for quick-trade / close-position. + + Many clients do not accept ``symbol=`` on ``get_positions()`` (Gate, KuCoin, Bybit, Bitfinex), + or need extra args (Bitget ``product_type``, OKX ``inst_type``). Centralize here. + """ + from app.services.live_trading.binance import BinanceFuturesClient + from app.services.live_trading.bitget import BitgetMixClient + from app.services.live_trading.bybit import BybitClient + from app.services.live_trading.deepcoin import DeepcoinClient + from app.services.live_trading.gate import GateUsdtFuturesClient + from app.services.live_trading.htx import HtxClient + from app.services.live_trading.kucoin import KucoinFuturesClient + from app.services.live_trading.okx import OkxClient + from app.services.live_trading.symbols import ( + to_bybit_symbol, + to_gate_currency_pair, + to_kucoin_futures_symbol, + to_okx_spot_inst_id, + to_okx_swap_inst_id, + ) + + mt = (market_type or "swap").strip().lower() + + if isinstance(client, OkxClient): + if mt == "spot": + inst_id = to_okx_spot_inst_id(symbol) + inst_type = "SPOT" + else: + inst_id = to_okx_swap_inst_id(symbol) + inst_type = "SWAP" + return client.get_positions(inst_id=inst_id, inst_type=inst_type) + + if isinstance(client, BinanceFuturesClient): + return client.get_positions(symbol=symbol) + + if isinstance(client, BitgetMixClient): + pt = str(exchange_config.get("product_type") or exchange_config.get("productType") or "USDT-FUTURES") + return client.get_positions(product_type=pt, symbol=symbol) + + if isinstance(client, BybitClient): + raw = client.get_positions() + lst = (((raw or {}).get("result") or {}).get("list")) if isinstance(raw, dict) else None + if not isinstance(lst, list): + return raw + sym_norm = to_bybit_symbol(symbol) + filtered = [p for p in lst if isinstance(p, dict) and str(p.get("symbol") or "").strip() == sym_norm] + if isinstance(raw, dict): + out = dict(raw) + res = dict((raw.get("result") or {}) if isinstance(raw.get("result"), dict) else {}) + res["list"] = filtered + out["result"] = res + return out + return {"result": {"list": filtered}} + + if isinstance(client, GateUsdtFuturesClient): + raw = client.get_positions() + items = raw if isinstance(raw, list) else [] + c = to_gate_currency_pair(symbol) + filtered = [p for p in items if isinstance(p, dict) and str(p.get("contract") or "").strip() == c] + return filtered + + if isinstance(client, KucoinFuturesClient): + raw = client.get_positions() + data = raw.get("data") if isinstance(raw, dict) else [] + sym = to_kucoin_futures_symbol(symbol) + if not isinstance(data, list): + data = [] + filtered = [p for p in data if isinstance(p, dict) and str(p.get("symbol") or "").strip() == sym] + if isinstance(raw, dict): + out = dict(raw) + out["data"] = filtered + return out + return {"data": filtered} + + if isinstance(client, HtxClient): + return client.get_positions(symbol=symbol) + + if isinstance(client, DeepcoinClient): + return client.get_positions(symbol=symbol) + + if hasattr(client, "get_positions"): + try: + return client.get_positions(symbol=symbol) + except TypeError: + return client.get_positions() + + if hasattr(client, "get_position"): + return client.get_position(symbol=symbol) + + return None + + @quick_trade_bp.route('/position', methods=['GET']) @login_required def get_position(): @@ -658,25 +821,10 @@ def get_position(): positions = [] try: - # OKX requires inst_id instead of symbol - from app.services.live_trading.okx import OkxClient - if isinstance(client, OkxClient): - from app.services.live_trading.symbols import to_okx_swap_inst_id, to_okx_spot_inst_id - if market_type == "spot": - inst_id = to_okx_spot_inst_id(symbol) - inst_type = "SPOT" - else: - inst_id = to_okx_swap_inst_id(symbol) - inst_type = "SWAP" - raw = client.get_positions(inst_id=inst_id, inst_type=inst_type) - positions = _parse_positions(raw) - logger.info(f"OKX positions query: inst_id={inst_id}, inst_type={inst_type}, found {len(positions)} positions") - elif hasattr(client, "get_positions"): - raw = client.get_positions(symbol=symbol) - positions = _parse_positions(raw) - elif hasattr(client, "get_position"): - raw = client.get_position(symbol=symbol) - positions = _parse_positions(raw) + raw = _fetch_exchange_positions_raw( + client, exchange_config, symbol=symbol, market_type=market_type + ) + positions = _parse_positions(raw) except Exception as pe: logger.warning(f"Position fetch failed: {pe}") logger.warning(traceback.format_exc()) @@ -698,33 +846,62 @@ def _parse_positions(raw: Any) -> list: if isinstance(raw, list): items = raw elif isinstance(raw, dict): - data = raw.get("data") or raw.get("result") or raw.get("positions") or [] - if isinstance(data, list): - items = data - elif isinstance(data, dict): - items = data.get("list", []) if "list" in data else [data] + if isinstance(raw.get("raw"), list): + items = raw["raw"] + else: + data = raw.get("data") or raw.get("result") or raw.get("positions") or [] + if isinstance(data, list): + items = data + elif isinstance(data, dict): + items = data.get("list", []) if "list" in data else [data] + else: + items = [] for item in items: if not isinstance(item, dict): continue # For OKX, position size can be in different fields # SWAP: posAmt, pos + # Binance futures: positionAmt # SPOT: bal (balance), availBal (available balance) - size = float(item.get("posAmt") or item.get("pos") or item.get("size") or item.get("contracts") or - item.get("bal") or item.get("availBal") or item.get("volume") or 0) + size = float( + item.get("positionAmt") + or item.get("posAmt") + or item.get("pos") + or item.get("total") + or item.get("currentQty") + or item.get("available") + or item.get("size") + or item.get("contracts") + or item.get("bal") + or item.get("availBal") + or item.get("volume") + or 0 + ) if abs(size) < 1e-10: continue - # For spot, side is always "long" (you own the asset) - # For swap, determine side from sign of size + # Binance hedge: positionSide LONG/SHORT with positive positionAmt; one-way: BOTH + signed amt side = "long" - if size < 0: + psu = str(item.get("positionSide", "")).strip().upper() + if psu == "SHORT": side = "short" + elif psu == "LONG": + side = "long" elif item.get("posSide"): - # OKX may have posSide field: "long" or "short" pos_side = str(item.get("posSide", "")).strip().lower() if pos_side in ("long", "short"): side = pos_side + elif str(item.get("holdSide") or "").strip().lower() == "short": + side = "short" + elif str(item.get("holdSide") or "").strip().lower() == "long": + side = "long" + elif str(item.get("side") or "").strip().lower() in ("sell", "s"): + side = "short" + elif str(item.get("side") or "").strip().lower() in ("buy", "b"): + side = "long" + elif size < 0: + side = "short" elif item.get("direction"): dir_side = str(item.get("direction") or "").strip().lower() if dir_side in ("buy", "long"): @@ -736,10 +913,36 @@ def _parse_positions(raw: Any) -> list: "symbol": item.get("symbol") or item.get("instId") or "", "side": side, "size": abs(size), - "entry_price": float(item.get("entryPrice") or item.get("avgCost") or item.get("avgPx") or item.get("cost_open") or 0), - "unrealized_pnl": float(item.get("unRealizedProfit") or item.get("upl") or item.get("unrealisedPnl") or item.get("profit_unreal") or item.get("pnl") or 0), + "entry_price": float( + item.get("entryPrice") + or item.get("openPriceAvg") + or item.get("avgEntryPrice") + or item.get("avgPrice") + or item.get("avgCost") + or item.get("avgPx") + or item.get("cost_open") + or item.get("trade_avg_price") + or 0 + ), + "unrealized_pnl": float( + item.get("unRealizedProfit") + or item.get("unrealizedProfit") + or item.get("unrealizedPnl") + or item.get("upl") + or item.get("unrealisedPnl") + or item.get("profit_unreal") + or item.get("pnl") + or 0 + ), "leverage": float(item.get("leverage") or item.get("lever") or 1), - "mark_price": float(item.get("markPrice") or item.get("markPx") or item.get("last_price") or item.get("last") or 0), + "mark_price": float( + item.get("markPrice") + or item.get("markPx") + or item.get("last_price") + or item.get("last") + or item.get("indexPrice") + or 0 + ), }) except Exception as e: logger.warning(f"_parse_positions error: {e}") @@ -791,21 +994,10 @@ def close_position(): # ---- get current position ---- positions = [] try: - from app.services.live_trading.okx import OkxClient - if isinstance(client, OkxClient): - from app.services.live_trading.symbols import to_okx_swap_inst_id, to_okx_spot_inst_id - if market_type == "spot": - inst_id = to_okx_spot_inst_id(symbol) - else: - inst_id = to_okx_swap_inst_id(symbol) - raw = client.get_positions(inst_id=inst_id) - positions = _parse_positions(raw) - elif hasattr(client, "get_positions"): - raw = client.get_positions(symbol=symbol) - positions = _parse_positions(raw) - elif hasattr(client, "get_position"): - raw = client.get_position(symbol=symbol) - positions = _parse_positions(raw) + raw = _fetch_exchange_positions_raw( + client, exchange_config, symbol=symbol, market_type=market_type + ) + positions = _parse_positions(raw) except Exception as pe: logger.warning(f"Position fetch failed: {pe}") diff --git a/backend_api_python/app/routes/strategy.py b/backend_api_python/app/routes/strategy.py index c30210c..e597055 100644 --- a/backend_api_python/app/routes/strategy.py +++ b/backend_api_python/app/routes/strategy.py @@ -4,6 +4,7 @@ Trading Strategy API Routes from flask import Blueprint, request, jsonify, g from datetime import datetime import json +import re import traceback import time @@ -770,15 +771,16 @@ def start_strategy(): # Get strategy type strategy_type = get_strategy_service().get_strategy_type(strategy_id) - - # Update strategy status - get_strategy_service().update_strategy_status(strategy_id, 'running', user_id=user_id) - - # Local backend: AI strategy executor was removed. Only indicator strategies are supported. - if strategy_type == 'PromptBasedStrategy': - return jsonify({'code': 0, 'msg': 'AI strategy has been removed; local edition does not support starting AI strategies', 'data': None}), 400 - # Indicator strategy + # IndicatorStrategy and ScriptStrategy are executed by TradingExecutor. + if strategy_type == 'PromptBasedStrategy': + return jsonify({ + 'code': 0, + 'msg': 'AI strategy has been removed; local edition does not support starting AI strategies', + 'data': None + }), 400 + get_strategy_service().update_strategy_status(strategy_id, 'running', user_id=user_id) + success = get_trading_executor().start_strategy(strategy_id) if not success: @@ -1241,12 +1243,65 @@ def verify_strategy_code(): @strategy_bp.route('/strategies/ai-generate', methods=['POST']) @login_required def ai_generate_strategy(): - """Generate strategy code using AI.""" + """Generate strategy code or suggest template parameter updates using AI.""" try: payload = request.get_json() or {} prompt = payload.get('prompt', '') if not prompt.strip(): - return jsonify({'code': '', 'msg': 'Prompt is empty'}) + return jsonify({'code': '', 'msg': 'Prompt is empty', 'params': None}) + + intent = (payload.get('intent') or 'generate_code').strip() + from app.services.llm import LLMService + llm = LLMService() + api_key = llm.get_api_key() + if not api_key: + return jsonify({'code': '', 'msg': 'No LLM API key configured', 'params': None}) + + if intent == 'adjust_params': + template_key = payload.get('template_key') or '' + current_params = payload.get('params') or {} + code_snapshot = (payload.get('code') or '')[:8000] + system_prompt = """You tune quantitative strategy template parameters from the user's request. +Return ONLY a single JSON object: keys are parameter names (strings), values are JSON numbers or booleans. +You may return a partial object (only keys that should change) or a full object. +Do not use markdown fences, do not add explanations before or after the JSON.""" + + user_content = ( + f"Template key: {template_key}\n" + f"Current parameters (JSON):\n{json.dumps(current_params, ensure_ascii=False)}\n\n" + f"Strategy code excerpt (context):\n{code_snapshot}\n\n" + f"User request:\n{prompt.strip()}\n\n" + "Respond with JSON only." + ) + + content = llm.call_llm_api( + messages=[ + {"role": "system", "content": system_prompt}, + {"role": "user", "content": user_content}, + ], + model=llm.get_code_generation_model(), + temperature=0.3, + use_json_mode=False + ) + + raw = (content or '').strip() + if raw.startswith('```'): + raw = re.sub(r'^```[a-zA-Z]*', '', raw).strip() + if raw.endswith('```'): + raw = raw[:-3].strip() + updates = None + try: + updates = json.loads(raw) + except json.JSONDecodeError: + m = re.search(r'\{[\s\S]*\}', raw) + if m: + try: + updates = json.loads(m.group(0)) + except json.JSONDecodeError: + updates = None + if not isinstance(updates, dict): + return jsonify({'code': '', 'params': None, 'msg': 'AI did not return valid JSON parameters'}) + return jsonify({'code': '', 'params': updates, 'msg': 'success'}) system_prompt = """You are a quantitative trading strategy code generator. Generate Python strategy code that follows this framework: @@ -1264,16 +1319,26 @@ Generate Python strategy code that follows this framework: Return ONLY the Python code, no explanations.""" - from app.services.llm import LLMService - llm = LLMService() - api_key = llm.get_api_key() - if not api_key: - return jsonify({'code': '', 'msg': 'No LLM API key configured'}) + extra = '' + template_key = payload.get('template_key') + params = payload.get('params') + code_ctx = (payload.get('code') or '').strip() + if template_key or params is not None or code_ctx: + extra_parts = [] + if template_key: + extra_parts.append(f"Current template key: {template_key}") + if isinstance(params, dict) and params: + extra_parts.append('Current template parameters (JSON):\n' + json.dumps(params, ensure_ascii=False)) + if code_ctx: + extra_parts.append('Current code (may be long):\n' + code_ctx[:12000]) + extra = '\n\n' + '\n\n'.join(extra_parts) + + user_prompt = prompt.strip() + extra content = llm.call_llm_api( messages=[ {"role": "system", "content": system_prompt}, - {"role": "user", "content": prompt}, + {"role": "user", "content": user_prompt}, ], model=llm.get_code_generation_model(), temperature=0.7, @@ -1290,12 +1355,12 @@ Return ONLY the Python code, no explanations.""" content = content.strip() if content: - return jsonify({'code': content, 'msg': 'success'}) + return jsonify({'code': content, 'msg': 'success', 'params': None}) else: - return jsonify({'code': '', 'msg': 'AI generation returned empty result'}) + return jsonify({'code': '', 'msg': 'AI generation returned empty result', 'params': None}) except Exception as e: logger.error(f"ai_generate_strategy failed: {str(e)}") - return jsonify({'code': '', 'msg': str(e)}) + return jsonify({'code': '', 'msg': str(e), 'params': None}) @strategy_bp.route('/strategies/performance', methods=['GET']) diff --git a/backend_api_python/app/services/backtest.py b/backend_api_python/app/services/backtest.py index 00862ec..a35f391 100644 --- a/backend_api_python/app/services/backtest.py +++ b/backend_api_python/app/services/backtest.py @@ -504,6 +504,12 @@ class BacktestService: result['precision_info']['message'] = 'Using standard backtest because scale rules are not fully supported in MTF mode' elif fallback_reason == 'signal_timing_not_supported_in_mtf': result['precision_info']['message'] = 'Using standard backtest because this execution timing is not fully supported in MTF mode' + ea = result.get('executionAssumptions') or {} + ea['mtfRequested'] = bool(enable_mtf) + ea['mtfActive'] = False + if fallback_reason: + ea['mtfFallbackReason'] = fallback_reason + result['executionAssumptions'] = ea return result logger.info(f"Multi-timeframe backtest: strategy_tf={timeframe}, exec_tf={exec_tf}, range={start_date} ~ {end_date}") @@ -554,6 +560,11 @@ class BacktestService: 'reason': 'data_unavailable', 'message': f'Cannot fetch {exec_tf} data, using standard backtest' } + ea = result.get('executionAssumptions') or {} + ea['mtfRequested'] = bool(enable_mtf) + ea['mtfActive'] = False + ea['mtfFallbackReason'] = 'data_unavailable' + result['executionAssumptions'] = ea return result logger.info(f"Data fetched: signal_candles={len(df_signal)}, exec_candles={len(df_exec)}") @@ -598,6 +609,14 @@ class BacktestService: result['execution_timeframe'] = exec_tf result['signal_candles'] = len(df_signal) result['execution_candles'] = len(df_exec) + result['executionAssumptions'] = self._execution_assumptions( + strategy_config, + simulation_mode='mtf', + signal_timeframe=timeframe, + execution_timeframe=exec_tf, + mtf_requested=True, + mtf_active=True, + ) logger.info("Backtest result formatted successfully") except Exception as e: logger.error(f"Failed to format result: {str(e)}") @@ -1487,6 +1506,11 @@ class BacktestService: 'precision': 'standard', 'message': 'Using standard strategy script backtest' } + result['executionAssumptions'] = self._execution_assumptions( + strategy_config, + simulation_mode='standard', + signal_timeframe=timeframe, + ) return result def run_code_strategy( @@ -1607,7 +1631,13 @@ class BacktestService: metrics = self._calculate_metrics(equity_curve, trades, initial_capital, timeframe, start_date, end_date, total_commission) # 5. Format result - return self._format_result(metrics, equity_curve, trades) + result = self._format_result(metrics, equity_curve, trades) + result['executionAssumptions'] = self._execution_assumptions( + strategy_config, + simulation_mode='standard', + signal_timeframe=timeframe, + ) + return result def _fetch_kline_data( self, @@ -4740,6 +4770,46 @@ import pandas as pd logger.warning(f"Sharpe ratio calculation failed: {e}") return 0 + def _execution_assumptions( + self, + strategy_config: Optional[Dict[str, Any]], + *, + simulation_mode: str, + signal_timeframe: Optional[str] = None, + execution_timeframe: Optional[str] = None, + mtf_requested: bool = False, + mtf_active: bool = False, + mtf_fallback_reason: Optional[str] = None, + ) -> Dict[str, Any]: + """ + Human-facing metadata so the UI can explain how trades were timed vs chart markers. + Keys use camelCase for JSON consumers (frontend). + """ + cfg = strategy_config or {} + raw = str((cfg.get('execution') or {}).get('signalTiming') or 'next_bar_open').strip().lower() + is_next_open = raw in ('next_bar_open', 'next_open', 'nextopen', 'next') + if raw in ('bar_close', 'close', 'same_bar_close', 'current_bar_close'): + timing_key = 'same_bar_close' + elif is_next_open: + timing_key = 'next_bar_open' + else: + timing_key = raw + default_fill = 'open' if is_next_open else 'close' + payload: Dict[str, Any] = { + 'signalTiming': timing_key, + 'signalTimingRaw': raw, + 'defaultFillPrice': default_fill, + 'simulationMode': simulation_mode, + 'strategyTimeframe': signal_timeframe, + 'executionTimeframe': execution_timeframe, + 'engineVersion': self.ENGINE_VERSION, + 'mtfRequested': bool(mtf_requested), + 'mtfActive': bool(mtf_active), + } + if mtf_fallback_reason: + payload['mtfFallbackReason'] = mtf_fallback_reason + return payload + def _format_result( self, metrics: Dict, diff --git a/backend_api_python/app/services/live_trading/binance.py b/backend_api_python/app/services/live_trading/binance.py index 1e35e5b..9e6e462 100644 --- a/backend_api_python/app/services/live_trading/binance.py +++ b/backend_api_python/app/services/live_trading/binance.py @@ -40,6 +40,10 @@ class BinanceFuturesClient(BaseRestClient): self._dual_side_cache: Optional[Tuple[float, bool]] = None self._dual_side_cache_ttl_sec = 60.0 + # serverTime - local_ms; avoids Binance -1021 when the host clock is ahead of Binance. + self._time_offset_ms: int = 0 + self._time_sync_monotonic: float = 0.0 + @staticmethod def _to_dec(x: Any) -> Decimal: try: @@ -163,6 +167,26 @@ class BinanceFuturesClient(BaseRestClient): def _signed_headers(self) -> Dict[str, str]: return {"X-MBX-APIKEY": self.api_key} + def _ensure_server_time(self, *, force: bool = False) -> None: + """ + Align signed request timestamps with Binance server time (GET /fapi/v1/time). + """ + now_m = time.monotonic() + if not force and (now_m - float(self._time_sync_monotonic or 0.0)) < 300.0: + return + try: + code, data, _ = self._request("GET", "/fapi/v1/time") + if code != 200 or not isinstance(data, dict): + return + server_ms = int(data.get("serverTime") or 0) + if server_ms <= 0: + return + local_ms = int(time.time() * 1000) + self._time_offset_ms = server_ms - local_ms + self._time_sync_monotonic = now_m + except Exception: + pass + def _format_client_order_id(self, client_order_id: Optional[str]) -> str: raw = str(client_order_id or "").strip() broker_id = str(self.broker_id or "").strip() @@ -179,17 +203,34 @@ class BinanceFuturesClient(BaseRestClient): return f"{prefix}{raw[:suffix_budget]}" def _signed_request(self, method: str, path: str, *, params: Dict[str, Any]) -> Dict[str, Any]: - p = dict(params or {}) - # Use server-accepted timestamp in ms. - p["timestamp"] = int(time.time() * 1000) - qs = urlencode(p, doseq=True) - p["signature"] = self._sign(qs) - code, data, text = self._request(method, path, params=p, headers=self._signed_headers()) - if code >= 400: - raise LiveTradingError(f"Binance HTTP {code}: {text[:500]}") - if isinstance(data, dict) and data.get("code") and int(data.get("code")) < 0: - raise LiveTradingError(f"Binance error: {data}") - return data if isinstance(data, dict) else {"raw": data} + self._ensure_server_time() + last_err: Optional[LiveTradingError] = None + for attempt in range(2): + p = dict(params or {}) + p["timestamp"] = int(time.time() * 1000) + int(self._time_offset_ms) + if "recvWindow" not in p: + p["recvWindow"] = 10000 + qs = urlencode(p, doseq=True) + p["signature"] = self._sign(qs) + code, data, text = self._request(method, path, params=p, headers=self._signed_headers()) + if code >= 400: + err = LiveTradingError(f"Binance HTTP {code}: {text[:500]}") + if attempt == 0 and ("-1021" in text or "1021" in text): + self._ensure_server_time(force=True) + last_err = err + continue + raise err + if isinstance(data, dict) and data.get("code") and int(data.get("code")) < 0: + err = LiveTradingError(f"Binance error: {data}") + if attempt == 0 and int(data.get("code") or 0) == -1021: + self._ensure_server_time(force=True) + last_err = err + continue + raise err + return data if isinstance(data, dict) else {"raw": data} + if last_err: + raise last_err + raise LiveTradingError("Binance signed request failed") def _public_request(self, method: str, path: str, *, params: Optional[Dict[str, Any]] = None) -> Dict[str, Any]: code, data, text = self._request(method, path, params=params, headers=None, json_body=None, data=None) @@ -870,12 +911,41 @@ class BinanceFuturesClient(BaseRestClient): raise LiveTradingError("Binance cancel_order requires order_id or client_order_id") return self._signed_request("DELETE", "/fapi/v1/order", params=params) - def get_positions(self) -> Any: + def set_margin_type(self, *, symbol: str, margin_mode: str) -> Dict[str, Any]: """ - Return all futures positions (position risk endpoint). + Set symbol margin mode on USDT-M futures. + + Endpoint: POST /fapi/v1/marginType + margin_mode: cross | crossed | isolated + """ + sym = to_binance_futures_symbol(symbol) + m = (margin_mode or "").strip().lower() + if m in ("cross", "crossed"): + mt = "CROSSED" + elif m in ("isolated", "iso"): + mt = "ISOLATED" + else: + raise LiveTradingError(f"Invalid margin_mode for Binance: {margin_mode}") + return self._signed_request("POST", "/fapi/v1/marginType", params={"symbol": sym, "marginType": mt}) + + def get_positions(self, *, symbol: str = "") -> Any: + """ + Futures positions (position risk). Optional ``symbol`` filters to one contract. Endpoint: GET /fapi/v2/positionRisk """ - return self._signed_request("GET", "/fapi/v2/positionRisk", params={}) + raw = self._signed_request("GET", "/fapi/v2/positionRisk", params={}) + rows: list + if isinstance(raw, list): + rows = raw + elif isinstance(raw, dict) and isinstance(raw.get("raw"), list): + rows = raw["raw"] + else: + rows = [] + want = (symbol or "").strip() + if not want: + return rows + sym = to_binance_futures_symbol(want) + return [p for p in rows if isinstance(p, dict) and str(p.get("symbol") or "") == sym] diff --git a/backend_api_python/app/services/live_trading/binance_spot.py b/backend_api_python/app/services/live_trading/binance_spot.py index 5aa6012..9fc65eb 100644 --- a/backend_api_python/app/services/live_trading/binance_spot.py +++ b/backend_api_python/app/services/live_trading/binance_spot.py @@ -31,6 +31,9 @@ class BinanceSpotClient(BaseRestClient): self._sym_filter_cache: Dict[str, Tuple[float, Dict[str, Any]]] = {} self._sym_filter_cache_ttl_sec = 300.0 + self._time_offset_ms: int = 0 + self._time_sync_monotonic: float = 0.0 + @staticmethod def _to_dec(x: Any) -> Decimal: try: @@ -158,6 +161,24 @@ class BinanceSpotClient(BaseRestClient): def _signed_headers(self) -> Dict[str, str]: return {"X-MBX-APIKEY": self.api_key} + def _ensure_server_time(self, *, force: bool = False) -> None: + """Align signed request timestamps with Binance (GET /api/v3/time).""" + now_m = time.monotonic() + if not force and (now_m - float(self._time_sync_monotonic or 0.0)) < 300.0: + return + try: + code, data, _ = self._request("GET", "/api/v3/time") + if code != 200 or not isinstance(data, dict): + return + server_ms = int(data.get("serverTime") or 0) + if server_ms <= 0: + return + local_ms = int(time.time() * 1000) + self._time_offset_ms = server_ms - local_ms + self._time_sync_monotonic = now_m + except Exception: + pass + def _format_client_order_id(self, client_order_id: Optional[str]) -> str: raw = str(client_order_id or "").strip() broker_id = str(self.broker_id or "").strip() @@ -174,16 +195,34 @@ class BinanceSpotClient(BaseRestClient): return f"{prefix}{raw[:suffix_budget]}" def _signed_request(self, method: str, path: str, *, params: Dict[str, Any]) -> Dict[str, Any]: - p = dict(params or {}) - p["timestamp"] = int(time.time() * 1000) - qs = urlencode(p, doseq=True) - p["signature"] = self._sign(qs) - code, data, text = self._request(method, path, params=p, headers=self._signed_headers()) - if code >= 400: - raise LiveTradingError(f"BinanceSpot HTTP {code}: {text[:500]}") - if isinstance(data, dict) and data.get("code") and int(data.get("code")) < 0: - raise LiveTradingError(f"BinanceSpot error: {data}") - return data if isinstance(data, dict) else {"raw": data} + self._ensure_server_time() + last_err: Optional[LiveTradingError] = None + for attempt in range(2): + p = dict(params or {}) + p["timestamp"] = int(time.time() * 1000) + int(self._time_offset_ms) + if "recvWindow" not in p: + p["recvWindow"] = 10000 + qs = urlencode(p, doseq=True) + p["signature"] = self._sign(qs) + code, data, text = self._request(method, path, params=p, headers=self._signed_headers()) + if code >= 400: + err = LiveTradingError(f"BinanceSpot HTTP {code}: {text[:500]}") + if attempt == 0 and ("-1021" in text or "1021" in text): + self._ensure_server_time(force=True) + last_err = err + continue + raise err + if isinstance(data, dict) and data.get("code") and int(data.get("code")) < 0: + err = LiveTradingError(f"BinanceSpot error: {data}") + if attempt == 0 and int(data.get("code") or 0) == -1021: + self._ensure_server_time(force=True) + last_err = err + continue + raise err + return data if isinstance(data, dict) else {"raw": data} + if last_err: + raise last_err + raise LiveTradingError("BinanceSpot signed request failed") def ping(self) -> bool: """ diff --git a/backend_api_python/app/services/live_trading/bitget.py b/backend_api_python/app/services/live_trading/bitget.py index 0bc890f..a9c42b4 100644 --- a/backend_api_python/app/services/live_trading/bitget.py +++ b/backend_api_python/app/services/live_trading/bitget.py @@ -61,6 +61,10 @@ class BitgetMixClient(BaseRestClient): self._lev_cache: Dict[str, Tuple[float, bool]] = {} self._lev_cache_ttl_sec = 60.0 + # posMode from GET /api/v2/mix/account/account (hedge_mode vs one_way_mode), cached per contract. + self._pos_mode_cache: Dict[str, Tuple[float, str]] = {} + self._pos_mode_cache_ttl_sec = 60.0 + @staticmethod def _to_dec(x: Any) -> Decimal: try: @@ -242,6 +246,31 @@ class BitgetMixClient(BaseRestClient): raise LiveTradingError(f"Bitget error: {data}") return data if isinstance(data, dict) else {"raw": data} + def _post_mix_place_order( + self, + body: Dict[str, Any], + *, + original_side: str, + reduce_only: bool, + ) -> Dict[str, Any]: + """ + POST place-order; on 40774 (hedge vs one-way mismatch) retry with alternate position fields. + """ + sd = (original_side or "").lower() + try: + return self._signed_request("POST", "/api/v2/mix/order/place-order", json_body=body) + except LiveTradingError as e: + if "40774" not in str(e): + raise + b2: Dict[str, Any] = {k: v for k, v in body.items() if k not in ("side", "tradeSide", "reduceOnly")} + if "tradeSide" in body: + b2["side"] = sd + b2["reduceOnly"] = "YES" if reduce_only else "NO" + else: + b2["tradeSide"] = "close" if reduce_only else "open" + b2["side"] = ("sell" if sd == "buy" else "buy") if reduce_only else sd + return self._signed_request("POST", "/api/v2/mix/order/place-order", json_body=b2) + def _public_request(self, method: str, path: str, *, params: Optional[Dict[str, Any]] = None) -> Dict[str, Any]: code, data, text = self._request(method, path, params=params, headers=None, json_body=None, data=None) if code >= 400: @@ -252,6 +281,117 @@ class BitgetMixClient(BaseRestClient): raise LiveTradingError(f"Bitget error: {data}") return data if isinstance(data, dict) else {"raw": data} + def get_ticker(self, *, symbol: str, **kwargs: Any) -> Dict[str, Any]: + """ + Public mix ticker (for USDT-notional -> base size conversion in quick trade). + + Endpoint: GET /api/v2/mix/market/ticker + """ + sym = to_bitget_um_symbol(symbol) + pt = str(kwargs.get("product_type") or "USDT-FUTURES") + if not sym: + return {} + try: + raw = self._public_request( + "GET", + "/api/v2/mix/market/ticker", + params={"symbol": sym, "productType": pt}, + ) + except Exception: + return {} + data = raw.get("data") if isinstance(raw, dict) else None + if isinstance(data, list) and data: + data = data[0] + if not isinstance(data, dict): + return {} + try: + last = float( + data.get("lastPr") + or data.get("last") + or data.get("close") + or data.get("markPrice") + or data.get("indexPrice") + or 0 + ) + except Exception: + last = 0.0 + if last <= 0: + return {} + return {"last": last, "price": last, "close": last} + + def get_account_pos_mode( + self, + *, + symbol: str, + margin_coin: str = "USDT", + product_type: str = "USDT-FUTURES", + ) -> str: + """ + Returns Bitget posMode for the contract account: 'hedge_mode', 'one_way_mode', or '' if unknown. + + GET /api/v2/mix/account/account + """ + sym = to_bitget_um_symbol(symbol) + if not sym: + return "" + mc = (margin_coin or "USDT").strip().upper() + pt = str(product_type or "USDT-FUTURES") + key = f"{pt}:{sym}:{mc}" + now = time.time() + cached = self._pos_mode_cache.get(key) + if cached: + ts, mode = cached + if (now - float(ts or 0.0)) <= float(self._pos_mode_cache_ttl_sec or 60.0) and mode is not None: + return str(mode) + + try: + resp = self._signed_request( + "GET", + "/api/v2/mix/account/account", + params={ + "symbol": sym.lower(), + "productType": pt, + "marginCoin": mc.lower() or "usdt", + }, + ) + d = resp.get("data") if isinstance(resp, dict) else None + mode = "" + if isinstance(d, dict): + mode = str(d.get("posMode") or "").strip().lower() + self._pos_mode_cache[key] = (now, mode) + return mode + except Exception: + return "" + + def _mix_order_position_fields( + self, + *, + symbol: str, + side: str, + reduce_only: bool, + margin_coin: str, + product_type: str, + ) -> Dict[str, Any]: + """ + Bitget mix place-order: hedge_mode requires tradeSide open/close; one_way_mode requires reduceOnly YES/NO + and must not send tradeSide (see Bitget API doc + CCXT bitget.py). + """ + sd = (side or "").lower() + if sd not in ("buy", "sell"): + raise LiveTradingError(f"Invalid side: {side}") + pos_mode = self.get_account_pos_mode( + symbol=symbol, margin_coin=margin_coin, product_type=product_type + ) + hedge = pos_mode == "hedge_mode" + if hedge: + # Mirror CCXT: hedge close flips side; hedge open keeps side + tradeSide open. + out: Dict[str, Any] = { + "tradeSide": "close" if reduce_only else "open", + "side": ("sell" if sd == "buy" else "buy") if reduce_only else sd, + } + return out + return {"side": sd, "reduceOnly": "YES" if reduce_only else "NO"} + def get_contract(self, *, symbol: str, product_type: str = "USDT-FUTURES") -> Dict[str, Any]: """ Fetch contract metadata (best-effort) from public endpoint. @@ -354,13 +494,34 @@ class BitgetMixClient(BaseRestClient): """ return self._signed_request("GET", "/api/v2/mix/account/accounts", params={"productType": str(product_type or "USDT-FUTURES")}) - def get_positions(self, *, product_type: str = "USDT-FUTURES") -> Dict[str, Any]: + def get_positions(self, *, product_type: str = "USDT-FUTURES", symbol: str = "") -> Dict[str, Any]: """ - Get all positions (best-effort). + Get positions (best-effort). Endpoint: GET /api/v2/mix/position/all-position + When ``symbol`` is set (e.g. ETH/USDT), filters the response list to that contract only. """ - return self._signed_request("GET", "/api/v2/mix/position/all-position", params={"productType": str(product_type or "USDT-FUTURES")}) + resp = self._signed_request( + "GET", + "/api/v2/mix/position/all-position", + params={"productType": str(product_type or "USDT-FUTURES")}, + ) + want = (symbol or "").strip() + if not want: + return resp + sym_key = to_bitget_um_symbol(want).upper() + if not isinstance(resp, dict): + return resp + data = resp.get("data") + if not isinstance(data, list): + return resp + filtered = [ + p for p in data + if isinstance(p, dict) and str(p.get("symbol") or "").strip().upper() == sym_key + ] + out = dict(resp) + out["data"] = filtered + return out def set_leverage( self, @@ -444,16 +605,22 @@ class BitgetMixClient(BaseRestClient): "productType": str(product_type or "USDT-FUTURES"), "marginCoin": str(margin_coin or "USDT"), "marginMode": self._normalize_margin_mode(margin_mode), - "side": sd, "orderType": "market", "size": self._dec_str(sz_dec, strict_precision=sz_precision), } - if reduce_only: - body["reduceOnly"] = "YES" + body.update( + self._mix_order_position_fields( + symbol=symbol, + side=sd, + reduce_only=reduce_only, + margin_coin=str(margin_coin or "USDT"), + product_type=str(product_type or "USDT-FUTURES"), + ) + ) if client_order_id: body["clientOid"] = str(client_order_id) - raw = self._signed_request("POST", "/api/v2/mix/order/place-order", json_body=body) + raw = self._post_mix_place_order(body, original_side=sd, reduce_only=reduce_only) data = raw.get("data") if isinstance(raw, dict) else None exchange_order_id = "" if isinstance(data, dict): @@ -498,21 +665,27 @@ class BitgetMixClient(BaseRestClient): "productType": str(product_type or "USDT-FUTURES"), "marginCoin": str(margin_coin or "USDT"), "marginMode": self._normalize_margin_mode(margin_mode), - "side": sd, "orderType": "limit", "price": str(px), "size": self._dec_str(sz_dec, strict_precision=sz_precision), } + body.update( + self._mix_order_position_fields( + symbol=symbol, + side=sd, + reduce_only=reduce_only, + margin_coin=str(margin_coin or "USDT"), + product_type=str(product_type or "USDT-FUTURES"), + ) + ) # Force maker behavior when requested (avoid taker fills). if post_only: body["force"] = "post_only" else: body["force"] = "gtc" - if reduce_only: - body["reduceOnly"] = "YES" if client_order_id: body["clientOid"] = str(client_order_id) - raw = self._signed_request("POST", "/api/v2/mix/order/place-order", json_body=body) + raw = self._post_mix_place_order(body, original_side=sd, reduce_only=reduce_only) data = raw.get("data") if isinstance(raw, dict) else None exchange_order_id = str(data.get("orderId") or data.get("clientOid") or "") if isinstance(data, dict) else "" return LiveOrderResult(exchange_id="bitget", exchange_order_id=exchange_order_id, filled=0.0, avg_price=0.0, raw=raw) diff --git a/backend_api_python/app/services/strategy.py b/backend_api_python/app/services/strategy.py index 71c6d93..96fd65a 100644 --- a/backend_api_python/app/services/strategy.py +++ b/backend_api_python/app/services/strategy.py @@ -489,16 +489,35 @@ class StrategyService: f"but fails for market_type={market_type}. This is almost always a permissions/product mismatch." ) msg = f"{msg} | {hint}" + hint_cn = ( + "币安接口返回 -2015(密钥/IP/权限不匹配)。请逐项核对:" + "① API Key 是否勾选与当前测试一致的业务(现货选现货权限,合约选合约/U 本位权限);" + "② 若启用 IP 白名单,是否包含当前服务器出口 IP(见下方 egress_ip);" + "③ base_url 与密钥环境一致(主网密钥配 api.binance.com / fapi,模拟盘配 demo 域名与 demo Key);" + "④ 无多余空格、复制完整 Secret。" + ) + if alt_ok: + hint_cn += ( + f" 自动探测:同一密钥在 market_type={alt_market_type} 可通过," + f"当前选择的 {market_type} 与密钥权限不一致的可能性很大。" + ) + else: + hint_cn = "" + + fail_payload = { + 'exchange': safe_cfg, + 'client': client_kind, + 'market_type': market_type, + 'egress_ip': egress_ip, + 'base_url': getattr(client, "base_url", "") or "", + } + if hint_cn: + fail_payload['hint_cn'] = hint_cn + return { 'success': False, 'message': f'Auth failed: {msg}', - 'data': { - 'exchange': safe_cfg, - 'client': client_kind, - 'market_type': market_type, - 'egress_ip': egress_ip, - 'base_url': getattr(client, "base_url", "") or "", - }, + 'data': fail_payload, } return { diff --git a/backend_api_python/app/services/strategy_script_runtime.py b/backend_api_python/app/services/strategy_script_runtime.py new file mode 100644 index 0000000..51f6e37 --- /dev/null +++ b/backend_api_python/app/services/strategy_script_runtime.py @@ -0,0 +1,193 @@ +""" +Python 策略脚本(on_init / on_bar + ctx.buy/sell/close_position)运行时。 +与回测逻辑对齐,供 TradingExecutor 实盘逐根 K 线调用。 +""" +from __future__ import annotations + +from typing import Any, Callable, Dict, List, Optional, Tuple + +import numpy as np +import pandas as pd + +from app.utils.logger import get_logger + +logger = get_logger(__name__) + + +class ScriptBar(dict): + def __getattr__(self, name: str) -> Any: + try: + return self[name] + except KeyError as exc: + raise AttributeError(name) from exc + + +class ScriptPosition(dict): + def __init__(self): + super().__init__() + self.clear_position() + + def __getattr__(self, name: str) -> Any: + try: + return self[name] + except KeyError as exc: + raise AttributeError(name) from exc + + def __bool__(self) -> bool: + return bool(self.get('side')) and float(self.get('size') or 0) > 0 + + def __int__(self) -> int: + return int(self.get('direction') or 0) + + def __float__(self) -> float: + return float(self.get('direction') or 0) + + def __eq__(self, other: Any) -> bool: + try: + return int(self) == int(other) + except Exception: + return dict.__eq__(self, other) + + def __lt__(self, other: Any) -> bool: + return int(self) < int(other) + + def __le__(self, other: Any) -> bool: + return int(self) <= int(other) + + def __gt__(self, other: Any) -> bool: + return int(self) > int(other) + + def __ge__(self, other: Any) -> bool: + return int(self) >= int(other) + + def clear_position(self) -> None: + self.clear() + self.update({ + 'side': '', + 'size': 0.0, + 'entry_price': 0.0, + 'direction': 0, + 'amount': 0.0, + }) + + def open_position(self, side: str, entry_price: float, amount: float) -> None: + direction = 1 if side == 'long' else (-1 if side == 'short' else 0) + size = float(amount or 0.0) + price = float(entry_price or 0.0) + self.clear() + self.update({ + 'side': side, + 'size': size, + 'entry_price': price, + 'direction': direction, + 'amount': size, + }) + + def add_position(self, entry_price: float, amount: float) -> None: + extra = float(amount or 0.0) + if extra <= 0: + return + current_size = float(self.get('size') or 0.0) + current_price = float(self.get('entry_price') or 0.0) + next_size = current_size + extra + next_price = float(entry_price or current_price or 0.0) + if current_size > 0 and current_price > 0 and next_size > 0: + next_price = ((current_price * current_size) + (float(entry_price or current_price) * extra)) / next_size + self['size'] = next_size + self['amount'] = next_size + self['entry_price'] = next_price + + +class StrategyScriptContext: + """与回测 ScriptBacktestContext 行为一致,供实盘按根推进。""" + + def __init__(self, bars_df: pd.DataFrame, initial_balance: float): + self._bars_df = bars_df + self._params: Dict[str, Any] = {} + self._orders: List[Dict[str, Any]] = [] + self._logs: List[str] = [] + self.current_index = -1 + self.position = ScriptPosition() + self.balance = float(initial_balance) + self.equity = float(initial_balance) + + def param(self, name: str, default: Any = None) -> Any: + if name not in self._params: + self._params[name] = default + return self._params[name] + + def bars(self, n: int = 1): + start = max(0, self.current_index - int(n) + 1) + out = [] + for _, row in self._bars_df.iloc[start:self.current_index + 1].iterrows(): + out.append(ScriptBar( + open=float(row.get('open') or 0), + high=float(row.get('high') or 0), + low=float(row.get('low') or 0), + close=float(row.get('close') or 0), + volume=float(row.get('volume') or 0), + timestamp=row.get('time') + )) + return out + + def log(self, message: Any): + self._logs.append(str(message)) + + def buy(self, price: Any = None, amount: Any = None): + self._orders.append({'action': 'buy', 'price': price, 'amount': amount}) + + def sell(self, price: Any = None, amount: Any = None): + self._orders.append({'action': 'sell', 'price': price, 'amount': amount}) + + def close_position(self): + self._orders.append({'action': 'close'}) + + +def compile_strategy_script_handlers(code: str) -> Tuple[Optional[Callable], Optional[Callable]]: + """ + 校验并编译策略脚本,返回 (on_init, on_bar)。 + on_bar 不可缺省;on_init 可选。 + """ + if not code or not str(code).strip(): + raise ValueError("Strategy script is empty") + + import builtins + + def safe_import(name, *args, **kwargs): + allowed_modules = ['numpy', 'pandas', 'math', 'json', 'datetime', 'time'] + if name in allowed_modules or name.split('.')[0] in allowed_modules: + return builtins.__import__(name, *args, **kwargs) + raise ImportError(f"Import not allowed: {name}") + + safe_builtins = {k: getattr(builtins, k) for k in dir(builtins) + if not k.startswith('_') and k not in ['eval', 'exec', 'compile', 'open', 'input', 'help', 'exit', 'quit']} + safe_builtins['__import__'] = safe_import + + exec_env = { + '__builtins__': safe_builtins, + 'np': np, + 'pd': pd, + } + + from app.utils.safe_exec import validate_code_safety, safe_exec_code + + is_safe, error_msg = validate_code_safety(code) + if not is_safe: + raise ValueError(f"Code contains unsafe operations: {error_msg}") + + exec_result = safe_exec_code( + code=code, + exec_globals=exec_env, + exec_locals=exec_env, + timeout=60 + ) + if not exec_result['success']: + raise RuntimeError(f"Code execution failed: {exec_result.get('error')}") + + on_init = exec_env.get('on_init') + on_bar = exec_env.get('on_bar') + if not callable(on_bar): + raise ValueError("Strategy script must define on_bar(ctx, bar)") + if on_init is not None and not callable(on_init): + on_init = None + return (on_init if callable(on_init) else None), on_bar diff --git a/backend_api_python/app/services/trading_executor.py b/backend_api_python/app/services/trading_executor.py index 0c5b9ca..69b6c9d 100644 --- a/backend_api_python/app/services/trading_executor.py +++ b/backend_api_python/app/services/trading_executor.py @@ -1,5 +1,8 @@ """ -实时交易执行服务 +实时交易执行服务。 + +策略线程:拉 K 线/价格、算信号,将订单写入 pending_orders。 +实盘成交由 PendingOrderWorker + app.services.live_trading(各所直连 REST)完成,不在此模块使用 ccxt 下单。 """ import time import threading @@ -15,13 +18,17 @@ import json from decimal import Decimal, ROUND_DOWN, ROUND_UP import pandas as pd import numpy as np -import ccxt from app.utils.logger import get_logger from app.utils.db import get_db_connection from app.data_sources import DataSourceFactory from app.services.kline import KlineService from app.services.indicator_params import IndicatorParamsParser, IndicatorCaller +from app.services.strategy_script_runtime import ( + ScriptBar, + StrategyScriptContext, + compile_strategy_script_handlers, +) logger = get_logger(__name__) @@ -465,6 +472,212 @@ class TradingExecutor: logger.error(f"Failed to stop strategy {strategy_id}: {str(e)}") logger.error(traceback.format_exc()) return False + + def _df_to_script_exec_df(self, df: pd.DataFrame) -> pd.DataFrame: + out = df.reset_index() + c0 = out.columns[0] + if c0 != 'time': + out.rename(columns={c0: 'time'}, inplace=True) + return out + + def _script_default_position_ratio(self, trading_config: Dict[str, Any]) -> float: + try: + ep = (trading_config or {}).get('entry_pct') + if ep is not None: + return float(self._to_ratio(ep, default=0.06)) + except Exception: + pass + return 0.06 + + def _hydrate_script_ctx_from_positions(self, ctx: StrategyScriptContext, strategy_id: int, symbol: str) -> None: + ctx.position.clear_position() + pl = self._get_current_positions(strategy_id, symbol) + if not pl: + return + p = pl[0] + side = (p.get('side') or 'long').strip().lower() + if side not in ('long', 'short'): + return + size = float(p.get('size') or 0) + ep = float(p.get('entry_price') or 0) + if size > 0: + ctx.position.open_position(side, ep, size) + + def _init_script_strategy_context( + self, + strategy_id: int, + df: pd.DataFrame, + trading_config: Dict[str, Any], + initial_capital: float, + ) -> Tuple[StrategyScriptContext, Optional[pd.Timestamp]]: + df_exec = self._df_to_script_exec_df(df) + ctx = StrategyScriptContext(df_exec, float(initial_capital or 0)) + raw = (trading_config or {}).get('script_runtime_state') or {} + params = raw.get('params') if isinstance(raw, dict) else {} + if isinstance(params, dict): + ctx._params = dict(params) + last_ts = None + ts_s = raw.get('last_closed_bar_ts') if isinstance(raw, dict) else None + if ts_s: + try: + last_ts = pd.Timestamp(ts_s) + if last_ts.tzinfo is None: + last_ts = last_ts.tz_localize('UTC') + else: + last_ts = last_ts.tz_convert('UTC') + except Exception: + last_ts = None + return ctx, last_ts + + def _persist_script_runtime_state(self, strategy_id: int, closed_ts: Any, params: Dict[str, Any]) -> None: + try: + safe_params = json.loads(json.dumps(params or {}, default=str)) + except Exception: + safe_params = {} + ts_str = '' + try: + if closed_ts is not None: + ts_str = pd.Timestamp(closed_ts).isoformat() + except Exception: + ts_str = '' + state = {'last_closed_bar_ts': ts_str, 'params': safe_params} + try: + with get_db_connection() as db: + cur = db.cursor() + cur.execute("SELECT trading_config FROM qd_strategies_trading WHERE id = %s", (strategy_id,)) + row = cur.fetchone() + if not row: + cur.close() + return + tc = row.get('trading_config') + if isinstance(tc, str) and tc.strip(): + try: + tc = json.loads(tc) + except Exception: + tc = {} + elif not isinstance(tc, dict): + tc = {} + tc['script_runtime_state'] = state + cur.execute( + "UPDATE qd_strategies_trading SET trading_config = %s WHERE id = %s", + (json.dumps(tc, ensure_ascii=False), strategy_id), + ) + db.commit() + cur.close() + except Exception as e: + logger.warning(f"Persist script runtime state failed: {e}") + + def _script_orders_to_execution_signals( + self, + ctx: StrategyScriptContext, + trade_direction: str, + bar_close: float, + closed_ts: pd.Timestamp, + trading_config: Dict[str, Any], + ) -> List[Dict[str, Any]]: + td = str(trade_direction or 'both').lower() + if td not in ('long', 'short', 'both'): + td = 'both' + default_ratio = self._script_default_position_ratio(trading_config) + try: + ts_i = int(closed_ts.timestamp()) + except Exception: + ts_i = int(time.time()) + out: List[Dict[str, Any]] = [] + trig = float(bar_close or 0) + for order in list(ctx._orders or []): + action = str(order.get('action') or '').lower() + try: + order_price = float(order.get('price') or bar_close or 0) + except Exception: + order_price = trig + raw_amt = order.get('amount') + pos_ratio = default_ratio + if raw_amt is not None: + try: + v = float(raw_amt) + if v > 0: + pos_ratio = v + except Exception: + pass + if action == 'close': + if ctx.position > 0: + out.append({'type': 'close_long', 'trigger_price': order_price or trig, 'position_size': 0, 'timestamp': ts_i}) + ctx.position.clear_position() + elif ctx.position < 0: + out.append({'type': 'close_short', 'trigger_price': order_price or trig, 'position_size': 0, 'timestamp': ts_i}) + ctx.position.clear_position() + continue + if action == 'buy': + if ctx.position < 0: + out.append({'type': 'close_short', 'trigger_price': order_price or trig, 'position_size': 0, 'timestamp': ts_i}) + ctx.position.clear_position() + if td in ('long', 'both'): + if ctx.position == 0: + out.append({'type': 'open_long', 'trigger_price': order_price or trig, 'position_size': pos_ratio, 'timestamp': ts_i}) + ctx.position.open_position('long', order_price or trig, pos_ratio) + else: + out.append({'type': 'add_long', 'trigger_price': order_price or trig, 'position_size': pos_ratio, 'timestamp': ts_i}) + ctx.position.add_position(order_price or trig, pos_ratio) + continue + if action == 'sell': + if ctx.position > 0: + out.append({'type': 'close_long', 'trigger_price': order_price or trig, 'position_size': 0, 'timestamp': ts_i}) + ctx.position.clear_position() + if td in ('short', 'both'): + if ctx.position == 0: + out.append({'type': 'open_short', 'trigger_price': order_price or trig, 'position_size': pos_ratio, 'timestamp': ts_i}) + ctx.position.open_position('short', order_price or trig, pos_ratio) + else: + out.append({'type': 'add_short', 'trigger_price': order_price or trig, 'position_size': pos_ratio, 'timestamp': ts_i}) + ctx.position.add_position(order_price or trig, pos_ratio) + return out + + def _script_evaluate_new_closed_bar( + self, + df: pd.DataFrame, + ctx: StrategyScriptContext, + on_bar, + trade_direction: str, + last_closed_ts: Optional[pd.Timestamp], + strategy_id: int, + symbol: str, + trading_config: Dict[str, Any], + ) -> Tuple[List[Dict[str, Any]], Optional[pd.Timestamp]]: + if df is None or len(df) < 2: + return [], last_closed_ts + closed_ts = df.index[-2] + try: + if last_closed_ts is not None and closed_ts <= last_closed_ts: + return [], last_closed_ts + except Exception: + pass + df_exec = self._df_to_script_exec_df(df) + ctx._bars_df = df_exec + pos = len(df) - 2 + ctx.current_index = int(pos) + row = df_exec.iloc[pos] + self._hydrate_script_ctx_from_positions(ctx, strategy_id, symbol) + ctx._orders = [] + bar = ScriptBar( + open=float(row.get('open') or 0), + high=float(row.get('high') or 0), + low=float(row.get('low') or 0), + close=float(row.get('close') or 0), + volume=float(row.get('volume') or 0), + timestamp=row.get('time'), + ) + try: + on_bar(ctx, bar) + except Exception as e: + logger.error(f"Strategy {strategy_id} script on_bar error: {e}") + logger.error(traceback.format_exc()) + return [], last_closed_ts + bar_close = float(row.get('close') or 0) + pending = self._script_orders_to_execution_signals(ctx, trade_direction, bar_close, closed_ts, trading_config) + self._persist_script_runtime_state(strategy_id, closed_ts, ctx._params) + logger.info(f"Strategy {strategy_id} script closed bar {closed_ts} -> {len(pending)} signal(s)") + return pending, closed_ts def _run_strategy_loop(self, strategy_id: int): """ @@ -483,13 +696,15 @@ class TradingExecutor: logger.error(f"Strategy {strategy_id} not found") return - if strategy['strategy_type'] != 'IndicatorStrategy': - logger.error(f"Strategy {strategy_id} has unsupported strategy_type for realtime execution: {strategy['strategy_type']}") + stype = strategy.get('strategy_type') or '' + if stype not in ('IndicatorStrategy', 'ScriptStrategy'): + logger.error(f"Strategy {strategy_id} has unsupported strategy_type for realtime execution: {stype}") return - + is_script = stype == 'ScriptStrategy' + # 初始化策略状态 trading_config = strategy['trading_config'] - indicator_config = strategy['indicator_config'] + indicator_config = strategy.get('indicator_config') or {} ai_model_config = strategy.get('ai_model_config') or {} execution_mode = (strategy.get('execution_mode') or 'signal').strip().lower() if execution_mode not in ['signal', 'live']: @@ -545,68 +760,84 @@ class TradingExecutor: market_category = (strategy.get('market_category') or 'Crypto').strip() logger.info(f"Strategy {strategy_id} market_category: {market_category}") - # Check if this is a cross-sectional strategy - cs_strategy_type = trading_config.get('cs_strategy_type', 'single') - if cs_strategy_type == 'cross_sectional': - # Run cross-sectional strategy loop - self._run_cross_sectional_strategy_loop( - strategy_id, strategy, trading_config, indicator_config, - ai_model_config, execution_mode, notification_config, - strategy_name, market_category, market_type, leverage, - initial_capital, indicator_code, indicator_id - ) - return - - # 初始化交易所连接(信号模式下无需真实连接) - exchange = None - - # 安全获取 initial_capital + # 安全获取 initial_capital(横截面分支也需要) try: initial_capital_val = strategy.get('initial_capital', 1000) if isinstance(initial_capital_val, (list, tuple)): initial_capital_val = initial_capital_val[0] if initial_capital_val else 1000 initial_capital = float(initial_capital_val) - except: + except Exception: logger.warning(f"Strategy {strategy_id} invalid initial_capital format, reset to 1000: {strategy.get('initial_capital')}") initial_capital = 1000.0 - - # 净值会在首次更新持仓时自动计算和更新 - - # 获取指标代码 - indicator_id = indicator_config.get('indicator_id') - indicator_code = indicator_config.get('indicator_code', '') - - # 如果代码为空,尝试从数据库获取 - if not indicator_code and indicator_id: - indicator_code = self._get_indicator_code_from_db(indicator_id) - - if not indicator_code: - logger.error(f"Strategy {strategy_id} indicator_code is empty") - return - - # 确保 indicator_code 是字符串(处理 JSON 转义问题) - if not isinstance(indicator_code, str): - indicator_code = str(indicator_code) - - # 处理可能的 JSON 转义问题 - if '\\n' in indicator_code and '\n' not in indicator_code: + + indicator_id = None + indicator_code = '' + strategy_code = '' + on_init_script = None + on_bar_script = None + + if is_script: + strategy_code = (strategy.get('strategy_code') or '').strip() + if not strategy_code: + logger.error(f"Strategy {strategy_id} strategy_code is empty") + return + if '\\n' in strategy_code and '\n' not in strategy_code: + try: + decoded = json.loads(f'"{strategy_code}"') + if isinstance(decoded, str): + strategy_code = decoded + except Exception: + strategy_code = ( + strategy_code.replace('\\n', '\n').replace('\\t', '\t').replace('\\r', '\r') + .replace('\\"', '"').replace("\\'", "'").replace('\\\\', '\\') + ) try: - import json - decoded = json.loads(f'"{indicator_code}"') - if isinstance(decoded, str): - indicator_code = decoded - logger.info(f"Strategy {strategy_id} decoded escaped indicator_code") + on_init_script, on_bar_script = compile_strategy_script_handlers(strategy_code) except Exception as e: - logger.warning(f"Strategy {strategy_id} JSON decode failed; falling back to manual unescape: {str(e)}") - indicator_code = ( - indicator_code - .replace('\\n', '\n') - .replace('\\t', '\t') - .replace('\\r', '\r') - .replace('\\"', '"') - .replace("\\'", "'") - .replace('\\\\', '\\') - ) + logger.error(f"Strategy {strategy_id} script compile failed: {e}") + logger.error(traceback.format_exc()) + return + else: + indicator_config = strategy['indicator_config'] + indicator_id = indicator_config.get('indicator_id') + indicator_code = indicator_config.get('indicator_code', '') + if not indicator_code and indicator_id: + indicator_code = self._get_indicator_code_from_db(indicator_id) + if not indicator_code: + logger.error(f"Strategy {strategy_id} indicator_code is empty") + return + if not isinstance(indicator_code, str): + indicator_code = str(indicator_code) + if '\\n' in indicator_code and '\n' not in indicator_code: + try: + decoded = json.loads(f'"{indicator_code}"') + if isinstance(decoded, str): + indicator_code = decoded + logger.info(f"Strategy {strategy_id} decoded escaped indicator_code") + except Exception as e: + logger.warning(f"Strategy {strategy_id} JSON decode failed; falling back to manual unescape: {str(e)}") + indicator_code = ( + indicator_code.replace('\\n', '\n').replace('\\t', '\t').replace('\\r', '\r') + .replace('\\"', '"').replace("\\'", "'").replace('\\\\', '\\') + ) + + # Check if this is a cross-sectional strategy(仅指标策略支持) + cs_strategy_type = trading_config.get('cs_strategy_type', 'single') + if (not is_script) and cs_strategy_type == 'cross_sectional': + self._run_cross_sectional_strategy_loop( + strategy_id, strategy, trading_config, strategy['indicator_config'], + ai_model_config, execution_mode, notification_config, + strategy_name, market_category, market_type, leverage, + initial_capital, indicator_code, indicator_id + ) + return + + if is_script and cs_strategy_type == 'cross_sectional': + logger.error(f"Strategy {strategy_id} ScriptStrategy does not support cross_sectional mode") + return + + # 初始化交易所连接(信号模式下无需真实连接) + exchange = None # ============================================ # 初始化阶段:获取历史K线并计算指标 @@ -658,29 +889,47 @@ class TradingExecutor: initial_position_count = 1 # 简化处理,假设是单笔持仓 initial_last_add_price = initial_avg_entry_price - # 关键诊断日志:确认指标是否拿到了持仓状态 logger.info( - f"策略 {strategy_id} 指标注入持仓状态: count={len(current_pos_list)}, " + f"策略 {strategy_id} 持仓快照: count={len(current_pos_list)}, " f"position={initial_position}, entry_price={initial_avg_entry_price}, highest={initial_highest}" ) - # 执行指标代码,获取信号和触发价格 - indicator_result = self._execute_indicator_with_prices( - indicator_code, df, trading_config, - initial_highest_price=initial_highest, - initial_position=initial_position, - initial_avg_entry_price=initial_avg_entry_price, - initial_position_count=initial_position_count, - initial_last_add_price=initial_last_add_price - ) - if indicator_result is None: - logger.error(f"Strategy {strategy_id} indicator execution failed") - return - - # 提取信号和触发价格 - pending_signals = indicator_result.get('pending_signals', []) # 待触发的信号列表 - last_kline_time = indicator_result.get('last_kline_time', 0) # 最后一根K线的时间 - + script_ctx = None + last_script_closed_ts = None + if is_script: + script_ctx, last_script_closed_ts = self._init_script_strategy_context( + strategy_id, df, trading_config, initial_capital + ) + if on_init_script: + self._hydrate_script_ctx_from_positions(script_ctx, strategy_id, symbol) + try: + on_init_script(script_ctx) + except Exception as e: + logger.error(f"Strategy {strategy_id} on_init error: {e}") + logger.error(traceback.format_exc()) + pending_signals, last_script_closed_ts = self._script_evaluate_new_closed_bar( + df, script_ctx, on_bar_script, trade_direction, + last_script_closed_ts, strategy_id, symbol, trading_config, + ) + try: + last_kline_time = int(df.index[-1].timestamp()) + except Exception: + last_kline_time = int(time.time()) + else: + indicator_result = self._execute_indicator_with_prices( + indicator_code, df, trading_config, + initial_highest_price=initial_highest, + initial_position=initial_position, + initial_avg_entry_price=initial_avg_entry_price, + initial_position_count=initial_position_count, + initial_last_add_price=initial_last_add_price + ) + if indicator_result is None: + logger.error(f"Strategy {strategy_id} indicator execution failed") + return + pending_signals = indicator_result.get('pending_signals', []) + last_kline_time = indicator_result.get('last_kline_time', 0) + logger.info(f"Strategy {strategy_id} initialized; pending_signals={len(pending_signals)}") if pending_signals: logger.info(f"Initial signals: {pending_signals}") @@ -744,52 +993,63 @@ class TradingExecutor: if klines and len(klines) >= 2: df = self._klines_to_dataframe(klines) if len(df) > 0: - current_pos_list = self._get_current_positions(strategy_id, symbol) - initial_highest = 0.0 - initial_position = 0 - initial_avg_entry_price = 0.0 - initial_position_count = 0 - initial_last_add_price = 0.0 - - if current_pos_list: - pos = current_pos_list[0] - initial_highest = float(pos.get('highest_price', 0) or 0) - pos_side = pos.get('side', 'long') - initial_position = 1 if pos_side == 'long' else -1 - initial_avg_entry_price = float(pos.get('entry_price', 0) or 0) - initial_position_count = 1 - initial_last_add_price = initial_avg_entry_price - - indicator_result = self._execute_indicator_with_prices( - indicator_code, df, trading_config, - initial_highest_price=initial_highest, - initial_position=initial_position, - initial_avg_entry_price=initial_avg_entry_price, - initial_position_count=initial_position_count, - initial_last_add_price=initial_last_add_price - ) - if indicator_result: - pending_signals = indicator_result.get('pending_signals', []) - last_kline_time = indicator_result.get('last_kline_time', 0) - new_hp = indicator_result.get('new_highest_price', 0) - + if is_script: + new_sig, last_script_closed_ts = self._script_evaluate_new_closed_bar( + df, script_ctx, on_bar_script, trade_direction, + last_script_closed_ts, strategy_id, symbol, trading_config, + ) + pending_signals = new_sig + try: + last_kline_time = int(df.index[-1].timestamp()) + except Exception: + last_kline_time = int(time.time()) last_kline_update_time = current_time + else: + current_pos_list = self._get_current_positions(strategy_id, symbol) + initial_highest = 0.0 + initial_position = 0 + initial_avg_entry_price = 0.0 + initial_position_count = 0 + initial_last_add_price = 0.0 - # 更新 highest_price(使用最新 close 作为 current_price 的近似) - if new_hp > 0 and current_pos_list: - current_close = float(df['close'].iloc[-1]) - for p in current_pos_list: - self._update_position( - strategy_id, p['symbol'], p['side'], - float(p['size']), float(p['entry_price']), - current_close, - highest_price=new_hp - ) + if current_pos_list: + pos = current_pos_list[0] + initial_highest = float(pos.get('highest_price', 0) or 0) + pos_side = pos.get('side', 'long') + initial_position = 1 if pos_side == 'long' else -1 + initial_avg_entry_price = float(pos.get('entry_price', 0) or 0) + initial_position_count = 1 + initial_last_add_price = initial_avg_entry_price + + indicator_result = self._execute_indicator_with_prices( + indicator_code, df, trading_config, + initial_highest_price=initial_highest, + initial_position=initial_position, + initial_avg_entry_price=initial_avg_entry_price, + initial_position_count=initial_position_count, + initial_last_add_price=initial_last_add_price + ) + if indicator_result: + pending_signals = indicator_result.get('pending_signals', []) + last_kline_time = indicator_result.get('last_kline_time', 0) + new_hp = indicator_result.get('new_highest_price', 0) + + last_kline_update_time = current_time + + if new_hp > 0 and current_pos_list: + current_close = float(df['close'].iloc[-1]) + for p in current_pos_list: + self._update_position( + strategy_id, p['symbol'], p['side'], + float(p['size']), float(p['entry_price']), + current_close, + highest_price=new_hp + ) else: # ============================================ - # 3. 非K线更新tick:用当前价更新最后一根K线并重算指标(统一tick节奏) + # 3. 非K线更新 tick:脚本策略不在这里重算(仅在新 K 收盘时 on_bar) # ============================================ - if 'df' in locals() and df is not None and len(df) > 0: + if (not is_script) and 'df' in locals() and df is not None and len(df) > 0: try: realtime_df = df.copy() realtime_df = self._update_dataframe_with_current_price(realtime_df, current_price, timeframe) @@ -1055,7 +1315,7 @@ class TradingExecutor: initial_capital, leverage, decide_interval, execution_mode, notification_config, indicator_config, exchange_config, trading_config, ai_model_config, - market_category + market_category, strategy_code FROM qd_strategies_trading WHERE id = %s """ @@ -1144,8 +1404,14 @@ class TradingExecutor: market_type: str = None, leverage: float = None, strategy_id: int = None - ) -> Optional[ccxt.Exchange]: - """(Mock) 信号模式不需要真实交易所连接""" + ) -> Any: + """ + 占位:策略线程内不创建交易所 SDK 实例。 + + 实盘下单不经过本方法。信号经 _execute_exchange_order 写入 pending_orders, + 由 PendingOrderWorker 使用 app.services.live_trading 下的直连 REST 客户端执行。 + K 线/现价由 KlineService、DataSourceFactory 等数据层提供(该层可能使用 ccxt 拉行情,与下单解耦)。 + """ return None def _fetch_latest_kline(self, symbol: str, timeframe: str, limit: int = 500, market_category: str = 'Crypto') -> List[Dict[str, Any]]: @@ -2434,14 +2700,13 @@ class TradingExecutor: signal_ts: int = 0, ) -> Optional[Dict[str, Any]]: """ - Convert a signal into a concrete pending order and enqueue it into DB. + 将信号转为 pending_orders 队列记录(本方法不直连交易所、不使用 ccxt)。 - A separate worker will poll `pending_orders` and dispatch: - - execution_mode='signal': dispatch notifications (no real trading). - - execution_mode='live': reserved for future live trading execution (not implemented). + PendingOrderWorker 轮询执行: + - execution_mode='signal':仅通知/模拟路径。 + - execution_mode='live':通过 live_trading 包内的各交易所 REST 客户端下单(非 ccxt)。 - Note: Order execution settings (order_mode, maker_wait_sec, maker_offset_bps) are now - configured via environment variables and not passed from strategy config. + 行情/K 线不在此处拉取;order_mode 等由环境变量配置。 """ try: # Reference price at enqueue time: use current tick price if provided to avoid extra fetch. diff --git a/frontend/dist/css/140.cc4abc36.css b/frontend/dist/css/140.cc4abc36.css deleted file mode 100644 index 4c08d5b..0000000 --- a/frontend/dist/css/140.cc4abc36.css +++ /dev/null @@ -1 +0,0 @@ -.profile-page[data-v-06c79ed5]{padding:24px;min-height:calc(100vh - 120px);background:-webkit-gradient(linear,left top,left bottom,from(#f8fafc),to(#f1f5f9));background:linear-gradient(180deg,#f8fafc,#f1f5f9)}.profile-page .page-header[data-v-06c79ed5]{margin-bottom:24px}.profile-page .page-header .page-title[data-v-06c79ed5]{font-size:24px;font-weight:700;margin:0 0 8px 0;color:#1e3a5f;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:12px}.profile-page .page-header .page-title .anticon[data-v-06c79ed5]{font-size:28px;color:#1890ff}.profile-page .page-header .page-desc[data-v-06c79ed5]{color:#64748b;font-size:14px;margin:0}.profile-page .profile-cards-row[data-v-06c79ed5]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.profile-page .profile-cards-row .profile-card-col .ant-card[data-v-06c79ed5],.profile-page .profile-cards-row .profile-card-col[data-v-06c79ed5],.profile-page .profile-cards-row .right-cards-col .ant-card[data-v-06c79ed5],.profile-page .profile-cards-row .right-cards-col[data-v-06c79ed5]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .profile-cards-row .profile-card-col .ant-card[data-v-06c79ed5],.profile-page .profile-cards-row .right-cards-col .ant-card[data-v-06c79ed5]{height:100%}.profile-page .profile-cards-row .profile-card-col[data-v-06c79ed5] .ant-card-body,.profile-page .profile-cards-row .right-cards-col[data-v-06c79ed5] .ant-card-body{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .profile-cards-row .right-cards-row[data-v-06c79ed5]{height:100%;display:-webkit-box;display:-ms-flexbox;display:flex}.profile-page .profile-cards-row .right-cards-row .ant-col .ant-card[data-v-06c79ed5],.profile-page .profile-cards-row .right-cards-row .ant-col[data-v-06c79ed5]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .profile-cards-row .right-cards-row .ant-col .ant-card[data-v-06c79ed5]{height:100%}.profile-page .profile-cards-row .right-cards-row .ant-col[data-v-06c79ed5] .ant-card-body{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .profile-card[data-v-06c79ed5]{border-radius:12px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08);text-align:center}.profile-page .profile-card .avatar-section[data-v-06c79ed5]{padding:20px 0}.profile-page .profile-card .avatar-section .ant-avatar[data-v-06c79ed5]{-webkit-box-shadow:0 4px 12px rgba(0,0,0,.15);box-shadow:0 4px 12px rgba(0,0,0,.15)}.profile-page .profile-card .avatar-section .username[data-v-06c79ed5]{margin:16px 0 8px;font-size:20px;font-weight:600;color:#1e3a5f}.profile-page .profile-card .avatar-section .user-role[data-v-06c79ed5]{margin:0}.profile-page .profile-card .profile-info[data-v-06c79ed5]{text-align:left;-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:distribute;justify-content:space-around}.profile-page .profile-card .profile-info .info-item[data-v-06c79ed5]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:12px 0;border-bottom:1px solid #f0f0f0}.profile-page .profile-card .profile-info .info-item[data-v-06c79ed5]:last-child{border-bottom:none}.profile-page .profile-card .profile-info .info-item .anticon[data-v-06c79ed5]{font-size:16px;color:#1890ff;margin-right:12px}.profile-page .profile-card .profile-info .info-item .label[data-v-06c79ed5]{color:#64748b;margin-right:8px}.profile-page .profile-card .profile-info .info-item .value[data-v-06c79ed5]{color:#1e3a5f;font-weight:500}.profile-page .edit-card[data-v-06c79ed5]{border-radius:12px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08)}.profile-page .edit-card .password-form[data-v-06c79ed5],.profile-page .edit-card .profile-form[data-v-06c79ed5]{max-width:500px}.profile-page .edit-card .password-form[data-v-06c79ed5] .ant-input,.profile-page .edit-card .password-form[data-v-06c79ed5] .ant-input-password,.profile-page .edit-card .profile-form[data-v-06c79ed5] .ant-input,.profile-page .edit-card .profile-form[data-v-06c79ed5] .ant-input-password{border-radius:8px}.profile-page .edit-card .password-form .email-hint[data-v-06c79ed5],.profile-page .edit-card .profile-form .email-hint[data-v-06c79ed5]{margin-top:8px;font-size:12px;color:rgba(0,0,0,.45)}.profile-page .edit-card .password-form .email-hint.email-warning[data-v-06c79ed5],.profile-page .edit-card .profile-form .email-hint.email-warning[data-v-06c79ed5]{color:#faad14}.profile-page .edit-card .amount-positive[data-v-06c79ed5]{color:#52c41a;font-weight:600}.profile-page .edit-card .amount-negative[data-v-06c79ed5]{color:#ff4d4f;font-weight:600}.profile-page .edit-card .notification-settings-form .field-hint[data-v-06c79ed5]{margin-top:6px;font-size:12px;color:rgba(0,0,0,.45);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px}.profile-page .edit-card .notification-settings-form .field-hint .anticon[data-v-06c79ed5]{font-size:12px}.profile-page .edit-card .notification-settings-form[data-v-06c79ed5] .ant-checkbox-group{width:100%}.profile-page .edit-card .notification-settings-form[data-v-06c79ed5] .ant-checkbox-wrapper{margin-bottom:8px}.profile-page .credits-card[data-v-06c79ed5]{border-radius:12px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08);background:linear-gradient(135deg,#667eea,#764ba2);color:#fff}.profile-page .credits-card[data-v-06c79ed5] .ant-card-body{background:transparent;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .credits-card[data-v-06c79ed5] .ant-divider{border-color:hsla(0,0%,100%,.2)}.profile-page .credits-card .credits-header .credits-title[data-v-06c79ed5]{font-size:16px;font-weight:600;margin:0;color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.profile-page .credits-card .credits-header .credits-title .anticon[data-v-06c79ed5]{font-size:18px}.profile-page .credits-card .credits-body[data-v-06c79ed5]{padding:20px 0;text-align:center;-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.profile-page .credits-card .credits-body .credits-amount .amount-value[data-v-06c79ed5]{font-size:42px;font-weight:700;color:#fff;text-shadow:0 2px 4px rgba(0,0,0,.2)}.profile-page .credits-card .credits-body .credits-amount .amount-label[data-v-06c79ed5]{font-size:16px;color:hsla(0,0%,100%,.9);margin-left:8px}.profile-page .credits-card .credits-body .vip-status[data-v-06c79ed5]{margin-top:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:6px;font-size:13px}.profile-page .credits-card .credits-body .vip-status .vip-active[data-v-06c79ed5]{color:gold}.profile-page .credits-card .credits-body .vip-status .vip-expired[data-v-06c79ed5]{color:hsla(0,0%,100%,.6)}.profile-page .credits-card .credits-body .vip-status .no-vip[data-v-06c79ed5]{color:hsla(0,0%,100%,.7)}.profile-page .credits-card .credits-actions[data-v-06c79ed5]{text-align:center;margin-top:auto}.profile-page .credits-card .credits-actions .ant-btn[data-v-06c79ed5]{border-radius:20px;padding:0 24px;height:36px;font-weight:500;background:#fff;color:#667eea;border:none}.profile-page .credits-card .credits-actions .ant-btn[data-v-06c79ed5]:hover{background:hsla(0,0%,100%,.9);color:#764ba2}.profile-page .credits-card .credits-hint[data-v-06c79ed5]{margin-top:12px;text-align:center;font-size:12px;color:hsla(0,0%,100%,.7);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:6px}.profile-page .referral-card[data-v-06c79ed5]{border-radius:12px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08);background:linear-gradient(135deg,#11998e,#38ef7d);color:#fff}.profile-page .referral-card[data-v-06c79ed5] .ant-card-body{background:transparent;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .referral-card[data-v-06c79ed5] .ant-divider{border-color:hsla(0,0%,100%,.2)}.profile-page .referral-card .referral-header .referral-title[data-v-06c79ed5]{font-size:16px;font-weight:600;margin:0;color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.profile-page .referral-card .referral-header .referral-title .anticon[data-v-06c79ed5]{font-size:18px}.profile-page .referral-card .referral-body[data-v-06c79ed5]{padding:12px 0;-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.profile-page .referral-card .referral-body .referral-stats[data-v-06c79ed5]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around}.profile-page .referral-card .referral-body .referral-stats .stat-item[data-v-06c79ed5]{text-align:center}.profile-page .referral-card .referral-body .referral-stats .stat-item .stat-value[data-v-06c79ed5]{font-size:28px;font-weight:700;color:#fff;display:block}.profile-page .referral-card .referral-body .referral-stats .stat-item .stat-label[data-v-06c79ed5]{font-size:12px;color:hsla(0,0%,100%,.8)}.profile-page .referral-card .referral-body .referral-link-section .link-label[data-v-06c79ed5]{font-size:12px;color:hsla(0,0%,100%,.9);margin-bottom:6px}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-06c79ed5] .ant-input{background:hsla(0,0%,100%,.2);border:1px solid hsla(0,0%,100%,.3);color:#fff}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-06c79ed5] .ant-input::-webkit-input-placeholder{color:hsla(0,0%,100%,.6)}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-06c79ed5] .ant-input::-moz-placeholder{color:hsla(0,0%,100%,.6)}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-06c79ed5] .ant-input:-ms-input-placeholder{color:hsla(0,0%,100%,.6)}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-06c79ed5] .ant-input::-ms-input-placeholder{color:hsla(0,0%,100%,.6)}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-06c79ed5] .ant-input::placeholder{color:hsla(0,0%,100%,.6)}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-06c79ed5] .anticon-copy{color:#fff}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-06c79ed5] .anticon-copy:hover{color:gold}.profile-page .referral-card .referral-body .referral-hint[data-v-06c79ed5]{margin-top:auto;text-align:center;font-size:12px;color:hsla(0,0%,100%,.85);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:6px}.profile-page .referral-card .referral-body .referral-hint .anticon-gift[data-v-06c79ed5]{color:gold}.profile-page .referral-user-cell[data-v-06c79ed5]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px}.profile-page .referral-user-cell .user-info[data-v-06c79ed5]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .referral-user-cell .user-info .nickname[data-v-06c79ed5]{font-weight:500;color:#333}.profile-page .referral-user-cell .user-info .username[data-v-06c79ed5]{font-size:12px;color:#999}.profile-page .exchange-config-section .credential-hint[data-v-06c79ed5]{font-family:SFMono-Regular,Consolas,monospace;font-size:13px;color:#666}.profile-page .test-result-msg[data-v-06c79ed5]{margin-top:8px;font-size:13px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.profile-page .test-result-msg.success[data-v-06c79ed5]{color:#52c41a}.profile-page .test-result-msg.error[data-v-06c79ed5]{color:#f5222d}.profile-page.theme-dark[data-v-06c79ed5]{background:-webkit-gradient(linear,left top,left bottom,from(#141414),to(#1c1c1c));background:linear-gradient(180deg,#141414,#1c1c1c)}.profile-page.theme-dark .page-header .page-title[data-v-06c79ed5]{color:#e0e6ed}.profile-page.theme-dark .page-header .page-desc[data-v-06c79ed5]{color:#8b949e}.profile-page.theme-dark .edit-card[data-v-06c79ed5],.profile-page.theme-dark .profile-card[data-v-06c79ed5]{background:#1c1c1c;-webkit-box-shadow:0 4px 24px rgba(0,0,0,.25);box-shadow:0 4px 24px rgba(0,0,0,.25)}.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-card-body,.profile-page.theme-dark .profile-card[data-v-06c79ed5] .ant-card-body{background:#1c1c1c}.profile-page.theme-dark .profile-card .avatar-section .username[data-v-06c79ed5]{color:#e0e6ed}.profile-page.theme-dark .profile-card .profile-info .info-item[data-v-06c79ed5]{border-bottom-color:#2a2a2a}.profile-page.theme-dark .profile-card .profile-info .info-item .label[data-v-06c79ed5]{color:#8b949e}.profile-page.theme-dark .profile-card .profile-info .info-item .value[data-v-06c79ed5]{color:#e0e6ed}.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-tabs-bar{border-bottom-color:#2a2a2a}.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-tabs-tab{color:#8b949e}.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-tabs-tab:hover{color:#e0e6ed}.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-tabs-tab-active{color:#1890ff}.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-form-item-label label{color:#c9d1d9}.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-input,.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-input-password{background:#141414;border-color:#2a2a2a;color:#c9d1d9}.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-input-password:focus,.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-input-password:hover,.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-input:focus,.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-input:hover{border-color:#1890ff}.profile-page.theme-dark .credits-card[data-v-06c79ed5]{background:linear-gradient(135deg,#1c1c1c,#1a1a1a 50%,#141414);-webkit-box-shadow:0 4px 24px rgba(0,0,0,.25);box-shadow:0 4px 24px rgba(0,0,0,.25)}.profile-page.theme-dark .credits-card[data-v-06c79ed5] .ant-divider{border-color:hsla(0,0%,100%,.1)}.profile-page.theme-dark .credits-card .credits-actions .ant-btn[data-v-06c79ed5]{background:hsla(0,0%,100%,.15);color:#fff;border:1px solid hsla(0,0%,100%,.2)}.profile-page.theme-dark .credits-card .credits-actions .ant-btn[data-v-06c79ed5]:hover{background:hsla(0,0%,100%,.25)}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-table{background:#1c1c1c;color:#c9d1d9}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-table-thead>tr>th{background:#2a2a2a;color:#c9d1d9;border-bottom-color:#2a2a2a}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-table-tbody>tr>td{background:#1c1c1c;color:#c9d1d9;border-bottom-color:#2a2a2a}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-table-tbody>tr:hover>td{background:#2a2a2a}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-table-placeholder{background:#1c1c1c;color:#8b949e}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-table-tbody>tr>td,.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-table-tbody>tr>td :not(.ant-tag):not(.ant-btn),.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-table-tbody>tr>td div,.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-table-tbody>tr>td span{color:#c9d1d9}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .amount-positive{color:#52c41a}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .amount-negative{color:#f5222d}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-tag{border-width:1px;font-weight:600}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-tag-red{background:rgba(245,34,45,.25);border-color:#f5222d;color:#ff7875}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-tag-green{background:rgba(82,196,26,.25);border-color:#52c41a;color:#73d13d}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-tag-blue{background:rgba(24,144,255,.25);border-color:#1890ff;color:#69c0ff}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-tag-gold,.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-tag-orange{background:rgba(250,173,20,.25);border-color:#faad14;color:#ffc53d}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-tag-cyan{background:rgba(19,194,194,.25);border-color:#13c2c2;color:#5cdbd3}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-tag-purple{background:rgba(114,46,209,.25);border-color:#722ed1;color:#b37feb}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-tag-volcano{background:rgba(250,84,28,.25);border-color:#fa541c;color:#ff9c6e}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-tag-lime{background:hsla(89,56%,62%,.25);border-color:#a0d911;color:#bae637}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-tag-default{background:hsla(0,0%,100%,.08);border-color:hsla(0,0%,100%,.2);color:#c9d1d9}.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-form-item-label>label,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-form-item-label>label,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-form-item-label>label{color:#c9d1d9}.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-form-item-explain,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-form-item-extra,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-form-item-explain,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-form-item-extra,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-form-item-explain,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-form-item-extra{color:#8b949e}.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input-number,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input-password,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-select-selector,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input-number,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input-password,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-select-selector,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input-number,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input-password,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-select-selector{background:#141414;border-color:#2a2a2a;color:#c9d1d9}.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input-number::-webkit-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input-password::-webkit-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input::-webkit-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-select-selector::-webkit-input-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input-number::-webkit-input-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input-password::-webkit-input-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input::-webkit-input-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-select-selector::-webkit-input-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input-number::-webkit-input-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input-password::-webkit-input-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input::-webkit-input-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-select-selector::-webkit-input-placeholder{color:#6e7681}.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input-number::-moz-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input-password::-moz-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input::-moz-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-select-selector::-moz-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input-number::-moz-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input-password::-moz-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input::-moz-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-select-selector::-moz-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input-number::-moz-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input-password::-moz-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input::-moz-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-select-selector::-moz-placeholder{color:#6e7681}.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input-number:-ms-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input-password:-ms-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input:-ms-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-select-selector:-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input-number:-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input-password:-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input:-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-select-selector:-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input-number:-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input-password:-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input:-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-select-selector:-ms-input-placeholder{color:#6e7681}.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input-number::-ms-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input-password::-ms-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input::-ms-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-select-selector::-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input-number::-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input-password::-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input::-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-select-selector::-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input-number::-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input-password::-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input::-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-select-selector::-ms-input-placeholder{color:#6e7681}.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input-number::placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input-password::placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input::placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-select-selector::placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input-number::placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input-password::placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input::placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-select-selector::placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input-number::placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input-password::placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input::placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-select-selector::placeholder{color:#6e7681}.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-checkbox-wrapper,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-checkbox-wrapper span,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-radio-wrapper,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-radio-wrapper span,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-select-selection-item,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-select-selection-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-checkbox-wrapper,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-checkbox-wrapper span,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-radio-wrapper,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-radio-wrapper span,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-select-selection-item,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-select-selection-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-checkbox-wrapper,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-checkbox-wrapper span,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-radio-wrapper,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-radio-wrapper span,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-select-selection-item,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-select-selection-placeholder{color:#c9d1d9}.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-checkbox-checked .ant-checkbox-inner,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-radio-checked .ant-radio-inner,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-checkbox-checked .ant-checkbox-inner,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-radio-checked .ant-radio-inner,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-checkbox-checked .ant-checkbox-inner,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-radio-checked .ant-radio-inner{background-color:#1890ff;border-color:#1890ff}.profile-page.theme-dark .notification-settings-form .email-hint[data-v-06c79ed5],.profile-page.theme-dark .notification-settings-form .field-hint[data-v-06c79ed5],.profile-page.theme-dark .password-form .email-hint[data-v-06c79ed5],.profile-page.theme-dark .password-form .field-hint[data-v-06c79ed5],.profile-page.theme-dark .profile-form .email-hint[data-v-06c79ed5],.profile-page.theme-dark .profile-form .field-hint[data-v-06c79ed5]{color:#8b949e}.profile-page.theme-dark .notification-settings-form .email-warning[data-v-06c79ed5],.profile-page.theme-dark .password-form .email-warning[data-v-06c79ed5],.profile-page.theme-dark .profile-form .email-warning[data-v-06c79ed5]{color:#f5222d}.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-alert{background:#1c1c1c;border-color:#2a2a2a;color:#c9d1d9}.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-alert .ant-alert-message{color:#c9d1d9}.profile-page.theme-dark .exchange-config-section .credential-hint[data-v-06c79ed5],.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-alert .ant-alert-description{color:#8b949e}.profile-page.theme-dark .test-result-msg.success[data-v-06c79ed5]{color:#52c41a}.profile-page.theme-dark .test-result-msg.error[data-v-06c79ed5]{color:#f5222d}.profile-page.theme-dark .referral-user-cell .user-info .nickname[data-v-06c79ed5]{color:#c9d1d9}.profile-page.theme-dark .referral-user-cell .user-info .username[data-v-06c79ed5]{color:#8b949e}.profile-page.theme-dark[data-v-06c79ed5] .ant-tag{color:#c9d1d9}.profile-page.theme-dark[data-v-06c79ed5] .ant-tag.ant-tag-has-color{color:#fff!important;border-color:transparent!important}.profile-page.theme-dark[data-v-06c79ed5] .ant-input-prefix .anticon,.profile-page.theme-dark[data-v-06c79ed5] .ant-input-suffix .anticon,.profile-page.theme-dark[data-v-06c79ed5] .credits-hint .anticon,.profile-page.theme-dark[data-v-06c79ed5] .email-hint .anticon,.profile-page.theme-dark[data-v-06c79ed5] .field-hint .anticon,.profile-page.theme-dark[data-v-06c79ed5] .notification-settings-form .anticon{color:#c9d1d9!important}.profile-page.theme-dark[data-v-06c79ed5] .ant-pagination .ant-pagination-item{background:#1c1c1c;border-color:#2a2a2a}.profile-page.theme-dark[data-v-06c79ed5] .ant-pagination .ant-pagination-item a{color:#c9d1d9}.profile-page.theme-dark[data-v-06c79ed5] .ant-pagination .ant-pagination-item:hover{border-color:#1890ff}.profile-page.theme-dark[data-v-06c79ed5] .ant-pagination .ant-pagination-item-active{background:#1890ff;border-color:#1890ff}.profile-page.theme-dark[data-v-06c79ed5] .ant-pagination .ant-pagination-item-active a{color:#fff}.profile-page.theme-dark[data-v-06c79ed5] .ant-pagination .ant-pagination-next .ant-pagination-item-link,.profile-page.theme-dark[data-v-06c79ed5] .ant-pagination .ant-pagination-prev .ant-pagination-item-link{background:#1c1c1c;border-color:#2a2a2a;color:#c9d1d9}.profile-page.theme-dark[data-v-06c79ed5] .ant-pagination .ant-pagination-options .ant-select-selector{background:#141414;border-color:#2a2a2a;color:#c9d1d9}.profile-page.theme-dark[data-v-06c79ed5] .ant-btn.ant-btn-default{background:#1c1c1c;border-color:#2a2a2a;color:#c9d1d9}.profile-page.theme-dark[data-v-06c79ed5] .ant-btn.ant-btn-default:hover{border-color:#1890ff;color:#1890ff}@media screen and (max-width:768px){.profile-page[data-v-06c79ed5]{padding:12px}.profile-page .page-header[data-v-06c79ed5]{margin-bottom:16px}.profile-page .page-header .page-title[data-v-06c79ed5]{font-size:20px}.profile-page .page-header .page-title .anticon[data-v-06c79ed5]{font-size:22px}.profile-page .page-header .page-desc[data-v-06c79ed5]{font-size:13px}.profile-page .profile-cards-row[data-v-06c79ed5]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .profile-cards-row .profile-card-col[data-v-06c79ed5]{margin-bottom:12px}.profile-page .profile-cards-row .right-cards-col .right-cards-row[data-v-06c79ed5]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .profile-cards-row .right-cards-col .right-cards-row .ant-col[data-v-06c79ed5]{margin-bottom:12px}.profile-page .profile-card[data-v-06c79ed5]{border-radius:10px}.profile-page .profile-card .avatar-section[data-v-06c79ed5]{padding:16px 0}.profile-page .profile-card .avatar-section[data-v-06c79ed5] .ant-avatar{width:80px!important;height:80px!important;line-height:80px!important}.profile-page .profile-card .avatar-section .username[data-v-06c79ed5]{font-size:18px;margin:12px 0 6px}.profile-page .profile-card .profile-info .info-item[data-v-06c79ed5]{padding:10px 0;-ms-flex-wrap:wrap;flex-wrap:wrap}.profile-page .profile-card .profile-info .info-item .anticon[data-v-06c79ed5]{font-size:14px;margin-right:8px}.profile-page .profile-card .profile-info .info-item .label[data-v-06c79ed5]{font-size:13px}.profile-page .profile-card .profile-info .info-item .value[data-v-06c79ed5]{font-size:13px;word-break:break-all}.profile-page .credits-card[data-v-06c79ed5]{border-radius:10px}.profile-page .credits-card .credits-header .credits-title[data-v-06c79ed5]{font-size:15px}.profile-page .credits-card .credits-header .credits-title .anticon[data-v-06c79ed5]{font-size:16px}.profile-page .credits-card .credits-body[data-v-06c79ed5]{padding:16px 0}.profile-page .credits-card .credits-body .credits-amount .amount-value[data-v-06c79ed5]{font-size:32px}.profile-page .credits-card .credits-body .credits-amount .amount-label[data-v-06c79ed5]{font-size:14px}.profile-page .credits-card .credits-body .vip-status[data-v-06c79ed5]{font-size:12px;margin-top:10px}.profile-page .credits-card .credits-actions .ant-btn[data-v-06c79ed5]{height:34px;padding:0 20px;font-size:14px}.profile-page .credits-card .credits-hint[data-v-06c79ed5]{font-size:11px;margin-top:10px}.profile-page .referral-card[data-v-06c79ed5]{border-radius:10px}.profile-page .referral-card .referral-header .referral-title[data-v-06c79ed5]{font-size:15px}.profile-page .referral-card .referral-header .referral-title .anticon[data-v-06c79ed5]{font-size:16px}.profile-page .referral-card .referral-body[data-v-06c79ed5]{padding:10px 0}.profile-page .referral-card .referral-body .referral-stats .stat-item .stat-value[data-v-06c79ed5]{font-size:24px}.profile-page .referral-card .referral-body .referral-link-section .link-label[data-v-06c79ed5],.profile-page .referral-card .referral-body .referral-stats .stat-item .stat-label[data-v-06c79ed5]{font-size:11px}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-06c79ed5] .ant-input{font-size:12px}.profile-page .referral-card .referral-body .referral-hint[data-v-06c79ed5]{font-size:11px;padding-top:8px}.profile-page .edit-card[data-v-06c79ed5]{border-radius:10px;margin-top:12px!important}.profile-page .edit-card[data-v-06c79ed5] .ant-card-body{padding:12px}.profile-page .edit-card[data-v-06c79ed5] .ant-tabs-nav .ant-tabs-tab{padding:10px 12px;font-size:13px}.profile-page .edit-card[data-v-06c79ed5] .ant-tabs-nav-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}.profile-page .edit-card[data-v-06c79ed5] .ant-tabs-nav-scroll::-webkit-scrollbar{display:none}.profile-page .edit-card .password-form[data-v-06c79ed5],.profile-page .edit-card .profile-form[data-v-06c79ed5]{max-width:100%}.profile-page .edit-card .password-form[data-v-06c79ed5] .ant-form-item-label,.profile-page .edit-card .profile-form[data-v-06c79ed5] .ant-form-item-label{padding-bottom:4px}.profile-page .edit-card .password-form[data-v-06c79ed5] .ant-form-item-label label,.profile-page .edit-card .profile-form[data-v-06c79ed5] .ant-form-item-label label{font-size:13px}.profile-page .edit-card .password-form[data-v-06c79ed5] .ant-input,.profile-page .edit-card .password-form[data-v-06c79ed5] .ant-input-password,.profile-page .edit-card .profile-form[data-v-06c79ed5] .ant-input,.profile-page .edit-card .profile-form[data-v-06c79ed5] .ant-input-password{font-size:14px}.profile-page .edit-card .password-form .email-hint[data-v-06c79ed5],.profile-page .edit-card .profile-form .email-hint[data-v-06c79ed5]{font-size:11px}.profile-page .edit-card .password-form[data-v-06c79ed5] .ant-alert{font-size:12px;padding:8px 12px}.profile-page .edit-card .notification-settings-form[data-v-06c79ed5] .ant-alert{font-size:12px;padding:8px 12px;margin-bottom:16px!important}.profile-page .edit-card .notification-settings-form[data-v-06c79ed5] .ant-form{max-width:100%}.profile-page .edit-card .notification-settings-form[data-v-06c79ed5] .ant-checkbox-group .ant-row{margin-left:0!important;margin-right:0!important}.profile-page .edit-card .notification-settings-form[data-v-06c79ed5] .ant-checkbox-group .ant-row .ant-col{padding-left:0!important;padding-right:8px!important}.profile-page .edit-card .notification-settings-form[data-v-06c79ed5] .ant-checkbox-group .ant-checkbox-wrapper{font-size:13px;margin-bottom:6px}.profile-page .edit-card .notification-settings-form .field-hint[data-v-06c79ed5]{font-size:11px;-ms-flex-wrap:wrap;flex-wrap:wrap}.profile-page .edit-card .notification-settings-form[data-v-06c79ed5] .ant-form-item{margin-bottom:16px}.profile-page .edit-card .notification-settings-form[data-v-06c79ed5] .ant-form-item:last-child .ant-btn{width:100%;margin-bottom:8px}.profile-page .edit-card .notification-settings-form[data-v-06c79ed5] .ant-form-item:last-child .ant-btn+.ant-btn{margin-left:0!important}.profile-page .edit-card[data-v-06c79ed5] .ant-table-wrapper{overflow-x:auto}.profile-page .edit-card[data-v-06c79ed5] .ant-table-wrapper .ant-table{min-width:500px}.profile-page .referral-user-cell[data-v-06c79ed5]{gap:8px}.profile-page .referral-user-cell[data-v-06c79ed5] .ant-avatar{width:28px!important;height:28px!important;line-height:28px!important}.profile-page .referral-user-cell .user-info .nickname[data-v-06c79ed5]{font-size:13px}.profile-page .referral-user-cell .user-info .username[data-v-06c79ed5]{font-size:11px}}@media screen and (max-width:480px){.profile-page[data-v-06c79ed5]{padding:8px}.profile-page .page-header[data-v-06c79ed5]{margin-bottom:12px}.profile-page .page-header .page-title[data-v-06c79ed5]{font-size:18px;gap:8px}.profile-page .page-header .page-title .anticon[data-v-06c79ed5]{font-size:20px}.profile-page .credits-card .credits-body .credits-amount .amount-value[data-v-06c79ed5]{font-size:28px}.profile-page .credits-card .credits-body .credits-amount .amount-label[data-v-06c79ed5]{font-size:13px}.profile-page .credits-card .credits-actions .ant-btn[data-v-06c79ed5]{width:100%}.profile-page .referral-card .referral-body .referral-stats .stat-item .stat-value[data-v-06c79ed5]{font-size:20px}.profile-page .edit-card[data-v-06c79ed5] .ant-tabs-nav .ant-tabs-tab{padding:8px 10px;font-size:12px}.profile-page .edit-card .notification-settings-form[data-v-06c79ed5] .ant-checkbox-group .ant-row .ant-col{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}}.profile-exchange-modal .exchange-account-form .egress-ip-block{width:100%}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px;margin:0 0 16px;padding:12px 14px;border:1px solid rgba(24,144,255,.18);border-radius:10px;background:-webkit-gradient(linear,left top,right top,from(rgba(24,144,255,.06)),to(rgba(82,196,26,.04)));background:linear-gradient(90deg,rgba(24,144,255,.06),rgba(82,196,26,.04))}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:10px;min-width:0}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__icon{width:28px;height:28px;border-radius:50%;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background:rgba(24,144,255,.12);color:#1890ff;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__text{min-width:0}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__title{color:rgba(0,0,0,.85);font-size:13px;font-weight:600;line-height:1.5}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__hint{color:rgba(0,0,0,.55);font-size:12px;line-height:1.5;margin-top:2px}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__action{padding:0;white-space:nowrap;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.profile-exchange-modal .exchange-account-form .egress-ip-row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:6px}.profile-exchange-modal .exchange-account-form .egress-ip-refresh-row{margin-top:4px}.profile-exchange-modal .exchange-account-form .egress-ip-line{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;margin-bottom:10px}.profile-exchange-modal .exchange-account-form .egress-ip-kind{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;min-width:42px;font-size:12px;color:rgba(0,0,0,.55)}.profile-exchange-modal .exchange-account-form .egress-ip-value{-webkit-box-flex:1;-ms-flex:1 1 160px;flex:1 1 160px;min-width:0;font-family:Consolas,ui-monospace,monospace;font-size:12px;padding:6px 10px;border-radius:4px;border:1px solid #d9d9d9;background:#fafafa;color:#262626;word-break:break-all}.profile-exchange-modal .exchange-account-form .exchange-demo-checkbox-label{color:rgba(0,0,0,.85)}.profile-exchange-modal .exchange-account-form .exchange-demo-hint{margin-top:6px}.profile-exchange-modal--dark .ant-modal-content{background:#1c1c1c;-webkit-box-shadow:0 8px 32px rgba(0,0,0,.45);box-shadow:0 8px 32px rgba(0,0,0,.45)}.profile-exchange-modal--dark .ant-modal-header{background:#1c1c1c;border-bottom:1px solid #2a2a2a}.profile-exchange-modal--dark .ant-modal-title{color:#e0e6ed}.profile-exchange-modal--dark .ant-modal-close{color:#8b949e}.profile-exchange-modal--dark .ant-modal-body,.profile-exchange-modal--dark .ant-modal-close:hover{color:#c9d1d9}.profile-exchange-modal--dark .ant-modal-footer{background:#1c1c1c;border-top:1px solid #2a2a2a}.profile-exchange-modal--dark .exchange-account-form .ant-form-item-label>label{color:#c9d1d9}.profile-exchange-modal--dark .exchange-account-form .ant-form-item-explain,.profile-exchange-modal--dark .exchange-account-form .ant-form-item-extra{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-input,.profile-exchange-modal--dark .exchange-account-form .ant-input-number,.profile-exchange-modal--dark .exchange-account-form .ant-input-number-input,.profile-exchange-modal--dark .exchange-account-form .ant-input-password .ant-input{background:#141414!important;border-color:#2a2a2a!important;color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-input-password-icon{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-input-number-handler-wrap{background:#141414;border-left-color:#2a2a2a}.profile-exchange-modal--dark .exchange-account-form .ant-input-number-handler-down-inner,.profile-exchange-modal--dark .exchange-account-form .ant-input-number-handler-up-inner{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-select-selector{background:#141414!important;border-color:#2a2a2a!important;color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-item,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-placeholder{color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-selection,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection--single{background:#141414!important;border-color:#2a2a2a!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-placeholder,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-selected-value,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection__rendered{color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-arrow{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-checkbox-wrapper,.profile-exchange-modal--dark .exchange-account-form .ant-checkbox-wrapper span{color:#c9d1d9}.profile-exchange-modal--dark .exchange-account-form .exchange-demo-checkbox-label{color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .egress-ip-hint,.profile-exchange-modal--dark .exchange-account-form .exchange-demo-hint{color:#8b949e!important}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout{background:-webkit-gradient(linear,left top,right top,from(rgba(24,144,255,.12)),to(rgba(82,196,26,.08)));background:linear-gradient(90deg,rgba(24,144,255,.12),rgba(82,196,26,.08));border-color:rgba(88,166,255,.26)}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__icon{background:rgba(88,166,255,.16);color:#58a6ff}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__title{color:#e0e6ed}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__hint{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__action{color:#58a6ff}.profile-exchange-modal--dark .exchange-account-form .egress-ip-value{border-color:#2a2a2a!important;background:#141414!important;color:#e0e6ed!important}.profile-exchange-modal--dark .exchange-account-form a.egress-ip-action{color:#58a6ff}.profile-exchange-modal--dark .exchange-account-form .egress-ip-kind{color:#8b949e!important}.profile-exchange-modal--dark .exchange-account-form .ant-alert{background:rgba(250,173,20,.12);border-color:rgba(250,173,20,.45)}.profile-exchange-modal--dark .exchange-account-form .ant-alert-message{color:#ffc53d}.profile-exchange-modal--dark .exchange-account-form .ant-alert-description{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-alert-icon{color:#faad14}.profile-exchange-modal--dark .exchange-account-form .field-hint{color:#8b949e;margin-top:6px;font-size:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:6px}.profile-exchange-modal--dark .exchange-account-form .field-hint .anticon{color:#8b949e;margin-top:2px}.profile-exchange-modal--dark .exchange-account-form .test-result-msg{color:#c9d1d9}.profile-exchange-modal--dark .exchange-account-form .test-result-msg.success{color:#73d13d}.profile-exchange-modal--dark .exchange-account-form .test-result-msg.error{color:#ff7875}.profile-exchange-select-dropdown-dark.ant-select-dropdown{background:#1c1c1c}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item{color:#c9d1d9}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item:hover{background:#2a2a2a}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item-selected{background:#2a2a2a!important;color:#e0e6ed;font-weight:500}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item-group-title{color:#8b949e!important;font-size:12px}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item,.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item-selected{color:#c9d1d9!important}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-empty-description{color:#8b949e}.exchange-signup-modal .exchange-signup-promo{margin-bottom:18px;padding:12px 14px;border-radius:12px;background:-webkit-gradient(linear,left top,right top,from(rgba(22,119,255,.12)),to(rgba(99,102,241,.1)));background:linear-gradient(90deg,rgba(22,119,255,.12),rgba(99,102,241,.1));border:1px solid rgba(22,119,255,.2);color:#1e40af;font-size:15px;font-weight:600;line-height:1.5;text-align:center}.exchange-signup-modal .exchange-signup-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.exchange-signup-modal .exchange-signup-card{border:1px solid #eef1f5;border-radius:16px;padding:16px;background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fafcff));background:linear-gradient(180deg,#fff,#fafcff);-webkit-box-shadow:0 8px 24px rgba(15,23,42,.05);box-shadow:0 8px 24px rgba(15,23,42,.05)}.exchange-signup-modal .exchange-signup-card__header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:12px;margin-bottom:12px}.exchange-signup-modal .exchange-signup-logo{width:44px;height:44px;border-radius:12px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;font-size:16px;font-weight:700}.exchange-signup-modal .exchange-signup-name{font-size:16px;font-weight:700;color:#1f2937}.exchange-signup-modal .exchange-signup-actions{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px}.profile-exchange-modal--dark .exchange-signup-modal .exchange-signup-promo{color:#93c5fd;background:-webkit-gradient(linear,left top,right top,from(rgba(59,130,246,.18)),to(rgba(99,102,241,.14)));background:linear-gradient(90deg,rgba(59,130,246,.18),rgba(99,102,241,.14));border-color:rgba(96,165,250,.35)}.profile-exchange-modal--dark .exchange-signup-modal .exchange-signup-card{background:-webkit-gradient(linear,left top,left bottom,from(#171717),to(#1f1f1f));background:linear-gradient(180deg,#171717,#1f1f1f);border-color:#2a2a2a;-webkit-box-shadow:none;box-shadow:none}.profile-exchange-modal--dark .exchange-signup-modal .exchange-signup-name{color:#e0e6ed} \ No newline at end of file diff --git a/frontend/dist/css/161.a7b2f719.css b/frontend/dist/css/161.a7b2f719.css new file mode 100644 index 0000000..a9e627b --- /dev/null +++ b/frontend/dist/css/161.a7b2f719.css @@ -0,0 +1 @@ +.profile-exchange-modal .exchange-account-form .egress-ip-block{width:100%}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px;margin:0 0 16px;padding:12px 14px;border:1px solid rgba(24,144,255,.18);border-radius:10px;background:-webkit-gradient(linear,left top,right top,from(rgba(24,144,255,.06)),to(rgba(82,196,26,.04)));background:linear-gradient(90deg,rgba(24,144,255,.06),rgba(82,196,26,.04))}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:10px;min-width:0}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__icon{width:28px;height:28px;border-radius:50%;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background:rgba(24,144,255,.12);color:#1890ff;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__text{min-width:0}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__title{color:rgba(0,0,0,.85);font-size:13px;font-weight:600;line-height:1.5}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__hint{color:rgba(0,0,0,.55);font-size:12px;line-height:1.5;margin-top:2px}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__action{padding:0;white-space:nowrap;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.profile-exchange-modal .exchange-account-form .egress-ip-row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:6px}.profile-exchange-modal .exchange-account-form .egress-ip-refresh-row{margin-top:4px}.profile-exchange-modal .exchange-account-form .egress-ip-line{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;margin-bottom:10px}.profile-exchange-modal .exchange-account-form .egress-ip-kind{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;min-width:42px;font-size:12px;color:rgba(0,0,0,.55)}.profile-exchange-modal .exchange-account-form .egress-ip-value{-webkit-box-flex:1;-ms-flex:1 1 160px;flex:1 1 160px;min-width:0;font-family:Consolas,ui-monospace,monospace;font-size:12px;padding:6px 10px;border-radius:4px;border:1px solid #d9d9d9;background:#fafafa;color:#262626;word-break:break-all}.profile-exchange-modal .exchange-account-form .exchange-demo-checkbox-label{color:rgba(0,0,0,.85)}.profile-exchange-modal .exchange-account-form .exchange-demo-hint{margin-top:6px}.profile-exchange-modal .exchange-account-form .field-hint{margin-top:6px;font-size:12px;color:rgba(0,0,0,.45);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:6px}.profile-exchange-modal .exchange-account-form .test-result-msg{margin-top:8px;font-size:13px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.profile-exchange-modal .exchange-account-form .test-result-msg.success{color:#52c41a}.profile-exchange-modal .exchange-account-form .test-result-msg.error{color:#f5222d}.profile-exchange-modal--dark .ant-modal-content{background:#1c1c1c;-webkit-box-shadow:0 8px 32px rgba(0,0,0,.45);box-shadow:0 8px 32px rgba(0,0,0,.45)}.profile-exchange-modal--dark .ant-modal-header{background:#1c1c1c;border-bottom:1px solid #2a2a2a}.profile-exchange-modal--dark .ant-modal-title{color:#e0e6ed}.profile-exchange-modal--dark .ant-modal-close{color:#8b949e}.profile-exchange-modal--dark .ant-modal-body,.profile-exchange-modal--dark .ant-modal-close:hover{color:#c9d1d9}.profile-exchange-modal--dark .ant-modal-footer{background:#1c1c1c;border-top:1px solid #2a2a2a}.profile-exchange-modal--dark .exchange-account-form .ant-form-item-label>label{color:#c9d1d9}.profile-exchange-modal--dark .exchange-account-form .ant-form-item-explain,.profile-exchange-modal--dark .exchange-account-form .ant-form-item-extra{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-input,.profile-exchange-modal--dark .exchange-account-form .ant-input-number,.profile-exchange-modal--dark .exchange-account-form .ant-input-number-input,.profile-exchange-modal--dark .exchange-account-form .ant-input-password .ant-input{background:#141414!important;border-color:#2a2a2a!important;color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-input-password-icon{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-input-number-handler-wrap{background:#141414;border-left-color:#2a2a2a}.profile-exchange-modal--dark .exchange-account-form .ant-input-number-handler-down-inner,.profile-exchange-modal--dark .exchange-account-form .ant-input-number-handler-up-inner{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-select-selector{background:#141414!important;border-color:#2a2a2a!important;color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-item,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-placeholder{color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-selection,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection--single{background:#141414!important;border-color:#2a2a2a!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-placeholder,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-selected-value,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection__rendered{color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-arrow{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-checkbox-wrapper,.profile-exchange-modal--dark .exchange-account-form .ant-checkbox-wrapper span{color:#c9d1d9}.profile-exchange-modal--dark .exchange-account-form .exchange-demo-checkbox-label{color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .egress-ip-hint,.profile-exchange-modal--dark .exchange-account-form .exchange-demo-hint{color:#8b949e!important}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout{background:-webkit-gradient(linear,left top,right top,from(rgba(24,144,255,.12)),to(rgba(82,196,26,.08)));background:linear-gradient(90deg,rgba(24,144,255,.12),rgba(82,196,26,.08));border-color:rgba(88,166,255,.26)}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__icon{background:rgba(88,166,255,.16);color:#58a6ff}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__title{color:#e0e6ed}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__hint{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__action{color:#58a6ff}.profile-exchange-modal--dark .exchange-account-form .egress-ip-value{border-color:#2a2a2a!important;background:#141414!important;color:#e0e6ed!important}.profile-exchange-modal--dark .exchange-account-form a.egress-ip-action{color:#58a6ff}.profile-exchange-modal--dark .exchange-account-form .egress-ip-kind{color:#8b949e!important}.profile-exchange-modal--dark .exchange-account-form .ant-alert{background:rgba(250,173,20,.12);border-color:rgba(250,173,20,.45)}.profile-exchange-modal--dark .exchange-account-form .ant-alert-message{color:#ffc53d}.profile-exchange-modal--dark .exchange-account-form .ant-alert-description{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-alert-icon{color:#faad14}.profile-exchange-modal--dark .exchange-account-form .field-hint{color:#8b949e;margin-top:6px;font-size:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:6px}.profile-exchange-modal--dark .exchange-account-form .field-hint .anticon{color:#8b949e;margin-top:2px}.profile-exchange-modal--dark .exchange-account-form .test-result-msg{color:#c9d1d9}.profile-exchange-modal--dark .exchange-account-form .test-result-msg.success{color:#73d13d}.profile-exchange-modal--dark .exchange-account-form .test-result-msg.error{color:#ff7875}.profile-exchange-select-dropdown-dark.ant-select-dropdown{background:#1c1c1c}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item{color:#c9d1d9}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item:hover{background:#2a2a2a}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item-selected{background:#2a2a2a!important;color:#e0e6ed;font-weight:500}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item-group-title{color:#8b949e!important;font-size:12px}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item,.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item-selected{color:#c9d1d9!important}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-empty-description{color:#8b949e}.quick-trade-drawer[data-v-75b64b85] .ant-drawer-body{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%;overflow-y:auto}.qt-header[data-v-75b64b85]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid #f0f0f0}.qt-header .qt-header-left[data-v-75b64b85],.qt-header[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-header .qt-header-left[data-v-75b64b85]{gap:8px}.qt-header .qt-header-left .qt-icon[data-v-75b64b85]{font-size:20px;color:#595959}.qt-header .qt-header-left .qt-header-title[data-v-75b64b85]{font-size:16px;font-weight:600}.qt-header .qt-close[data-v-75b64b85]{font-size:16px;cursor:pointer;color:#999}.qt-header .qt-close[data-v-75b64b85]:hover{color:#333}.qt-symbol-bar[data-v-75b64b85]{padding:12px 20px;background:-webkit-gradient(linear,left top,left bottom,from(#fafafa),to(#f0f0f0));background:linear-gradient(180deg,#fafafa,#f0f0f0);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:8px}.qt-symbol-bar .qt-symbol-selector[data-v-75b64b85],.qt-symbol-bar .qt-symbol-selector[data-v-75b64b85] .ant-select{width:100%}.qt-symbol-bar .qt-symbol-selector[data-v-75b64b85] .ant-select-selection{border-radius:6px;border:1px solid #d9d9d9}.qt-symbol-bar .qt-price-display[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.qt-symbol-bar .qt-price-display .qt-current-price[data-v-75b64b85]{font-size:16px;font-weight:600;color:#333}.qt-symbol-option[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.qt-symbol-option .qt-symbol-option-name[data-v-75b64b85]{font-weight:600;font-size:14px}.qt-symbol-option .qt-symbol-option-desc[data-v-75b64b85]{color:#999;font-size:12px}.qt-section[data-v-75b64b85]{padding:8px 20px}.qt-section .qt-label[data-v-75b64b85]{font-size:12px;color:#999;margin-bottom:4px;font-weight:500}.qt-section .qt-crypto-hint[data-v-75b64b85]{font-size:10px;color:#faad14;background:rgba(250,173,20,.1);padding:1px 6px;border-radius:4px;margin-left:4px}.qt-balance[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;margin-top:6px;font-size:12px}.qt-balance .qt-balance-label[data-v-75b64b85]{color:#999}.qt-balance .qt-balance-loading-text[data-v-75b64b85]{margin-left:4px}.qt-balance .qt-balance-value[data-v-75b64b85]{color:#52c41a;font-weight:600}.qt-balance .qt-balance-error[data-v-75b64b85]{color:#faad14;cursor:help}.qt-no-cred-actions[data-v-75b64b85]{margin-top:10px}.qt-manage-link[data-v-75b64b85]{margin-top:8px;font-size:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:4px}.qt-manage-link .qt-manage-sep[data-v-75b64b85]{color:#ccc;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.qt-direction-toggle[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px}.qt-direction-toggle .qt-dir-btn[data-v-75b64b85]{-webkit-box-flex:1;-ms-flex:1;flex:1;padding:10px;text-align:center;border-radius:8px;font-weight:600;font-size:14px;cursor:pointer;-webkit-transition:all .2s;transition:all .2s;border:2px solid transparent;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:6px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.qt-direction-toggle .qt-dir-long[data-v-75b64b85]{color:#52c41a;background:rgba(82,196,26,.06);border-color:rgba(82,196,26,.2)}.qt-direction-toggle .qt-dir-long.active[data-v-75b64b85]{background:#52c41a;color:#fff;border-color:#52c41a;-webkit-box-shadow:0 4px 12px rgba(82,196,26,.3);box-shadow:0 4px 12px rgba(82,196,26,.3)}.qt-direction-toggle .qt-dir-long[data-v-75b64b85]:hover:not(.active){border-color:#52c41a}.qt-direction-toggle .qt-dir-short[data-v-75b64b85]{color:#f5222d;background:rgba(245,34,45,.06);border-color:rgba(245,34,45,.2)}.qt-direction-toggle .qt-dir-short.active[data-v-75b64b85]{background:#f5222d;color:#fff;border-color:#f5222d;-webkit-box-shadow:0 4px 12px rgba(245,34,45,.3);box-shadow:0 4px 12px rgba(245,34,45,.3)}.qt-direction-toggle .qt-dir-short[data-v-75b64b85]:hover:not(.active){border-color:#f5222d}.qt-quick-amounts[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:6px;margin-top:6px}.qt-quick-amounts button[data-v-75b64b85]{-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:12px}.qt-leverage-row[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-leverage-input[data-v-75b64b85]{width:80px}.qt-card[data-v-75b64b85]{margin-left:16px;margin-right:16px;padding:12px 14px;border-radius:10px;background:#f5f5f5;border:1px solid #e8e8e8}.qt-section-title-row[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:8px}.qt-section-title[data-v-75b64b85]{font-size:13px;font-weight:600;color:#333}.qt-badge-contract[data-v-75b64b85]{font-size:10px;font-weight:600;padding:2px 8px;border-radius:999px;background:#ebebeb;color:#595959;border:1px solid #d9d9d9}.qt-optional-tag[data-v-75b64b85]{font-size:10px;color:#8c8c8c;background:#f0f0f0;padding:1px 8px;border-radius:4px}.qt-label-spaced[data-v-75b64b85]{margin-top:10px}.qt-margin-radio[data-v-75b64b85]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex}.qt-margin-radio[data-v-75b64b85] .ant-radio-button-wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1;text-align:center;padding:0 4px}.qt-hint-text[data-v-75b64b85]{font-size:11px;color:#8c8c8c;line-height:1.45;margin-top:8px}.qt-hint-inline[data-v-75b64b85]{margin-top:6px}.qt-spot-banner[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:10px;padding:4px 0}.qt-spot-banner-icon[data-v-75b64b85]{font-size:22px;color:#52c41a;margin-top:2px}.qt-spot-banner-title[data-v-75b64b85]{font-size:13px;font-weight:600;color:#333;margin-bottom:4px}.qt-spot-banner-text .qt-hint-text[data-v-75b64b85]{margin-top:0}.qt-tpsl-row[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px}.qt-tpsl-row .qt-tpsl-item[data-v-75b64b85]{-webkit-box-flex:1;-ms-flex:1;flex:1}.qt-tp-label[data-v-75b64b85]{color:#389e0d!important}.qt-sl-label[data-v-75b64b85]{color:#cf1322!important}.qt-input-full[data-v-75b64b85]{width:100%}.qt-dir-btn.qt-dir-disabled[data-v-75b64b85]{opacity:.42;cursor:not-allowed;pointer-events:none}.qt-empty-icon[data-v-75b64b85]{font-size:28px;color:#d9d9d9;margin-bottom:8px}.qt-empty-desc[data-v-75b64b85]{font-size:12px;color:#8c8c8c;line-height:1.5}.qt-submit-section[data-v-75b64b85]{padding:12px 20px}.qt-submit-section .qt-submit-btn[data-v-75b64b85]{height:48px;font-size:16px;font-weight:700;border-radius:8px;letter-spacing:.5px}.qt-submit-section .qt-btn-long[data-v-75b64b85]{background:#52c41a!important;border-color:#52c41a!important}.qt-submit-section .qt-btn-long[data-v-75b64b85]:hover{background:#73d13d!important}.qt-submit-section .qt-btn-long[data-v-75b64b85]:active{background:#389e0d!important}.qt-submit-section .qt-btn-short[data-v-75b64b85]{background:#f5222d!important;border-color:#f5222d!important}.qt-submit-section .qt-btn-short[data-v-75b64b85]:hover{background:#ff4d4f!important}.qt-submit-section .qt-btn-short[data-v-75b64b85]:active{background:#cf1322!important}.qt-position-section[data-v-75b64b85]{padding:8px 20px 12px}.qt-position-section .qt-section-header[data-v-75b64b85]{font-size:13px;font-weight:600;color:#666;margin-bottom:8px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.qt-history-section[data-v-75b64b85]{padding:8px 20px 12px}.qt-history-section[data-v-75b64b85] .ant-collapse{background:transparent;border:none}.qt-history-section[data-v-75b64b85] .ant-collapse-item{border:none}.qt-history-section[data-v-75b64b85] .ant-collapse-header{padding:0!important;cursor:pointer}.qt-history-section[data-v-75b64b85] .ant-collapse-header:hover{opacity:.8}.qt-history-section[data-v-75b64b85] .ant-collapse-content{border:none;background:transparent}.qt-history-section[data-v-75b64b85] .ant-collapse-content-box{padding:8px 0 0 0!important}.qt-history-section .qt-section-header[data-v-75b64b85]{font-size:13px;font-weight:600;color:#666;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.qt-history-section .qt-history-count[data-v-75b64b85]{font-size:12px;color:#999;font-weight:400}.qt-position-card[data-v-75b64b85]{background:#fafafa;border-radius:8px;padding:10px 12px;border-left:3px solid #d9d9d9}.qt-position-card.long[data-v-75b64b85]{border-left-color:#52c41a}.qt-position-card.short[data-v-75b64b85]{border-left-color:#f5222d}.qt-position-card .qt-pos-row[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;font-size:13px;padding:2px 0}.qt-position-card .qt-pos-row span[data-v-75b64b85]:first-child{color:#999}.qt-position-empty[data-v-75b64b85]{background:#fafafa;border-radius:8px;padding:20px 12px;text-align:center;border:1px dashed #d9d9d9;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-green[data-v-75b64b85]{color:#52c41a!important}.qt-red[data-v-75b64b85]{color:#f5222d!important}.qt-trade-list .qt-trade-item[data-v-75b64b85]{padding:6px 0;border-bottom:1px solid #f5f5f5}.qt-trade-list .qt-trade-item[data-v-75b64b85]:last-child{border-bottom:none}.qt-trade-list .qt-trade-item .qt-trade-main[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.qt-trade-list .qt-trade-item .qt-trade-main .qt-trade-symbol[data-v-75b64b85]{font-weight:600;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-main .qt-trade-amount[data-v-75b64b85]{margin-left:auto;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-meta[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-top:2px}.qt-trade-list .qt-trade-item .qt-trade-meta .qt-trade-time[data-v-75b64b85]{font-size:11px;color:#bbb}.theme-dark .qt-header[data-v-75b64b85]{border-bottom-color:#303030}.theme-dark .qt-header .qt-icon[data-v-75b64b85]{color:#a3a3a3}.theme-dark .qt-header .qt-header-title[data-v-75b64b85]{color:#e0e0e0}.theme-dark .qt-header .qt-close[data-v-75b64b85]{color:#666}.theme-dark .qt-header .qt-close[data-v-75b64b85]:hover{color:#bbb}.theme-dark .qt-symbol-bar[data-v-75b64b85]{background:-webkit-gradient(linear,left top,left bottom,from(#262626),to(#1f1f1f));background:linear-gradient(180deg,#262626,#1f1f1f)}.theme-dark .qt-symbol-bar .qt-current-price[data-v-75b64b85]{color:#e0e0e0}.theme-dark .qt-symbol-bar[data-v-75b64b85] .ant-select-selection{background:#262626;border-color:#303030;color:#e0e0e0}.theme-dark .qt-symbol-bar[data-v-75b64b85] .ant-select-selection__placeholder{color:#666}.theme-dark .qt-symbol-option .qt-symbol-option-name[data-v-75b64b85]{color:#e0e0e0}.theme-dark .qt-symbol-option .qt-symbol-option-desc[data-v-75b64b85]{color:#999}.theme-dark .qt-section .qt-label[data-v-75b64b85]{color:#777}.theme-dark .qt-position-card[data-v-75b64b85]{background:#262626}.theme-dark .qt-position-card .qt-pos-row span[data-v-75b64b85]:first-child{color:#777}.theme-dark .qt-history-section .qt-section-header[data-v-75b64b85],.theme-dark .qt-position-card .qt-pos-row span[data-v-75b64b85]:last-child{color:#ccc}.theme-dark .qt-history-section .qt-history-count[data-v-75b64b85]{color:#888}.theme-dark .qt-history-section[data-v-75b64b85] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark .qt-history-section[data-v-75b64b85] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark .qt-history-section[data-v-75b64b85] .ant-collapse .ant-collapse-header:hover{opacity:.8}.theme-dark .qt-history-section[data-v-75b64b85] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark .qt-trade-item[data-v-75b64b85]{border-bottom-color:#2a2a2a!important}.theme-dark .qt-trade-item .qt-trade-symbol[data-v-75b64b85]{color:#e0e0e0}.theme-dark .qt-trade-item .qt-trade-amount[data-v-75b64b85]{color:#ccc}.theme-dark[data-v-75b64b85] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark[data-v-75b64b85] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark[data-v-75b64b85] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark[data-v-75b64b85] .ant-drawer-content{background:#141414}.theme-dark[data-v-75b64b85] .ant-input-number,.theme-dark[data-v-75b64b85] .ant-select-selection{background:#262626;border-color:#303030;color:#e0e0e0}.theme-dark[data-v-75b64b85] .ant-radio-group .ant-radio-button-wrapper{background:#262626;border-color:#303030;color:#ccc}.theme-dark[data-v-75b64b85] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#434343;border-color:#595959;color:#fff}.theme-dark[data-v-75b64b85] .ant-slider-rail{background:#303030}.theme-dark[data-v-75b64b85] .ant-slider-track{background:#737373}.theme-dark .qt-manage-link a[data-v-75b64b85]{color:#58a6ff}.theme-dark .qt-manage-link .qt-manage-sep[data-v-75b64b85]{color:#555}.theme-dark .qt-card[data-v-75b64b85]{background:#262626;border-color:#3a3a3a}.theme-dark .qt-section-title[data-v-75b64b85]{color:#e8e8e8}.theme-dark .qt-badge-contract[data-v-75b64b85]{background:#333;color:#bfbfbf;border-color:#434343}.theme-dark .qt-optional-tag[data-v-75b64b85]{background:#2a2a2a;color:#888}.theme-dark .qt-hint-text[data-v-75b64b85]{color:#777}.theme-dark .qt-spot-banner-title[data-v-75b64b85]{color:#e0e0e0}.theme-dark .qt-spot-banner-icon[data-v-75b64b85]{color:#73d13d}.theme-dark .qt-tp-label[data-v-75b64b85]{color:#95de64!important}.theme-dark .qt-sl-label[data-v-75b64b85]{color:#ff7875!important}.theme-dark .qt-position-empty[data-v-75b64b85]{background:#262626;border-color:#303030}.theme-dark .qt-empty-icon[data-v-75b64b85]{color:#434343}.theme-dark .qt-empty-desc[data-v-75b64b85]{color:#888}.polymarket-analysis-modal .input-section .input-actions[data-v-67e891d2]{margin-top:12px}.polymarket-analysis-modal .result-section .market-info[data-v-67e891d2]{margin-bottom:24px}.polymarket-analysis-modal .result-section .market-info h3[data-v-67e891d2]{margin-bottom:12px;font-size:18px;font-weight:600}.polymarket-analysis-modal .result-section .market-info .market-meta[data-v-67e891d2]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:16px;-ms-flex-wrap:wrap;flex-wrap:wrap}.polymarket-analysis-modal .result-section .market-info .market-meta .meta-item[data-v-67e891d2]{color:rgba(0,0,0,.65);font-size:14px}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison[data-v-67e891d2]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:16px;margin:24px 0}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item[data-v-67e891d2]{-webkit-box-flex:1;-ms-flex:1;flex:1;text-align:center;padding:16px;background:#f5f5f5;border-radius:4px}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item .prob-label[data-v-67e891d2]{font-size:12px;color:rgba(0,0,0,.65);margin-bottom:8px}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item .prob-value[data-v-67e891d2]{font-size:24px;font-weight:600}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item .prob-value.ai-prob[data-v-67e891d2]{color:#1890ff}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item .prob-value.divergence-positive[data-v-67e891d2]{color:#52c41a}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item .prob-value.divergence-negative[data-v-67e891d2]{color:#ff4d4f}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item .prob-value.divergence-neutral[data-v-67e891d2]{color:rgba(0,0,0,.65)}.polymarket-analysis-modal .result-section .analysis-result .recommendation-section[data-v-67e891d2]{margin:24px 0}.polymarket-analysis-modal .result-section .analysis-result .recommendation-section .rec-card[data-v-67e891d2]{text-align:center;padding:16px;background:#f5f5f5;border-radius:4px}.polymarket-analysis-modal .result-section .analysis-result .recommendation-section .rec-card .rec-label[data-v-67e891d2]{font-size:12px;color:rgba(0,0,0,.65);margin-bottom:8px}.polymarket-analysis-modal .result-section .analysis-result .recommendation-section .rec-card .rec-value[data-v-67e891d2]{font-size:24px;font-weight:600;color:#1890ff}.polymarket-analysis-modal .result-section .analysis-result .key-factors-section[data-v-67e891d2],.polymarket-analysis-modal .result-section .analysis-result .reasoning-section[data-v-67e891d2]{margin:24px 0}.polymarket-analysis-modal .result-section .analysis-result .key-factors-section h4[data-v-67e891d2],.polymarket-analysis-modal .result-section .analysis-result .reasoning-section h4[data-v-67e891d2]{margin-bottom:12px;font-size:16px;font-weight:600}.polymarket-analysis-modal .result-section .analysis-result .key-factors-section .reasoning-text[data-v-67e891d2],.polymarket-analysis-modal .result-section .analysis-result .reasoning-section .reasoning-text[data-v-67e891d2]{line-height:1.8;color:rgba(0,0,0,.85);white-space:pre-wrap}.polymarket-analysis-modal .result-section .result-actions[data-v-67e891d2]{margin-top:24px;text-align:right}.polymarket-analysis-modal .loading-section[data-v-67e891d2]{text-align:center;padding:40px 0}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-tabs-bar{border-bottom-color:#2a2a2a}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-tabs-tab{color:#a3a3a3!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-tabs-tab-active{color:#d4d4d4!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-tabs-ink-bar{background:#58a6ff!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-divider{color:#d4d4d4;border-top-color:#2a2a2a}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-divider-inner-text{color:#d4d4d4!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-input,.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-input-affix-wrapper,.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-input-number,.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-input-textarea textarea{background:#141414!important;border-color:#2a2a2a!important;color:#d4d4d4!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-table{background:#1c1c1c;color:#d4d4d4}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-table-thead>tr>th{background:#252525;color:#d4d4d4;border-bottom-color:#2a2a2a}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-table-tbody>tr>td{background:#1c1c1c;color:#d4d4d4;border-bottom-color:#2a2a2a}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-btn-link{color:#58a6ff!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-alert{background:#1c1c1c;border-color:#2a2a2a}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-alert-message{color:#d4d4d4!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-alert-description{color:#a3a3a3!important}.polymarket-analysis-modal.theme-dark .market-info h3[data-v-67e891d2]{color:#d4d4d4}.polymarket-analysis-modal.theme-dark .market-info .market-meta .meta-item[data-v-67e891d2]{color:#a3a3a3}.polymarket-analysis-modal.theme-dark .analysis-result .probability-comparison .prob-item[data-v-67e891d2]{background:#252525;border:1px solid #2a2a2a}.polymarket-analysis-modal.theme-dark .analysis-result .probability-comparison .prob-item .prob-label[data-v-67e891d2]{color:#a3a3a3}.polymarket-analysis-modal.theme-dark .analysis-result .probability-comparison .prob-item .prob-value[data-v-67e891d2]{color:#e5e5e5}.polymarket-analysis-modal.theme-dark .analysis-result .probability-comparison .prob-item .prob-value.divergence-neutral[data-v-67e891d2]{color:#b3b3b3}.polymarket-analysis-modal.theme-dark .analysis-result .recommendation-section .rec-card[data-v-67e891d2]{background:#252525;border:1px solid #2a2a2a}.polymarket-analysis-modal.theme-dark .analysis-result .recommendation-section .rec-card .rec-label[data-v-67e891d2]{color:#a3a3a3}.polymarket-analysis-modal.theme-dark .analysis-result .recommendation-section .rec-card .rec-value[data-v-67e891d2]{color:#e5e5e5}.polymarket-analysis-modal.theme-dark .analysis-result .key-factors-section .reasoning-text[data-v-67e891d2],.polymarket-analysis-modal.theme-dark .analysis-result .key-factors-section h4[data-v-67e891d2],.polymarket-analysis-modal.theme-dark .analysis-result .reasoning-section .reasoning-text[data-v-67e891d2],.polymarket-analysis-modal.theme-dark .analysis-result .reasoning-section h4[data-v-67e891d2]{color:#d4d4d4}.ai-asset-analysis-page[data-v-0d0a10d6]{padding:20px;min-height:calc(100vh - 120px);background:#f0f2f5;width:100%;max-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;overflow-x:hidden}.ai-asset-analysis-page .radar-section[data-v-0d0a10d6]{margin-bottom:20px}.ai-asset-analysis-page .radar-section .radar-header[data-v-0d0a10d6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:14px}.ai-asset-analysis-page .radar-section .radar-header .radar-header-left .radar-title[data-v-0d0a10d6]{margin:0;font-size:16px;font-weight:700;color:#1a1a1a;letter-spacing:-.2px}.ai-asset-analysis-page .radar-section .radar-header .radar-header-left .radar-subtitle[data-v-0d0a10d6]{margin:2px 0 0;font-size:12px;color:#999}.ai-asset-analysis-page .radar-section .radar-header .radar-refresh-btn[data-v-0d0a10d6]{border-radius:8px;border:1px solid #e0e0e0;background:#fff;color:#666;font-size:12px;font-weight:500}.ai-asset-analysis-page .radar-section .radar-header .radar-refresh-btn[data-v-0d0a10d6]:hover{border-color:#6366f1;color:#6366f1}.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]{overflow:hidden;position:relative;border-radius:12px;padding:2px 0}.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]:after,.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]:before{content:"";position:absolute;top:0;bottom:0;width:50px;z-index:2;pointer-events:none}.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]:before{left:0;background:-webkit-gradient(linear,left top,right top,from(#f0f2f5),to(transparent));background:linear-gradient(90deg,#f0f2f5,transparent)}.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]:after{right:0;background:-webkit-gradient(linear,right top,left top,from(#f0f2f5),to(transparent));background:linear-gradient(270deg,#f0f2f5,transparent)}.ai-asset-analysis-page .radar-section .radar-track[data-v-0d0a10d6]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px;-webkit-animation:radar-scroll-0d0a10d6 60s linear infinite;animation:radar-scroll-0d0a10d6 60s linear infinite;width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:4px 0}.ai-asset-analysis-page .radar-section .radar-track.paused[data-v-0d0a10d6]{-webkit-animation-play-state:paused;animation-play-state:paused}@-webkit-keyframes radar-scroll-0d0a10d6{0%{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(-50%);transform:translateX(-50%)}}@keyframes radar-scroll-0d0a10d6{0%{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(-50%);transform:translateX(-50%)}}.ai-asset-analysis-page .radar-section .radar-card[data-v-0d0a10d6]{width:250px;background:#fff;border-radius:12px;padding:16px;cursor:pointer;-ms-flex-negative:0;flex-shrink:0;border:1px solid #eaeaea;-webkit-transition:all .25s cubic-bezier(.4,0,.2,1);transition:all .25s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden}.ai-asset-analysis-page .radar-section .radar-card[data-v-0d0a10d6]:before{content:"";position:absolute;inset:0;border-radius:12px;opacity:0;-webkit-transition:opacity .3s;transition:opacity .3s;background:linear-gradient(135deg,rgba(99,102,241,.04),rgba(139,92,246,.02))}.ai-asset-analysis-page .radar-section .radar-card[data-v-0d0a10d6]:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px);border-color:rgba(99,102,241,.3);-webkit-box-shadow:0 6px 24px rgba(0,0,0,.08),0 0 0 1px rgba(99,102,241,.1);box-shadow:0 6px 24px rgba(0,0,0,.08),0 0 0 1px rgba(99,102,241,.1)}.ai-asset-analysis-page .radar-section .radar-card[data-v-0d0a10d6]:hover:before{opacity:1}.ai-asset-analysis-page .radar-section .radar-card.is-prediction[data-v-0d0a10d6]{width:290px}.ai-asset-analysis-page .radar-section .radar-card .rc-head[data-v-0d0a10d6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:12px;gap:8px}.ai-asset-analysis-page .radar-section .radar-card .rc-symbol[data-v-0d0a10d6]{font-weight:800;font-size:15px;color:#111;letter-spacing:-.2px}.ai-asset-analysis-page .radar-section .radar-card .rc-symbol.rc-prediction-title[data-v-0d0a10d6]{font-size:13px;font-weight:600;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.ai-asset-analysis-page .radar-section .radar-card .rc-market[data-v-0d0a10d6]{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;padding:2px 7px;border-radius:5px;-ms-flex-negative:0;flex-shrink:0;background:#f5f5f5;color:#888}.ai-asset-analysis-page .radar-section .radar-card .rc-market.rc-market-crypto[data-v-0d0a10d6]{color:#7c3aed;background:rgba(124,58,237,.08)}.ai-asset-analysis-page .radar-section .radar-card .rc-market.rc-market-usstock[data-v-0d0a10d6]{color:#16a34a;background:rgba(22,163,74,.08)}.ai-asset-analysis-page .radar-section .radar-card .rc-market.rc-market-forex[data-v-0d0a10d6]{color:#d97706;background:rgba(217,119,6,.08)}.ai-asset-analysis-page .radar-section .radar-card .rc-market.rc-market-predictionmarket[data-v-0d0a10d6]{color:#0891b2;background:rgba(8,145,178,.08)}.ai-asset-analysis-page .radar-section .radar-card .rc-metrics[data-v-0d0a10d6]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:4px;margin-bottom:12px}.ai-asset-analysis-page .radar-section .radar-card .rc-metric[data-v-0d0a10d6]{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:3px;padding:7px;border-radius:8px;background:#fafafa}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-label[data-v-0d0a10d6]{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.4px;color:#999}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value[data-v-0d0a10d6]{font-size:13px;font-weight:700;color:#222}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-up[data-v-0d0a10d6]{color:#16a34a}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-down[data-v-0d0a10d6]{color:#dc2626}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-val[data-v-0d0a10d6]{font-size:11px;font-weight:600}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-bullish_momentum[data-v-0d0a10d6]{color:#0891b2}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-overbought[data-v-0d0a10d6]{color:#d97706}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-oversold[data-v-0d0a10d6]{color:#16a34a}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-bearish_momentum[data-v-0d0a10d6]{color:#dc2626}.ai-asset-analysis-page .radar-section .radar-card .rc-footer[data-v-0d0a10d6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:8px}.ai-asset-analysis-page .radar-section .radar-card .rc-reason[data-v-0d0a10d6]{font-size:11px;color:#999;line-height:1.4;-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.ai-asset-analysis-page .radar-section .radar-card .rc-cta[data-v-0d0a10d6]{font-size:11px;font-weight:700;color:#fff;background:linear-gradient(135deg,#6366f1,#8b5cf6);padding:4px 12px;border-radius:8px;white-space:nowrap;cursor:pointer;-webkit-transition:all .2s;transition:all .2s;-ms-flex-negative:0;flex-shrink:0}.ai-asset-analysis-page .radar-section .radar-card .rc-cta[data-v-0d0a10d6]:hover{-webkit-transform:scale(1.05);transform:scale(1.05);-webkit-box-shadow:0 2px 12px rgba(99,102,241,.35);box-shadow:0 2px 12px rgba(99,102,241,.35)}.ai-asset-analysis-page .qt-floating-btn[data-v-0d0a10d6]{position:fixed;right:24px;bottom:80px;width:48px;height:48px;border-radius:14px;background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;font-size:22px;cursor:pointer;-webkit-box-shadow:0 4px 20px rgba(99,102,241,.35);box-shadow:0 4px 20px rgba(99,102,241,.35);z-index:1000;-webkit-transition:all .3s;transition:all .3s;-webkit-animation:qt-float-pulse-0d0a10d6 2.5s ease-in-out infinite;animation:qt-float-pulse-0d0a10d6 2.5s ease-in-out infinite}.ai-asset-analysis-page .qt-floating-btn[data-v-0d0a10d6]:hover{-webkit-transform:scale(1.08);transform:scale(1.08);-webkit-box-shadow:0 6px 28px rgba(99,102,241,.5);box-shadow:0 6px 28px rgba(99,102,241,.5)}@-webkit-keyframes qt-float-pulse-0d0a10d6{0%,to{-webkit-transform:translateY(0);transform:translateY(0)}50%{-webkit-transform:translateY(-4px);transform:translateY(-4px)}}@keyframes qt-float-pulse-0d0a10d6{0%,to{-webkit-transform:translateY(0);transform:translateY(0)}50%{-webkit-transform:translateY(-4px);transform:translateY(-4px)}}.ai-asset-analysis-page .workspace-card[data-v-0d0a10d6]{border-radius:14px;-webkit-box-shadow:0 1px 4px rgba(0,0,0,.06);box-shadow:0 1px 4px rgba(0,0,0,.06);border:1px solid #e8e8e8}.ai-asset-analysis-page .workspace-card[data-v-0d0a10d6] .ant-card-body{padding:0}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-bar{margin-bottom:0;padding:0 20px;border-bottom:1px solid #f0f0f0}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-tab{font-size:15px;font-weight:600;padding:14px 16px}.ai-asset-analysis-page .workspace-card .tab-body[data-v-0d0a10d6] .ai-analysis-container.embedded,.ai-asset-analysis-page .workspace-card .tab-body[data-v-0d0a10d6] .portfolio-container.embedded{border-radius:0;overflow:hidden}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content[data-v-0d0a10d6]{padding:40px 20px;text-align:center}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content .polymarket-placeholder .placeholder-icon[data-v-0d0a10d6]{font-size:64px;color:#6366f1;margin-bottom:24px}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content .polymarket-placeholder h3[data-v-0d0a10d6]{font-size:20px;font-weight:700;margin-bottom:12px;color:rgba(0,0,0,.85)}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content .polymarket-placeholder p[data-v-0d0a10d6]{font-size:14px;color:rgba(0,0,0,.55);margin-bottom:24px}.ai-asset-analysis-page.theme-dark[data-v-0d0a10d6]{background:#141414}.ai-asset-analysis-page.theme-dark .radar-section .radar-header .radar-title[data-v-0d0a10d6]{color:#e8e8e8}.ai-asset-analysis-page.theme-dark .radar-section .radar-header .radar-subtitle[data-v-0d0a10d6]{color:#666}.ai-asset-analysis-page.theme-dark .radar-section .radar-refresh-btn[data-v-0d0a10d6]{background:#1c1c1c;border-color:#2a2a2a;color:#999}.ai-asset-analysis-page.theme-dark .radar-section .radar-refresh-btn[data-v-0d0a10d6]:hover{border-color:#6366f1;color:#a78bfa}.ai-asset-analysis-page.theme-dark .radar-section .radar-carousel[data-v-0d0a10d6]:before{background:-webkit-gradient(linear,left top,right top,from(#141414),to(transparent));background:linear-gradient(90deg,#141414,transparent)}.ai-asset-analysis-page.theme-dark .radar-section .radar-carousel[data-v-0d0a10d6]:after{background:-webkit-gradient(linear,right top,left top,from(#141414),to(transparent));background:linear-gradient(270deg,#141414,transparent)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card[data-v-0d0a10d6]{background:#1a1a1c;border-color:hsla(0,0%,100%,.06)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card[data-v-0d0a10d6]:before{background:linear-gradient(135deg,rgba(99,102,241,.06),rgba(139,92,246,.03))}.ai-asset-analysis-page.theme-dark .radar-section .radar-card[data-v-0d0a10d6]:hover{border-color:rgba(99,102,241,.25);-webkit-box-shadow:0 8px 32px rgba(0,0,0,.4),0 0 0 1px rgba(99,102,241,.15);box-shadow:0 8px 32px rgba(0,0,0,.4),0 0 0 1px rgba(99,102,241,.15)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-symbol[data-v-0d0a10d6]{color:#f0f0f0}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-market[data-v-0d0a10d6]{background:hsla(0,0%,100%,.06);color:#888}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-market.rc-market-crypto[data-v-0d0a10d6]{color:#a78bfa;background:rgba(167,139,250,.12)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-market.rc-market-usstock[data-v-0d0a10d6]{color:#4ade80;background:rgba(74,222,128,.1)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-market.rc-market-forex[data-v-0d0a10d6]{color:#fbbf24;background:rgba(251,191,36,.1)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-market.rc-market-predictionmarket[data-v-0d0a10d6]{color:#22d3ee;background:rgba(34,211,238,.1)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric[data-v-0d0a10d6]{background:hsla(0,0%,100%,.03)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-label[data-v-0d0a10d6]{color:#666}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value[data-v-0d0a10d6]{color:#ddd}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value.rc-up[data-v-0d0a10d6]{color:#4ade80}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value.rc-down[data-v-0d0a10d6]{color:#f87171}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-bullish_momentum[data-v-0d0a10d6]{color:#22d3ee}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-overbought[data-v-0d0a10d6]{color:#fbbf24}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-oversold[data-v-0d0a10d6]{color:#4ade80}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-bearish_momentum[data-v-0d0a10d6]{color:#f87171}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-reason[data-v-0d0a10d6]{color:#555}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-cta[data-v-0d0a10d6]{color:#fff}.ai-asset-analysis-page.theme-dark .workspace-card[data-v-0d0a10d6]{background:#1c1c1c;border-color:#2a2a2a}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-bar{border-bottom-color:#2a2a2a}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-tab{color:#8b949e}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-tab:hover{color:#c9d1d9}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-tab-active{color:#a78bfa}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-ink-bar{background-color:#a78bfa}.ai-asset-analysis-page.theme-dark .workspace-card .polymarket-tab-content .polymarket-placeholder h3[data-v-0d0a10d6]{color:#d4d4d4}.ai-asset-analysis-page.theme-dark .workspace-card .polymarket-tab-content .polymarket-placeholder p[data-v-0d0a10d6]{color:#a3a3a3}@media (max-width:768px){.ai-asset-analysis-page[data-v-0d0a10d6]{padding:8px;min-height:auto}.ai-asset-analysis-page .radar-section[data-v-0d0a10d6]{margin-bottom:10px}.ai-asset-analysis-page .radar-section .radar-header[data-v-0d0a10d6]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;gap:8px}.ai-asset-analysis-page .radar-section .radar-header .radar-header-left .radar-title[data-v-0d0a10d6]{font-size:15px}.ai-asset-analysis-page .radar-section .radar-header .radar-header-left .radar-subtitle[data-v-0d0a10d6]{font-size:11px}.ai-asset-analysis-page .radar-section .radar-header .radar-refresh-btn[data-v-0d0a10d6]{-ms-flex-item-align:end;align-self:flex-end}.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]:after,.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]:before{width:28px}.ai-asset-analysis-page .radar-section .radar-card[data-v-0d0a10d6]{width:210px;padding:12px}.ai-asset-analysis-page .radar-section .radar-card.is-prediction[data-v-0d0a10d6]{width:248px}.ai-asset-analysis-page .radar-section .radar-card .rc-symbol[data-v-0d0a10d6]{font-size:14px}.ai-asset-analysis-page .radar-section .radar-card .rc-metric[data-v-0d0a10d6]{padding:6px}.ai-asset-analysis-page .qt-floating-btn[data-v-0d0a10d6]{right:max(8px,env(safe-area-inset-right,0px));bottom:max(68px,calc(52px + env(safe-area-inset-bottom, 0px)));width:44px;height:44px;font-size:20px}.ai-asset-analysis-page .workspace-card[data-v-0d0a10d6]{border-radius:10px}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-bar{padding:0 6px}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-nav-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-tab{font-size:14px;padding:10px 8px;margin-right:2px;white-space:nowrap}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content[data-v-0d0a10d6]{padding:16px 8px}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content .polymarket-placeholder .placeholder-icon[data-v-0d0a10d6]{font-size:48px;margin-bottom:12px}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content .polymarket-placeholder h3[data-v-0d0a10d6]{font-size:17px}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content .polymarket-placeholder p[data-v-0d0a10d6]{font-size:13px}}@media (max-width:480px){.ai-asset-analysis-page[data-v-0d0a10d6]{padding:4px}.ai-asset-analysis-page .radar-section .radar-card[data-v-0d0a10d6]{width:188px;padding:10px}.ai-asset-analysis-page .radar-section .radar-card.is-prediction[data-v-0d0a10d6]{width:220px}.ai-asset-analysis-page .radar-section .radar-card .rc-metrics[data-v-0d0a10d6]{gap:3px}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value[data-v-0d0a10d6]{font-size:12px}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-bar{padding:0 4px}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-tab{font-size:13px;padding:8px 6px}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content[data-v-0d0a10d6]{padding:12px 6px}} \ No newline at end of file diff --git a/frontend/dist/css/19.a7b2f719.css b/frontend/dist/css/19.a7b2f719.css new file mode 100644 index 0000000..a9e627b --- /dev/null +++ b/frontend/dist/css/19.a7b2f719.css @@ -0,0 +1 @@ +.profile-exchange-modal .exchange-account-form .egress-ip-block{width:100%}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px;margin:0 0 16px;padding:12px 14px;border:1px solid rgba(24,144,255,.18);border-radius:10px;background:-webkit-gradient(linear,left top,right top,from(rgba(24,144,255,.06)),to(rgba(82,196,26,.04)));background:linear-gradient(90deg,rgba(24,144,255,.06),rgba(82,196,26,.04))}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:10px;min-width:0}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__icon{width:28px;height:28px;border-radius:50%;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background:rgba(24,144,255,.12);color:#1890ff;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__text{min-width:0}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__title{color:rgba(0,0,0,.85);font-size:13px;font-weight:600;line-height:1.5}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__hint{color:rgba(0,0,0,.55);font-size:12px;line-height:1.5;margin-top:2px}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__action{padding:0;white-space:nowrap;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.profile-exchange-modal .exchange-account-form .egress-ip-row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:6px}.profile-exchange-modal .exchange-account-form .egress-ip-refresh-row{margin-top:4px}.profile-exchange-modal .exchange-account-form .egress-ip-line{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;margin-bottom:10px}.profile-exchange-modal .exchange-account-form .egress-ip-kind{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;min-width:42px;font-size:12px;color:rgba(0,0,0,.55)}.profile-exchange-modal .exchange-account-form .egress-ip-value{-webkit-box-flex:1;-ms-flex:1 1 160px;flex:1 1 160px;min-width:0;font-family:Consolas,ui-monospace,monospace;font-size:12px;padding:6px 10px;border-radius:4px;border:1px solid #d9d9d9;background:#fafafa;color:#262626;word-break:break-all}.profile-exchange-modal .exchange-account-form .exchange-demo-checkbox-label{color:rgba(0,0,0,.85)}.profile-exchange-modal .exchange-account-form .exchange-demo-hint{margin-top:6px}.profile-exchange-modal .exchange-account-form .field-hint{margin-top:6px;font-size:12px;color:rgba(0,0,0,.45);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:6px}.profile-exchange-modal .exchange-account-form .test-result-msg{margin-top:8px;font-size:13px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.profile-exchange-modal .exchange-account-form .test-result-msg.success{color:#52c41a}.profile-exchange-modal .exchange-account-form .test-result-msg.error{color:#f5222d}.profile-exchange-modal--dark .ant-modal-content{background:#1c1c1c;-webkit-box-shadow:0 8px 32px rgba(0,0,0,.45);box-shadow:0 8px 32px rgba(0,0,0,.45)}.profile-exchange-modal--dark .ant-modal-header{background:#1c1c1c;border-bottom:1px solid #2a2a2a}.profile-exchange-modal--dark .ant-modal-title{color:#e0e6ed}.profile-exchange-modal--dark .ant-modal-close{color:#8b949e}.profile-exchange-modal--dark .ant-modal-body,.profile-exchange-modal--dark .ant-modal-close:hover{color:#c9d1d9}.profile-exchange-modal--dark .ant-modal-footer{background:#1c1c1c;border-top:1px solid #2a2a2a}.profile-exchange-modal--dark .exchange-account-form .ant-form-item-label>label{color:#c9d1d9}.profile-exchange-modal--dark .exchange-account-form .ant-form-item-explain,.profile-exchange-modal--dark .exchange-account-form .ant-form-item-extra{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-input,.profile-exchange-modal--dark .exchange-account-form .ant-input-number,.profile-exchange-modal--dark .exchange-account-form .ant-input-number-input,.profile-exchange-modal--dark .exchange-account-form .ant-input-password .ant-input{background:#141414!important;border-color:#2a2a2a!important;color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-input-password-icon{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-input-number-handler-wrap{background:#141414;border-left-color:#2a2a2a}.profile-exchange-modal--dark .exchange-account-form .ant-input-number-handler-down-inner,.profile-exchange-modal--dark .exchange-account-form .ant-input-number-handler-up-inner{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-select-selector{background:#141414!important;border-color:#2a2a2a!important;color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-item,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-placeholder{color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-selection,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection--single{background:#141414!important;border-color:#2a2a2a!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-placeholder,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-selected-value,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection__rendered{color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-arrow{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-checkbox-wrapper,.profile-exchange-modal--dark .exchange-account-form .ant-checkbox-wrapper span{color:#c9d1d9}.profile-exchange-modal--dark .exchange-account-form .exchange-demo-checkbox-label{color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .egress-ip-hint,.profile-exchange-modal--dark .exchange-account-form .exchange-demo-hint{color:#8b949e!important}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout{background:-webkit-gradient(linear,left top,right top,from(rgba(24,144,255,.12)),to(rgba(82,196,26,.08)));background:linear-gradient(90deg,rgba(24,144,255,.12),rgba(82,196,26,.08));border-color:rgba(88,166,255,.26)}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__icon{background:rgba(88,166,255,.16);color:#58a6ff}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__title{color:#e0e6ed}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__hint{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__action{color:#58a6ff}.profile-exchange-modal--dark .exchange-account-form .egress-ip-value{border-color:#2a2a2a!important;background:#141414!important;color:#e0e6ed!important}.profile-exchange-modal--dark .exchange-account-form a.egress-ip-action{color:#58a6ff}.profile-exchange-modal--dark .exchange-account-form .egress-ip-kind{color:#8b949e!important}.profile-exchange-modal--dark .exchange-account-form .ant-alert{background:rgba(250,173,20,.12);border-color:rgba(250,173,20,.45)}.profile-exchange-modal--dark .exchange-account-form .ant-alert-message{color:#ffc53d}.profile-exchange-modal--dark .exchange-account-form .ant-alert-description{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-alert-icon{color:#faad14}.profile-exchange-modal--dark .exchange-account-form .field-hint{color:#8b949e;margin-top:6px;font-size:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:6px}.profile-exchange-modal--dark .exchange-account-form .field-hint .anticon{color:#8b949e;margin-top:2px}.profile-exchange-modal--dark .exchange-account-form .test-result-msg{color:#c9d1d9}.profile-exchange-modal--dark .exchange-account-form .test-result-msg.success{color:#73d13d}.profile-exchange-modal--dark .exchange-account-form .test-result-msg.error{color:#ff7875}.profile-exchange-select-dropdown-dark.ant-select-dropdown{background:#1c1c1c}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item{color:#c9d1d9}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item:hover{background:#2a2a2a}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item-selected{background:#2a2a2a!important;color:#e0e6ed;font-weight:500}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item-group-title{color:#8b949e!important;font-size:12px}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item,.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item-selected{color:#c9d1d9!important}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-empty-description{color:#8b949e}.quick-trade-drawer[data-v-75b64b85] .ant-drawer-body{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%;overflow-y:auto}.qt-header[data-v-75b64b85]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid #f0f0f0}.qt-header .qt-header-left[data-v-75b64b85],.qt-header[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-header .qt-header-left[data-v-75b64b85]{gap:8px}.qt-header .qt-header-left .qt-icon[data-v-75b64b85]{font-size:20px;color:#595959}.qt-header .qt-header-left .qt-header-title[data-v-75b64b85]{font-size:16px;font-weight:600}.qt-header .qt-close[data-v-75b64b85]{font-size:16px;cursor:pointer;color:#999}.qt-header .qt-close[data-v-75b64b85]:hover{color:#333}.qt-symbol-bar[data-v-75b64b85]{padding:12px 20px;background:-webkit-gradient(linear,left top,left bottom,from(#fafafa),to(#f0f0f0));background:linear-gradient(180deg,#fafafa,#f0f0f0);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:8px}.qt-symbol-bar .qt-symbol-selector[data-v-75b64b85],.qt-symbol-bar .qt-symbol-selector[data-v-75b64b85] .ant-select{width:100%}.qt-symbol-bar .qt-symbol-selector[data-v-75b64b85] .ant-select-selection{border-radius:6px;border:1px solid #d9d9d9}.qt-symbol-bar .qt-price-display[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.qt-symbol-bar .qt-price-display .qt-current-price[data-v-75b64b85]{font-size:16px;font-weight:600;color:#333}.qt-symbol-option[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.qt-symbol-option .qt-symbol-option-name[data-v-75b64b85]{font-weight:600;font-size:14px}.qt-symbol-option .qt-symbol-option-desc[data-v-75b64b85]{color:#999;font-size:12px}.qt-section[data-v-75b64b85]{padding:8px 20px}.qt-section .qt-label[data-v-75b64b85]{font-size:12px;color:#999;margin-bottom:4px;font-weight:500}.qt-section .qt-crypto-hint[data-v-75b64b85]{font-size:10px;color:#faad14;background:rgba(250,173,20,.1);padding:1px 6px;border-radius:4px;margin-left:4px}.qt-balance[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;margin-top:6px;font-size:12px}.qt-balance .qt-balance-label[data-v-75b64b85]{color:#999}.qt-balance .qt-balance-loading-text[data-v-75b64b85]{margin-left:4px}.qt-balance .qt-balance-value[data-v-75b64b85]{color:#52c41a;font-weight:600}.qt-balance .qt-balance-error[data-v-75b64b85]{color:#faad14;cursor:help}.qt-no-cred-actions[data-v-75b64b85]{margin-top:10px}.qt-manage-link[data-v-75b64b85]{margin-top:8px;font-size:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:4px}.qt-manage-link .qt-manage-sep[data-v-75b64b85]{color:#ccc;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.qt-direction-toggle[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px}.qt-direction-toggle .qt-dir-btn[data-v-75b64b85]{-webkit-box-flex:1;-ms-flex:1;flex:1;padding:10px;text-align:center;border-radius:8px;font-weight:600;font-size:14px;cursor:pointer;-webkit-transition:all .2s;transition:all .2s;border:2px solid transparent;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:6px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.qt-direction-toggle .qt-dir-long[data-v-75b64b85]{color:#52c41a;background:rgba(82,196,26,.06);border-color:rgba(82,196,26,.2)}.qt-direction-toggle .qt-dir-long.active[data-v-75b64b85]{background:#52c41a;color:#fff;border-color:#52c41a;-webkit-box-shadow:0 4px 12px rgba(82,196,26,.3);box-shadow:0 4px 12px rgba(82,196,26,.3)}.qt-direction-toggle .qt-dir-long[data-v-75b64b85]:hover:not(.active){border-color:#52c41a}.qt-direction-toggle .qt-dir-short[data-v-75b64b85]{color:#f5222d;background:rgba(245,34,45,.06);border-color:rgba(245,34,45,.2)}.qt-direction-toggle .qt-dir-short.active[data-v-75b64b85]{background:#f5222d;color:#fff;border-color:#f5222d;-webkit-box-shadow:0 4px 12px rgba(245,34,45,.3);box-shadow:0 4px 12px rgba(245,34,45,.3)}.qt-direction-toggle .qt-dir-short[data-v-75b64b85]:hover:not(.active){border-color:#f5222d}.qt-quick-amounts[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:6px;margin-top:6px}.qt-quick-amounts button[data-v-75b64b85]{-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:12px}.qt-leverage-row[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-leverage-input[data-v-75b64b85]{width:80px}.qt-card[data-v-75b64b85]{margin-left:16px;margin-right:16px;padding:12px 14px;border-radius:10px;background:#f5f5f5;border:1px solid #e8e8e8}.qt-section-title-row[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:8px}.qt-section-title[data-v-75b64b85]{font-size:13px;font-weight:600;color:#333}.qt-badge-contract[data-v-75b64b85]{font-size:10px;font-weight:600;padding:2px 8px;border-radius:999px;background:#ebebeb;color:#595959;border:1px solid #d9d9d9}.qt-optional-tag[data-v-75b64b85]{font-size:10px;color:#8c8c8c;background:#f0f0f0;padding:1px 8px;border-radius:4px}.qt-label-spaced[data-v-75b64b85]{margin-top:10px}.qt-margin-radio[data-v-75b64b85]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex}.qt-margin-radio[data-v-75b64b85] .ant-radio-button-wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1;text-align:center;padding:0 4px}.qt-hint-text[data-v-75b64b85]{font-size:11px;color:#8c8c8c;line-height:1.45;margin-top:8px}.qt-hint-inline[data-v-75b64b85]{margin-top:6px}.qt-spot-banner[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:10px;padding:4px 0}.qt-spot-banner-icon[data-v-75b64b85]{font-size:22px;color:#52c41a;margin-top:2px}.qt-spot-banner-title[data-v-75b64b85]{font-size:13px;font-weight:600;color:#333;margin-bottom:4px}.qt-spot-banner-text .qt-hint-text[data-v-75b64b85]{margin-top:0}.qt-tpsl-row[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px}.qt-tpsl-row .qt-tpsl-item[data-v-75b64b85]{-webkit-box-flex:1;-ms-flex:1;flex:1}.qt-tp-label[data-v-75b64b85]{color:#389e0d!important}.qt-sl-label[data-v-75b64b85]{color:#cf1322!important}.qt-input-full[data-v-75b64b85]{width:100%}.qt-dir-btn.qt-dir-disabled[data-v-75b64b85]{opacity:.42;cursor:not-allowed;pointer-events:none}.qt-empty-icon[data-v-75b64b85]{font-size:28px;color:#d9d9d9;margin-bottom:8px}.qt-empty-desc[data-v-75b64b85]{font-size:12px;color:#8c8c8c;line-height:1.5}.qt-submit-section[data-v-75b64b85]{padding:12px 20px}.qt-submit-section .qt-submit-btn[data-v-75b64b85]{height:48px;font-size:16px;font-weight:700;border-radius:8px;letter-spacing:.5px}.qt-submit-section .qt-btn-long[data-v-75b64b85]{background:#52c41a!important;border-color:#52c41a!important}.qt-submit-section .qt-btn-long[data-v-75b64b85]:hover{background:#73d13d!important}.qt-submit-section .qt-btn-long[data-v-75b64b85]:active{background:#389e0d!important}.qt-submit-section .qt-btn-short[data-v-75b64b85]{background:#f5222d!important;border-color:#f5222d!important}.qt-submit-section .qt-btn-short[data-v-75b64b85]:hover{background:#ff4d4f!important}.qt-submit-section .qt-btn-short[data-v-75b64b85]:active{background:#cf1322!important}.qt-position-section[data-v-75b64b85]{padding:8px 20px 12px}.qt-position-section .qt-section-header[data-v-75b64b85]{font-size:13px;font-weight:600;color:#666;margin-bottom:8px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.qt-history-section[data-v-75b64b85]{padding:8px 20px 12px}.qt-history-section[data-v-75b64b85] .ant-collapse{background:transparent;border:none}.qt-history-section[data-v-75b64b85] .ant-collapse-item{border:none}.qt-history-section[data-v-75b64b85] .ant-collapse-header{padding:0!important;cursor:pointer}.qt-history-section[data-v-75b64b85] .ant-collapse-header:hover{opacity:.8}.qt-history-section[data-v-75b64b85] .ant-collapse-content{border:none;background:transparent}.qt-history-section[data-v-75b64b85] .ant-collapse-content-box{padding:8px 0 0 0!important}.qt-history-section .qt-section-header[data-v-75b64b85]{font-size:13px;font-weight:600;color:#666;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.qt-history-section .qt-history-count[data-v-75b64b85]{font-size:12px;color:#999;font-weight:400}.qt-position-card[data-v-75b64b85]{background:#fafafa;border-radius:8px;padding:10px 12px;border-left:3px solid #d9d9d9}.qt-position-card.long[data-v-75b64b85]{border-left-color:#52c41a}.qt-position-card.short[data-v-75b64b85]{border-left-color:#f5222d}.qt-position-card .qt-pos-row[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;font-size:13px;padding:2px 0}.qt-position-card .qt-pos-row span[data-v-75b64b85]:first-child{color:#999}.qt-position-empty[data-v-75b64b85]{background:#fafafa;border-radius:8px;padding:20px 12px;text-align:center;border:1px dashed #d9d9d9;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-green[data-v-75b64b85]{color:#52c41a!important}.qt-red[data-v-75b64b85]{color:#f5222d!important}.qt-trade-list .qt-trade-item[data-v-75b64b85]{padding:6px 0;border-bottom:1px solid #f5f5f5}.qt-trade-list .qt-trade-item[data-v-75b64b85]:last-child{border-bottom:none}.qt-trade-list .qt-trade-item .qt-trade-main[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.qt-trade-list .qt-trade-item .qt-trade-main .qt-trade-symbol[data-v-75b64b85]{font-weight:600;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-main .qt-trade-amount[data-v-75b64b85]{margin-left:auto;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-meta[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-top:2px}.qt-trade-list .qt-trade-item .qt-trade-meta .qt-trade-time[data-v-75b64b85]{font-size:11px;color:#bbb}.theme-dark .qt-header[data-v-75b64b85]{border-bottom-color:#303030}.theme-dark .qt-header .qt-icon[data-v-75b64b85]{color:#a3a3a3}.theme-dark .qt-header .qt-header-title[data-v-75b64b85]{color:#e0e0e0}.theme-dark .qt-header .qt-close[data-v-75b64b85]{color:#666}.theme-dark .qt-header .qt-close[data-v-75b64b85]:hover{color:#bbb}.theme-dark .qt-symbol-bar[data-v-75b64b85]{background:-webkit-gradient(linear,left top,left bottom,from(#262626),to(#1f1f1f));background:linear-gradient(180deg,#262626,#1f1f1f)}.theme-dark .qt-symbol-bar .qt-current-price[data-v-75b64b85]{color:#e0e0e0}.theme-dark .qt-symbol-bar[data-v-75b64b85] .ant-select-selection{background:#262626;border-color:#303030;color:#e0e0e0}.theme-dark .qt-symbol-bar[data-v-75b64b85] .ant-select-selection__placeholder{color:#666}.theme-dark .qt-symbol-option .qt-symbol-option-name[data-v-75b64b85]{color:#e0e0e0}.theme-dark .qt-symbol-option .qt-symbol-option-desc[data-v-75b64b85]{color:#999}.theme-dark .qt-section .qt-label[data-v-75b64b85]{color:#777}.theme-dark .qt-position-card[data-v-75b64b85]{background:#262626}.theme-dark .qt-position-card .qt-pos-row span[data-v-75b64b85]:first-child{color:#777}.theme-dark .qt-history-section .qt-section-header[data-v-75b64b85],.theme-dark .qt-position-card .qt-pos-row span[data-v-75b64b85]:last-child{color:#ccc}.theme-dark .qt-history-section .qt-history-count[data-v-75b64b85]{color:#888}.theme-dark .qt-history-section[data-v-75b64b85] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark .qt-history-section[data-v-75b64b85] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark .qt-history-section[data-v-75b64b85] .ant-collapse .ant-collapse-header:hover{opacity:.8}.theme-dark .qt-history-section[data-v-75b64b85] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark .qt-trade-item[data-v-75b64b85]{border-bottom-color:#2a2a2a!important}.theme-dark .qt-trade-item .qt-trade-symbol[data-v-75b64b85]{color:#e0e0e0}.theme-dark .qt-trade-item .qt-trade-amount[data-v-75b64b85]{color:#ccc}.theme-dark[data-v-75b64b85] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark[data-v-75b64b85] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark[data-v-75b64b85] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark[data-v-75b64b85] .ant-drawer-content{background:#141414}.theme-dark[data-v-75b64b85] .ant-input-number,.theme-dark[data-v-75b64b85] .ant-select-selection{background:#262626;border-color:#303030;color:#e0e0e0}.theme-dark[data-v-75b64b85] .ant-radio-group .ant-radio-button-wrapper{background:#262626;border-color:#303030;color:#ccc}.theme-dark[data-v-75b64b85] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#434343;border-color:#595959;color:#fff}.theme-dark[data-v-75b64b85] .ant-slider-rail{background:#303030}.theme-dark[data-v-75b64b85] .ant-slider-track{background:#737373}.theme-dark .qt-manage-link a[data-v-75b64b85]{color:#58a6ff}.theme-dark .qt-manage-link .qt-manage-sep[data-v-75b64b85]{color:#555}.theme-dark .qt-card[data-v-75b64b85]{background:#262626;border-color:#3a3a3a}.theme-dark .qt-section-title[data-v-75b64b85]{color:#e8e8e8}.theme-dark .qt-badge-contract[data-v-75b64b85]{background:#333;color:#bfbfbf;border-color:#434343}.theme-dark .qt-optional-tag[data-v-75b64b85]{background:#2a2a2a;color:#888}.theme-dark .qt-hint-text[data-v-75b64b85]{color:#777}.theme-dark .qt-spot-banner-title[data-v-75b64b85]{color:#e0e0e0}.theme-dark .qt-spot-banner-icon[data-v-75b64b85]{color:#73d13d}.theme-dark .qt-tp-label[data-v-75b64b85]{color:#95de64!important}.theme-dark .qt-sl-label[data-v-75b64b85]{color:#ff7875!important}.theme-dark .qt-position-empty[data-v-75b64b85]{background:#262626;border-color:#303030}.theme-dark .qt-empty-icon[data-v-75b64b85]{color:#434343}.theme-dark .qt-empty-desc[data-v-75b64b85]{color:#888}.polymarket-analysis-modal .input-section .input-actions[data-v-67e891d2]{margin-top:12px}.polymarket-analysis-modal .result-section .market-info[data-v-67e891d2]{margin-bottom:24px}.polymarket-analysis-modal .result-section .market-info h3[data-v-67e891d2]{margin-bottom:12px;font-size:18px;font-weight:600}.polymarket-analysis-modal .result-section .market-info .market-meta[data-v-67e891d2]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:16px;-ms-flex-wrap:wrap;flex-wrap:wrap}.polymarket-analysis-modal .result-section .market-info .market-meta .meta-item[data-v-67e891d2]{color:rgba(0,0,0,.65);font-size:14px}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison[data-v-67e891d2]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:16px;margin:24px 0}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item[data-v-67e891d2]{-webkit-box-flex:1;-ms-flex:1;flex:1;text-align:center;padding:16px;background:#f5f5f5;border-radius:4px}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item .prob-label[data-v-67e891d2]{font-size:12px;color:rgba(0,0,0,.65);margin-bottom:8px}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item .prob-value[data-v-67e891d2]{font-size:24px;font-weight:600}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item .prob-value.ai-prob[data-v-67e891d2]{color:#1890ff}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item .prob-value.divergence-positive[data-v-67e891d2]{color:#52c41a}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item .prob-value.divergence-negative[data-v-67e891d2]{color:#ff4d4f}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item .prob-value.divergence-neutral[data-v-67e891d2]{color:rgba(0,0,0,.65)}.polymarket-analysis-modal .result-section .analysis-result .recommendation-section[data-v-67e891d2]{margin:24px 0}.polymarket-analysis-modal .result-section .analysis-result .recommendation-section .rec-card[data-v-67e891d2]{text-align:center;padding:16px;background:#f5f5f5;border-radius:4px}.polymarket-analysis-modal .result-section .analysis-result .recommendation-section .rec-card .rec-label[data-v-67e891d2]{font-size:12px;color:rgba(0,0,0,.65);margin-bottom:8px}.polymarket-analysis-modal .result-section .analysis-result .recommendation-section .rec-card .rec-value[data-v-67e891d2]{font-size:24px;font-weight:600;color:#1890ff}.polymarket-analysis-modal .result-section .analysis-result .key-factors-section[data-v-67e891d2],.polymarket-analysis-modal .result-section .analysis-result .reasoning-section[data-v-67e891d2]{margin:24px 0}.polymarket-analysis-modal .result-section .analysis-result .key-factors-section h4[data-v-67e891d2],.polymarket-analysis-modal .result-section .analysis-result .reasoning-section h4[data-v-67e891d2]{margin-bottom:12px;font-size:16px;font-weight:600}.polymarket-analysis-modal .result-section .analysis-result .key-factors-section .reasoning-text[data-v-67e891d2],.polymarket-analysis-modal .result-section .analysis-result .reasoning-section .reasoning-text[data-v-67e891d2]{line-height:1.8;color:rgba(0,0,0,.85);white-space:pre-wrap}.polymarket-analysis-modal .result-section .result-actions[data-v-67e891d2]{margin-top:24px;text-align:right}.polymarket-analysis-modal .loading-section[data-v-67e891d2]{text-align:center;padding:40px 0}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-tabs-bar{border-bottom-color:#2a2a2a}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-tabs-tab{color:#a3a3a3!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-tabs-tab-active{color:#d4d4d4!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-tabs-ink-bar{background:#58a6ff!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-divider{color:#d4d4d4;border-top-color:#2a2a2a}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-divider-inner-text{color:#d4d4d4!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-input,.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-input-affix-wrapper,.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-input-number,.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-input-textarea textarea{background:#141414!important;border-color:#2a2a2a!important;color:#d4d4d4!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-table{background:#1c1c1c;color:#d4d4d4}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-table-thead>tr>th{background:#252525;color:#d4d4d4;border-bottom-color:#2a2a2a}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-table-tbody>tr>td{background:#1c1c1c;color:#d4d4d4;border-bottom-color:#2a2a2a}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-btn-link{color:#58a6ff!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-alert{background:#1c1c1c;border-color:#2a2a2a}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-alert-message{color:#d4d4d4!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-alert-description{color:#a3a3a3!important}.polymarket-analysis-modal.theme-dark .market-info h3[data-v-67e891d2]{color:#d4d4d4}.polymarket-analysis-modal.theme-dark .market-info .market-meta .meta-item[data-v-67e891d2]{color:#a3a3a3}.polymarket-analysis-modal.theme-dark .analysis-result .probability-comparison .prob-item[data-v-67e891d2]{background:#252525;border:1px solid #2a2a2a}.polymarket-analysis-modal.theme-dark .analysis-result .probability-comparison .prob-item .prob-label[data-v-67e891d2]{color:#a3a3a3}.polymarket-analysis-modal.theme-dark .analysis-result .probability-comparison .prob-item .prob-value[data-v-67e891d2]{color:#e5e5e5}.polymarket-analysis-modal.theme-dark .analysis-result .probability-comparison .prob-item .prob-value.divergence-neutral[data-v-67e891d2]{color:#b3b3b3}.polymarket-analysis-modal.theme-dark .analysis-result .recommendation-section .rec-card[data-v-67e891d2]{background:#252525;border:1px solid #2a2a2a}.polymarket-analysis-modal.theme-dark .analysis-result .recommendation-section .rec-card .rec-label[data-v-67e891d2]{color:#a3a3a3}.polymarket-analysis-modal.theme-dark .analysis-result .recommendation-section .rec-card .rec-value[data-v-67e891d2]{color:#e5e5e5}.polymarket-analysis-modal.theme-dark .analysis-result .key-factors-section .reasoning-text[data-v-67e891d2],.polymarket-analysis-modal.theme-dark .analysis-result .key-factors-section h4[data-v-67e891d2],.polymarket-analysis-modal.theme-dark .analysis-result .reasoning-section .reasoning-text[data-v-67e891d2],.polymarket-analysis-modal.theme-dark .analysis-result .reasoning-section h4[data-v-67e891d2]{color:#d4d4d4}.ai-asset-analysis-page[data-v-0d0a10d6]{padding:20px;min-height:calc(100vh - 120px);background:#f0f2f5;width:100%;max-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;overflow-x:hidden}.ai-asset-analysis-page .radar-section[data-v-0d0a10d6]{margin-bottom:20px}.ai-asset-analysis-page .radar-section .radar-header[data-v-0d0a10d6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:14px}.ai-asset-analysis-page .radar-section .radar-header .radar-header-left .radar-title[data-v-0d0a10d6]{margin:0;font-size:16px;font-weight:700;color:#1a1a1a;letter-spacing:-.2px}.ai-asset-analysis-page .radar-section .radar-header .radar-header-left .radar-subtitle[data-v-0d0a10d6]{margin:2px 0 0;font-size:12px;color:#999}.ai-asset-analysis-page .radar-section .radar-header .radar-refresh-btn[data-v-0d0a10d6]{border-radius:8px;border:1px solid #e0e0e0;background:#fff;color:#666;font-size:12px;font-weight:500}.ai-asset-analysis-page .radar-section .radar-header .radar-refresh-btn[data-v-0d0a10d6]:hover{border-color:#6366f1;color:#6366f1}.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]{overflow:hidden;position:relative;border-radius:12px;padding:2px 0}.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]:after,.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]:before{content:"";position:absolute;top:0;bottom:0;width:50px;z-index:2;pointer-events:none}.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]:before{left:0;background:-webkit-gradient(linear,left top,right top,from(#f0f2f5),to(transparent));background:linear-gradient(90deg,#f0f2f5,transparent)}.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]:after{right:0;background:-webkit-gradient(linear,right top,left top,from(#f0f2f5),to(transparent));background:linear-gradient(270deg,#f0f2f5,transparent)}.ai-asset-analysis-page .radar-section .radar-track[data-v-0d0a10d6]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px;-webkit-animation:radar-scroll-0d0a10d6 60s linear infinite;animation:radar-scroll-0d0a10d6 60s linear infinite;width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:4px 0}.ai-asset-analysis-page .radar-section .radar-track.paused[data-v-0d0a10d6]{-webkit-animation-play-state:paused;animation-play-state:paused}@-webkit-keyframes radar-scroll-0d0a10d6{0%{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(-50%);transform:translateX(-50%)}}@keyframes radar-scroll-0d0a10d6{0%{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(-50%);transform:translateX(-50%)}}.ai-asset-analysis-page .radar-section .radar-card[data-v-0d0a10d6]{width:250px;background:#fff;border-radius:12px;padding:16px;cursor:pointer;-ms-flex-negative:0;flex-shrink:0;border:1px solid #eaeaea;-webkit-transition:all .25s cubic-bezier(.4,0,.2,1);transition:all .25s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden}.ai-asset-analysis-page .radar-section .radar-card[data-v-0d0a10d6]:before{content:"";position:absolute;inset:0;border-radius:12px;opacity:0;-webkit-transition:opacity .3s;transition:opacity .3s;background:linear-gradient(135deg,rgba(99,102,241,.04),rgba(139,92,246,.02))}.ai-asset-analysis-page .radar-section .radar-card[data-v-0d0a10d6]:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px);border-color:rgba(99,102,241,.3);-webkit-box-shadow:0 6px 24px rgba(0,0,0,.08),0 0 0 1px rgba(99,102,241,.1);box-shadow:0 6px 24px rgba(0,0,0,.08),0 0 0 1px rgba(99,102,241,.1)}.ai-asset-analysis-page .radar-section .radar-card[data-v-0d0a10d6]:hover:before{opacity:1}.ai-asset-analysis-page .radar-section .radar-card.is-prediction[data-v-0d0a10d6]{width:290px}.ai-asset-analysis-page .radar-section .radar-card .rc-head[data-v-0d0a10d6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:12px;gap:8px}.ai-asset-analysis-page .radar-section .radar-card .rc-symbol[data-v-0d0a10d6]{font-weight:800;font-size:15px;color:#111;letter-spacing:-.2px}.ai-asset-analysis-page .radar-section .radar-card .rc-symbol.rc-prediction-title[data-v-0d0a10d6]{font-size:13px;font-weight:600;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.ai-asset-analysis-page .radar-section .radar-card .rc-market[data-v-0d0a10d6]{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;padding:2px 7px;border-radius:5px;-ms-flex-negative:0;flex-shrink:0;background:#f5f5f5;color:#888}.ai-asset-analysis-page .radar-section .radar-card .rc-market.rc-market-crypto[data-v-0d0a10d6]{color:#7c3aed;background:rgba(124,58,237,.08)}.ai-asset-analysis-page .radar-section .radar-card .rc-market.rc-market-usstock[data-v-0d0a10d6]{color:#16a34a;background:rgba(22,163,74,.08)}.ai-asset-analysis-page .radar-section .radar-card .rc-market.rc-market-forex[data-v-0d0a10d6]{color:#d97706;background:rgba(217,119,6,.08)}.ai-asset-analysis-page .radar-section .radar-card .rc-market.rc-market-predictionmarket[data-v-0d0a10d6]{color:#0891b2;background:rgba(8,145,178,.08)}.ai-asset-analysis-page .radar-section .radar-card .rc-metrics[data-v-0d0a10d6]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:4px;margin-bottom:12px}.ai-asset-analysis-page .radar-section .radar-card .rc-metric[data-v-0d0a10d6]{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:3px;padding:7px;border-radius:8px;background:#fafafa}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-label[data-v-0d0a10d6]{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.4px;color:#999}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value[data-v-0d0a10d6]{font-size:13px;font-weight:700;color:#222}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-up[data-v-0d0a10d6]{color:#16a34a}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-down[data-v-0d0a10d6]{color:#dc2626}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-val[data-v-0d0a10d6]{font-size:11px;font-weight:600}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-bullish_momentum[data-v-0d0a10d6]{color:#0891b2}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-overbought[data-v-0d0a10d6]{color:#d97706}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-oversold[data-v-0d0a10d6]{color:#16a34a}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-bearish_momentum[data-v-0d0a10d6]{color:#dc2626}.ai-asset-analysis-page .radar-section .radar-card .rc-footer[data-v-0d0a10d6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:8px}.ai-asset-analysis-page .radar-section .radar-card .rc-reason[data-v-0d0a10d6]{font-size:11px;color:#999;line-height:1.4;-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.ai-asset-analysis-page .radar-section .radar-card .rc-cta[data-v-0d0a10d6]{font-size:11px;font-weight:700;color:#fff;background:linear-gradient(135deg,#6366f1,#8b5cf6);padding:4px 12px;border-radius:8px;white-space:nowrap;cursor:pointer;-webkit-transition:all .2s;transition:all .2s;-ms-flex-negative:0;flex-shrink:0}.ai-asset-analysis-page .radar-section .radar-card .rc-cta[data-v-0d0a10d6]:hover{-webkit-transform:scale(1.05);transform:scale(1.05);-webkit-box-shadow:0 2px 12px rgba(99,102,241,.35);box-shadow:0 2px 12px rgba(99,102,241,.35)}.ai-asset-analysis-page .qt-floating-btn[data-v-0d0a10d6]{position:fixed;right:24px;bottom:80px;width:48px;height:48px;border-radius:14px;background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;font-size:22px;cursor:pointer;-webkit-box-shadow:0 4px 20px rgba(99,102,241,.35);box-shadow:0 4px 20px rgba(99,102,241,.35);z-index:1000;-webkit-transition:all .3s;transition:all .3s;-webkit-animation:qt-float-pulse-0d0a10d6 2.5s ease-in-out infinite;animation:qt-float-pulse-0d0a10d6 2.5s ease-in-out infinite}.ai-asset-analysis-page .qt-floating-btn[data-v-0d0a10d6]:hover{-webkit-transform:scale(1.08);transform:scale(1.08);-webkit-box-shadow:0 6px 28px rgba(99,102,241,.5);box-shadow:0 6px 28px rgba(99,102,241,.5)}@-webkit-keyframes qt-float-pulse-0d0a10d6{0%,to{-webkit-transform:translateY(0);transform:translateY(0)}50%{-webkit-transform:translateY(-4px);transform:translateY(-4px)}}@keyframes qt-float-pulse-0d0a10d6{0%,to{-webkit-transform:translateY(0);transform:translateY(0)}50%{-webkit-transform:translateY(-4px);transform:translateY(-4px)}}.ai-asset-analysis-page .workspace-card[data-v-0d0a10d6]{border-radius:14px;-webkit-box-shadow:0 1px 4px rgba(0,0,0,.06);box-shadow:0 1px 4px rgba(0,0,0,.06);border:1px solid #e8e8e8}.ai-asset-analysis-page .workspace-card[data-v-0d0a10d6] .ant-card-body{padding:0}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-bar{margin-bottom:0;padding:0 20px;border-bottom:1px solid #f0f0f0}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-tab{font-size:15px;font-weight:600;padding:14px 16px}.ai-asset-analysis-page .workspace-card .tab-body[data-v-0d0a10d6] .ai-analysis-container.embedded,.ai-asset-analysis-page .workspace-card .tab-body[data-v-0d0a10d6] .portfolio-container.embedded{border-radius:0;overflow:hidden}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content[data-v-0d0a10d6]{padding:40px 20px;text-align:center}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content .polymarket-placeholder .placeholder-icon[data-v-0d0a10d6]{font-size:64px;color:#6366f1;margin-bottom:24px}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content .polymarket-placeholder h3[data-v-0d0a10d6]{font-size:20px;font-weight:700;margin-bottom:12px;color:rgba(0,0,0,.85)}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content .polymarket-placeholder p[data-v-0d0a10d6]{font-size:14px;color:rgba(0,0,0,.55);margin-bottom:24px}.ai-asset-analysis-page.theme-dark[data-v-0d0a10d6]{background:#141414}.ai-asset-analysis-page.theme-dark .radar-section .radar-header .radar-title[data-v-0d0a10d6]{color:#e8e8e8}.ai-asset-analysis-page.theme-dark .radar-section .radar-header .radar-subtitle[data-v-0d0a10d6]{color:#666}.ai-asset-analysis-page.theme-dark .radar-section .radar-refresh-btn[data-v-0d0a10d6]{background:#1c1c1c;border-color:#2a2a2a;color:#999}.ai-asset-analysis-page.theme-dark .radar-section .radar-refresh-btn[data-v-0d0a10d6]:hover{border-color:#6366f1;color:#a78bfa}.ai-asset-analysis-page.theme-dark .radar-section .radar-carousel[data-v-0d0a10d6]:before{background:-webkit-gradient(linear,left top,right top,from(#141414),to(transparent));background:linear-gradient(90deg,#141414,transparent)}.ai-asset-analysis-page.theme-dark .radar-section .radar-carousel[data-v-0d0a10d6]:after{background:-webkit-gradient(linear,right top,left top,from(#141414),to(transparent));background:linear-gradient(270deg,#141414,transparent)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card[data-v-0d0a10d6]{background:#1a1a1c;border-color:hsla(0,0%,100%,.06)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card[data-v-0d0a10d6]:before{background:linear-gradient(135deg,rgba(99,102,241,.06),rgba(139,92,246,.03))}.ai-asset-analysis-page.theme-dark .radar-section .radar-card[data-v-0d0a10d6]:hover{border-color:rgba(99,102,241,.25);-webkit-box-shadow:0 8px 32px rgba(0,0,0,.4),0 0 0 1px rgba(99,102,241,.15);box-shadow:0 8px 32px rgba(0,0,0,.4),0 0 0 1px rgba(99,102,241,.15)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-symbol[data-v-0d0a10d6]{color:#f0f0f0}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-market[data-v-0d0a10d6]{background:hsla(0,0%,100%,.06);color:#888}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-market.rc-market-crypto[data-v-0d0a10d6]{color:#a78bfa;background:rgba(167,139,250,.12)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-market.rc-market-usstock[data-v-0d0a10d6]{color:#4ade80;background:rgba(74,222,128,.1)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-market.rc-market-forex[data-v-0d0a10d6]{color:#fbbf24;background:rgba(251,191,36,.1)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-market.rc-market-predictionmarket[data-v-0d0a10d6]{color:#22d3ee;background:rgba(34,211,238,.1)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric[data-v-0d0a10d6]{background:hsla(0,0%,100%,.03)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-label[data-v-0d0a10d6]{color:#666}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value[data-v-0d0a10d6]{color:#ddd}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value.rc-up[data-v-0d0a10d6]{color:#4ade80}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value.rc-down[data-v-0d0a10d6]{color:#f87171}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-bullish_momentum[data-v-0d0a10d6]{color:#22d3ee}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-overbought[data-v-0d0a10d6]{color:#fbbf24}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-oversold[data-v-0d0a10d6]{color:#4ade80}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-bearish_momentum[data-v-0d0a10d6]{color:#f87171}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-reason[data-v-0d0a10d6]{color:#555}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-cta[data-v-0d0a10d6]{color:#fff}.ai-asset-analysis-page.theme-dark .workspace-card[data-v-0d0a10d6]{background:#1c1c1c;border-color:#2a2a2a}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-bar{border-bottom-color:#2a2a2a}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-tab{color:#8b949e}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-tab:hover{color:#c9d1d9}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-tab-active{color:#a78bfa}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-ink-bar{background-color:#a78bfa}.ai-asset-analysis-page.theme-dark .workspace-card .polymarket-tab-content .polymarket-placeholder h3[data-v-0d0a10d6]{color:#d4d4d4}.ai-asset-analysis-page.theme-dark .workspace-card .polymarket-tab-content .polymarket-placeholder p[data-v-0d0a10d6]{color:#a3a3a3}@media (max-width:768px){.ai-asset-analysis-page[data-v-0d0a10d6]{padding:8px;min-height:auto}.ai-asset-analysis-page .radar-section[data-v-0d0a10d6]{margin-bottom:10px}.ai-asset-analysis-page .radar-section .radar-header[data-v-0d0a10d6]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;gap:8px}.ai-asset-analysis-page .radar-section .radar-header .radar-header-left .radar-title[data-v-0d0a10d6]{font-size:15px}.ai-asset-analysis-page .radar-section .radar-header .radar-header-left .radar-subtitle[data-v-0d0a10d6]{font-size:11px}.ai-asset-analysis-page .radar-section .radar-header .radar-refresh-btn[data-v-0d0a10d6]{-ms-flex-item-align:end;align-self:flex-end}.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]:after,.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]:before{width:28px}.ai-asset-analysis-page .radar-section .radar-card[data-v-0d0a10d6]{width:210px;padding:12px}.ai-asset-analysis-page .radar-section .radar-card.is-prediction[data-v-0d0a10d6]{width:248px}.ai-asset-analysis-page .radar-section .radar-card .rc-symbol[data-v-0d0a10d6]{font-size:14px}.ai-asset-analysis-page .radar-section .radar-card .rc-metric[data-v-0d0a10d6]{padding:6px}.ai-asset-analysis-page .qt-floating-btn[data-v-0d0a10d6]{right:max(8px,env(safe-area-inset-right,0px));bottom:max(68px,calc(52px + env(safe-area-inset-bottom, 0px)));width:44px;height:44px;font-size:20px}.ai-asset-analysis-page .workspace-card[data-v-0d0a10d6]{border-radius:10px}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-bar{padding:0 6px}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-nav-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-tab{font-size:14px;padding:10px 8px;margin-right:2px;white-space:nowrap}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content[data-v-0d0a10d6]{padding:16px 8px}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content .polymarket-placeholder .placeholder-icon[data-v-0d0a10d6]{font-size:48px;margin-bottom:12px}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content .polymarket-placeholder h3[data-v-0d0a10d6]{font-size:17px}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content .polymarket-placeholder p[data-v-0d0a10d6]{font-size:13px}}@media (max-width:480px){.ai-asset-analysis-page[data-v-0d0a10d6]{padding:4px}.ai-asset-analysis-page .radar-section .radar-card[data-v-0d0a10d6]{width:188px;padding:10px}.ai-asset-analysis-page .radar-section .radar-card.is-prediction[data-v-0d0a10d6]{width:220px}.ai-asset-analysis-page .radar-section .radar-card .rc-metrics[data-v-0d0a10d6]{gap:3px}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value[data-v-0d0a10d6]{font-size:12px}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-bar{padding:0 4px}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-tab{font-size:13px;padding:8px 6px}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content[data-v-0d0a10d6]{padding:12px 6px}} \ No newline at end of file diff --git a/frontend/dist/css/194.c5842a33.css b/frontend/dist/css/194.c5842a33.css new file mode 100644 index 0000000..e2abe12 --- /dev/null +++ b/frontend/dist/css/194.c5842a33.css @@ -0,0 +1 @@ +.drawer-toolbar[data-v-9c4d8af2]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:14px;-ms-flex-wrap:wrap;flex-wrap:wrap}.drawer-toolbar .toolbar-left[data-v-9c4d8af2],.drawer-toolbar .toolbar-right[data-v-9c4d8af2],.drawer-toolbar[data-v-9c4d8af2]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.selected-tip[data-v-9c4d8af2]{font-size:12px;color:#8c8c8c}.ai-modal-content[data-v-9c4d8af2]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:14px}.ai-meta-card[data-v-9c4d8af2]{border:1px solid #f0f0f0;border-radius:10px;padding:14px;background:#fafafa}.ai-meta-top[data-v-9c4d8af2]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px}.ai-meta-actions[data-v-9c4d8af2],.ai-meta-left[data-v-9c4d8af2],.ai-meta-top[data-v-9c4d8af2],.ai-run-tags[data-v-9c4d8af2]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap}.ai-meta-actions[data-v-9c4d8af2],.ai-meta-left[data-v-9c4d8af2],.ai-run-tags[data-v-9c4d8af2]{gap:8px}.ai-markdown-card[data-v-9c4d8af2]{border:1px solid #f0f0f0;border-radius:12px;padding:18px 20px;background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fcfcfc));background:linear-gradient(180deg,#fff,#fcfcfc);-webkit-box-shadow:0 6px 18px rgba(0,0,0,.04);box-shadow:0 6px 18px rgba(0,0,0,.04)}.ai-markdown-content[data-v-9c4d8af2]{color:#262626;font-size:14px;line-height:1.8}.ai-markdown-content[data-v-9c4d8af2] h1,.ai-markdown-content[data-v-9c4d8af2] h2,.ai-markdown-content[data-v-9c4d8af2] h3{margin:0 0 12px;font-weight:700;color:#1f1f1f;line-height:1.5}.ai-markdown-content[data-v-9c4d8af2] h1{font-size:20px}.ai-markdown-content[data-v-9c4d8af2] h2{font-size:17px}.ai-markdown-content[data-v-9c4d8af2] h3{font-size:15px;padding-left:10px;border-left:3px solid #1890ff}.ai-markdown-content[data-v-9c4d8af2] p{margin:0 0 12px;color:#434343}.ai-markdown-content[data-v-9c4d8af2] ol,.ai-markdown-content[data-v-9c4d8af2] ul{margin:0 0 14px 20px;padding:0}.ai-markdown-content[data-v-9c4d8af2] li{margin-bottom:8px;color:#434343}.ai-markdown-content[data-v-9c4d8af2] strong{color:#262626;font-weight:700}.ai-markdown-content[data-v-9c4d8af2] em{color:#595959}.ai-markdown-content[data-v-9c4d8af2] code{padding:2px 6px;border-radius:6px;background:#f5f5f5;color:#cf1322;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px}.ai-markdown-content[data-v-9c4d8af2] pre{overflow:auto;margin:0 0 14px;padding:14px;border-radius:10px;background:#141414;color:#f0f0f0}.ai-markdown-content[data-v-9c4d8af2] pre code{padding:0;background:transparent;color:inherit}.ai-markdown-content[data-v-9c4d8af2] blockquote{margin:0 0 14px;padding:10px 14px;border-left:4px solid #91d5ff;border-radius:0 8px 8px 0;background:#f0f7ff;color:#595959}.ai-result-content[data-v-9c4d8af2]{white-space:pre-wrap;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:13px;line-height:1.7;padding:8px 0}.backtest-history-drawer-wrap--dark .ant-drawer-content{background:#1f1f1f;color:hsla(0,0%,100%,.85)}.backtest-history-drawer-wrap--dark .ant-drawer-header{background:#1f1f1f;border-bottom-color:#303030}.backtest-history-drawer-wrap--dark .ant-drawer-title{color:hsla(0,0%,100%,.88)}.backtest-history-drawer-wrap--dark .ant-drawer-close{color:hsla(0,0%,100%,.55)}.backtest-history-drawer-wrap--dark .ant-drawer-body{background:#1f1f1f;color:hsla(0,0%,100%,.85)}.backtest-history-drawer-wrap--dark .drawer-toolbar .selected-tip{color:hsla(0,0%,100%,.55)}.backtest-history-drawer-wrap--dark .drawer-toolbar .ant-btn-primary.ant-btn-background-ghost{color:#69c0ff;border-color:#177ddc}.backtest-history-drawer-wrap--dark .drawer-toolbar .ant-btn-primary.ant-btn-background-ghost:focus:not(:disabled),.backtest-history-drawer-wrap--dark .drawer-toolbar .ant-btn-primary.ant-btn-background-ghost:hover:not(:disabled){color:#91d5ff;border-color:#3c9ae8}.backtest-history-drawer-wrap--dark .drawer-toolbar .ant-btn-primary.ant-btn-background-ghost:disabled{color:hsla(0,0%,100%,.25);border-color:#434343;background:transparent}.backtest-history-drawer-wrap--dark .ant-input,.backtest-history-drawer-wrap--dark .ant-select-selection,.backtest-history-drawer-wrap--dark .ant-select-selection--single{background:#141414!important;border-color:#434343!important;color:hsla(0,0%,100%,.88)!important}.backtest-history-drawer-wrap--dark .ant-input::-webkit-input-placeholder{color:hsla(0,0%,100%,.45)!important}.backtest-history-drawer-wrap--dark .ant-input::-moz-placeholder{color:hsla(0,0%,100%,.45)!important}.backtest-history-drawer-wrap--dark .ant-input:-ms-input-placeholder{color:hsla(0,0%,100%,.45)!important}.backtest-history-drawer-wrap--dark .ant-input::-ms-input-placeholder{color:hsla(0,0%,100%,.45)!important}.backtest-history-drawer-wrap--dark .ant-input::placeholder,.backtest-history-drawer-wrap--dark .ant-select-selection-placeholder,.backtest-history-drawer-wrap--dark .ant-select-selection-selected-value{color:hsla(0,0%,100%,.45)!important}.backtest-history-drawer-wrap--dark .ant-table{background:transparent;color:hsla(0,0%,100%,.85)}.backtest-history-drawer-wrap--dark .ant-table-thead>tr>th{background:hsla(0,0%,100%,.04);color:hsla(0,0%,100%,.65);border-bottom-color:#303030}.backtest-history-drawer-wrap--dark .ant-table-tbody>tr>td{background:transparent;color:hsla(0,0%,100%,.85);border-bottom-color:#303030}.backtest-history-drawer-wrap--dark .ant-table-tbody>tr:hover>td{background:hsla(0,0%,100%,.04)}.backtest-history-drawer-wrap--dark .ant-pagination-total-text{color:hsla(0,0%,100%,.65)}.backtest-history-drawer-wrap--dark .ant-pagination-item{background:#1f1f1f;border-color:#434343}.backtest-history-drawer-wrap--dark .ant-pagination-item a,.backtest-history-drawer-wrap--dark .ant-pagination-next .ant-pagination-item-link,.backtest-history-drawer-wrap--dark .ant-pagination-prev .ant-pagination-item-link{color:hsla(0,0%,100%,.65);background:#1f1f1f;border-color:#434343}.backtest-history-drawer-wrap--dark .ant-empty-description{color:hsla(0,0%,100%,.45)}.backtest-history-drawer-wrap--dark .ant-alert-warning{background:rgba(250,173,20,.12);border-color:rgba(250,173,20,.35)}.backtest-history-drawer-wrap--dark .ant-alert-warning .ant-alert-description,.backtest-history-drawer-wrap--dark .ant-alert-warning .ant-alert-message{color:hsla(0,0%,100%,.82)}.backtest-history-ai-modal--dark .ant-modal-body,.backtest-history-ai-modal--dark .ant-modal-content,.backtest-history-ai-modal--dark .ant-modal-footer,.backtest-history-ai-modal--dark .ant-modal-header{background:#1f1f1f}.backtest-history-ai-modal--dark .ant-modal-header{border-bottom-color:#303030}.backtest-history-ai-modal--dark .ai-markdown-content,.backtest-history-ai-modal--dark .ai-result-content,.backtest-history-ai-modal--dark .ant-modal-title{color:hsla(0,0%,100%,.88)}.backtest-history-ai-modal--dark .ant-modal-close{color:hsla(0,0%,100%,.55)}.backtest-history-ai-modal--dark .ai-meta-card{background:-webkit-gradient(linear,left top,left bottom,from(rgba(23,125,220,.08)),to(hsla(0,0%,100%,.02)));background:linear-gradient(180deg,rgba(23,125,220,.08),hsla(0,0%,100%,.02));border-color:rgba(23,125,220,.22)}.backtest-history-ai-modal--dark .ai-markdown-card{background:-webkit-gradient(linear,left top,left bottom,from(#171717),to(#141414));background:linear-gradient(180deg,#171717,#141414);border-color:#2f3540;-webkit-box-shadow:0 8px 24px rgba(0,0,0,.25);box-shadow:0 8px 24px rgba(0,0,0,.25)}.backtest-history-ai-modal--dark .ai-markdown-content{color:hsla(0,0%,100%,.82)}.backtest-history-ai-modal--dark .ai-markdown-content h1,.backtest-history-ai-modal--dark .ai-markdown-content h2,.backtest-history-ai-modal--dark .ai-markdown-content h3,.backtest-history-ai-modal--dark .ai-markdown-content strong{color:hsla(0,0%,100%,.92)}.backtest-history-ai-modal--dark .ai-markdown-content li,.backtest-history-ai-modal--dark .ai-markdown-content p{color:hsla(0,0%,100%,.72)}.backtest-history-ai-modal--dark .ai-markdown-content em{color:hsla(0,0%,100%,.6)}.backtest-history-ai-modal--dark .ai-markdown-content code{background:hsla(0,0%,100%,.08);color:#ff9c6e}.backtest-history-ai-modal--dark .ai-markdown-content blockquote{background:rgba(23,125,220,.08);border-left-color:rgba(23,125,220,.45);color:hsla(0,0%,100%,.68)}.backtest-run-viewer[data-v-1082877a] .ant-modal-body{padding:16px;max-height:70vh;overflow-y:auto}.metrics-cards[data-v-1082877a]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.metric-card[data-v-1082877a]{background:#fff;border:1px solid #f0f0f0;border-radius:8px;padding:12px}.metric-card.positive[data-v-1082877a]{border-color:rgba(82,196,26,.35)}.metric-card.negative[data-v-1082877a]{border-color:rgba(245,34,45,.35)}.metric-label[data-v-1082877a]{color:#8c8c8c;font-size:12px}.metric-value[data-v-1082877a]{font-size:18px;font-weight:600;margin-top:4px}.metric-amount[data-v-1082877a]{color:#8c8c8c;font-size:12px;margin-top:4px}.chart-section[data-v-1082877a]{margin-top:8px}.chart-title[data-v-1082877a]{font-weight:600;margin:8px 0;color:#262626}.equity-chart[data-v-1082877a]{width:100%;height:280px}.trades-section[data-v-1082877a]{margin-top:16px}.trade-detail-text[data-v-1082877a],.trade-time-text[data-v-1082877a]{color:inherit}.backtest-run-viewer-wrap--dark .ant-modal-body,.backtest-run-viewer-wrap--dark .ant-modal-content,.backtest-run-viewer-wrap--dark .ant-modal-footer,.backtest-run-viewer-wrap--dark .ant-modal-header{background:#1f1f1f}.backtest-run-viewer-wrap--dark .ant-modal-header{border-bottom-color:#303030}.backtest-run-viewer-wrap--dark .ant-modal-title,.backtest-run-viewer-wrap--dark .chart-title{color:hsla(0,0%,100%,.88)}.backtest-run-viewer-wrap--dark .ant-modal-close{color:hsla(0,0%,100%,.55)}.backtest-run-viewer-wrap--dark .metric-card{background:#141414;border-color:#303030}.backtest-run-viewer-wrap--dark .metric-amount,.backtest-run-viewer-wrap--dark .metric-label{color:hsla(0,0%,100%,.45)}.backtest-run-viewer-wrap--dark .metric-value{color:hsla(0,0%,100%,.88)}.backtest-run-viewer-wrap--dark .ant-alert{background:rgba(23,125,220,.08);border-color:rgba(23,125,220,.24)}.backtest-run-viewer-wrap--dark .ant-alert-warning{background:rgba(250,173,20,.12);border-color:rgba(250,173,20,.35)}.backtest-run-viewer-wrap--dark .ant-alert-description,.backtest-run-viewer-wrap--dark .ant-alert-message{color:hsla(0,0%,100%,.82)}.backtest-run-viewer-wrap--dark .ant-table{background:transparent;color:hsla(0,0%,100%,.85)}.backtest-run-viewer-wrap--dark .ant-table-thead>tr>th{background:hsla(0,0%,100%,.04);color:hsla(0,0%,100%,.65);border-bottom-color:#303030}.backtest-run-viewer-wrap--dark .ant-table-tbody>tr>td{background:transparent;color:hsla(0,0%,100%,.85);border-bottom-color:#303030}.backtest-run-viewer-wrap--dark .ant-table-tbody>tr:hover>td{background:hsla(0,0%,100%,.04)}.backtest-run-viewer-wrap--dark .ant-pagination-item{background:#1f1f1f;border-color:#434343}.backtest-run-viewer-wrap--dark .ant-pagination-item a,.backtest-run-viewer-wrap--dark .ant-pagination-next .ant-pagination-item-link,.backtest-run-viewer-wrap--dark .ant-pagination-prev .ant-pagination-item-link{color:hsla(0,0%,100%,.65);background:#1f1f1f;border-color:#434343}.backtest-center[data-v-1daf6ac6]{padding:20px;min-height:calc(100vh - 120px)}.page-header[data-v-1daf6ac6]{margin-bottom:16px}.page-header .page-title[data-v-1daf6ac6]{font-size:22px;font-weight:700;margin:0 0 2px;background:linear-gradient(135deg,#1e3a5f,#2d5a87);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px}.page-header .page-title .title-icon[data-v-1daf6ac6]{font-size:24px;-webkit-text-fill-color:#1890ff}.page-header .page-subtitle[data-v-1daf6ac6]{margin:0;font-size:13px;color:#8c8c8c}.main-tabs[data-v-1daf6ac6] .ant-tabs-bar{margin-bottom:14px;border-bottom:2px solid #f0f0f0}.main-tabs[data-v-1daf6ac6] .ant-tabs-tab{font-size:15px;font-weight:500;padding:10px 20px}.config-col .config-panel[data-v-1daf6ac6]{background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fcfdff));background:linear-gradient(180deg,#fff,#fcfdff);border-radius:16px;padding:18px;border:1px solid #eef2f7;-webkit-box-shadow:0 10px 30px rgba(31,41,55,.08);box-shadow:0 10px 30px rgba(31,41,55,.08);max-height:calc(100vh - 200px);overflow-y:auto}.config-col .config-panel[data-v-1daf6ac6]::-webkit-scrollbar{width:4px}.config-col .config-panel[data-v-1daf6ac6]::-webkit-scrollbar-thumb{background:#d9d9d9;border-radius:2px}.section[data-v-1daf6ac6]{margin-bottom:14px;padding:14px;border-radius:14px;border:1px solid #f0f3f8;background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fafcff));background:linear-gradient(180deg,#fff,#fafcff)}.section .section-title[data-v-1daf6ac6]{font-size:12px;font-weight:700;color:#445066;margin-bottom:10px;text-transform:uppercase;letter-spacing:.6px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.section .section-title .hint[data-v-1daf6ac6]{font-weight:400;color:#bfbfbf;font-size:11px;text-transform:none}.field-label[data-v-1daf6ac6]{font-size:12px;color:#6b7280;margin-bottom:6px;font-weight:500}.tf-group[data-v-1daf6ac6]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.tf-group[data-v-1daf6ac6] .ant-radio-button-wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1;text-align:center;min-width:36px;padding:0 6px}.date-presets[data-v-1daf6ac6]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:6px;-ms-flex-wrap:wrap;flex-wrap:wrap}.run-section[data-v-1daf6ac6]{margin-top:14px;padding-top:14px;border-top:1px dashed #e5e7eb}.strategy-info[data-v-1daf6ac6]{margin-top:6px}.strategy-summary-card[data-v-1daf6ac6]{margin-top:10px;padding:12px;border-radius:10px;background:-webkit-gradient(linear,left top,left bottom,from(#f7fbff),to(#f5f7fa));background:linear-gradient(180deg,#f7fbff,#f5f7fa);border:1px solid #e6f4ff}.strategy-summary-head[data-v-1daf6ac6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:8px}.strategy-summary-title[data-v-1daf6ac6]{font-size:14px;font-weight:600;color:#1f1f1f}.strategy-summary-meta[data-v-1daf6ac6]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:6px;margin-top:8px}.strategy-summary-text[data-v-1daf6ac6]{margin-top:8px;font-size:12px;color:#595959;line-height:1.6}.result-col .result-panel[data-v-1daf6ac6]{background:#fff;border-radius:12px;padding:24px;-webkit-box-shadow:0 2px 12px rgba(0,0,0,.06);box-shadow:0 2px 12px rgba(0,0,0,.06);min-height:500px}[data-v-1daf6ac6] .empty-result{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-height:450px}[data-v-1daf6ac6] .empty-result,[data-v-1daf6ac6] .empty-result .empty-icon{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}[data-v-1daf6ac6] .empty-result .empty-icon{width:100px;height:100px;border-radius:50%;background:linear-gradient(135deg,#e6f7ff,#f0f5ff);margin-bottom:24px;font-size:42px;color:#1890ff}[data-v-1daf6ac6] .empty-result h3{font-size:20px;font-weight:700;color:#333;margin-bottom:8px}[data-v-1daf6ac6] .empty-result p{font-size:14px;color:#8c8c8c;max-width:320px;text-align:center;line-height:1.6}[data-v-1daf6ac6] .running-overlay{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;min-height:450px}[data-v-1daf6ac6] .running-overlay .running-content{text-align:center;width:280px}[data-v-1daf6ac6] .running-spinner{width:64px;height:64px;margin:0 auto 20px;position:relative}[data-v-1daf6ac6] .running-spinner .spinner-track{position:absolute;inset:0;border-radius:50%;border:3px solid #f0f0f0}[data-v-1daf6ac6] .running-spinner .spinner-fill{position:absolute;inset:0;border-radius:50%;border:3px solid transparent;border-top-color:#1890ff;-webkit-animation:spin-1daf6ac6 1s linear infinite;animation:spin-1daf6ac6 1s linear infinite}@-webkit-keyframes spin-1daf6ac6{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin-1daf6ac6{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}[data-v-1daf6ac6] .running-title{font-size:17px;font-weight:700;color:#333;margin-bottom:4px}[data-v-1daf6ac6] .running-elapsed{font-size:24px;font-weight:300;color:#1890ff;margin-bottom:24px;font-variant-numeric:tabular-nums;letter-spacing:1px}[data-v-1daf6ac6] .running-steps{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px;text-align:left}[data-v-1daf6ac6] .running-steps .step-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px;padding:8px 14px;border-radius:8px;background:#fafafa;border:1px solid #f0f0f0;-webkit-transition:all .3s;transition:all .3s}[data-v-1daf6ac6] .running-steps .step-item .step-icon{font-size:16px;color:#d9d9d9;-ms-flex-negative:0;flex-shrink:0}[data-v-1daf6ac6] .running-steps .step-item .step-label{font-size:13px;color:#999}[data-v-1daf6ac6] .running-steps .step-item.active{background:#e6f7ff;border-color:#91d5ff}[data-v-1daf6ac6] .running-steps .step-item.active .step-icon{color:#1890ff;-webkit-animation:pulseIcon-1daf6ac6 1.2s ease-in-out infinite;animation:pulseIcon-1daf6ac6 1.2s ease-in-out infinite}[data-v-1daf6ac6] .running-steps .step-item.active .step-label{color:#1890ff;font-weight:600}[data-v-1daf6ac6] .running-steps .step-item.done{background:#f6ffed;border-color:#b7eb8f}[data-v-1daf6ac6] .running-steps .step-item.done .step-icon,[data-v-1daf6ac6] .running-steps .step-item.done .step-label{color:#52c41a}@-webkit-keyframes pulseIcon-1daf6ac6{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.15);transform:scale(1.15)}}@keyframes pulseIcon-1daf6ac6{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.15);transform:scale(1.15)}}[data-v-1daf6ac6] .result-content{padding:0}[data-v-1daf6ac6] .result-header{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:16px;gap:12px}[data-v-1daf6ac6] .result-header,[data-v-1daf6ac6] .result-header .result-header-left{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap}[data-v-1daf6ac6] .result-header .result-header-left{gap:10px}[data-v-1daf6ac6] .result-header .result-header-actions{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}[data-v-1daf6ac6] .result-header .result-tag{display:-webkit-box;display:-ms-flexbox;display:flex;gap:4px;-ms-flex-wrap:wrap;flex-wrap:wrap}[data-v-1daf6ac6] .result-header .run-id{font-size:12px;color:#999;font-variant-numeric:tabular-nums}[data-v-1daf6ac6] .metrics-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:24px}[data-v-1daf6ac6] .metric-card{background:#fafafa;border-radius:10px;padding:14px 12px;text-align:center;border:1px solid #f0f0f0;-webkit-transition:-webkit-transform .2s,-webkit-box-shadow .2s;transition:-webkit-transform .2s,-webkit-box-shadow .2s;transition:transform .2s,box-shadow .2s;transition:transform .2s,box-shadow .2s,-webkit-transform .2s,-webkit-box-shadow .2s}[data-v-1daf6ac6] .metric-card:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-box-shadow:0 4px 12px rgba(0,0,0,.08);box-shadow:0 4px 12px rgba(0,0,0,.08)}[data-v-1daf6ac6] .metric-card .metric-label{font-size:11px;color:#8c8c8c;margin-bottom:6px;text-transform:uppercase;letter-spacing:.3px}[data-v-1daf6ac6] .metric-card .metric-value{font-size:20px;font-weight:700;font-variant-numeric:tabular-nums;color:#333;line-height:1.2}[data-v-1daf6ac6] .metric-card .metric-sub{font-size:11px;color:#8c8c8c;margin-top:4px;font-variant-numeric:tabular-nums}[data-v-1daf6ac6] .metric-card.positive .metric-value{color:#52c41a}[data-v-1daf6ac6] .metric-card.negative .metric-value{color:#f5222d}[data-v-1daf6ac6] .chart-section{margin-bottom:24px}[data-v-1daf6ac6] .chart-section .chart-title{font-size:14px;font-weight:600;color:#333;margin-bottom:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}[data-v-1daf6ac6] .chart-section .equity-chart{width:100%;height:300px;border-radius:8px}[data-v-1daf6ac6] .trades-section .chart-title{font-size:14px;font-weight:600;color:#333;margin-bottom:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}[data-v-1daf6ac6] .result-ai-loading{padding:26px 0;text-align:center}[data-v-1daf6ac6] .result-ai-loading-text{margin-top:12px;color:#8c8c8c}[data-v-1daf6ac6] .result-ai-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:14px}[data-v-1daf6ac6] .result-ai-meta-card{border:1px solid #edf2f7;border-radius:12px;padding:14px;background:-webkit-gradient(linear,left top,left bottom,from(#fbfdff),to(#f7faff));background:linear-gradient(180deg,#fbfdff,#f7faff)}[data-v-1daf6ac6] .result-ai-meta-top{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px}[data-v-1daf6ac6] .result-ai-meta-actions,[data-v-1daf6ac6] .result-ai-meta-left,[data-v-1daf6ac6] .result-ai-meta-top{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap}[data-v-1daf6ac6] .result-ai-meta-actions,[data-v-1daf6ac6] .result-ai-meta-left{gap:8px}[data-v-1daf6ac6] .result-ai-markdown-card{border:1px solid #eef2f7;border-radius:12px;padding:18px 20px;background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fcfcfc));background:linear-gradient(180deg,#fff,#fcfcfc);-webkit-box-shadow:0 6px 18px rgba(0,0,0,.04);box-shadow:0 6px 18px rgba(0,0,0,.04)}[data-v-1daf6ac6] .result-ai-markdown-content{color:#262626;font-size:14px;line-height:1.8}[data-v-1daf6ac6] .result-ai-markdown-content/deep/h1,[data-v-1daf6ac6] .result-ai-markdown-content/deep/h2,[data-v-1daf6ac6] .result-ai-markdown-content/deep/h3{margin:0 0 12px;font-weight:700;color:#1f1f1f;line-height:1.5}[data-v-1daf6ac6] .result-ai-markdown-content/deep/h1{font-size:20px}[data-v-1daf6ac6] .result-ai-markdown-content/deep/h2{font-size:17px}[data-v-1daf6ac6] .result-ai-markdown-content/deep/h3{font-size:15px;padding-left:10px;border-left:3px solid #1890ff}[data-v-1daf6ac6] .result-ai-markdown-content/deep/p{margin:0 0 12px;color:#434343}[data-v-1daf6ac6] .result-ai-markdown-content/deep/ol,[data-v-1daf6ac6] .result-ai-markdown-content/deep/ul{margin:0 0 14px 20px;padding:0}[data-v-1daf6ac6] .result-ai-markdown-content/deep/li{margin-bottom:8px;color:#434343}[data-v-1daf6ac6] .result-ai-markdown-content/deep/strong{color:#262626;font-weight:700}[data-v-1daf6ac6] .result-ai-markdown-content/deep/em{color:#595959}[data-v-1daf6ac6] .result-ai-markdown-content/deep/code{padding:1px 6px;border-radius:6px;background:#f5f5f5;color:#cf1322;font-size:13px}[data-v-1daf6ac6] .result-ai-markdown-content/deep/pre{margin:0 0 14px;padding:12px 14px;border-radius:10px;background:#141414;overflow-x:auto}[data-v-1daf6ac6] .result-ai-markdown-content/deep/pre code{padding:0;background:transparent;color:hsla(0,0%,100%,.88)}[data-v-1daf6ac6] .result-ai-markdown-content/deep/blockquote{margin:0 0 14px;padding:10px 14px;border-left:3px solid #91d5ff;background:#f5fbff;color:#595959}[data-v-1daf6ac6] .result-ai-empty{padding:20px 0 8px;text-align:center;color:#8c8c8c}.add-item-active[data-v-1daf6ac6]{background:#e6f7ff!important}.theme-dark[data-v-1daf6ac6]{background:#141414}.theme-dark .page-header .page-title[data-v-1daf6ac6]{background:linear-gradient(135deg,#e0e6ed,#c5ccd6);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.theme-dark .page-header .page-title .title-icon[data-v-1daf6ac6]{-webkit-text-fill-color:unset;color:#40a9ff!important;background:none;-webkit-background-clip:unset;background-clip:unset}.theme-dark .page-header .page-subtitle[data-v-1daf6ac6]{color:hsla(0,0%,100%,.45)}.theme-dark .main-tabs[data-v-1daf6ac6] .ant-tabs-bar{border-bottom-color:#303030}.theme-dark .main-tabs[data-v-1daf6ac6] .ant-tabs-tab{color:hsla(0,0%,100%,.65)}.theme-dark .main-tabs[data-v-1daf6ac6] .ant-tabs-tab:hover{color:#fff}.theme-dark .main-tabs[data-v-1daf6ac6] .ant-tabs-tab-active{color:#177ddc!important}.theme-dark .main-tabs[data-v-1daf6ac6] .ant-tabs-ink-bar{background:#177ddc}.theme-dark .config-panel[data-v-1daf6ac6]{background:-webkit-gradient(linear,left top,left bottom,from(#1f1f1f),to(#191919));background:linear-gradient(180deg,#1f1f1f,#191919);border-color:#2f3540;-webkit-box-shadow:0 10px 30px rgba(0,0,0,.35);box-shadow:0 10px 30px rgba(0,0,0,.35)}.theme-dark .config-panel[data-v-1daf6ac6]::-webkit-scrollbar-thumb{background:#434343}.theme-dark .section[data-v-1daf6ac6]{background:-webkit-gradient(linear,left top,left bottom,from(hsla(0,0%,100%,.02)),to(hsla(0,0%,100%,.01)));background:linear-gradient(180deg,hsla(0,0%,100%,.02),hsla(0,0%,100%,.01));border-color:#2d323b}.theme-dark .section .section-title[data-v-1daf6ac6]{color:hsla(0,0%,100%,.78)}.theme-dark .section .section-title .hint[data-v-1daf6ac6]{color:hsla(0,0%,100%,.35)}.theme-dark .field-label[data-v-1daf6ac6]{color:hsla(0,0%,100%,.58)}.theme-dark[data-v-1daf6ac6] .ant-select .ant-select-selection{background:#141414;border-color:#434343;color:hsla(0,0%,100%,.85)}.theme-dark[data-v-1daf6ac6] .ant-select .ant-select-selection .ant-select-arrow{color:hsla(0,0%,100%,.45)}.theme-dark[data-v-1daf6ac6] .ant-select .ant-select-selection:hover{border-color:#177ddc}.theme-dark[data-v-1daf6ac6] .ant-select-selection__placeholder{color:hsla(0,0%,100%,.35)}.theme-dark[data-v-1daf6ac6] .ant-input,.theme-dark[data-v-1daf6ac6] .ant-input-number{background:#141414;border-color:#434343;color:hsla(0,0%,100%,.85)}.theme-dark[data-v-1daf6ac6] .ant-input-number:focus,.theme-dark[data-v-1daf6ac6] .ant-input-number:hover,.theme-dark[data-v-1daf6ac6] .ant-input:focus,.theme-dark[data-v-1daf6ac6] .ant-input:hover{border-color:#177ddc}.theme-dark[data-v-1daf6ac6] .ant-input-number-handler-wrap{background:#1f1f1f;border-left-color:#434343}.theme-dark[data-v-1daf6ac6] .ant-input-number-handler{color:hsla(0,0%,100%,.45)}.theme-dark[data-v-1daf6ac6] .ant-input-number-handler:hover{color:#177ddc}.theme-dark[data-v-1daf6ac6] .ant-calendar-picker-input{background:#141414;border-color:#434343;color:hsla(0,0%,100%,.85)}.theme-dark[data-v-1daf6ac6] .ant-calendar-picker-icon{color:hsla(0,0%,100%,.45)}.theme-dark[data-v-1daf6ac6] .ant-radio-button-wrapper{background:#141414;border-color:#434343;color:hsla(0,0%,100%,.65)}.theme-dark[data-v-1daf6ac6] .ant-radio-button-wrapper:hover{color:#177ddc}.theme-dark[data-v-1daf6ac6] .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#177ddc;border-color:#177ddc;color:#fff}.theme-dark[data-v-1daf6ac6] .ant-checkbox-wrapper{color:hsla(0,0%,100%,.85)}.theme-dark[data-v-1daf6ac6] .ant-checkbox-inner{background:#141414;border-color:#434343}.theme-dark[data-v-1daf6ac6] .ant-btn-default{background:#1f1f1f;border-color:#434343;color:hsla(0,0%,100%,.65)}.theme-dark[data-v-1daf6ac6] .ant-btn-default:hover{border-color:#177ddc;color:#177ddc}.theme-dark .run-section[data-v-1daf6ac6]{border-top-color:#303030}.theme-dark .strategy-summary-card[data-v-1daf6ac6]{background:-webkit-gradient(linear,left top,left bottom,from(rgba(23,125,220,.12)),to(hsla(0,0%,100%,.03)));background:linear-gradient(180deg,rgba(23,125,220,.12),hsla(0,0%,100%,.03));border-color:rgba(23,125,220,.22)}.theme-dark .strategy-summary-title[data-v-1daf6ac6]{color:hsla(0,0%,100%,.92)}.theme-dark .strategy-summary-text[data-v-1daf6ac6]{color:hsla(0,0%,100%,.65)}.theme-dark .result-panel[data-v-1daf6ac6]{background:#1f1f1f;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.45);box-shadow:0 2px 8px rgba(0,0,0,.45)}.theme-dark[data-v-1daf6ac6] .running-spinner .spinner-track{border-color:#303030}.theme-dark[data-v-1daf6ac6] .running-spinner .spinner-fill{border-top-color:#177ddc}.theme-dark[data-v-1daf6ac6] .running-title{color:hsla(0,0%,100%,.85)}.theme-dark[data-v-1daf6ac6] .running-elapsed{color:#177ddc}.theme-dark[data-v-1daf6ac6] .running-steps .step-item{background:#141414;border-color:#303030}.theme-dark[data-v-1daf6ac6] .running-steps .step-item .step-icon{color:hsla(0,0%,100%,.38)}.theme-dark[data-v-1daf6ac6] .running-steps .step-item .step-label{color:hsla(0,0%,100%,.35)}.theme-dark[data-v-1daf6ac6] .running-steps .step-item.active{background:rgba(23,125,220,.1);border-color:rgba(23,125,220,.3)}.theme-dark[data-v-1daf6ac6] .running-steps .step-item.active .step-icon,.theme-dark[data-v-1daf6ac6] .running-steps .step-item.active .step-label{color:#177ddc}.theme-dark[data-v-1daf6ac6] .running-steps .step-item.done{background:rgba(73,170,25,.08);border-color:rgba(73,170,25,.25)}.theme-dark[data-v-1daf6ac6] .running-steps .step-item.done .step-icon,.theme-dark[data-v-1daf6ac6] .running-steps .step-item.done .step-label{color:#49aa19}.theme-dark[data-v-1daf6ac6] .running-steps .step-item .step-icon .anticon{color:inherit!important}.theme-dark[data-v-1daf6ac6] .result-header-actions .ant-btn.ant-btn-primary.ant-btn-background-ghost .anticon{color:#177ddc}.theme-dark[data-v-1daf6ac6] .empty-result .empty-icon{background:linear-gradient(135deg,rgba(23,125,220,.15),rgba(23,125,220,.08));color:#177ddc}.theme-dark[data-v-1daf6ac6] .empty-result h3{color:hsla(0,0%,100%,.85)}.theme-dark[data-v-1daf6ac6] .empty-result p,.theme-dark[data-v-1daf6ac6] .result-ai-loading-text,.theme-dark[data-v-1daf6ac6] .result-header .run-id{color:hsla(0,0%,100%,.45)}.theme-dark[data-v-1daf6ac6] .result-ai-meta-card{background:-webkit-gradient(linear,left top,left bottom,from(rgba(23,125,220,.08)),to(hsla(0,0%,100%,.02)));background:linear-gradient(180deg,rgba(23,125,220,.08),hsla(0,0%,100%,.02));border-color:rgba(23,125,220,.22)}.theme-dark[data-v-1daf6ac6] .result-ai-markdown-card{background:-webkit-gradient(linear,left top,left bottom,from(#171717),to(#141414));background:linear-gradient(180deg,#171717,#141414);border-color:#2f3540;-webkit-box-shadow:0 8px 24px rgba(0,0,0,.25);box-shadow:0 8px 24px rgba(0,0,0,.25)}.theme-dark[data-v-1daf6ac6] .result-ai-markdown-content{color:hsla(0,0%,100%,.82)}.theme-dark[data-v-1daf6ac6] .result-ai-markdown-content/deep/h1,.theme-dark[data-v-1daf6ac6] .result-ai-markdown-content/deep/h2,.theme-dark[data-v-1daf6ac6] .result-ai-markdown-content/deep/h3{color:hsla(0,0%,100%,.92)}.theme-dark[data-v-1daf6ac6] .result-ai-markdown-content/deep/li,.theme-dark[data-v-1daf6ac6] .result-ai-markdown-content/deep/p{color:hsla(0,0%,100%,.72)}.theme-dark[data-v-1daf6ac6] .result-ai-markdown-content/deep/strong{color:hsla(0,0%,100%,.92)}.theme-dark[data-v-1daf6ac6] .result-ai-markdown-content/deep/em{color:hsla(0,0%,100%,.62)}.theme-dark[data-v-1daf6ac6] .result-ai-markdown-content/deep/code{background:hsla(0,0%,100%,.08);color:#ff9c6e}.theme-dark[data-v-1daf6ac6] .result-ai-markdown-content/deep/blockquote{background:rgba(23,125,220,.08);color:hsla(0,0%,100%,.68);border-left-color:rgba(23,125,220,.45)}.theme-dark[data-v-1daf6ac6] .result-ai-empty{color:hsla(0,0%,100%,.45)}.theme-dark[data-v-1daf6ac6] .metric-card{background:#141414;border-color:#303030}.theme-dark[data-v-1daf6ac6] .metric-card:hover{-webkit-box-shadow:0 4px 12px rgba(0,0,0,.4);box-shadow:0 4px 12px rgba(0,0,0,.4)}.theme-dark[data-v-1daf6ac6] .metric-card .metric-label{color:hsla(0,0%,100%,.45)}.theme-dark[data-v-1daf6ac6] .metric-card .metric-value{color:hsla(0,0%,100%,.85)}.theme-dark[data-v-1daf6ac6] .metric-card .metric-sub{color:hsla(0,0%,100%,.35)}.theme-dark[data-v-1daf6ac6] .metric-card.positive .metric-value{color:#49aa19}.theme-dark[data-v-1daf6ac6] .metric-card.negative .metric-value{color:#d32029}.theme-dark[data-v-1daf6ac6] .chart-section .chart-title,.theme-dark[data-v-1daf6ac6] .trades-section .chart-title{color:hsla(0,0%,100%,.85)}.theme-dark[data-v-1daf6ac6] .ant-table{background:transparent;color:hsla(0,0%,100%,.85)}.theme-dark[data-v-1daf6ac6] .ant-table .ant-table-thead>tr>th{background:hsla(0,0%,100%,.04);color:hsla(0,0%,100%,.65);border-bottom-color:#303030}.theme-dark[data-v-1daf6ac6] .ant-table .ant-table-tbody>tr>td{border-bottom-color:#303030}.theme-dark[data-v-1daf6ac6] .ant-table .ant-table-tbody>tr:hover>td{background:hsla(0,0%,100%,.04)}.theme-dark[data-v-1daf6ac6] .ant-table .ant-table-placeholder{background:transparent;color:hsla(0,0%,100%,.35)}.theme-dark[data-v-1daf6ac6] .ant-pagination .ant-pagination-total-text{color:hsla(0,0%,100%,.65)}.theme-dark[data-v-1daf6ac6] .ant-pagination .ant-pagination-item{background:#1f1f1f;border-color:#434343}.theme-dark[data-v-1daf6ac6] .ant-pagination .ant-pagination-item a{color:hsla(0,0%,100%,.65)}.theme-dark[data-v-1daf6ac6] .ant-pagination .ant-pagination-item.ant-pagination-item-active{border-color:#177ddc}.theme-dark[data-v-1daf6ac6] .ant-pagination .ant-pagination-item.ant-pagination-item-active a{color:#177ddc}.theme-dark[data-v-1daf6ac6] .ant-pagination .ant-pagination-next .ant-pagination-item-link,.theme-dark[data-v-1daf6ac6] .ant-pagination .ant-pagination-prev .ant-pagination-item-link{background:#1f1f1f;border-color:#434343;color:hsla(0,0%,100%,.45)}.theme-dark[data-v-1daf6ac6] .ant-empty-description{color:hsla(0,0%,100%,.35)}.theme-dark[data-v-1daf6ac6] .ant-empty-image svg{fill:hsla(0,0%,100%,.1)}.theme-dark[data-v-1daf6ac6] .empty-icon .anticon{color:#177ddc!important}.bc-modal-wrap--dark .ant-modal-content{background:#1f1f1f;-webkit-box-shadow:0 8px 32px rgba(0,0,0,.55);box-shadow:0 8px 32px rgba(0,0,0,.55)}.bc-modal-wrap--dark .ant-modal-header{background:#1f1f1f;border-bottom-color:#303030}.bc-modal-wrap--dark .ant-modal-title{color:hsla(0,0%,100%,.88)}.bc-modal-wrap--dark .ant-modal-close{color:hsla(0,0%,100%,.55)}.bc-modal-wrap--dark .ant-modal-close:hover{color:hsla(0,0%,100%,.88)}.bc-modal-wrap--dark .ant-modal-body{background:#1f1f1f;color:hsla(0,0%,100%,.85)}.bc-modal-wrap--dark .ant-modal-footer{background:#1f1f1f;border-top-color:#303030}.bc-modal-wrap--dark .ant-tabs-bar{border-bottom-color:#303030}.bc-modal-wrap--dark .ant-tabs-tab{color:hsla(0,0%,100%,.55)}.bc-modal-wrap--dark .ant-tabs-tab:hover{color:hsla(0,0%,100%,.85)}.bc-modal-wrap--dark .ant-tabs-tab-active{color:#177ddc!important}.bc-modal-wrap--dark .ant-input-search .ant-input{background:#141414;border-color:#434343;color:hsla(0,0%,100%,.88)}.bc-modal-wrap--dark .ant-input-search .ant-input:focus,.bc-modal-wrap--dark .ant-input-search .ant-input:hover{border-color:#177ddc}.bc-modal-wrap--dark .ant-input-search-icon{color:hsla(0,0%,100%,.45)}.bc-modal-wrap--dark .ant-list-item{color:hsla(0,0%,100%,.85);border-bottom-color:#303030}.bc-modal-wrap--dark .ant-list-item:hover{background:hsla(0,0%,100%,.04)} \ No newline at end of file diff --git a/frontend/dist/css/230.2035e6e3.css b/frontend/dist/css/230.2035e6e3.css new file mode 100644 index 0000000..a2fe643 --- /dev/null +++ b/frontend/dist/css/230.2035e6e3.css @@ -0,0 +1 @@ +.trading-records[data-v-bdf54cd6]{width:100%;min-height:300px;padding:0;overflow-x:visible;overflow-y:visible}.trading-records .empty-state[data-v-bdf54cd6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;min-height:220px;padding:40px 16px;border-radius:8px;background:#fafafa;border:1px solid #f0f0f0}.trading-records.theme-dark .empty-state[data-v-bdf54cd6]{background:#141414;border-color:hsla(0,0%,100%,.08)}.trading-records[data-v-bdf54cd6] .ant-spin-container,.trading-records[data-v-bdf54cd6] .ant-spin-nested-loading{overflow-x:visible}.trading-records[data-v-bdf54cd6] .ant-table-wrapper{overflow-x:visible;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.trading-records[data-v-bdf54cd6] .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.trading-records[data-v-bdf54cd6] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.trading-records[data-v-bdf54cd6] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.trading-records[data-v-bdf54cd6] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.trading-records[data-v-bdf54cd6] .ant-table{font-size:13px;color:#333}.trading-records[data-v-bdf54cd6] .ant-table-container{overflow-x:visible}.trading-records[data-v-bdf54cd6] .ant-table-body{overflow-x:auto;overflow-y:visible;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.trading-records[data-v-bdf54cd6] .ant-table-body::-webkit-scrollbar{height:6px;width:6px}.trading-records[data-v-bdf54cd6] .ant-table-body::-webkit-scrollbar-track{background:transparent;border-radius:3px}.trading-records[data-v-bdf54cd6] .ant-table-body::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.trading-records[data-v-bdf54cd6] .ant-table-body::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.trading-records[data-v-bdf54cd6] .ant-table-container{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.trading-records[data-v-bdf54cd6] .ant-table-container::-webkit-scrollbar{height:6px;width:6px}.trading-records[data-v-bdf54cd6] .ant-table-container::-webkit-scrollbar-track{background:transparent;border-radius:3px}.trading-records[data-v-bdf54cd6] .ant-table-container::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.trading-records[data-v-bdf54cd6] .ant-table-container::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.trading-records[data-v-bdf54cd6] .ant-table-content{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.trading-records[data-v-bdf54cd6] .ant-table-content::-webkit-scrollbar{height:6px;width:6px}.trading-records[data-v-bdf54cd6] .ant-table-content::-webkit-scrollbar-track{background:transparent;border-radius:3px}.trading-records[data-v-bdf54cd6] .ant-table-content::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.trading-records[data-v-bdf54cd6] .ant-table-content::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.trading-records[data-v-bdf54cd6] .ant-table-tbody>tr>td,.trading-records[data-v-bdf54cd6] .ant-table-thead>tr>th{white-space:nowrap}.trading-records[data-v-bdf54cd6] .ant-table-thead>tr>th{background:-webkit-gradient(linear,left top,left bottom,from(#f8fafc),to(#f1f5f9));background:linear-gradient(180deg,#f8fafc,#f1f5f9);font-weight:600;color:#475569;border-bottom:2px solid #e2e8f0;padding:12px 16px;font-size:13px}.trading-records[data-v-bdf54cd6] .ant-table-tbody>tr>td{padding:12px 16px;color:#334155;border-bottom:1px solid #f1f5f9;-webkit-transition:background .2s ease;transition:background .2s ease}.trading-records[data-v-bdf54cd6] .ant-table-tbody>tr:hover>td{background:#f0f7ff!important}.trading-records[data-v-bdf54cd6] .ant-tag{border-radius:6px;padding:3px 10px;font-weight:600;font-size:11px;border:none;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-records[data-v-bdf54cd6] .ant-tag[color=cyan],.trading-records[data-v-bdf54cd6] .ant-tag[color=green],.trading-records[data-v-bdf54cd6] .ant-tag[color=lime]{background:linear-gradient(135deg,rgba(14,203,129,.15),rgba(14,203,129,.08));color:#0ecb81;border:1px solid rgba(14,203,129,.3)}.trading-records[data-v-bdf54cd6] .ant-tag[color=magenta],.trading-records[data-v-bdf54cd6] .ant-tag[color=red]{background:linear-gradient(135deg,rgba(246,70,93,.15),rgba(246,70,93,.08));color:#f6465d;border:1px solid rgba(246,70,93,.3)}.trading-records[data-v-bdf54cd6] .ant-tag[color=orange]{background:linear-gradient(135deg,rgba(250,173,20,.15),rgba(250,173,20,.08));color:#d48806;border:1px solid rgba(250,173,20,.3)}.trading-records[data-v-bdf54cd6] .ant-tag[color=blue]{background:linear-gradient(135deg,rgba(24,144,255,.15),rgba(24,144,255,.08));color:#1890ff;border:1px solid rgba(24,144,255,.3)}.trading-records[data-v-bdf54cd6] .ant-pagination{margin-top:16px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-item{border-radius:8px;border:1px solid #e2e8f0;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-item:hover{border-color:#1890ff}.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-item:hover a{color:#1890ff}.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-item.ant-pagination-item-active{background:linear-gradient(135deg,#1890ff,#40a9ff);border-color:#1890ff}.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-item.ant-pagination-item-active a{color:#fff}.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-next .ant-pagination-item-link,.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-prev .ant-pagination-item-link{border-radius:8px;border:1px solid #e2e8f0;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-next .ant-pagination-item-link:hover,.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-prev .ant-pagination-item-link:hover{border-color:#1890ff;color:#1890ff}.theme-dark .trading-records[data-v-bdf54cd6] .ant-table,.trading-records.theme-dark[data-v-bdf54cd6] .ant-table{background:#1c1c1c!important;color:#d1d4dc!important}.theme-dark .trading-records[data-v-bdf54cd6] .ant-table-thead>tr>th,.trading-records.theme-dark[data-v-bdf54cd6] .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important;font-weight:600}.theme-dark .trading-records[data-v-bdf54cd6] .ant-table-tbody>tr>td,.trading-records.theme-dark[data-v-bdf54cd6] .ant-table-tbody>tr>td{background:#1c1c1c!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records[data-v-bdf54cd6] .ant-table-tbody>tr:hover>td,.trading-records.theme-dark[data-v-bdf54cd6] .ant-table-tbody>tr:hover>td{background:#2a2e39!important}.theme-dark .trading-records[data-v-bdf54cd6] .ant-table-tbody>tr>td span,.trading-records.theme-dark[data-v-bdf54cd6] .ant-table-tbody>tr>td span{color:#d1d4dc!important}.theme-dark .trading-records[data-v-bdf54cd6] .ant-empty .ant-empty-description,.trading-records.theme-dark[data-v-bdf54cd6] .ant-empty .ant-empty-description{color:hsla(0,0%,100%,.35)}.trading-records[data-v-bdf54cd6] .ant-table-tbody>tr:hover>td{background:#fafafa}@media (max-width:768px){.trading-records[data-v-bdf54cd6]{min-height:200px;overflow-x:visible}.trading-records[data-v-bdf54cd6] .ant-table{font-size:12px}.trading-records[data-v-bdf54cd6] .ant-table-body,.trading-records[data-v-bdf54cd6] .ant-table-container,.trading-records[data-v-bdf54cd6] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.trading-records[data-v-bdf54cd6] .ant-table-body::-webkit-scrollbar,.trading-records[data-v-bdf54cd6] .ant-table-container::-webkit-scrollbar,.trading-records[data-v-bdf54cd6] .ant-table-wrapper::-webkit-scrollbar{height:4px;width:4px}.trading-records[data-v-bdf54cd6] .ant-table-body::-webkit-scrollbar-track,.trading-records[data-v-bdf54cd6] .ant-table-container::-webkit-scrollbar-track,.trading-records[data-v-bdf54cd6] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:2px}.trading-records[data-v-bdf54cd6] .ant-table-body::-webkit-scrollbar-thumb,.trading-records[data-v-bdf54cd6] .ant-table-container::-webkit-scrollbar-thumb,.trading-records[data-v-bdf54cd6] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:2px}.trading-records[data-v-bdf54cd6] .ant-table-body::-webkit-scrollbar-thumb:hover,.trading-records[data-v-bdf54cd6] .ant-table-container::-webkit-scrollbar-thumb:hover,.trading-records[data-v-bdf54cd6] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.trading-records[data-v-bdf54cd6] .ant-table-tbody>tr>td,.trading-records[data-v-bdf54cd6] .ant-table-thead>tr>th{padding:8px 10px;font-size:11px;white-space:nowrap}.trading-records[data-v-bdf54cd6] .ant-pagination{margin-top:12px;text-align:center}.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-item,.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-next,.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-prev{margin:0 2px;min-width:28px;height:28px;line-height:26px;font-size:12px}}@media (max-width:480px){.trading-records[data-v-bdf54cd6] .ant-table{font-size:11px}.trading-records[data-v-bdf54cd6] .ant-table-tbody>tr>td,.trading-records[data-v-bdf54cd6] .ant-table-thead>tr>th{padding:6px 8px;font-size:10px}}.theme-dark .trading-records .ant-table-tbody>tr>td,.theme-dark .trading-records[data-v] .ant-table-tbody>tr>td,body.dark .trading-records .ant-table-tbody>tr>td,body.realdark .trading-records .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1c1c1c!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records .ant-table-thead>tr>th,.theme-dark .trading-records[data-v] .ant-table-thead>tr>th,body.dark .trading-records .ant-table-thead>tr>th,body.realdark .trading-records .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important;font-weight:600!important}.theme-dark .trading-records .ant-table,.theme-dark .trading-records[data-v] .ant-table,body.dark .trading-records .ant-table,body.realdark .trading-records .ant-table{background:#1c1c1c!important;color:#d1d4dc!important}.theme-dark .trading-records .ant-table-tbody>tr>td *,.theme-dark .trading-records[data-v] .ant-table-tbody>tr>td *,body.dark .trading-records .ant-table-tbody>tr>td *,body.realdark .trading-records .ant-table-tbody>tr>td *{color:#d1d4dc!important}.theme-dark .trading-records .ant-table-tbody>tr:hover>td,.theme-dark .trading-records[data-v] .ant-table-tbody>tr:hover>td,body.dark .trading-records .ant-table-tbody>tr:hover>td,body.realdark .trading-records .ant-table-tbody>tr:hover>td{background:#2a2e39!important}.theme-dark .trading-records .ant-table-thead>tr>th .ant-table-column-title,.theme-dark .trading-records[data-v] .ant-table-thead>tr>th .ant-table-column-title,body.dark .trading-records .ant-table-thead>tr>th .ant-table-column-title,body.realdark .trading-records .ant-table-thead>tr>th .ant-table-column-title{color:#d1d4dc!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-table-tbody>tr:hover>td{background:#2a2e39!important}body.dark .trading-records[data-v-8a68b65a] .ant-table-tbody>tr>td,body.realdark .trading-records[data-v-8a68b65a] .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1c1c1c!important;border-bottom-color:#363c4e!important}body.dark .trading-records[data-v-8a68b65a] .ant-table-thead>tr>th,body.realdark .trading-records[data-v-8a68b65a] .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records[data-v] .ant-table-tbody>tr>td,body.dark .trading-records[data-v] .ant-table-tbody>tr>td,body.realdark .trading-records[data-v] .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1c1c1c!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records[data-v] .ant-table-thead>tr>th,body.dark .trading-records[data-v] .ant-table-thead>tr>th,body.realdark .trading-records[data-v] .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item{background:#1c1c1c!important;border-color:#363c4e!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item a,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item a,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item a{color:#d1d4dc!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover{border-color:#1890ff!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover a,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover a,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover a{color:#1890ff!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item-active,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item-active,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item-active{background:#1890ff!important;border-color:#1890ff!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item-active a,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item-active a,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item-active a{color:#fff!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-next .ant-pagination-item-link,.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-prev .ant-pagination-item-link,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-next .ant-pagination-item-link,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-prev .ant-pagination-item-link,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-next .ant-pagination-item-link,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-prev .ant-pagination-item-link{background:#1c1c1c!important;border-color:#363c4e!important;color:#d1d4dc!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-next:hover .ant-pagination-item-link,.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-prev:hover .ant-pagination-item-link,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-next:hover .ant-pagination-item-link,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-prev:hover .ant-pagination-item-link,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-next:hover .ant-pagination-item-link,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-prev:hover .ant-pagination-item-link{border-color:#1890ff!important;color:#1890ff!important}.theme-dark .trading-records[data-v] .ant-pagination-item,body.dark .trading-records[data-v] .ant-pagination-item,body.realdark .trading-records[data-v] .ant-pagination-item{background:#1c1c1c!important;border-color:#363c4e!important}.theme-dark .trading-records[data-v] .ant-pagination-item a,body.dark .trading-records[data-v] .ant-pagination-item a,body.realdark .trading-records[data-v] .ant-pagination-item a{color:#d1d4dc!important}.theme-dark .trading-records[data-v] .ant-pagination-item:hover,body.dark .trading-records[data-v] .ant-pagination-item:hover,body.realdark .trading-records[data-v] .ant-pagination-item:hover{border-color:#1890ff!important}.theme-dark .trading-records[data-v] .ant-pagination-item:hover a,body.dark .trading-records[data-v] .ant-pagination-item:hover a,body.realdark .trading-records[data-v] .ant-pagination-item:hover a{color:#1890ff!important}.theme-dark .trading-records[data-v] .ant-pagination-item-active,body.dark .trading-records[data-v] .ant-pagination-item-active,body.realdark .trading-records[data-v] .ant-pagination-item-active{background:#1890ff!important;border-color:#1890ff!important}.theme-dark .trading-records[data-v] .ant-pagination-item-active a,body.dark .trading-records[data-v] .ant-pagination-item-active a,body.realdark .trading-records[data-v] .ant-pagination-item-active a{color:#fff!important}.theme-dark .trading-records[data-v] .ant-pagination-next .ant-pagination-item-link,.theme-dark .trading-records[data-v] .ant-pagination-prev .ant-pagination-item-link,body.dark .trading-records[data-v] .ant-pagination-next .ant-pagination-item-link,body.dark .trading-records[data-v] .ant-pagination-prev .ant-pagination-item-link,body.realdark .trading-records[data-v] .ant-pagination-next .ant-pagination-item-link,body.realdark .trading-records[data-v] .ant-pagination-prev .ant-pagination-item-link{background:#1c1c1c!important;border-color:#363c4e!important;color:#d1d4dc!important}.theme-dark .trading-records[data-v] .ant-pagination-next:hover .ant-pagination-item-link,.theme-dark .trading-records[data-v] .ant-pagination-prev:hover .ant-pagination-item-link,body.dark .trading-records[data-v] .ant-pagination-next:hover .ant-pagination-item-link,body.dark .trading-records[data-v] .ant-pagination-prev:hover .ant-pagination-item-link,body.realdark .trading-records[data-v] .ant-pagination-next:hover .ant-pagination-item-link,body.realdark .trading-records[data-v] .ant-pagination-prev:hover .ant-pagination-item-link{border-color:#1890ff!important;color:#1890ff!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-table-body,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-container,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-content,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-wrapper,body.dark .trading-records[data-v-8a68b65a] .ant-table-body,body.dark .trading-records[data-v-8a68b65a] .ant-table-container,body.dark .trading-records[data-v-8a68b65a] .ant-table-content,body.dark .trading-records[data-v-8a68b65a] .ant-table-wrapper,body.realdark .trading-records[data-v-8a68b65a] .ant-table-body,body.realdark .trading-records[data-v-8a68b65a] .ant-table-container,body.realdark .trading-records[data-v-8a68b65a] .ant-table-content,body.realdark .trading-records[data-v-8a68b65a] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(209,212,220,.3) transparent}.theme-dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar,body.dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar,body.dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar,body.dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar,body.dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar,body.realdark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar,body.realdark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar,body.realdark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar,body.realdark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.theme-dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-track,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-track,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-track,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-track,body.dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-track,body.dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-track,body.dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-track,body.dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-track,body.realdark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-track,body.realdark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-track,body.realdark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-track,body.realdark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.theme-dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-thumb,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-thumb,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-thumb,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-thumb,body.dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-thumb,body.dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-thumb,body.dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-thumb,body.dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(209,212,220,.3);border-radius:3px}.theme-dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(209,212,220,.5)}.theme-dark .trading-records[data-v] .ant-table-body,.theme-dark .trading-records[data-v] .ant-table-container,.theme-dark .trading-records[data-v] .ant-table-content,.theme-dark .trading-records[data-v] .ant-table-wrapper,body.dark .trading-records[data-v] .ant-table-body,body.dark .trading-records[data-v] .ant-table-container,body.dark .trading-records[data-v] .ant-table-content,body.dark .trading-records[data-v] .ant-table-wrapper,body.realdark .trading-records[data-v] .ant-table-body,body.realdark .trading-records[data-v] .ant-table-container,body.realdark .trading-records[data-v] .ant-table-content,body.realdark .trading-records[data-v] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(209,212,220,.3) transparent}.theme-dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar,.theme-dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar,.theme-dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar,.theme-dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar,body.dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar,body.dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar,body.dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar,body.dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar,body.realdark .trading-records[data-v] .ant-table-body::-webkit-scrollbar,body.realdark .trading-records[data-v] .ant-table-container::-webkit-scrollbar,body.realdark .trading-records[data-v] .ant-table-content::-webkit-scrollbar,body.realdark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.theme-dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-track,.theme-dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-track,.theme-dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-track,.theme-dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-track,body.dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-track,body.dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-track,body.dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-track,body.dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-track,body.realdark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-track,body.realdark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-track,body.realdark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-track,body.realdark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.theme-dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-thumb,.theme-dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-thumb,.theme-dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-thumb,.theme-dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb,body.dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-thumb,body.dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-thumb,body.dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-thumb,body.dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(209,212,220,.3);border-radius:3px}.theme-dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(209,212,220,.5)}.theme-dark .trading-records ::v-deep .ant-table{background:#1c1c1c!important;color:#d1d4dc!important}.theme-dark .trading-records ::v-deep .ant-table table{background:#1c1c1c!important;color:#d1d4dc!important}.theme-dark .trading-records ::v-deep .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records ::v-deep .ant-table-tbody{color:#d1d4dc!important}.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td{background:#1c1c1c!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td div,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td span{color:#d1d4dc!important}.theme-dark .trading-records ::v-deep .ant-table-tbody>tr:hover>td{background:#2a2e39!important}.theme-dark .trading-records ::v-deep .ant-table-placeholder{background:#1c1c1c!important;color:#868993!important}.theme-dark .trading-records ::v-deep .ant-table-body,.theme-dark .trading-records ::v-deep .ant-table-container,.theme-dark .trading-records ::v-deep .ant-table-content,.theme-dark .trading-records ::v-deep .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(209,212,220,.3) transparent}.theme-dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar,.theme-dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar,.theme-dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar,.theme-dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.theme-dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-track,.theme-dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-track,.theme-dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-track,.theme-dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.theme-dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-thumb,.theme-dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-thumb,.theme-dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-thumb,.theme-dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(209,212,220,.3);border-radius:3px}.theme-dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(209,212,220,.5)}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item{background:#1c1c1c!important;border-color:#363c4e!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item a{color:#d1d4dc!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover{border-color:#1890ff!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a{color:#1890ff!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active{background:#1890ff!important;border-color:#1890ff!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active a{color:#fff!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link{background:#1c1c1c!important;border-color:#363c4e!important;color:#d1d4dc!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link{border-color:#1890ff!important;color:#1890ff!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector{background:#1c1c1c!important;border-color:#363c4e!important;color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-table,body.realdark .trading-records ::v-deep .ant-table{background:#1c1c1c!important;color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-table table,body.realdark .trading-records ::v-deep .ant-table table{background:#1c1c1c!important;color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-table-thead>tr>th,body.realdark .trading-records ::v-deep .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}body.dark .trading-records ::v-deep .ant-table-tbody,body.realdark .trading-records ::v-deep .ant-table-tbody{color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-table-tbody>tr>td,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td{background:#1c1c1c!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}body.dark .trading-records ::v-deep .ant-table-tbody>tr>td,body.dark .trading-records ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),body.dark .trading-records ::v-deep .ant-table-tbody>tr>td div,body.dark .trading-records ::v-deep .ant-table-tbody>tr>td span,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td div,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td span{color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-table-tbody>tr:hover>td,body.realdark .trading-records ::v-deep .ant-table-tbody>tr:hover>td{background:#2a2e39!important}body.dark .trading-records ::v-deep .ant-table-placeholder,body.realdark .trading-records ::v-deep .ant-table-placeholder{background:#1c1c1c!important;color:#868993!important}body.dark .trading-records ::v-deep .ant-table-body,body.dark .trading-records ::v-deep .ant-table-container,body.dark .trading-records ::v-deep .ant-table-content,body.dark .trading-records ::v-deep .ant-table-wrapper,body.realdark .trading-records ::v-deep .ant-table-body,body.realdark .trading-records ::v-deep .ant-table-container,body.realdark .trading-records ::v-deep .ant-table-content,body.realdark .trading-records ::v-deep .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(209,212,220,.3) transparent}body.dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar,body.dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar,body.dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar,body.dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar,body.realdark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar,body.realdark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar,body.realdark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar,body.realdark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}body.dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-track,body.dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-track,body.dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-track,body.dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-track,body.realdark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-track,body.realdark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-track,body.realdark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-track,body.realdark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}body.dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-thumb,body.dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-thumb,body.dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-thumb,body.dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-thumb,body.realdark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-thumb,body.realdark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-thumb,body.realdark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-thumb,body.realdark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(209,212,220,.3);border-radius:3px}body.dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-thumb:hover,body.dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-thumb:hover,body.dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-thumb:hover,body.dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.realdark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-thumb:hover,body.realdark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-thumb:hover,body.realdark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-thumb:hover,body.realdark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(209,212,220,.5)}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item{background:#1c1c1c!important;border-color:#363c4e!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item a,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item a{color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover{border-color:#1890ff!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a{color:#1890ff!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active{background:#1890ff!important;border-color:#1890ff!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active a,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active a{color:#fff!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link{background:#1c1c1c!important;border-color:#363c4e!important;color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link{border-color:#1890ff!important;color:#1890ff!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector{background:#1c1c1c!important;border-color:#363c4e!important;color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-table,.theme-dark .trading-records ::v-deep .ant-table,body.dark .trading-records * ::v-deep .ant-table,body.dark .trading-records ::v-deep .ant-table,body.realdark .trading-records * ::v-deep .ant-table,body.realdark .trading-records ::v-deep .ant-table{background:#1c1c1c!important;color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-table table,.theme-dark .trading-records ::v-deep .ant-table table,body.dark .trading-records * ::v-deep .ant-table table,body.dark .trading-records ::v-deep .ant-table table,body.realdark .trading-records * ::v-deep .ant-table table,body.realdark .trading-records ::v-deep .ant-table table{background:#1c1c1c!important;color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-table-thead>tr>th,.theme-dark .trading-records ::v-deep .ant-table-thead>tr>th,body.dark .trading-records * ::v-deep .ant-table-thead>tr>th,body.dark .trading-records ::v-deep .ant-table-thead>tr>th,body.realdark .trading-records * ::v-deep .ant-table-thead>tr>th,body.realdark .trading-records ::v-deep .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records * ::v-deep .ant-table-tbody,.theme-dark .trading-records ::v-deep .ant-table-tbody,body.dark .trading-records * ::v-deep .ant-table-tbody,body.dark .trading-records ::v-deep .ant-table-tbody,body.realdark .trading-records * ::v-deep .ant-table-tbody,body.realdark .trading-records ::v-deep .ant-table-tbody{color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-table-tbody>tr>td,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td,body.dark .trading-records * ::v-deep .ant-table-tbody>tr>td,body.dark .trading-records ::v-deep .ant-table-tbody>tr>td,body.realdark .trading-records * ::v-deep .ant-table-tbody>tr>td,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td{background:#1c1c1c!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records * ::v-deep .ant-table-tbody>tr>td,.theme-dark .trading-records * ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),.theme-dark .trading-records * ::v-deep .ant-table-tbody>tr>td div,.theme-dark .trading-records * ::v-deep .ant-table-tbody>tr>td span,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td div,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td span,body.dark .trading-records * ::v-deep .ant-table-tbody>tr>td,body.dark .trading-records * ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),body.dark .trading-records * ::v-deep .ant-table-tbody>tr>td div,body.dark .trading-records * ::v-deep .ant-table-tbody>tr>td span,body.dark .trading-records ::v-deep .ant-table-tbody>tr>td,body.dark .trading-records ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),body.dark .trading-records ::v-deep .ant-table-tbody>tr>td div,body.dark .trading-records ::v-deep .ant-table-tbody>tr>td span,body.realdark .trading-records * ::v-deep .ant-table-tbody>tr>td,body.realdark .trading-records * ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),body.realdark .trading-records * ::v-deep .ant-table-tbody>tr>td div,body.realdark .trading-records * ::v-deep .ant-table-tbody>tr>td span,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td div,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td span{color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-table-tbody>tr:hover>td,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr:hover>td,body.dark .trading-records * ::v-deep .ant-table-tbody>tr:hover>td,body.dark .trading-records ::v-deep .ant-table-tbody>tr:hover>td,body.realdark .trading-records * ::v-deep .ant-table-tbody>tr:hover>td,body.realdark .trading-records ::v-deep .ant-table-tbody>tr:hover>td{background:#2a2e39!important}.theme-dark .trading-records * ::v-deep .ant-table-placeholder,.theme-dark .trading-records ::v-deep .ant-table-placeholder,body.dark .trading-records * ::v-deep .ant-table-placeholder,body.dark .trading-records ::v-deep .ant-table-placeholder,body.realdark .trading-records * ::v-deep .ant-table-placeholder,body.realdark .trading-records ::v-deep .ant-table-placeholder{background:#1c1c1c!important;color:#868993!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-item,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item{background:#1c1c1c!important;border-color:#363c4e!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item a,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item a,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item a,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item a,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-item a,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item a{color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover{border-color:#1890ff!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover a,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover a,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover a,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a{color:#1890ff!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active{background:#1890ff!important;border-color:#1890ff!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active a,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active a,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active a,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active a,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active a,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active a{color:#fff!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link{background:#1c1c1c!important;border-color:#363c4e!important;color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link{border-color:#1890ff!important;color:#1890ff!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector{background:#1c1c1c!important;border-color:#363c4e!important;color:#d1d4dc!important}.position-records[data-v-6ba7d922]{width:100%;min-height:300px;padding:0}.position-records .empty-state[data-v-6ba7d922]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;min-height:220px;padding:40px 16px;border-radius:8px;background:#fafafa;border:1px solid #f0f0f0}.position-records.theme-dark .empty-state[data-v-6ba7d922]{background:#141414;border-color:hsla(0,0%,100%,.08)}.position-records[data-v-6ba7d922] .ant-table{font-size:13px;color:#333}.position-records[data-v-6ba7d922] .ant-table-body{overflow-x:auto;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.position-records[data-v-6ba7d922] .ant-table-body::-webkit-scrollbar{height:6px;width:6px}.position-records[data-v-6ba7d922] .ant-table-body::-webkit-scrollbar-track{background:transparent;border-radius:3px}.position-records[data-v-6ba7d922] .ant-table-body::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.position-records[data-v-6ba7d922] .ant-table-body::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.position-records[data-v-6ba7d922] .ant-table-container{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.position-records[data-v-6ba7d922] .ant-table-container::-webkit-scrollbar{height:6px;width:6px}.position-records[data-v-6ba7d922] .ant-table-container::-webkit-scrollbar-track{background:transparent;border-radius:3px}.position-records[data-v-6ba7d922] .ant-table-container::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.position-records[data-v-6ba7d922] .ant-table-container::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.position-records[data-v-6ba7d922] .ant-table-content,.position-records[data-v-6ba7d922] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.position-records[data-v-6ba7d922] .ant-table-content::-webkit-scrollbar,.position-records[data-v-6ba7d922] .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.position-records[data-v-6ba7d922] .ant-table-content::-webkit-scrollbar-track,.position-records[data-v-6ba7d922] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.position-records[data-v-6ba7d922] .ant-table-content::-webkit-scrollbar-thumb,.position-records[data-v-6ba7d922] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.position-records[data-v-6ba7d922] .ant-table-content::-webkit-scrollbar-thumb:hover,.position-records[data-v-6ba7d922] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.position-records[data-v-6ba7d922] .ant-table-thead>tr>th{background:-webkit-gradient(linear,left top,left bottom,from(#f8fafc),to(#f1f5f9));background:linear-gradient(180deg,#f8fafc,#f1f5f9);font-weight:600;color:#475569;border-bottom:2px solid #e2e8f0;padding:12px 16px;font-size:13px}.position-records[data-v-6ba7d922] .ant-table-tbody>tr>td{padding:12px 16px;color:#334155;border-bottom:1px solid #f1f5f9;-webkit-transition:background .2s ease;transition:background .2s ease}.position-records[data-v-6ba7d922] .ant-table-tbody>tr>td strong{color:#262626;font-weight:600}.position-records[data-v-6ba7d922] .ant-table-tbody>tr:hover>td{background:#f0f7ff!important}.position-records[data-v-6ba7d922] .ant-tag{border-radius:6px;padding:2px 10px;font-weight:600;font-size:11px;border:none}.position-records[data-v-6ba7d922] .ant-tag[color=green]{background:linear-gradient(135deg,rgba(14,203,129,.15),rgba(14,203,129,.08));color:#0ecb81;border:1px solid rgba(14,203,129,.3)}.position-records[data-v-6ba7d922] .ant-tag[color=red]{background:linear-gradient(135deg,rgba(246,70,93,.15),rgba(246,70,93,.08));color:#f6465d;border:1px solid rgba(246,70,93,.3)}.position-records.theme-dark[data-v-6ba7d922] .ant-table,.theme-dark .position-records[data-v-6ba7d922] .ant-table{background:#1c1c1c!important;color:#d1d4dc!important}.position-records.theme-dark[data-v-6ba7d922] .ant-table-thead>tr>th,.theme-dark .position-records[data-v-6ba7d922] .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important;font-weight:600}.position-records.theme-dark[data-v-6ba7d922] .ant-table-tbody>tr>td,.theme-dark .position-records[data-v-6ba7d922] .ant-table-tbody>tr>td{background:#1c1c1c!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.position-records.theme-dark[data-v-6ba7d922] .ant-table-tbody>tr:hover>td,.theme-dark .position-records[data-v-6ba7d922] .ant-table-tbody>tr:hover>td{background:#2a2e39!important}.position-records.theme-dark[data-v-6ba7d922] .ant-table-tbody>tr>td strong,.theme-dark .position-records[data-v-6ba7d922] .ant-table-tbody>tr>td strong{color:#d1d4dc!important}.position-records[data-v-6ba7d922] .ant-table-tbody>tr:hover>td{background:#fafafa}.position-records[data-v-6ba7d922] .ant-empty{margin:40px 0}.position-records[data-v-6ba7d922] .ant-empty .ant-empty-description{color:#8c8c8c}.position-records.theme-dark[data-v-6ba7d922] .ant-empty .ant-empty-description{color:hsla(0,0%,100%,.35)}.position-records .profit[data-v-6ba7d922]{color:#0ecb81;font-weight:700;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;padding:2px 8px;background:linear-gradient(135deg,rgba(14,203,129,.12),rgba(14,203,129,.06));border-radius:6px}.position-records .profit[data-v-6ba7d922]:before{content:"▲";font-size:8px}.position-records .loss[data-v-6ba7d922]{color:#f6465d;font-weight:700;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;padding:2px 8px;background:linear-gradient(135deg,rgba(246,70,93,.12),rgba(246,70,93,.06));border-radius:6px}.position-records .loss[data-v-6ba7d922]:before{content:"▼";font-size:8px}@media (max-width:768px){.position-records[data-v-6ba7d922]{min-height:200px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.position-records[data-v-6ba7d922]::-webkit-scrollbar{height:4px;width:4px}.position-records[data-v-6ba7d922]::-webkit-scrollbar-track{background:transparent;border-radius:2px}.position-records[data-v-6ba7d922]::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:2px}.position-records[data-v-6ba7d922]::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.position-records .empty-state[data-v-6ba7d922]{min-height:150px;padding:20px 0}.position-records[data-v-6ba7d922] .ant-table{font-size:12px;min-width:700px}.position-records[data-v-6ba7d922] .ant-table-body,.position-records[data-v-6ba7d922] .ant-table-container,.position-records[data-v-6ba7d922] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.position-records[data-v-6ba7d922] .ant-table-body::-webkit-scrollbar,.position-records[data-v-6ba7d922] .ant-table-container::-webkit-scrollbar,.position-records[data-v-6ba7d922] .ant-table-wrapper::-webkit-scrollbar{height:4px;width:4px}.position-records[data-v-6ba7d922] .ant-table-body::-webkit-scrollbar-track,.position-records[data-v-6ba7d922] .ant-table-container::-webkit-scrollbar-track,.position-records[data-v-6ba7d922] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:2px}.position-records[data-v-6ba7d922] .ant-table-body::-webkit-scrollbar-thumb,.position-records[data-v-6ba7d922] .ant-table-container::-webkit-scrollbar-thumb,.position-records[data-v-6ba7d922] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:2px}.position-records[data-v-6ba7d922] .ant-table-body::-webkit-scrollbar-thumb:hover,.position-records[data-v-6ba7d922] .ant-table-container::-webkit-scrollbar-thumb:hover,.position-records[data-v-6ba7d922] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.position-records[data-v-6ba7d922] .ant-table-tbody>tr>td,.position-records[data-v-6ba7d922] .ant-table-thead>tr>th{padding:8px 10px;font-size:11px;white-space:nowrap}.position-records[data-v-6ba7d922] .ant-empty{margin:20px 0}}@media (max-width:480px){.position-records[data-v-6ba7d922] .ant-table{font-size:11px;min-width:600px}.position-records[data-v-6ba7d922] .ant-table-tbody>tr>td,.position-records[data-v-6ba7d922] .ant-table-thead>tr>th{padding:6px 8px;font-size:10px}.position-records .loss[data-v-6ba7d922],.position-records .profit[data-v-6ba7d922]{font-size:11px}}.theme-dark .position-records .ant-table-tbody>tr>td,.theme-dark .position-records[data-v] .ant-table-tbody>tr>td,body.dark .position-records .ant-table-tbody>tr>td,body.realdark .position-records .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1c1c1c!important;border-bottom-color:#363c4e!important}.theme-dark .position-records .ant-table-thead>tr>th,.theme-dark .position-records[data-v] .ant-table-thead>tr>th,body.dark .position-records .ant-table-thead>tr>th,body.realdark .position-records .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important;font-weight:600!important}.theme-dark .position-records .ant-table,.theme-dark .position-records[data-v] .ant-table,body.dark .position-records .ant-table,body.realdark .position-records .ant-table{background:#1c1c1c!important;color:#d1d4dc!important}.theme-dark .position-records .ant-table-tbody>tr>td *,.theme-dark .position-records[data-v] .ant-table-tbody>tr>td *,body.dark .position-records .ant-table-tbody>tr>td *,body.realdark .position-records .ant-table-tbody>tr>td *{color:#d1d4dc!important}.theme-dark .position-records .ant-table-tbody>tr:hover>td,.theme-dark .position-records[data-v] .ant-table-tbody>tr:hover>td,body.dark .position-records .ant-table-tbody>tr:hover>td,body.realdark .position-records .ant-table-tbody>tr:hover>td{background:#2a2e39!important}.theme-dark .position-records .ant-table-thead>tr>th .ant-table-column-title,.theme-dark .position-records[data-v] .ant-table-thead>tr>th .ant-table-column-title,body.dark .position-records .ant-table-thead>tr>th .ant-table-column-title,body.realdark .position-records .ant-table-thead>tr>th .ant-table-column-title{color:#d1d4dc!important}.theme-dark .position-records[data-v] .ant-table-tbody>tr>td,.theme-dark [class*=position-records][data-v] .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1c1c1c!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v] .ant-table-thead>tr>th,.theme-dark [class*=position-records][data-v] .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v-6c1eb557] .ant-table-tbody>tr>td,.theme-dark [data-v-6c1eb557] .ant-table-tbody>tr>td,.theme-dark [data-v-6c1eb557] .position-records .ant-table-tbody>tr>td,.theme-dark [data-v-6c1eb557].position-records .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1c1c1c!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v-6c1eb557] .ant-table-thead>tr>th,.theme-dark [data-v-6c1eb557].position-records .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v-6c1eb557] .ant-table,.theme-dark [data-v-6c1eb557].position-records .ant-table{background:#1c1c1c!important;color:#d1d4dc!important}.theme-dark .position-records[data-v-6c1eb557] .ant-table-tbody>tr:hover>td,.theme-dark [data-v-6c1eb557].position-records .ant-table-tbody>tr:hover>td{background:#2a2e39!important}body.dark .position-records[data-v-6c1eb557] .ant-table-tbody>tr>td,body.dark [data-v-6c1eb557] .ant-table-tbody>tr>td,body.dark [data-v-6c1eb557] .position-records .ant-table-tbody>tr>td,body.dark [data-v-6c1eb557].position-records .ant-table-tbody>tr>td,body.realdark .position-records[data-v-6c1eb557] .ant-table-tbody>tr>td,body.realdark [data-v-6c1eb557] .ant-table-tbody>tr>td,body.realdark [data-v-6c1eb557] .position-records .ant-table-tbody>tr>td,body.realdark [data-v-6c1eb557].position-records .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1c1c1c!important;border-bottom-color:#363c4e!important}body.dark .position-records[data-v-6c1eb557] .ant-table-thead>tr>th,body.dark [data-v-6c1eb557] .ant-table-thead>tr>th,body.dark [data-v-6c1eb557] .position-records .ant-table-thead>tr>th,body.dark [data-v-6c1eb557].position-records .ant-table-thead>tr>th,body.realdark .position-records[data-v-6c1eb557] .ant-table-thead>tr>th,body.realdark [data-v-6c1eb557] .ant-table-thead>tr>th,body.realdark [data-v-6c1eb557] .position-records .ant-table-thead>tr>th,body.realdark [data-v-6c1eb557].position-records .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v] .ant-table-tbody>tr>td,body.dark .position-records[data-v] .ant-table-tbody>tr>td,body.realdark .position-records[data-v] .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1c1c1c!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v] .ant-table-thead>tr>th,body.dark .position-records[data-v] .ant-table-thead>tr>th,body.realdark .position-records[data-v] .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v-6c1eb557] .ant-empty .ant-empty-description,body.dark .position-records[data-v-6c1eb557] .ant-empty .ant-empty-description,body.realdark .position-records[data-v-6c1eb557] .ant-empty .ant-empty-description{color:#868993!important}.theme-dark .position-records[data-v-6c1eb557] .profit,body.dark .position-records[data-v-6c1eb557] .profit,body.realdark .position-records[data-v-6c1eb557] .profit{color:#52c41a!important}.theme-dark .position-records[data-v-6c1eb557] .loss,body.dark .position-records[data-v-6c1eb557] .loss,body.realdark .position-records[data-v-6c1eb557] .loss{color:#ff4d4f!important}.theme-dark .trading-assistant .position-records[data-v-6c1eb557] .ant-table-tbody>tr>td,.theme-dark .trading-assistant [data-v-6c1eb557].position-records .ant-table-tbody>tr>td,body.dark .trading-assistant .position-records[data-v-6c1eb557] .ant-table-tbody>tr>td,body.dark .trading-assistant [data-v-6c1eb557].position-records .ant-table-tbody>tr>td,body.realdark .trading-assistant .position-records[data-v-6c1eb557] .ant-table-tbody>tr>td,body.realdark .trading-assistant [data-v-6c1eb557].position-records .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1c1c1c!important;border-bottom-color:#363c4e!important}.theme-dark .trading-assistant .position-records[data-v-6c1eb557] .ant-table-thead>tr>th,.theme-dark .trading-assistant [data-v-6c1eb557].position-records .ant-table-thead>tr>th,body.dark .trading-assistant .position-records[data-v-6c1eb557] .ant-table-thead>tr>th,body.dark .trading-assistant [data-v-6c1eb557].position-records .ant-table-thead>tr>th,body.realdark .trading-assistant .position-records[data-v-6c1eb557] .ant-table-thead>tr>th,body.realdark .trading-assistant [data-v-6c1eb557].position-records .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v-6c1eb557] .ant-table-body,.theme-dark .position-records[data-v-6c1eb557] .ant-table-container,.theme-dark .position-records[data-v-6c1eb557] .ant-table-content,.theme-dark .position-records[data-v-6c1eb557] .ant-table-wrapper,body.dark .position-records[data-v-6c1eb557] .ant-table-body,body.dark .position-records[data-v-6c1eb557] .ant-table-container,body.dark .position-records[data-v-6c1eb557] .ant-table-content,body.dark .position-records[data-v-6c1eb557] .ant-table-wrapper,body.realdark .position-records[data-v-6c1eb557] .ant-table-body,body.realdark .position-records[data-v-6c1eb557] .ant-table-container,body.realdark .position-records[data-v-6c1eb557] .ant-table-content,body.realdark .position-records[data-v-6c1eb557] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(209,212,220,.3) transparent}.theme-dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar,.theme-dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar,.theme-dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar,.theme-dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar,body.dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar,body.dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar,body.dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar,body.dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar,body.realdark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar,body.realdark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar,body.realdark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar,body.realdark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.theme-dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-track,.theme-dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-track,.theme-dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-track,.theme-dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-track,body.dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-track,body.dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-track,body.dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-track,body.dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-track,body.realdark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-track,body.realdark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-track,body.realdark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-track,body.realdark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.theme-dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-thumb,.theme-dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-thumb,.theme-dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-thumb,.theme-dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-thumb,body.dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-thumb,body.dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-thumb,body.dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-thumb,body.dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-thumb,body.realdark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-thumb,body.realdark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-thumb,body.realdark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-thumb,body.realdark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(209,212,220,.3);border-radius:3px}.theme-dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-thumb:hover,.theme-dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-thumb:hover,.theme-dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-thumb:hover,.theme-dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(209,212,220,.5)}.theme-dark .position-records[data-v] .ant-table-body,.theme-dark .position-records[data-v] .ant-table-container,.theme-dark .position-records[data-v] .ant-table-content,.theme-dark .position-records[data-v] .ant-table-wrapper,body.dark .position-records[data-v] .ant-table-body,body.dark .position-records[data-v] .ant-table-container,body.dark .position-records[data-v] .ant-table-content,body.dark .position-records[data-v] .ant-table-wrapper,body.realdark .position-records[data-v] .ant-table-body,body.realdark .position-records[data-v] .ant-table-container,body.realdark .position-records[data-v] .ant-table-content,body.realdark .position-records[data-v] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(209,212,220,.3) transparent}.theme-dark .position-records[data-v] .ant-table-body::-webkit-scrollbar,.theme-dark .position-records[data-v] .ant-table-container::-webkit-scrollbar,.theme-dark .position-records[data-v] .ant-table-content::-webkit-scrollbar,.theme-dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar,body.dark .position-records[data-v] .ant-table-body::-webkit-scrollbar,body.dark .position-records[data-v] .ant-table-container::-webkit-scrollbar,body.dark .position-records[data-v] .ant-table-content::-webkit-scrollbar,body.dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar,body.realdark .position-records[data-v] .ant-table-body::-webkit-scrollbar,body.realdark .position-records[data-v] .ant-table-container::-webkit-scrollbar,body.realdark .position-records[data-v] .ant-table-content::-webkit-scrollbar,body.realdark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.theme-dark .position-records[data-v] .ant-table-body::-webkit-scrollbar-track,.theme-dark .position-records[data-v] .ant-table-container::-webkit-scrollbar-track,.theme-dark .position-records[data-v] .ant-table-content::-webkit-scrollbar-track,.theme-dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-track,body.dark .position-records[data-v] .ant-table-body::-webkit-scrollbar-track,body.dark .position-records[data-v] .ant-table-container::-webkit-scrollbar-track,body.dark .position-records[data-v] .ant-table-content::-webkit-scrollbar-track,body.dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-track,body.realdark .position-records[data-v] .ant-table-body::-webkit-scrollbar-track,body.realdark .position-records[data-v] .ant-table-container::-webkit-scrollbar-track,body.realdark .position-records[data-v] .ant-table-content::-webkit-scrollbar-track,body.realdark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.theme-dark .position-records[data-v] .ant-table-body::-webkit-scrollbar-thumb,.theme-dark .position-records[data-v] .ant-table-container::-webkit-scrollbar-thumb,.theme-dark .position-records[data-v] .ant-table-content::-webkit-scrollbar-thumb,.theme-dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb,body.dark .position-records[data-v] .ant-table-body::-webkit-scrollbar-thumb,body.dark .position-records[data-v] .ant-table-container::-webkit-scrollbar-thumb,body.dark .position-records[data-v] .ant-table-content::-webkit-scrollbar-thumb,body.dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb,body.realdark .position-records[data-v] .ant-table-body::-webkit-scrollbar-thumb,body.realdark .position-records[data-v] .ant-table-container::-webkit-scrollbar-thumb,body.realdark .position-records[data-v] .ant-table-content::-webkit-scrollbar-thumb,body.realdark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(209,212,220,.3);border-radius:3px}.theme-dark .position-records[data-v] .ant-table-body::-webkit-scrollbar-thumb:hover,.theme-dark .position-records[data-v] .ant-table-container::-webkit-scrollbar-thumb:hover,.theme-dark .position-records[data-v] .ant-table-content::-webkit-scrollbar-thumb:hover,.theme-dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v] .ant-table-body::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v] .ant-table-container::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v] .ant-table-content::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v] .ant-table-body::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v] .ant-table-container::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v] .ant-table-content::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(209,212,220,.5)}.strategy-type-selector[data-v-8ec7ab14]{padding:8px 0}.selector-header[data-v-8ec7ab14]{text-align:center;margin-bottom:24px}.selector-header h3[data-v-8ec7ab14]{margin:0 0 4px;font-size:18px;font-weight:600}.selector-header .selector-hint[data-v-8ec7ab14]{color:#999;font-size:13px;margin:0}.mode-cards[data-v-8ec7ab14]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:16px}@media (max-width:768px){.mode-cards[data-v-8ec7ab14]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.mode-card[data-v-8ec7ab14]{-webkit-box-flex:1;-ms-flex:1;flex:1;border:2px solid #f0f0f0;border-radius:12px;padding:24px;cursor:pointer;-webkit-transition:all .3s;transition:all .3s;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center;position:relative;overflow:hidden}.mode-card[data-v-8ec7ab14]:hover{border-color:#1890ff;-webkit-box-shadow:0 4px 16px rgba(24,144,255,.12);box-shadow:0 4px 16px rgba(24,144,255,.12);-webkit-transform:translateY(-2px);transform:translateY(-2px)}.mode-card.selected[data-v-8ec7ab14]{border-color:#1890ff;background:rgba(24,144,255,.02)}.mode-card.selected[data-v-8ec7ab14]:after{content:"✓";position:absolute;top:8px;right:12px;color:#1890ff;font-size:18px;font-weight:700}.card-icon[data-v-8ec7ab14]{width:56px;height:56px;border-radius:14px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;font-size:26px;margin-bottom:16px}.card-icon.signal-icon[data-v-8ec7ab14]{background:linear-gradient(135deg,#e6f7ff,#bae7ff);color:#1890ff}.card-icon.script-icon[data-v-8ec7ab14]{background:linear-gradient(135deg,#f6ffed,#d9f7be);color:#52c41a}.card-body[data-v-8ec7ab14]{-webkit-box-flex:1;-ms-flex:1;flex:1}.card-body .card-badge-row[data-v-8ec7ab14]{margin-bottom:10px}.card-body .card-badge[data-v-8ec7ab14]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:3px 10px;border-radius:999px;background:rgba(24,144,255,.08);color:#1890ff;font-size:12px;font-weight:600;line-height:1.4}.card-body .card-badge.card-badge--script[data-v-8ec7ab14]{background:rgba(82,196,26,.12);color:#389e0d}.card-body h4[data-v-8ec7ab14]{font-size:16px;font-weight:600;margin:0 0 8px}.card-body .card-desc[data-v-8ec7ab14]{color:#666;font-size:13px;line-height:1.5;margin-bottom:12px}.card-features[data-v-8ec7ab14]{list-style:none;padding:0;margin:0 0 16px;text-align:left}.card-features li[data-v-8ec7ab14]{font-size:13px;color:#555;padding:3px 0}.card-features li .anticon[data-v-8ec7ab14]{color:#52c41a;margin-right:6px;font-size:12px}.card-btn[data-v-8ec7ab14]{width:100%}.template-quick-start[data-v-8ec7ab14]{margin-top:8px}.template-quick-start .divider-text[data-v-8ec7ab14]{color:#999;font-size:13px}.template-tags[data-v-8ec7ab14]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:8px}.template-tag[data-v-8ec7ab14]{cursor:pointer;padding:4px 12px;font-size:13px;border-radius:16px;-webkit-transition:all .2s;transition:all .2s}.template-tag .tpl-icon[data-v-8ec7ab14]{margin-right:4px}.template-tag[data-v-8ec7ab14]:hover{color:#1890ff;border-color:#1890ff;background:#e6f7ff}.theme-dark .selector-header h3[data-v-8ec7ab14]{color:#e0e6ed}.theme-dark .selector-header .selector-hint[data-v-8ec7ab14]{color:hsla(0,0%,100%,.4)}.theme-dark .mode-card[data-v-8ec7ab14]{border-color:hsla(0,0%,100%,.08);background:#1c1c1c}.theme-dark .mode-card[data-v-8ec7ab14]:hover{border-color:#177ddc;-webkit-box-shadow:0 4px 16px rgba(23,125,220,.2);box-shadow:0 4px 16px rgba(23,125,220,.2)}.theme-dark .mode-card.selected[data-v-8ec7ab14]{border-color:#177ddc;background:rgba(23,125,220,.06)}.theme-dark .mode-card.selected[data-v-8ec7ab14]:after{color:#40a9ff}.theme-dark .card-icon.signal-icon[data-v-8ec7ab14]{background:linear-gradient(135deg,rgba(24,144,255,.15),rgba(24,144,255,.08));color:#40a9ff}.theme-dark .card-icon.script-icon[data-v-8ec7ab14]{background:linear-gradient(135deg,rgba(82,196,26,.15),rgba(82,196,26,.08));color:#73d13d}.theme-dark .card-body h4[data-v-8ec7ab14]{color:#e0e6ed}.theme-dark .card-body .card-desc[data-v-8ec7ab14]{color:hsla(0,0%,100%,.45)}.theme-dark .card-body .card-badge[data-v-8ec7ab14]{background:rgba(64,169,255,.12);color:#69c0ff}.theme-dark .card-body .card-badge.card-badge--script[data-v-8ec7ab14]{background:rgba(115,209,61,.16);color:#95de64}.theme-dark .card-features li[data-v-8ec7ab14]{color:hsla(0,0%,100%,.6)}.theme-dark .card-features li .anticon[data-v-8ec7ab14]{color:#73d13d}.theme-dark .card-btn[data-v-8ec7ab14]{border-color:rgba(24,144,255,.4);color:#40a9ff}.theme-dark .card-btn[data-v-8ec7ab14]:hover{border-color:#1890ff;color:#1890ff}.theme-dark .template-quick-start[data-v-8ec7ab14] .ant-divider-inner-text{color:hsla(0,0%,100%,.35)}.theme-dark .template-quick-start[data-v-8ec7ab14] .ant-divider:after,.theme-dark .template-quick-start[data-v-8ec7ab14] .ant-divider:before{border-top-color:hsla(0,0%,100%,.08)}.theme-dark .divider-text[data-v-8ec7ab14]{color:hsla(0,0%,100%,.35)}.theme-dark .template-tag[data-v-8ec7ab14]{background:hsla(0,0%,100%,.04);border-color:hsla(0,0%,100%,.1);color:hsla(0,0%,100%,.65)}.theme-dark .template-tag[data-v-8ec7ab14]:hover{color:#40a9ff;border-color:#177ddc;background:rgba(23,125,220,.1)}.strategy-editor[data-v-35a0a386]{width:100%}.editor-layout[data-v-35a0a386]{min-height:450px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.code-col[data-v-35a0a386],.side-col[data-v-35a0a386]{-ms-flex-direction:column;flex-direction:column}.code-col[data-v-35a0a386],.code-section[data-v-35a0a386],.side-col[data-v-35a0a386]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal}.code-section[data-v-35a0a386]{border:1px solid #e8e8e8;border-radius:8px;overflow:hidden;-webkit-box-flex:1;-ms-flex:1;flex:1;-ms-flex-direction:column;flex-direction:column}.section-header[data-v-35a0a386]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:8px 12px;background:#fafafa;border-bottom:1px solid #e8e8e8}.section-header[data-v-35a0a386],.section-title-wrap[data-v-35a0a386]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.section-title-wrap[data-v-35a0a386]{gap:8px;min-width:0}.section-title[data-v-35a0a386]{font-weight:600;font-size:14px}.section-title .anticon[data-v-35a0a386]{margin-right:6px}.current-template-tag[data-v-35a0a386]{margin-right:0}.verify-btn[data-v-35a0a386]{color:#52c41a;font-weight:600}.code-editor-container[data-v-35a0a386]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-height:420px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.code-editor-container[data-v-35a0a386] .CodeMirror{-webkit-box-flex:1;-ms-flex:1;flex:1;height:100%;font-family:Courier New,Consolas,Liberation Mono,Menlo,monospace;font-size:13px;line-height:1.6;background:#fff}.code-editor-container[data-v-35a0a386] .CodeMirror-scroll{min-height:100%;overflow-x:auto!important;overflow-y:auto!important}.code-editor-container[data-v-35a0a386] .CodeMirror-gutters{border-right:1px solid #e8e8e8;background:-webkit-gradient(linear,left top,right top,from(#fafafa),to(#f5f5f5));background:linear-gradient(90deg,#fafafa 0,#f5f5f5)}.code-editor-container[data-v-35a0a386] .CodeMirror-linenumber{padding:0 8px 0 0;text-align:right;color:#999;font-size:12px}.code-editor-container[data-v-35a0a386] .CodeMirror-lines{padding:12px 0}.code-editor-container[data-v-35a0a386] .CodeMirror pre.CodeMirror-line,.code-editor-container[data-v-35a0a386] .CodeMirror pre.CodeMirror-line-like{padding:0 12px 0 12px}.code-editor-container[data-v-35a0a386] .CodeMirror-cursor{border-left:2px solid #1890ff}.side-tabs[data-v-35a0a386]{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-height:0;border:1px solid #e8e8e8;border-radius:8px;overflow:hidden}.side-tabs[data-v-35a0a386] .ant-tabs-bar{margin-bottom:0;-ms-flex-negative:0;flex-shrink:0;padding:0 12px;background:#fafafa;border-bottom:1px solid #f0f0f0}.side-tabs[data-v-35a0a386] .ant-tabs-content{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;min-height:280px;overflow-x:hidden;overflow-y:auto;padding:12px}.ai-actions[data-v-35a0a386]{margin-top:12px}.params-panel[data-v-35a0a386]{min-height:120px}.panel-intro[data-v-35a0a386]{margin-bottom:12px;padding:12px;border-radius:8px;background:#fafafa;border:1px solid #f0f0f0}.panel-intro__title[data-v-35a0a386]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;font-size:14px;font-weight:600;color:#262626}.panel-intro__desc[data-v-35a0a386]{margin-top:4px;font-size:12px;line-height:1.6;color:#8c8c8c}.template-list[data-v-35a0a386]{padding:4px 0}.template-item[data-v-35a0a386]{padding:12px;border:1px solid #f0f0f0;border-radius:8px;margin-bottom:8px;cursor:pointer;-webkit-transition:all .2s;transition:all .2s}.template-item.active[data-v-35a0a386],.template-item[data-v-35a0a386]:hover{border-color:#1890ff;background:#fafafa}.template-item .tpl-header[data-v-35a0a386]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:4px}.template-item .tpl-icon[data-v-35a0a386]{font-size:16px;margin-right:8px}.template-item .tpl-name[data-v-35a0a386]{font-weight:600;font-size:14px}.template-item .tpl-desc[data-v-35a0a386]{font-size:12px;color:#888;margin:0 0 4px}.template-item .tpl-use-btn[data-v-35a0a386]{padding:0;font-size:12px}.params-tip[data-v-35a0a386]{margin-bottom:12px}.param-list[data-v-35a0a386]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px}.param-item[data-v-35a0a386]{padding:12px;border:1px solid #f0f0f0;border-radius:8px;background:#fff}.param-item__label-row[data-v-35a0a386]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px;margin-bottom:4px}.param-item__label[data-v-35a0a386]{font-size:13px;font-weight:600;color:#262626}.param-item__type[data-v-35a0a386]{font-size:11px;color:#8c8c8c}.param-item__desc[data-v-35a0a386]{margin-bottom:8px;font-size:12px;line-height:1.5;color:#8c8c8c}.param-item__switch[data-v-35a0a386]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.params-actions[data-v-35a0a386]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;gap:8px;margin-top:16px}.ai-suggestions[data-v-35a0a386]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;margin-bottom:10px}.prompt-tag[data-v-35a0a386]{cursor:pointer}.ai-status[data-v-35a0a386]{margin-top:8px;color:#1890ff;font-size:13px;text-align:center}.params-empty-guide[data-v-35a0a386]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;min-height:200px}.theme-dark .code-section[data-v-35a0a386]{border-color:hsla(0,0%,100%,.1)}.theme-dark .section-header[data-v-35a0a386]{background:#1c1c1c;border-color:hsla(0,0%,100%,.1)}.theme-dark .section-title[data-v-35a0a386]{color:#e0e6ed}.theme-dark .side-tabs[data-v-35a0a386]{border-color:hsla(0,0%,100%,.1)}.theme-dark .side-tabs[data-v-35a0a386] .ant-tabs-bar{background:#1c1c1c;border-bottom-color:hsla(0,0%,100%,.08)}.theme-dark .side-tabs[data-v-35a0a386] .ant-tabs-nav .ant-tabs-tab{color:hsla(0,0%,100%,.55)}.theme-dark .side-tabs[data-v-35a0a386] .ant-tabs-nav .ant-tabs-tab:hover{color:hsla(0,0%,100%,.85)}.theme-dark .side-tabs[data-v-35a0a386] .ant-tabs-nav .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn{color:#1890ff}.theme-dark .panel-intro[data-v-35a0a386]{background:#1c1c1c;border-color:hsla(0,0%,100%,.08)}.theme-dark .panel-intro__title[data-v-35a0a386],.theme-dark .param-item__label[data-v-35a0a386]{color:#e0e6ed}.theme-dark .panel-intro__desc[data-v-35a0a386],.theme-dark .param-item__desc[data-v-35a0a386],.theme-dark .param-item__type[data-v-35a0a386]{color:hsla(0,0%,100%,.45)}.theme-dark .param-item[data-v-35a0a386],.theme-dark .template-item[data-v-35a0a386]{border-color:hsla(0,0%,100%,.08);background:#1c1c1c}.theme-dark .template-item.active[data-v-35a0a386],.theme-dark .template-item[data-v-35a0a386]:hover{border-color:#177ddc;background:rgba(23,125,220,.06)}.theme-dark .tpl-name[data-v-35a0a386]{color:#e0e6ed}.theme-dark .tpl-desc[data-v-35a0a386]{color:hsla(0,0%,100%,.4)}.theme-dark .prompt-tag[data-v-35a0a386]{background:hsla(0,0%,100%,.04);border-color:hsla(0,0%,100%,.1);color:hsla(0,0%,100%,.7)}.theme-dark[data-v-35a0a386] .ant-input,.theme-dark[data-v-35a0a386] .ant-input-number,.theme-dark[data-v-35a0a386] .ant-input-number-input,.theme-dark[data-v-35a0a386] .ant-select-selection,.theme-dark[data-v-35a0a386] .ant-select-selection--single,.theme-dark[data-v-35a0a386] textarea.ant-input{background:#141414!important;border-color:hsla(0,0%,100%,.1)!important;color:#d1d4dc!important}.theme-dark[data-v-35a0a386] .ant-select-selection-placeholder,.theme-dark[data-v-35a0a386] .ant-select-selection-selected-value{color:#d1d4dc!important}.theme-dark .ai-status[data-v-35a0a386]{color:#40a9ff}.theme-dark[data-v-35a0a386] .ant-empty-description{color:hsla(0,0%,100%,.45)}.theme-dark[data-v-35a0a386] .ant-alert-info{background:rgba(24,144,255,.08);border-color:rgba(24,144,255,.2)}.theme-dark[data-v-35a0a386] .ant-alert-info .ant-alert-message{color:hsla(0,0%,100%,.65)}.theme-dark .verify-btn[data-v-35a0a386]{color:#52c41a}.theme-dark .ai-panel[data-v-35a0a386]{color:hsla(0,0%,100%,.78)}.theme-dark .code-editor-container[data-v-35a0a386] .CodeMirror{background:#141414;color:#d1d4dc}.theme-dark .code-editor-container[data-v-35a0a386] .CodeMirror-gutters{border-right-color:hsla(0,0%,100%,.08);background:-webkit-gradient(linear,left top,right top,from(#1a1a1a),to(#1c1c1c));background:linear-gradient(90deg,#1a1a1a 0,#1c1c1c)}.theme-dark .code-editor-container[data-v-35a0a386] .CodeMirror-linenumber{color:hsla(0,0%,100%,.32)}.performance-analysis[data-v-01ff5f5a]{padding:4px 0}.strategy-tab-empty[data-v-01ff5f5a]{padding:48px 16px;margin:0 auto;max-width:360px}.metrics-grid[data-v-01ff5f5a]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:20px}@media (max-width:768px){.metrics-grid[data-v-01ff5f5a]{grid-template-columns:repeat(2,1fr)}}.metric-card[data-v-01ff5f5a]{background:#fafafa;border-radius:8px;padding:12px 16px;text-align:center}.metric-card.positive .metric-value[data-v-01ff5f5a]{color:#52c41a}.metric-card.negative .metric-value[data-v-01ff5f5a]{color:#ff4d4f}.metric-card .metric-label[data-v-01ff5f5a]{font-size:12px;color:#999;margin-bottom:4px}.metric-card .metric-value[data-v-01ff5f5a]{font-size:18px;font-weight:700;font-variant-numeric:tabular-nums}.chart-section[data-v-01ff5f5a]{margin-bottom:20px}.chart-section .chart-title[data-v-01ff5f5a]{font-size:14px;font-weight:600;margin-bottom:8px;padding-left:4px}.chart-container[data-v-01ff5f5a]{width:100%;height:300px;border-radius:8px;overflow:hidden}.theme-dark .metrics-grid .metric-card[data-v-01ff5f5a]{background:#1c1c1c;border:1px solid hsla(0,0%,100%,.06)}.theme-dark .metrics-grid .metric-card .metric-label[data-v-01ff5f5a]{color:hsla(0,0%,100%,.4)}.theme-dark .metrics-grid .metric-card .metric-value[data-v-01ff5f5a]{color:#e0e6ed}.theme-dark .metrics-grid .metric-card.positive .metric-value[data-v-01ff5f5a]{color:#52c41a}.theme-dark .metrics-grid .metric-card.negative .metric-value[data-v-01ff5f5a]{color:#ff4d4f}.theme-dark .chart-section .chart-title[data-v-01ff5f5a]{color:#e0e6ed}.theme-dark .chart-container[data-v-01ff5f5a]{background:#141414;border:1px solid hsla(0,0%,100%,.06)}.theme-dark .strategy-tab-empty[data-v-01ff5f5a] .ant-empty-description,.theme-dark[data-v-01ff5f5a] .ant-empty-description{color:hsla(0,0%,100%,.35)}.strategy-logs[data-v-73589ce4]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%}.logs-toolbar[data-v-73589ce4]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:8px 0;margin-bottom:8px}.logs-toolbar .toolbar-right[data-v-73589ce4],.logs-toolbar[data-v-73589ce4]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.logs-toolbar .toolbar-right[data-v-73589ce4]{gap:6px}.logs-toolbar .toolbar-right .auto-refresh-label[data-v-73589ce4]{font-size:12px;color:#999}.logs-container[data-v-73589ce4]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-height:300px;max-height:500px;overflow-y:auto;border:1px solid #f0f0f0;border-radius:8px;padding:8px;font-family:Fira Code,Consolas,monospace;font-size:12px;line-height:1.7;background:#fafafa}.logs-empty[data-v-73589ce4]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:200px;color:#ccc}.logs-empty p[data-v-73589ce4]{margin-top:8px;font-family:-apple-system,BlinkMacSystemFont,sans-serif}.log-entry[data-v-73589ce4]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:8px;padding:2px 4px;border-radius:3px}.log-entry[data-v-73589ce4]:hover{background:rgba(0,0,0,.02)}.log-entry.level-error[data-v-73589ce4]{background:rgba(255,77,79,.04)}.log-entry.level-trade[data-v-73589ce4]{background:rgba(82,196,26,.04)}.log-time[data-v-73589ce4]{color:#999;white-space:nowrap;font-size:11px;min-width:65px}.log-level[data-v-73589ce4]{-ms-flex-negative:0;flex-shrink:0;font-size:10px}.log-message[data-v-73589ce4]{-webkit-box-flex:1;-ms-flex:1;flex:1;word-break:break-all}.theme-dark .logs-toolbar .toolbar-right .auto-refresh-label[data-v-73589ce4]{color:hsla(0,0%,100%,.4)}.theme-dark .logs-toolbar[data-v-73589ce4] .ant-radio-group .ant-radio-button-wrapper{background:#1c1c1c;border-color:hsla(0,0%,100%,.12);color:hsla(0,0%,100%,.55)}.theme-dark .logs-toolbar[data-v-73589ce4] .ant-radio-group .ant-radio-button-wrapper:hover{color:#40a9ff}.theme-dark .logs-toolbar[data-v-73589ce4] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#1890ff;border-color:#1890ff;color:#fff}.theme-dark .logs-container[data-v-73589ce4]{background:#141414;border-color:hsla(0,0%,100%,.08)}.theme-dark .logs-empty[data-v-73589ce4]{color:hsla(0,0%,100%,.25)}.theme-dark .logs-empty .anticon[data-v-73589ce4]{color:hsla(0,0%,100%,.15)!important}.theme-dark .logs-empty p[data-v-73589ce4]{color:hsla(0,0%,100%,.3)}.theme-dark .log-entry[data-v-73589ce4]:hover{background:hsla(0,0%,100%,.03)}.theme-dark .log-entry.level-error[data-v-73589ce4]{background:rgba(255,77,79,.06)}.theme-dark .log-entry.level-trade[data-v-73589ce4]{background:rgba(82,196,26,.06)}.theme-dark .log-time[data-v-73589ce4]{color:hsla(0,0%,100%,.3)}.theme-dark .log-message[data-v-73589ce4]{color:hsla(0,0%,100%,.75)}.dashboard-pro[data-v-80b7f8d0]{min-height:100vh;padding:20px;background:#f8fafc;-webkit-transition:background .3s;transition:background .3s}.dashboard-pro.theme-dark[data-v-80b7f8d0]{background:#141414}.dashboard-pro.theme-dark .kpi-card[data-v-80b7f8d0]{background:#1c1c1c;border-color:#2a2a2a}.dashboard-pro.theme-dark .kpi-card .kpi-label[data-v-80b7f8d0]{color:#888}.dashboard-pro.theme-dark .kpi-card .kpi-value .amount[data-v-80b7f8d0]{color:#f1f5f9}.dashboard-pro.theme-dark .kpi-card .kpi-sub[data-v-80b7f8d0]{color:#888}.dashboard-pro.theme-dark .chart-panel[data-v-80b7f8d0],.dashboard-pro.theme-dark .table-panel[data-v-80b7f8d0]{background:#1c1c1c;border-color:#2a2a2a}.dashboard-pro.theme-dark .chart-panel .panel-header[data-v-80b7f8d0],.dashboard-pro.theme-dark .table-panel .panel-header[data-v-80b7f8d0]{border-color:#2a2a2a}.dashboard-pro.theme-dark .chart-panel .panel-header .panel-title[data-v-80b7f8d0],.dashboard-pro.theme-dark .table-panel .panel-header .panel-title[data-v-80b7f8d0]{color:#f1f5f9}.dashboard-pro.theme-dark .setup-guide-card[data-v-80b7f8d0]{background:linear-gradient(135deg,rgba(23,125,220,.14),rgba(139,92,246,.12));border-color:rgba(23,125,220,.26)}.dashboard-pro.theme-dark .setup-guide-card .setup-guide-title[data-v-80b7f8d0]{color:#f1f5f9}.dashboard-pro.theme-dark .setup-guide-card .setup-guide-desc[data-v-80b7f8d0]{color:hsla(0,0%,100%,.72)}.dashboard-pro.theme-dark .setup-guide-card .setup-guide-path[data-v-80b7f8d0]{color:hsla(0,0%,100%,.48)}.dashboard-pro.theme-dark .ranking-card[data-v-80b7f8d0]{background:hsla(0,0%,100%,.03);border-color:#2a2a2a}.dashboard-pro.theme-dark .ranking-card .rank-name[data-v-80b7f8d0]{color:#f1f5f9}.dashboard-pro.theme-dark .ranking-card .rank-stats label[data-v-80b7f8d0]{color:#888}.dashboard-pro.theme-dark .calendar-nav .current-month[data-v-80b7f8d0]{color:#f1f5f9}.dashboard-pro.theme-dark .calendar-nav .ant-btn-link[data-v-80b7f8d0],.dashboard-pro.theme-dark .profit-calendar .calendar-empty[data-v-80b7f8d0]{color:#888}.dashboard-pro.theme-dark .profit-calendar .month-summary[data-v-80b7f8d0]{background:hsla(0,0%,100%,.03)}.dashboard-pro.theme-dark .profit-calendar .calendar-weekdays .weekday[data-v-80b7f8d0],.dashboard-pro.theme-dark .profit-calendar .month-summary .summary-label[data-v-80b7f8d0]{color:#888}.dashboard-pro.theme-dark .profit-calendar .calendar-grid .calendar-cell[data-v-80b7f8d0]{background:hsla(0,0%,100%,.03)}.dashboard-pro.theme-dark .profit-calendar .calendar-grid .calendar-cell.no-data[data-v-80b7f8d0]{background:hsla(0,0%,100%,.02)}.dashboard-pro.theme-dark .profit-calendar .calendar-grid .calendar-cell.profit[data-v-80b7f8d0]{background:linear-gradient(135deg,rgba(34,197,94,.15),rgba(34,197,94,.25))}.dashboard-pro.theme-dark .profit-calendar .calendar-grid .calendar-cell.loss[data-v-80b7f8d0]{background:linear-gradient(135deg,rgba(239,68,68,.15),rgba(239,68,68,.25))}.dashboard-pro.theme-dark .profit-calendar .calendar-grid .calendar-cell.zero[data-v-80b7f8d0]{background:hsla(0,0%,100%,.03)}.dashboard-pro.theme-dark .profit-calendar .calendar-grid .calendar-cell .day-number[data-v-80b7f8d0]{color:#f1f5f9}.dashboard-pro.theme-dark .pro-table[data-v-80b7f8d0] .ant-table{background:transparent;color:#f1f5f9}.dashboard-pro.theme-dark .pro-table[data-v-80b7f8d0] .ant-table-thead>tr>th{background:#141414;color:#888;border-color:#2a2a2a}.dashboard-pro.theme-dark .pro-table[data-v-80b7f8d0] .ant-table-tbody>tr>td{border-color:#2a2a2a;color:#f1f5f9}.dashboard-pro.theme-dark .pro-table[data-v-80b7f8d0] .ant-table-tbody>tr:hover>td{background:#252525}.dashboard-pro.theme-dark .pro-table[data-v-80b7f8d0] .ant-table-placeholder{background:transparent}.dashboard-pro.theme-dark .pro-table[data-v-80b7f8d0] .ant-table-placeholder .ant-empty-description{color:#888}.dashboard-pro.theme-dark .pro-table[data-v-80b7f8d0] .ant-pagination .ant-pagination-item{background:#1c1c1c;border-color:#2a2a2a}.dashboard-pro.theme-dark .pro-table[data-v-80b7f8d0] .ant-pagination .ant-pagination-item a{color:#f1f5f9}.dashboard-pro.theme-dark .pro-table[data-v-80b7f8d0] .ant-pagination .ant-pagination-item.ant-pagination-item-active{background:#3b82f6;border-color:#3b82f6}.dashboard-pro.theme-dark .pro-table[data-v-80b7f8d0] .ant-pagination .ant-pagination-next .ant-pagination-item-link,.dashboard-pro.theme-dark .pro-table[data-v-80b7f8d0] .ant-pagination .ant-pagination-prev .ant-pagination-item-link{background:#1c1c1c;border-color:#2a2a2a;color:#f1f5f9}.dashboard-pro .kpi-grid[data-v-80b7f8d0]{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px;margin-bottom:20px}.dashboard-pro .setup-guide-card[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:16px;margin-bottom:20px;padding:18px 20px;background:linear-gradient(135deg,rgba(59,130,246,.08),rgba(139,92,246,.08));border:1px solid rgba(59,130,246,.16);border-radius:16px}.dashboard-pro .setup-guide-card .setup-guide-copy[data-v-80b7f8d0]{min-width:0}.dashboard-pro .setup-guide-card .setup-guide-title[data-v-80b7f8d0]{font-size:16px;font-weight:700;color:#1e293b}.dashboard-pro .setup-guide-card .setup-guide-desc[data-v-80b7f8d0]{margin-top:4px;color:#64748b;line-height:1.7}.dashboard-pro .setup-guide-card .setup-guide-path[data-v-80b7f8d0]{margin-top:6px;font-size:12px;color:#64748b}.dashboard-pro .setup-guide-card .setup-guide-actions[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px;-ms-flex-negative:0;flex-shrink:0}.dashboard-pro .kpi-card[data-v-80b7f8d0]{position:relative;background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:20px;overflow:hidden;-webkit-transition:all .3s cubic-bezier(.4,0,.2,1);transition:all .3s cubic-bezier(.4,0,.2,1)}.dashboard-pro .kpi-card[data-v-80b7f8d0]:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-box-shadow:0 10px 40px rgba(0,0,0,.1);box-shadow:0 10px 40px rgba(0,0,0,.1)}.dashboard-pro .kpi-card.clickable[data-v-80b7f8d0]{cursor:pointer}.dashboard-pro .kpi-card.clickable .card-arrow[data-v-80b7f8d0]{position:absolute;right:16px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);opacity:.4;-webkit-transition:all .3s;transition:all .3s}.dashboard-pro .kpi-card.clickable:hover .card-arrow[data-v-80b7f8d0]{opacity:1;right:12px}.dashboard-pro .kpi-card .kpi-glow[data-v-80b7f8d0]{position:absolute;top:-50%;right:-50%;width:100%;height:100%;background:radial-gradient(circle,rgba(59,130,246,.15) 0,transparent 70%);pointer-events:none}.dashboard-pro .kpi-card .kpi-content[data-v-80b7f8d0]{position:relative;z-index:1}.dashboard-pro .kpi-card .kpi-header[data-v-80b7f8d0]{gap:8px;margin-bottom:12px}.dashboard-pro .kpi-card .kpi-header[data-v-80b7f8d0],.dashboard-pro .kpi-card .kpi-icon[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.dashboard-pro .kpi-card .kpi-icon[data-v-80b7f8d0]{width:32px;height:32px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:8px;background:rgba(59,130,246,.1);color:#3b82f6;font-size:16px}.dashboard-pro .kpi-card .kpi-label[data-v-80b7f8d0]{font-size:12px;font-weight:600;color:#64748b;text-transform:uppercase;letter-spacing:.5px}.dashboard-pro .kpi-card .kpi-value[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline;gap:2px}.dashboard-pro .kpi-card .kpi-value .currency[data-v-80b7f8d0]{font-size:18px;font-weight:500;color:#64748b}.dashboard-pro .kpi-card .kpi-value .amount[data-v-80b7f8d0]{font-size:28px;font-weight:700;color:#1e293b;-webkit-font-feature-settings:"tnum";font-feature-settings:"tnum"}.dashboard-pro .kpi-card .kpi-value .unit[data-v-80b7f8d0]{font-size:14px;font-weight:500;color:#64748b;margin-left:4px}.dashboard-pro .kpi-card .kpi-sub[data-v-80b7f8d0]{margin-top:8px;font-size:12px;color:#64748b}.dashboard-pro .kpi-card .kpi-sub .label[data-v-80b7f8d0]{margin:0 2px}.dashboard-pro .kpi-card .kpi-sub .divider[data-v-80b7f8d0]{margin:0 6px;opacity:.5}.dashboard-pro .kpi-card .kpi-sub .highlight[data-v-80b7f8d0]{font-weight:600;color:#3b82f6}.dashboard-pro .kpi-card.kpi-primary[data-v-80b7f8d0]{background:linear-gradient(135deg,#1e40af,#3b82f6 50%,#60a5fa);border:none}.dashboard-pro .kpi-card.kpi-primary .kpi-icon[data-v-80b7f8d0]{background:hsla(0,0%,100%,.2);color:#fff}.dashboard-pro .kpi-card.kpi-primary .kpi-label[data-v-80b7f8d0]{color:hsla(0,0%,100%,.8)}.dashboard-pro .kpi-card.kpi-primary .kpi-value .amount[data-v-80b7f8d0],.dashboard-pro .kpi-card.kpi-primary .kpi-value .currency[data-v-80b7f8d0],.dashboard-pro .kpi-card.kpi-primary .kpi-value .unit[data-v-80b7f8d0]{color:#fff}.dashboard-pro .kpi-card.kpi-primary .kpi-sub[data-v-80b7f8d0]{color:hsla(0,0%,100%,.7)}.dashboard-pro .kpi-card.kpi-win-rate .kpi-ring[data-v-80b7f8d0]{position:absolute;right:12px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:60px;height:60px}.dashboard-pro .kpi-card.kpi-win-rate .kpi-ring svg[data-v-80b7f8d0]{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.dashboard-pro .kpi-card.kpi-win-rate .kpi-ring svg .ring-bg[data-v-80b7f8d0]{fill:none;stroke:rgba(16,185,129,.15);stroke-width:3}.dashboard-pro .kpi-card.kpi-win-rate .kpi-ring svg .ring-progress[data-v-80b7f8d0]{fill:none;stroke:#10b981;stroke-width:3;stroke-linecap:round;-webkit-transition:stroke-dasharray .5s ease;transition:stroke-dasharray .5s ease}.dashboard-pro .kpi-card.kpi-win-rate .kpi-icon[data-v-80b7f8d0]{background:rgba(16,185,129,.1);color:#10b981}.dashboard-pro .kpi-card.kpi-profit-factor .kpi-icon[data-v-80b7f8d0]{background:rgba(139,92,246,.1);color:#8b5cf6}.dashboard-pro .kpi-card.kpi-drawdown .kpi-icon[data-v-80b7f8d0]{background:rgba(239,68,68,.1);color:#ef4444}.dashboard-pro .kpi-card.kpi-drawdown .kpi-value .amount[data-v-80b7f8d0]{color:#ef4444}.dashboard-pro .kpi-card.kpi-trades .kpi-icon[data-v-80b7f8d0]{background:rgba(6,182,212,.1);color:#06b6d4}.dashboard-pro .kpi-card.kpi-strategies .kpi-icon[data-v-80b7f8d0]{background:rgba(245,158,11,.1);color:#f59e0b}.dashboard-pro .chart-row[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:16px;margin-bottom:16px}@media (max-width:1024px){.dashboard-pro .chart-row[data-v-80b7f8d0]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.dashboard-pro .chart-panel[data-v-80b7f8d0]{background:#fff;border:1px solid #e2e8f0;border-radius:16px;overflow:hidden}.dashboard-pro .chart-panel.chart-main[data-v-80b7f8d0]{-webkit-box-flex:2;-ms-flex:2;flex:2}.dashboard-pro .chart-panel.chart-side[data-v-80b7f8d0]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:300px}.dashboard-pro .chart-panel.chart-half[data-v-80b7f8d0]{-webkit-box-flex:1;-ms-flex:1;flex:1}.dashboard-pro .chart-panel .panel-header[data-v-80b7f8d0]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #e2e8f0}.dashboard-pro .chart-panel .panel-header[data-v-80b7f8d0],.dashboard-pro .chart-panel .panel-title[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.dashboard-pro .chart-panel .panel-title[data-v-80b7f8d0]{gap:8px;font-size:14px;font-weight:600;color:#1e293b}.dashboard-pro .chart-panel .panel-title .anticon[data-v-80b7f8d0]{color:#3b82f6}.dashboard-pro .chart-panel .panel-legend[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:16px;font-size:12px;color:#64748b}.dashboard-pro .chart-panel .panel-legend .legend-item[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.dashboard-pro .chart-panel .panel-legend .legend-item .dot[data-v-80b7f8d0]{width:10px;height:10px;border-radius:2px}.dashboard-pro .chart-panel .panel-legend .legend-item .dot.bar[data-v-80b7f8d0]{background:-webkit-gradient(linear,left top,left bottom,from(#34d399),to(#10b981));background:linear-gradient(180deg,#34d399,#10b981)}.dashboard-pro .chart-panel .panel-legend .legend-item .dot.line[data-v-80b7f8d0]{background:-webkit-gradient(linear,left top,right top,from(#3b82f6),to(#8b5cf6));background:linear-gradient(90deg,#3b82f6,#8b5cf6)}.dashboard-pro .chart-panel .panel-legend .legend-item .dot.loss[data-v-80b7f8d0]{background:#ef4444}.dashboard-pro .chart-panel .panel-legend .legend-item .dot.profit[data-v-80b7f8d0]{background:#10b981}.dashboard-pro .chart-panel .panel-legend.calendar-legend[data-v-80b7f8d0]{-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px}.dashboard-pro .chart-panel .panel-legend.calendar-legend .legend-gradient[data-v-80b7f8d0]{width:80px;height:10px;border-radius:3px;background:-webkit-gradient(linear,left top,right top,from(#ef4444),color-stop(#fca5a5),color-stop(#f4f4f5),color-stop(#86efac),to(#22c55e));background:linear-gradient(90deg,#ef4444,#fca5a5,#f4f4f5,#86efac,#22c55e)}.dashboard-pro .chart-panel .panel-badge[data-v-80b7f8d0]{background:#3b82f6;color:#fff;font-size:11px;font-weight:600;padding:2px 8px;border-radius:10px}.dashboard-pro .chart-panel .chart-body[data-v-80b7f8d0]{height:320px;padding:16px}.dashboard-pro .chart-panel .chart-body.chart-sm[data-v-80b7f8d0]{height:220px}.dashboard-pro .chart-panel .chart-body.calendar-chart[data-v-80b7f8d0]{height:280px}.dashboard-pro .chart-panel .calendar-nav[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.dashboard-pro .chart-panel .calendar-nav .current-month[data-v-80b7f8d0]{font-size:14px;font-weight:600;color:#1e293b;min-width:80px;text-align:center}.dashboard-pro .chart-panel .calendar-nav .ant-btn-link[data-v-80b7f8d0]{padding:0;height:auto;color:#64748b}.dashboard-pro .chart-panel .calendar-nav .ant-btn-link[data-v-80b7f8d0]:hover:not(:disabled){color:#3b82f6}.dashboard-pro .chart-panel .calendar-nav .ant-btn-link[data-v-80b7f8d0]:disabled{opacity:.3}.dashboard-pro .chart-panel .profit-calendar[data-v-80b7f8d0]{padding:12px 16px;overflow:hidden}.dashboard-pro .chart-panel .profit-calendar .calendar-empty[data-v-80b7f8d0],.dashboard-pro .chart-panel .profit-calendar[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.dashboard-pro .chart-panel .profit-calendar .calendar-empty[data-v-80b7f8d0]{height:280px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:#64748b}.dashboard-pro .chart-panel .profit-calendar .calendar-empty .anticon[data-v-80b7f8d0]{font-size:40px;margin-bottom:10px;opacity:.3}.dashboard-pro .chart-panel .profit-calendar .month-summary[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:20px;margin-bottom:10px;padding:8px 12px;background:rgba(241,245,249,.5);border-radius:8px}.dashboard-pro .chart-panel .profit-calendar .month-summary .summary-item[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:2px}.dashboard-pro .chart-panel .profit-calendar .month-summary .summary-item .summary-label[data-v-80b7f8d0]{font-size:10px;color:#64748b;text-transform:uppercase;letter-spacing:.5px}.dashboard-pro .chart-panel .profit-calendar .month-summary .summary-item .summary-value[data-v-80b7f8d0]{font-size:15px;font-weight:700;font-family:JetBrains Mono,monospace}.dashboard-pro .chart-panel .profit-calendar .month-summary .summary-item .summary-value.positive[data-v-80b7f8d0]{color:#10b981}.dashboard-pro .chart-panel .profit-calendar .month-summary .summary-item .summary-value.negative[data-v-80b7f8d0]{color:#ef4444}.dashboard-pro .chart-panel .profit-calendar .calendar-weekdays[data-v-80b7f8d0]{display:grid;grid-template-columns:repeat(7,1fr);gap:3px;margin-bottom:4px}.dashboard-pro .chart-panel .profit-calendar .calendar-weekdays .weekday[data-v-80b7f8d0]{text-align:center;font-size:10px;font-weight:600;color:#64748b;padding:4px 0}.dashboard-pro .chart-panel .profit-calendar .calendar-grid[data-v-80b7f8d0]{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell[data-v-80b7f8d0]{height:36px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:6px;background:rgba(241,245,249,.5);border:1px solid transparent;-webkit-transition:all .2s ease;transition:all .2s ease;position:relative}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.empty[data-v-80b7f8d0]{background:transparent;border:none}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.no-data[data-v-80b7f8d0]{background:rgba(241,245,249,.3)}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.profit[data-v-80b7f8d0]{background:linear-gradient(135deg,rgba(34,197,94,.12),rgba(34,197,94,.2));border-color:rgba(34,197,94,.3)}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.profit[data-v-80b7f8d0]:hover{background:linear-gradient(135deg,rgba(34,197,94,.2),rgba(34,197,94,.3));-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-box-shadow:0 4px 12px rgba(34,197,94,.2);box-shadow:0 4px 12px rgba(34,197,94,.2)}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.loss[data-v-80b7f8d0]{background:linear-gradient(135deg,rgba(239,68,68,.12),rgba(239,68,68,.2));border-color:rgba(239,68,68,.3)}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.loss[data-v-80b7f8d0]:hover{background:linear-gradient(135deg,rgba(239,68,68,.2),rgba(239,68,68,.3));-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-box-shadow:0 4px 12px rgba(239,68,68,.2);box-shadow:0 4px 12px rgba(239,68,68,.2)}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.zero[data-v-80b7f8d0]{background:hsla(240,5%,65%,.1);border-color:hsla(240,5%,65%,.2)}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell .day-number[data-v-80b7f8d0]{font-size:11px;font-weight:600;color:#1e293b;line-height:1}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell .day-profit[data-v-80b7f8d0]{font-size:9px;font-weight:600;font-family:JetBrains Mono,monospace;margin-top:1px;line-height:1}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell .day-profit.positive[data-v-80b7f8d0]{color:#10b981}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell .day-profit.negative[data-v-80b7f8d0]{color:#ef4444}.dashboard-pro .strategy-ranking[data-v-80b7f8d0]{padding:16px}.dashboard-pro .strategy-ranking .empty-state[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:40px;color:#64748b}.dashboard-pro .strategy-ranking .empty-state .anticon[data-v-80b7f8d0]{font-size:40px;margin-bottom:12px;opacity:.3}.dashboard-pro .strategy-ranking .ranking-grid[data-v-80b7f8d0]{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:12px}.dashboard-pro .strategy-ranking .ranking-card[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:12px;padding:14px 16px;background:rgba(241,245,249,.5);border:1px solid #e2e8f0;border-radius:12px;position:relative;overflow:hidden}.dashboard-pro .strategy-ranking .ranking-card.rank-top[data-v-80b7f8d0]{border-color:transparent;background:linear-gradient(135deg,rgba(59,130,246,.08),rgba(139,92,246,.08))}.dashboard-pro .strategy-ranking .ranking-card .rank-badge[data-v-80b7f8d0]{width:28px;height:28px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:8px;font-size:12px;font-weight:700;background:#64748b;color:#fff;-ms-flex-negative:0;flex-shrink:0}.dashboard-pro .strategy-ranking .ranking-card .rank-badge.rank-1[data-v-80b7f8d0]{background:linear-gradient(135deg,#fbbf24,#f59e0b)}.dashboard-pro .strategy-ranking .ranking-card .rank-badge.rank-2[data-v-80b7f8d0]{background:linear-gradient(135deg,#9ca3af,#6b7280)}.dashboard-pro .strategy-ranking .ranking-card .rank-badge.rank-3[data-v-80b7f8d0]{background:linear-gradient(135deg,#cd7f32,#b87333)}.dashboard-pro .strategy-ranking .ranking-card .rank-info[data-v-80b7f8d0]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.dashboard-pro .strategy-ranking .ranking-card .rank-info .rank-name[data-v-80b7f8d0]{font-size:13px;font-weight:600;color:#1e293b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:4px}.dashboard-pro .strategy-ranking .ranking-card .rank-info .rank-stats[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px;-ms-flex-wrap:wrap;flex-wrap:wrap}.dashboard-pro .strategy-ranking .ranking-card .rank-info .rank-stats .stat[data-v-80b7f8d0]{font-size:11px}.dashboard-pro .strategy-ranking .ranking-card .rank-info .rank-stats .stat label[data-v-80b7f8d0]{color:#64748b;margin-right:4px}.dashboard-pro .strategy-ranking .ranking-card .rank-pnl-bar[data-v-80b7f8d0]{position:absolute;bottom:0;left:0;right:0;height:3px;background:rgba(0,0,0,.05)}.dashboard-pro .strategy-ranking .ranking-card .rank-pnl-bar .bar-fill[data-v-80b7f8d0]{height:100%;border-radius:0 3px 3px 0;-webkit-transition:width .5s ease;transition:width .5s ease}.dashboard-pro .strategy-ranking .ranking-card .rank-pnl-bar .bar-fill.positive[data-v-80b7f8d0]{background:-webkit-gradient(linear,left top,right top,from(#10b981),to(#34d399));background:linear-gradient(90deg,#10b981,#34d399)}.dashboard-pro .strategy-ranking .ranking-card .rank-pnl-bar .bar-fill.negative[data-v-80b7f8d0]{background:-webkit-gradient(linear,left top,right top,from(#ef4444),to(#f87171));background:linear-gradient(90deg,#ef4444,#f87171)}.dashboard-pro .table-row[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:16px;margin-top:16px;margin-bottom:16px}@media (max-width:1024px){.dashboard-pro .table-row[data-v-80b7f8d0]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.dashboard-pro .table-panel[data-v-80b7f8d0]{-webkit-box-flex:1;-ms-flex:1;flex:1;background:#fff;border:1px solid #e2e8f0;border-radius:16px;overflow:hidden}.dashboard-pro .table-panel .panel-header[data-v-80b7f8d0]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #e2e8f0}.dashboard-pro .table-panel .panel-header[data-v-80b7f8d0],.dashboard-pro .table-panel .panel-title[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.dashboard-pro .table-panel .panel-title[data-v-80b7f8d0]{gap:8px;font-size:14px;font-weight:600;color:#1e293b}.dashboard-pro .table-panel .panel-title .anticon[data-v-80b7f8d0]{color:#3b82f6}.dashboard-pro .table-panel .panel-title .sound-toggle[data-v-80b7f8d0]{margin-left:8px;font-size:16px;cursor:pointer;color:#10b981;-webkit-transition:all .2s;transition:all .2s}.dashboard-pro .table-panel .panel-title .sound-toggle[data-v-80b7f8d0]:hover{-webkit-transform:scale(1.1);transform:scale(1.1)}.dashboard-pro .table-panel .panel-title .sound-toggle.sound-off[data-v-80b7f8d0]{color:#64748b}.dashboard-pro .table-panel .panel-badge[data-v-80b7f8d0]{background:#3b82f6;color:#fff;font-size:11px;font-weight:600;padding:2px 8px;border-radius:10px}.dashboard-pro .orders-panel[data-v-80b7f8d0]{margin-bottom:20px}.dashboard-pro .pro-table[data-v-80b7f8d0] .ant-table{font-size:13px}.dashboard-pro .pro-table[data-v-80b7f8d0] .ant-table-thead>tr>th{background:rgba(241,245,249,.8);font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.5px;color:#64748b;border-bottom:1px solid #e2e8f0;padding:12px 16px}.dashboard-pro .pro-table[data-v-80b7f8d0] .ant-table-tbody>tr>td{padding:12px 16px;border-bottom:1px solid #e2e8f0}.dashboard-pro .pro-table[data-v-80b7f8d0] .ant-table-tbody>tr:hover>td{background:rgba(59,130,246,.04)}.dashboard-pro .pro-table[data-v-80b7f8d0] .ant-pagination{padding:12px 16px;margin:0}.dashboard-pro .symbol-cell .symbol-name[data-v-80b7f8d0]{font-weight:600;display:block}.dashboard-pro .symbol-cell .symbol-strategy[data-v-80b7f8d0]{font-size:11px;color:#64748b}.dashboard-pro .side-tag[data-v-80b7f8d0]{display:inline-block;padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600}.dashboard-pro .side-tag.long[data-v-80b7f8d0]{background:rgba(16,185,129,.1);color:#10b981}.dashboard-pro .side-tag.short[data-v-80b7f8d0]{background:rgba(239,68,68,.1);color:#ef4444}.dashboard-pro .type-tag[data-v-80b7f8d0]{display:inline-block;padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600}.dashboard-pro .type-tag.long[data-v-80b7f8d0]{background:rgba(16,185,129,.1);color:#10b981}.dashboard-pro .type-tag.short[data-v-80b7f8d0]{background:rgba(239,68,68,.1);color:#ef4444}.dashboard-pro .type-tag.close-long[data-v-80b7f8d0]{background:rgba(245,158,11,.1);color:#f59e0b}.dashboard-pro .type-tag.close-short[data-v-80b7f8d0]{background:rgba(139,92,246,.1);color:#8b5cf6}.dashboard-pro .symbol-tag[data-v-80b7f8d0]{background:rgba(59,130,246,.1);color:#3b82f6}.dashboard-pro .exchange-tag[data-v-80b7f8d0],.dashboard-pro .symbol-tag[data-v-80b7f8d0]{display:inline-block;padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600}.dashboard-pro .exchange-tag.binance[data-v-80b7f8d0]{background:rgba(240,185,11,.1);color:#f0b90b}.dashboard-pro .exchange-tag.okx[data-v-80b7f8d0]{background:rgba(139,92,246,.1);color:#8b5cf6}.dashboard-pro .exchange-tag.bitget[data-v-80b7f8d0]{background:rgba(6,182,212,.1);color:#06b6d4}.dashboard-pro .exchange-tag.signal[data-v-80b7f8d0]{background:rgba(59,130,246,.1);color:#3b82f6}.dashboard-pro .market-type[data-v-80b7f8d0]{font-size:10px;color:#64748b;margin-top:2px}.dashboard-pro .status-tag[data-v-80b7f8d0]{display:inline-block;padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600}.dashboard-pro .status-tag.pending[data-v-80b7f8d0]{background:rgba(245,158,11,.1);color:#f59e0b}.dashboard-pro .status-tag.processing[data-v-80b7f8d0]{background:rgba(59,130,246,.1);color:#3b82f6}.dashboard-pro .status-tag.completed[data-v-80b7f8d0]{background:rgba(16,185,129,.1);color:#10b981}.dashboard-pro .status-tag.failed[data-v-80b7f8d0]{background:rgba(239,68,68,.1);color:#ef4444}.dashboard-pro .status-tag.cancelled[data-v-80b7f8d0]{background:rgba(100,116,139,.1);color:#64748b}.dashboard-pro .error-hint[data-v-80b7f8d0]{font-size:11px;color:#ef4444;margin-top:4px;cursor:pointer}.dashboard-pro .error-hint .anticon[data-v-80b7f8d0]{margin-right:4px}.dashboard-pro .notify-icons[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px}.dashboard-pro .notify-icons .notify-icon[data-v-80b7f8d0]{color:#64748b;font-size:14px}.dashboard-pro .pnl-cell[data-v-80b7f8d0]{text-align:right}.dashboard-pro .pnl-cell .pnl-percent[data-v-80b7f8d0]{display:block;font-size:11px}.dashboard-pro .time-cell[data-v-80b7f8d0]{font-size:12px;color:#64748b}.dashboard-pro .sub-text[data-v-80b7f8d0]{font-size:11px;color:#64748b}.dashboard-pro .text-muted[data-v-80b7f8d0]{color:#64748b}.dashboard-pro .positive[data-v-80b7f8d0]{color:#10b981}.dashboard-pro .negative[data-v-80b7f8d0]{color:#ef4444}@media (max-width:768px){.dashboard-pro[data-v-80b7f8d0]{padding:12px}.dashboard-pro .setup-guide-card[data-v-80b7f8d0]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;padding:16px}.dashboard-pro .setup-guide-card .setup-guide-actions[data-v-80b7f8d0]{width:100%}.dashboard-pro .setup-guide-card .setup-guide-actions .ant-btn[data-v-80b7f8d0]{-webkit-box-flex:1;-ms-flex:1;flex:1}.dashboard-pro .kpi-grid[data-v-80b7f8d0]{grid-template-columns:repeat(2,1fr);gap:10px}.dashboard-pro .kpi-card[data-v-80b7f8d0]{padding:14px}.dashboard-pro .kpi-card .kpi-value .amount[data-v-80b7f8d0]{font-size:22px}.dashboard-pro .kpi-card.kpi-win-rate .kpi-ring[data-v-80b7f8d0]{width:48px;height:48px;right:8px}.dashboard-pro .chart-panel .chart-body[data-v-80b7f8d0]{height:260px;padding:12px}.dashboard-pro .chart-panel .chart-body.chart-sm[data-v-80b7f8d0]{height:180px}.dashboard-pro .ranking-grid[data-v-80b7f8d0]{grid-template-columns:1fr}}.top-level-tabs[data-v-533cb131] .ant-tabs-bar{margin-bottom:16px;border-bottom:1px solid #e8e8e8}.top-level-tabs[data-v-533cb131] .ant-tabs-tab{font-size:15px;padding:12px 20px}.theme-dark .top-level-tabs[data-v-533cb131] .ant-tabs-bar{border-bottom-color:#303030}.theme-dark .top-level-tabs[data-v-533cb131] .ant-tabs-tab{color:hsla(0,0%,100%,.65)}.theme-dark .top-level-tabs[data-v-533cb131] .ant-tabs-tab-active{color:#177ddc}.theme-dark .top-level-tabs[data-v-533cb131] .ant-tabs-ink-bar{background:#177ddc}.assistant-guide-bar[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px;padding:16px 18px;margin-bottom:16px;border:1px solid rgba(24,144,255,.14);border-radius:16px;background:linear-gradient(135deg,rgba(24,144,255,.08),rgba(114,46,209,.06))}.assistant-guide-bar .assistant-guide-copy[data-v-533cb131]{min-width:0;-webkit-box-flex:1;-ms-flex:1 1 240px;flex:1 1 240px}.assistant-guide-bar .assistant-guide-eyebrow[data-v-533cb131]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:4px 10px;margin-bottom:8px;border-radius:999px;background:rgba(24,144,255,.12);color:#1677ff;font-size:12px;font-weight:600}.assistant-guide-bar .assistant-guide-title[data-v-533cb131]{font-size:16px;font-weight:700;color:#1f2937}.assistant-guide-bar .assistant-guide-desc[data-v-533cb131]{margin-top:4px;color:#475569;line-height:1.6}.assistant-guide-bar .assistant-guide-steps[data-v-533cb131]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;-webkit-box-flex:1;-ms-flex:1 1 520px;flex:1 1 520px}.assistant-guide-bar .assistant-step-card[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:10px;min-height:92px;padding:12px;border-radius:14px;background:hsla(0,0%,100%,.66);border:1px solid rgba(148,163,184,.16);-webkit-box-shadow:0 4px 12px rgba(15,23,42,.04);box-shadow:0 4px 12px rgba(15,23,42,.04)}.assistant-guide-bar .assistant-step-index[data-v-533cb131]{width:28px;height:28px;border-radius:999px;background:linear-gradient(135deg,#1677ff,#6d28d9);color:#fff;font-size:13px;font-weight:700;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-ms-flex-negative:0;flex-shrink:0}.assistant-guide-bar .assistant-step-body[data-v-533cb131]{min-width:0}.assistant-guide-bar .assistant-step-title[data-v-533cb131]{font-size:13px;font-weight:700;color:#1f2937}.assistant-guide-bar .assistant-step-desc[data-v-533cb131]{margin-top:4px;font-size:12px;line-height:1.6;color:#64748b}.assistant-guide-bar .assistant-guide-actions[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px;-ms-flex-negative:0;flex-shrink:0}.assistant-guide-bar .assistant-guide-actions .assistant-guide-close[data-v-533cb131]{min-width:36px;width:36px;padding:0;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-color:rgba(148,163,184,.28);color:#64748b;background:hsla(0,0%,100%,.72)}.assistant-guide-bar .assistant-guide-actions .assistant-guide-close[data-v-533cb131]:focus,.assistant-guide-bar .assistant-guide-actions .assistant-guide-close[data-v-533cb131]:hover{color:#1677ff;border-color:rgba(24,144,255,.35);background:#fff}.strategy-empty-state[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:10px;padding:28px 16px 32px;text-align:center}.strategy-empty-state .strategy-empty-desc[data-v-533cb131]{max-width:420px;color:#475569;line-height:1.7}.strategy-empty-state .strategy-empty-path[data-v-533cb131]{font-size:12px;color:#64748b}.trading-assistant[data-v-533cb131]{padding:0;height:calc(100vh - 120px);background:-webkit-gradient(linear,left top,left bottom,from(#f8fafc),to(#f1f5f9));background:linear-gradient(180deg,#f8fafc,#f1f5f9)}.trading-assistant .strategy-layout[data-v-533cb131]{height:calc(100vh - 120px);-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}@media (max-width:768px){.trading-assistant[data-v-533cb131]{min-height:auto;margin:-24px}.trading-assistant .assistant-guide-bar[data-v-533cb131]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;margin:0 12px 12px;padding:14px}.trading-assistant .assistant-guide-bar .assistant-guide-steps[data-v-533cb131]{grid-template-columns:1fr}.trading-assistant .assistant-guide-bar .assistant-guide-actions[data-v-533cb131]{width:100%}.trading-assistant .assistant-guide-bar .assistant-guide-actions .ant-btn[data-v-533cb131]{-webkit-box-flex:1;-ms-flex:1;flex:1}.trading-assistant .strategy-layout[data-v-533cb131]{height:auto;min-height:calc(100vh - 120px)}.trading-assistant .strategy-list-col[data-v-533cb131]{margin-bottom:12px;height:auto;max-height:50vh}.trading-assistant .strategy-list-col .strategy-list-card[data-v-533cb131]{height:auto;max-height:50vh}.trading-assistant .strategy-list-col .strategy-list-card .card-title[data-v-533cb131]{-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;padding:12px 16px}.trading-assistant .strategy-list-col .strategy-list-card .card-title span[data-v-533cb131]{font-size:14px;font-weight:600}.trading-assistant .strategy-list-col .strategy-list-card .card-title .ant-btn[data-v-533cb131]{font-size:12px;padding:0 10px;height:28px;line-height:28px}.trading-assistant .strategy-list-col .strategy-list-card[data-v-533cb131] .ant-card-body{max-height:calc(50vh - 60px);overflow-y:auto;padding:8px;-webkit-overflow-scrolling:touch}.trading-assistant .strategy-list-col .strategy-list-card[data-v-533cb131] .ant-card-head{padding:0;min-height:48px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131]{padding:12px 8px;margin-bottom:4px;border-radius:8px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta{width:100%}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-action{margin-left:8px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header[data-v-533cb131]{width:100%}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper[data-v-533cb131]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;margin-bottom:6px;-ms-flex-wrap:wrap;flex-wrap:wrap}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .exchange-tag[data-v-533cb131],.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .strategy-type-tag[data-v-533cb131]{font-size:10px;padding:2px 6px;line-height:1.4;margin:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .exchange-tag .anticon[data-v-533cb131]{font-size:10px;margin-right:2px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .strategy-name[data-v-533cb131]{font-size:14px;font-weight:600;-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;margin-top:4px;font-size:11px;-ms-flex-wrap:wrap;flex-wrap:wrap}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info .info-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:3px;-ms-flex-negative:0;flex-shrink:0;font-size:11px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info .info-item .anticon{font-size:11px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info .status-label{font-size:10px;padding:2px 6px;line-height:1.4}.trading-assistant .strategy-detail-col[data-v-533cb131]{height:auto;min-height:calc(50vh - 60px)}.trading-assistant .strategy-detail-col .strategy-detail-panel[data-v-533cb131]{gap:12px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card[data-v-533cb131] .ant-card-body{padding:16px 12px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card[data-v-533cb131] .ant-card-head{padding:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header[data-v-533cb131]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left[data-v-533cb131]{width:100%}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title[data-v-533cb131]{font-size:18px;font-weight:600;margin-bottom:12px;line-height:1.4;word-break:break-word}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta[data-v-533cb131]{display:grid;grid-template-columns:1fr 1fr;gap:8px;-webkit-box-align:start;-ms-flex-align:start;align-items:start}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta[data-v-533cb131] .ant-tag{grid-column:-1;justify-self:start;margin:0;font-size:11px;padding:4px 8px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta .meta-item[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:4px;font-size:12px;line-height:1.5;word-break:break-word}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta .meta-item .anticon[data-v-533cb131]{font-size:12px;-ms-flex-negative:0;flex-shrink:0;margin-top:2px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta .meta-item>span[data-v-533cb131]{word-break:break-word;line-height:1.5;-webkit-box-flex:1;-ms-flex:1;flex:1}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta .meta-item span[data-v-533cb131]:not(.anticon){display:inline;word-break:break-word;overflow-wrap:break-word}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right[data-v-533cb131]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .ant-btn[data-v-533cb131]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:100px;font-size:13px;padding:0 12px;height:36px;line-height:36px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .ant-btn .anticon[data-v-533cb131]{margin-right:4px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-card-body{padding:12px 8px;overflow-x:hidden}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-card-head{padding:0 8px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-tabs .ant-tabs-nav{padding:0 4px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-tabs .ant-tabs-nav .ant-tabs-tab{font-size:13px;padding:8px 10px;margin:0 2px;white-space:nowrap}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-tabs .ant-tabs-content{padding-top:12px;overflow-x:hidden}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-tabs .ant-tabs-content .ant-tabs-tabpane{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:768px) and (max-width:480px){.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta[data-v-533cb131]{grid-template-columns:1fr}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta[data-v-533cb131] .ant-tag{grid-column:1}}@media (max-width:480px){.trading-assistant .strategy-list-col .strategy-list-card[data-v-533cb131],.trading-assistant .strategy-list-col[data-v-533cb131]{max-height:45vh}.trading-assistant .strategy-list-col .strategy-list-card[data-v-533cb131] .ant-card-body{max-height:calc(45vh - 60px)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta[data-v-533cb131]{grid-template-columns:1fr;gap:6px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta .meta-item[data-v-533cb131]{font-size:11px;line-height:1.6}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .ant-btn[data-v-533cb131]{width:100%;-webkit-box-flex:0;-ms-flex:none;flex:none}}.trading-assistant .strategy-list-col .strategy-list-card[data-v-533cb131],.trading-assistant .strategy-list-col[data-v-533cb131]{height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.trading-assistant .strategy-list-col .strategy-list-card[data-v-533cb131]{border-radius:16px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08);border:none;overflow:hidden;-webkit-transition:-webkit-box-shadow .3s ease;transition:-webkit-box-shadow .3s ease;transition:box-shadow .3s ease;transition:box-shadow .3s ease,-webkit-box-shadow .3s ease}.trading-assistant .strategy-list-col .strategy-list-card[data-v-533cb131]:hover{-webkit-box-shadow:0 8px 32px rgba(0,0,0,.12);box-shadow:0 8px 32px rgba(0,0,0,.12)}.trading-assistant .strategy-list-col .strategy-list-card .card-title[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.trading-assistant .strategy-list-col .strategy-list-card .card-title span[data-v-533cb131]{font-size:16px;font-weight:700;background:linear-gradient(135deg,#1e3a5f,#2d5a87);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.trading-assistant .strategy-list-col .strategy-list-card .card-title .ant-btn-primary[data-v-533cb131]{border-radius:8px;background:linear-gradient(135deg,#1890ff,#40a9ff);border:none;-webkit-box-shadow:0 4px 12px rgba(24,144,255,.35);box-shadow:0 4px 12px rgba(24,144,255,.35);-webkit-transition:all .3s ease;transition:all .3s ease}.trading-assistant .strategy-list-col .strategy-list-card .card-title .ant-btn-primary[data-v-533cb131]:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-box-shadow:0 6px 16px rgba(24,144,255,.45);box-shadow:0 6px 16px rgba(24,144,255,.45)}.trading-assistant .strategy-list-col .strategy-list-card .group-mode-switch[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;padding:8px 0 12px;border-bottom:1px solid #f0f0f0;margin-bottom:12px}.trading-assistant .strategy-list-col .strategy-list-card .group-mode-switch .group-mode-label[data-v-533cb131]{font-size:13px;color:#8c8c8c;font-weight:500}.trading-assistant .strategy-list-col .strategy-list-card .group-mode-switch[data-v-533cb131] .ant-radio-group .ant-radio-button-wrapper{font-size:12px;padding:0 10px;height:26px;line-height:24px;border-radius:4px}.trading-assistant .strategy-list-col .strategy-list-card .group-mode-switch[data-v-533cb131] .ant-radio-group .ant-radio-button-wrapper:first-child{border-radius:4px 0 0 4px}.trading-assistant .strategy-list-col .strategy-list-card .group-mode-switch[data-v-533cb131] .ant-radio-group .ant-radio-button-wrapper:last-child{border-radius:0 4px 4px 0}.trading-assistant .strategy-list-col .strategy-list-card .group-mode-switch[data-v-533cb131] .ant-radio-group .ant-radio-button-wrapper .anticon{margin-right:4px}.trading-assistant .strategy-list-col .strategy-list-card[data-v-533cb131] .ant-card-body{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;background:#fff;padding:12px}.trading-assistant .strategy-list-col .strategy-list-card[data-v-533cb131] .ant-card-head{background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fafbfc));background:linear-gradient(180deg,#fff,#fafbfc);border-bottom:1px solid #f0f0f0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group[data-v-533cb131]{margin-bottom:12px;background:#fff;border-radius:12px;border:1px solid #e8ecf1;overflow:hidden}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:10px 12px;background:linear-gradient(135deg,#f8fafc,#f1f5f9);cursor:pointer;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header[data-v-533cb131]:hover{background:linear-gradient(135deg,#e8f4fd,#e3f0fc)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-left[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-left .collapse-icon[data-v-533cb131]{font-size:12px;color:#8c8c8c;-webkit-transition:-webkit-transform .2s ease;transition:-webkit-transform .2s ease;transition:transform .2s ease;transition:transform .2s ease,-webkit-transform .2s ease}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-left .group-icon[data-v-533cb131]{font-size:16px;color:#1890ff}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-left .group-name[data-v-533cb131]{font-weight:600;font-size:14px;color:#1e3a5f;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-right[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-right .group-status[data-v-533cb131]{font-size:11px;padding:2px 8px;border-radius:10px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-right .group-status.running[data-v-533cb131]{background:rgba(14,203,129,.1);color:#0ecb81}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-right .group-status.stopped[data-v-533cb131]{background:rgba(246,70,93,.1);color:#f6465d}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content[data-v-533cb131]{padding:6px 8px 10px 6px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;padding:10px 12px;margin-bottom:6px;margin-left:4px;border:1px solid #eef2f6;border-left:3px solid #dbe4ee;background:#fbfcfe;border-radius:8px;-webkit-box-shadow:0 1px 2px rgba(15,23,42,.04);box-shadow:0 1px 2px rgba(15,23,42,.04)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item[data-v-533cb131]:last-child{margin-bottom:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item[data-v-533cb131]:hover{background:#f0f7ff;border-left-color:#1890ff;border-color:rgba(24,144,255,.22);-webkit-box-shadow:0 2px 8px rgba(24,144,255,.08);box-shadow:0 2px 8px rgba(24,144,255,.08);-webkit-transform:none;transform:none}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item.active[data-v-533cb131]{background:linear-gradient(135deg,#e8f4ff,#f0f9ff);border-color:rgba(24,144,255,.35);border-left-color:#1890ff;border-left-width:3px;-webkit-box-shadow:0 2px 12px rgba(24,144,255,.12);box-shadow:0 2px 12px rgba(24,144,255,.12)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-content[data-v-533cb131]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-header[data-v-533cb131]{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;width:100%}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-actions[data-v-533cb131]{-ms-flex-negative:0;flex-shrink:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-item-align:center;align-self:center;padding-top:0;margin-left:4px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-actions[data-v-533cb131] .ant-btn{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-info[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-top:4px;font-size:12px;color:#8c8c8c}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-info .info-item[data-v-533cb131]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;white-space:nowrap}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-info .info-item .anticon[data-v-533cb131]{font-size:12px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-info .status-label[data-v-533cb131]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;padding:3px 10px;border-radius:16px;font-size:11px;font-weight:600;line-height:1;border:1px solid transparent;-ms-flex-negative:0;flex-shrink:0;background:linear-gradient(135deg,#f0f2f5,#e8eaed);color:#595959}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-info .status-label[data-v-533cb131]:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-info .status-running[data-v-533cb131]{background:linear-gradient(135deg,rgba(14,203,129,.15),rgba(14,203,129,.08));color:#0ecb81;border-color:rgba(14,203,129,.3)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-info .status-stopped[data-v-533cb131]{background:linear-gradient(135deg,rgba(246,70,93,.15),rgba(246,70,93,.08));color:#f6465d;border-color:rgba(246,70,93,.3)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-info .status-error[data-v-533cb131]{background:linear-gradient(135deg,rgba(255,77,79,.15),rgba(255,77,79,.08));color:#ff4d4f;border-color:rgba(255,77,79,.3)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item.strategy-list-item--strategy-group .strategy-item-header[data-v-533cb131]{margin-bottom:2px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item.strategy-list-item--strategy-group .strategy-name-wrapper[data-v-533cb131]{-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item.strategy-list-item--strategy-group .strategy-name[data-v-533cb131]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item.strategy-list-item--strategy-group .strategy-item-info[data-v-533cb131]{gap:10px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;cursor:pointer;padding:14px 16px;border-radius:12px;-webkit-transition:all .3s cubic-bezier(.4,0,.2,1);transition:all .3s cubic-bezier(.4,0,.2,1);position:relative;margin-bottom:8px;background:#fafbfc;border:1px solid transparent}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-content[data-v-533cb131]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-actions[data-v-533cb131]{-ms-flex-negative:0;flex-shrink:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-item-align:center;align-self:center;margin-left:4px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-actions[data-v-533cb131] .ant-btn{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-info[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-top:4px;font-size:12px;color:#8c8c8c}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-info .info-item[data-v-533cb131]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;white-space:nowrap}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-info .info-item .anticon[data-v-533cb131]{font-size:12px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-info .status-label[data-v-533cb131]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;padding:3px 10px;border-radius:16px;font-size:11px;font-weight:600;line-height:1;border:1px solid transparent;-ms-flex-negative:0;flex-shrink:0;background:linear-gradient(135deg,#f0f2f5,#e8eaed);color:#595959}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-info .status-label[data-v-533cb131]:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-info .status-running[data-v-533cb131]{background:linear-gradient(135deg,rgba(14,203,129,.15),rgba(14,203,129,.08));color:#0ecb81;border-color:rgba(14,203,129,.3)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-info .status-stopped[data-v-533cb131]{background:linear-gradient(135deg,rgba(246,70,93,.15),rgba(246,70,93,.08));color:#f6465d;border-color:rgba(246,70,93,.3)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-info .status-error[data-v-533cb131]{background:linear-gradient(135deg,rgba(255,77,79,.15),rgba(255,77,79,.08));color:#ff4d4f;border-color:rgba(255,77,79,.3)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131]:hover{background:linear-gradient(135deg,#f0f7ff,#f5f9ff);border-color:rgba(24,144,255,.2);-webkit-transform:none;transform:none;-webkit-box-shadow:0 2px 12px rgba(24,144,255,.1);box-shadow:0 2px 12px rgba(24,144,255,.1)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item.active[data-v-533cb131]{background:linear-gradient(135deg,#e6f4ff,#f0f9ff);border-color:#1890ff;border-left:4px solid #1890ff;-webkit-box-shadow:0 4px 16px rgba(24,144,255,.15);box-shadow:0 4px 16px rgba(24,144,255,.15)}@media (max-width:768px){.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131]{padding:12px 8px;margin:0 4px 4px 4px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item.active[data-v-533cb131]{border-left-width:2px}}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px;-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .strategy-name[data-v-533cb131]{font-weight:600;font-size:14px;-ms-flex-negative:0;flex-shrink:0;color:#1e3a5f;-webkit-transition:color .2s ease;transition:color .2s ease}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .exchange-tag[data-v-533cb131]{-ms-flex-negative:0;flex-shrink:0;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:11px;line-height:1.5;padding:2px 8px;border-radius:6px;background:linear-gradient(135deg,rgba(102,126,234,.1),rgba(118,75,162,.1));border:1px solid rgba(102,126,234,.2);color:#667eea;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .exchange-tag .anticon[data-v-533cb131]{font-size:11px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .strategy-type-tag[data-v-533cb131]{-ms-flex-negative:0;flex-shrink:0;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:10px;line-height:1.5;margin-left:4px;padding:2px 8px;border-radius:6px;background:linear-gradient(135deg,rgba(156,39,176,.1),rgba(103,58,183,.1));border:1px solid rgba(156,39,176,.2)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .strategy-type-tag .anticon[data-v-533cb131]{font-size:10px;margin-right:3px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper.strategy-name-wrapper--grouped[data-v-533cb131]{-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-ms-flex-line-pack:start;align-content:flex-start;row-gap:6px;-webkit-column-gap:6px;-moz-column-gap:6px;column-gap:6px;width:100%}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper.strategy-name-wrapper--grouped[data-v-533cb131] .ant-tag{margin-right:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper.strategy-name-wrapper--grouped .status-label[data-v-533cb131]{-ms-flex-negative:0;flex-shrink:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header[data-v-533cb131] .status-stopped{color:#f6465d!important;border-color:#f6465d!important}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description{max-width:calc(100% - 20px);overflow:hidden}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;gap:12px;margin-top:8px;font-size:12px;color:var(--text-color-secondary,#8c8c8c);-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;max-width:100%;overflow:hidden}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info .status-label{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;padding:4px 12px;border-radius:16px;font-size:11px;font-weight:600;line-height:1;border:1px solid transparent;-ms-flex-negative:0;flex-shrink:0;background:linear-gradient(135deg,#f0f2f5,#e8eaed);color:#595959;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info .status-label:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info .status-running{background:linear-gradient(135deg,rgba(14,203,129,.15),rgba(14,203,129,.08));color:#0ecb81;border-color:rgba(14,203,129,.3);-webkit-box-shadow:0 2px 8px rgba(14,203,129,.2);box-shadow:0 2px 8px rgba(14,203,129,.2)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info .status-running:before{-webkit-animation:statusPulse-533cb131 2s infinite;animation:statusPulse-533cb131 2s infinite;-webkit-box-shadow:0 0 8px #0ecb81;box-shadow:0 0 8px #0ecb81}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info .status-stopped{background:linear-gradient(135deg,rgba(246,70,93,.15),rgba(246,70,93,.08));color:#f6465d;border-color:rgba(246,70,93,.3)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info .status-error{background:linear-gradient(135deg,rgba(255,77,79,.15),rgba(255,77,79,.08));color:#ff4d4f;border-color:rgba(255,77,79,.3)}@-webkit-keyframes statusPulse-533cb131{0%,to{opacity:1}50%{opacity:.5}}@keyframes statusPulse-533cb131{0%,to{opacity:1}50%{opacity:.5}}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info .info-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;-ms-flex-negative:1;flex-shrink:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info .info-item.strategy-name-text{font-weight:500;color:#1e3a5f;max-width:100%;white-space:normal;line-height:1.35}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info/deep/.ant-tag{margin-right:0;font-size:11px;line-height:18px;padding:0 6px}.trading-assistant .strategy-detail-col[data-v-533cb131]{height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;overflow-y:auto}.trading-assistant .strategy-detail-col .strategy-empty-detail[data-v-533cb131]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-height:320px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:24px 16px}.trading-assistant .strategy-detail-col .strategy-empty-detail-card[data-v-533cb131]{max-width:420px;width:100%;text-align:center;padding:40px 32px 36px;border-radius:16px;background:linear-gradient(165deg,#fff,#f8fafc 55%,#f1f5f9);border:1px solid #e8ecf1;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08)}.trading-assistant .strategy-detail-col .strategy-empty-detail-icon[data-v-533cb131]{width:72px;height:72px;margin:0 auto 20px;border-radius:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background:linear-gradient(135deg,rgba(24,144,255,.12),rgba(64,169,255,.08));color:#1890ff;font-size:32px}.trading-assistant .strategy-detail-col .strategy-empty-detail-title[data-v-533cb131]{margin:0 0 12px;font-size:18px;font-weight:700;color:#1e3a5f;letter-spacing:.02em}.trading-assistant .strategy-detail-col .strategy-empty-detail-hint[data-v-533cb131]{margin:0 0 24px;font-size:14px;line-height:1.65;color:#64748b}.trading-assistant .strategy-detail-col .strategy-empty-detail-actions[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:12px}.trading-assistant .strategy-detail-col .strategy-detail-panel[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:16px;min-height:100%}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card[data-v-533cb131]{-ms-flex-negative:0;flex-shrink:0;background:linear-gradient(135deg,#fff,#f8fafc);border:none;border-radius:16px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08);-webkit-transition:all .3s ease;transition:all .3s ease}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card[data-v-533cb131]:hover{-webkit-box-shadow:0 8px 32px rgba(0,0,0,.12);box-shadow:0 8px 32px rgba(0,0,0,.12)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card[data-v-533cb131] .ant-card-head{background:transparent;border-bottom:none}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card[data-v-533cb131] .ant-card-body{background:transparent;padding:20px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:24px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left[data-v-533cb131]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:12px;margin-bottom:16px;-ms-flex-wrap:wrap;flex-wrap:wrap}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .strategy-title[data-v-533cb131]{font-size:20px;font-weight:700;margin:0;background:linear-gradient(135deg,#1e3a5f,#2d5a87);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge[data-v-533cb131]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;padding:6px 14px;border-radius:20px;font-size:13px;font-weight:600;-webkit-transition:all .3s ease;transition:all .3s ease}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge .status-dot[data-v-533cb131]{width:8px;height:8px;border-radius:50%;-webkit-animation:pulse-533cb131 2s infinite;animation:pulse-533cb131 2s infinite}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge.status-running[data-v-533cb131]{background:linear-gradient(135deg,rgba(14,203,129,.15),rgba(14,203,129,.08));color:#0ecb81;border:1px solid rgba(14,203,129,.3)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge.status-running .status-dot[data-v-533cb131]{background:#0ecb81;-webkit-box-shadow:0 0 12px #0ecb81;box-shadow:0 0 12px #0ecb81}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge.status-stopped[data-v-533cb131]{background:linear-gradient(135deg,rgba(246,70,93,.15),rgba(246,70,93,.08));color:#f6465d;border:1px solid rgba(246,70,93,.3)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge.status-stopped .status-dot[data-v-533cb131]{background:#f6465d;-webkit-animation:none;animation:none}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge.status-error[data-v-533cb131]{background:linear-gradient(135deg,rgba(255,77,79,.15),rgba(255,77,79,.08));color:#ff4d4f;border:1px solid rgba(255,77,79,.3)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge.status-error .status-dot[data-v-533cb131]{background:#ff4d4f;-webkit-animation:none;animation:none}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:12px;margin-bottom:14px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px;padding:10px 14px;background:#fff;border-radius:8px;border:1px solid #f0f0f0;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card[data-v-533cb131]:hover{-webkit-box-shadow:0 2px 8px rgba(0,0,0,.06);box-shadow:0 2px 8px rgba(0,0,0,.06)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-icon[data-v-533cb131]{width:36px;height:36px;border-radius:8px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;font-size:16px;-ms-flex-negative:0;flex-shrink:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-icon.investment[data-v-533cb131]{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-icon.equity[data-v-533cb131]{background:linear-gradient(135deg,#11998e,#38ef7d);color:#fff}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-icon.pnl[data-v-533cb131]{background:linear-gradient(135deg,#f093fb,#f5576c);color:#fff}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-content[data-v-533cb131]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-content .stat-label[data-v-533cb131]{font-size:11px;color:#8c8c8c;margin-bottom:2px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-content .stat-value[data-v-533cb131]{font-size:15px;font-weight:700;color:#1e3a5f;line-height:1.2}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-content .stat-value .pnl-percent[data-v-533cb131]{font-size:12px;font-weight:500;opacity:.8}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card.pnl-card.profit .stat-content .stat-value[data-v-533cb131]{color:#0ecb81}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card.pnl-card.loss .stat-content .stat-value[data-v-533cb131]{color:#f6465d}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-tags[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-tags .tag-item[data-v-533cb131]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;padding:4px 10px;background:#f5f7fa;border-radius:14px;font-size:12px;color:#5a6872;border:1px solid #e8ecf1}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-tags .tag-item .anticon[data-v-533cb131]{font-size:12px;color:#1890ff}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right[data-v-533cb131]{-ms-flex-negative:0;flex-shrink:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .action-btn[data-v-533cb131]{min-width:120px;height:38px;border-radius:8px;font-size:14px;font-weight:600;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:6px;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .action-btn .anticon[data-v-533cb131]{font-size:16px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .action-btn.start-btn[data-v-533cb131]{background:linear-gradient(135deg,#0ecb81,#26d87d);border:none;-webkit-box-shadow:0 2px 8px rgba(14,203,129,.3);box-shadow:0 2px 8px rgba(14,203,129,.3)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .action-btn.start-btn[data-v-533cb131]:hover{-webkit-box-shadow:0 4px 12px rgba(14,203,129,.4);box-shadow:0 4px 12px rgba(14,203,129,.4)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .action-btn.stop-btn[data-v-533cb131]{background:linear-gradient(135deg,#f6465d,#ff6b7a);border:none;-webkit-box-shadow:0 2px 8px rgba(246,70,93,.3);box-shadow:0 2px 8px rgba(246,70,93,.3)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .action-btn.stop-btn[data-v-533cb131]:hover{-webkit-box-shadow:0 4px 12px rgba(246,70,93,.4);box-shadow:0 4px 12px rgba(246,70,93,.4)}@-webkit-keyframes pulse-533cb131{0%,to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}50%{opacity:.6;-webkit-transform:scale(1.1);transform:scale(1.1)}}@keyframes pulse-533cb131{0%,to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}50%{opacity:.6;-webkit-transform:scale(1.1);transform:scale(1.1)}}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131]{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;background:#fff;border:none;border-radius:16px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08);-webkit-transition:all .3s ease;transition:all .3s ease;min-height:400px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131]:hover{-webkit-box-shadow:0 8px 32px rgba(0,0,0,.12);box-shadow:0 8px 32px rgba(0,0,0,.12)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-card-head{background:-webkit-gradient(linear,left top,left bottom,from(#fafbfc),to(#fff));background:linear-gradient(180deg,#fafbfc,#fff);border-bottom:1px solid #f0f0f0;-ms-flex-negative:0;flex-shrink:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-card-body{padding:16px;background:#fff}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-card-body,.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-card-body .ant-tabs{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-card-body .ant-tabs .ant-tabs-bar{-ms-flex-negative:0;flex-shrink:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-card-body .ant-tabs .ant-tabs-content{-webkit-box-flex:1;-ms-flex:1;flex:1}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-card-body .ant-tabs .ant-tabs-tabpane .strategy-tab-pane-inner{min-height:304px;padding-top:2px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-card-body .ant-tabs .ant-tabs-tabpane .position-records,.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-card-body .ant-tabs .ant-tabs-tabpane .trading-records{width:100%}.trading-assistant.theme-dark[data-v-533cb131]{background:#141414;color:var(--dark-text-color,#fff)}.trading-assistant.theme-dark .creation-mode-toggle[data-v-533cb131]{background:rgba(24,144,255,.08);border-color:rgba(24,144,255,.2)}.trading-assistant.theme-dark .creation-mode-toggle .mode-hint[data-v-533cb131]{color:hsla(0,0%,100%,.45)}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-533cb131]{background:#1c1c1c;border:1px solid hsla(0,0%,100%,.06);-webkit-box-shadow:0 4px 24px rgba(0,0,0,.25);box-shadow:0 4px 24px rgba(0,0,0,.25)}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card .card-title span[data-v-533cb131]{background:linear-gradient(135deg,#e0e6ed,#c5ccd6);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-533cb131] .ant-card-head{background:#1c1c1c;border-bottom-color:hsla(0,0%,100%,.06)}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-533cb131] .ant-card-head .ant-card-head-title{color:#d1d4dc}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-533cb131] .ant-card-body{background:transparent}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-533cb131] .ant-empty-description{color:#868993}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-533cb131] .ant-list .ant-list-item{border-bottom-color:hsla(0,0%,100%,.06)}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-533cb131] .ant-list .ant-list-item .ant-list-item-meta-title{color:#d1d4dc}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-533cb131] .ant-list .ant-list-item .ant-list-item-meta-description{color:#868993}.trading-assistant.theme-dark .strategy-list-col .group-mode-switch[data-v-533cb131]{border-bottom-color:hsla(0,0%,100%,.08)}.trading-assistant.theme-dark .strategy-list-col .group-mode-switch .group-mode-label[data-v-533cb131]{color:hsla(0,0%,100%,.45)}.trading-assistant.theme-dark .strategy-list-col .group-mode-switch[data-v-533cb131] .ant-radio-button-wrapper{background:hsla(0,0%,100%,.04);border-color:hsla(0,0%,100%,.12);color:hsla(0,0%,100%,.65)}.trading-assistant.theme-dark .strategy-list-col .group-mode-switch[data-v-533cb131] .ant-radio-button-wrapper:hover{color:#69c0ff}.trading-assistant.theme-dark .strategy-list-col .group-mode-switch[data-v-533cb131] .ant-radio-button-wrapper-checked{background:rgba(24,144,255,.25)!important;border-color:#1890ff!important;color:#fff!important}.trading-assistant.theme-dark .strategy-list-col .strategy-group[data-v-533cb131]{background:rgba(0,0,0,.18);border-color:hsla(0,0%,100%,.08)}.trading-assistant.theme-dark .strategy-list-col .strategy-group-header[data-v-533cb131]{background:hsla(0,0%,100%,.04)}.trading-assistant.theme-dark .strategy-list-col .strategy-group-header[data-v-533cb131]:hover{background:hsla(0,0%,100%,.06)}.trading-assistant.theme-dark .strategy-list-col .strategy-group-header .group-name[data-v-533cb131]{color:hsla(0,0%,100%,.88)}.trading-assistant.theme-dark .strategy-list-col .strategy-group-header .collapse-icon[data-v-533cb131]{color:hsla(0,0%,100%,.45)}.trading-assistant.theme-dark .strategy-list-col .strategy-group-content .strategy-list-item[data-v-533cb131]{background:hsla(0,0%,100%,.03);border-color:hsla(0,0%,100%,.08);border-left-color:hsla(0,0%,100%,.12)}.trading-assistant.theme-dark .strategy-list-col .strategy-group-content .strategy-list-item[data-v-533cb131]:hover{background:hsla(0,0%,100%,.05);border-color:hsla(0,0%,100%,.12);border-left-color:#1890ff}.trading-assistant.theme-dark .strategy-list-col .strategy-group-content .strategy-list-item.active[data-v-533cb131]{background:rgba(24,144,255,.12);border-color:rgba(24,144,255,.28);border-left-color:#1890ff}.trading-assistant.theme-dark .strategy-list-col .strategy-group-content .strategy-list-item .strategy-item-info[data-v-533cb131]{color:#868993}.trading-assistant.theme-dark .strategy-list-col .strategy-group-content .strategy-list-item .strategy-item-info .info-item[data-v-533cb131]{color:hsla(0,0%,100%,.55)}.trading-assistant.theme-dark .strategy-list-col .strategy-group-content .strategy-list-item .strategy-item-info .status-label[data-v-533cb131]{background:hsla(0,0%,100%,.06);color:hsla(0,0%,100%,.45);border-color:hsla(0,0%,100%,.1)}.trading-assistant.theme-dark .strategy-list-col .strategy-group-content .strategy-list-item .strategy-item-info .status-running[data-v-533cb131]{background:rgba(14,203,129,.12);color:#52c41a;border-color:rgba(14,203,129,.25)}.trading-assistant.theme-dark .strategy-list-col .strategy-group-content .strategy-list-item .strategy-item-info .status-stopped[data-v-533cb131]{background:rgba(246,70,93,.12);color:#f6465d;border-color:rgba(246,70,93,.25)}.trading-assistant.theme-dark .strategy-list-col .strategy-group-content .strategy-list-item .strategy-item-info .status-error[data-v-533cb131]{background:rgba(255,77,79,.12);color:#ff4d4f;border-color:rgba(255,77,79,.25)}.trading-assistant.theme-dark .strategy-list-col .strategy-name-wrapper .info-item[data-v-533cb131],.trading-assistant.theme-dark .strategy-list-col .strategy-name-wrapper .strategy-name-text[data-v-533cb131]{color:hsla(0,0%,100%,.88)!important}.trading-assistant.theme-dark .strategy-list-col .strategy-list-item[data-v-533cb131]{background:hsla(0,0%,100%,.02);border:1px solid hsla(0,0%,100%,.04)}.trading-assistant.theme-dark .strategy-list-col .strategy-list-item[data-v-533cb131]:hover{background:hsla(0,0%,100%,.04);border-color:hsla(0,0%,100%,.1);-webkit-transform:none;transform:none}.trading-assistant.theme-dark .strategy-list-col .strategy-list-item.active[data-v-533cb131]{background:rgba(24,144,255,.1);border-color:#1890ff;-webkit-box-shadow:0 4px 20px rgba(24,144,255,.2);box-shadow:0 4px 20px rgba(24,144,255,.2)}.trading-assistant.theme-dark .strategy-list-col .strategy-list-item .strategy-name[data-v-533cb131]{color:#e0e6ed}.trading-assistant.theme-dark .strategy-list-col .strategy-list-item .strategy-item-info[data-v-533cb131]{color:#868993}.trading-assistant.theme-dark .strategy-list-col .strategy-list-item .strategy-item-header .exchange-tag[data-v-533cb131]{background:rgba(102,126,234,.15);border-color:rgba(102,126,234,.3);color:#8da2f0}.trading-assistant.theme-dark .strategy-list-col .strategy-list-item .strategy-item-header .strategy-type-tag[data-v-533cb131]{background:rgba(177,130,255,.15);border-color:rgba(177,130,255,.3);color:#b182ff}.trading-assistant.theme-dark .strategy-list-col .strategy-list-item .strategy-item-header .strategy-name[data-v-533cb131]{color:hsla(0,0%,100%,.88)}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card[data-v-533cb131]{background:#1c1c1c;border:1px solid hsla(0,0%,100%,.06);-webkit-box-shadow:0 4px 24px rgba(0,0,0,.25);box-shadow:0 4px 24px rgba(0,0,0,.25)}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card[data-v-533cb131] .ant-card-head{background:transparent;border-bottom:none}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card[data-v-533cb131] .ant-card-body{background:transparent}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .strategy-title-row .strategy-title[data-v-533cb131]{background:none;color:#e0e6ed;-webkit-text-fill-color:initial}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .key-stats-grid .stat-card[data-v-533cb131]{background:hsla(0,0%,100%,.03);border-color:hsla(0,0%,100%,.06)}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .key-stats-grid .stat-card[data-v-533cb131]:hover{background:hsla(0,0%,100%,.06);border-color:hsla(0,0%,100%,.1)}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .key-stats-grid .stat-card .stat-content .stat-label[data-v-533cb131]{color:#868993}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .key-stats-grid .stat-card .stat-content .stat-value[data-v-533cb131]{color:#e0e6ed}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .strategy-tags .tag-item[data-v-533cb131]{background:hsla(0,0%,100%,.04);border-color:hsla(0,0%,100%,.08);color:#a0a8b3}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .strategy-tags .tag-item[data-v-533cb131]:hover{background:rgba(24,144,255,.1);border-color:rgba(24,144,255,.3)}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-533cb131]{background:#1c1c1c;border:1px solid hsla(0,0%,100%,.06);-webkit-box-shadow:0 4px 24px rgba(0,0,0,.25);box-shadow:0 4px 24px rgba(0,0,0,.25)}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-533cb131] .ant-card-head{background:#1c1c1c;border-bottom-color:hsla(0,0%,100%,.06)}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-533cb131] .ant-card-head .ant-card-head-title{color:#d1d4dc}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-533cb131] .ant-card-body{background:transparent}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-533cb131] .ant-tabs .ant-tabs-nav .ant-tabs-tab{color:#868993}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-533cb131] .ant-tabs .ant-tabs-nav .ant-tabs-tab:hover{color:#d1d4dc}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-533cb131] .ant-tabs .ant-tabs-nav .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn{color:#1890ff}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-533cb131] .ant-tabs .ant-tabs-nav .ant-tabs-ink-bar{background:-webkit-gradient(linear,left top,right top,from(#1890ff),to(#40a9ff));background:linear-gradient(90deg,#1890ff,#40a9ff)}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-533cb131] .ant-tabs .ant-tabs-content{color:#d1d4dc}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-533cb131] .ant-empty-description{color:#868993}.trading-assistant.theme-dark .strategy-detail-col .strategy-empty-detail-card[data-v-533cb131]{background:#1c1c1c;border:1px solid hsla(0,0%,100%,.08);-webkit-box-shadow:0 8px 32px rgba(0,0,0,.35);box-shadow:0 8px 32px rgba(0,0,0,.35)}.trading-assistant.theme-dark .strategy-detail-col .strategy-empty-detail-icon[data-v-533cb131]{background:linear-gradient(135deg,rgba(24,144,255,.22),rgba(64,169,255,.1));color:#69c0ff}.trading-assistant.theme-dark .strategy-detail-col .strategy-empty-detail-title[data-v-533cb131]{color:hsla(0,0%,100%,.92)}.trading-assistant.theme-dark .strategy-detail-col .strategy-empty-detail-hint[data-v-533cb131]{color:hsla(0,0%,100%,.55)}.theme-dark .assistant-guide-bar[data-v-533cb131]{border-color:rgba(23,125,220,.28);background:linear-gradient(135deg,rgba(23,125,220,.14),rgba(114,46,209,.12))}.theme-dark .assistant-guide-bar .assistant-guide-eyebrow[data-v-533cb131]{background:rgba(23,125,220,.2);color:#69c0ff}.theme-dark .assistant-guide-bar .assistant-guide-title[data-v-533cb131]{color:hsla(0,0%,100%,.92)}.theme-dark .assistant-guide-bar .assistant-guide-desc[data-v-533cb131]{color:hsla(0,0%,100%,.72)}.theme-dark .assistant-guide-bar .assistant-step-card[data-v-533cb131]{background:rgba(30,30,30,.6);border-color:hsla(0,0%,100%,.08)}.theme-dark .assistant-guide-bar .assistant-step-title[data-v-533cb131]{color:hsla(0,0%,100%,.9)}.theme-dark .assistant-guide-bar .assistant-step-desc[data-v-533cb131]{color:hsla(0,0%,100%,.58)}.theme-dark .assistant-guide-bar .assistant-guide-close[data-v-533cb131]{background:rgba(30,30,30,.5);border-color:hsla(0,0%,100%,.1);color:hsla(0,0%,100%,.72)}.theme-dark .assistant-guide-bar .assistant-guide-close[data-v-533cb131]:focus,.theme-dark .assistant-guide-bar .assistant-guide-close[data-v-533cb131]:hover{background:rgba(50,50,50,.7);border-color:rgba(105,192,255,.45);color:#91d5ff}.theme-dark .strategy-empty-state .strategy-empty-desc[data-v-533cb131]{color:hsla(0,0%,100%,.72)}.theme-dark .strategy-empty-state .strategy-empty-path[data-v-533cb131]{color:hsla(0,0%,100%,.48)}.strategy-params-collapse[data-v-533cb131]{background:#fafafa;border-radius:10px;overflow:hidden}.strategy-params-collapse[data-v-533cb131] .ant-collapse-item{border-bottom-color:#f0f0f0}.strategy-params-collapse[data-v-533cb131] .ant-collapse-header{font-weight:500;font-size:13px}.strategy-params-collapse[data-v-533cb131] .ant-collapse-content-box{padding:12px 16px}.strategy-params-collapse[data-v-533cb131] .ant-input-number{width:100%}.ai-filter-box[data-v-533cb131]{margin-top:12px;padding:14px 14px 12px;border:1px solid #e8e8e8;border-radius:10px;background:-webkit-gradient(linear,left top,left bottom,from(#fafcff),to(#fff));background:linear-gradient(180deg,#fafcff,#fff)}.ai-filter-header[data-v-533cb131]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px}.ai-filter-header[data-v-533cb131],.ai-filter-title[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ai-filter-title[data-v-533cb131]{gap:8px;font-weight:600;color:#262626}.ai-filter-title .anticon[data-v-533cb131]{color:#1890ff}.ai-filter-hint[data-v-533cb131]{margin-top:6px;font-size:12px;line-height:1.5;color:#8c8c8c}.symbol-option[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.symbol-name[data-v-533cb131]{font-weight:600;color:#8f8d8d;margin-right:8px}.symbol-name-extra[data-v-533cb131]{font-size:12px;color:#999;margin-left:4px}.creation-mode-toggle[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:16px;margin-bottom:16px;padding:14px 16px;background:rgba(24,144,255,.04);border-radius:8px;border:1px solid rgba(24,144,255,.12)}.creation-mode-toggle .mode-meta[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:4px}.creation-mode-toggle .mode-title[data-v-533cb131]{font-size:14px;font-weight:600;color:#262626}.creation-mode-toggle .mode-hint[data-v-533cb131]{color:rgba(0,0,0,.45);font-size:12px}@media (max-width:768px){.creation-mode-toggle[data-v-533cb131]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}}.section-block-title[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:4px;margin-bottom:16px;font-size:14px;font-weight:600;color:#262626}.section-block-desc[data-v-533cb131]{font-size:12px;font-weight:400;color:#8c8c8c}.simple-mode-hero[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:16px;padding:14px 16px;margin-bottom:16px;border-radius:10px;background:linear-gradient(135deg,rgba(24,144,255,.08),rgba(114,46,209,.06));border:1px solid rgba(24,144,255,.14)}.simple-mode-hero-main[data-v-533cb131]{min-width:0}.simple-mode-kicker[data-v-533cb131]{font-size:12px;font-weight:600;color:#1890ff;margin-bottom:4px}.simple-mode-hero-desc[data-v-533cb131]{font-size:12px;line-height:1.6;color:#595959}.simple-mode-badges[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}.advanced-settings-shell[data-v-533cb131],.selected-indicator-card[data-v-533cb131],.simple-essentials-card[data-v-533cb131]{padding:20px;margin-bottom:18px;border-radius:12px;background:#fafcff;border:1px solid rgba(24,144,255,.12);-webkit-box-shadow:0 8px 24px rgba(15,23,42,.04);box-shadow:0 8px 24px rgba(15,23,42,.04)}.required-label[data-v-533cb131]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.required-star[data-v-533cb131]{color:#f5222d;margin-right:4px}.compact-form-item[data-v-533cb131]{margin-bottom:18px}.compact-grid-row[data-v-533cb131]{margin-bottom:4px}.execution-step-layout[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:16px}.execution-step-hero[data-v-533cb131]{padding:16px 18px;border-radius:12px;background:linear-gradient(135deg,rgba(82,196,26,.08),rgba(24,144,255,.08));border:1px solid rgba(24,144,255,.14)}.execution-step-hero-desc[data-v-533cb131]{font-size:12px;line-height:1.7;color:#595959}.execution-section-card[data-v-533cb131]{padding:18px 20px;border-radius:12px;background:#fafcff;border:1px solid rgba(24,144,255,.12);-webkit-box-shadow:0 8px 24px rgba(15,23,42,.04);box-shadow:0 8px 24px rgba(15,23,42,.04)}.section-inline-alert[data-v-533cb131]{margin-top:4px}.notify-channel-grid[data-v-533cb131]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 12px}.execution-warn-text[data-v-533cb131]{color:#ff9800}.execution-mode-cards[data-v-533cb131]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.execution-mode-card[data-v-533cb131]{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:14px;min-height:110px;padding:16px;border-radius:12px;border:1px solid rgba(24,144,255,.12);background:#fff;cursor:pointer;-webkit-transition:all .2s ease;transition:all .2s ease}.execution-mode-card[data-v-533cb131]:hover{border-color:rgba(24,144,255,.35);-webkit-box-shadow:0 8px 24px rgba(24,144,255,.08);box-shadow:0 8px 24px rgba(24,144,255,.08)}.execution-mode-card.active[data-v-533cb131]{border-color:#1890ff;background:linear-gradient(135deg,rgba(24,144,255,.08),rgba(24,144,255,.03));-webkit-box-shadow:0 10px 28px rgba(24,144,255,.12);box-shadow:0 10px 28px rgba(24,144,255,.12)}.execution-mode-card.disabled[data-v-533cb131]{cursor:not-allowed;opacity:.68;background:#fafafa}.execution-mode-card.disabled[data-v-533cb131]:hover{border-color:rgba(24,144,255,.12);-webkit-box-shadow:none;box-shadow:none}.execution-mode-card-icon[data-v-533cb131]{-webkit-box-flex:0;-ms-flex:0 0 42px;flex:0 0 42px;width:42px;height:42px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:12px;font-size:18px}.execution-mode-card-icon.signal[data-v-533cb131]{color:#1890ff;background:rgba(24,144,255,.1)}.execution-mode-card-icon.live[data-v-533cb131]{color:#fa8c16;background:rgba(250,140,22,.12)}.execution-mode-card-body[data-v-533cb131]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.execution-mode-card-title[data-v-533cb131]{font-size:14px;font-weight:600;color:#262626;margin-bottom:6px}.execution-mode-card-desc[data-v-533cb131]{font-size:12px;line-height:1.6;color:#8c8c8c}.execution-mode-card-check[data-v-533cb131]{position:absolute;top:12px;right:12px;color:#1890ff;font-size:18px}.steps-container[data-v-533cb131]{margin-bottom:24px}@media (max-width:768px){.steps-container[data-v-533cb131]{margin-bottom:16px}.steps-container[data-v-533cb131] .ant-steps-item-title{font-size:12px}.steps-container[data-v-533cb131] .ant-steps-item-icon{width:24px;height:24px;line-height:24px;font-size:12px}}.form-container[data-v-533cb131]{min-height:400px;padding:24px 0}.form-container .step-content[data-v-533cb131]{-webkit-animation:fadeIn-533cb131 .3s;animation:fadeIn-533cb131 .3s}.form-container[data-v-533cb131] .ant-form-item{margin-bottom:20px}@media (max-width:768px){.form-container[data-v-533cb131]{min-height:300px;padding:16px 0}.form-container .simple-mode-hero[data-v-533cb131]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.form-container .simple-mode-badges[data-v-533cb131]{width:100%}.form-container .notify-channel-grid[data-v-533cb131]{grid-template-columns:repeat(2,minmax(0,1fr))}.form-container .execution-mode-cards[data-v-533cb131]{grid-template-columns:1fr}.form-container .execution-section-card[data-v-533cb131],.form-container .execution-step-hero[data-v-533cb131]{padding:16px}.form-container[data-v-533cb131] .ant-form-item-label{padding-bottom:4px}.form-container[data-v-533cb131] .ant-form-item-label label{font-size:13px}.form-container[data-v-533cb131] .ant-input,.form-container[data-v-533cb131] .ant-input-number,.form-container[data-v-533cb131] .ant-select{font-size:14px}.form-container[data-v-533cb131] .ant-radio-group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:8px}.form-container[data-v-533cb131] .ant-radio-group .ant-radio-wrapper{font-size:13px}}@media (max-width:480px){.form-container[data-v-533cb131]{min-height:250px;padding:12px 0}.form-container[data-v-533cb131] .ant-form-item-label label{font-size:12px}.form-container[data-v-533cb131] .ant-input,.form-container[data-v-533cb131] .ant-input-number,.form-container[data-v-533cb131] .ant-select{font-size:13px}}.strategy-type-selector[data-v-533cb131]{padding:16px 0}.strategy-type-selector .market-category-selector[data-v-533cb131]{margin-bottom:16px}.strategy-type-selector .market-category-selector .selector-label[data-v-533cb131]{font-weight:600;margin-bottom:8px;color:#262626}.strategy-type-selector .market-category-selector[data-v-533cb131] .ant-radio-group{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px}.strategy-type-selector .strategy-type-card[data-v-533cb131]{cursor:pointer;-webkit-transition:all .3s;transition:all .3s;height:100%;min-height:180px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.strategy-type-selector .strategy-type-card[data-v-533cb131]:hover{border-color:#1890ff;-webkit-box-shadow:0 2px 8px rgba(24,144,255,.2);box-shadow:0 2px 8px rgba(24,144,255,.2)}.strategy-type-selector .strategy-type-card.selected[data-v-533cb131]{border-color:#1890ff;background-color:#e6f7ff;-webkit-box-shadow:0 2px 8px rgba(24,144,255,.3);box-shadow:0 2px 8px rgba(24,144,255,.3)}.strategy-type-selector .strategy-type-card .strategy-type-content[data-v-533cb131]{text-align:center;padding:16px}.strategy-type-selector .strategy-type-card .strategy-type-content .strategy-type-icon[data-v-533cb131]{font-size:48px;color:#1890ff;margin-bottom:16px}.strategy-type-selector .strategy-type-card .strategy-type-content h3[data-v-533cb131]{font-size:18px;font-weight:600;margin-bottom:8px;color:#1f1f1f}.strategy-type-selector .strategy-type-card .strategy-type-content p[data-v-533cb131]{font-size:14px;color:#8c8c8c;margin:0;line-height:1.6}.indicator-option[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:12px}.indicator-option .indicator-option-main[data-v-533cb131]{-webkit-box-flex:1;-ms-flex:1;flex:1}.indicator-option .indicator-name[data-v-533cb131]{display:block;color:#262626;font-weight:600}.indicator-option-desc[data-v-533cb131]{display:block;margin-top:2px;color:#8c8c8c;font-size:12px;line-height:1.5}.selected-indicator-header[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px;margin-bottom:8px}.selected-indicator-name[data-v-533cb131]{font-weight:600;color:#262626}.indicator-description[data-v-533cb131]{border-radius:4px;color:var(--text-color,#666);font-size:14px;line-height:1.6}.theme-dark .advanced-settings-shell[data-v-533cb131],.theme-dark .creation-mode-toggle[data-v-533cb131],.theme-dark .selected-indicator-card[data-v-533cb131],.theme-dark .simple-essentials-card[data-v-533cb131]{background:hsla(0,0%,100%,.04);border-color:hsla(0,0%,100%,.1)}.theme-dark .indicator-option .indicator-name[data-v-533cb131],.theme-dark .mode-title[data-v-533cb131],.theme-dark .section-block-title[data-v-533cb131],.theme-dark .selected-indicator-name[data-v-533cb131]{color:hsla(0,0%,100%,.9)}.theme-dark .indicator-option-desc[data-v-533cb131],.theme-dark .mode-hint[data-v-533cb131],.theme-dark .section-block-desc[data-v-533cb131]{color:hsla(0,0%,100%,.6)}.theme-dark .simple-mode-hero[data-v-533cb131]{background:linear-gradient(135deg,rgba(24,144,255,.14),rgba(114,46,209,.12));border-color:rgba(64,169,255,.18)}.theme-dark .execution-step-hero[data-v-533cb131]{background:linear-gradient(135deg,rgba(82,196,26,.14),rgba(24,144,255,.14));border-color:rgba(64,169,255,.18)}.theme-dark .execution-mode-card[data-v-533cb131]{background:hsla(0,0%,100%,.03);border-color:hsla(0,0%,100%,.08)}.theme-dark .execution-mode-card[data-v-533cb131]:hover{border-color:rgba(64,169,255,.3);-webkit-box-shadow:0 8px 24px rgba(24,144,255,.12);box-shadow:0 8px 24px rgba(24,144,255,.12)}.theme-dark .execution-mode-card.active[data-v-533cb131]{background:linear-gradient(135deg,rgba(24,144,255,.16),rgba(24,144,255,.08));border-color:#1890ff}.theme-dark .execution-mode-card.disabled[data-v-533cb131]{background:hsla(0,0%,100%,.02)}.theme-dark .execution-mode-card-title[data-v-533cb131]{color:#e0e6ed}.theme-dark .execution-mode-card-desc[data-v-533cb131]{color:hsla(0,0%,100%,.6)}.theme-dark .simple-mode-kicker[data-v-533cb131]{color:#69c0ff}.theme-dark .execution-step-hero-desc[data-v-533cb131],.theme-dark .simple-mode-hero-desc[data-v-533cb131]{color:hsla(0,0%,100%,.72)}.indicator-params-form[data-v-533cb131]{padding:12px;background-color:var(--bg-color-secondary,#f5f7fa);border-radius:6px;border:1px dashed var(--border-color,#e0e0e0)}.indicator-params-form .param-item[data-v-533cb131]{margin-bottom:12px}.indicator-params-form .param-label[data-v-533cb131]{display:block;font-size:13px;color:var(--text-color,#666);margin-bottom:4px;font-weight:500}.form-item-hint[data-v-533cb131]{margin-top:4px;font-size:12px;color:var(--text-color-secondary,#8c8c8c)}.test-result[data-v-533cb131]{margin-top:8px;padding:8px;border-radius:4px;font-size:14px}.test-result.success[data-v-533cb131]{background-color:#f6ffed;border:1px solid #b7eb8f;color:#52c41a}.ip-whitelist-tip[data-v-533cb131]{margin-top:12px;padding:12px;background-color:#e6f7ff;border:1px solid #91d5ff;border-radius:4px;font-size:13px;color:#1890ff;line-height:1.6}.ip-whitelist-tip .anticon[data-v-533cb131]{margin-right:6px;color:#1890ff}.ip-whitelist-tip .ip-list[data-v-533cb131]{margin-top:8px;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:6px}.ip-whitelist-tip .ip-list .ant-tag[data-v-533cb131]{margin:0;font-family:Courier New,monospace;font-size:12px}.ip-whitelist-tip.error[data-v-533cb131]{background-color:#fff2f0;border:1px solid #ffccc7;color:#ff4d4f}@-webkit-keyframes fadeIn-533cb131{0%{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes fadeIn-533cb131{0%{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}[data-v-533cb131] .danger-item{color:#ff4d4f}[data-v-533cb131] .mobile-modal .ant-modal{top:20px;padding-bottom:0}[data-v-533cb131] .mobile-modal .ant-modal-content{max-height:calc(100vh - 40px);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}[data-v-533cb131] .mobile-modal .ant-modal-body{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:16px}[data-v-533cb131] .mobile-modal .ant-modal-footer{padding:12px 16px;border-top:1px solid #e8e8e8;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}[data-v-533cb131] .mobile-modal .ant-modal-footer .ant-btn{font-size:13px;padding:0 12px;height:32px}.add-symbol-modal-content .market-tabs[data-v-533cb131],.add-symbol-modal-content .symbol-search-section[data-v-533cb131]{margin-bottom:16px}.add-symbol-modal-content .section-title[data-v-533cb131]{font-weight:500;margin-bottom:8px;color:rgba(0,0,0,.85);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.add-symbol-modal-content .hot-symbols-section[data-v-533cb131],.add-symbol-modal-content .search-results-section[data-v-533cb131]{margin-bottom:16px}.add-symbol-modal-content .symbol-list .symbol-list-item[data-v-533cb131]{cursor:pointer;-webkit-transition:background-color .3s;transition:background-color .3s;padding:8px 12px;border-radius:4px}.add-symbol-modal-content .symbol-list .symbol-list-item[data-v-533cb131]:hover{background-color:#f5f5f5}.add-symbol-modal-content .symbol-item-content[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.add-symbol-modal-content .symbol-item-content .symbol-code[data-v-533cb131]{font-weight:500;margin-right:8px}.add-symbol-modal-content .symbol-item-content .symbol-name[data-v-533cb131]{color:rgba(0,0,0,.45)}.add-symbol-modal-content .selected-symbol-section[data-v-533cb131]{padding:12px;background-color:#f6ffed;border:1px solid #b7eb8f;border-radius:4px;margin-top:16px}.add-symbol-modal-content .selected-symbol-section .selected-symbol-info[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-top:8px}.add-symbol-modal-content .selected-symbol-section .selected-symbol-info .symbol-code[data-v-533cb131]{font-weight:500;margin-right:8px}.add-symbol-modal-content .selected-symbol-section .selected-symbol-info .symbol-name[data-v-533cb131]{color:rgba(0,0,0,.45)}body.dark .ta-strategy-confirm-modal.ant-modal-confirm .ant-modal-content{background:#1e1e1e;border:1px solid hsla(0,0%,100%,.08)}body.dark .ta-strategy-confirm-modal.ant-modal-confirm .ant-modal-body{background:#1e1e1e}body.dark .ta-strategy-confirm-modal.ant-modal-confirm .ant-modal-confirm-body .ant-modal-confirm-title{color:hsla(0,0%,100%,.88)}body.dark .ta-strategy-confirm-modal.ant-modal-confirm .ant-modal-confirm-body .ant-modal-confirm-content{color:hsla(0,0%,100%,.65)}body.dark .ta-strategy-confirm-modal.ant-modal-confirm .ant-modal-confirm-btns{border-top:1px solid hsla(0,0%,100%,.06);padding-top:12px}body.dark .ta-strategy-confirm-modal.ant-modal-confirm .ant-modal-confirm-btns .ant-btn-default{background:hsla(0,0%,100%,.06);border-color:hsla(0,0%,100%,.12);color:hsla(0,0%,100%,.85)}body.dark .ta-strategy-confirm-modal.ant-modal-confirm .ant-modal-confirm-btns .ant-btn-danger{background:#ff4d4f;border-color:#ff4d4f;color:#fff}body.dark .ta-strategy-confirm-modal.ant-modal-confirm .ant-modal-confirm-body>.anticon{color:#faad14}body.dark .mode-selector-modal .ant-modal-content{background:#1e1e1e;border:1px solid hsla(0,0%,100%,.08)}body.dark .mode-selector-modal .ant-modal-content .ant-modal-header{background:#252525;border-bottom-color:hsla(0,0%,100%,.06)}body.dark .mode-selector-modal .ant-modal-content .ant-modal-header .ant-modal-title{color:#e0e6ed}body.dark .mode-selector-modal .ant-modal-content .ant-modal-close-x{color:hsla(0,0%,100%,.45)}body.dark .mode-selector-modal .ant-modal-content .ant-modal-body{color:#d1d4dc}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content{background:#1e1e1e;border:1px solid hsla(0,0%,100%,.08);-webkit-box-shadow:0 18px 48px rgba(0,0,0,.45);box-shadow:0 18px 48px rgba(0,0,0,.45)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .ant-modal-header{background:#252525;border-bottom-color:hsla(0,0%,100%,.06)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .ant-modal-header .ant-modal-title{color:#e0e6ed}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .ant-modal-close-x{color:hsla(0,0%,100%,.45)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .ant-modal-body{color:#d1d4dc;background:#1e1e1e}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .creation-mode-toggle{background:rgba(24,144,255,.08);border-color:rgba(24,144,255,.2)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .creation-mode-toggle .mode-hint,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .creation-mode-toggle .mode-title{color:hsla(0,0%,100%,.72)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-title{color:hsla(0,0%,100%,.65)!important}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-description{color:hsla(0,0%,100%,.35)!important}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-wait .ant-steps-item-icon{background:transparent;border-color:hsla(0,0%,100%,.2)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-wait .ant-steps-item-icon .ant-steps-icon{color:hsla(0,0%,100%,.45)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-process .ant-steps-item-icon{background:#1890ff;border-color:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-process .ant-steps-item-icon .ant-steps-icon{color:#fff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-finish .ant-steps-item-icon{background:transparent;border-color:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-finish .ant-steps-item-icon .ant-steps-icon{color:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-tail:after{background:hsla(0,0%,100%,.1)}body.dark .strategy-form-modal.strategy-form-modal-dark .notify-channel-grid .ant-checkbox-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-height:40px;padding:0 12px;border-radius:10px;background:hsla(0,0%,100%,.03);border:1px solid hsla(0,0%,100%,.08);color:hsla(0,0%,100%,.72)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number{background:#1c1c1c;border-color:hsla(0,0%,100%,.12);color:#d1d4dc}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number::-webkit-input-placeholder,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input::-webkit-input-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number::-moz-placeholder,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input::-moz-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number:-ms-input-placeholder,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input:-ms-input-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number::-ms-input-placeholder,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input::-ms-input-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number::placeholder,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input::placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number:focus,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number:hover,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input:focus,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input:hover{border-color:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number-handler-wrap{background:#252525;border-left-color:hsla(0,0%,100%,.12)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number-handler-wrap .ant-input-number-handler{border-bottom-color:hsla(0,0%,100%,.08);color:hsla(0,0%,100%,.45)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number-handler-wrap .ant-input-number-handler:hover{color:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-select .ant-select-selection{background:#1c1c1c;border-color:hsla(0,0%,100%,.12);color:#d1d4dc}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-select .ant-select-selection .ant-select-arrow{color:hsla(0,0%,100%,.35)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-select .ant-select-selection:hover{border-color:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-radio-group .ant-radio-button-wrapper{background:#1c1c1c;border-color:hsla(0,0%,100%,.12);color:hsla(0,0%,100%,.65)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-radio-group .ant-radio-button-wrapper:hover{color:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#1890ff;border-color:#1890ff;color:#fff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-radio-group .ant-radio-wrapper{color:hsla(0,0%,100%,.65)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-switch{background:hsla(0,0%,100%,.15)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-switch.ant-switch-checked{background:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark textarea.ant-input{background:#1c1c1c;border-color:hsla(0,0%,100%,.12);color:#d1d4dc}body.dark .strategy-form-modal.strategy-form-modal-dark textarea.ant-input::-webkit-input-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark textarea.ant-input::-moz-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark textarea.ant-input:-ms-input-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark textarea.ant-input::-ms-input-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark textarea.ant-input::placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-form-explain,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-form-extra{color:hsla(0,0%,100%,.35)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-form-item-label>label{color:hsla(0,0%,100%,.75)}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-params-collapse{background:#1c1c1c!important;border-color:hsla(0,0%,100%,.08)}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-params-collapse .ant-collapse-item{border-color:hsla(0,0%,100%,.08)}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-params-collapse .ant-collapse-header{color:hsla(0,0%,100%,.85)!important;background:hsla(0,0%,100%,.03)}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-params-collapse .ant-collapse-content{background:#1c1c1c;border-color:hsla(0,0%,100%,.06);color:#d1d4dc}body.dark .strategy-form-modal.strategy-form-modal-dark .advanced-settings-shell,body.dark .strategy-form-modal.strategy-form-modal-dark .execution-section-card,body.dark .strategy-form-modal.strategy-form-modal-dark .selected-indicator-card,body.dark .strategy-form-modal.strategy-form-modal-dark .simple-essentials-card{background:hsla(0,0%,100%,.03);border-color:hsla(0,0%,100%,.08);-webkit-box-shadow:none;box-shadow:none}body.dark .strategy-form-modal.strategy-form-modal-dark .simple-mode-hero{background:linear-gradient(135deg,rgba(24,144,255,.16),rgba(114,46,209,.14));border-color:rgba(64,169,255,.2)}body.dark .strategy-form-modal.strategy-form-modal-dark .execution-step-hero{background:linear-gradient(135deg,rgba(82,196,26,.16),rgba(24,144,255,.14));border-color:rgba(64,169,255,.2)}body.dark .strategy-form-modal.strategy-form-modal-dark .mode-title,body.dark .strategy-form-modal.strategy-form-modal-dark .section-block-title,body.dark .strategy-form-modal.strategy-form-modal-dark .selected-indicator-name{color:#e0e6ed}body.dark .strategy-form-modal.strategy-form-modal-dark .execution-step-hero-desc,body.dark .strategy-form-modal.strategy-form-modal-dark .form-item-hint,body.dark .strategy-form-modal.strategy-form-modal-dark .indicator-description,body.dark .strategy-form-modal.strategy-form-modal-dark .section-block-desc,body.dark .strategy-form-modal.strategy-form-modal-dark .simple-mode-hero-desc{color:hsla(0,0%,100%,.62)}body.dark .strategy-form-modal.strategy-form-modal-dark .ai-filter-box{background:#1c1c1c;border-color:hsla(0,0%,100%,.1)}body.dark .strategy-form-modal.strategy-form-modal-dark .ai-filter-box .ai-filter-title{color:#e0e6ed}body.dark .strategy-form-modal.strategy-form-modal-dark .ai-filter-box .ai-filter-hint{color:hsla(0,0%,100%,.4)}body.dark .strategy-form-modal.strategy-form-modal-dark .form-container{color:#d1d4dc}body.dark .strategy-form-modal.strategy-form-modal-dark .form-container .ant-form-item-label>label{color:hsla(0,0%,100%,.75)}body.dark .strategy-form-modal.strategy-form-modal-dark .ip-whitelist-tip{background:rgba(24,144,255,.08);border-color:rgba(24,144,255,.2);color:#40a9ff}body.dark .strategy-form-modal.strategy-form-modal-dark .indicator-description{background:#1c1c1c;color:hsla(0,0%,100%,.65)}body.dark .strategy-form-modal.strategy-form-modal-dark .indicator-params-form{background:#1c1c1c;border-color:hsla(0,0%,100%,.1)}body.dark .strategy-form-modal.strategy-form-modal-dark .indicator-params-form .param-label{color:hsla(0,0%,100%,.65)}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-type-selector .strategy-type-card{border-color:hsla(0,0%,100%,.1);background:#1c1c1c;color:#d1d4dc}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-type-selector .strategy-type-card:hover{border-color:#177ddc}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-type-selector .strategy-type-card.selected{border-color:#177ddc;background:rgba(23,125,220,.08)}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-type-selector .strategy-type-card .strategy-type-content h3{color:#e0e6ed}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-type-selector .strategy-type-card .strategy-type-content p{color:hsla(0,0%,100%,.45)}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-type-selector .market-category-selector .selector-label{color:hsla(0,0%,100%,.75)}body.dark .strategy-form-modal.strategy-form-modal-dark .indicator-option .indicator-name{color:hsla(0,0%,100%,.9)}body.dark .strategy-form-modal.strategy-form-modal-dark .indicator-option-desc{color:hsla(0,0%,100%,.6)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-select-selection-selected-value{color:#d1d4dc!important}body.dark .strategy-form-modal.strategy-form-modal-dark .execution-mode-card{background:hsla(0,0%,100%,.03);border-color:hsla(0,0%,100%,.08)}body.dark .strategy-form-modal.strategy-form-modal-dark .execution-mode-card:hover{border-color:rgba(64,169,255,.3);-webkit-box-shadow:0 8px 24px rgba(24,144,255,.12);box-shadow:0 8px 24px rgba(24,144,255,.12)}body.dark .strategy-form-modal.strategy-form-modal-dark .execution-mode-card.active{background:linear-gradient(135deg,rgba(24,144,255,.16),rgba(24,144,255,.08));border-color:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark .execution-mode-card.disabled{background:hsla(0,0%,100%,.02)}body.dark .strategy-form-modal.strategy-form-modal-dark .execution-mode-card-icon.signal{color:#69c0ff;background:rgba(24,144,255,.15)}body.dark .strategy-form-modal.strategy-form-modal-dark .execution-mode-card-icon.live{color:#ffc069;background:rgba(250,140,22,.15)}body.dark .strategy-form-modal.strategy-form-modal-dark .execution-mode-card-title{color:#e0e6ed}body.dark .strategy-form-modal.strategy-form-modal-dark .execution-mode-card-desc{color:hsla(0,0%,100%,.6)}body.dark .strategy-form-modal.strategy-form-modal-dark .simple-mode-kicker{color:#69c0ff}body.dark .strategy-form-modal.strategy-form-modal-dark .execution-step-hero-desc,body.dark .strategy-form-modal.strategy-form-modal-dark .simple-mode-hero-desc{color:hsla(0,0%,100%,.72)}body.dark .ant-modal-wrap .ant-modal-content{background:#1e1e1e}body.dark .ant-modal-wrap .ant-modal-content .ant-modal-header{background:#252525;border-bottom-color:hsla(0,0%,100%,.06)}body.dark .ant-modal-wrap .ant-modal-content .ant-modal-header .ant-modal-title{color:#e0e6ed}body.dark .ant-modal-wrap .ant-modal-content .ant-modal-close-x{color:hsla(0,0%,100%,.45)}body.dark .ant-modal-wrap .ant-modal-content .ant-modal-body{color:#d1d4dc}body.dark .ant-modal-wrap .ant-modal-content .ant-modal-footer{border-top-color:hsla(0,0%,100%,.06);background:#252525}body.dark .ant-select-dropdown{background:#1e1e1e;border:1px solid hsla(0,0%,100%,.1);-webkit-box-shadow:0 4px 12px rgba(0,0,0,.4);box-shadow:0 4px 12px rgba(0,0,0,.4)}body.dark .ant-select-dropdown .ant-select-dropdown-menu-item{color:#d1d4dc}body.dark .ant-select-dropdown .ant-select-dropdown-menu-item-active,body.dark .ant-select-dropdown .ant-select-dropdown-menu-item:hover{background:rgba(24,144,255,.1)}body.dark .ant-select-dropdown .ant-select-dropdown-menu-item-selected{background:rgba(24,144,255,.15);color:#1890ff}body.dark .ant-select-dropdown .ant-select-dropdown-menu-item-disabled{color:hsla(0,0%,100%,.25)}body.dark .ant-select-dropdown .ant-select-search__field{background:#141414;border-color:hsla(0,0%,100%,.12);color:#d1d4dc}body.dark .ant-select-dropdown .ant-select-dropdown-menu{background:#1e1e1e}body.dark .ant-select-dropdown .ant-empty-description{color:hsla(0,0%,100%,.35)}body.dark .ant-modal-wrap .ant-collapse{background:#1c1c1c!important;border-color:hsla(0,0%,100%,.08)}body.dark .ant-modal-wrap .ant-collapse .ant-collapse-item{border-color:hsla(0,0%,100%,.08)}body.dark .ant-modal-wrap .ant-collapse .ant-collapse-header{color:hsla(0,0%,100%,.85)!important;background:hsla(0,0%,100%,.03)}body.dark .ant-modal-wrap .ant-collapse .ant-collapse-header .anticon{color:hsla(0,0%,100%,.45)}body.dark .ant-modal-wrap .ant-collapse .ant-collapse-content{background:#1c1c1c;border-color:hsla(0,0%,100%,.06);color:#d1d4dc}body.dark .ant-modal-wrap .ant-spin-text{color:hsla(0,0%,100%,.65)}body.dark .ant-modal-wrap .ant-alert{background:rgba(24,144,255,.06);border-color:rgba(24,144,255,.2)}body.dark .ant-modal-wrap .ant-alert .ant-alert-message{color:hsla(0,0%,100%,.75)}body.dark .ant-modal-wrap .ant-alert .ant-alert-description{color:hsla(0,0%,100%,.55)} \ No newline at end of file diff --git a/frontend/dist/css/254.2035e6e3.css b/frontend/dist/css/254.2035e6e3.css new file mode 100644 index 0000000..a2fe643 --- /dev/null +++ b/frontend/dist/css/254.2035e6e3.css @@ -0,0 +1 @@ +.trading-records[data-v-bdf54cd6]{width:100%;min-height:300px;padding:0;overflow-x:visible;overflow-y:visible}.trading-records .empty-state[data-v-bdf54cd6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;min-height:220px;padding:40px 16px;border-radius:8px;background:#fafafa;border:1px solid #f0f0f0}.trading-records.theme-dark .empty-state[data-v-bdf54cd6]{background:#141414;border-color:hsla(0,0%,100%,.08)}.trading-records[data-v-bdf54cd6] .ant-spin-container,.trading-records[data-v-bdf54cd6] .ant-spin-nested-loading{overflow-x:visible}.trading-records[data-v-bdf54cd6] .ant-table-wrapper{overflow-x:visible;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.trading-records[data-v-bdf54cd6] .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.trading-records[data-v-bdf54cd6] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.trading-records[data-v-bdf54cd6] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.trading-records[data-v-bdf54cd6] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.trading-records[data-v-bdf54cd6] .ant-table{font-size:13px;color:#333}.trading-records[data-v-bdf54cd6] .ant-table-container{overflow-x:visible}.trading-records[data-v-bdf54cd6] .ant-table-body{overflow-x:auto;overflow-y:visible;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.trading-records[data-v-bdf54cd6] .ant-table-body::-webkit-scrollbar{height:6px;width:6px}.trading-records[data-v-bdf54cd6] .ant-table-body::-webkit-scrollbar-track{background:transparent;border-radius:3px}.trading-records[data-v-bdf54cd6] .ant-table-body::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.trading-records[data-v-bdf54cd6] .ant-table-body::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.trading-records[data-v-bdf54cd6] .ant-table-container{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.trading-records[data-v-bdf54cd6] .ant-table-container::-webkit-scrollbar{height:6px;width:6px}.trading-records[data-v-bdf54cd6] .ant-table-container::-webkit-scrollbar-track{background:transparent;border-radius:3px}.trading-records[data-v-bdf54cd6] .ant-table-container::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.trading-records[data-v-bdf54cd6] .ant-table-container::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.trading-records[data-v-bdf54cd6] .ant-table-content{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.trading-records[data-v-bdf54cd6] .ant-table-content::-webkit-scrollbar{height:6px;width:6px}.trading-records[data-v-bdf54cd6] .ant-table-content::-webkit-scrollbar-track{background:transparent;border-radius:3px}.trading-records[data-v-bdf54cd6] .ant-table-content::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.trading-records[data-v-bdf54cd6] .ant-table-content::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.trading-records[data-v-bdf54cd6] .ant-table-tbody>tr>td,.trading-records[data-v-bdf54cd6] .ant-table-thead>tr>th{white-space:nowrap}.trading-records[data-v-bdf54cd6] .ant-table-thead>tr>th{background:-webkit-gradient(linear,left top,left bottom,from(#f8fafc),to(#f1f5f9));background:linear-gradient(180deg,#f8fafc,#f1f5f9);font-weight:600;color:#475569;border-bottom:2px solid #e2e8f0;padding:12px 16px;font-size:13px}.trading-records[data-v-bdf54cd6] .ant-table-tbody>tr>td{padding:12px 16px;color:#334155;border-bottom:1px solid #f1f5f9;-webkit-transition:background .2s ease;transition:background .2s ease}.trading-records[data-v-bdf54cd6] .ant-table-tbody>tr:hover>td{background:#f0f7ff!important}.trading-records[data-v-bdf54cd6] .ant-tag{border-radius:6px;padding:3px 10px;font-weight:600;font-size:11px;border:none;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-records[data-v-bdf54cd6] .ant-tag[color=cyan],.trading-records[data-v-bdf54cd6] .ant-tag[color=green],.trading-records[data-v-bdf54cd6] .ant-tag[color=lime]{background:linear-gradient(135deg,rgba(14,203,129,.15),rgba(14,203,129,.08));color:#0ecb81;border:1px solid rgba(14,203,129,.3)}.trading-records[data-v-bdf54cd6] .ant-tag[color=magenta],.trading-records[data-v-bdf54cd6] .ant-tag[color=red]{background:linear-gradient(135deg,rgba(246,70,93,.15),rgba(246,70,93,.08));color:#f6465d;border:1px solid rgba(246,70,93,.3)}.trading-records[data-v-bdf54cd6] .ant-tag[color=orange]{background:linear-gradient(135deg,rgba(250,173,20,.15),rgba(250,173,20,.08));color:#d48806;border:1px solid rgba(250,173,20,.3)}.trading-records[data-v-bdf54cd6] .ant-tag[color=blue]{background:linear-gradient(135deg,rgba(24,144,255,.15),rgba(24,144,255,.08));color:#1890ff;border:1px solid rgba(24,144,255,.3)}.trading-records[data-v-bdf54cd6] .ant-pagination{margin-top:16px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-item{border-radius:8px;border:1px solid #e2e8f0;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-item:hover{border-color:#1890ff}.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-item:hover a{color:#1890ff}.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-item.ant-pagination-item-active{background:linear-gradient(135deg,#1890ff,#40a9ff);border-color:#1890ff}.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-item.ant-pagination-item-active a{color:#fff}.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-next .ant-pagination-item-link,.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-prev .ant-pagination-item-link{border-radius:8px;border:1px solid #e2e8f0;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-next .ant-pagination-item-link:hover,.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-prev .ant-pagination-item-link:hover{border-color:#1890ff;color:#1890ff}.theme-dark .trading-records[data-v-bdf54cd6] .ant-table,.trading-records.theme-dark[data-v-bdf54cd6] .ant-table{background:#1c1c1c!important;color:#d1d4dc!important}.theme-dark .trading-records[data-v-bdf54cd6] .ant-table-thead>tr>th,.trading-records.theme-dark[data-v-bdf54cd6] .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important;font-weight:600}.theme-dark .trading-records[data-v-bdf54cd6] .ant-table-tbody>tr>td,.trading-records.theme-dark[data-v-bdf54cd6] .ant-table-tbody>tr>td{background:#1c1c1c!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records[data-v-bdf54cd6] .ant-table-tbody>tr:hover>td,.trading-records.theme-dark[data-v-bdf54cd6] .ant-table-tbody>tr:hover>td{background:#2a2e39!important}.theme-dark .trading-records[data-v-bdf54cd6] .ant-table-tbody>tr>td span,.trading-records.theme-dark[data-v-bdf54cd6] .ant-table-tbody>tr>td span{color:#d1d4dc!important}.theme-dark .trading-records[data-v-bdf54cd6] .ant-empty .ant-empty-description,.trading-records.theme-dark[data-v-bdf54cd6] .ant-empty .ant-empty-description{color:hsla(0,0%,100%,.35)}.trading-records[data-v-bdf54cd6] .ant-table-tbody>tr:hover>td{background:#fafafa}@media (max-width:768px){.trading-records[data-v-bdf54cd6]{min-height:200px;overflow-x:visible}.trading-records[data-v-bdf54cd6] .ant-table{font-size:12px}.trading-records[data-v-bdf54cd6] .ant-table-body,.trading-records[data-v-bdf54cd6] .ant-table-container,.trading-records[data-v-bdf54cd6] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.trading-records[data-v-bdf54cd6] .ant-table-body::-webkit-scrollbar,.trading-records[data-v-bdf54cd6] .ant-table-container::-webkit-scrollbar,.trading-records[data-v-bdf54cd6] .ant-table-wrapper::-webkit-scrollbar{height:4px;width:4px}.trading-records[data-v-bdf54cd6] .ant-table-body::-webkit-scrollbar-track,.trading-records[data-v-bdf54cd6] .ant-table-container::-webkit-scrollbar-track,.trading-records[data-v-bdf54cd6] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:2px}.trading-records[data-v-bdf54cd6] .ant-table-body::-webkit-scrollbar-thumb,.trading-records[data-v-bdf54cd6] .ant-table-container::-webkit-scrollbar-thumb,.trading-records[data-v-bdf54cd6] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:2px}.trading-records[data-v-bdf54cd6] .ant-table-body::-webkit-scrollbar-thumb:hover,.trading-records[data-v-bdf54cd6] .ant-table-container::-webkit-scrollbar-thumb:hover,.trading-records[data-v-bdf54cd6] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.trading-records[data-v-bdf54cd6] .ant-table-tbody>tr>td,.trading-records[data-v-bdf54cd6] .ant-table-thead>tr>th{padding:8px 10px;font-size:11px;white-space:nowrap}.trading-records[data-v-bdf54cd6] .ant-pagination{margin-top:12px;text-align:center}.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-item,.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-next,.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-prev{margin:0 2px;min-width:28px;height:28px;line-height:26px;font-size:12px}}@media (max-width:480px){.trading-records[data-v-bdf54cd6] .ant-table{font-size:11px}.trading-records[data-v-bdf54cd6] .ant-table-tbody>tr>td,.trading-records[data-v-bdf54cd6] .ant-table-thead>tr>th{padding:6px 8px;font-size:10px}}.theme-dark .trading-records .ant-table-tbody>tr>td,.theme-dark .trading-records[data-v] .ant-table-tbody>tr>td,body.dark .trading-records .ant-table-tbody>tr>td,body.realdark .trading-records .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1c1c1c!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records .ant-table-thead>tr>th,.theme-dark .trading-records[data-v] .ant-table-thead>tr>th,body.dark .trading-records .ant-table-thead>tr>th,body.realdark .trading-records .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important;font-weight:600!important}.theme-dark .trading-records .ant-table,.theme-dark .trading-records[data-v] .ant-table,body.dark .trading-records .ant-table,body.realdark .trading-records .ant-table{background:#1c1c1c!important;color:#d1d4dc!important}.theme-dark .trading-records .ant-table-tbody>tr>td *,.theme-dark .trading-records[data-v] .ant-table-tbody>tr>td *,body.dark .trading-records .ant-table-tbody>tr>td *,body.realdark .trading-records .ant-table-tbody>tr>td *{color:#d1d4dc!important}.theme-dark .trading-records .ant-table-tbody>tr:hover>td,.theme-dark .trading-records[data-v] .ant-table-tbody>tr:hover>td,body.dark .trading-records .ant-table-tbody>tr:hover>td,body.realdark .trading-records .ant-table-tbody>tr:hover>td{background:#2a2e39!important}.theme-dark .trading-records .ant-table-thead>tr>th .ant-table-column-title,.theme-dark .trading-records[data-v] .ant-table-thead>tr>th .ant-table-column-title,body.dark .trading-records .ant-table-thead>tr>th .ant-table-column-title,body.realdark .trading-records .ant-table-thead>tr>th .ant-table-column-title{color:#d1d4dc!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-table-tbody>tr:hover>td{background:#2a2e39!important}body.dark .trading-records[data-v-8a68b65a] .ant-table-tbody>tr>td,body.realdark .trading-records[data-v-8a68b65a] .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1c1c1c!important;border-bottom-color:#363c4e!important}body.dark .trading-records[data-v-8a68b65a] .ant-table-thead>tr>th,body.realdark .trading-records[data-v-8a68b65a] .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records[data-v] .ant-table-tbody>tr>td,body.dark .trading-records[data-v] .ant-table-tbody>tr>td,body.realdark .trading-records[data-v] .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1c1c1c!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records[data-v] .ant-table-thead>tr>th,body.dark .trading-records[data-v] .ant-table-thead>tr>th,body.realdark .trading-records[data-v] .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item{background:#1c1c1c!important;border-color:#363c4e!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item a,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item a,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item a{color:#d1d4dc!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover{border-color:#1890ff!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover a,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover a,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover a{color:#1890ff!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item-active,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item-active,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item-active{background:#1890ff!important;border-color:#1890ff!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item-active a,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item-active a,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item-active a{color:#fff!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-next .ant-pagination-item-link,.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-prev .ant-pagination-item-link,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-next .ant-pagination-item-link,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-prev .ant-pagination-item-link,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-next .ant-pagination-item-link,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-prev .ant-pagination-item-link{background:#1c1c1c!important;border-color:#363c4e!important;color:#d1d4dc!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-next:hover .ant-pagination-item-link,.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-prev:hover .ant-pagination-item-link,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-next:hover .ant-pagination-item-link,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-prev:hover .ant-pagination-item-link,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-next:hover .ant-pagination-item-link,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-prev:hover .ant-pagination-item-link{border-color:#1890ff!important;color:#1890ff!important}.theme-dark .trading-records[data-v] .ant-pagination-item,body.dark .trading-records[data-v] .ant-pagination-item,body.realdark .trading-records[data-v] .ant-pagination-item{background:#1c1c1c!important;border-color:#363c4e!important}.theme-dark .trading-records[data-v] .ant-pagination-item a,body.dark .trading-records[data-v] .ant-pagination-item a,body.realdark .trading-records[data-v] .ant-pagination-item a{color:#d1d4dc!important}.theme-dark .trading-records[data-v] .ant-pagination-item:hover,body.dark .trading-records[data-v] .ant-pagination-item:hover,body.realdark .trading-records[data-v] .ant-pagination-item:hover{border-color:#1890ff!important}.theme-dark .trading-records[data-v] .ant-pagination-item:hover a,body.dark .trading-records[data-v] .ant-pagination-item:hover a,body.realdark .trading-records[data-v] .ant-pagination-item:hover a{color:#1890ff!important}.theme-dark .trading-records[data-v] .ant-pagination-item-active,body.dark .trading-records[data-v] .ant-pagination-item-active,body.realdark .trading-records[data-v] .ant-pagination-item-active{background:#1890ff!important;border-color:#1890ff!important}.theme-dark .trading-records[data-v] .ant-pagination-item-active a,body.dark .trading-records[data-v] .ant-pagination-item-active a,body.realdark .trading-records[data-v] .ant-pagination-item-active a{color:#fff!important}.theme-dark .trading-records[data-v] .ant-pagination-next .ant-pagination-item-link,.theme-dark .trading-records[data-v] .ant-pagination-prev .ant-pagination-item-link,body.dark .trading-records[data-v] .ant-pagination-next .ant-pagination-item-link,body.dark .trading-records[data-v] .ant-pagination-prev .ant-pagination-item-link,body.realdark .trading-records[data-v] .ant-pagination-next .ant-pagination-item-link,body.realdark .trading-records[data-v] .ant-pagination-prev .ant-pagination-item-link{background:#1c1c1c!important;border-color:#363c4e!important;color:#d1d4dc!important}.theme-dark .trading-records[data-v] .ant-pagination-next:hover .ant-pagination-item-link,.theme-dark .trading-records[data-v] .ant-pagination-prev:hover .ant-pagination-item-link,body.dark .trading-records[data-v] .ant-pagination-next:hover .ant-pagination-item-link,body.dark .trading-records[data-v] .ant-pagination-prev:hover .ant-pagination-item-link,body.realdark .trading-records[data-v] .ant-pagination-next:hover .ant-pagination-item-link,body.realdark .trading-records[data-v] .ant-pagination-prev:hover .ant-pagination-item-link{border-color:#1890ff!important;color:#1890ff!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-table-body,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-container,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-content,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-wrapper,body.dark .trading-records[data-v-8a68b65a] .ant-table-body,body.dark .trading-records[data-v-8a68b65a] .ant-table-container,body.dark .trading-records[data-v-8a68b65a] .ant-table-content,body.dark .trading-records[data-v-8a68b65a] .ant-table-wrapper,body.realdark .trading-records[data-v-8a68b65a] .ant-table-body,body.realdark .trading-records[data-v-8a68b65a] .ant-table-container,body.realdark .trading-records[data-v-8a68b65a] .ant-table-content,body.realdark .trading-records[data-v-8a68b65a] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(209,212,220,.3) transparent}.theme-dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar,body.dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar,body.dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar,body.dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar,body.dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar,body.realdark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar,body.realdark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar,body.realdark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar,body.realdark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.theme-dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-track,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-track,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-track,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-track,body.dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-track,body.dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-track,body.dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-track,body.dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-track,body.realdark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-track,body.realdark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-track,body.realdark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-track,body.realdark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.theme-dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-thumb,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-thumb,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-thumb,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-thumb,body.dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-thumb,body.dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-thumb,body.dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-thumb,body.dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(209,212,220,.3);border-radius:3px}.theme-dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(209,212,220,.5)}.theme-dark .trading-records[data-v] .ant-table-body,.theme-dark .trading-records[data-v] .ant-table-container,.theme-dark .trading-records[data-v] .ant-table-content,.theme-dark .trading-records[data-v] .ant-table-wrapper,body.dark .trading-records[data-v] .ant-table-body,body.dark .trading-records[data-v] .ant-table-container,body.dark .trading-records[data-v] .ant-table-content,body.dark .trading-records[data-v] .ant-table-wrapper,body.realdark .trading-records[data-v] .ant-table-body,body.realdark .trading-records[data-v] .ant-table-container,body.realdark .trading-records[data-v] .ant-table-content,body.realdark .trading-records[data-v] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(209,212,220,.3) transparent}.theme-dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar,.theme-dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar,.theme-dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar,.theme-dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar,body.dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar,body.dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar,body.dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar,body.dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar,body.realdark .trading-records[data-v] .ant-table-body::-webkit-scrollbar,body.realdark .trading-records[data-v] .ant-table-container::-webkit-scrollbar,body.realdark .trading-records[data-v] .ant-table-content::-webkit-scrollbar,body.realdark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.theme-dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-track,.theme-dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-track,.theme-dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-track,.theme-dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-track,body.dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-track,body.dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-track,body.dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-track,body.dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-track,body.realdark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-track,body.realdark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-track,body.realdark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-track,body.realdark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.theme-dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-thumb,.theme-dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-thumb,.theme-dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-thumb,.theme-dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb,body.dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-thumb,body.dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-thumb,body.dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-thumb,body.dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(209,212,220,.3);border-radius:3px}.theme-dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(209,212,220,.5)}.theme-dark .trading-records ::v-deep .ant-table{background:#1c1c1c!important;color:#d1d4dc!important}.theme-dark .trading-records ::v-deep .ant-table table{background:#1c1c1c!important;color:#d1d4dc!important}.theme-dark .trading-records ::v-deep .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records ::v-deep .ant-table-tbody{color:#d1d4dc!important}.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td{background:#1c1c1c!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td div,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td span{color:#d1d4dc!important}.theme-dark .trading-records ::v-deep .ant-table-tbody>tr:hover>td{background:#2a2e39!important}.theme-dark .trading-records ::v-deep .ant-table-placeholder{background:#1c1c1c!important;color:#868993!important}.theme-dark .trading-records ::v-deep .ant-table-body,.theme-dark .trading-records ::v-deep .ant-table-container,.theme-dark .trading-records ::v-deep .ant-table-content,.theme-dark .trading-records ::v-deep .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(209,212,220,.3) transparent}.theme-dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar,.theme-dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar,.theme-dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar,.theme-dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.theme-dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-track,.theme-dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-track,.theme-dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-track,.theme-dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.theme-dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-thumb,.theme-dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-thumb,.theme-dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-thumb,.theme-dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(209,212,220,.3);border-radius:3px}.theme-dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(209,212,220,.5)}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item{background:#1c1c1c!important;border-color:#363c4e!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item a{color:#d1d4dc!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover{border-color:#1890ff!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a{color:#1890ff!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active{background:#1890ff!important;border-color:#1890ff!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active a{color:#fff!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link{background:#1c1c1c!important;border-color:#363c4e!important;color:#d1d4dc!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link{border-color:#1890ff!important;color:#1890ff!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector{background:#1c1c1c!important;border-color:#363c4e!important;color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-table,body.realdark .trading-records ::v-deep .ant-table{background:#1c1c1c!important;color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-table table,body.realdark .trading-records ::v-deep .ant-table table{background:#1c1c1c!important;color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-table-thead>tr>th,body.realdark .trading-records ::v-deep .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}body.dark .trading-records ::v-deep .ant-table-tbody,body.realdark .trading-records ::v-deep .ant-table-tbody{color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-table-tbody>tr>td,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td{background:#1c1c1c!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}body.dark .trading-records ::v-deep .ant-table-tbody>tr>td,body.dark .trading-records ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),body.dark .trading-records ::v-deep .ant-table-tbody>tr>td div,body.dark .trading-records ::v-deep .ant-table-tbody>tr>td span,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td div,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td span{color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-table-tbody>tr:hover>td,body.realdark .trading-records ::v-deep .ant-table-tbody>tr:hover>td{background:#2a2e39!important}body.dark .trading-records ::v-deep .ant-table-placeholder,body.realdark .trading-records ::v-deep .ant-table-placeholder{background:#1c1c1c!important;color:#868993!important}body.dark .trading-records ::v-deep .ant-table-body,body.dark .trading-records ::v-deep .ant-table-container,body.dark .trading-records ::v-deep .ant-table-content,body.dark .trading-records ::v-deep .ant-table-wrapper,body.realdark .trading-records ::v-deep .ant-table-body,body.realdark .trading-records ::v-deep .ant-table-container,body.realdark .trading-records ::v-deep .ant-table-content,body.realdark .trading-records ::v-deep .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(209,212,220,.3) transparent}body.dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar,body.dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar,body.dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar,body.dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar,body.realdark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar,body.realdark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar,body.realdark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar,body.realdark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}body.dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-track,body.dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-track,body.dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-track,body.dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-track,body.realdark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-track,body.realdark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-track,body.realdark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-track,body.realdark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}body.dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-thumb,body.dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-thumb,body.dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-thumb,body.dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-thumb,body.realdark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-thumb,body.realdark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-thumb,body.realdark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-thumb,body.realdark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(209,212,220,.3);border-radius:3px}body.dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-thumb:hover,body.dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-thumb:hover,body.dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-thumb:hover,body.dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.realdark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-thumb:hover,body.realdark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-thumb:hover,body.realdark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-thumb:hover,body.realdark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(209,212,220,.5)}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item{background:#1c1c1c!important;border-color:#363c4e!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item a,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item a{color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover{border-color:#1890ff!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a{color:#1890ff!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active{background:#1890ff!important;border-color:#1890ff!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active a,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active a{color:#fff!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link{background:#1c1c1c!important;border-color:#363c4e!important;color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link{border-color:#1890ff!important;color:#1890ff!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector{background:#1c1c1c!important;border-color:#363c4e!important;color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-table,.theme-dark .trading-records ::v-deep .ant-table,body.dark .trading-records * ::v-deep .ant-table,body.dark .trading-records ::v-deep .ant-table,body.realdark .trading-records * ::v-deep .ant-table,body.realdark .trading-records ::v-deep .ant-table{background:#1c1c1c!important;color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-table table,.theme-dark .trading-records ::v-deep .ant-table table,body.dark .trading-records * ::v-deep .ant-table table,body.dark .trading-records ::v-deep .ant-table table,body.realdark .trading-records * ::v-deep .ant-table table,body.realdark .trading-records ::v-deep .ant-table table{background:#1c1c1c!important;color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-table-thead>tr>th,.theme-dark .trading-records ::v-deep .ant-table-thead>tr>th,body.dark .trading-records * ::v-deep .ant-table-thead>tr>th,body.dark .trading-records ::v-deep .ant-table-thead>tr>th,body.realdark .trading-records * ::v-deep .ant-table-thead>tr>th,body.realdark .trading-records ::v-deep .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records * ::v-deep .ant-table-tbody,.theme-dark .trading-records ::v-deep .ant-table-tbody,body.dark .trading-records * ::v-deep .ant-table-tbody,body.dark .trading-records ::v-deep .ant-table-tbody,body.realdark .trading-records * ::v-deep .ant-table-tbody,body.realdark .trading-records ::v-deep .ant-table-tbody{color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-table-tbody>tr>td,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td,body.dark .trading-records * ::v-deep .ant-table-tbody>tr>td,body.dark .trading-records ::v-deep .ant-table-tbody>tr>td,body.realdark .trading-records * ::v-deep .ant-table-tbody>tr>td,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td{background:#1c1c1c!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records * ::v-deep .ant-table-tbody>tr>td,.theme-dark .trading-records * ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),.theme-dark .trading-records * ::v-deep .ant-table-tbody>tr>td div,.theme-dark .trading-records * ::v-deep .ant-table-tbody>tr>td span,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td div,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td span,body.dark .trading-records * ::v-deep .ant-table-tbody>tr>td,body.dark .trading-records * ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),body.dark .trading-records * ::v-deep .ant-table-tbody>tr>td div,body.dark .trading-records * ::v-deep .ant-table-tbody>tr>td span,body.dark .trading-records ::v-deep .ant-table-tbody>tr>td,body.dark .trading-records ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),body.dark .trading-records ::v-deep .ant-table-tbody>tr>td div,body.dark .trading-records ::v-deep .ant-table-tbody>tr>td span,body.realdark .trading-records * ::v-deep .ant-table-tbody>tr>td,body.realdark .trading-records * ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),body.realdark .trading-records * ::v-deep .ant-table-tbody>tr>td div,body.realdark .trading-records * ::v-deep .ant-table-tbody>tr>td span,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td div,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td span{color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-table-tbody>tr:hover>td,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr:hover>td,body.dark .trading-records * ::v-deep .ant-table-tbody>tr:hover>td,body.dark .trading-records ::v-deep .ant-table-tbody>tr:hover>td,body.realdark .trading-records * ::v-deep .ant-table-tbody>tr:hover>td,body.realdark .trading-records ::v-deep .ant-table-tbody>tr:hover>td{background:#2a2e39!important}.theme-dark .trading-records * ::v-deep .ant-table-placeholder,.theme-dark .trading-records ::v-deep .ant-table-placeholder,body.dark .trading-records * ::v-deep .ant-table-placeholder,body.dark .trading-records ::v-deep .ant-table-placeholder,body.realdark .trading-records * ::v-deep .ant-table-placeholder,body.realdark .trading-records ::v-deep .ant-table-placeholder{background:#1c1c1c!important;color:#868993!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-item,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item{background:#1c1c1c!important;border-color:#363c4e!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item a,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item a,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item a,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item a,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-item a,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item a{color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover{border-color:#1890ff!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover a,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover a,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover a,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a{color:#1890ff!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active{background:#1890ff!important;border-color:#1890ff!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active a,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active a,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active a,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active a,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active a,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active a{color:#fff!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link{background:#1c1c1c!important;border-color:#363c4e!important;color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link{border-color:#1890ff!important;color:#1890ff!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector{background:#1c1c1c!important;border-color:#363c4e!important;color:#d1d4dc!important}.position-records[data-v-6ba7d922]{width:100%;min-height:300px;padding:0}.position-records .empty-state[data-v-6ba7d922]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;min-height:220px;padding:40px 16px;border-radius:8px;background:#fafafa;border:1px solid #f0f0f0}.position-records.theme-dark .empty-state[data-v-6ba7d922]{background:#141414;border-color:hsla(0,0%,100%,.08)}.position-records[data-v-6ba7d922] .ant-table{font-size:13px;color:#333}.position-records[data-v-6ba7d922] .ant-table-body{overflow-x:auto;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.position-records[data-v-6ba7d922] .ant-table-body::-webkit-scrollbar{height:6px;width:6px}.position-records[data-v-6ba7d922] .ant-table-body::-webkit-scrollbar-track{background:transparent;border-radius:3px}.position-records[data-v-6ba7d922] .ant-table-body::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.position-records[data-v-6ba7d922] .ant-table-body::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.position-records[data-v-6ba7d922] .ant-table-container{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.position-records[data-v-6ba7d922] .ant-table-container::-webkit-scrollbar{height:6px;width:6px}.position-records[data-v-6ba7d922] .ant-table-container::-webkit-scrollbar-track{background:transparent;border-radius:3px}.position-records[data-v-6ba7d922] .ant-table-container::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.position-records[data-v-6ba7d922] .ant-table-container::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.position-records[data-v-6ba7d922] .ant-table-content,.position-records[data-v-6ba7d922] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.position-records[data-v-6ba7d922] .ant-table-content::-webkit-scrollbar,.position-records[data-v-6ba7d922] .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.position-records[data-v-6ba7d922] .ant-table-content::-webkit-scrollbar-track,.position-records[data-v-6ba7d922] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.position-records[data-v-6ba7d922] .ant-table-content::-webkit-scrollbar-thumb,.position-records[data-v-6ba7d922] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.position-records[data-v-6ba7d922] .ant-table-content::-webkit-scrollbar-thumb:hover,.position-records[data-v-6ba7d922] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.position-records[data-v-6ba7d922] .ant-table-thead>tr>th{background:-webkit-gradient(linear,left top,left bottom,from(#f8fafc),to(#f1f5f9));background:linear-gradient(180deg,#f8fafc,#f1f5f9);font-weight:600;color:#475569;border-bottom:2px solid #e2e8f0;padding:12px 16px;font-size:13px}.position-records[data-v-6ba7d922] .ant-table-tbody>tr>td{padding:12px 16px;color:#334155;border-bottom:1px solid #f1f5f9;-webkit-transition:background .2s ease;transition:background .2s ease}.position-records[data-v-6ba7d922] .ant-table-tbody>tr>td strong{color:#262626;font-weight:600}.position-records[data-v-6ba7d922] .ant-table-tbody>tr:hover>td{background:#f0f7ff!important}.position-records[data-v-6ba7d922] .ant-tag{border-radius:6px;padding:2px 10px;font-weight:600;font-size:11px;border:none}.position-records[data-v-6ba7d922] .ant-tag[color=green]{background:linear-gradient(135deg,rgba(14,203,129,.15),rgba(14,203,129,.08));color:#0ecb81;border:1px solid rgba(14,203,129,.3)}.position-records[data-v-6ba7d922] .ant-tag[color=red]{background:linear-gradient(135deg,rgba(246,70,93,.15),rgba(246,70,93,.08));color:#f6465d;border:1px solid rgba(246,70,93,.3)}.position-records.theme-dark[data-v-6ba7d922] .ant-table,.theme-dark .position-records[data-v-6ba7d922] .ant-table{background:#1c1c1c!important;color:#d1d4dc!important}.position-records.theme-dark[data-v-6ba7d922] .ant-table-thead>tr>th,.theme-dark .position-records[data-v-6ba7d922] .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important;font-weight:600}.position-records.theme-dark[data-v-6ba7d922] .ant-table-tbody>tr>td,.theme-dark .position-records[data-v-6ba7d922] .ant-table-tbody>tr>td{background:#1c1c1c!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.position-records.theme-dark[data-v-6ba7d922] .ant-table-tbody>tr:hover>td,.theme-dark .position-records[data-v-6ba7d922] .ant-table-tbody>tr:hover>td{background:#2a2e39!important}.position-records.theme-dark[data-v-6ba7d922] .ant-table-tbody>tr>td strong,.theme-dark .position-records[data-v-6ba7d922] .ant-table-tbody>tr>td strong{color:#d1d4dc!important}.position-records[data-v-6ba7d922] .ant-table-tbody>tr:hover>td{background:#fafafa}.position-records[data-v-6ba7d922] .ant-empty{margin:40px 0}.position-records[data-v-6ba7d922] .ant-empty .ant-empty-description{color:#8c8c8c}.position-records.theme-dark[data-v-6ba7d922] .ant-empty .ant-empty-description{color:hsla(0,0%,100%,.35)}.position-records .profit[data-v-6ba7d922]{color:#0ecb81;font-weight:700;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;padding:2px 8px;background:linear-gradient(135deg,rgba(14,203,129,.12),rgba(14,203,129,.06));border-radius:6px}.position-records .profit[data-v-6ba7d922]:before{content:"▲";font-size:8px}.position-records .loss[data-v-6ba7d922]{color:#f6465d;font-weight:700;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;padding:2px 8px;background:linear-gradient(135deg,rgba(246,70,93,.12),rgba(246,70,93,.06));border-radius:6px}.position-records .loss[data-v-6ba7d922]:before{content:"▼";font-size:8px}@media (max-width:768px){.position-records[data-v-6ba7d922]{min-height:200px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.position-records[data-v-6ba7d922]::-webkit-scrollbar{height:4px;width:4px}.position-records[data-v-6ba7d922]::-webkit-scrollbar-track{background:transparent;border-radius:2px}.position-records[data-v-6ba7d922]::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:2px}.position-records[data-v-6ba7d922]::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.position-records .empty-state[data-v-6ba7d922]{min-height:150px;padding:20px 0}.position-records[data-v-6ba7d922] .ant-table{font-size:12px;min-width:700px}.position-records[data-v-6ba7d922] .ant-table-body,.position-records[data-v-6ba7d922] .ant-table-container,.position-records[data-v-6ba7d922] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.position-records[data-v-6ba7d922] .ant-table-body::-webkit-scrollbar,.position-records[data-v-6ba7d922] .ant-table-container::-webkit-scrollbar,.position-records[data-v-6ba7d922] .ant-table-wrapper::-webkit-scrollbar{height:4px;width:4px}.position-records[data-v-6ba7d922] .ant-table-body::-webkit-scrollbar-track,.position-records[data-v-6ba7d922] .ant-table-container::-webkit-scrollbar-track,.position-records[data-v-6ba7d922] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:2px}.position-records[data-v-6ba7d922] .ant-table-body::-webkit-scrollbar-thumb,.position-records[data-v-6ba7d922] .ant-table-container::-webkit-scrollbar-thumb,.position-records[data-v-6ba7d922] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:2px}.position-records[data-v-6ba7d922] .ant-table-body::-webkit-scrollbar-thumb:hover,.position-records[data-v-6ba7d922] .ant-table-container::-webkit-scrollbar-thumb:hover,.position-records[data-v-6ba7d922] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.position-records[data-v-6ba7d922] .ant-table-tbody>tr>td,.position-records[data-v-6ba7d922] .ant-table-thead>tr>th{padding:8px 10px;font-size:11px;white-space:nowrap}.position-records[data-v-6ba7d922] .ant-empty{margin:20px 0}}@media (max-width:480px){.position-records[data-v-6ba7d922] .ant-table{font-size:11px;min-width:600px}.position-records[data-v-6ba7d922] .ant-table-tbody>tr>td,.position-records[data-v-6ba7d922] .ant-table-thead>tr>th{padding:6px 8px;font-size:10px}.position-records .loss[data-v-6ba7d922],.position-records .profit[data-v-6ba7d922]{font-size:11px}}.theme-dark .position-records .ant-table-tbody>tr>td,.theme-dark .position-records[data-v] .ant-table-tbody>tr>td,body.dark .position-records .ant-table-tbody>tr>td,body.realdark .position-records .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1c1c1c!important;border-bottom-color:#363c4e!important}.theme-dark .position-records .ant-table-thead>tr>th,.theme-dark .position-records[data-v] .ant-table-thead>tr>th,body.dark .position-records .ant-table-thead>tr>th,body.realdark .position-records .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important;font-weight:600!important}.theme-dark .position-records .ant-table,.theme-dark .position-records[data-v] .ant-table,body.dark .position-records .ant-table,body.realdark .position-records .ant-table{background:#1c1c1c!important;color:#d1d4dc!important}.theme-dark .position-records .ant-table-tbody>tr>td *,.theme-dark .position-records[data-v] .ant-table-tbody>tr>td *,body.dark .position-records .ant-table-tbody>tr>td *,body.realdark .position-records .ant-table-tbody>tr>td *{color:#d1d4dc!important}.theme-dark .position-records .ant-table-tbody>tr:hover>td,.theme-dark .position-records[data-v] .ant-table-tbody>tr:hover>td,body.dark .position-records .ant-table-tbody>tr:hover>td,body.realdark .position-records .ant-table-tbody>tr:hover>td{background:#2a2e39!important}.theme-dark .position-records .ant-table-thead>tr>th .ant-table-column-title,.theme-dark .position-records[data-v] .ant-table-thead>tr>th .ant-table-column-title,body.dark .position-records .ant-table-thead>tr>th .ant-table-column-title,body.realdark .position-records .ant-table-thead>tr>th .ant-table-column-title{color:#d1d4dc!important}.theme-dark .position-records[data-v] .ant-table-tbody>tr>td,.theme-dark [class*=position-records][data-v] .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1c1c1c!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v] .ant-table-thead>tr>th,.theme-dark [class*=position-records][data-v] .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v-6c1eb557] .ant-table-tbody>tr>td,.theme-dark [data-v-6c1eb557] .ant-table-tbody>tr>td,.theme-dark [data-v-6c1eb557] .position-records .ant-table-tbody>tr>td,.theme-dark [data-v-6c1eb557].position-records .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1c1c1c!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v-6c1eb557] .ant-table-thead>tr>th,.theme-dark [data-v-6c1eb557].position-records .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v-6c1eb557] .ant-table,.theme-dark [data-v-6c1eb557].position-records .ant-table{background:#1c1c1c!important;color:#d1d4dc!important}.theme-dark .position-records[data-v-6c1eb557] .ant-table-tbody>tr:hover>td,.theme-dark [data-v-6c1eb557].position-records .ant-table-tbody>tr:hover>td{background:#2a2e39!important}body.dark .position-records[data-v-6c1eb557] .ant-table-tbody>tr>td,body.dark [data-v-6c1eb557] .ant-table-tbody>tr>td,body.dark [data-v-6c1eb557] .position-records .ant-table-tbody>tr>td,body.dark [data-v-6c1eb557].position-records .ant-table-tbody>tr>td,body.realdark .position-records[data-v-6c1eb557] .ant-table-tbody>tr>td,body.realdark [data-v-6c1eb557] .ant-table-tbody>tr>td,body.realdark [data-v-6c1eb557] .position-records .ant-table-tbody>tr>td,body.realdark [data-v-6c1eb557].position-records .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1c1c1c!important;border-bottom-color:#363c4e!important}body.dark .position-records[data-v-6c1eb557] .ant-table-thead>tr>th,body.dark [data-v-6c1eb557] .ant-table-thead>tr>th,body.dark [data-v-6c1eb557] .position-records .ant-table-thead>tr>th,body.dark [data-v-6c1eb557].position-records .ant-table-thead>tr>th,body.realdark .position-records[data-v-6c1eb557] .ant-table-thead>tr>th,body.realdark [data-v-6c1eb557] .ant-table-thead>tr>th,body.realdark [data-v-6c1eb557] .position-records .ant-table-thead>tr>th,body.realdark [data-v-6c1eb557].position-records .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v] .ant-table-tbody>tr>td,body.dark .position-records[data-v] .ant-table-tbody>tr>td,body.realdark .position-records[data-v] .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1c1c1c!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v] .ant-table-thead>tr>th,body.dark .position-records[data-v] .ant-table-thead>tr>th,body.realdark .position-records[data-v] .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v-6c1eb557] .ant-empty .ant-empty-description,body.dark .position-records[data-v-6c1eb557] .ant-empty .ant-empty-description,body.realdark .position-records[data-v-6c1eb557] .ant-empty .ant-empty-description{color:#868993!important}.theme-dark .position-records[data-v-6c1eb557] .profit,body.dark .position-records[data-v-6c1eb557] .profit,body.realdark .position-records[data-v-6c1eb557] .profit{color:#52c41a!important}.theme-dark .position-records[data-v-6c1eb557] .loss,body.dark .position-records[data-v-6c1eb557] .loss,body.realdark .position-records[data-v-6c1eb557] .loss{color:#ff4d4f!important}.theme-dark .trading-assistant .position-records[data-v-6c1eb557] .ant-table-tbody>tr>td,.theme-dark .trading-assistant [data-v-6c1eb557].position-records .ant-table-tbody>tr>td,body.dark .trading-assistant .position-records[data-v-6c1eb557] .ant-table-tbody>tr>td,body.dark .trading-assistant [data-v-6c1eb557].position-records .ant-table-tbody>tr>td,body.realdark .trading-assistant .position-records[data-v-6c1eb557] .ant-table-tbody>tr>td,body.realdark .trading-assistant [data-v-6c1eb557].position-records .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1c1c1c!important;border-bottom-color:#363c4e!important}.theme-dark .trading-assistant .position-records[data-v-6c1eb557] .ant-table-thead>tr>th,.theme-dark .trading-assistant [data-v-6c1eb557].position-records .ant-table-thead>tr>th,body.dark .trading-assistant .position-records[data-v-6c1eb557] .ant-table-thead>tr>th,body.dark .trading-assistant [data-v-6c1eb557].position-records .ant-table-thead>tr>th,body.realdark .trading-assistant .position-records[data-v-6c1eb557] .ant-table-thead>tr>th,body.realdark .trading-assistant [data-v-6c1eb557].position-records .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v-6c1eb557] .ant-table-body,.theme-dark .position-records[data-v-6c1eb557] .ant-table-container,.theme-dark .position-records[data-v-6c1eb557] .ant-table-content,.theme-dark .position-records[data-v-6c1eb557] .ant-table-wrapper,body.dark .position-records[data-v-6c1eb557] .ant-table-body,body.dark .position-records[data-v-6c1eb557] .ant-table-container,body.dark .position-records[data-v-6c1eb557] .ant-table-content,body.dark .position-records[data-v-6c1eb557] .ant-table-wrapper,body.realdark .position-records[data-v-6c1eb557] .ant-table-body,body.realdark .position-records[data-v-6c1eb557] .ant-table-container,body.realdark .position-records[data-v-6c1eb557] .ant-table-content,body.realdark .position-records[data-v-6c1eb557] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(209,212,220,.3) transparent}.theme-dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar,.theme-dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar,.theme-dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar,.theme-dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar,body.dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar,body.dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar,body.dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar,body.dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar,body.realdark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar,body.realdark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar,body.realdark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar,body.realdark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.theme-dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-track,.theme-dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-track,.theme-dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-track,.theme-dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-track,body.dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-track,body.dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-track,body.dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-track,body.dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-track,body.realdark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-track,body.realdark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-track,body.realdark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-track,body.realdark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.theme-dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-thumb,.theme-dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-thumb,.theme-dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-thumb,.theme-dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-thumb,body.dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-thumb,body.dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-thumb,body.dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-thumb,body.dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-thumb,body.realdark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-thumb,body.realdark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-thumb,body.realdark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-thumb,body.realdark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(209,212,220,.3);border-radius:3px}.theme-dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-thumb:hover,.theme-dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-thumb:hover,.theme-dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-thumb:hover,.theme-dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(209,212,220,.5)}.theme-dark .position-records[data-v] .ant-table-body,.theme-dark .position-records[data-v] .ant-table-container,.theme-dark .position-records[data-v] .ant-table-content,.theme-dark .position-records[data-v] .ant-table-wrapper,body.dark .position-records[data-v] .ant-table-body,body.dark .position-records[data-v] .ant-table-container,body.dark .position-records[data-v] .ant-table-content,body.dark .position-records[data-v] .ant-table-wrapper,body.realdark .position-records[data-v] .ant-table-body,body.realdark .position-records[data-v] .ant-table-container,body.realdark .position-records[data-v] .ant-table-content,body.realdark .position-records[data-v] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(209,212,220,.3) transparent}.theme-dark .position-records[data-v] .ant-table-body::-webkit-scrollbar,.theme-dark .position-records[data-v] .ant-table-container::-webkit-scrollbar,.theme-dark .position-records[data-v] .ant-table-content::-webkit-scrollbar,.theme-dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar,body.dark .position-records[data-v] .ant-table-body::-webkit-scrollbar,body.dark .position-records[data-v] .ant-table-container::-webkit-scrollbar,body.dark .position-records[data-v] .ant-table-content::-webkit-scrollbar,body.dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar,body.realdark .position-records[data-v] .ant-table-body::-webkit-scrollbar,body.realdark .position-records[data-v] .ant-table-container::-webkit-scrollbar,body.realdark .position-records[data-v] .ant-table-content::-webkit-scrollbar,body.realdark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.theme-dark .position-records[data-v] .ant-table-body::-webkit-scrollbar-track,.theme-dark .position-records[data-v] .ant-table-container::-webkit-scrollbar-track,.theme-dark .position-records[data-v] .ant-table-content::-webkit-scrollbar-track,.theme-dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-track,body.dark .position-records[data-v] .ant-table-body::-webkit-scrollbar-track,body.dark .position-records[data-v] .ant-table-container::-webkit-scrollbar-track,body.dark .position-records[data-v] .ant-table-content::-webkit-scrollbar-track,body.dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-track,body.realdark .position-records[data-v] .ant-table-body::-webkit-scrollbar-track,body.realdark .position-records[data-v] .ant-table-container::-webkit-scrollbar-track,body.realdark .position-records[data-v] .ant-table-content::-webkit-scrollbar-track,body.realdark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.theme-dark .position-records[data-v] .ant-table-body::-webkit-scrollbar-thumb,.theme-dark .position-records[data-v] .ant-table-container::-webkit-scrollbar-thumb,.theme-dark .position-records[data-v] .ant-table-content::-webkit-scrollbar-thumb,.theme-dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb,body.dark .position-records[data-v] .ant-table-body::-webkit-scrollbar-thumb,body.dark .position-records[data-v] .ant-table-container::-webkit-scrollbar-thumb,body.dark .position-records[data-v] .ant-table-content::-webkit-scrollbar-thumb,body.dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb,body.realdark .position-records[data-v] .ant-table-body::-webkit-scrollbar-thumb,body.realdark .position-records[data-v] .ant-table-container::-webkit-scrollbar-thumb,body.realdark .position-records[data-v] .ant-table-content::-webkit-scrollbar-thumb,body.realdark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(209,212,220,.3);border-radius:3px}.theme-dark .position-records[data-v] .ant-table-body::-webkit-scrollbar-thumb:hover,.theme-dark .position-records[data-v] .ant-table-container::-webkit-scrollbar-thumb:hover,.theme-dark .position-records[data-v] .ant-table-content::-webkit-scrollbar-thumb:hover,.theme-dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v] .ant-table-body::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v] .ant-table-container::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v] .ant-table-content::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v] .ant-table-body::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v] .ant-table-container::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v] .ant-table-content::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(209,212,220,.5)}.strategy-type-selector[data-v-8ec7ab14]{padding:8px 0}.selector-header[data-v-8ec7ab14]{text-align:center;margin-bottom:24px}.selector-header h3[data-v-8ec7ab14]{margin:0 0 4px;font-size:18px;font-weight:600}.selector-header .selector-hint[data-v-8ec7ab14]{color:#999;font-size:13px;margin:0}.mode-cards[data-v-8ec7ab14]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:16px}@media (max-width:768px){.mode-cards[data-v-8ec7ab14]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.mode-card[data-v-8ec7ab14]{-webkit-box-flex:1;-ms-flex:1;flex:1;border:2px solid #f0f0f0;border-radius:12px;padding:24px;cursor:pointer;-webkit-transition:all .3s;transition:all .3s;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center;position:relative;overflow:hidden}.mode-card[data-v-8ec7ab14]:hover{border-color:#1890ff;-webkit-box-shadow:0 4px 16px rgba(24,144,255,.12);box-shadow:0 4px 16px rgba(24,144,255,.12);-webkit-transform:translateY(-2px);transform:translateY(-2px)}.mode-card.selected[data-v-8ec7ab14]{border-color:#1890ff;background:rgba(24,144,255,.02)}.mode-card.selected[data-v-8ec7ab14]:after{content:"✓";position:absolute;top:8px;right:12px;color:#1890ff;font-size:18px;font-weight:700}.card-icon[data-v-8ec7ab14]{width:56px;height:56px;border-radius:14px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;font-size:26px;margin-bottom:16px}.card-icon.signal-icon[data-v-8ec7ab14]{background:linear-gradient(135deg,#e6f7ff,#bae7ff);color:#1890ff}.card-icon.script-icon[data-v-8ec7ab14]{background:linear-gradient(135deg,#f6ffed,#d9f7be);color:#52c41a}.card-body[data-v-8ec7ab14]{-webkit-box-flex:1;-ms-flex:1;flex:1}.card-body .card-badge-row[data-v-8ec7ab14]{margin-bottom:10px}.card-body .card-badge[data-v-8ec7ab14]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:3px 10px;border-radius:999px;background:rgba(24,144,255,.08);color:#1890ff;font-size:12px;font-weight:600;line-height:1.4}.card-body .card-badge.card-badge--script[data-v-8ec7ab14]{background:rgba(82,196,26,.12);color:#389e0d}.card-body h4[data-v-8ec7ab14]{font-size:16px;font-weight:600;margin:0 0 8px}.card-body .card-desc[data-v-8ec7ab14]{color:#666;font-size:13px;line-height:1.5;margin-bottom:12px}.card-features[data-v-8ec7ab14]{list-style:none;padding:0;margin:0 0 16px;text-align:left}.card-features li[data-v-8ec7ab14]{font-size:13px;color:#555;padding:3px 0}.card-features li .anticon[data-v-8ec7ab14]{color:#52c41a;margin-right:6px;font-size:12px}.card-btn[data-v-8ec7ab14]{width:100%}.template-quick-start[data-v-8ec7ab14]{margin-top:8px}.template-quick-start .divider-text[data-v-8ec7ab14]{color:#999;font-size:13px}.template-tags[data-v-8ec7ab14]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:8px}.template-tag[data-v-8ec7ab14]{cursor:pointer;padding:4px 12px;font-size:13px;border-radius:16px;-webkit-transition:all .2s;transition:all .2s}.template-tag .tpl-icon[data-v-8ec7ab14]{margin-right:4px}.template-tag[data-v-8ec7ab14]:hover{color:#1890ff;border-color:#1890ff;background:#e6f7ff}.theme-dark .selector-header h3[data-v-8ec7ab14]{color:#e0e6ed}.theme-dark .selector-header .selector-hint[data-v-8ec7ab14]{color:hsla(0,0%,100%,.4)}.theme-dark .mode-card[data-v-8ec7ab14]{border-color:hsla(0,0%,100%,.08);background:#1c1c1c}.theme-dark .mode-card[data-v-8ec7ab14]:hover{border-color:#177ddc;-webkit-box-shadow:0 4px 16px rgba(23,125,220,.2);box-shadow:0 4px 16px rgba(23,125,220,.2)}.theme-dark .mode-card.selected[data-v-8ec7ab14]{border-color:#177ddc;background:rgba(23,125,220,.06)}.theme-dark .mode-card.selected[data-v-8ec7ab14]:after{color:#40a9ff}.theme-dark .card-icon.signal-icon[data-v-8ec7ab14]{background:linear-gradient(135deg,rgba(24,144,255,.15),rgba(24,144,255,.08));color:#40a9ff}.theme-dark .card-icon.script-icon[data-v-8ec7ab14]{background:linear-gradient(135deg,rgba(82,196,26,.15),rgba(82,196,26,.08));color:#73d13d}.theme-dark .card-body h4[data-v-8ec7ab14]{color:#e0e6ed}.theme-dark .card-body .card-desc[data-v-8ec7ab14]{color:hsla(0,0%,100%,.45)}.theme-dark .card-body .card-badge[data-v-8ec7ab14]{background:rgba(64,169,255,.12);color:#69c0ff}.theme-dark .card-body .card-badge.card-badge--script[data-v-8ec7ab14]{background:rgba(115,209,61,.16);color:#95de64}.theme-dark .card-features li[data-v-8ec7ab14]{color:hsla(0,0%,100%,.6)}.theme-dark .card-features li .anticon[data-v-8ec7ab14]{color:#73d13d}.theme-dark .card-btn[data-v-8ec7ab14]{border-color:rgba(24,144,255,.4);color:#40a9ff}.theme-dark .card-btn[data-v-8ec7ab14]:hover{border-color:#1890ff;color:#1890ff}.theme-dark .template-quick-start[data-v-8ec7ab14] .ant-divider-inner-text{color:hsla(0,0%,100%,.35)}.theme-dark .template-quick-start[data-v-8ec7ab14] .ant-divider:after,.theme-dark .template-quick-start[data-v-8ec7ab14] .ant-divider:before{border-top-color:hsla(0,0%,100%,.08)}.theme-dark .divider-text[data-v-8ec7ab14]{color:hsla(0,0%,100%,.35)}.theme-dark .template-tag[data-v-8ec7ab14]{background:hsla(0,0%,100%,.04);border-color:hsla(0,0%,100%,.1);color:hsla(0,0%,100%,.65)}.theme-dark .template-tag[data-v-8ec7ab14]:hover{color:#40a9ff;border-color:#177ddc;background:rgba(23,125,220,.1)}.strategy-editor[data-v-35a0a386]{width:100%}.editor-layout[data-v-35a0a386]{min-height:450px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.code-col[data-v-35a0a386],.side-col[data-v-35a0a386]{-ms-flex-direction:column;flex-direction:column}.code-col[data-v-35a0a386],.code-section[data-v-35a0a386],.side-col[data-v-35a0a386]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal}.code-section[data-v-35a0a386]{border:1px solid #e8e8e8;border-radius:8px;overflow:hidden;-webkit-box-flex:1;-ms-flex:1;flex:1;-ms-flex-direction:column;flex-direction:column}.section-header[data-v-35a0a386]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:8px 12px;background:#fafafa;border-bottom:1px solid #e8e8e8}.section-header[data-v-35a0a386],.section-title-wrap[data-v-35a0a386]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.section-title-wrap[data-v-35a0a386]{gap:8px;min-width:0}.section-title[data-v-35a0a386]{font-weight:600;font-size:14px}.section-title .anticon[data-v-35a0a386]{margin-right:6px}.current-template-tag[data-v-35a0a386]{margin-right:0}.verify-btn[data-v-35a0a386]{color:#52c41a;font-weight:600}.code-editor-container[data-v-35a0a386]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-height:420px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.code-editor-container[data-v-35a0a386] .CodeMirror{-webkit-box-flex:1;-ms-flex:1;flex:1;height:100%;font-family:Courier New,Consolas,Liberation Mono,Menlo,monospace;font-size:13px;line-height:1.6;background:#fff}.code-editor-container[data-v-35a0a386] .CodeMirror-scroll{min-height:100%;overflow-x:auto!important;overflow-y:auto!important}.code-editor-container[data-v-35a0a386] .CodeMirror-gutters{border-right:1px solid #e8e8e8;background:-webkit-gradient(linear,left top,right top,from(#fafafa),to(#f5f5f5));background:linear-gradient(90deg,#fafafa 0,#f5f5f5)}.code-editor-container[data-v-35a0a386] .CodeMirror-linenumber{padding:0 8px 0 0;text-align:right;color:#999;font-size:12px}.code-editor-container[data-v-35a0a386] .CodeMirror-lines{padding:12px 0}.code-editor-container[data-v-35a0a386] .CodeMirror pre.CodeMirror-line,.code-editor-container[data-v-35a0a386] .CodeMirror pre.CodeMirror-line-like{padding:0 12px 0 12px}.code-editor-container[data-v-35a0a386] .CodeMirror-cursor{border-left:2px solid #1890ff}.side-tabs[data-v-35a0a386]{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-height:0;border:1px solid #e8e8e8;border-radius:8px;overflow:hidden}.side-tabs[data-v-35a0a386] .ant-tabs-bar{margin-bottom:0;-ms-flex-negative:0;flex-shrink:0;padding:0 12px;background:#fafafa;border-bottom:1px solid #f0f0f0}.side-tabs[data-v-35a0a386] .ant-tabs-content{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;min-height:280px;overflow-x:hidden;overflow-y:auto;padding:12px}.ai-actions[data-v-35a0a386]{margin-top:12px}.params-panel[data-v-35a0a386]{min-height:120px}.panel-intro[data-v-35a0a386]{margin-bottom:12px;padding:12px;border-radius:8px;background:#fafafa;border:1px solid #f0f0f0}.panel-intro__title[data-v-35a0a386]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;font-size:14px;font-weight:600;color:#262626}.panel-intro__desc[data-v-35a0a386]{margin-top:4px;font-size:12px;line-height:1.6;color:#8c8c8c}.template-list[data-v-35a0a386]{padding:4px 0}.template-item[data-v-35a0a386]{padding:12px;border:1px solid #f0f0f0;border-radius:8px;margin-bottom:8px;cursor:pointer;-webkit-transition:all .2s;transition:all .2s}.template-item.active[data-v-35a0a386],.template-item[data-v-35a0a386]:hover{border-color:#1890ff;background:#fafafa}.template-item .tpl-header[data-v-35a0a386]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:4px}.template-item .tpl-icon[data-v-35a0a386]{font-size:16px;margin-right:8px}.template-item .tpl-name[data-v-35a0a386]{font-weight:600;font-size:14px}.template-item .tpl-desc[data-v-35a0a386]{font-size:12px;color:#888;margin:0 0 4px}.template-item .tpl-use-btn[data-v-35a0a386]{padding:0;font-size:12px}.params-tip[data-v-35a0a386]{margin-bottom:12px}.param-list[data-v-35a0a386]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px}.param-item[data-v-35a0a386]{padding:12px;border:1px solid #f0f0f0;border-radius:8px;background:#fff}.param-item__label-row[data-v-35a0a386]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px;margin-bottom:4px}.param-item__label[data-v-35a0a386]{font-size:13px;font-weight:600;color:#262626}.param-item__type[data-v-35a0a386]{font-size:11px;color:#8c8c8c}.param-item__desc[data-v-35a0a386]{margin-bottom:8px;font-size:12px;line-height:1.5;color:#8c8c8c}.param-item__switch[data-v-35a0a386]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.params-actions[data-v-35a0a386]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;gap:8px;margin-top:16px}.ai-suggestions[data-v-35a0a386]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;margin-bottom:10px}.prompt-tag[data-v-35a0a386]{cursor:pointer}.ai-status[data-v-35a0a386]{margin-top:8px;color:#1890ff;font-size:13px;text-align:center}.params-empty-guide[data-v-35a0a386]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;min-height:200px}.theme-dark .code-section[data-v-35a0a386]{border-color:hsla(0,0%,100%,.1)}.theme-dark .section-header[data-v-35a0a386]{background:#1c1c1c;border-color:hsla(0,0%,100%,.1)}.theme-dark .section-title[data-v-35a0a386]{color:#e0e6ed}.theme-dark .side-tabs[data-v-35a0a386]{border-color:hsla(0,0%,100%,.1)}.theme-dark .side-tabs[data-v-35a0a386] .ant-tabs-bar{background:#1c1c1c;border-bottom-color:hsla(0,0%,100%,.08)}.theme-dark .side-tabs[data-v-35a0a386] .ant-tabs-nav .ant-tabs-tab{color:hsla(0,0%,100%,.55)}.theme-dark .side-tabs[data-v-35a0a386] .ant-tabs-nav .ant-tabs-tab:hover{color:hsla(0,0%,100%,.85)}.theme-dark .side-tabs[data-v-35a0a386] .ant-tabs-nav .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn{color:#1890ff}.theme-dark .panel-intro[data-v-35a0a386]{background:#1c1c1c;border-color:hsla(0,0%,100%,.08)}.theme-dark .panel-intro__title[data-v-35a0a386],.theme-dark .param-item__label[data-v-35a0a386]{color:#e0e6ed}.theme-dark .panel-intro__desc[data-v-35a0a386],.theme-dark .param-item__desc[data-v-35a0a386],.theme-dark .param-item__type[data-v-35a0a386]{color:hsla(0,0%,100%,.45)}.theme-dark .param-item[data-v-35a0a386],.theme-dark .template-item[data-v-35a0a386]{border-color:hsla(0,0%,100%,.08);background:#1c1c1c}.theme-dark .template-item.active[data-v-35a0a386],.theme-dark .template-item[data-v-35a0a386]:hover{border-color:#177ddc;background:rgba(23,125,220,.06)}.theme-dark .tpl-name[data-v-35a0a386]{color:#e0e6ed}.theme-dark .tpl-desc[data-v-35a0a386]{color:hsla(0,0%,100%,.4)}.theme-dark .prompt-tag[data-v-35a0a386]{background:hsla(0,0%,100%,.04);border-color:hsla(0,0%,100%,.1);color:hsla(0,0%,100%,.7)}.theme-dark[data-v-35a0a386] .ant-input,.theme-dark[data-v-35a0a386] .ant-input-number,.theme-dark[data-v-35a0a386] .ant-input-number-input,.theme-dark[data-v-35a0a386] .ant-select-selection,.theme-dark[data-v-35a0a386] .ant-select-selection--single,.theme-dark[data-v-35a0a386] textarea.ant-input{background:#141414!important;border-color:hsla(0,0%,100%,.1)!important;color:#d1d4dc!important}.theme-dark[data-v-35a0a386] .ant-select-selection-placeholder,.theme-dark[data-v-35a0a386] .ant-select-selection-selected-value{color:#d1d4dc!important}.theme-dark .ai-status[data-v-35a0a386]{color:#40a9ff}.theme-dark[data-v-35a0a386] .ant-empty-description{color:hsla(0,0%,100%,.45)}.theme-dark[data-v-35a0a386] .ant-alert-info{background:rgba(24,144,255,.08);border-color:rgba(24,144,255,.2)}.theme-dark[data-v-35a0a386] .ant-alert-info .ant-alert-message{color:hsla(0,0%,100%,.65)}.theme-dark .verify-btn[data-v-35a0a386]{color:#52c41a}.theme-dark .ai-panel[data-v-35a0a386]{color:hsla(0,0%,100%,.78)}.theme-dark .code-editor-container[data-v-35a0a386] .CodeMirror{background:#141414;color:#d1d4dc}.theme-dark .code-editor-container[data-v-35a0a386] .CodeMirror-gutters{border-right-color:hsla(0,0%,100%,.08);background:-webkit-gradient(linear,left top,right top,from(#1a1a1a),to(#1c1c1c));background:linear-gradient(90deg,#1a1a1a 0,#1c1c1c)}.theme-dark .code-editor-container[data-v-35a0a386] .CodeMirror-linenumber{color:hsla(0,0%,100%,.32)}.performance-analysis[data-v-01ff5f5a]{padding:4px 0}.strategy-tab-empty[data-v-01ff5f5a]{padding:48px 16px;margin:0 auto;max-width:360px}.metrics-grid[data-v-01ff5f5a]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:20px}@media (max-width:768px){.metrics-grid[data-v-01ff5f5a]{grid-template-columns:repeat(2,1fr)}}.metric-card[data-v-01ff5f5a]{background:#fafafa;border-radius:8px;padding:12px 16px;text-align:center}.metric-card.positive .metric-value[data-v-01ff5f5a]{color:#52c41a}.metric-card.negative .metric-value[data-v-01ff5f5a]{color:#ff4d4f}.metric-card .metric-label[data-v-01ff5f5a]{font-size:12px;color:#999;margin-bottom:4px}.metric-card .metric-value[data-v-01ff5f5a]{font-size:18px;font-weight:700;font-variant-numeric:tabular-nums}.chart-section[data-v-01ff5f5a]{margin-bottom:20px}.chart-section .chart-title[data-v-01ff5f5a]{font-size:14px;font-weight:600;margin-bottom:8px;padding-left:4px}.chart-container[data-v-01ff5f5a]{width:100%;height:300px;border-radius:8px;overflow:hidden}.theme-dark .metrics-grid .metric-card[data-v-01ff5f5a]{background:#1c1c1c;border:1px solid hsla(0,0%,100%,.06)}.theme-dark .metrics-grid .metric-card .metric-label[data-v-01ff5f5a]{color:hsla(0,0%,100%,.4)}.theme-dark .metrics-grid .metric-card .metric-value[data-v-01ff5f5a]{color:#e0e6ed}.theme-dark .metrics-grid .metric-card.positive .metric-value[data-v-01ff5f5a]{color:#52c41a}.theme-dark .metrics-grid .metric-card.negative .metric-value[data-v-01ff5f5a]{color:#ff4d4f}.theme-dark .chart-section .chart-title[data-v-01ff5f5a]{color:#e0e6ed}.theme-dark .chart-container[data-v-01ff5f5a]{background:#141414;border:1px solid hsla(0,0%,100%,.06)}.theme-dark .strategy-tab-empty[data-v-01ff5f5a] .ant-empty-description,.theme-dark[data-v-01ff5f5a] .ant-empty-description{color:hsla(0,0%,100%,.35)}.strategy-logs[data-v-73589ce4]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%}.logs-toolbar[data-v-73589ce4]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:8px 0;margin-bottom:8px}.logs-toolbar .toolbar-right[data-v-73589ce4],.logs-toolbar[data-v-73589ce4]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.logs-toolbar .toolbar-right[data-v-73589ce4]{gap:6px}.logs-toolbar .toolbar-right .auto-refresh-label[data-v-73589ce4]{font-size:12px;color:#999}.logs-container[data-v-73589ce4]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-height:300px;max-height:500px;overflow-y:auto;border:1px solid #f0f0f0;border-radius:8px;padding:8px;font-family:Fira Code,Consolas,monospace;font-size:12px;line-height:1.7;background:#fafafa}.logs-empty[data-v-73589ce4]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:200px;color:#ccc}.logs-empty p[data-v-73589ce4]{margin-top:8px;font-family:-apple-system,BlinkMacSystemFont,sans-serif}.log-entry[data-v-73589ce4]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:8px;padding:2px 4px;border-radius:3px}.log-entry[data-v-73589ce4]:hover{background:rgba(0,0,0,.02)}.log-entry.level-error[data-v-73589ce4]{background:rgba(255,77,79,.04)}.log-entry.level-trade[data-v-73589ce4]{background:rgba(82,196,26,.04)}.log-time[data-v-73589ce4]{color:#999;white-space:nowrap;font-size:11px;min-width:65px}.log-level[data-v-73589ce4]{-ms-flex-negative:0;flex-shrink:0;font-size:10px}.log-message[data-v-73589ce4]{-webkit-box-flex:1;-ms-flex:1;flex:1;word-break:break-all}.theme-dark .logs-toolbar .toolbar-right .auto-refresh-label[data-v-73589ce4]{color:hsla(0,0%,100%,.4)}.theme-dark .logs-toolbar[data-v-73589ce4] .ant-radio-group .ant-radio-button-wrapper{background:#1c1c1c;border-color:hsla(0,0%,100%,.12);color:hsla(0,0%,100%,.55)}.theme-dark .logs-toolbar[data-v-73589ce4] .ant-radio-group .ant-radio-button-wrapper:hover{color:#40a9ff}.theme-dark .logs-toolbar[data-v-73589ce4] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#1890ff;border-color:#1890ff;color:#fff}.theme-dark .logs-container[data-v-73589ce4]{background:#141414;border-color:hsla(0,0%,100%,.08)}.theme-dark .logs-empty[data-v-73589ce4]{color:hsla(0,0%,100%,.25)}.theme-dark .logs-empty .anticon[data-v-73589ce4]{color:hsla(0,0%,100%,.15)!important}.theme-dark .logs-empty p[data-v-73589ce4]{color:hsla(0,0%,100%,.3)}.theme-dark .log-entry[data-v-73589ce4]:hover{background:hsla(0,0%,100%,.03)}.theme-dark .log-entry.level-error[data-v-73589ce4]{background:rgba(255,77,79,.06)}.theme-dark .log-entry.level-trade[data-v-73589ce4]{background:rgba(82,196,26,.06)}.theme-dark .log-time[data-v-73589ce4]{color:hsla(0,0%,100%,.3)}.theme-dark .log-message[data-v-73589ce4]{color:hsla(0,0%,100%,.75)}.dashboard-pro[data-v-80b7f8d0]{min-height:100vh;padding:20px;background:#f8fafc;-webkit-transition:background .3s;transition:background .3s}.dashboard-pro.theme-dark[data-v-80b7f8d0]{background:#141414}.dashboard-pro.theme-dark .kpi-card[data-v-80b7f8d0]{background:#1c1c1c;border-color:#2a2a2a}.dashboard-pro.theme-dark .kpi-card .kpi-label[data-v-80b7f8d0]{color:#888}.dashboard-pro.theme-dark .kpi-card .kpi-value .amount[data-v-80b7f8d0]{color:#f1f5f9}.dashboard-pro.theme-dark .kpi-card .kpi-sub[data-v-80b7f8d0]{color:#888}.dashboard-pro.theme-dark .chart-panel[data-v-80b7f8d0],.dashboard-pro.theme-dark .table-panel[data-v-80b7f8d0]{background:#1c1c1c;border-color:#2a2a2a}.dashboard-pro.theme-dark .chart-panel .panel-header[data-v-80b7f8d0],.dashboard-pro.theme-dark .table-panel .panel-header[data-v-80b7f8d0]{border-color:#2a2a2a}.dashboard-pro.theme-dark .chart-panel .panel-header .panel-title[data-v-80b7f8d0],.dashboard-pro.theme-dark .table-panel .panel-header .panel-title[data-v-80b7f8d0]{color:#f1f5f9}.dashboard-pro.theme-dark .setup-guide-card[data-v-80b7f8d0]{background:linear-gradient(135deg,rgba(23,125,220,.14),rgba(139,92,246,.12));border-color:rgba(23,125,220,.26)}.dashboard-pro.theme-dark .setup-guide-card .setup-guide-title[data-v-80b7f8d0]{color:#f1f5f9}.dashboard-pro.theme-dark .setup-guide-card .setup-guide-desc[data-v-80b7f8d0]{color:hsla(0,0%,100%,.72)}.dashboard-pro.theme-dark .setup-guide-card .setup-guide-path[data-v-80b7f8d0]{color:hsla(0,0%,100%,.48)}.dashboard-pro.theme-dark .ranking-card[data-v-80b7f8d0]{background:hsla(0,0%,100%,.03);border-color:#2a2a2a}.dashboard-pro.theme-dark .ranking-card .rank-name[data-v-80b7f8d0]{color:#f1f5f9}.dashboard-pro.theme-dark .ranking-card .rank-stats label[data-v-80b7f8d0]{color:#888}.dashboard-pro.theme-dark .calendar-nav .current-month[data-v-80b7f8d0]{color:#f1f5f9}.dashboard-pro.theme-dark .calendar-nav .ant-btn-link[data-v-80b7f8d0],.dashboard-pro.theme-dark .profit-calendar .calendar-empty[data-v-80b7f8d0]{color:#888}.dashboard-pro.theme-dark .profit-calendar .month-summary[data-v-80b7f8d0]{background:hsla(0,0%,100%,.03)}.dashboard-pro.theme-dark .profit-calendar .calendar-weekdays .weekday[data-v-80b7f8d0],.dashboard-pro.theme-dark .profit-calendar .month-summary .summary-label[data-v-80b7f8d0]{color:#888}.dashboard-pro.theme-dark .profit-calendar .calendar-grid .calendar-cell[data-v-80b7f8d0]{background:hsla(0,0%,100%,.03)}.dashboard-pro.theme-dark .profit-calendar .calendar-grid .calendar-cell.no-data[data-v-80b7f8d0]{background:hsla(0,0%,100%,.02)}.dashboard-pro.theme-dark .profit-calendar .calendar-grid .calendar-cell.profit[data-v-80b7f8d0]{background:linear-gradient(135deg,rgba(34,197,94,.15),rgba(34,197,94,.25))}.dashboard-pro.theme-dark .profit-calendar .calendar-grid .calendar-cell.loss[data-v-80b7f8d0]{background:linear-gradient(135deg,rgba(239,68,68,.15),rgba(239,68,68,.25))}.dashboard-pro.theme-dark .profit-calendar .calendar-grid .calendar-cell.zero[data-v-80b7f8d0]{background:hsla(0,0%,100%,.03)}.dashboard-pro.theme-dark .profit-calendar .calendar-grid .calendar-cell .day-number[data-v-80b7f8d0]{color:#f1f5f9}.dashboard-pro.theme-dark .pro-table[data-v-80b7f8d0] .ant-table{background:transparent;color:#f1f5f9}.dashboard-pro.theme-dark .pro-table[data-v-80b7f8d0] .ant-table-thead>tr>th{background:#141414;color:#888;border-color:#2a2a2a}.dashboard-pro.theme-dark .pro-table[data-v-80b7f8d0] .ant-table-tbody>tr>td{border-color:#2a2a2a;color:#f1f5f9}.dashboard-pro.theme-dark .pro-table[data-v-80b7f8d0] .ant-table-tbody>tr:hover>td{background:#252525}.dashboard-pro.theme-dark .pro-table[data-v-80b7f8d0] .ant-table-placeholder{background:transparent}.dashboard-pro.theme-dark .pro-table[data-v-80b7f8d0] .ant-table-placeholder .ant-empty-description{color:#888}.dashboard-pro.theme-dark .pro-table[data-v-80b7f8d0] .ant-pagination .ant-pagination-item{background:#1c1c1c;border-color:#2a2a2a}.dashboard-pro.theme-dark .pro-table[data-v-80b7f8d0] .ant-pagination .ant-pagination-item a{color:#f1f5f9}.dashboard-pro.theme-dark .pro-table[data-v-80b7f8d0] .ant-pagination .ant-pagination-item.ant-pagination-item-active{background:#3b82f6;border-color:#3b82f6}.dashboard-pro.theme-dark .pro-table[data-v-80b7f8d0] .ant-pagination .ant-pagination-next .ant-pagination-item-link,.dashboard-pro.theme-dark .pro-table[data-v-80b7f8d0] .ant-pagination .ant-pagination-prev .ant-pagination-item-link{background:#1c1c1c;border-color:#2a2a2a;color:#f1f5f9}.dashboard-pro .kpi-grid[data-v-80b7f8d0]{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px;margin-bottom:20px}.dashboard-pro .setup-guide-card[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:16px;margin-bottom:20px;padding:18px 20px;background:linear-gradient(135deg,rgba(59,130,246,.08),rgba(139,92,246,.08));border:1px solid rgba(59,130,246,.16);border-radius:16px}.dashboard-pro .setup-guide-card .setup-guide-copy[data-v-80b7f8d0]{min-width:0}.dashboard-pro .setup-guide-card .setup-guide-title[data-v-80b7f8d0]{font-size:16px;font-weight:700;color:#1e293b}.dashboard-pro .setup-guide-card .setup-guide-desc[data-v-80b7f8d0]{margin-top:4px;color:#64748b;line-height:1.7}.dashboard-pro .setup-guide-card .setup-guide-path[data-v-80b7f8d0]{margin-top:6px;font-size:12px;color:#64748b}.dashboard-pro .setup-guide-card .setup-guide-actions[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px;-ms-flex-negative:0;flex-shrink:0}.dashboard-pro .kpi-card[data-v-80b7f8d0]{position:relative;background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:20px;overflow:hidden;-webkit-transition:all .3s cubic-bezier(.4,0,.2,1);transition:all .3s cubic-bezier(.4,0,.2,1)}.dashboard-pro .kpi-card[data-v-80b7f8d0]:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-box-shadow:0 10px 40px rgba(0,0,0,.1);box-shadow:0 10px 40px rgba(0,0,0,.1)}.dashboard-pro .kpi-card.clickable[data-v-80b7f8d0]{cursor:pointer}.dashboard-pro .kpi-card.clickable .card-arrow[data-v-80b7f8d0]{position:absolute;right:16px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);opacity:.4;-webkit-transition:all .3s;transition:all .3s}.dashboard-pro .kpi-card.clickable:hover .card-arrow[data-v-80b7f8d0]{opacity:1;right:12px}.dashboard-pro .kpi-card .kpi-glow[data-v-80b7f8d0]{position:absolute;top:-50%;right:-50%;width:100%;height:100%;background:radial-gradient(circle,rgba(59,130,246,.15) 0,transparent 70%);pointer-events:none}.dashboard-pro .kpi-card .kpi-content[data-v-80b7f8d0]{position:relative;z-index:1}.dashboard-pro .kpi-card .kpi-header[data-v-80b7f8d0]{gap:8px;margin-bottom:12px}.dashboard-pro .kpi-card .kpi-header[data-v-80b7f8d0],.dashboard-pro .kpi-card .kpi-icon[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.dashboard-pro .kpi-card .kpi-icon[data-v-80b7f8d0]{width:32px;height:32px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:8px;background:rgba(59,130,246,.1);color:#3b82f6;font-size:16px}.dashboard-pro .kpi-card .kpi-label[data-v-80b7f8d0]{font-size:12px;font-weight:600;color:#64748b;text-transform:uppercase;letter-spacing:.5px}.dashboard-pro .kpi-card .kpi-value[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline;gap:2px}.dashboard-pro .kpi-card .kpi-value .currency[data-v-80b7f8d0]{font-size:18px;font-weight:500;color:#64748b}.dashboard-pro .kpi-card .kpi-value .amount[data-v-80b7f8d0]{font-size:28px;font-weight:700;color:#1e293b;-webkit-font-feature-settings:"tnum";font-feature-settings:"tnum"}.dashboard-pro .kpi-card .kpi-value .unit[data-v-80b7f8d0]{font-size:14px;font-weight:500;color:#64748b;margin-left:4px}.dashboard-pro .kpi-card .kpi-sub[data-v-80b7f8d0]{margin-top:8px;font-size:12px;color:#64748b}.dashboard-pro .kpi-card .kpi-sub .label[data-v-80b7f8d0]{margin:0 2px}.dashboard-pro .kpi-card .kpi-sub .divider[data-v-80b7f8d0]{margin:0 6px;opacity:.5}.dashboard-pro .kpi-card .kpi-sub .highlight[data-v-80b7f8d0]{font-weight:600;color:#3b82f6}.dashboard-pro .kpi-card.kpi-primary[data-v-80b7f8d0]{background:linear-gradient(135deg,#1e40af,#3b82f6 50%,#60a5fa);border:none}.dashboard-pro .kpi-card.kpi-primary .kpi-icon[data-v-80b7f8d0]{background:hsla(0,0%,100%,.2);color:#fff}.dashboard-pro .kpi-card.kpi-primary .kpi-label[data-v-80b7f8d0]{color:hsla(0,0%,100%,.8)}.dashboard-pro .kpi-card.kpi-primary .kpi-value .amount[data-v-80b7f8d0],.dashboard-pro .kpi-card.kpi-primary .kpi-value .currency[data-v-80b7f8d0],.dashboard-pro .kpi-card.kpi-primary .kpi-value .unit[data-v-80b7f8d0]{color:#fff}.dashboard-pro .kpi-card.kpi-primary .kpi-sub[data-v-80b7f8d0]{color:hsla(0,0%,100%,.7)}.dashboard-pro .kpi-card.kpi-win-rate .kpi-ring[data-v-80b7f8d0]{position:absolute;right:12px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:60px;height:60px}.dashboard-pro .kpi-card.kpi-win-rate .kpi-ring svg[data-v-80b7f8d0]{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.dashboard-pro .kpi-card.kpi-win-rate .kpi-ring svg .ring-bg[data-v-80b7f8d0]{fill:none;stroke:rgba(16,185,129,.15);stroke-width:3}.dashboard-pro .kpi-card.kpi-win-rate .kpi-ring svg .ring-progress[data-v-80b7f8d0]{fill:none;stroke:#10b981;stroke-width:3;stroke-linecap:round;-webkit-transition:stroke-dasharray .5s ease;transition:stroke-dasharray .5s ease}.dashboard-pro .kpi-card.kpi-win-rate .kpi-icon[data-v-80b7f8d0]{background:rgba(16,185,129,.1);color:#10b981}.dashboard-pro .kpi-card.kpi-profit-factor .kpi-icon[data-v-80b7f8d0]{background:rgba(139,92,246,.1);color:#8b5cf6}.dashboard-pro .kpi-card.kpi-drawdown .kpi-icon[data-v-80b7f8d0]{background:rgba(239,68,68,.1);color:#ef4444}.dashboard-pro .kpi-card.kpi-drawdown .kpi-value .amount[data-v-80b7f8d0]{color:#ef4444}.dashboard-pro .kpi-card.kpi-trades .kpi-icon[data-v-80b7f8d0]{background:rgba(6,182,212,.1);color:#06b6d4}.dashboard-pro .kpi-card.kpi-strategies .kpi-icon[data-v-80b7f8d0]{background:rgba(245,158,11,.1);color:#f59e0b}.dashboard-pro .chart-row[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:16px;margin-bottom:16px}@media (max-width:1024px){.dashboard-pro .chart-row[data-v-80b7f8d0]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.dashboard-pro .chart-panel[data-v-80b7f8d0]{background:#fff;border:1px solid #e2e8f0;border-radius:16px;overflow:hidden}.dashboard-pro .chart-panel.chart-main[data-v-80b7f8d0]{-webkit-box-flex:2;-ms-flex:2;flex:2}.dashboard-pro .chart-panel.chart-side[data-v-80b7f8d0]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:300px}.dashboard-pro .chart-panel.chart-half[data-v-80b7f8d0]{-webkit-box-flex:1;-ms-flex:1;flex:1}.dashboard-pro .chart-panel .panel-header[data-v-80b7f8d0]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #e2e8f0}.dashboard-pro .chart-panel .panel-header[data-v-80b7f8d0],.dashboard-pro .chart-panel .panel-title[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.dashboard-pro .chart-panel .panel-title[data-v-80b7f8d0]{gap:8px;font-size:14px;font-weight:600;color:#1e293b}.dashboard-pro .chart-panel .panel-title .anticon[data-v-80b7f8d0]{color:#3b82f6}.dashboard-pro .chart-panel .panel-legend[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:16px;font-size:12px;color:#64748b}.dashboard-pro .chart-panel .panel-legend .legend-item[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.dashboard-pro .chart-panel .panel-legend .legend-item .dot[data-v-80b7f8d0]{width:10px;height:10px;border-radius:2px}.dashboard-pro .chart-panel .panel-legend .legend-item .dot.bar[data-v-80b7f8d0]{background:-webkit-gradient(linear,left top,left bottom,from(#34d399),to(#10b981));background:linear-gradient(180deg,#34d399,#10b981)}.dashboard-pro .chart-panel .panel-legend .legend-item .dot.line[data-v-80b7f8d0]{background:-webkit-gradient(linear,left top,right top,from(#3b82f6),to(#8b5cf6));background:linear-gradient(90deg,#3b82f6,#8b5cf6)}.dashboard-pro .chart-panel .panel-legend .legend-item .dot.loss[data-v-80b7f8d0]{background:#ef4444}.dashboard-pro .chart-panel .panel-legend .legend-item .dot.profit[data-v-80b7f8d0]{background:#10b981}.dashboard-pro .chart-panel .panel-legend.calendar-legend[data-v-80b7f8d0]{-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px}.dashboard-pro .chart-panel .panel-legend.calendar-legend .legend-gradient[data-v-80b7f8d0]{width:80px;height:10px;border-radius:3px;background:-webkit-gradient(linear,left top,right top,from(#ef4444),color-stop(#fca5a5),color-stop(#f4f4f5),color-stop(#86efac),to(#22c55e));background:linear-gradient(90deg,#ef4444,#fca5a5,#f4f4f5,#86efac,#22c55e)}.dashboard-pro .chart-panel .panel-badge[data-v-80b7f8d0]{background:#3b82f6;color:#fff;font-size:11px;font-weight:600;padding:2px 8px;border-radius:10px}.dashboard-pro .chart-panel .chart-body[data-v-80b7f8d0]{height:320px;padding:16px}.dashboard-pro .chart-panel .chart-body.chart-sm[data-v-80b7f8d0]{height:220px}.dashboard-pro .chart-panel .chart-body.calendar-chart[data-v-80b7f8d0]{height:280px}.dashboard-pro .chart-panel .calendar-nav[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.dashboard-pro .chart-panel .calendar-nav .current-month[data-v-80b7f8d0]{font-size:14px;font-weight:600;color:#1e293b;min-width:80px;text-align:center}.dashboard-pro .chart-panel .calendar-nav .ant-btn-link[data-v-80b7f8d0]{padding:0;height:auto;color:#64748b}.dashboard-pro .chart-panel .calendar-nav .ant-btn-link[data-v-80b7f8d0]:hover:not(:disabled){color:#3b82f6}.dashboard-pro .chart-panel .calendar-nav .ant-btn-link[data-v-80b7f8d0]:disabled{opacity:.3}.dashboard-pro .chart-panel .profit-calendar[data-v-80b7f8d0]{padding:12px 16px;overflow:hidden}.dashboard-pro .chart-panel .profit-calendar .calendar-empty[data-v-80b7f8d0],.dashboard-pro .chart-panel .profit-calendar[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.dashboard-pro .chart-panel .profit-calendar .calendar-empty[data-v-80b7f8d0]{height:280px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:#64748b}.dashboard-pro .chart-panel .profit-calendar .calendar-empty .anticon[data-v-80b7f8d0]{font-size:40px;margin-bottom:10px;opacity:.3}.dashboard-pro .chart-panel .profit-calendar .month-summary[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:20px;margin-bottom:10px;padding:8px 12px;background:rgba(241,245,249,.5);border-radius:8px}.dashboard-pro .chart-panel .profit-calendar .month-summary .summary-item[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:2px}.dashboard-pro .chart-panel .profit-calendar .month-summary .summary-item .summary-label[data-v-80b7f8d0]{font-size:10px;color:#64748b;text-transform:uppercase;letter-spacing:.5px}.dashboard-pro .chart-panel .profit-calendar .month-summary .summary-item .summary-value[data-v-80b7f8d0]{font-size:15px;font-weight:700;font-family:JetBrains Mono,monospace}.dashboard-pro .chart-panel .profit-calendar .month-summary .summary-item .summary-value.positive[data-v-80b7f8d0]{color:#10b981}.dashboard-pro .chart-panel .profit-calendar .month-summary .summary-item .summary-value.negative[data-v-80b7f8d0]{color:#ef4444}.dashboard-pro .chart-panel .profit-calendar .calendar-weekdays[data-v-80b7f8d0]{display:grid;grid-template-columns:repeat(7,1fr);gap:3px;margin-bottom:4px}.dashboard-pro .chart-panel .profit-calendar .calendar-weekdays .weekday[data-v-80b7f8d0]{text-align:center;font-size:10px;font-weight:600;color:#64748b;padding:4px 0}.dashboard-pro .chart-panel .profit-calendar .calendar-grid[data-v-80b7f8d0]{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell[data-v-80b7f8d0]{height:36px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:6px;background:rgba(241,245,249,.5);border:1px solid transparent;-webkit-transition:all .2s ease;transition:all .2s ease;position:relative}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.empty[data-v-80b7f8d0]{background:transparent;border:none}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.no-data[data-v-80b7f8d0]{background:rgba(241,245,249,.3)}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.profit[data-v-80b7f8d0]{background:linear-gradient(135deg,rgba(34,197,94,.12),rgba(34,197,94,.2));border-color:rgba(34,197,94,.3)}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.profit[data-v-80b7f8d0]:hover{background:linear-gradient(135deg,rgba(34,197,94,.2),rgba(34,197,94,.3));-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-box-shadow:0 4px 12px rgba(34,197,94,.2);box-shadow:0 4px 12px rgba(34,197,94,.2)}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.loss[data-v-80b7f8d0]{background:linear-gradient(135deg,rgba(239,68,68,.12),rgba(239,68,68,.2));border-color:rgba(239,68,68,.3)}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.loss[data-v-80b7f8d0]:hover{background:linear-gradient(135deg,rgba(239,68,68,.2),rgba(239,68,68,.3));-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-box-shadow:0 4px 12px rgba(239,68,68,.2);box-shadow:0 4px 12px rgba(239,68,68,.2)}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.zero[data-v-80b7f8d0]{background:hsla(240,5%,65%,.1);border-color:hsla(240,5%,65%,.2)}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell .day-number[data-v-80b7f8d0]{font-size:11px;font-weight:600;color:#1e293b;line-height:1}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell .day-profit[data-v-80b7f8d0]{font-size:9px;font-weight:600;font-family:JetBrains Mono,monospace;margin-top:1px;line-height:1}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell .day-profit.positive[data-v-80b7f8d0]{color:#10b981}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell .day-profit.negative[data-v-80b7f8d0]{color:#ef4444}.dashboard-pro .strategy-ranking[data-v-80b7f8d0]{padding:16px}.dashboard-pro .strategy-ranking .empty-state[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:40px;color:#64748b}.dashboard-pro .strategy-ranking .empty-state .anticon[data-v-80b7f8d0]{font-size:40px;margin-bottom:12px;opacity:.3}.dashboard-pro .strategy-ranking .ranking-grid[data-v-80b7f8d0]{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:12px}.dashboard-pro .strategy-ranking .ranking-card[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:12px;padding:14px 16px;background:rgba(241,245,249,.5);border:1px solid #e2e8f0;border-radius:12px;position:relative;overflow:hidden}.dashboard-pro .strategy-ranking .ranking-card.rank-top[data-v-80b7f8d0]{border-color:transparent;background:linear-gradient(135deg,rgba(59,130,246,.08),rgba(139,92,246,.08))}.dashboard-pro .strategy-ranking .ranking-card .rank-badge[data-v-80b7f8d0]{width:28px;height:28px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:8px;font-size:12px;font-weight:700;background:#64748b;color:#fff;-ms-flex-negative:0;flex-shrink:0}.dashboard-pro .strategy-ranking .ranking-card .rank-badge.rank-1[data-v-80b7f8d0]{background:linear-gradient(135deg,#fbbf24,#f59e0b)}.dashboard-pro .strategy-ranking .ranking-card .rank-badge.rank-2[data-v-80b7f8d0]{background:linear-gradient(135deg,#9ca3af,#6b7280)}.dashboard-pro .strategy-ranking .ranking-card .rank-badge.rank-3[data-v-80b7f8d0]{background:linear-gradient(135deg,#cd7f32,#b87333)}.dashboard-pro .strategy-ranking .ranking-card .rank-info[data-v-80b7f8d0]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.dashboard-pro .strategy-ranking .ranking-card .rank-info .rank-name[data-v-80b7f8d0]{font-size:13px;font-weight:600;color:#1e293b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:4px}.dashboard-pro .strategy-ranking .ranking-card .rank-info .rank-stats[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px;-ms-flex-wrap:wrap;flex-wrap:wrap}.dashboard-pro .strategy-ranking .ranking-card .rank-info .rank-stats .stat[data-v-80b7f8d0]{font-size:11px}.dashboard-pro .strategy-ranking .ranking-card .rank-info .rank-stats .stat label[data-v-80b7f8d0]{color:#64748b;margin-right:4px}.dashboard-pro .strategy-ranking .ranking-card .rank-pnl-bar[data-v-80b7f8d0]{position:absolute;bottom:0;left:0;right:0;height:3px;background:rgba(0,0,0,.05)}.dashboard-pro .strategy-ranking .ranking-card .rank-pnl-bar .bar-fill[data-v-80b7f8d0]{height:100%;border-radius:0 3px 3px 0;-webkit-transition:width .5s ease;transition:width .5s ease}.dashboard-pro .strategy-ranking .ranking-card .rank-pnl-bar .bar-fill.positive[data-v-80b7f8d0]{background:-webkit-gradient(linear,left top,right top,from(#10b981),to(#34d399));background:linear-gradient(90deg,#10b981,#34d399)}.dashboard-pro .strategy-ranking .ranking-card .rank-pnl-bar .bar-fill.negative[data-v-80b7f8d0]{background:-webkit-gradient(linear,left top,right top,from(#ef4444),to(#f87171));background:linear-gradient(90deg,#ef4444,#f87171)}.dashboard-pro .table-row[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:16px;margin-top:16px;margin-bottom:16px}@media (max-width:1024px){.dashboard-pro .table-row[data-v-80b7f8d0]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.dashboard-pro .table-panel[data-v-80b7f8d0]{-webkit-box-flex:1;-ms-flex:1;flex:1;background:#fff;border:1px solid #e2e8f0;border-radius:16px;overflow:hidden}.dashboard-pro .table-panel .panel-header[data-v-80b7f8d0]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #e2e8f0}.dashboard-pro .table-panel .panel-header[data-v-80b7f8d0],.dashboard-pro .table-panel .panel-title[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.dashboard-pro .table-panel .panel-title[data-v-80b7f8d0]{gap:8px;font-size:14px;font-weight:600;color:#1e293b}.dashboard-pro .table-panel .panel-title .anticon[data-v-80b7f8d0]{color:#3b82f6}.dashboard-pro .table-panel .panel-title .sound-toggle[data-v-80b7f8d0]{margin-left:8px;font-size:16px;cursor:pointer;color:#10b981;-webkit-transition:all .2s;transition:all .2s}.dashboard-pro .table-panel .panel-title .sound-toggle[data-v-80b7f8d0]:hover{-webkit-transform:scale(1.1);transform:scale(1.1)}.dashboard-pro .table-panel .panel-title .sound-toggle.sound-off[data-v-80b7f8d0]{color:#64748b}.dashboard-pro .table-panel .panel-badge[data-v-80b7f8d0]{background:#3b82f6;color:#fff;font-size:11px;font-weight:600;padding:2px 8px;border-radius:10px}.dashboard-pro .orders-panel[data-v-80b7f8d0]{margin-bottom:20px}.dashboard-pro .pro-table[data-v-80b7f8d0] .ant-table{font-size:13px}.dashboard-pro .pro-table[data-v-80b7f8d0] .ant-table-thead>tr>th{background:rgba(241,245,249,.8);font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.5px;color:#64748b;border-bottom:1px solid #e2e8f0;padding:12px 16px}.dashboard-pro .pro-table[data-v-80b7f8d0] .ant-table-tbody>tr>td{padding:12px 16px;border-bottom:1px solid #e2e8f0}.dashboard-pro .pro-table[data-v-80b7f8d0] .ant-table-tbody>tr:hover>td{background:rgba(59,130,246,.04)}.dashboard-pro .pro-table[data-v-80b7f8d0] .ant-pagination{padding:12px 16px;margin:0}.dashboard-pro .symbol-cell .symbol-name[data-v-80b7f8d0]{font-weight:600;display:block}.dashboard-pro .symbol-cell .symbol-strategy[data-v-80b7f8d0]{font-size:11px;color:#64748b}.dashboard-pro .side-tag[data-v-80b7f8d0]{display:inline-block;padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600}.dashboard-pro .side-tag.long[data-v-80b7f8d0]{background:rgba(16,185,129,.1);color:#10b981}.dashboard-pro .side-tag.short[data-v-80b7f8d0]{background:rgba(239,68,68,.1);color:#ef4444}.dashboard-pro .type-tag[data-v-80b7f8d0]{display:inline-block;padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600}.dashboard-pro .type-tag.long[data-v-80b7f8d0]{background:rgba(16,185,129,.1);color:#10b981}.dashboard-pro .type-tag.short[data-v-80b7f8d0]{background:rgba(239,68,68,.1);color:#ef4444}.dashboard-pro .type-tag.close-long[data-v-80b7f8d0]{background:rgba(245,158,11,.1);color:#f59e0b}.dashboard-pro .type-tag.close-short[data-v-80b7f8d0]{background:rgba(139,92,246,.1);color:#8b5cf6}.dashboard-pro .symbol-tag[data-v-80b7f8d0]{background:rgba(59,130,246,.1);color:#3b82f6}.dashboard-pro .exchange-tag[data-v-80b7f8d0],.dashboard-pro .symbol-tag[data-v-80b7f8d0]{display:inline-block;padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600}.dashboard-pro .exchange-tag.binance[data-v-80b7f8d0]{background:rgba(240,185,11,.1);color:#f0b90b}.dashboard-pro .exchange-tag.okx[data-v-80b7f8d0]{background:rgba(139,92,246,.1);color:#8b5cf6}.dashboard-pro .exchange-tag.bitget[data-v-80b7f8d0]{background:rgba(6,182,212,.1);color:#06b6d4}.dashboard-pro .exchange-tag.signal[data-v-80b7f8d0]{background:rgba(59,130,246,.1);color:#3b82f6}.dashboard-pro .market-type[data-v-80b7f8d0]{font-size:10px;color:#64748b;margin-top:2px}.dashboard-pro .status-tag[data-v-80b7f8d0]{display:inline-block;padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600}.dashboard-pro .status-tag.pending[data-v-80b7f8d0]{background:rgba(245,158,11,.1);color:#f59e0b}.dashboard-pro .status-tag.processing[data-v-80b7f8d0]{background:rgba(59,130,246,.1);color:#3b82f6}.dashboard-pro .status-tag.completed[data-v-80b7f8d0]{background:rgba(16,185,129,.1);color:#10b981}.dashboard-pro .status-tag.failed[data-v-80b7f8d0]{background:rgba(239,68,68,.1);color:#ef4444}.dashboard-pro .status-tag.cancelled[data-v-80b7f8d0]{background:rgba(100,116,139,.1);color:#64748b}.dashboard-pro .error-hint[data-v-80b7f8d0]{font-size:11px;color:#ef4444;margin-top:4px;cursor:pointer}.dashboard-pro .error-hint .anticon[data-v-80b7f8d0]{margin-right:4px}.dashboard-pro .notify-icons[data-v-80b7f8d0]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px}.dashboard-pro .notify-icons .notify-icon[data-v-80b7f8d0]{color:#64748b;font-size:14px}.dashboard-pro .pnl-cell[data-v-80b7f8d0]{text-align:right}.dashboard-pro .pnl-cell .pnl-percent[data-v-80b7f8d0]{display:block;font-size:11px}.dashboard-pro .time-cell[data-v-80b7f8d0]{font-size:12px;color:#64748b}.dashboard-pro .sub-text[data-v-80b7f8d0]{font-size:11px;color:#64748b}.dashboard-pro .text-muted[data-v-80b7f8d0]{color:#64748b}.dashboard-pro .positive[data-v-80b7f8d0]{color:#10b981}.dashboard-pro .negative[data-v-80b7f8d0]{color:#ef4444}@media (max-width:768px){.dashboard-pro[data-v-80b7f8d0]{padding:12px}.dashboard-pro .setup-guide-card[data-v-80b7f8d0]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;padding:16px}.dashboard-pro .setup-guide-card .setup-guide-actions[data-v-80b7f8d0]{width:100%}.dashboard-pro .setup-guide-card .setup-guide-actions .ant-btn[data-v-80b7f8d0]{-webkit-box-flex:1;-ms-flex:1;flex:1}.dashboard-pro .kpi-grid[data-v-80b7f8d0]{grid-template-columns:repeat(2,1fr);gap:10px}.dashboard-pro .kpi-card[data-v-80b7f8d0]{padding:14px}.dashboard-pro .kpi-card .kpi-value .amount[data-v-80b7f8d0]{font-size:22px}.dashboard-pro .kpi-card.kpi-win-rate .kpi-ring[data-v-80b7f8d0]{width:48px;height:48px;right:8px}.dashboard-pro .chart-panel .chart-body[data-v-80b7f8d0]{height:260px;padding:12px}.dashboard-pro .chart-panel .chart-body.chart-sm[data-v-80b7f8d0]{height:180px}.dashboard-pro .ranking-grid[data-v-80b7f8d0]{grid-template-columns:1fr}}.top-level-tabs[data-v-533cb131] .ant-tabs-bar{margin-bottom:16px;border-bottom:1px solid #e8e8e8}.top-level-tabs[data-v-533cb131] .ant-tabs-tab{font-size:15px;padding:12px 20px}.theme-dark .top-level-tabs[data-v-533cb131] .ant-tabs-bar{border-bottom-color:#303030}.theme-dark .top-level-tabs[data-v-533cb131] .ant-tabs-tab{color:hsla(0,0%,100%,.65)}.theme-dark .top-level-tabs[data-v-533cb131] .ant-tabs-tab-active{color:#177ddc}.theme-dark .top-level-tabs[data-v-533cb131] .ant-tabs-ink-bar{background:#177ddc}.assistant-guide-bar[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px;padding:16px 18px;margin-bottom:16px;border:1px solid rgba(24,144,255,.14);border-radius:16px;background:linear-gradient(135deg,rgba(24,144,255,.08),rgba(114,46,209,.06))}.assistant-guide-bar .assistant-guide-copy[data-v-533cb131]{min-width:0;-webkit-box-flex:1;-ms-flex:1 1 240px;flex:1 1 240px}.assistant-guide-bar .assistant-guide-eyebrow[data-v-533cb131]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:4px 10px;margin-bottom:8px;border-radius:999px;background:rgba(24,144,255,.12);color:#1677ff;font-size:12px;font-weight:600}.assistant-guide-bar .assistant-guide-title[data-v-533cb131]{font-size:16px;font-weight:700;color:#1f2937}.assistant-guide-bar .assistant-guide-desc[data-v-533cb131]{margin-top:4px;color:#475569;line-height:1.6}.assistant-guide-bar .assistant-guide-steps[data-v-533cb131]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;-webkit-box-flex:1;-ms-flex:1 1 520px;flex:1 1 520px}.assistant-guide-bar .assistant-step-card[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:10px;min-height:92px;padding:12px;border-radius:14px;background:hsla(0,0%,100%,.66);border:1px solid rgba(148,163,184,.16);-webkit-box-shadow:0 4px 12px rgba(15,23,42,.04);box-shadow:0 4px 12px rgba(15,23,42,.04)}.assistant-guide-bar .assistant-step-index[data-v-533cb131]{width:28px;height:28px;border-radius:999px;background:linear-gradient(135deg,#1677ff,#6d28d9);color:#fff;font-size:13px;font-weight:700;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-ms-flex-negative:0;flex-shrink:0}.assistant-guide-bar .assistant-step-body[data-v-533cb131]{min-width:0}.assistant-guide-bar .assistant-step-title[data-v-533cb131]{font-size:13px;font-weight:700;color:#1f2937}.assistant-guide-bar .assistant-step-desc[data-v-533cb131]{margin-top:4px;font-size:12px;line-height:1.6;color:#64748b}.assistant-guide-bar .assistant-guide-actions[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px;-ms-flex-negative:0;flex-shrink:0}.assistant-guide-bar .assistant-guide-actions .assistant-guide-close[data-v-533cb131]{min-width:36px;width:36px;padding:0;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-color:rgba(148,163,184,.28);color:#64748b;background:hsla(0,0%,100%,.72)}.assistant-guide-bar .assistant-guide-actions .assistant-guide-close[data-v-533cb131]:focus,.assistant-guide-bar .assistant-guide-actions .assistant-guide-close[data-v-533cb131]:hover{color:#1677ff;border-color:rgba(24,144,255,.35);background:#fff}.strategy-empty-state[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:10px;padding:28px 16px 32px;text-align:center}.strategy-empty-state .strategy-empty-desc[data-v-533cb131]{max-width:420px;color:#475569;line-height:1.7}.strategy-empty-state .strategy-empty-path[data-v-533cb131]{font-size:12px;color:#64748b}.trading-assistant[data-v-533cb131]{padding:0;height:calc(100vh - 120px);background:-webkit-gradient(linear,left top,left bottom,from(#f8fafc),to(#f1f5f9));background:linear-gradient(180deg,#f8fafc,#f1f5f9)}.trading-assistant .strategy-layout[data-v-533cb131]{height:calc(100vh - 120px);-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}@media (max-width:768px){.trading-assistant[data-v-533cb131]{min-height:auto;margin:-24px}.trading-assistant .assistant-guide-bar[data-v-533cb131]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;margin:0 12px 12px;padding:14px}.trading-assistant .assistant-guide-bar .assistant-guide-steps[data-v-533cb131]{grid-template-columns:1fr}.trading-assistant .assistant-guide-bar .assistant-guide-actions[data-v-533cb131]{width:100%}.trading-assistant .assistant-guide-bar .assistant-guide-actions .ant-btn[data-v-533cb131]{-webkit-box-flex:1;-ms-flex:1;flex:1}.trading-assistant .strategy-layout[data-v-533cb131]{height:auto;min-height:calc(100vh - 120px)}.trading-assistant .strategy-list-col[data-v-533cb131]{margin-bottom:12px;height:auto;max-height:50vh}.trading-assistant .strategy-list-col .strategy-list-card[data-v-533cb131]{height:auto;max-height:50vh}.trading-assistant .strategy-list-col .strategy-list-card .card-title[data-v-533cb131]{-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;padding:12px 16px}.trading-assistant .strategy-list-col .strategy-list-card .card-title span[data-v-533cb131]{font-size:14px;font-weight:600}.trading-assistant .strategy-list-col .strategy-list-card .card-title .ant-btn[data-v-533cb131]{font-size:12px;padding:0 10px;height:28px;line-height:28px}.trading-assistant .strategy-list-col .strategy-list-card[data-v-533cb131] .ant-card-body{max-height:calc(50vh - 60px);overflow-y:auto;padding:8px;-webkit-overflow-scrolling:touch}.trading-assistant .strategy-list-col .strategy-list-card[data-v-533cb131] .ant-card-head{padding:0;min-height:48px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131]{padding:12px 8px;margin-bottom:4px;border-radius:8px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta{width:100%}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-action{margin-left:8px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header[data-v-533cb131]{width:100%}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper[data-v-533cb131]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;margin-bottom:6px;-ms-flex-wrap:wrap;flex-wrap:wrap}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .exchange-tag[data-v-533cb131],.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .strategy-type-tag[data-v-533cb131]{font-size:10px;padding:2px 6px;line-height:1.4;margin:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .exchange-tag .anticon[data-v-533cb131]{font-size:10px;margin-right:2px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .strategy-name[data-v-533cb131]{font-size:14px;font-weight:600;-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;margin-top:4px;font-size:11px;-ms-flex-wrap:wrap;flex-wrap:wrap}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info .info-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:3px;-ms-flex-negative:0;flex-shrink:0;font-size:11px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info .info-item .anticon{font-size:11px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info .status-label{font-size:10px;padding:2px 6px;line-height:1.4}.trading-assistant .strategy-detail-col[data-v-533cb131]{height:auto;min-height:calc(50vh - 60px)}.trading-assistant .strategy-detail-col .strategy-detail-panel[data-v-533cb131]{gap:12px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card[data-v-533cb131] .ant-card-body{padding:16px 12px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card[data-v-533cb131] .ant-card-head{padding:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header[data-v-533cb131]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left[data-v-533cb131]{width:100%}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title[data-v-533cb131]{font-size:18px;font-weight:600;margin-bottom:12px;line-height:1.4;word-break:break-word}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta[data-v-533cb131]{display:grid;grid-template-columns:1fr 1fr;gap:8px;-webkit-box-align:start;-ms-flex-align:start;align-items:start}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta[data-v-533cb131] .ant-tag{grid-column:-1;justify-self:start;margin:0;font-size:11px;padding:4px 8px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta .meta-item[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:4px;font-size:12px;line-height:1.5;word-break:break-word}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta .meta-item .anticon[data-v-533cb131]{font-size:12px;-ms-flex-negative:0;flex-shrink:0;margin-top:2px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta .meta-item>span[data-v-533cb131]{word-break:break-word;line-height:1.5;-webkit-box-flex:1;-ms-flex:1;flex:1}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta .meta-item span[data-v-533cb131]:not(.anticon){display:inline;word-break:break-word;overflow-wrap:break-word}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right[data-v-533cb131]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .ant-btn[data-v-533cb131]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:100px;font-size:13px;padding:0 12px;height:36px;line-height:36px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .ant-btn .anticon[data-v-533cb131]{margin-right:4px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-card-body{padding:12px 8px;overflow-x:hidden}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-card-head{padding:0 8px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-tabs .ant-tabs-nav{padding:0 4px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-tabs .ant-tabs-nav .ant-tabs-tab{font-size:13px;padding:8px 10px;margin:0 2px;white-space:nowrap}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-tabs .ant-tabs-content{padding-top:12px;overflow-x:hidden}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-tabs .ant-tabs-content .ant-tabs-tabpane{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:768px) and (max-width:480px){.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta[data-v-533cb131]{grid-template-columns:1fr}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta[data-v-533cb131] .ant-tag{grid-column:1}}@media (max-width:480px){.trading-assistant .strategy-list-col .strategy-list-card[data-v-533cb131],.trading-assistant .strategy-list-col[data-v-533cb131]{max-height:45vh}.trading-assistant .strategy-list-col .strategy-list-card[data-v-533cb131] .ant-card-body{max-height:calc(45vh - 60px)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta[data-v-533cb131]{grid-template-columns:1fr;gap:6px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta .meta-item[data-v-533cb131]{font-size:11px;line-height:1.6}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .ant-btn[data-v-533cb131]{width:100%;-webkit-box-flex:0;-ms-flex:none;flex:none}}.trading-assistant .strategy-list-col .strategy-list-card[data-v-533cb131],.trading-assistant .strategy-list-col[data-v-533cb131]{height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.trading-assistant .strategy-list-col .strategy-list-card[data-v-533cb131]{border-radius:16px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08);border:none;overflow:hidden;-webkit-transition:-webkit-box-shadow .3s ease;transition:-webkit-box-shadow .3s ease;transition:box-shadow .3s ease;transition:box-shadow .3s ease,-webkit-box-shadow .3s ease}.trading-assistant .strategy-list-col .strategy-list-card[data-v-533cb131]:hover{-webkit-box-shadow:0 8px 32px rgba(0,0,0,.12);box-shadow:0 8px 32px rgba(0,0,0,.12)}.trading-assistant .strategy-list-col .strategy-list-card .card-title[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.trading-assistant .strategy-list-col .strategy-list-card .card-title span[data-v-533cb131]{font-size:16px;font-weight:700;background:linear-gradient(135deg,#1e3a5f,#2d5a87);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.trading-assistant .strategy-list-col .strategy-list-card .card-title .ant-btn-primary[data-v-533cb131]{border-radius:8px;background:linear-gradient(135deg,#1890ff,#40a9ff);border:none;-webkit-box-shadow:0 4px 12px rgba(24,144,255,.35);box-shadow:0 4px 12px rgba(24,144,255,.35);-webkit-transition:all .3s ease;transition:all .3s ease}.trading-assistant .strategy-list-col .strategy-list-card .card-title .ant-btn-primary[data-v-533cb131]:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-box-shadow:0 6px 16px rgba(24,144,255,.45);box-shadow:0 6px 16px rgba(24,144,255,.45)}.trading-assistant .strategy-list-col .strategy-list-card .group-mode-switch[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;padding:8px 0 12px;border-bottom:1px solid #f0f0f0;margin-bottom:12px}.trading-assistant .strategy-list-col .strategy-list-card .group-mode-switch .group-mode-label[data-v-533cb131]{font-size:13px;color:#8c8c8c;font-weight:500}.trading-assistant .strategy-list-col .strategy-list-card .group-mode-switch[data-v-533cb131] .ant-radio-group .ant-radio-button-wrapper{font-size:12px;padding:0 10px;height:26px;line-height:24px;border-radius:4px}.trading-assistant .strategy-list-col .strategy-list-card .group-mode-switch[data-v-533cb131] .ant-radio-group .ant-radio-button-wrapper:first-child{border-radius:4px 0 0 4px}.trading-assistant .strategy-list-col .strategy-list-card .group-mode-switch[data-v-533cb131] .ant-radio-group .ant-radio-button-wrapper:last-child{border-radius:0 4px 4px 0}.trading-assistant .strategy-list-col .strategy-list-card .group-mode-switch[data-v-533cb131] .ant-radio-group .ant-radio-button-wrapper .anticon{margin-right:4px}.trading-assistant .strategy-list-col .strategy-list-card[data-v-533cb131] .ant-card-body{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;background:#fff;padding:12px}.trading-assistant .strategy-list-col .strategy-list-card[data-v-533cb131] .ant-card-head{background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fafbfc));background:linear-gradient(180deg,#fff,#fafbfc);border-bottom:1px solid #f0f0f0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group[data-v-533cb131]{margin-bottom:12px;background:#fff;border-radius:12px;border:1px solid #e8ecf1;overflow:hidden}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:10px 12px;background:linear-gradient(135deg,#f8fafc,#f1f5f9);cursor:pointer;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header[data-v-533cb131]:hover{background:linear-gradient(135deg,#e8f4fd,#e3f0fc)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-left[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-left .collapse-icon[data-v-533cb131]{font-size:12px;color:#8c8c8c;-webkit-transition:-webkit-transform .2s ease;transition:-webkit-transform .2s ease;transition:transform .2s ease;transition:transform .2s ease,-webkit-transform .2s ease}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-left .group-icon[data-v-533cb131]{font-size:16px;color:#1890ff}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-left .group-name[data-v-533cb131]{font-weight:600;font-size:14px;color:#1e3a5f;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-right[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-right .group-status[data-v-533cb131]{font-size:11px;padding:2px 8px;border-radius:10px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-right .group-status.running[data-v-533cb131]{background:rgba(14,203,129,.1);color:#0ecb81}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-right .group-status.stopped[data-v-533cb131]{background:rgba(246,70,93,.1);color:#f6465d}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content[data-v-533cb131]{padding:6px 8px 10px 6px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;padding:10px 12px;margin-bottom:6px;margin-left:4px;border:1px solid #eef2f6;border-left:3px solid #dbe4ee;background:#fbfcfe;border-radius:8px;-webkit-box-shadow:0 1px 2px rgba(15,23,42,.04);box-shadow:0 1px 2px rgba(15,23,42,.04)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item[data-v-533cb131]:last-child{margin-bottom:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item[data-v-533cb131]:hover{background:#f0f7ff;border-left-color:#1890ff;border-color:rgba(24,144,255,.22);-webkit-box-shadow:0 2px 8px rgba(24,144,255,.08);box-shadow:0 2px 8px rgba(24,144,255,.08);-webkit-transform:none;transform:none}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item.active[data-v-533cb131]{background:linear-gradient(135deg,#e8f4ff,#f0f9ff);border-color:rgba(24,144,255,.35);border-left-color:#1890ff;border-left-width:3px;-webkit-box-shadow:0 2px 12px rgba(24,144,255,.12);box-shadow:0 2px 12px rgba(24,144,255,.12)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-content[data-v-533cb131]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-header[data-v-533cb131]{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;width:100%}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-actions[data-v-533cb131]{-ms-flex-negative:0;flex-shrink:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-item-align:center;align-self:center;padding-top:0;margin-left:4px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-actions[data-v-533cb131] .ant-btn{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-info[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-top:4px;font-size:12px;color:#8c8c8c}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-info .info-item[data-v-533cb131]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;white-space:nowrap}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-info .info-item .anticon[data-v-533cb131]{font-size:12px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-info .status-label[data-v-533cb131]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;padding:3px 10px;border-radius:16px;font-size:11px;font-weight:600;line-height:1;border:1px solid transparent;-ms-flex-negative:0;flex-shrink:0;background:linear-gradient(135deg,#f0f2f5,#e8eaed);color:#595959}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-info .status-label[data-v-533cb131]:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-info .status-running[data-v-533cb131]{background:linear-gradient(135deg,rgba(14,203,129,.15),rgba(14,203,129,.08));color:#0ecb81;border-color:rgba(14,203,129,.3)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-info .status-stopped[data-v-533cb131]{background:linear-gradient(135deg,rgba(246,70,93,.15),rgba(246,70,93,.08));color:#f6465d;border-color:rgba(246,70,93,.3)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-info .status-error[data-v-533cb131]{background:linear-gradient(135deg,rgba(255,77,79,.15),rgba(255,77,79,.08));color:#ff4d4f;border-color:rgba(255,77,79,.3)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item.strategy-list-item--strategy-group .strategy-item-header[data-v-533cb131]{margin-bottom:2px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item.strategy-list-item--strategy-group .strategy-name-wrapper[data-v-533cb131]{-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item.strategy-list-item--strategy-group .strategy-name[data-v-533cb131]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item.strategy-list-item--strategy-group .strategy-item-info[data-v-533cb131]{gap:10px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;cursor:pointer;padding:14px 16px;border-radius:12px;-webkit-transition:all .3s cubic-bezier(.4,0,.2,1);transition:all .3s cubic-bezier(.4,0,.2,1);position:relative;margin-bottom:8px;background:#fafbfc;border:1px solid transparent}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-content[data-v-533cb131]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-actions[data-v-533cb131]{-ms-flex-negative:0;flex-shrink:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-item-align:center;align-self:center;margin-left:4px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-actions[data-v-533cb131] .ant-btn{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-info[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-top:4px;font-size:12px;color:#8c8c8c}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-info .info-item[data-v-533cb131]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;white-space:nowrap}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-info .info-item .anticon[data-v-533cb131]{font-size:12px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-info .status-label[data-v-533cb131]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;padding:3px 10px;border-radius:16px;font-size:11px;font-weight:600;line-height:1;border:1px solid transparent;-ms-flex-negative:0;flex-shrink:0;background:linear-gradient(135deg,#f0f2f5,#e8eaed);color:#595959}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-info .status-label[data-v-533cb131]:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-info .status-running[data-v-533cb131]{background:linear-gradient(135deg,rgba(14,203,129,.15),rgba(14,203,129,.08));color:#0ecb81;border-color:rgba(14,203,129,.3)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-info .status-stopped[data-v-533cb131]{background:linear-gradient(135deg,rgba(246,70,93,.15),rgba(246,70,93,.08));color:#f6465d;border-color:rgba(246,70,93,.3)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-info .status-error[data-v-533cb131]{background:linear-gradient(135deg,rgba(255,77,79,.15),rgba(255,77,79,.08));color:#ff4d4f;border-color:rgba(255,77,79,.3)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131]:hover{background:linear-gradient(135deg,#f0f7ff,#f5f9ff);border-color:rgba(24,144,255,.2);-webkit-transform:none;transform:none;-webkit-box-shadow:0 2px 12px rgba(24,144,255,.1);box-shadow:0 2px 12px rgba(24,144,255,.1)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item.active[data-v-533cb131]{background:linear-gradient(135deg,#e6f4ff,#f0f9ff);border-color:#1890ff;border-left:4px solid #1890ff;-webkit-box-shadow:0 4px 16px rgba(24,144,255,.15);box-shadow:0 4px 16px rgba(24,144,255,.15)}@media (max-width:768px){.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131]{padding:12px 8px;margin:0 4px 4px 4px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item.active[data-v-533cb131]{border-left-width:2px}}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px;-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .strategy-name[data-v-533cb131]{font-weight:600;font-size:14px;-ms-flex-negative:0;flex-shrink:0;color:#1e3a5f;-webkit-transition:color .2s ease;transition:color .2s ease}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .exchange-tag[data-v-533cb131]{-ms-flex-negative:0;flex-shrink:0;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:11px;line-height:1.5;padding:2px 8px;border-radius:6px;background:linear-gradient(135deg,rgba(102,126,234,.1),rgba(118,75,162,.1));border:1px solid rgba(102,126,234,.2);color:#667eea;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .exchange-tag .anticon[data-v-533cb131]{font-size:11px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .strategy-type-tag[data-v-533cb131]{-ms-flex-negative:0;flex-shrink:0;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:10px;line-height:1.5;margin-left:4px;padding:2px 8px;border-radius:6px;background:linear-gradient(135deg,rgba(156,39,176,.1),rgba(103,58,183,.1));border:1px solid rgba(156,39,176,.2)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .strategy-type-tag .anticon[data-v-533cb131]{font-size:10px;margin-right:3px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper.strategy-name-wrapper--grouped[data-v-533cb131]{-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-ms-flex-line-pack:start;align-content:flex-start;row-gap:6px;-webkit-column-gap:6px;-moz-column-gap:6px;column-gap:6px;width:100%}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper.strategy-name-wrapper--grouped[data-v-533cb131] .ant-tag{margin-right:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper.strategy-name-wrapper--grouped .status-label[data-v-533cb131]{-ms-flex-negative:0;flex-shrink:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header[data-v-533cb131] .status-stopped{color:#f6465d!important;border-color:#f6465d!important}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description{max-width:calc(100% - 20px);overflow:hidden}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;gap:12px;margin-top:8px;font-size:12px;color:var(--text-color-secondary,#8c8c8c);-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;max-width:100%;overflow:hidden}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info .status-label{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;padding:4px 12px;border-radius:16px;font-size:11px;font-weight:600;line-height:1;border:1px solid transparent;-ms-flex-negative:0;flex-shrink:0;background:linear-gradient(135deg,#f0f2f5,#e8eaed);color:#595959;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info .status-label:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info .status-running{background:linear-gradient(135deg,rgba(14,203,129,.15),rgba(14,203,129,.08));color:#0ecb81;border-color:rgba(14,203,129,.3);-webkit-box-shadow:0 2px 8px rgba(14,203,129,.2);box-shadow:0 2px 8px rgba(14,203,129,.2)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info .status-running:before{-webkit-animation:statusPulse-533cb131 2s infinite;animation:statusPulse-533cb131 2s infinite;-webkit-box-shadow:0 0 8px #0ecb81;box-shadow:0 0 8px #0ecb81}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info .status-stopped{background:linear-gradient(135deg,rgba(246,70,93,.15),rgba(246,70,93,.08));color:#f6465d;border-color:rgba(246,70,93,.3)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info .status-error{background:linear-gradient(135deg,rgba(255,77,79,.15),rgba(255,77,79,.08));color:#ff4d4f;border-color:rgba(255,77,79,.3)}@-webkit-keyframes statusPulse-533cb131{0%,to{opacity:1}50%{opacity:.5}}@keyframes statusPulse-533cb131{0%,to{opacity:1}50%{opacity:.5}}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info .info-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;-ms-flex-negative:1;flex-shrink:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info .info-item.strategy-name-text{font-weight:500;color:#1e3a5f;max-width:100%;white-space:normal;line-height:1.35}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131] .ant-list-item-meta-description .strategy-item-info/deep/.ant-tag{margin-right:0;font-size:11px;line-height:18px;padding:0 6px}.trading-assistant .strategy-detail-col[data-v-533cb131]{height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;overflow-y:auto}.trading-assistant .strategy-detail-col .strategy-empty-detail[data-v-533cb131]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-height:320px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:24px 16px}.trading-assistant .strategy-detail-col .strategy-empty-detail-card[data-v-533cb131]{max-width:420px;width:100%;text-align:center;padding:40px 32px 36px;border-radius:16px;background:linear-gradient(165deg,#fff,#f8fafc 55%,#f1f5f9);border:1px solid #e8ecf1;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08)}.trading-assistant .strategy-detail-col .strategy-empty-detail-icon[data-v-533cb131]{width:72px;height:72px;margin:0 auto 20px;border-radius:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background:linear-gradient(135deg,rgba(24,144,255,.12),rgba(64,169,255,.08));color:#1890ff;font-size:32px}.trading-assistant .strategy-detail-col .strategy-empty-detail-title[data-v-533cb131]{margin:0 0 12px;font-size:18px;font-weight:700;color:#1e3a5f;letter-spacing:.02em}.trading-assistant .strategy-detail-col .strategy-empty-detail-hint[data-v-533cb131]{margin:0 0 24px;font-size:14px;line-height:1.65;color:#64748b}.trading-assistant .strategy-detail-col .strategy-empty-detail-actions[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:12px}.trading-assistant .strategy-detail-col .strategy-detail-panel[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:16px;min-height:100%}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card[data-v-533cb131]{-ms-flex-negative:0;flex-shrink:0;background:linear-gradient(135deg,#fff,#f8fafc);border:none;border-radius:16px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08);-webkit-transition:all .3s ease;transition:all .3s ease}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card[data-v-533cb131]:hover{-webkit-box-shadow:0 8px 32px rgba(0,0,0,.12);box-shadow:0 8px 32px rgba(0,0,0,.12)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card[data-v-533cb131] .ant-card-head{background:transparent;border-bottom:none}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card[data-v-533cb131] .ant-card-body{background:transparent;padding:20px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:24px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left[data-v-533cb131]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:12px;margin-bottom:16px;-ms-flex-wrap:wrap;flex-wrap:wrap}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .strategy-title[data-v-533cb131]{font-size:20px;font-weight:700;margin:0;background:linear-gradient(135deg,#1e3a5f,#2d5a87);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge[data-v-533cb131]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;padding:6px 14px;border-radius:20px;font-size:13px;font-weight:600;-webkit-transition:all .3s ease;transition:all .3s ease}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge .status-dot[data-v-533cb131]{width:8px;height:8px;border-radius:50%;-webkit-animation:pulse-533cb131 2s infinite;animation:pulse-533cb131 2s infinite}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge.status-running[data-v-533cb131]{background:linear-gradient(135deg,rgba(14,203,129,.15),rgba(14,203,129,.08));color:#0ecb81;border:1px solid rgba(14,203,129,.3)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge.status-running .status-dot[data-v-533cb131]{background:#0ecb81;-webkit-box-shadow:0 0 12px #0ecb81;box-shadow:0 0 12px #0ecb81}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge.status-stopped[data-v-533cb131]{background:linear-gradient(135deg,rgba(246,70,93,.15),rgba(246,70,93,.08));color:#f6465d;border:1px solid rgba(246,70,93,.3)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge.status-stopped .status-dot[data-v-533cb131]{background:#f6465d;-webkit-animation:none;animation:none}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge.status-error[data-v-533cb131]{background:linear-gradient(135deg,rgba(255,77,79,.15),rgba(255,77,79,.08));color:#ff4d4f;border:1px solid rgba(255,77,79,.3)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge.status-error .status-dot[data-v-533cb131]{background:#ff4d4f;-webkit-animation:none;animation:none}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:12px;margin-bottom:14px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px;padding:10px 14px;background:#fff;border-radius:8px;border:1px solid #f0f0f0;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card[data-v-533cb131]:hover{-webkit-box-shadow:0 2px 8px rgba(0,0,0,.06);box-shadow:0 2px 8px rgba(0,0,0,.06)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-icon[data-v-533cb131]{width:36px;height:36px;border-radius:8px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;font-size:16px;-ms-flex-negative:0;flex-shrink:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-icon.investment[data-v-533cb131]{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-icon.equity[data-v-533cb131]{background:linear-gradient(135deg,#11998e,#38ef7d);color:#fff}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-icon.pnl[data-v-533cb131]{background:linear-gradient(135deg,#f093fb,#f5576c);color:#fff}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-content[data-v-533cb131]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-content .stat-label[data-v-533cb131]{font-size:11px;color:#8c8c8c;margin-bottom:2px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-content .stat-value[data-v-533cb131]{font-size:15px;font-weight:700;color:#1e3a5f;line-height:1.2}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-content .stat-value .pnl-percent[data-v-533cb131]{font-size:12px;font-weight:500;opacity:.8}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card.pnl-card.profit .stat-content .stat-value[data-v-533cb131]{color:#0ecb81}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card.pnl-card.loss .stat-content .stat-value[data-v-533cb131]{color:#f6465d}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-tags[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-tags .tag-item[data-v-533cb131]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;padding:4px 10px;background:#f5f7fa;border-radius:14px;font-size:12px;color:#5a6872;border:1px solid #e8ecf1}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-tags .tag-item .anticon[data-v-533cb131]{font-size:12px;color:#1890ff}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right[data-v-533cb131]{-ms-flex-negative:0;flex-shrink:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .action-btn[data-v-533cb131]{min-width:120px;height:38px;border-radius:8px;font-size:14px;font-weight:600;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:6px;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .action-btn .anticon[data-v-533cb131]{font-size:16px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .action-btn.start-btn[data-v-533cb131]{background:linear-gradient(135deg,#0ecb81,#26d87d);border:none;-webkit-box-shadow:0 2px 8px rgba(14,203,129,.3);box-shadow:0 2px 8px rgba(14,203,129,.3)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .action-btn.start-btn[data-v-533cb131]:hover{-webkit-box-shadow:0 4px 12px rgba(14,203,129,.4);box-shadow:0 4px 12px rgba(14,203,129,.4)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .action-btn.stop-btn[data-v-533cb131]{background:linear-gradient(135deg,#f6465d,#ff6b7a);border:none;-webkit-box-shadow:0 2px 8px rgba(246,70,93,.3);box-shadow:0 2px 8px rgba(246,70,93,.3)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .action-btn.stop-btn[data-v-533cb131]:hover{-webkit-box-shadow:0 4px 12px rgba(246,70,93,.4);box-shadow:0 4px 12px rgba(246,70,93,.4)}@-webkit-keyframes pulse-533cb131{0%,to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}50%{opacity:.6;-webkit-transform:scale(1.1);transform:scale(1.1)}}@keyframes pulse-533cb131{0%,to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}50%{opacity:.6;-webkit-transform:scale(1.1);transform:scale(1.1)}}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131]{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;background:#fff;border:none;border-radius:16px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08);-webkit-transition:all .3s ease;transition:all .3s ease;min-height:400px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131]:hover{-webkit-box-shadow:0 8px 32px rgba(0,0,0,.12);box-shadow:0 8px 32px rgba(0,0,0,.12)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-card-head{background:-webkit-gradient(linear,left top,left bottom,from(#fafbfc),to(#fff));background:linear-gradient(180deg,#fafbfc,#fff);border-bottom:1px solid #f0f0f0;-ms-flex-negative:0;flex-shrink:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-card-body{padding:16px;background:#fff}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-card-body,.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-card-body .ant-tabs{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-card-body .ant-tabs .ant-tabs-bar{-ms-flex-negative:0;flex-shrink:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-card-body .ant-tabs .ant-tabs-content{-webkit-box-flex:1;-ms-flex:1;flex:1}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-card-body .ant-tabs .ant-tabs-tabpane .strategy-tab-pane-inner{min-height:304px;padding-top:2px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-card-body .ant-tabs .ant-tabs-tabpane .position-records,.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-533cb131] .ant-card-body .ant-tabs .ant-tabs-tabpane .trading-records{width:100%}.trading-assistant.theme-dark[data-v-533cb131]{background:#141414;color:var(--dark-text-color,#fff)}.trading-assistant.theme-dark .creation-mode-toggle[data-v-533cb131]{background:rgba(24,144,255,.08);border-color:rgba(24,144,255,.2)}.trading-assistant.theme-dark .creation-mode-toggle .mode-hint[data-v-533cb131]{color:hsla(0,0%,100%,.45)}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-533cb131]{background:#1c1c1c;border:1px solid hsla(0,0%,100%,.06);-webkit-box-shadow:0 4px 24px rgba(0,0,0,.25);box-shadow:0 4px 24px rgba(0,0,0,.25)}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card .card-title span[data-v-533cb131]{background:linear-gradient(135deg,#e0e6ed,#c5ccd6);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-533cb131] .ant-card-head{background:#1c1c1c;border-bottom-color:hsla(0,0%,100%,.06)}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-533cb131] .ant-card-head .ant-card-head-title{color:#d1d4dc}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-533cb131] .ant-card-body{background:transparent}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-533cb131] .ant-empty-description{color:#868993}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-533cb131] .ant-list .ant-list-item{border-bottom-color:hsla(0,0%,100%,.06)}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-533cb131] .ant-list .ant-list-item .ant-list-item-meta-title{color:#d1d4dc}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-533cb131] .ant-list .ant-list-item .ant-list-item-meta-description{color:#868993}.trading-assistant.theme-dark .strategy-list-col .group-mode-switch[data-v-533cb131]{border-bottom-color:hsla(0,0%,100%,.08)}.trading-assistant.theme-dark .strategy-list-col .group-mode-switch .group-mode-label[data-v-533cb131]{color:hsla(0,0%,100%,.45)}.trading-assistant.theme-dark .strategy-list-col .group-mode-switch[data-v-533cb131] .ant-radio-button-wrapper{background:hsla(0,0%,100%,.04);border-color:hsla(0,0%,100%,.12);color:hsla(0,0%,100%,.65)}.trading-assistant.theme-dark .strategy-list-col .group-mode-switch[data-v-533cb131] .ant-radio-button-wrapper:hover{color:#69c0ff}.trading-assistant.theme-dark .strategy-list-col .group-mode-switch[data-v-533cb131] .ant-radio-button-wrapper-checked{background:rgba(24,144,255,.25)!important;border-color:#1890ff!important;color:#fff!important}.trading-assistant.theme-dark .strategy-list-col .strategy-group[data-v-533cb131]{background:rgba(0,0,0,.18);border-color:hsla(0,0%,100%,.08)}.trading-assistant.theme-dark .strategy-list-col .strategy-group-header[data-v-533cb131]{background:hsla(0,0%,100%,.04)}.trading-assistant.theme-dark .strategy-list-col .strategy-group-header[data-v-533cb131]:hover{background:hsla(0,0%,100%,.06)}.trading-assistant.theme-dark .strategy-list-col .strategy-group-header .group-name[data-v-533cb131]{color:hsla(0,0%,100%,.88)}.trading-assistant.theme-dark .strategy-list-col .strategy-group-header .collapse-icon[data-v-533cb131]{color:hsla(0,0%,100%,.45)}.trading-assistant.theme-dark .strategy-list-col .strategy-group-content .strategy-list-item[data-v-533cb131]{background:hsla(0,0%,100%,.03);border-color:hsla(0,0%,100%,.08);border-left-color:hsla(0,0%,100%,.12)}.trading-assistant.theme-dark .strategy-list-col .strategy-group-content .strategy-list-item[data-v-533cb131]:hover{background:hsla(0,0%,100%,.05);border-color:hsla(0,0%,100%,.12);border-left-color:#1890ff}.trading-assistant.theme-dark .strategy-list-col .strategy-group-content .strategy-list-item.active[data-v-533cb131]{background:rgba(24,144,255,.12);border-color:rgba(24,144,255,.28);border-left-color:#1890ff}.trading-assistant.theme-dark .strategy-list-col .strategy-group-content .strategy-list-item .strategy-item-info[data-v-533cb131]{color:#868993}.trading-assistant.theme-dark .strategy-list-col .strategy-group-content .strategy-list-item .strategy-item-info .info-item[data-v-533cb131]{color:hsla(0,0%,100%,.55)}.trading-assistant.theme-dark .strategy-list-col .strategy-group-content .strategy-list-item .strategy-item-info .status-label[data-v-533cb131]{background:hsla(0,0%,100%,.06);color:hsla(0,0%,100%,.45);border-color:hsla(0,0%,100%,.1)}.trading-assistant.theme-dark .strategy-list-col .strategy-group-content .strategy-list-item .strategy-item-info .status-running[data-v-533cb131]{background:rgba(14,203,129,.12);color:#52c41a;border-color:rgba(14,203,129,.25)}.trading-assistant.theme-dark .strategy-list-col .strategy-group-content .strategy-list-item .strategy-item-info .status-stopped[data-v-533cb131]{background:rgba(246,70,93,.12);color:#f6465d;border-color:rgba(246,70,93,.25)}.trading-assistant.theme-dark .strategy-list-col .strategy-group-content .strategy-list-item .strategy-item-info .status-error[data-v-533cb131]{background:rgba(255,77,79,.12);color:#ff4d4f;border-color:rgba(255,77,79,.25)}.trading-assistant.theme-dark .strategy-list-col .strategy-name-wrapper .info-item[data-v-533cb131],.trading-assistant.theme-dark .strategy-list-col .strategy-name-wrapper .strategy-name-text[data-v-533cb131]{color:hsla(0,0%,100%,.88)!important}.trading-assistant.theme-dark .strategy-list-col .strategy-list-item[data-v-533cb131]{background:hsla(0,0%,100%,.02);border:1px solid hsla(0,0%,100%,.04)}.trading-assistant.theme-dark .strategy-list-col .strategy-list-item[data-v-533cb131]:hover{background:hsla(0,0%,100%,.04);border-color:hsla(0,0%,100%,.1);-webkit-transform:none;transform:none}.trading-assistant.theme-dark .strategy-list-col .strategy-list-item.active[data-v-533cb131]{background:rgba(24,144,255,.1);border-color:#1890ff;-webkit-box-shadow:0 4px 20px rgba(24,144,255,.2);box-shadow:0 4px 20px rgba(24,144,255,.2)}.trading-assistant.theme-dark .strategy-list-col .strategy-list-item .strategy-name[data-v-533cb131]{color:#e0e6ed}.trading-assistant.theme-dark .strategy-list-col .strategy-list-item .strategy-item-info[data-v-533cb131]{color:#868993}.trading-assistant.theme-dark .strategy-list-col .strategy-list-item .strategy-item-header .exchange-tag[data-v-533cb131]{background:rgba(102,126,234,.15);border-color:rgba(102,126,234,.3);color:#8da2f0}.trading-assistant.theme-dark .strategy-list-col .strategy-list-item .strategy-item-header .strategy-type-tag[data-v-533cb131]{background:rgba(177,130,255,.15);border-color:rgba(177,130,255,.3);color:#b182ff}.trading-assistant.theme-dark .strategy-list-col .strategy-list-item .strategy-item-header .strategy-name[data-v-533cb131]{color:hsla(0,0%,100%,.88)}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card[data-v-533cb131]{background:#1c1c1c;border:1px solid hsla(0,0%,100%,.06);-webkit-box-shadow:0 4px 24px rgba(0,0,0,.25);box-shadow:0 4px 24px rgba(0,0,0,.25)}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card[data-v-533cb131] .ant-card-head{background:transparent;border-bottom:none}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card[data-v-533cb131] .ant-card-body{background:transparent}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .strategy-title-row .strategy-title[data-v-533cb131]{background:none;color:#e0e6ed;-webkit-text-fill-color:initial}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .key-stats-grid .stat-card[data-v-533cb131]{background:hsla(0,0%,100%,.03);border-color:hsla(0,0%,100%,.06)}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .key-stats-grid .stat-card[data-v-533cb131]:hover{background:hsla(0,0%,100%,.06);border-color:hsla(0,0%,100%,.1)}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .key-stats-grid .stat-card .stat-content .stat-label[data-v-533cb131]{color:#868993}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .key-stats-grid .stat-card .stat-content .stat-value[data-v-533cb131]{color:#e0e6ed}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .strategy-tags .tag-item[data-v-533cb131]{background:hsla(0,0%,100%,.04);border-color:hsla(0,0%,100%,.08);color:#a0a8b3}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .strategy-tags .tag-item[data-v-533cb131]:hover{background:rgba(24,144,255,.1);border-color:rgba(24,144,255,.3)}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-533cb131]{background:#1c1c1c;border:1px solid hsla(0,0%,100%,.06);-webkit-box-shadow:0 4px 24px rgba(0,0,0,.25);box-shadow:0 4px 24px rgba(0,0,0,.25)}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-533cb131] .ant-card-head{background:#1c1c1c;border-bottom-color:hsla(0,0%,100%,.06)}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-533cb131] .ant-card-head .ant-card-head-title{color:#d1d4dc}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-533cb131] .ant-card-body{background:transparent}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-533cb131] .ant-tabs .ant-tabs-nav .ant-tabs-tab{color:#868993}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-533cb131] .ant-tabs .ant-tabs-nav .ant-tabs-tab:hover{color:#d1d4dc}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-533cb131] .ant-tabs .ant-tabs-nav .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn{color:#1890ff}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-533cb131] .ant-tabs .ant-tabs-nav .ant-tabs-ink-bar{background:-webkit-gradient(linear,left top,right top,from(#1890ff),to(#40a9ff));background:linear-gradient(90deg,#1890ff,#40a9ff)}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-533cb131] .ant-tabs .ant-tabs-content{color:#d1d4dc}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-533cb131] .ant-empty-description{color:#868993}.trading-assistant.theme-dark .strategy-detail-col .strategy-empty-detail-card[data-v-533cb131]{background:#1c1c1c;border:1px solid hsla(0,0%,100%,.08);-webkit-box-shadow:0 8px 32px rgba(0,0,0,.35);box-shadow:0 8px 32px rgba(0,0,0,.35)}.trading-assistant.theme-dark .strategy-detail-col .strategy-empty-detail-icon[data-v-533cb131]{background:linear-gradient(135deg,rgba(24,144,255,.22),rgba(64,169,255,.1));color:#69c0ff}.trading-assistant.theme-dark .strategy-detail-col .strategy-empty-detail-title[data-v-533cb131]{color:hsla(0,0%,100%,.92)}.trading-assistant.theme-dark .strategy-detail-col .strategy-empty-detail-hint[data-v-533cb131]{color:hsla(0,0%,100%,.55)}.theme-dark .assistant-guide-bar[data-v-533cb131]{border-color:rgba(23,125,220,.28);background:linear-gradient(135deg,rgba(23,125,220,.14),rgba(114,46,209,.12))}.theme-dark .assistant-guide-bar .assistant-guide-eyebrow[data-v-533cb131]{background:rgba(23,125,220,.2);color:#69c0ff}.theme-dark .assistant-guide-bar .assistant-guide-title[data-v-533cb131]{color:hsla(0,0%,100%,.92)}.theme-dark .assistant-guide-bar .assistant-guide-desc[data-v-533cb131]{color:hsla(0,0%,100%,.72)}.theme-dark .assistant-guide-bar .assistant-step-card[data-v-533cb131]{background:rgba(30,30,30,.6);border-color:hsla(0,0%,100%,.08)}.theme-dark .assistant-guide-bar .assistant-step-title[data-v-533cb131]{color:hsla(0,0%,100%,.9)}.theme-dark .assistant-guide-bar .assistant-step-desc[data-v-533cb131]{color:hsla(0,0%,100%,.58)}.theme-dark .assistant-guide-bar .assistant-guide-close[data-v-533cb131]{background:rgba(30,30,30,.5);border-color:hsla(0,0%,100%,.1);color:hsla(0,0%,100%,.72)}.theme-dark .assistant-guide-bar .assistant-guide-close[data-v-533cb131]:focus,.theme-dark .assistant-guide-bar .assistant-guide-close[data-v-533cb131]:hover{background:rgba(50,50,50,.7);border-color:rgba(105,192,255,.45);color:#91d5ff}.theme-dark .strategy-empty-state .strategy-empty-desc[data-v-533cb131]{color:hsla(0,0%,100%,.72)}.theme-dark .strategy-empty-state .strategy-empty-path[data-v-533cb131]{color:hsla(0,0%,100%,.48)}.strategy-params-collapse[data-v-533cb131]{background:#fafafa;border-radius:10px;overflow:hidden}.strategy-params-collapse[data-v-533cb131] .ant-collapse-item{border-bottom-color:#f0f0f0}.strategy-params-collapse[data-v-533cb131] .ant-collapse-header{font-weight:500;font-size:13px}.strategy-params-collapse[data-v-533cb131] .ant-collapse-content-box{padding:12px 16px}.strategy-params-collapse[data-v-533cb131] .ant-input-number{width:100%}.ai-filter-box[data-v-533cb131]{margin-top:12px;padding:14px 14px 12px;border:1px solid #e8e8e8;border-radius:10px;background:-webkit-gradient(linear,left top,left bottom,from(#fafcff),to(#fff));background:linear-gradient(180deg,#fafcff,#fff)}.ai-filter-header[data-v-533cb131]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px}.ai-filter-header[data-v-533cb131],.ai-filter-title[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ai-filter-title[data-v-533cb131]{gap:8px;font-weight:600;color:#262626}.ai-filter-title .anticon[data-v-533cb131]{color:#1890ff}.ai-filter-hint[data-v-533cb131]{margin-top:6px;font-size:12px;line-height:1.5;color:#8c8c8c}.symbol-option[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.symbol-name[data-v-533cb131]{font-weight:600;color:#8f8d8d;margin-right:8px}.symbol-name-extra[data-v-533cb131]{font-size:12px;color:#999;margin-left:4px}.creation-mode-toggle[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:16px;margin-bottom:16px;padding:14px 16px;background:rgba(24,144,255,.04);border-radius:8px;border:1px solid rgba(24,144,255,.12)}.creation-mode-toggle .mode-meta[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:4px}.creation-mode-toggle .mode-title[data-v-533cb131]{font-size:14px;font-weight:600;color:#262626}.creation-mode-toggle .mode-hint[data-v-533cb131]{color:rgba(0,0,0,.45);font-size:12px}@media (max-width:768px){.creation-mode-toggle[data-v-533cb131]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}}.section-block-title[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:4px;margin-bottom:16px;font-size:14px;font-weight:600;color:#262626}.section-block-desc[data-v-533cb131]{font-size:12px;font-weight:400;color:#8c8c8c}.simple-mode-hero[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:16px;padding:14px 16px;margin-bottom:16px;border-radius:10px;background:linear-gradient(135deg,rgba(24,144,255,.08),rgba(114,46,209,.06));border:1px solid rgba(24,144,255,.14)}.simple-mode-hero-main[data-v-533cb131]{min-width:0}.simple-mode-kicker[data-v-533cb131]{font-size:12px;font-weight:600;color:#1890ff;margin-bottom:4px}.simple-mode-hero-desc[data-v-533cb131]{font-size:12px;line-height:1.6;color:#595959}.simple-mode-badges[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}.advanced-settings-shell[data-v-533cb131],.selected-indicator-card[data-v-533cb131],.simple-essentials-card[data-v-533cb131]{padding:20px;margin-bottom:18px;border-radius:12px;background:#fafcff;border:1px solid rgba(24,144,255,.12);-webkit-box-shadow:0 8px 24px rgba(15,23,42,.04);box-shadow:0 8px 24px rgba(15,23,42,.04)}.required-label[data-v-533cb131]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.required-star[data-v-533cb131]{color:#f5222d;margin-right:4px}.compact-form-item[data-v-533cb131]{margin-bottom:18px}.compact-grid-row[data-v-533cb131]{margin-bottom:4px}.execution-step-layout[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:16px}.execution-step-hero[data-v-533cb131]{padding:16px 18px;border-radius:12px;background:linear-gradient(135deg,rgba(82,196,26,.08),rgba(24,144,255,.08));border:1px solid rgba(24,144,255,.14)}.execution-step-hero-desc[data-v-533cb131]{font-size:12px;line-height:1.7;color:#595959}.execution-section-card[data-v-533cb131]{padding:18px 20px;border-radius:12px;background:#fafcff;border:1px solid rgba(24,144,255,.12);-webkit-box-shadow:0 8px 24px rgba(15,23,42,.04);box-shadow:0 8px 24px rgba(15,23,42,.04)}.section-inline-alert[data-v-533cb131]{margin-top:4px}.notify-channel-grid[data-v-533cb131]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 12px}.execution-warn-text[data-v-533cb131]{color:#ff9800}.execution-mode-cards[data-v-533cb131]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.execution-mode-card[data-v-533cb131]{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:14px;min-height:110px;padding:16px;border-radius:12px;border:1px solid rgba(24,144,255,.12);background:#fff;cursor:pointer;-webkit-transition:all .2s ease;transition:all .2s ease}.execution-mode-card[data-v-533cb131]:hover{border-color:rgba(24,144,255,.35);-webkit-box-shadow:0 8px 24px rgba(24,144,255,.08);box-shadow:0 8px 24px rgba(24,144,255,.08)}.execution-mode-card.active[data-v-533cb131]{border-color:#1890ff;background:linear-gradient(135deg,rgba(24,144,255,.08),rgba(24,144,255,.03));-webkit-box-shadow:0 10px 28px rgba(24,144,255,.12);box-shadow:0 10px 28px rgba(24,144,255,.12)}.execution-mode-card.disabled[data-v-533cb131]{cursor:not-allowed;opacity:.68;background:#fafafa}.execution-mode-card.disabled[data-v-533cb131]:hover{border-color:rgba(24,144,255,.12);-webkit-box-shadow:none;box-shadow:none}.execution-mode-card-icon[data-v-533cb131]{-webkit-box-flex:0;-ms-flex:0 0 42px;flex:0 0 42px;width:42px;height:42px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:12px;font-size:18px}.execution-mode-card-icon.signal[data-v-533cb131]{color:#1890ff;background:rgba(24,144,255,.1)}.execution-mode-card-icon.live[data-v-533cb131]{color:#fa8c16;background:rgba(250,140,22,.12)}.execution-mode-card-body[data-v-533cb131]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.execution-mode-card-title[data-v-533cb131]{font-size:14px;font-weight:600;color:#262626;margin-bottom:6px}.execution-mode-card-desc[data-v-533cb131]{font-size:12px;line-height:1.6;color:#8c8c8c}.execution-mode-card-check[data-v-533cb131]{position:absolute;top:12px;right:12px;color:#1890ff;font-size:18px}.steps-container[data-v-533cb131]{margin-bottom:24px}@media (max-width:768px){.steps-container[data-v-533cb131]{margin-bottom:16px}.steps-container[data-v-533cb131] .ant-steps-item-title{font-size:12px}.steps-container[data-v-533cb131] .ant-steps-item-icon{width:24px;height:24px;line-height:24px;font-size:12px}}.form-container[data-v-533cb131]{min-height:400px;padding:24px 0}.form-container .step-content[data-v-533cb131]{-webkit-animation:fadeIn-533cb131 .3s;animation:fadeIn-533cb131 .3s}.form-container[data-v-533cb131] .ant-form-item{margin-bottom:20px}@media (max-width:768px){.form-container[data-v-533cb131]{min-height:300px;padding:16px 0}.form-container .simple-mode-hero[data-v-533cb131]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.form-container .simple-mode-badges[data-v-533cb131]{width:100%}.form-container .notify-channel-grid[data-v-533cb131]{grid-template-columns:repeat(2,minmax(0,1fr))}.form-container .execution-mode-cards[data-v-533cb131]{grid-template-columns:1fr}.form-container .execution-section-card[data-v-533cb131],.form-container .execution-step-hero[data-v-533cb131]{padding:16px}.form-container[data-v-533cb131] .ant-form-item-label{padding-bottom:4px}.form-container[data-v-533cb131] .ant-form-item-label label{font-size:13px}.form-container[data-v-533cb131] .ant-input,.form-container[data-v-533cb131] .ant-input-number,.form-container[data-v-533cb131] .ant-select{font-size:14px}.form-container[data-v-533cb131] .ant-radio-group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:8px}.form-container[data-v-533cb131] .ant-radio-group .ant-radio-wrapper{font-size:13px}}@media (max-width:480px){.form-container[data-v-533cb131]{min-height:250px;padding:12px 0}.form-container[data-v-533cb131] .ant-form-item-label label{font-size:12px}.form-container[data-v-533cb131] .ant-input,.form-container[data-v-533cb131] .ant-input-number,.form-container[data-v-533cb131] .ant-select{font-size:13px}}.strategy-type-selector[data-v-533cb131]{padding:16px 0}.strategy-type-selector .market-category-selector[data-v-533cb131]{margin-bottom:16px}.strategy-type-selector .market-category-selector .selector-label[data-v-533cb131]{font-weight:600;margin-bottom:8px;color:#262626}.strategy-type-selector .market-category-selector[data-v-533cb131] .ant-radio-group{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px}.strategy-type-selector .strategy-type-card[data-v-533cb131]{cursor:pointer;-webkit-transition:all .3s;transition:all .3s;height:100%;min-height:180px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.strategy-type-selector .strategy-type-card[data-v-533cb131]:hover{border-color:#1890ff;-webkit-box-shadow:0 2px 8px rgba(24,144,255,.2);box-shadow:0 2px 8px rgba(24,144,255,.2)}.strategy-type-selector .strategy-type-card.selected[data-v-533cb131]{border-color:#1890ff;background-color:#e6f7ff;-webkit-box-shadow:0 2px 8px rgba(24,144,255,.3);box-shadow:0 2px 8px rgba(24,144,255,.3)}.strategy-type-selector .strategy-type-card .strategy-type-content[data-v-533cb131]{text-align:center;padding:16px}.strategy-type-selector .strategy-type-card .strategy-type-content .strategy-type-icon[data-v-533cb131]{font-size:48px;color:#1890ff;margin-bottom:16px}.strategy-type-selector .strategy-type-card .strategy-type-content h3[data-v-533cb131]{font-size:18px;font-weight:600;margin-bottom:8px;color:#1f1f1f}.strategy-type-selector .strategy-type-card .strategy-type-content p[data-v-533cb131]{font-size:14px;color:#8c8c8c;margin:0;line-height:1.6}.indicator-option[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:12px}.indicator-option .indicator-option-main[data-v-533cb131]{-webkit-box-flex:1;-ms-flex:1;flex:1}.indicator-option .indicator-name[data-v-533cb131]{display:block;color:#262626;font-weight:600}.indicator-option-desc[data-v-533cb131]{display:block;margin-top:2px;color:#8c8c8c;font-size:12px;line-height:1.5}.selected-indicator-header[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px;margin-bottom:8px}.selected-indicator-name[data-v-533cb131]{font-weight:600;color:#262626}.indicator-description[data-v-533cb131]{border-radius:4px;color:var(--text-color,#666);font-size:14px;line-height:1.6}.theme-dark .advanced-settings-shell[data-v-533cb131],.theme-dark .creation-mode-toggle[data-v-533cb131],.theme-dark .selected-indicator-card[data-v-533cb131],.theme-dark .simple-essentials-card[data-v-533cb131]{background:hsla(0,0%,100%,.04);border-color:hsla(0,0%,100%,.1)}.theme-dark .indicator-option .indicator-name[data-v-533cb131],.theme-dark .mode-title[data-v-533cb131],.theme-dark .section-block-title[data-v-533cb131],.theme-dark .selected-indicator-name[data-v-533cb131]{color:hsla(0,0%,100%,.9)}.theme-dark .indicator-option-desc[data-v-533cb131],.theme-dark .mode-hint[data-v-533cb131],.theme-dark .section-block-desc[data-v-533cb131]{color:hsla(0,0%,100%,.6)}.theme-dark .simple-mode-hero[data-v-533cb131]{background:linear-gradient(135deg,rgba(24,144,255,.14),rgba(114,46,209,.12));border-color:rgba(64,169,255,.18)}.theme-dark .execution-step-hero[data-v-533cb131]{background:linear-gradient(135deg,rgba(82,196,26,.14),rgba(24,144,255,.14));border-color:rgba(64,169,255,.18)}.theme-dark .execution-mode-card[data-v-533cb131]{background:hsla(0,0%,100%,.03);border-color:hsla(0,0%,100%,.08)}.theme-dark .execution-mode-card[data-v-533cb131]:hover{border-color:rgba(64,169,255,.3);-webkit-box-shadow:0 8px 24px rgba(24,144,255,.12);box-shadow:0 8px 24px rgba(24,144,255,.12)}.theme-dark .execution-mode-card.active[data-v-533cb131]{background:linear-gradient(135deg,rgba(24,144,255,.16),rgba(24,144,255,.08));border-color:#1890ff}.theme-dark .execution-mode-card.disabled[data-v-533cb131]{background:hsla(0,0%,100%,.02)}.theme-dark .execution-mode-card-title[data-v-533cb131]{color:#e0e6ed}.theme-dark .execution-mode-card-desc[data-v-533cb131]{color:hsla(0,0%,100%,.6)}.theme-dark .simple-mode-kicker[data-v-533cb131]{color:#69c0ff}.theme-dark .execution-step-hero-desc[data-v-533cb131],.theme-dark .simple-mode-hero-desc[data-v-533cb131]{color:hsla(0,0%,100%,.72)}.indicator-params-form[data-v-533cb131]{padding:12px;background-color:var(--bg-color-secondary,#f5f7fa);border-radius:6px;border:1px dashed var(--border-color,#e0e0e0)}.indicator-params-form .param-item[data-v-533cb131]{margin-bottom:12px}.indicator-params-form .param-label[data-v-533cb131]{display:block;font-size:13px;color:var(--text-color,#666);margin-bottom:4px;font-weight:500}.form-item-hint[data-v-533cb131]{margin-top:4px;font-size:12px;color:var(--text-color-secondary,#8c8c8c)}.test-result[data-v-533cb131]{margin-top:8px;padding:8px;border-radius:4px;font-size:14px}.test-result.success[data-v-533cb131]{background-color:#f6ffed;border:1px solid #b7eb8f;color:#52c41a}.ip-whitelist-tip[data-v-533cb131]{margin-top:12px;padding:12px;background-color:#e6f7ff;border:1px solid #91d5ff;border-radius:4px;font-size:13px;color:#1890ff;line-height:1.6}.ip-whitelist-tip .anticon[data-v-533cb131]{margin-right:6px;color:#1890ff}.ip-whitelist-tip .ip-list[data-v-533cb131]{margin-top:8px;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:6px}.ip-whitelist-tip .ip-list .ant-tag[data-v-533cb131]{margin:0;font-family:Courier New,monospace;font-size:12px}.ip-whitelist-tip.error[data-v-533cb131]{background-color:#fff2f0;border:1px solid #ffccc7;color:#ff4d4f}@-webkit-keyframes fadeIn-533cb131{0%{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes fadeIn-533cb131{0%{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}[data-v-533cb131] .danger-item{color:#ff4d4f}[data-v-533cb131] .mobile-modal .ant-modal{top:20px;padding-bottom:0}[data-v-533cb131] .mobile-modal .ant-modal-content{max-height:calc(100vh - 40px);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}[data-v-533cb131] .mobile-modal .ant-modal-body{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:16px}[data-v-533cb131] .mobile-modal .ant-modal-footer{padding:12px 16px;border-top:1px solid #e8e8e8;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}[data-v-533cb131] .mobile-modal .ant-modal-footer .ant-btn{font-size:13px;padding:0 12px;height:32px}.add-symbol-modal-content .market-tabs[data-v-533cb131],.add-symbol-modal-content .symbol-search-section[data-v-533cb131]{margin-bottom:16px}.add-symbol-modal-content .section-title[data-v-533cb131]{font-weight:500;margin-bottom:8px;color:rgba(0,0,0,.85);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.add-symbol-modal-content .hot-symbols-section[data-v-533cb131],.add-symbol-modal-content .search-results-section[data-v-533cb131]{margin-bottom:16px}.add-symbol-modal-content .symbol-list .symbol-list-item[data-v-533cb131]{cursor:pointer;-webkit-transition:background-color .3s;transition:background-color .3s;padding:8px 12px;border-radius:4px}.add-symbol-modal-content .symbol-list .symbol-list-item[data-v-533cb131]:hover{background-color:#f5f5f5}.add-symbol-modal-content .symbol-item-content[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.add-symbol-modal-content .symbol-item-content .symbol-code[data-v-533cb131]{font-weight:500;margin-right:8px}.add-symbol-modal-content .symbol-item-content .symbol-name[data-v-533cb131]{color:rgba(0,0,0,.45)}.add-symbol-modal-content .selected-symbol-section[data-v-533cb131]{padding:12px;background-color:#f6ffed;border:1px solid #b7eb8f;border-radius:4px;margin-top:16px}.add-symbol-modal-content .selected-symbol-section .selected-symbol-info[data-v-533cb131]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-top:8px}.add-symbol-modal-content .selected-symbol-section .selected-symbol-info .symbol-code[data-v-533cb131]{font-weight:500;margin-right:8px}.add-symbol-modal-content .selected-symbol-section .selected-symbol-info .symbol-name[data-v-533cb131]{color:rgba(0,0,0,.45)}body.dark .ta-strategy-confirm-modal.ant-modal-confirm .ant-modal-content{background:#1e1e1e;border:1px solid hsla(0,0%,100%,.08)}body.dark .ta-strategy-confirm-modal.ant-modal-confirm .ant-modal-body{background:#1e1e1e}body.dark .ta-strategy-confirm-modal.ant-modal-confirm .ant-modal-confirm-body .ant-modal-confirm-title{color:hsla(0,0%,100%,.88)}body.dark .ta-strategy-confirm-modal.ant-modal-confirm .ant-modal-confirm-body .ant-modal-confirm-content{color:hsla(0,0%,100%,.65)}body.dark .ta-strategy-confirm-modal.ant-modal-confirm .ant-modal-confirm-btns{border-top:1px solid hsla(0,0%,100%,.06);padding-top:12px}body.dark .ta-strategy-confirm-modal.ant-modal-confirm .ant-modal-confirm-btns .ant-btn-default{background:hsla(0,0%,100%,.06);border-color:hsla(0,0%,100%,.12);color:hsla(0,0%,100%,.85)}body.dark .ta-strategy-confirm-modal.ant-modal-confirm .ant-modal-confirm-btns .ant-btn-danger{background:#ff4d4f;border-color:#ff4d4f;color:#fff}body.dark .ta-strategy-confirm-modal.ant-modal-confirm .ant-modal-confirm-body>.anticon{color:#faad14}body.dark .mode-selector-modal .ant-modal-content{background:#1e1e1e;border:1px solid hsla(0,0%,100%,.08)}body.dark .mode-selector-modal .ant-modal-content .ant-modal-header{background:#252525;border-bottom-color:hsla(0,0%,100%,.06)}body.dark .mode-selector-modal .ant-modal-content .ant-modal-header .ant-modal-title{color:#e0e6ed}body.dark .mode-selector-modal .ant-modal-content .ant-modal-close-x{color:hsla(0,0%,100%,.45)}body.dark .mode-selector-modal .ant-modal-content .ant-modal-body{color:#d1d4dc}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content{background:#1e1e1e;border:1px solid hsla(0,0%,100%,.08);-webkit-box-shadow:0 18px 48px rgba(0,0,0,.45);box-shadow:0 18px 48px rgba(0,0,0,.45)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .ant-modal-header{background:#252525;border-bottom-color:hsla(0,0%,100%,.06)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .ant-modal-header .ant-modal-title{color:#e0e6ed}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .ant-modal-close-x{color:hsla(0,0%,100%,.45)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .ant-modal-body{color:#d1d4dc;background:#1e1e1e}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .creation-mode-toggle{background:rgba(24,144,255,.08);border-color:rgba(24,144,255,.2)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .creation-mode-toggle .mode-hint,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .creation-mode-toggle .mode-title{color:hsla(0,0%,100%,.72)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-title{color:hsla(0,0%,100%,.65)!important}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-description{color:hsla(0,0%,100%,.35)!important}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-wait .ant-steps-item-icon{background:transparent;border-color:hsla(0,0%,100%,.2)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-wait .ant-steps-item-icon .ant-steps-icon{color:hsla(0,0%,100%,.45)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-process .ant-steps-item-icon{background:#1890ff;border-color:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-process .ant-steps-item-icon .ant-steps-icon{color:#fff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-finish .ant-steps-item-icon{background:transparent;border-color:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-finish .ant-steps-item-icon .ant-steps-icon{color:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-tail:after{background:hsla(0,0%,100%,.1)}body.dark .strategy-form-modal.strategy-form-modal-dark .notify-channel-grid .ant-checkbox-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-height:40px;padding:0 12px;border-radius:10px;background:hsla(0,0%,100%,.03);border:1px solid hsla(0,0%,100%,.08);color:hsla(0,0%,100%,.72)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number{background:#1c1c1c;border-color:hsla(0,0%,100%,.12);color:#d1d4dc}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number::-webkit-input-placeholder,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input::-webkit-input-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number::-moz-placeholder,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input::-moz-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number:-ms-input-placeholder,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input:-ms-input-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number::-ms-input-placeholder,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input::-ms-input-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number::placeholder,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input::placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number:focus,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number:hover,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input:focus,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input:hover{border-color:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number-handler-wrap{background:#252525;border-left-color:hsla(0,0%,100%,.12)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number-handler-wrap .ant-input-number-handler{border-bottom-color:hsla(0,0%,100%,.08);color:hsla(0,0%,100%,.45)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number-handler-wrap .ant-input-number-handler:hover{color:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-select .ant-select-selection{background:#1c1c1c;border-color:hsla(0,0%,100%,.12);color:#d1d4dc}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-select .ant-select-selection .ant-select-arrow{color:hsla(0,0%,100%,.35)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-select .ant-select-selection:hover{border-color:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-radio-group .ant-radio-button-wrapper{background:#1c1c1c;border-color:hsla(0,0%,100%,.12);color:hsla(0,0%,100%,.65)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-radio-group .ant-radio-button-wrapper:hover{color:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#1890ff;border-color:#1890ff;color:#fff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-radio-group .ant-radio-wrapper{color:hsla(0,0%,100%,.65)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-switch{background:hsla(0,0%,100%,.15)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-switch.ant-switch-checked{background:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark textarea.ant-input{background:#1c1c1c;border-color:hsla(0,0%,100%,.12);color:#d1d4dc}body.dark .strategy-form-modal.strategy-form-modal-dark textarea.ant-input::-webkit-input-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark textarea.ant-input::-moz-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark textarea.ant-input:-ms-input-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark textarea.ant-input::-ms-input-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark textarea.ant-input::placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-form-explain,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-form-extra{color:hsla(0,0%,100%,.35)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-form-item-label>label{color:hsla(0,0%,100%,.75)}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-params-collapse{background:#1c1c1c!important;border-color:hsla(0,0%,100%,.08)}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-params-collapse .ant-collapse-item{border-color:hsla(0,0%,100%,.08)}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-params-collapse .ant-collapse-header{color:hsla(0,0%,100%,.85)!important;background:hsla(0,0%,100%,.03)}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-params-collapse .ant-collapse-content{background:#1c1c1c;border-color:hsla(0,0%,100%,.06);color:#d1d4dc}body.dark .strategy-form-modal.strategy-form-modal-dark .advanced-settings-shell,body.dark .strategy-form-modal.strategy-form-modal-dark .execution-section-card,body.dark .strategy-form-modal.strategy-form-modal-dark .selected-indicator-card,body.dark .strategy-form-modal.strategy-form-modal-dark .simple-essentials-card{background:hsla(0,0%,100%,.03);border-color:hsla(0,0%,100%,.08);-webkit-box-shadow:none;box-shadow:none}body.dark .strategy-form-modal.strategy-form-modal-dark .simple-mode-hero{background:linear-gradient(135deg,rgba(24,144,255,.16),rgba(114,46,209,.14));border-color:rgba(64,169,255,.2)}body.dark .strategy-form-modal.strategy-form-modal-dark .execution-step-hero{background:linear-gradient(135deg,rgba(82,196,26,.16),rgba(24,144,255,.14));border-color:rgba(64,169,255,.2)}body.dark .strategy-form-modal.strategy-form-modal-dark .mode-title,body.dark .strategy-form-modal.strategy-form-modal-dark .section-block-title,body.dark .strategy-form-modal.strategy-form-modal-dark .selected-indicator-name{color:#e0e6ed}body.dark .strategy-form-modal.strategy-form-modal-dark .execution-step-hero-desc,body.dark .strategy-form-modal.strategy-form-modal-dark .form-item-hint,body.dark .strategy-form-modal.strategy-form-modal-dark .indicator-description,body.dark .strategy-form-modal.strategy-form-modal-dark .section-block-desc,body.dark .strategy-form-modal.strategy-form-modal-dark .simple-mode-hero-desc{color:hsla(0,0%,100%,.62)}body.dark .strategy-form-modal.strategy-form-modal-dark .ai-filter-box{background:#1c1c1c;border-color:hsla(0,0%,100%,.1)}body.dark .strategy-form-modal.strategy-form-modal-dark .ai-filter-box .ai-filter-title{color:#e0e6ed}body.dark .strategy-form-modal.strategy-form-modal-dark .ai-filter-box .ai-filter-hint{color:hsla(0,0%,100%,.4)}body.dark .strategy-form-modal.strategy-form-modal-dark .form-container{color:#d1d4dc}body.dark .strategy-form-modal.strategy-form-modal-dark .form-container .ant-form-item-label>label{color:hsla(0,0%,100%,.75)}body.dark .strategy-form-modal.strategy-form-modal-dark .ip-whitelist-tip{background:rgba(24,144,255,.08);border-color:rgba(24,144,255,.2);color:#40a9ff}body.dark .strategy-form-modal.strategy-form-modal-dark .indicator-description{background:#1c1c1c;color:hsla(0,0%,100%,.65)}body.dark .strategy-form-modal.strategy-form-modal-dark .indicator-params-form{background:#1c1c1c;border-color:hsla(0,0%,100%,.1)}body.dark .strategy-form-modal.strategy-form-modal-dark .indicator-params-form .param-label{color:hsla(0,0%,100%,.65)}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-type-selector .strategy-type-card{border-color:hsla(0,0%,100%,.1);background:#1c1c1c;color:#d1d4dc}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-type-selector .strategy-type-card:hover{border-color:#177ddc}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-type-selector .strategy-type-card.selected{border-color:#177ddc;background:rgba(23,125,220,.08)}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-type-selector .strategy-type-card .strategy-type-content h3{color:#e0e6ed}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-type-selector .strategy-type-card .strategy-type-content p{color:hsla(0,0%,100%,.45)}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-type-selector .market-category-selector .selector-label{color:hsla(0,0%,100%,.75)}body.dark .strategy-form-modal.strategy-form-modal-dark .indicator-option .indicator-name{color:hsla(0,0%,100%,.9)}body.dark .strategy-form-modal.strategy-form-modal-dark .indicator-option-desc{color:hsla(0,0%,100%,.6)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-select-selection-selected-value{color:#d1d4dc!important}body.dark .strategy-form-modal.strategy-form-modal-dark .execution-mode-card{background:hsla(0,0%,100%,.03);border-color:hsla(0,0%,100%,.08)}body.dark .strategy-form-modal.strategy-form-modal-dark .execution-mode-card:hover{border-color:rgba(64,169,255,.3);-webkit-box-shadow:0 8px 24px rgba(24,144,255,.12);box-shadow:0 8px 24px rgba(24,144,255,.12)}body.dark .strategy-form-modal.strategy-form-modal-dark .execution-mode-card.active{background:linear-gradient(135deg,rgba(24,144,255,.16),rgba(24,144,255,.08));border-color:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark .execution-mode-card.disabled{background:hsla(0,0%,100%,.02)}body.dark .strategy-form-modal.strategy-form-modal-dark .execution-mode-card-icon.signal{color:#69c0ff;background:rgba(24,144,255,.15)}body.dark .strategy-form-modal.strategy-form-modal-dark .execution-mode-card-icon.live{color:#ffc069;background:rgba(250,140,22,.15)}body.dark .strategy-form-modal.strategy-form-modal-dark .execution-mode-card-title{color:#e0e6ed}body.dark .strategy-form-modal.strategy-form-modal-dark .execution-mode-card-desc{color:hsla(0,0%,100%,.6)}body.dark .strategy-form-modal.strategy-form-modal-dark .simple-mode-kicker{color:#69c0ff}body.dark .strategy-form-modal.strategy-form-modal-dark .execution-step-hero-desc,body.dark .strategy-form-modal.strategy-form-modal-dark .simple-mode-hero-desc{color:hsla(0,0%,100%,.72)}body.dark .ant-modal-wrap .ant-modal-content{background:#1e1e1e}body.dark .ant-modal-wrap .ant-modal-content .ant-modal-header{background:#252525;border-bottom-color:hsla(0,0%,100%,.06)}body.dark .ant-modal-wrap .ant-modal-content .ant-modal-header .ant-modal-title{color:#e0e6ed}body.dark .ant-modal-wrap .ant-modal-content .ant-modal-close-x{color:hsla(0,0%,100%,.45)}body.dark .ant-modal-wrap .ant-modal-content .ant-modal-body{color:#d1d4dc}body.dark .ant-modal-wrap .ant-modal-content .ant-modal-footer{border-top-color:hsla(0,0%,100%,.06);background:#252525}body.dark .ant-select-dropdown{background:#1e1e1e;border:1px solid hsla(0,0%,100%,.1);-webkit-box-shadow:0 4px 12px rgba(0,0,0,.4);box-shadow:0 4px 12px rgba(0,0,0,.4)}body.dark .ant-select-dropdown .ant-select-dropdown-menu-item{color:#d1d4dc}body.dark .ant-select-dropdown .ant-select-dropdown-menu-item-active,body.dark .ant-select-dropdown .ant-select-dropdown-menu-item:hover{background:rgba(24,144,255,.1)}body.dark .ant-select-dropdown .ant-select-dropdown-menu-item-selected{background:rgba(24,144,255,.15);color:#1890ff}body.dark .ant-select-dropdown .ant-select-dropdown-menu-item-disabled{color:hsla(0,0%,100%,.25)}body.dark .ant-select-dropdown .ant-select-search__field{background:#141414;border-color:hsla(0,0%,100%,.12);color:#d1d4dc}body.dark .ant-select-dropdown .ant-select-dropdown-menu{background:#1e1e1e}body.dark .ant-select-dropdown .ant-empty-description{color:hsla(0,0%,100%,.35)}body.dark .ant-modal-wrap .ant-collapse{background:#1c1c1c!important;border-color:hsla(0,0%,100%,.08)}body.dark .ant-modal-wrap .ant-collapse .ant-collapse-item{border-color:hsla(0,0%,100%,.08)}body.dark .ant-modal-wrap .ant-collapse .ant-collapse-header{color:hsla(0,0%,100%,.85)!important;background:hsla(0,0%,100%,.03)}body.dark .ant-modal-wrap .ant-collapse .ant-collapse-header .anticon{color:hsla(0,0%,100%,.45)}body.dark .ant-modal-wrap .ant-collapse .ant-collapse-content{background:#1c1c1c;border-color:hsla(0,0%,100%,.06);color:#d1d4dc}body.dark .ant-modal-wrap .ant-spin-text{color:hsla(0,0%,100%,.65)}body.dark .ant-modal-wrap .ant-alert{background:rgba(24,144,255,.06);border-color:rgba(24,144,255,.2)}body.dark .ant-modal-wrap .ant-alert .ant-alert-message{color:hsla(0,0%,100%,.75)}body.dark .ant-modal-wrap .ant-alert .ant-alert-description{color:hsla(0,0%,100%,.55)} \ No newline at end of file diff --git a/frontend/dist/css/303.ec5418ba.css b/frontend/dist/css/303.ec5418ba.css deleted file mode 100644 index 3ea0ab5..0000000 --- a/frontend/dist/css/303.ec5418ba.css +++ /dev/null @@ -1 +0,0 @@ -.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:transparent}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:transparent}.cm-fat-cursor{caret-color:transparent}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative;z-index:0}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none;outline:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-webkit-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}.cm-s-monokai.CodeMirror{background:#272822;color:#f8f8f2}.cm-s-monokai div.CodeMirror-selected{background:#49483e}.cm-s-monokai .CodeMirror-line::selection,.cm-s-monokai .CodeMirror-line>span::selection,.cm-s-monokai .CodeMirror-line>span>span::selection{background:rgba(73,72,62,.99)}.cm-s-monokai .CodeMirror-line::-moz-selection,.cm-s-monokai .CodeMirror-line>span::-moz-selection,.cm-s-monokai .CodeMirror-line>span>span::-moz-selection{background:rgba(73,72,62,.99)}.cm-s-monokai .CodeMirror-gutters{background:#272822;border-right:0}.cm-s-monokai .CodeMirror-guttermarker{color:#fff}.cm-s-monokai .CodeMirror-guttermarker-subtle,.cm-s-monokai .CodeMirror-linenumber{color:#d0d0d0}.cm-s-monokai .CodeMirror-cursor{border-left:1px solid #f8f8f0}.cm-s-monokai span.cm-comment{color:#75715e}.cm-s-monokai span.cm-atom,.cm-s-monokai span.cm-number{color:#ae81ff}.cm-s-monokai span.cm-comment.cm-attribute{color:#97b757}.cm-s-monokai span.cm-comment.cm-def{color:#bc9262}.cm-s-monokai span.cm-comment.cm-tag{color:#bc6283}.cm-s-monokai span.cm-comment.cm-type{color:#5998a6}.cm-s-monokai span.cm-attribute,.cm-s-monokai span.cm-property{color:#a6e22e}.cm-s-monokai span.cm-keyword{color:#f92672}.cm-s-monokai span.cm-builtin{color:#66d9ef}.cm-s-monokai span.cm-string{color:#e6db74}.cm-s-monokai span.cm-variable{color:#f8f8f2}.cm-s-monokai span.cm-variable-2{color:#9effff}.cm-s-monokai span.cm-type,.cm-s-monokai span.cm-variable-3{color:#66d9ef}.cm-s-monokai span.cm-def{color:#fd971f}.cm-s-monokai span.cm-bracket{color:#f8f8f2}.cm-s-monokai span.cm-tag{color:#f92672}.cm-s-monokai span.cm-header,.cm-s-monokai span.cm-link{color:#ae81ff}.cm-s-monokai span.cm-error{background:#f92672;color:#f8f8f0}.cm-s-monokai .CodeMirror-activeline-background{background:#373831}.cm-s-monokai .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.cm-s-eclipse span.cm-meta{color:#ff1717}.cm-s-eclipse span.cm-keyword{line-height:1em;font-weight:700;color:#7f0055}.cm-s-eclipse span.cm-atom{color:#219}.cm-s-eclipse span.cm-number{color:#164}.cm-s-eclipse span.cm-def{color:#00f}.cm-s-eclipse span.cm-variable{color:#000}.cm-s-eclipse span.cm-type,.cm-s-eclipse span.cm-variable-2,.cm-s-eclipse span.cm-variable-3{color:#0000c0}.cm-s-eclipse span.cm-operator,.cm-s-eclipse span.cm-property{color:#000}.cm-s-eclipse span.cm-comment{color:#3f7f5f}.cm-s-eclipse span.cm-string{color:#2a00ff}.cm-s-eclipse span.cm-string-2{color:#f50}.cm-s-eclipse span.cm-qualifier{color:#555}.cm-s-eclipse span.cm-builtin{color:#30a}.cm-s-eclipse span.cm-bracket{color:#cc7}.cm-s-eclipse span.cm-tag{color:#170}.cm-s-eclipse span.cm-attribute{color:#00c}.cm-s-eclipse span.cm-link{color:#219}.cm-s-eclipse span.cm-error{color:red}.cm-s-eclipse .CodeMirror-activeline-background{background:#e8f2ff}.cm-s-eclipse .CodeMirror-matchingbracket{outline:1px solid grey;color:#000!important}[data-v-4fea1865] .ant-modal{top:20px!important}.visual-editor-container[data-v-4fea1865]{border:1px solid #d9d9d9;border-radius:6px;background:#fafafa;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:500px;overflow:hidden}.visual-modules-list[data-v-4fea1865]{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;padding:12px}.empty-visual-state[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:100%;color:#999}.visual-module-card[data-v-4fea1865]{background:#fff;border:1px solid #e8e8e8;border-radius:4px;margin-bottom:12px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.visual-module-card .module-header[data-v-4fea1865]{padding:8px 12px;border-bottom:1px solid #f0f0f0;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;background:#f9f9f9}.visual-module-card .module-header .module-title[data-v-4fea1865],.visual-module-card .module-header[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.visual-module-card .module-header .module-title[data-v-4fea1865]{font-weight:500;gap:8px}.visual-module-card .module-header .remove-icon[data-v-4fea1865]{cursor:pointer;color:#999}.visual-module-card .module-header .remove-icon[data-v-4fea1865]:hover{color:#ff4d4f}.visual-module-card .module-body[data-v-4fea1865]{padding:12px}.visual-module-card .style-config[data-v-4fea1865]{margin-top:12px;padding-top:12px;border-top:1px dashed #f0f0f0}.visual-module-card .style-config .label[data-v-4fea1865]{margin-right:8px;color:#666}.add-module-bar[data-v-4fea1865]{padding:12px;background:#fff;border-top:1px solid #e8e8e8}@media (max-width:768px){.visual-editor-container[data-v-4fea1865]{height:auto;min-height:400px}}.ant-form-item[data-v-4fea1865]{margin-bottom:16px}.editor-content[data-v-4fea1865]{padding:24px;background:#fff;min-height:500px;max-height:82vh;overflow-y:auto}.editor-layout[data-v-4fea1865]{min-height:450px}.code-editor-column[data-v-4fea1865]{height:100%}.code-editor-column[data-v-4fea1865],.code-section[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.code-section[data-v-4fea1865]{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;margin-bottom:16px}.code-section .section-header[data-v-4fea1865]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:12px;padding-bottom:12px;border-bottom:2px solid #f0f0f0}.code-section .section-header .section-title[data-v-4fea1865],.code-section .section-header[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.code-section .section-header .section-title[data-v-4fea1865]{font-weight:600;font-size:14px;color:#262626;gap:8px}.code-section .section-header .section-title[data-v-4fea1865]:before{content:"";display:inline-block;width:4px;height:14px;background:#1890ff;border-radius:2px}.code-section .section-header .section-actions[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.code-section .section-header .section-actions[data-v-4fea1865] .ant-btn-link{color:#1890ff;padding:0 8px}.code-section .section-header .section-actions[data-v-4fea1865] .ant-btn-link:hover{color:#40a9ff}.code-editor-container[data-v-4fea1865]{border:1px solid #d9d9d9;border-radius:6px;overflow:hidden;height:62vh;min-height:520px;max-height:none;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05);box-shadow:inset 0 1px 3px rgba(0,0,0,.05);-webkit-transition:all .3s ease;transition:all .3s ease}.code-editor-container[data-v-4fea1865]:hover{border-color:#40a9ff}.code-editor-container[data-v-4fea1865]:focus-within{border-color:#1890ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2),inset 0 1px 3px rgba(0,0,0,.05);box-shadow:0 0 0 2px rgba(24,144,255,.2),inset 0 1px 3px rgba(0,0,0,.05)}.code-editor-container[data-v-4fea1865] .CodeMirror{-webkit-box-flex:1;-ms-flex:1;flex:1;height:100%;font-family:Courier New,Consolas,Liberation Mono,Menlo,monospace;font-size:13px;line-height:1.6;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;background:#fafafa}.code-editor-container[data-v-4fea1865] .CodeMirror-scroll{-webkit-box-flex:1;-ms-flex:1;flex:1;min-height:100%;max-height:none;overflow-y:auto;overflow-x:auto}.code-editor-container[data-v-4fea1865] .CodeMirror-sizer{min-height:100%!important;padding-left:12px!important}.code-editor-container[data-v-4fea1865] .CodeMirror-gutters{border-right:1px solid #e8e8e8;background:-webkit-gradient(linear,left top,right top,from(#fafafa),to(#f5f5f5));background:linear-gradient(90deg,#fafafa 0,#f5f5f5);width:45px;padding-right:4px}.code-editor-container[data-v-4fea1865] .CodeMirror-linenumber{padding:0 8px 0 4px;min-width:30px;text-align:right;color:#999;font-size:12px}.code-editor-container[data-v-4fea1865] .CodeMirror-lines{padding:12px 8px;background:#fff}.code-editor-container[data-v-4fea1865] .CodeMirror-line{padding-left:0}.code-editor-container[data-v-4fea1865] .CodeMirror-cursor{border-left:2px solid #1890ff}.code-editor-container[data-v-4fea1865] .CodeMirror-selected{background:#e6f7ff}.code-mode-split[data-v-4fea1865]{width:100%}.ai-pane[data-v-4fea1865],.ai-panel[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.ai-panel[data-v-4fea1865]{border:1px solid #e8e8e8;border-radius:6px;background:#fafafa;padding:12px;height:62vh;min-height:520px}.ai-panel-title[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;font-weight:600;margin-bottom:10px;color:#262626}.ai-panel-hint[data-v-4fea1865]{margin-top:10px;color:#8c8c8c;font-size:12px;line-height:1.5}.ai-panel[data-v-4fea1865] textarea.ant-input{-webkit-box-flex:1;-ms-flex:1;flex:1;resize:none}.editor-footer[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;gap:12px}.editor-footer[data-v-4fea1865] .ant-btn{height:36px;padding:0 20px;font-weight:500;border-radius:4px;-webkit-transition:all .3s ease;transition:all .3s ease}.editor-footer[data-v-4fea1865] .ant-btn:not(.ant-btn-primary):hover{border-color:#40a9ff;color:#40a9ff;-webkit-transform:translateY(-1px);transform:translateY(-1px);-webkit-box-shadow:0 2px 8px rgba(24,144,255,.2);box-shadow:0 2px 8px rgba(24,144,255,.2)}.editor-footer[data-v-4fea1865] .ant-btn.ant-btn-primary{-webkit-box-shadow:0 2px 4px rgba(24,144,255,.3);box-shadow:0 2px 4px rgba(24,144,255,.3)}.editor-footer[data-v-4fea1865] .ant-btn.ant-btn-primary:hover{-webkit-box-shadow:0 4px 12px rgba(24,144,255,.4);box-shadow:0 4px 12px rgba(24,144,255,.4);-webkit-transform:translateY(-1px);transform:translateY(-1px)}@media (max-width:768px){.indicator-editor-modal[data-v-4fea1865] .ant-modal{width:100%!important;max-width:100%!important;margin:0!important;top:0!important;padding-bottom:0!important;max-height:100vh!important}.indicator-editor-modal[data-v-4fea1865] .ant-modal-content{height:100vh!important;max-height:100vh!important;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;border-radius:0!important}.indicator-editor-modal[data-v-4fea1865] .ant-modal-header{-ms-flex-negative:0;flex-shrink:0;padding:16px;border-bottom:1px solid #e8e8e8}.indicator-editor-modal[data-v-4fea1865] .ant-modal-body{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;padding:0!important;min-height:0}.indicator-editor-modal[data-v-4fea1865] .ant-modal-footer{-ms-flex-negative:0;flex-shrink:0;padding:12px 16px;border-top:1px solid #e8e8e8}.editor-content[data-v-4fea1865]{padding:16px!important;min-height:auto!important;max-height:none!important;overflow-y:visible!important}.editor-layout[data-v-4fea1865]{min-height:auto!important}.code-editor-column[data-v-4fea1865]{width:100%!important;margin-bottom:16px}.code-section[data-v-4fea1865]{margin-bottom:16px}.code-section .section-header[data-v-4fea1865]{padding-bottom:8px;margin-bottom:8px}.code-section .section-header .section-title[data-v-4fea1865]{font-size:13px}.code-editor-container[data-v-4fea1865]{height:250px!important}.code-editor-container[data-v-4fea1865],.code-editor-container[data-v-4fea1865] .CodeMirror-scroll{min-height:250px!important;max-height:250px!important}.code-editor-container[data-v-4fea1865] .CodeMirror-sizer{min-height:250px!important}.ai-panel[data-v-4fea1865]{height:auto!important;min-height:auto!important}.editor-footer[data-v-4fea1865]{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;gap:8px;padding:0}.editor-footer[data-v-4fea1865] .ant-btn{width:100%;height:40px;margin:0}}.chart-left[data-v-58f93984]{width:70%!important;-webkit-box-flex:0!important;-ms-flex:0 0 70%!important;flex:0 0 70%!important;position:relative;border-right:1px solid #e8e8e8;background:#fff;-webkit-transition:background-color .3s;transition:background-color .3s;-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch}.chart-left.theme-dark[data-v-58f93984]{background:#141414;border-right-color:#2a2a2a}.chart-wrapper[data-v-58f93984]{width:100%;height:100%;position:relative;background:#fff;-webkit-transition:background-color .3s;transition:background-color .3s;-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch;display:-webkit-box;display:-ms-flexbox;display:flex}.theme-dark .chart-wrapper[data-v-58f93984]{background:#141414}.drawing-toolbar[data-v-58f93984]{-ms-flex-negative:0;flex-shrink:0;width:40px;background:#fff;border-right:1px solid #e8e8e8;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:8px 4px;gap:4px;z-index:10;overflow-y:auto;overflow-x:hidden}.chart-left.theme-dark .drawing-toolbar[data-v-58f93984]{background:#141414;border-right-color:#2a2a2a}.drawing-tool-btn[data-v-58f93984]{width:32px;height:32px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;border-radius:4px;-webkit-transition:all .2s;transition:all .2s;color:#666;font-size:16px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chart-left.theme-dark .drawing-tool-btn[data-v-58f93984]{color:#d1d4dc}.drawing-tool-btn[data-v-58f93984]:hover{background:#f0f2f5;color:#1890ff}.chart-left.theme-dark .drawing-tool-btn[data-v-58f93984]:hover{background:#252525;color:#13c2c2}.drawing-tool-btn.active[data-v-58f93984]{background:#e6f7ff;color:#1890ff;border:1px solid #1890ff}.chart-left.theme-dark .drawing-tool-btn.active[data-v-58f93984]{background:#252525;color:#13c2c2;border-color:#13c2c2}.drawing-toolbar .ant-divider-vertical[data-v-58f93984]{margin:8px 0;height:20px}.indicator-toolbar[data-v-58f93984]{-ms-flex-negative:0;flex-shrink:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;padding:8px 12px;background:#fff;border-bottom:1px solid #e8e8e8;-ms-flex-wrap:wrap;flex-wrap:wrap;z-index:1;position:relative;width:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none}.indicator-toolbar[data-v-58f93984]::-webkit-scrollbar{display:none;width:0;height:0}.chart-content-area[data-v-58f93984]{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-width:0;overflow:hidden}.chart-left.theme-dark .indicator-toolbar[data-v-58f93984]{background:#141414;border-bottom-color:#2a2a2a}.indicator-btn[data-v-58f93984]{padding:4px 12px;font-size:12px;font-weight:600;color:#666;background:#f0f2f5;border:1px solid #e8e8e8;border-radius:4px;cursor:pointer;-webkit-transition:all .2s;transition:all .2s;white-space:nowrap;min-width:40px;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chart-left.theme-dark .indicator-btn[data-v-58f93984]{color:#d1d4dc;background:#252525;border-color:#2a2a2a}.indicator-btn[data-v-58f93984]:hover{color:#1890ff;border-color:#1890ff;background:#f0f8ff}.chart-left.theme-dark .indicator-btn[data-v-58f93984]:hover{color:#13c2c2;border-color:#13c2c2;background:#252525}.indicator-btn.active[data-v-58f93984]{color:#1890ff;background:#fff;border-color:#1890ff;border-width:2px;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.1);box-shadow:0 0 0 2px rgba(24,144,255,.1)}.chart-left.theme-dark .indicator-btn.active[data-v-58f93984]{color:#13c2c2;background:#252525;border-color:#13c2c2;-webkit-box-shadow:0 0 0 2px rgba(19,194,194,.2);box-shadow:0 0 0 2px rgba(19,194,194,.2)}.kline-chart-container[data-v-58f93984]{-webkit-box-flex:1;-ms-flex:1;flex:1;width:100%;min-width:0;background:#fff;-webkit-transition:background-color .3s;transition:background-color .3s;-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch;overflow:hidden}.theme-dark .kline-chart-container[data-v-58f93984]{background:#141414}.chart-overlay[data-v-58f93984]{position:absolute;top:0;left:0;right:0;bottom:0;background:hsla(0,0%,100%,.95);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;z-index:1;backdrop-filter:blur(2px)}.chart-left.theme-dark .chart-overlay[data-v-58f93984]{background:hsla(0,0%,8%,.95)}.error-box[data-v-58f93984]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#333}.initial-hint[data-v-58f93984]{background:hsla(0,0%,100%,.98)}.chart-left.theme-dark .initial-hint[data-v-58f93984]{background:hsla(0,0%,8%,.98)}.hint-box[data-v-58f93984]{text-align:center;color:#666;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;max-width:400px;padding:20px}.pyodide-warning[data-v-58f93984]{background:hsla(0,0%,100%,.98)}.chart-left.theme-dark .pyodide-warning[data-v-58f93984]{background:hsla(0,0%,8%,.98)}.warning-box[data-v-58f93984]{text-align:center;color:#666;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;max-width:500px;padding:20px}.warning-title[data-v-58f93984]{font-size:16px;font-weight:600;color:#faad14;margin-bottom:8px}.warning-desc[data-v-58f93984]{font-size:14px;color:#666;line-height:1.6}.chart-left.theme-dark .warning-box[data-v-58f93984]{color:#d1d4dc}.chart-left.theme-dark .warning-title[data-v-58f93984]{color:#faad14}.chart-left.theme-dark .warning-desc[data-v-58f93984]{color:#868993}.chart-left.theme-dark .hint-box[data-v-58f93984]{color:#d1d4dc}.hint-title[data-v-58f93984]{font-size:18px;font-weight:600;color:#333;margin-bottom:12px}.chart-left.theme-dark .hint-title[data-v-58f93984]{color:#d1d4dc}.hint-desc[data-v-58f93984]{font-size:14px;color:#999;line-height:1.6}.chart-left.theme-dark .hint-desc[data-v-58f93984]{color:#787b86}.history-loading-hint[data-v-58f93984]{position:absolute;left:20px;top:60px;z-index:1000!important;display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;padding:8px 16px;background:hsla(0,0%,100%,.98)!important;border:1px solid #e8e8e8;border-radius:4px;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.15);box-shadow:0 2px 8px rgba(0,0,0,.15);font-size:14px;color:#666!important;backdrop-filter:blur(4px);pointer-events:none;visibility:visible!important;opacity:1!important}.chart-left.theme-dark .history-loading-hint[data-v-58f93984]{background:hsla(0,0%,8%,.98)!important;border-color:#2a2a2a;color:#d1d4dc!important}.loading-text[data-v-58f93984]{white-space:nowrap;margin-left:4px}@media (max-width:768px){.drawing-toolbar[data-v-58f93984]{display:none}.indicator-toolbar[data-v-58f93984]{padding-left:12px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch}.indicator-toolbar[data-v-58f93984]::-webkit-scrollbar{display:none;width:0;height:0}.indicator-btn[data-v-58f93984]{-ms-flex-negative:0;flex-shrink:0}}@media (max-width:1200px){.drawing-toolbar[data-v-58f93984]{display:none}.indicator-toolbar[data-v-58f93984]{padding-left:12px}.kline-chart-container[data-v-58f93984]{margin-left:0}.chart-left[data-v-58f93984]{width:100%!important;min-width:100%!important;border-right:none;border-bottom:1px solid #e8e8e8;height:600px!important;min-height:600px!important}.chart-wrapper[data-v-58f93984],.kline-chart-container[data-v-58f93984]{height:100%!important;min-height:600px!important}}@media (max-width:992px){.chart-left[data-v-58f93984]{height:650px!important;min-height:650px!important}.chart-wrapper[data-v-58f93984],.kline-chart-container[data-v-58f93984]{height:100%!important;min-height:650px!important}}@media (max-width:768px){.chart-left[data-v-58f93984]{height:60vh!important;min-height:400px!important;max-height:80vh!important}.chart-wrapper[data-v-58f93984]{height:100%!important;min-height:400px!important;max-height:100%!important}.kline-chart-container[data-v-58f93984]{height:calc(100% - 45px)!important;min-height:350px!important;max-height:calc(100% - 45px)!important}}@media (max-width:576px){.chart-left[data-v-58f93984]{height:55vh!important;min-height:350px!important;max-height:75vh!important}.chart-wrapper[data-v-58f93984]{height:100%!important;min-height:350px!important;max-height:100%!important}.kline-chart-container[data-v-58f93984]{height:calc(100% - 45px)!important;min-height:300px!important;max-height:calc(100% - 45px)!important}}.quick-trade-drawer[data-v-989be352] .ant-drawer-body{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%;overflow-y:auto}.qt-header[data-v-989be352]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid #f0f0f0}.qt-header .qt-header-left[data-v-989be352],.qt-header[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-header .qt-header-left[data-v-989be352]{gap:8px}.qt-header .qt-header-left .qt-icon[data-v-989be352]{font-size:20px;color:#1890ff}.qt-header .qt-header-left .qt-header-title[data-v-989be352]{font-size:16px;font-weight:600}.qt-header .qt-close[data-v-989be352]{font-size:16px;cursor:pointer;color:#999}.qt-header .qt-close[data-v-989be352]:hover{color:#333}.qt-symbol-bar[data-v-989be352]{padding:12px 20px;background:linear-gradient(135deg,#f6f8fc,#eef2f8);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:8px}.qt-symbol-bar .qt-symbol-selector[data-v-989be352],.qt-symbol-bar .qt-symbol-selector[data-v-989be352] .ant-select{width:100%}.qt-symbol-bar .qt-symbol-selector[data-v-989be352] .ant-select-selection{border-radius:6px;border:1px solid #d9d9d9}.qt-symbol-bar .qt-price-display[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.qt-symbol-bar .qt-price-display .qt-current-price[data-v-989be352]{font-size:16px;font-weight:600;color:#333}.qt-symbol-option[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.qt-symbol-option .qt-symbol-option-name[data-v-989be352]{font-weight:600;font-size:14px}.qt-symbol-option .qt-symbol-option-desc[data-v-989be352]{color:#999;font-size:12px}.qt-section[data-v-989be352]{padding:8px 20px}.qt-section .qt-label[data-v-989be352]{font-size:12px;color:#999;margin-bottom:4px;font-weight:500}.qt-section .qt-crypto-hint[data-v-989be352]{font-size:10px;color:#faad14;background:rgba(250,173,20,.1);padding:1px 6px;border-radius:4px;margin-left:4px}.qt-balance[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;margin-top:6px;font-size:12px}.qt-balance .qt-balance-label[data-v-989be352]{color:#999}.qt-balance .qt-balance-value[data-v-989be352]{color:#52c41a;font-weight:600}.qt-manage-link[data-v-989be352]{margin-top:6px;font-size:12px}.qt-direction-toggle[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px}.qt-direction-toggle .qt-dir-btn[data-v-989be352]{-webkit-box-flex:1;-ms-flex:1;flex:1;padding:10px;text-align:center;border-radius:8px;font-weight:600;font-size:14px;cursor:pointer;-webkit-transition:all .2s;transition:all .2s;border:2px solid transparent;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:6px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.qt-direction-toggle .qt-dir-long[data-v-989be352]{color:#52c41a;background:rgba(82,196,26,.06);border-color:rgba(82,196,26,.2)}.qt-direction-toggle .qt-dir-long.active[data-v-989be352]{background:#52c41a;color:#fff;border-color:#52c41a;-webkit-box-shadow:0 4px 12px rgba(82,196,26,.3);box-shadow:0 4px 12px rgba(82,196,26,.3)}.qt-direction-toggle .qt-dir-long[data-v-989be352]:hover:not(.active){border-color:#52c41a}.qt-direction-toggle .qt-dir-short[data-v-989be352]{color:#f5222d;background:rgba(245,34,45,.06);border-color:rgba(245,34,45,.2)}.qt-direction-toggle .qt-dir-short.active[data-v-989be352]{background:#f5222d;color:#fff;border-color:#f5222d;-webkit-box-shadow:0 4px 12px rgba(245,34,45,.3);box-shadow:0 4px 12px rgba(245,34,45,.3)}.qt-direction-toggle .qt-dir-short[data-v-989be352]:hover:not(.active){border-color:#f5222d}.qt-quick-amounts[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:6px;margin-top:6px}.qt-quick-amounts button[data-v-989be352]{-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:12px}.qt-leverage-row[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-tpsl-row[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px}.qt-tpsl-row .qt-tpsl-item[data-v-989be352]{-webkit-box-flex:1;-ms-flex:1;flex:1}.qt-submit-section[data-v-989be352]{padding:12px 20px}.qt-submit-section .qt-submit-btn[data-v-989be352]{height:48px;font-size:16px;font-weight:700;border-radius:8px;letter-spacing:.5px}.qt-submit-section .qt-btn-long[data-v-989be352]{background:#52c41a!important;border-color:#52c41a!important}.qt-submit-section .qt-btn-long[data-v-989be352]:hover{background:#73d13d!important}.qt-submit-section .qt-btn-long[data-v-989be352]:active{background:#389e0d!important}.qt-submit-section .qt-btn-short[data-v-989be352]{background:#f5222d!important;border-color:#f5222d!important}.qt-submit-section .qt-btn-short[data-v-989be352]:hover{background:#ff4d4f!important}.qt-submit-section .qt-btn-short[data-v-989be352]:active{background:#cf1322!important}.qt-position-section[data-v-989be352]{padding:8px 20px 12px}.qt-position-section .qt-section-header[data-v-989be352]{font-size:13px;font-weight:600;color:#666;margin-bottom:8px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.qt-history-section[data-v-989be352]{padding:8px 20px 12px}.qt-history-section[data-v-989be352] .ant-collapse{background:transparent;border:none}.qt-history-section[data-v-989be352] .ant-collapse-item{border:none}.qt-history-section[data-v-989be352] .ant-collapse-header{padding:0!important;cursor:pointer}.qt-history-section[data-v-989be352] .ant-collapse-header:hover{opacity:.8}.qt-history-section[data-v-989be352] .ant-collapse-content{border:none;background:transparent}.qt-history-section[data-v-989be352] .ant-collapse-content-box{padding:8px 0 0 0!important}.qt-history-section .qt-section-header[data-v-989be352]{font-size:13px;font-weight:600;color:#666;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.qt-history-section .qt-history-count[data-v-989be352]{font-size:12px;color:#999;font-weight:400}.qt-position-card[data-v-989be352]{background:#fafafa;border-radius:8px;padding:10px 12px;border-left:3px solid #d9d9d9}.qt-position-card.long[data-v-989be352]{border-left-color:#52c41a}.qt-position-card.short[data-v-989be352]{border-left-color:#f5222d}.qt-position-card .qt-pos-row[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;font-size:13px;padding:2px 0}.qt-position-card .qt-pos-row span[data-v-989be352]:first-child{color:#999}.qt-position-empty[data-v-989be352]{background:#fafafa;border-radius:8px;padding:20px 12px;text-align:center;border:1px dashed #d9d9d9}.qt-green[data-v-989be352]{color:#52c41a!important}.qt-red[data-v-989be352]{color:#f5222d!important}.qt-trade-list .qt-trade-item[data-v-989be352]{padding:6px 0;border-bottom:1px solid #f5f5f5}.qt-trade-list .qt-trade-item[data-v-989be352]:last-child{border-bottom:none}.qt-trade-list .qt-trade-item .qt-trade-main[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.qt-trade-list .qt-trade-item .qt-trade-main .qt-trade-symbol[data-v-989be352]{font-weight:600;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-main .qt-trade-amount[data-v-989be352]{margin-left:auto;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-meta[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-top:2px}.qt-trade-list .qt-trade-item .qt-trade-meta .qt-trade-time[data-v-989be352]{font-size:11px;color:#bbb}.theme-dark .qt-header[data-v-989be352]{border-bottom-color:#303030}.theme-dark .qt-header .qt-header-title[data-v-989be352]{color:#e0e0e0}.theme-dark .qt-header .qt-close[data-v-989be352]{color:#666}.theme-dark .qt-header .qt-close[data-v-989be352]:hover{color:#bbb}.theme-dark .qt-symbol-bar[data-v-989be352]{background:linear-gradient(135deg,#1a1f2e,#141824)}.theme-dark .qt-symbol-bar .qt-current-price[data-v-989be352]{color:#e0e0e0}.theme-dark .qt-symbol-bar[data-v-989be352] .ant-select-selection{background:#1a1f2e;border-color:#303030;color:#e0e0e0}.theme-dark .qt-symbol-bar[data-v-989be352] .ant-select-selection__placeholder{color:#666}.theme-dark .qt-symbol-option .qt-symbol-option-name[data-v-989be352]{color:#e0e0e0}.theme-dark .qt-symbol-option .qt-symbol-option-desc[data-v-989be352]{color:#999}.theme-dark .qt-section .qt-label[data-v-989be352]{color:#777}.theme-dark .qt-position-card[data-v-989be352]{background:#1a1f2e}.theme-dark .qt-position-card .qt-pos-row span[data-v-989be352]:first-child{color:#777}.theme-dark .qt-history-section .qt-section-header[data-v-989be352],.theme-dark .qt-position-card .qt-pos-row span[data-v-989be352]:last-child{color:#ccc}.theme-dark .qt-history-section .qt-history-count[data-v-989be352]{color:#888}.theme-dark .qt-history-section[data-v-989be352] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark .qt-history-section[data-v-989be352] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark .qt-history-section[data-v-989be352] .ant-collapse .ant-collapse-header:hover{opacity:.8}.theme-dark .qt-history-section[data-v-989be352] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark .qt-trade-item[data-v-989be352]{border-bottom-color:#2a2a2a!important}.theme-dark .qt-trade-item .qt-trade-symbol[data-v-989be352]{color:#e0e0e0}.theme-dark .qt-trade-item .qt-trade-amount[data-v-989be352]{color:#ccc}.theme-dark[data-v-989be352] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark[data-v-989be352] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark[data-v-989be352] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark[data-v-989be352] .ant-drawer-content{background:#141414}.theme-dark[data-v-989be352] .ant-input-number,.theme-dark[data-v-989be352] .ant-select-selection{background:#1a1f2e;border-color:#303030;color:#e0e0e0}.theme-dark[data-v-989be352] .ant-radio-group .ant-radio-button-wrapper{background:#1a1f2e;border-color:#303030;color:#ccc}.theme-dark[data-v-989be352] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#1890ff;border-color:#1890ff;color:#fff}.theme-dark[data-v-989be352] .ant-slider-rail{background:#303030}.theme-dark[data-v-989be352] .ant-slider-track{background:#1890ff}.chart-container[data-v-6bd239a6]{background:#f0f2f5;color:#333;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}.chart-container[data-v-6bd239a6],.chart-header[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:100%;min-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.chart-header[data-v-6bd239a6]{max-width:100%;background:#fff;border-bottom:1px solid #e8e8e8;-webkit-box-shadow:0 2px 4px rgba(0,0,0,.02);box-shadow:0 2px 4px rgba(0,0,0,.02)}.header-top[data-v-6bd239a6]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:0 16px;height:60px}.header-left[data-v-6bd239a6],.header-top[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.header-left[data-v-6bd239a6]{gap:20px}.symbol-select[data-v-6bd239a6]{width:220px}.symbol-select[data-v-6bd239a6] .ant-select-selection{background-color:#fff;border:1px solid #e8e8e8;color:#333;border-radius:4px;-webkit-box-shadow:none;box-shadow:none}.symbol-select[data-v-6bd239a6] .ant-select-selection:hover{border-color:#1890ff}.symbol-select[data-v-6bd239a6] .ant-select-focused .ant-select-selection{border-color:#1890ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2);box-shadow:0 0 0 2px rgba(24,144,255,.2)}.symbol-select[data-v-6bd239a6] .ant-select-arrow,.symbol-select[data-v-6bd239a6] .ant-select-selection__placeholder{color:#999}.timeframe-group[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;background:#f0f2f5;border-radius:4px;padding:2px}.timeframe-item[data-v-6bd239a6]{padding:4px 12px;font-size:13px;font-weight:600;color:#666;cursor:pointer;-webkit-transition:all .2s;transition:all .2s;border-radius:4px}.timeframe-item[data-v-6bd239a6]:hover{color:#1890ff;background:#fff}.timeframe-item.active[data-v-6bd239a6]{color:#1890ff;background:#fff;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.current-symbol[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:24px}.symbol-info[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.symbol-label[data-v-6bd239a6]{font-size:16px;font-weight:700;color:#333;line-height:1.2}.market-tag[data-v-6bd239a6]{font-size:10px;color:#666;background:#f0f2f5;padding:1px 4px;border-radius:2px;margin-top:2px}.price-info[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.price-info.color-up[data-v-6bd239a6]{color:#0ecb81}.price-info.color-down[data-v-6bd239a6]{color:#f6465d}.symbol-price[data-v-6bd239a6]{font-size:18px;font-weight:600;font-family:Roboto Mono,monospace;line-height:1.2}.symbol-change[data-v-6bd239a6]{font-size:12px}.mobile-symbol-price[data-v-6bd239a6]{display:none}.panel-header .theme-switcher[data-v-6bd239a6]{margin-left:auto;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.panel-header .realtime-toggle-btn[data-v-6bd239a6],.panel-header .theme-toggle-btn[data-v-6bd239a6]{color:#666;border:none;padding:4px 8px;-webkit-transition:all .3s;transition:all .3s;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:4px;min-width:32px;height:32px}.panel-header .realtime-toggle-btn[data-v-6bd239a6]:hover,.panel-header .theme-toggle-btn[data-v-6bd239a6]:hover{color:#1890ff;background:#f0f2f5}.panel-header .realtime-toggle-btn.active[data-v-6bd239a6],.panel-header .theme-toggle-btn.active[data-v-6bd239a6]{color:#1890ff;background:#e6f7ff}.panel-header .realtime-toggle-btn .anticon[data-v-6bd239a6],.panel-header .theme-toggle-btn .anticon[data-v-6bd239a6]{font-size:16px}.chart-content[data-v-6bd239a6]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-width:100%;max-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.chart-content[data-v-6bd239a6],.chart-main-row[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;overflow:hidden;width:100%}.chart-main-row[data-v-6bd239a6]{height:80vh!important;min-height:500px!important;max-height:80vh!important;-ms-flex-negative:0;flex-shrink:0}.chart-right[data-v-6bd239a6]{width:30%!important;-webkit-box-flex:0!important;-ms-flex:0 0 30%!important;flex:0 0 30%!important;border-left:1px solid #e8e8e8}.chart-right[data-v-6bd239a6],.indicators-panel[data-v-6bd239a6]{background:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.indicators-panel[data-v-6bd239a6]{height:100%}.panel-header[data-v-6bd239a6]{height:48px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:0 16px;border-bottom:1px solid #e8e8e8;font-weight:600;color:#333;background:#fff}.panel-header .mobile-header-create-btn[data-v-6bd239a6]{margin-right:0}.panel-body[data-v-6bd239a6]{padding:0;overflow:hidden}.indicator-section[data-v-6bd239a6],.panel-body[data-v-6bd239a6]{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.indicator-section[data-v-6bd239a6]{min-height:0;border-bottom:1px solid #e8e8e8}.indicator-section[data-v-6bd239a6]:last-child{border-bottom:none}.indicator-section.section-empty[data-v-6bd239a6]{min-height:200px}.section-label[data-v-6bd239a6]{-ms-flex-negative:0;flex-shrink:0;padding:12px 16px;background:#fafafa;border-bottom:1px solid #e8e8e8;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.section-label .section-label-left[data-v-6bd239a6],.section-label[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.section-label .section-label-left[data-v-6bd239a6]{gap:8px;-webkit-box-flex:1;-ms-flex:1;flex:1}.section-label .section-label-left .collapse-icon[data-v-6bd239a6]{font-size:12px;color:#999;-webkit-transition:-webkit-transform .2s;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s}.section-label .section-label-left span[data-v-6bd239a6]{font-weight:500}.section-label .buy-indicator-btn[data-v-6bd239a6]{padding:0;height:auto;margin-left:8px}.create-indicator-btn[data-v-6bd239a6]{margin-left:auto;margin-right:0}@media (max-width:768px){.create-indicator-btn[data-v-6bd239a6]{display:none!important}}.section-content[data-v-6bd239a6]{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;padding:12px 16px;min-height:0}.indicator-card[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:#fff;padding:10px 12px;border-radius:6px;margin-bottom:8px;cursor:pointer;-webkit-transition:all .2s;transition:all .2s;border:1px solid #e8e8e8}.indicator-card[data-v-6bd239a6]:hover{background:#f0f2f5;border-color:#1890ff;-webkit-transform:translateY(-1px);transform:translateY(-1px);-webkit-box-shadow:0 2px 4px rgba(0,0,0,.05);box-shadow:0 2px 4px rgba(0,0,0,.05)}.indicator-card.active[data-v-6bd239a6]{background:#e6f7ff;border-color:#1890ff}.indicator-card.active .card-name[data-v-6bd239a6]{color:#1890ff}.indicator-card.indicator-active[data-v-6bd239a6]{border-color:#52c41a;border-width:2px;background:#f6ffed}.indicator-card.indicator-active[data-v-6bd239a6]:hover{border-color:#73d13d;-webkit-box-shadow:0 2px 8px rgba(82,196,26,.2);box-shadow:0 2px 8px rgba(82,196,26,.2)}.indicator-card.indicator-active .card-name[data-v-6bd239a6]{color:#52c41a}.indicator-card.disabled[data-v-6bd239a6]{opacity:.5;cursor:not-allowed}.indicator-card.disabled[data-v-6bd239a6]:hover{-webkit-transform:none;transform:none;background:#fff;border-color:#e8e8e8;-webkit-box-shadow:none;box-shadow:none}.card-content[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:100%}.card-header[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:4px}.card-name[data-v-6bd239a6]{font-size:13px;color:#333;font-weight:500;-webkit-box-flex:1;-ms-flex:1;flex:1;margin-right:8px}.card-params[data-v-6bd239a6]{font-size:11px;color:#999;margin-top:2px}.card-desc[data-v-6bd239a6]{font-size:11px;color:#999;margin-top:0;display:-webkit-box;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;line-height:1.4;min-height:1.4em;max-height:2.8em}.card-action[data-v-6bd239a6]{color:#999;font-size:12px}.card-action[data-v-6bd239a6]:hover{color:#1890ff}.card-actions[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:12px;-ms-flex-negative:0;flex-shrink:0}.action-icon[data-v-6bd239a6]{font-size:16px;cursor:pointer;-webkit-transition:all .3s;transition:all .3s;color:#999}.action-icon.edit-icon[data-v-6bd239a6]{color:#1890ff}.action-icon.edit-icon[data-v-6bd239a6]:hover{color:#40a9ff}.action-icon.delete-icon[data-v-6bd239a6]{color:#ff4d4f}.action-icon.delete-icon[data-v-6bd239a6]:hover{color:#ff7875}.action-icon[data-v-6bd239a6]:hover{color:#1890ff}.action-icon.toggle-icon.active[data-v-6bd239a6]{color:#52c41a}.action-icon.backtest-icon[data-v-6bd239a6]{color:#722ed1}.action-icon.backtest-icon[data-v-6bd239a6]:hover{color:#9254de}.action-icon.backtest-history-icon[data-v-6bd239a6]{color:#13c2c2}.action-icon.backtest-history-icon[data-v-6bd239a6]:hover{color:#08979c}.action-icon.publish-icon[data-v-6bd239a6]{color:#1890ff}.action-icon.publish-icon[data-v-6bd239a6]:hover{color:#40a9ff}.action-icon.publish-icon.published[data-v-6bd239a6]{color:#52c41a}.action-icon.publish-icon.published[data-v-6bd239a6]:hover{color:#73d13d}.action-icon.create-strategy-icon[data-v-6bd239a6]{color:#fa8c16}.action-icon.create-strategy-icon[data-v-6bd239a6]:hover{color:#ffa940}.action-icon.status-icon.status-normal[data-v-6bd239a6]{color:#52c41a}.action-icon.status-icon.status-expired[data-v-6bd239a6]{color:#ff4d4f}.action-icon.expiry-icon[data-v-6bd239a6]{color:#1890ff}.empty-indicators[data-v-6bd239a6]{padding:40px 20px;gap:8px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.empty-indicators[data-v-6bd239a6],.loading-indicators[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:#999;font-size:13px}.loading-indicators[data-v-6bd239a6]{padding:20px}.custom-scrollbar[data-v-6bd239a6]{scrollbar-width:none;-ms-overflow-style:none}.custom-scrollbar[data-v-6bd239a6]::-webkit-scrollbar{display:none;width:0;height:0}.dark-dropdown{background-color:#fff;border:1px solid #e8e8e8;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.15);box-shadow:0 2px 8px rgba(0,0,0,.15)}.dark-dropdown .ant-select-dropdown-menu-item{color:#333}.dark-dropdown .ant-select-dropdown-menu-item:hover{background-color:#f0f2f5}.dark-dropdown .ant-select-dropdown-menu-item-active{background-color:#e6f7ff;color:#1890ff}.dark-dropdown .ant-empty-description{color:#999}.symbol-option[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.symbol-option .symbol-name[data-v-6bd239a6]{font-weight:600;color:#8f8d8d;margin-right:8px}.symbol-option .symbol-name-extra[data-v-6bd239a6]{font-size:12px;color:#999;margin-left:4px}.empty-watchlist-hint[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#666;font-size:12px}@media (max-width:768px){.chart-container[data-v-6bd239a6]{padding:0;width:calc(100% + 44px)!important;margin:-22px}.chart-header[data-v-6bd239a6]{padding:12px}.chart-header .header-top[data-v-6bd239a6],.chart-header[data-v-6bd239a6]{gap:12px;height:auto;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.chart-header .header-top[data-v-6bd239a6]{padding:0}.chart-header .header-left[data-v-6bd239a6]{width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px}.chart-header .search-section[data-v-6bd239a6]{width:100%}.chart-header .search-section .symbol-select[data-v-6bd239a6]{width:100%!important}.chart-header .timeframe-group[data-v-6bd239a6]{width:100%;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:4px}.chart-header .timeframe-group .timeframe-item[data-v-6bd239a6]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:calc(14.28% - 4px);text-align:center;padding:6px 8px;font-size:12px}.chart-header .current-symbol[data-v-6bd239a6]{display:none}.chart-content[data-v-6bd239a6]{overflow-y:auto}.chart-content[data-v-6bd239a6],.chart-main-row[data-v-6bd239a6]{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-ms-flex-direction:column!important;flex-direction:column!important;height:auto!important;min-height:auto!important;max-height:none!important}.mobile-symbol-price[data-v-6bd239a6]{-webkit-box-ordinal-group:1!important;-ms-flex-order:0!important;order:0!important;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:12px 16px;background:#fff;width:100%}.mobile-symbol-price .mobile-price-info[data-v-6bd239a6],.mobile-symbol-price[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mobile-symbol-price .mobile-price-info[data-v-6bd239a6]{gap:12px;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.mobile-symbol-price .mobile-price-info.color-up[data-v-6bd239a6]{color:#0ecb81}.mobile-symbol-price .mobile-price-info.color-down[data-v-6bd239a6]{color:#f6465d}.mobile-symbol-price .mobile-price-info .mobile-symbol-price[data-v-6bd239a6]{font-size:18px;font-weight:600;font-family:Roboto Mono,monospace}.mobile-symbol-price .mobile-price-info .mobile-symbol-change[data-v-6bd239a6]{font-size:14px;font-weight:500}kline-chart[data-v-6bd239a6]{-webkit-box-ordinal-group:2!important;-ms-flex-order:1!important;order:1!important;width:100%!important;-webkit-box-flex:0!important;-ms-flex:0 0 auto!important;flex:0 0 auto!important;display:block!important;margin-bottom:0!important}kline-chart[data-v-6bd239a6] .chart-left{width:100%!important;height:350px!important;min-height:350px!important;max-height:350px!important;border-right:none!important;border-bottom:1px solid #e8e8e8!important}.chart-right[data-v-6bd239a6]{-webkit-box-ordinal-group:3!important;-ms-flex-order:2!important;order:2!important;width:100%!important;min-width:100%!important;max-width:100%!important;-webkit-box-flex:0!important;-ms-flex:0 0 auto!important;flex:0 0 auto!important;height:auto!important;max-height:calc(100vh - 470px)!important;border-left:none!important;border-top:none!important;margin-top:0!important;display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;visibility:visible!important;opacity:1!important}.chart-right .indicators-panel[data-v-6bd239a6]{height:auto!important;min-height:600px!important;max-height:calc(100vh - 410px)!important;overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.chart-right .indicators-panel .panel-header[data-v-6bd239a6]{position:sticky;top:0;background:#fff;z-index:10;border-bottom:1px solid #e8e8e8;padding:12px;font-size:14px;-ms-flex-negative:0;flex-shrink:0}.chart-right .indicators-panel .panel-header .mobile-header-create-btn[data-v-6bd239a6]{margin-right:0;font-size:12px;height:28px;padding:0 12px}.chart-right .indicators-panel .panel-body[data-v-6bd239a6]{padding:0;overflow:visible;min-height:400px!important}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6],.chart-right .indicators-panel .panel-body[data-v-6bd239a6]{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6]{overflow:hidden;min-height:0;height:100%}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-bar{margin-bottom:0;-ms-flex-negative:0;flex-shrink:0;border-bottom:1px solid #e8e8e8}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-tab{color:#666;font-size:14px}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-tab-active{color:#1890ff}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-ink-bar{background-color:#1890ff}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-content{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:auto;min-height:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-tabpane{height:100%;overflow:hidden;display:none;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-height:0}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-tabpane-active{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-height:0;height:100%;overflow:hidden}.chart-right .indicators-panel .mobile-indicator-tabs .mobile-tab-content[data-v-6bd239a6],.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-content-holder{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;min-height:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%}.chart-right .indicators-panel .mobile-indicator-tabs .mobile-tab-content[data-v-6bd239a6]{width:100%}.chart-right .indicators-panel .mobile-indicator-tabs .section-content[data-v-6bd239a6]{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto!important;overflow-x:hidden;padding:12px;min-height:0;height:100%;-webkit-overflow-scrolling:touch;position:relative}.chart-right .indicators-panel .mobile-indicator-tabs .mobile-create-btn-wrapper[data-v-6bd239a6],.chart-right .indicators-panel .mobile-indicator-tabs .mobile-create-btn[data-v-6bd239a6]{display:none!important}.chart-right .indicators-panel .indicator-section .section-label[data-v-6bd239a6]{padding:10px 12px;font-size:13px}.chart-right .indicators-panel .section-content[data-v-6bd239a6]{padding:10px 12px}.chart-right .indicators-panel .indicator-card[data-v-6bd239a6]{padding:10px}.chart-right .indicators-panel .indicator-card .card-name[data-v-6bd239a6]{font-size:13px}.chart-right .indicators-panel .indicator-card .card-desc[data-v-6bd239a6],.chart-right .indicators-panel .indicator-card .card-params[data-v-6bd239a6]{font-size:11px}}.qt-header-btn[data-v-6bd239a6]{margin-left:16px;background:linear-gradient(135deg,#1890ff,#722ed1);border:none;color:#fff;border-radius:6px;font-weight:600;font-size:12px;padding:0 12px;height:30px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;-webkit-box-shadow:0 2px 8px rgba(24,144,255,.3);box-shadow:0 2px 8px rgba(24,144,255,.3);-webkit-transition:all .3s;transition:all .3s}.qt-header-btn[data-v-6bd239a6]:focus,.qt-header-btn[data-v-6bd239a6]:hover{background:linear-gradient(135deg,#40a9ff,#9254de);color:#fff;-webkit-box-shadow:0 4px 12px rgba(24,144,255,.45);box-shadow:0 4px 12px rgba(24,144,255,.45);-webkit-transform:translateY(-1px);transform:translateY(-1px)}.qt-floating-btn[data-v-6bd239a6]{position:fixed;right:24px;bottom:80px;width:48px;height:48px;border-radius:50%;background:linear-gradient(135deg,#1890ff,#722ed1);color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;-webkit-box-shadow:0 4px 16px rgba(24,144,255,.4);box-shadow:0 4px 16px rgba(24,144,255,.4);z-index:999;-webkit-transition:all .3s;transition:all .3s;font-size:22px}.qt-floating-btn[data-v-6bd239a6]:hover{-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-box-shadow:0 6px 24px rgba(24,144,255,.55);box-shadow:0 6px 24px rgba(24,144,255,.55)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark[data-v-6bd239a6],body.dark,body.realdark{background:#141414;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-bottom-color:#2a2a2a;-webkit-box-shadow:0 2px 4px rgba(0,0,0,.3);box-shadow:0 2px 4px rgba(0,0,0,.3)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .header-top .current-symbol .symbol-label[data-v-6bd239a6],body.dark,body.realdark{color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .header-top .current-symbol .market-tag[data-v-6bd239a6],body.dark,body.realdark{color:#888;background:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .header-top .current-symbol .price-info.color-up[data-v-6bd239a6],body.dark,body.realdark{color:#0ecb81}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .header-top .current-symbol .price-info.color-down[data-v-6bd239a6],body.dark,body.realdark{color:#f6465d}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .header-top .current-symbol .qt-header-btn[data-v-6bd239a6],body.dark,body.realdark{background:linear-gradient(135deg,#177ddc,#642ab5);-webkit-box-shadow:0 2px 8px rgba(23,125,220,.35);box-shadow:0 2px 8px rgba(23,125,220,.35)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .header-top .current-symbol .qt-header-btn[data-v-6bd239a6]:focus,.chart-container.theme-dark .chart-header .header-top .current-symbol .qt-header-btn[data-v-6bd239a6]:hover,body.dark,body.realdark{background:linear-gradient(135deg,#3c9ae8,#854eca);-webkit-box-shadow:0 4px 12px rgba(23,125,220,.5);box-shadow:0 4px 12px rgba(23,125,220,.5)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .qt-floating-btn[data-v-6bd239a6],body.dark,body.realdark{background:linear-gradient(135deg,#177ddc,#642ab5);-webkit-box-shadow:0 4px 16px rgba(23,125,220,.45);box-shadow:0 4px 16px rgba(23,125,220,.45)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .qt-floating-btn[data-v-6bd239a6]:hover,body.dark,body.realdark{-webkit-box-shadow:0 6px 24px rgba(23,125,220,.6);box-shadow:0 6px 24px rgba(23,125,220,.6)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .symbol-select[data-v-6bd239a6] .ant-select-selection,body.dark,body.realdark{background-color:#1c1c1c;border-color:#2a2a2a;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .symbol-select[data-v-6bd239a6] .ant-select-selection:hover,body.dark,body.realdark{border-color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .symbol-select[data-v-6bd239a6] .ant-select-focused .ant-select-selection,body.dark,body.realdark{border-color:#1890ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.3);box-shadow:0 0 0 2px rgba(24,144,255,.3)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .symbol-select[data-v-6bd239a6] .ant-select-arrow,.chart-container.theme-dark .symbol-select[data-v-6bd239a6] .ant-select-selection__placeholder,body.dark,body.realdark{color:#868993}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .timeframe-group[data-v-6bd239a6],body.dark,body.realdark{background:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .timeframe-group .timeframe-item[data-v-6bd239a6],body.dark,body.realdark{color:#868993}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .timeframe-group .timeframe-item[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#1890ff;background:#1c1c1c}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .timeframe-group .timeframe-item.active[data-v-6bd239a6],body.dark,body.realdark{color:#1890ff;background:#1c1c1c;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.3);box-shadow:0 1px 2px rgba(0,0,0,.3)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-symbol-label[data-v-6bd239a6],body.dark,body.realdark{margin-left:5px;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-market-tag[data-v-6bd239a6],body.dark,body.realdark{color:#888;background:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-price-info.color-up[data-v-6bd239a6],body.dark,body.realdark{color:#0ecb81}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-price-info.color-down[data-v-6bd239a6],body.dark,body.realdark{color:#f6465d}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-left-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .panel-header[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-bottom-color:#2a2a2a;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .panel-header .realtime-toggle-btn[data-v-6bd239a6],body.dark,body.realdark{color:#868993}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .panel-header .realtime-toggle-btn.active[data-v-6bd239a6],.chart-container.theme-dark .chart-right .indicators-panel .panel-header .realtime-toggle-btn[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#1890ff;background:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .panel-body[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-section[data-v-6bd239a6],body.dark,body.realdark{border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .section-label[data-v-6bd239a6],body.dark,body.realdark{color:#868993;background:#2a2a2a;border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .section-label .section-label-left .collapse-icon[data-v-6bd239a6],body.dark,body.realdark{color:#868993}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .section-label .section-label-left span[data-v-6bd239a6],body.dark,body.realdark{color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .section-label .buy-indicator-btn[data-v-6bd239a6],body.dark,body.realdark{color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .section-label .buy-indicator-btn[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#40a9ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card.active[data-v-6bd239a6],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card[data-v-6bd239a6]:hover,body.dark,body.realdark{background:#2a2a2a;border-color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card.active .card-name[data-v-6bd239a6],body.dark,body.realdark{color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card.indicator-active[data-v-6bd239a6],body.dark,body.realdark{border-color:#52c41a;background:#1e3a1e}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card.indicator-active[data-v-6bd239a6]:hover,body.dark,body.realdark{border-color:#73d13d;-webkit-box-shadow:0 2px 8px rgba(82,196,26,.3);box-shadow:0 2px 8px rgba(82,196,26,.3)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card.indicator-active .card-name[data-v-6bd239a6],body.dark,body.realdark{color:#52c41a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .card-name[data-v-6bd239a6],body.dark,body.realdark{color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon[data-v-6bd239a6],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .card-desc[data-v-6bd239a6],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .card-params[data-v-6bd239a6],body.dark,body.realdark{color:#868993}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.edit-icon[data-v-6bd239a6],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.edit-icon[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#40a9ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.delete-icon[data-v-6bd239a6],body.dark,body.realdark{color:#ff4d4f}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.delete-icon[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#ff7875}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.backtest-icon[data-v-6bd239a6],body.dark,body.realdark{color:#b37feb}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.backtest-icon[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#d3adf7}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.backtest-history-icon[data-v-6bd239a6],body.dark,body.realdark{color:#5cdbd3}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.backtest-history-icon[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#87e8de}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.publish-icon[data-v-6bd239a6],body.dark,body.realdark{color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.publish-icon[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#40a9ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.publish-icon.published[data-v-6bd239a6],body.dark,body.realdark{color:#52c41a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.publish-icon.published[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#73d13d}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.toggle-icon.active[data-v-6bd239a6],body.dark,body.realdark{color:#52c41a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .empty-indicators[data-v-6bd239a6],body.dark,body.realdark{color:#868993}@media (max-width:768px){.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .current-symbol[data-v-6bd239a6],body.dark,body.realdark{border-top-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-left[data-v-6bd239a6],body.dark,body.realdark{border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right[data-v-6bd239a6],body.dark,body.realdark{border-top-color:#2a2a2a;max-height:500px!important}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .panel-header[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-bar,body.dark,body.realdark{border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-tab,body.dark,body.realdark{color:#868993}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-tab-active,body.dark,body.realdark{color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-ink-bar,body.dark,body.realdark{background-color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .mobile-indicator-tabs .mobile-create-btn-wrapper[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-symbol-label[data-v-6bd239a6],body.dark,body.realdark{margin-left:5px;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-market-tag[data-v-6bd239a6],body.dark,body.realdark{color:#868993;background:#2a3932}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-price-info.color-up[data-v-6bd239a6],body.dark,body.realdark{color:#0ecb81}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-price-info.color-down[data-v-6bd239a6],body.dark,body.realdark{color:#f6465d}}.add-stock-modal-content .market-tabs[data-v-6bd239a6]{margin-bottom:16px}.add-stock-modal-content .hot-symbols-section[data-v-6bd239a6],.add-stock-modal-content .search-results-section[data-v-6bd239a6],.add-stock-modal-content .symbol-search-section[data-v-6bd239a6]{margin-bottom:24px}.add-stock-modal-content .hot-symbols-section .section-title[data-v-6bd239a6],.add-stock-modal-content .search-results-section .section-title[data-v-6bd239a6]{font-size:14px;font-weight:600;color:#262626;margin-bottom:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.add-stock-modal-content .symbol-list[data-v-6bd239a6]{max-height:200px;overflow-y:auto;border:1px solid #e8e8e8;border-radius:4px}.add-stock-modal-content .symbol-list .symbol-list-item[data-v-6bd239a6]{cursor:pointer;padding:8px 12px;-webkit-transition:background-color .3s;transition:background-color .3s}.add-stock-modal-content .symbol-list .symbol-list-item[data-v-6bd239a6]:hover{background-color:#f5f5f5}.add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content .symbol-code[data-v-6bd239a6]{font-weight:600;color:#262626;min-width:80px}.add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content .symbol-name[data-v-6bd239a6]{color:#595959;-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.add-stock-modal-content .selected-symbol-section[data-v-6bd239a6]{margin-top:16px}.add-stock-modal-content .selected-symbol-section .selected-symbol-info[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.chart-container.theme-dark .add-stock-modal-content .hot-symbols-section .section-title[data-v-6bd239a6],.chart-container.theme-dark .add-stock-modal-content .search-results-section .section-title[data-v-6bd239a6],body.dark,body.realdark{color:#d1d4dc}.chart-container.theme-dark .add-stock-modal-content .symbol-list[data-v-6bd239a6],body.dark,body.realdark{border-color:#363c4e;background-color:#2a2a2a}.chart-container.theme-dark .add-stock-modal-content .symbol-list .symbol-list-item[data-v-6bd239a6]:hover,body.dark,body.realdark{background-color:#363c4e}.chart-container.theme-dark .add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content .symbol-code[data-v-6bd239a6],body.dark,body.realdark{color:#d1d4dc}.chart-container.theme-dark .add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content .symbol-name[data-v-6bd239a6],body.dark,body.realdark{color:#868993}.params-config-modal .indicator-info[data-v-6bd239a6]{text-align:center;margin-bottom:8px}.params-config-modal .indicator-info .indicator-name[data-v-6bd239a6]{font-size:16px;font-weight:600;color:#1f1f1f}.params-config-modal .params-form .param-item[data-v-6bd239a6]{margin-bottom:16px}.params-config-modal .params-form .param-item .param-header[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:6px}.params-config-modal .params-form .param-item .param-header .param-label[data-v-6bd239a6]{font-weight:500;color:#333}.theme-dark .params-config-modal .indicator-info .indicator-name[data-v-6bd239a6]{color:#e0e0e0}.theme-dark .params-config-modal .params-form .param-item .param-header .param-label[data-v-6bd239a6]{color:#d0d0d0} \ No newline at end of file diff --git a/frontend/dist/css/328.d911c6d3.css b/frontend/dist/css/328.d911c6d3.css deleted file mode 100644 index 8b64494..0000000 --- a/frontend/dist/css/328.d911c6d3.css +++ /dev/null @@ -1 +0,0 @@ -.drawer-toolbar[data-v-2a402d06]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:14px;-ms-flex-wrap:wrap;flex-wrap:wrap}.drawer-toolbar .toolbar-left[data-v-2a402d06],.drawer-toolbar .toolbar-right[data-v-2a402d06],.drawer-toolbar[data-v-2a402d06]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.selected-tip[data-v-2a402d06]{font-size:12px;color:#8c8c8c}.ai-modal-content[data-v-2a402d06]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:14px}.ai-meta-card[data-v-2a402d06]{border:1px solid #f0f0f0;border-radius:10px;padding:14px;background:#fafafa}.ai-meta-top[data-v-2a402d06]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px}.ai-meta-actions[data-v-2a402d06],.ai-meta-left[data-v-2a402d06],.ai-meta-top[data-v-2a402d06],.ai-run-tags[data-v-2a402d06]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap}.ai-meta-actions[data-v-2a402d06],.ai-meta-left[data-v-2a402d06],.ai-run-tags[data-v-2a402d06]{gap:8px}.ai-markdown-card[data-v-2a402d06]{border:1px solid #f0f0f0;border-radius:12px;padding:18px 20px;background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fcfcfc));background:linear-gradient(180deg,#fff,#fcfcfc);-webkit-box-shadow:0 6px 18px rgba(0,0,0,.04);box-shadow:0 6px 18px rgba(0,0,0,.04)}.ai-markdown-content[data-v-2a402d06]{color:#262626;font-size:14px;line-height:1.8}.ai-markdown-content[data-v-2a402d06] h1,.ai-markdown-content[data-v-2a402d06] h2,.ai-markdown-content[data-v-2a402d06] h3{margin:0 0 12px;font-weight:700;color:#1f1f1f;line-height:1.5}.ai-markdown-content[data-v-2a402d06] h1{font-size:20px}.ai-markdown-content[data-v-2a402d06] h2{font-size:17px}.ai-markdown-content[data-v-2a402d06] h3{font-size:15px;padding-left:10px;border-left:3px solid #1890ff}.ai-markdown-content[data-v-2a402d06] p{margin:0 0 12px;color:#434343}.ai-markdown-content[data-v-2a402d06] ol,.ai-markdown-content[data-v-2a402d06] ul{margin:0 0 14px 20px;padding:0}.ai-markdown-content[data-v-2a402d06] li{margin-bottom:8px;color:#434343}.ai-markdown-content[data-v-2a402d06] strong{color:#262626;font-weight:700}.ai-markdown-content[data-v-2a402d06] em{color:#595959}.ai-markdown-content[data-v-2a402d06] code{padding:2px 6px;border-radius:6px;background:#f5f5f5;color:#cf1322;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px}.ai-markdown-content[data-v-2a402d06] pre{overflow:auto;margin:0 0 14px;padding:14px;border-radius:10px;background:#141414;color:#f0f0f0}.ai-markdown-content[data-v-2a402d06] pre code{padding:0;background:transparent;color:inherit}.ai-markdown-content[data-v-2a402d06] blockquote{margin:0 0 14px;padding:10px 14px;border-left:4px solid #91d5ff;border-radius:0 8px 8px 0;background:#f0f7ff;color:#595959}.ai-result-content[data-v-2a402d06]{white-space:pre-wrap;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:13px;line-height:1.7;padding:8px 0}.backtest-run-viewer[data-v-a484239a] .ant-modal-body{padding:16px;max-height:70vh;overflow-y:auto}.metrics-cards[data-v-a484239a]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.metric-card[data-v-a484239a]{background:#fff;border:1px solid #f0f0f0;border-radius:8px;padding:12px}.metric-card.positive[data-v-a484239a]{border-color:rgba(82,196,26,.35)}.metric-card.negative[data-v-a484239a]{border-color:rgba(245,34,45,.35)}.metric-label[data-v-a484239a]{color:#8c8c8c;font-size:12px}.metric-value[data-v-a484239a]{font-size:18px;font-weight:600;margin-top:4px}.metric-amount[data-v-a484239a]{color:#8c8c8c;font-size:12px;margin-top:4px}.chart-section[data-v-a484239a]{margin-top:8px}.chart-title[data-v-a484239a]{font-weight:600;margin:8px 0;color:#262626}.equity-chart[data-v-a484239a]{width:100%;height:280px}.trades-section[data-v-a484239a]{margin-top:16px}.backtest-center[data-v-6853ba40]{padding:20px;min-height:calc(100vh - 120px)}.page-header[data-v-6853ba40]{margin-bottom:16px}.page-header .page-title[data-v-6853ba40]{font-size:22px;font-weight:700;margin:0 0 2px;background:linear-gradient(135deg,#1e3a5f,#2d5a87);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px}.page-header .page-title .title-icon[data-v-6853ba40]{font-size:24px;-webkit-text-fill-color:#1890ff}.page-header .page-subtitle[data-v-6853ba40]{margin:0;font-size:13px;color:#8c8c8c}.main-tabs[data-v-6853ba40] .ant-tabs-bar{margin-bottom:14px;border-bottom:2px solid #f0f0f0}.main-tabs[data-v-6853ba40] .ant-tabs-tab{font-size:15px;font-weight:500;padding:10px 20px}.config-col .config-panel[data-v-6853ba40]{background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fcfdff));background:linear-gradient(180deg,#fff,#fcfdff);border-radius:16px;padding:18px;border:1px solid #eef2f7;-webkit-box-shadow:0 10px 30px rgba(31,41,55,.08);box-shadow:0 10px 30px rgba(31,41,55,.08);max-height:calc(100vh - 200px);overflow-y:auto}.config-col .config-panel[data-v-6853ba40]::-webkit-scrollbar{width:4px}.config-col .config-panel[data-v-6853ba40]::-webkit-scrollbar-thumb{background:#d9d9d9;border-radius:2px}.section[data-v-6853ba40]{margin-bottom:14px;padding:14px;border-radius:14px;border:1px solid #f0f3f8;background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fafcff));background:linear-gradient(180deg,#fff,#fafcff)}.section .section-title[data-v-6853ba40]{font-size:12px;font-weight:700;color:#445066;margin-bottom:10px;text-transform:uppercase;letter-spacing:.6px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.section .section-title .hint[data-v-6853ba40]{font-weight:400;color:#bfbfbf;font-size:11px;text-transform:none}.field-label[data-v-6853ba40]{font-size:12px;color:#6b7280;margin-bottom:6px;font-weight:500}.tf-group[data-v-6853ba40]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.tf-group[data-v-6853ba40] .ant-radio-button-wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1;text-align:center;min-width:36px;padding:0 6px}.date-presets[data-v-6853ba40]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:6px;-ms-flex-wrap:wrap;flex-wrap:wrap}.run-section[data-v-6853ba40]{margin-top:14px;padding-top:14px;border-top:1px dashed #e5e7eb}.strategy-info[data-v-6853ba40]{margin-top:6px}.strategy-summary-card[data-v-6853ba40]{margin-top:10px;padding:12px;border-radius:10px;background:-webkit-gradient(linear,left top,left bottom,from(#f7fbff),to(#f5f7fa));background:linear-gradient(180deg,#f7fbff,#f5f7fa);border:1px solid #e6f4ff}.strategy-summary-head[data-v-6853ba40]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:8px}.strategy-summary-title[data-v-6853ba40]{font-size:14px;font-weight:600;color:#1f1f1f}.strategy-summary-meta[data-v-6853ba40]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:6px;margin-top:8px}.strategy-summary-text[data-v-6853ba40]{margin-top:8px;font-size:12px;color:#595959;line-height:1.6}.result-col .result-panel[data-v-6853ba40]{background:#fff;border-radius:12px;padding:24px;-webkit-box-shadow:0 2px 12px rgba(0,0,0,.06);box-shadow:0 2px 12px rgba(0,0,0,.06);min-height:500px}[data-v-6853ba40] .empty-result{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-height:450px}[data-v-6853ba40] .empty-result,[data-v-6853ba40] .empty-result .empty-icon{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}[data-v-6853ba40] .empty-result .empty-icon{width:100px;height:100px;border-radius:50%;background:linear-gradient(135deg,#e6f7ff,#f0f5ff);margin-bottom:24px;font-size:42px;color:#1890ff}[data-v-6853ba40] .empty-result h3{font-size:20px;font-weight:700;color:#333;margin-bottom:8px}[data-v-6853ba40] .empty-result p{font-size:14px;color:#8c8c8c;max-width:320px;text-align:center;line-height:1.6}[data-v-6853ba40] .running-overlay{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;min-height:450px}[data-v-6853ba40] .running-overlay .running-content{text-align:center;width:280px}[data-v-6853ba40] .running-spinner{width:64px;height:64px;margin:0 auto 20px;position:relative}[data-v-6853ba40] .running-spinner .spinner-track{position:absolute;inset:0;border-radius:50%;border:3px solid #f0f0f0}[data-v-6853ba40] .running-spinner .spinner-fill{position:absolute;inset:0;border-radius:50%;border:3px solid transparent;border-top-color:#1890ff;-webkit-animation:spin-6853ba40 1s linear infinite;animation:spin-6853ba40 1s linear infinite}@-webkit-keyframes spin-6853ba40{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin-6853ba40{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}[data-v-6853ba40] .running-title{font-size:17px;font-weight:700;color:#333;margin-bottom:4px}[data-v-6853ba40] .running-elapsed{font-size:24px;font-weight:300;color:#1890ff;margin-bottom:24px;font-variant-numeric:tabular-nums;letter-spacing:1px}[data-v-6853ba40] .running-steps{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px;text-align:left}[data-v-6853ba40] .running-steps .step-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px;padding:8px 14px;border-radius:8px;background:#fafafa;border:1px solid #f0f0f0;-webkit-transition:all .3s;transition:all .3s}[data-v-6853ba40] .running-steps .step-item .step-icon{font-size:16px;color:#d9d9d9;-ms-flex-negative:0;flex-shrink:0}[data-v-6853ba40] .running-steps .step-item .step-label{font-size:13px;color:#999}[data-v-6853ba40] .running-steps .step-item.active{background:#e6f7ff;border-color:#91d5ff}[data-v-6853ba40] .running-steps .step-item.active .step-icon{color:#1890ff;-webkit-animation:pulseIcon-6853ba40 1.2s ease-in-out infinite;animation:pulseIcon-6853ba40 1.2s ease-in-out infinite}[data-v-6853ba40] .running-steps .step-item.active .step-label{color:#1890ff;font-weight:600}[data-v-6853ba40] .running-steps .step-item.done{background:#f6ffed;border-color:#b7eb8f}[data-v-6853ba40] .running-steps .step-item.done .step-icon,[data-v-6853ba40] .running-steps .step-item.done .step-label{color:#52c41a}@-webkit-keyframes pulseIcon-6853ba40{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.15);transform:scale(1.15)}}@keyframes pulseIcon-6853ba40{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.15);transform:scale(1.15)}}[data-v-6853ba40] .result-content{padding:0}[data-v-6853ba40] .result-header{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:16px;gap:12px}[data-v-6853ba40] .result-header,[data-v-6853ba40] .result-header .result-header-left{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap}[data-v-6853ba40] .result-header .result-header-left{gap:10px}[data-v-6853ba40] .result-header .result-header-actions{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}[data-v-6853ba40] .result-header .result-tag{display:-webkit-box;display:-ms-flexbox;display:flex;gap:4px;-ms-flex-wrap:wrap;flex-wrap:wrap}[data-v-6853ba40] .result-header .run-id{font-size:12px;color:#999;font-variant-numeric:tabular-nums}[data-v-6853ba40] .metrics-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:24px}[data-v-6853ba40] .metric-card{background:#fafafa;border-radius:10px;padding:14px 12px;text-align:center;border:1px solid #f0f0f0;-webkit-transition:-webkit-transform .2s,-webkit-box-shadow .2s;transition:-webkit-transform .2s,-webkit-box-shadow .2s;transition:transform .2s,box-shadow .2s;transition:transform .2s,box-shadow .2s,-webkit-transform .2s,-webkit-box-shadow .2s}[data-v-6853ba40] .metric-card:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-box-shadow:0 4px 12px rgba(0,0,0,.08);box-shadow:0 4px 12px rgba(0,0,0,.08)}[data-v-6853ba40] .metric-card .metric-label{font-size:11px;color:#8c8c8c;margin-bottom:6px;text-transform:uppercase;letter-spacing:.3px}[data-v-6853ba40] .metric-card .metric-value{font-size:20px;font-weight:700;font-variant-numeric:tabular-nums;color:#333;line-height:1.2}[data-v-6853ba40] .metric-card .metric-sub{font-size:11px;color:#8c8c8c;margin-top:4px;font-variant-numeric:tabular-nums}[data-v-6853ba40] .metric-card.positive .metric-value{color:#52c41a}[data-v-6853ba40] .metric-card.negative .metric-value{color:#f5222d}[data-v-6853ba40] .chart-section{margin-bottom:24px}[data-v-6853ba40] .chart-section .chart-title{font-size:14px;font-weight:600;color:#333;margin-bottom:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}[data-v-6853ba40] .chart-section .equity-chart{width:100%;height:300px;border-radius:8px}[data-v-6853ba40] .trades-section .chart-title{font-size:14px;font-weight:600;color:#333;margin-bottom:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}[data-v-6853ba40] .result-ai-loading{padding:26px 0;text-align:center}[data-v-6853ba40] .result-ai-loading-text{margin-top:12px;color:#8c8c8c}[data-v-6853ba40] .result-ai-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:14px}[data-v-6853ba40] .result-ai-meta-card{border:1px solid #edf2f7;border-radius:12px;padding:14px;background:-webkit-gradient(linear,left top,left bottom,from(#fbfdff),to(#f7faff));background:linear-gradient(180deg,#fbfdff,#f7faff)}[data-v-6853ba40] .result-ai-meta-top{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px}[data-v-6853ba40] .result-ai-meta-actions,[data-v-6853ba40] .result-ai-meta-left,[data-v-6853ba40] .result-ai-meta-top{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap}[data-v-6853ba40] .result-ai-meta-actions,[data-v-6853ba40] .result-ai-meta-left{gap:8px}[data-v-6853ba40] .result-ai-markdown-card{border:1px solid #eef2f7;border-radius:12px;padding:18px 20px;background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fcfcfc));background:linear-gradient(180deg,#fff,#fcfcfc);-webkit-box-shadow:0 6px 18px rgba(0,0,0,.04);box-shadow:0 6px 18px rgba(0,0,0,.04)}[data-v-6853ba40] .result-ai-markdown-content{color:#262626;font-size:14px;line-height:1.8}[data-v-6853ba40] .result-ai-markdown-content/deep/h1,[data-v-6853ba40] .result-ai-markdown-content/deep/h2,[data-v-6853ba40] .result-ai-markdown-content/deep/h3{margin:0 0 12px;font-weight:700;color:#1f1f1f;line-height:1.5}[data-v-6853ba40] .result-ai-markdown-content/deep/h1{font-size:20px}[data-v-6853ba40] .result-ai-markdown-content/deep/h2{font-size:17px}[data-v-6853ba40] .result-ai-markdown-content/deep/h3{font-size:15px;padding-left:10px;border-left:3px solid #1890ff}[data-v-6853ba40] .result-ai-markdown-content/deep/p{margin:0 0 12px;color:#434343}[data-v-6853ba40] .result-ai-markdown-content/deep/ol,[data-v-6853ba40] .result-ai-markdown-content/deep/ul{margin:0 0 14px 20px;padding:0}[data-v-6853ba40] .result-ai-markdown-content/deep/li{margin-bottom:8px;color:#434343}[data-v-6853ba40] .result-ai-markdown-content/deep/strong{color:#262626;font-weight:700}[data-v-6853ba40] .result-ai-markdown-content/deep/em{color:#595959}[data-v-6853ba40] .result-ai-markdown-content/deep/code{padding:1px 6px;border-radius:6px;background:#f5f5f5;color:#cf1322;font-size:13px}[data-v-6853ba40] .result-ai-markdown-content/deep/pre{margin:0 0 14px;padding:12px 14px;border-radius:10px;background:#141414;overflow-x:auto}[data-v-6853ba40] .result-ai-markdown-content/deep/pre code{padding:0;background:transparent;color:hsla(0,0%,100%,.88)}[data-v-6853ba40] .result-ai-markdown-content/deep/blockquote{margin:0 0 14px;padding:10px 14px;border-left:3px solid #91d5ff;background:#f5fbff;color:#595959}[data-v-6853ba40] .result-ai-empty{padding:20px 0 8px;text-align:center;color:#8c8c8c}.add-item-active[data-v-6853ba40]{background:#e6f7ff!important}.theme-dark[data-v-6853ba40]{background:#141414}.theme-dark .page-header .page-title[data-v-6853ba40]{background:linear-gradient(135deg,#e0e6ed,#c5ccd6);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.theme-dark .page-header .page-title .title-icon[data-v-6853ba40]{-webkit-text-fill-color:unset;color:#40a9ff!important;background:none;-webkit-background-clip:unset;background-clip:unset}.theme-dark .page-header .page-subtitle[data-v-6853ba40]{color:hsla(0,0%,100%,.45)}.theme-dark .main-tabs[data-v-6853ba40] .ant-tabs-bar{border-bottom-color:#303030}.theme-dark .main-tabs[data-v-6853ba40] .ant-tabs-tab{color:hsla(0,0%,100%,.65)}.theme-dark .main-tabs[data-v-6853ba40] .ant-tabs-tab:hover{color:#fff}.theme-dark .main-tabs[data-v-6853ba40] .ant-tabs-tab-active{color:#177ddc!important}.theme-dark .main-tabs[data-v-6853ba40] .ant-tabs-ink-bar{background:#177ddc}.theme-dark .config-panel[data-v-6853ba40]{background:-webkit-gradient(linear,left top,left bottom,from(#1f1f1f),to(#191919));background:linear-gradient(180deg,#1f1f1f,#191919);border-color:#2f3540;-webkit-box-shadow:0 10px 30px rgba(0,0,0,.35);box-shadow:0 10px 30px rgba(0,0,0,.35)}.theme-dark .config-panel[data-v-6853ba40]::-webkit-scrollbar-thumb{background:#434343}.theme-dark .section[data-v-6853ba40]{background:-webkit-gradient(linear,left top,left bottom,from(hsla(0,0%,100%,.02)),to(hsla(0,0%,100%,.01)));background:linear-gradient(180deg,hsla(0,0%,100%,.02),hsla(0,0%,100%,.01));border-color:#2d323b}.theme-dark .section .section-title[data-v-6853ba40]{color:hsla(0,0%,100%,.78)}.theme-dark .section .section-title .hint[data-v-6853ba40]{color:hsla(0,0%,100%,.35)}.theme-dark .field-label[data-v-6853ba40]{color:hsla(0,0%,100%,.58)}.theme-dark[data-v-6853ba40] .ant-select .ant-select-selection{background:#141414;border-color:#434343;color:hsla(0,0%,100%,.85)}.theme-dark[data-v-6853ba40] .ant-select .ant-select-selection .ant-select-arrow{color:hsla(0,0%,100%,.45)}.theme-dark[data-v-6853ba40] .ant-select .ant-select-selection:hover{border-color:#177ddc}.theme-dark[data-v-6853ba40] .ant-select-selection__placeholder{color:hsla(0,0%,100%,.35)}.theme-dark[data-v-6853ba40] .ant-input,.theme-dark[data-v-6853ba40] .ant-input-number{background:#141414;border-color:#434343;color:hsla(0,0%,100%,.85)}.theme-dark[data-v-6853ba40] .ant-input-number:focus,.theme-dark[data-v-6853ba40] .ant-input-number:hover,.theme-dark[data-v-6853ba40] .ant-input:focus,.theme-dark[data-v-6853ba40] .ant-input:hover{border-color:#177ddc}.theme-dark[data-v-6853ba40] .ant-input-number-handler-wrap{background:#1f1f1f;border-left-color:#434343}.theme-dark[data-v-6853ba40] .ant-input-number-handler{color:hsla(0,0%,100%,.45)}.theme-dark[data-v-6853ba40] .ant-input-number-handler:hover{color:#177ddc}.theme-dark[data-v-6853ba40] .ant-calendar-picker-input{background:#141414;border-color:#434343;color:hsla(0,0%,100%,.85)}.theme-dark[data-v-6853ba40] .ant-calendar-picker-icon{color:hsla(0,0%,100%,.45)}.theme-dark[data-v-6853ba40] .ant-radio-button-wrapper{background:#141414;border-color:#434343;color:hsla(0,0%,100%,.65)}.theme-dark[data-v-6853ba40] .ant-radio-button-wrapper:hover{color:#177ddc}.theme-dark[data-v-6853ba40] .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#177ddc;border-color:#177ddc;color:#fff}.theme-dark[data-v-6853ba40] .ant-checkbox-wrapper{color:hsla(0,0%,100%,.85)}.theme-dark[data-v-6853ba40] .ant-checkbox-inner{background:#141414;border-color:#434343}.theme-dark[data-v-6853ba40] .ant-btn-default{background:#1f1f1f;border-color:#434343;color:hsla(0,0%,100%,.65)}.theme-dark[data-v-6853ba40] .ant-btn-default:hover{border-color:#177ddc;color:#177ddc}.theme-dark .run-section[data-v-6853ba40]{border-top-color:#303030}.theme-dark .strategy-summary-card[data-v-6853ba40]{background:-webkit-gradient(linear,left top,left bottom,from(rgba(23,125,220,.12)),to(hsla(0,0%,100%,.03)));background:linear-gradient(180deg,rgba(23,125,220,.12),hsla(0,0%,100%,.03));border-color:rgba(23,125,220,.22)}.theme-dark .strategy-summary-title[data-v-6853ba40]{color:hsla(0,0%,100%,.92)}.theme-dark .strategy-summary-text[data-v-6853ba40]{color:hsla(0,0%,100%,.65)}.theme-dark .result-panel[data-v-6853ba40]{background:#1f1f1f;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.45);box-shadow:0 2px 8px rgba(0,0,0,.45)}.theme-dark[data-v-6853ba40] .running-spinner .spinner-track{border-color:#303030}.theme-dark[data-v-6853ba40] .running-spinner .spinner-fill{border-top-color:#177ddc}.theme-dark[data-v-6853ba40] .running-title{color:hsla(0,0%,100%,.85)}.theme-dark[data-v-6853ba40] .running-elapsed{color:#177ddc}.theme-dark[data-v-6853ba40] .running-steps .step-item{background:#141414;border-color:#303030}.theme-dark[data-v-6853ba40] .running-steps .step-item .step-icon{color:hsla(0,0%,100%,.38)}.theme-dark[data-v-6853ba40] .running-steps .step-item .step-label{color:hsla(0,0%,100%,.35)}.theme-dark[data-v-6853ba40] .running-steps .step-item.active{background:rgba(23,125,220,.1);border-color:rgba(23,125,220,.3)}.theme-dark[data-v-6853ba40] .running-steps .step-item.active .step-icon,.theme-dark[data-v-6853ba40] .running-steps .step-item.active .step-label{color:#177ddc}.theme-dark[data-v-6853ba40] .running-steps .step-item.done{background:rgba(73,170,25,.08);border-color:rgba(73,170,25,.25)}.theme-dark[data-v-6853ba40] .running-steps .step-item.done .step-icon,.theme-dark[data-v-6853ba40] .running-steps .step-item.done .step-label{color:#49aa19}.theme-dark[data-v-6853ba40] .running-steps .step-item .step-icon .anticon{color:inherit!important}.theme-dark[data-v-6853ba40] .result-header-actions .ant-btn.ant-btn-primary.ant-btn-background-ghost .anticon{color:#177ddc}.theme-dark[data-v-6853ba40] .empty-result .empty-icon{background:linear-gradient(135deg,rgba(23,125,220,.15),rgba(23,125,220,.08));color:#177ddc}.theme-dark[data-v-6853ba40] .empty-result h3{color:hsla(0,0%,100%,.85)}.theme-dark[data-v-6853ba40] .empty-result p,.theme-dark[data-v-6853ba40] .result-ai-loading-text,.theme-dark[data-v-6853ba40] .result-header .run-id{color:hsla(0,0%,100%,.45)}.theme-dark[data-v-6853ba40] .result-ai-meta-card{background:-webkit-gradient(linear,left top,left bottom,from(rgba(23,125,220,.08)),to(hsla(0,0%,100%,.02)));background:linear-gradient(180deg,rgba(23,125,220,.08),hsla(0,0%,100%,.02));border-color:rgba(23,125,220,.22)}.theme-dark[data-v-6853ba40] .result-ai-markdown-card{background:-webkit-gradient(linear,left top,left bottom,from(#171717),to(#141414));background:linear-gradient(180deg,#171717,#141414);border-color:#2f3540;-webkit-box-shadow:0 8px 24px rgba(0,0,0,.25);box-shadow:0 8px 24px rgba(0,0,0,.25)}.theme-dark[data-v-6853ba40] .result-ai-markdown-content{color:hsla(0,0%,100%,.82)}.theme-dark[data-v-6853ba40] .result-ai-markdown-content/deep/h1,.theme-dark[data-v-6853ba40] .result-ai-markdown-content/deep/h2,.theme-dark[data-v-6853ba40] .result-ai-markdown-content/deep/h3{color:hsla(0,0%,100%,.92)}.theme-dark[data-v-6853ba40] .result-ai-markdown-content/deep/li,.theme-dark[data-v-6853ba40] .result-ai-markdown-content/deep/p{color:hsla(0,0%,100%,.72)}.theme-dark[data-v-6853ba40] .result-ai-markdown-content/deep/strong{color:hsla(0,0%,100%,.92)}.theme-dark[data-v-6853ba40] .result-ai-markdown-content/deep/em{color:hsla(0,0%,100%,.62)}.theme-dark[data-v-6853ba40] .result-ai-markdown-content/deep/code{background:hsla(0,0%,100%,.08);color:#ff9c6e}.theme-dark[data-v-6853ba40] .result-ai-markdown-content/deep/blockquote{background:rgba(23,125,220,.08);color:hsla(0,0%,100%,.68);border-left-color:rgba(23,125,220,.45)}.theme-dark[data-v-6853ba40] .result-ai-empty{color:hsla(0,0%,100%,.45)}.theme-dark[data-v-6853ba40] .metric-card{background:#141414;border-color:#303030}.theme-dark[data-v-6853ba40] .metric-card:hover{-webkit-box-shadow:0 4px 12px rgba(0,0,0,.4);box-shadow:0 4px 12px rgba(0,0,0,.4)}.theme-dark[data-v-6853ba40] .metric-card .metric-label{color:hsla(0,0%,100%,.45)}.theme-dark[data-v-6853ba40] .metric-card .metric-value{color:hsla(0,0%,100%,.85)}.theme-dark[data-v-6853ba40] .metric-card .metric-sub{color:hsla(0,0%,100%,.35)}.theme-dark[data-v-6853ba40] .metric-card.positive .metric-value{color:#49aa19}.theme-dark[data-v-6853ba40] .metric-card.negative .metric-value{color:#d32029}.theme-dark[data-v-6853ba40] .chart-section .chart-title,.theme-dark[data-v-6853ba40] .trades-section .chart-title{color:hsla(0,0%,100%,.85)}.theme-dark[data-v-6853ba40] .ant-table{background:transparent;color:hsla(0,0%,100%,.85)}.theme-dark[data-v-6853ba40] .ant-table .ant-table-thead>tr>th{background:hsla(0,0%,100%,.04);color:hsla(0,0%,100%,.65);border-bottom-color:#303030}.theme-dark[data-v-6853ba40] .ant-table .ant-table-tbody>tr>td{border-bottom-color:#303030}.theme-dark[data-v-6853ba40] .ant-table .ant-table-tbody>tr:hover>td{background:hsla(0,0%,100%,.04)}.theme-dark[data-v-6853ba40] .ant-table .ant-table-placeholder{background:transparent;color:hsla(0,0%,100%,.35)}.theme-dark[data-v-6853ba40] .ant-pagination .ant-pagination-item{background:#1f1f1f;border-color:#434343}.theme-dark[data-v-6853ba40] .ant-pagination .ant-pagination-item a{color:hsla(0,0%,100%,.65)}.theme-dark[data-v-6853ba40] .ant-pagination .ant-pagination-item.ant-pagination-item-active{border-color:#177ddc}.theme-dark[data-v-6853ba40] .ant-pagination .ant-pagination-item.ant-pagination-item-active a{color:#177ddc}.theme-dark[data-v-6853ba40] .ant-pagination .ant-pagination-next .ant-pagination-item-link,.theme-dark[data-v-6853ba40] .ant-pagination .ant-pagination-prev .ant-pagination-item-link{background:#1f1f1f;border-color:#434343;color:hsla(0,0%,100%,.45)}.theme-dark[data-v-6853ba40] .ant-empty-description{color:hsla(0,0%,100%,.35)}.theme-dark[data-v-6853ba40] .ant-empty-image svg{fill:hsla(0,0%,100%,.1)}.theme-dark[data-v-6853ba40] .empty-icon .anticon{color:#177ddc!important}.bc-modal-wrap--dark .ant-modal-content{background:#1f1f1f;-webkit-box-shadow:0 8px 32px rgba(0,0,0,.55);box-shadow:0 8px 32px rgba(0,0,0,.55)}.bc-modal-wrap--dark .ant-modal-header{background:#1f1f1f;border-bottom-color:#303030}.bc-modal-wrap--dark .ant-modal-title{color:hsla(0,0%,100%,.88)}.bc-modal-wrap--dark .ant-modal-close{color:hsla(0,0%,100%,.55)}.bc-modal-wrap--dark .ant-modal-close:hover{color:hsla(0,0%,100%,.88)}.bc-modal-wrap--dark .ant-modal-body{background:#1f1f1f;color:hsla(0,0%,100%,.85)}.bc-modal-wrap--dark .ant-modal-footer{background:#1f1f1f;border-top-color:#303030}.bc-modal-wrap--dark .ant-tabs-bar{border-bottom-color:#303030}.bc-modal-wrap--dark .ant-tabs-tab{color:hsla(0,0%,100%,.55)}.bc-modal-wrap--dark .ant-tabs-tab:hover{color:hsla(0,0%,100%,.85)}.bc-modal-wrap--dark .ant-tabs-tab-active{color:#177ddc!important}.bc-modal-wrap--dark .ant-input-search .ant-input{background:#141414;border-color:#434343;color:hsla(0,0%,100%,.88)}.bc-modal-wrap--dark .ant-input-search .ant-input:focus,.bc-modal-wrap--dark .ant-input-search .ant-input:hover{border-color:#177ddc}.bc-modal-wrap--dark .ant-input-search-icon{color:hsla(0,0%,100%,.45)}.bc-modal-wrap--dark .ant-list-item{color:hsla(0,0%,100%,.85);border-bottom-color:#303030}.bc-modal-wrap--dark .ant-list-item:hover{background:hsla(0,0%,100%,.04)} \ No newline at end of file diff --git a/frontend/dist/css/345.c5842a33.css b/frontend/dist/css/345.c5842a33.css new file mode 100644 index 0000000..e2abe12 --- /dev/null +++ b/frontend/dist/css/345.c5842a33.css @@ -0,0 +1 @@ +.drawer-toolbar[data-v-9c4d8af2]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:14px;-ms-flex-wrap:wrap;flex-wrap:wrap}.drawer-toolbar .toolbar-left[data-v-9c4d8af2],.drawer-toolbar .toolbar-right[data-v-9c4d8af2],.drawer-toolbar[data-v-9c4d8af2]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.selected-tip[data-v-9c4d8af2]{font-size:12px;color:#8c8c8c}.ai-modal-content[data-v-9c4d8af2]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:14px}.ai-meta-card[data-v-9c4d8af2]{border:1px solid #f0f0f0;border-radius:10px;padding:14px;background:#fafafa}.ai-meta-top[data-v-9c4d8af2]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px}.ai-meta-actions[data-v-9c4d8af2],.ai-meta-left[data-v-9c4d8af2],.ai-meta-top[data-v-9c4d8af2],.ai-run-tags[data-v-9c4d8af2]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap}.ai-meta-actions[data-v-9c4d8af2],.ai-meta-left[data-v-9c4d8af2],.ai-run-tags[data-v-9c4d8af2]{gap:8px}.ai-markdown-card[data-v-9c4d8af2]{border:1px solid #f0f0f0;border-radius:12px;padding:18px 20px;background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fcfcfc));background:linear-gradient(180deg,#fff,#fcfcfc);-webkit-box-shadow:0 6px 18px rgba(0,0,0,.04);box-shadow:0 6px 18px rgba(0,0,0,.04)}.ai-markdown-content[data-v-9c4d8af2]{color:#262626;font-size:14px;line-height:1.8}.ai-markdown-content[data-v-9c4d8af2] h1,.ai-markdown-content[data-v-9c4d8af2] h2,.ai-markdown-content[data-v-9c4d8af2] h3{margin:0 0 12px;font-weight:700;color:#1f1f1f;line-height:1.5}.ai-markdown-content[data-v-9c4d8af2] h1{font-size:20px}.ai-markdown-content[data-v-9c4d8af2] h2{font-size:17px}.ai-markdown-content[data-v-9c4d8af2] h3{font-size:15px;padding-left:10px;border-left:3px solid #1890ff}.ai-markdown-content[data-v-9c4d8af2] p{margin:0 0 12px;color:#434343}.ai-markdown-content[data-v-9c4d8af2] ol,.ai-markdown-content[data-v-9c4d8af2] ul{margin:0 0 14px 20px;padding:0}.ai-markdown-content[data-v-9c4d8af2] li{margin-bottom:8px;color:#434343}.ai-markdown-content[data-v-9c4d8af2] strong{color:#262626;font-weight:700}.ai-markdown-content[data-v-9c4d8af2] em{color:#595959}.ai-markdown-content[data-v-9c4d8af2] code{padding:2px 6px;border-radius:6px;background:#f5f5f5;color:#cf1322;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px}.ai-markdown-content[data-v-9c4d8af2] pre{overflow:auto;margin:0 0 14px;padding:14px;border-radius:10px;background:#141414;color:#f0f0f0}.ai-markdown-content[data-v-9c4d8af2] pre code{padding:0;background:transparent;color:inherit}.ai-markdown-content[data-v-9c4d8af2] blockquote{margin:0 0 14px;padding:10px 14px;border-left:4px solid #91d5ff;border-radius:0 8px 8px 0;background:#f0f7ff;color:#595959}.ai-result-content[data-v-9c4d8af2]{white-space:pre-wrap;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:13px;line-height:1.7;padding:8px 0}.backtest-history-drawer-wrap--dark .ant-drawer-content{background:#1f1f1f;color:hsla(0,0%,100%,.85)}.backtest-history-drawer-wrap--dark .ant-drawer-header{background:#1f1f1f;border-bottom-color:#303030}.backtest-history-drawer-wrap--dark .ant-drawer-title{color:hsla(0,0%,100%,.88)}.backtest-history-drawer-wrap--dark .ant-drawer-close{color:hsla(0,0%,100%,.55)}.backtest-history-drawer-wrap--dark .ant-drawer-body{background:#1f1f1f;color:hsla(0,0%,100%,.85)}.backtest-history-drawer-wrap--dark .drawer-toolbar .selected-tip{color:hsla(0,0%,100%,.55)}.backtest-history-drawer-wrap--dark .drawer-toolbar .ant-btn-primary.ant-btn-background-ghost{color:#69c0ff;border-color:#177ddc}.backtest-history-drawer-wrap--dark .drawer-toolbar .ant-btn-primary.ant-btn-background-ghost:focus:not(:disabled),.backtest-history-drawer-wrap--dark .drawer-toolbar .ant-btn-primary.ant-btn-background-ghost:hover:not(:disabled){color:#91d5ff;border-color:#3c9ae8}.backtest-history-drawer-wrap--dark .drawer-toolbar .ant-btn-primary.ant-btn-background-ghost:disabled{color:hsla(0,0%,100%,.25);border-color:#434343;background:transparent}.backtest-history-drawer-wrap--dark .ant-input,.backtest-history-drawer-wrap--dark .ant-select-selection,.backtest-history-drawer-wrap--dark .ant-select-selection--single{background:#141414!important;border-color:#434343!important;color:hsla(0,0%,100%,.88)!important}.backtest-history-drawer-wrap--dark .ant-input::-webkit-input-placeholder{color:hsla(0,0%,100%,.45)!important}.backtest-history-drawer-wrap--dark .ant-input::-moz-placeholder{color:hsla(0,0%,100%,.45)!important}.backtest-history-drawer-wrap--dark .ant-input:-ms-input-placeholder{color:hsla(0,0%,100%,.45)!important}.backtest-history-drawer-wrap--dark .ant-input::-ms-input-placeholder{color:hsla(0,0%,100%,.45)!important}.backtest-history-drawer-wrap--dark .ant-input::placeholder,.backtest-history-drawer-wrap--dark .ant-select-selection-placeholder,.backtest-history-drawer-wrap--dark .ant-select-selection-selected-value{color:hsla(0,0%,100%,.45)!important}.backtest-history-drawer-wrap--dark .ant-table{background:transparent;color:hsla(0,0%,100%,.85)}.backtest-history-drawer-wrap--dark .ant-table-thead>tr>th{background:hsla(0,0%,100%,.04);color:hsla(0,0%,100%,.65);border-bottom-color:#303030}.backtest-history-drawer-wrap--dark .ant-table-tbody>tr>td{background:transparent;color:hsla(0,0%,100%,.85);border-bottom-color:#303030}.backtest-history-drawer-wrap--dark .ant-table-tbody>tr:hover>td{background:hsla(0,0%,100%,.04)}.backtest-history-drawer-wrap--dark .ant-pagination-total-text{color:hsla(0,0%,100%,.65)}.backtest-history-drawer-wrap--dark .ant-pagination-item{background:#1f1f1f;border-color:#434343}.backtest-history-drawer-wrap--dark .ant-pagination-item a,.backtest-history-drawer-wrap--dark .ant-pagination-next .ant-pagination-item-link,.backtest-history-drawer-wrap--dark .ant-pagination-prev .ant-pagination-item-link{color:hsla(0,0%,100%,.65);background:#1f1f1f;border-color:#434343}.backtest-history-drawer-wrap--dark .ant-empty-description{color:hsla(0,0%,100%,.45)}.backtest-history-drawer-wrap--dark .ant-alert-warning{background:rgba(250,173,20,.12);border-color:rgba(250,173,20,.35)}.backtest-history-drawer-wrap--dark .ant-alert-warning .ant-alert-description,.backtest-history-drawer-wrap--dark .ant-alert-warning .ant-alert-message{color:hsla(0,0%,100%,.82)}.backtest-history-ai-modal--dark .ant-modal-body,.backtest-history-ai-modal--dark .ant-modal-content,.backtest-history-ai-modal--dark .ant-modal-footer,.backtest-history-ai-modal--dark .ant-modal-header{background:#1f1f1f}.backtest-history-ai-modal--dark .ant-modal-header{border-bottom-color:#303030}.backtest-history-ai-modal--dark .ai-markdown-content,.backtest-history-ai-modal--dark .ai-result-content,.backtest-history-ai-modal--dark .ant-modal-title{color:hsla(0,0%,100%,.88)}.backtest-history-ai-modal--dark .ant-modal-close{color:hsla(0,0%,100%,.55)}.backtest-history-ai-modal--dark .ai-meta-card{background:-webkit-gradient(linear,left top,left bottom,from(rgba(23,125,220,.08)),to(hsla(0,0%,100%,.02)));background:linear-gradient(180deg,rgba(23,125,220,.08),hsla(0,0%,100%,.02));border-color:rgba(23,125,220,.22)}.backtest-history-ai-modal--dark .ai-markdown-card{background:-webkit-gradient(linear,left top,left bottom,from(#171717),to(#141414));background:linear-gradient(180deg,#171717,#141414);border-color:#2f3540;-webkit-box-shadow:0 8px 24px rgba(0,0,0,.25);box-shadow:0 8px 24px rgba(0,0,0,.25)}.backtest-history-ai-modal--dark .ai-markdown-content{color:hsla(0,0%,100%,.82)}.backtest-history-ai-modal--dark .ai-markdown-content h1,.backtest-history-ai-modal--dark .ai-markdown-content h2,.backtest-history-ai-modal--dark .ai-markdown-content h3,.backtest-history-ai-modal--dark .ai-markdown-content strong{color:hsla(0,0%,100%,.92)}.backtest-history-ai-modal--dark .ai-markdown-content li,.backtest-history-ai-modal--dark .ai-markdown-content p{color:hsla(0,0%,100%,.72)}.backtest-history-ai-modal--dark .ai-markdown-content em{color:hsla(0,0%,100%,.6)}.backtest-history-ai-modal--dark .ai-markdown-content code{background:hsla(0,0%,100%,.08);color:#ff9c6e}.backtest-history-ai-modal--dark .ai-markdown-content blockquote{background:rgba(23,125,220,.08);border-left-color:rgba(23,125,220,.45);color:hsla(0,0%,100%,.68)}.backtest-run-viewer[data-v-1082877a] .ant-modal-body{padding:16px;max-height:70vh;overflow-y:auto}.metrics-cards[data-v-1082877a]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.metric-card[data-v-1082877a]{background:#fff;border:1px solid #f0f0f0;border-radius:8px;padding:12px}.metric-card.positive[data-v-1082877a]{border-color:rgba(82,196,26,.35)}.metric-card.negative[data-v-1082877a]{border-color:rgba(245,34,45,.35)}.metric-label[data-v-1082877a]{color:#8c8c8c;font-size:12px}.metric-value[data-v-1082877a]{font-size:18px;font-weight:600;margin-top:4px}.metric-amount[data-v-1082877a]{color:#8c8c8c;font-size:12px;margin-top:4px}.chart-section[data-v-1082877a]{margin-top:8px}.chart-title[data-v-1082877a]{font-weight:600;margin:8px 0;color:#262626}.equity-chart[data-v-1082877a]{width:100%;height:280px}.trades-section[data-v-1082877a]{margin-top:16px}.trade-detail-text[data-v-1082877a],.trade-time-text[data-v-1082877a]{color:inherit}.backtest-run-viewer-wrap--dark .ant-modal-body,.backtest-run-viewer-wrap--dark .ant-modal-content,.backtest-run-viewer-wrap--dark .ant-modal-footer,.backtest-run-viewer-wrap--dark .ant-modal-header{background:#1f1f1f}.backtest-run-viewer-wrap--dark .ant-modal-header{border-bottom-color:#303030}.backtest-run-viewer-wrap--dark .ant-modal-title,.backtest-run-viewer-wrap--dark .chart-title{color:hsla(0,0%,100%,.88)}.backtest-run-viewer-wrap--dark .ant-modal-close{color:hsla(0,0%,100%,.55)}.backtest-run-viewer-wrap--dark .metric-card{background:#141414;border-color:#303030}.backtest-run-viewer-wrap--dark .metric-amount,.backtest-run-viewer-wrap--dark .metric-label{color:hsla(0,0%,100%,.45)}.backtest-run-viewer-wrap--dark .metric-value{color:hsla(0,0%,100%,.88)}.backtest-run-viewer-wrap--dark .ant-alert{background:rgba(23,125,220,.08);border-color:rgba(23,125,220,.24)}.backtest-run-viewer-wrap--dark .ant-alert-warning{background:rgba(250,173,20,.12);border-color:rgba(250,173,20,.35)}.backtest-run-viewer-wrap--dark .ant-alert-description,.backtest-run-viewer-wrap--dark .ant-alert-message{color:hsla(0,0%,100%,.82)}.backtest-run-viewer-wrap--dark .ant-table{background:transparent;color:hsla(0,0%,100%,.85)}.backtest-run-viewer-wrap--dark .ant-table-thead>tr>th{background:hsla(0,0%,100%,.04);color:hsla(0,0%,100%,.65);border-bottom-color:#303030}.backtest-run-viewer-wrap--dark .ant-table-tbody>tr>td{background:transparent;color:hsla(0,0%,100%,.85);border-bottom-color:#303030}.backtest-run-viewer-wrap--dark .ant-table-tbody>tr:hover>td{background:hsla(0,0%,100%,.04)}.backtest-run-viewer-wrap--dark .ant-pagination-item{background:#1f1f1f;border-color:#434343}.backtest-run-viewer-wrap--dark .ant-pagination-item a,.backtest-run-viewer-wrap--dark .ant-pagination-next .ant-pagination-item-link,.backtest-run-viewer-wrap--dark .ant-pagination-prev .ant-pagination-item-link{color:hsla(0,0%,100%,.65);background:#1f1f1f;border-color:#434343}.backtest-center[data-v-1daf6ac6]{padding:20px;min-height:calc(100vh - 120px)}.page-header[data-v-1daf6ac6]{margin-bottom:16px}.page-header .page-title[data-v-1daf6ac6]{font-size:22px;font-weight:700;margin:0 0 2px;background:linear-gradient(135deg,#1e3a5f,#2d5a87);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px}.page-header .page-title .title-icon[data-v-1daf6ac6]{font-size:24px;-webkit-text-fill-color:#1890ff}.page-header .page-subtitle[data-v-1daf6ac6]{margin:0;font-size:13px;color:#8c8c8c}.main-tabs[data-v-1daf6ac6] .ant-tabs-bar{margin-bottom:14px;border-bottom:2px solid #f0f0f0}.main-tabs[data-v-1daf6ac6] .ant-tabs-tab{font-size:15px;font-weight:500;padding:10px 20px}.config-col .config-panel[data-v-1daf6ac6]{background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fcfdff));background:linear-gradient(180deg,#fff,#fcfdff);border-radius:16px;padding:18px;border:1px solid #eef2f7;-webkit-box-shadow:0 10px 30px rgba(31,41,55,.08);box-shadow:0 10px 30px rgba(31,41,55,.08);max-height:calc(100vh - 200px);overflow-y:auto}.config-col .config-panel[data-v-1daf6ac6]::-webkit-scrollbar{width:4px}.config-col .config-panel[data-v-1daf6ac6]::-webkit-scrollbar-thumb{background:#d9d9d9;border-radius:2px}.section[data-v-1daf6ac6]{margin-bottom:14px;padding:14px;border-radius:14px;border:1px solid #f0f3f8;background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fafcff));background:linear-gradient(180deg,#fff,#fafcff)}.section .section-title[data-v-1daf6ac6]{font-size:12px;font-weight:700;color:#445066;margin-bottom:10px;text-transform:uppercase;letter-spacing:.6px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.section .section-title .hint[data-v-1daf6ac6]{font-weight:400;color:#bfbfbf;font-size:11px;text-transform:none}.field-label[data-v-1daf6ac6]{font-size:12px;color:#6b7280;margin-bottom:6px;font-weight:500}.tf-group[data-v-1daf6ac6]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.tf-group[data-v-1daf6ac6] .ant-radio-button-wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1;text-align:center;min-width:36px;padding:0 6px}.date-presets[data-v-1daf6ac6]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:6px;-ms-flex-wrap:wrap;flex-wrap:wrap}.run-section[data-v-1daf6ac6]{margin-top:14px;padding-top:14px;border-top:1px dashed #e5e7eb}.strategy-info[data-v-1daf6ac6]{margin-top:6px}.strategy-summary-card[data-v-1daf6ac6]{margin-top:10px;padding:12px;border-radius:10px;background:-webkit-gradient(linear,left top,left bottom,from(#f7fbff),to(#f5f7fa));background:linear-gradient(180deg,#f7fbff,#f5f7fa);border:1px solid #e6f4ff}.strategy-summary-head[data-v-1daf6ac6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:8px}.strategy-summary-title[data-v-1daf6ac6]{font-size:14px;font-weight:600;color:#1f1f1f}.strategy-summary-meta[data-v-1daf6ac6]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:6px;margin-top:8px}.strategy-summary-text[data-v-1daf6ac6]{margin-top:8px;font-size:12px;color:#595959;line-height:1.6}.result-col .result-panel[data-v-1daf6ac6]{background:#fff;border-radius:12px;padding:24px;-webkit-box-shadow:0 2px 12px rgba(0,0,0,.06);box-shadow:0 2px 12px rgba(0,0,0,.06);min-height:500px}[data-v-1daf6ac6] .empty-result{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-height:450px}[data-v-1daf6ac6] .empty-result,[data-v-1daf6ac6] .empty-result .empty-icon{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}[data-v-1daf6ac6] .empty-result .empty-icon{width:100px;height:100px;border-radius:50%;background:linear-gradient(135deg,#e6f7ff,#f0f5ff);margin-bottom:24px;font-size:42px;color:#1890ff}[data-v-1daf6ac6] .empty-result h3{font-size:20px;font-weight:700;color:#333;margin-bottom:8px}[data-v-1daf6ac6] .empty-result p{font-size:14px;color:#8c8c8c;max-width:320px;text-align:center;line-height:1.6}[data-v-1daf6ac6] .running-overlay{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;min-height:450px}[data-v-1daf6ac6] .running-overlay .running-content{text-align:center;width:280px}[data-v-1daf6ac6] .running-spinner{width:64px;height:64px;margin:0 auto 20px;position:relative}[data-v-1daf6ac6] .running-spinner .spinner-track{position:absolute;inset:0;border-radius:50%;border:3px solid #f0f0f0}[data-v-1daf6ac6] .running-spinner .spinner-fill{position:absolute;inset:0;border-radius:50%;border:3px solid transparent;border-top-color:#1890ff;-webkit-animation:spin-1daf6ac6 1s linear infinite;animation:spin-1daf6ac6 1s linear infinite}@-webkit-keyframes spin-1daf6ac6{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin-1daf6ac6{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}[data-v-1daf6ac6] .running-title{font-size:17px;font-weight:700;color:#333;margin-bottom:4px}[data-v-1daf6ac6] .running-elapsed{font-size:24px;font-weight:300;color:#1890ff;margin-bottom:24px;font-variant-numeric:tabular-nums;letter-spacing:1px}[data-v-1daf6ac6] .running-steps{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px;text-align:left}[data-v-1daf6ac6] .running-steps .step-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px;padding:8px 14px;border-radius:8px;background:#fafafa;border:1px solid #f0f0f0;-webkit-transition:all .3s;transition:all .3s}[data-v-1daf6ac6] .running-steps .step-item .step-icon{font-size:16px;color:#d9d9d9;-ms-flex-negative:0;flex-shrink:0}[data-v-1daf6ac6] .running-steps .step-item .step-label{font-size:13px;color:#999}[data-v-1daf6ac6] .running-steps .step-item.active{background:#e6f7ff;border-color:#91d5ff}[data-v-1daf6ac6] .running-steps .step-item.active .step-icon{color:#1890ff;-webkit-animation:pulseIcon-1daf6ac6 1.2s ease-in-out infinite;animation:pulseIcon-1daf6ac6 1.2s ease-in-out infinite}[data-v-1daf6ac6] .running-steps .step-item.active .step-label{color:#1890ff;font-weight:600}[data-v-1daf6ac6] .running-steps .step-item.done{background:#f6ffed;border-color:#b7eb8f}[data-v-1daf6ac6] .running-steps .step-item.done .step-icon,[data-v-1daf6ac6] .running-steps .step-item.done .step-label{color:#52c41a}@-webkit-keyframes pulseIcon-1daf6ac6{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.15);transform:scale(1.15)}}@keyframes pulseIcon-1daf6ac6{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.15);transform:scale(1.15)}}[data-v-1daf6ac6] .result-content{padding:0}[data-v-1daf6ac6] .result-header{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:16px;gap:12px}[data-v-1daf6ac6] .result-header,[data-v-1daf6ac6] .result-header .result-header-left{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap}[data-v-1daf6ac6] .result-header .result-header-left{gap:10px}[data-v-1daf6ac6] .result-header .result-header-actions{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}[data-v-1daf6ac6] .result-header .result-tag{display:-webkit-box;display:-ms-flexbox;display:flex;gap:4px;-ms-flex-wrap:wrap;flex-wrap:wrap}[data-v-1daf6ac6] .result-header .run-id{font-size:12px;color:#999;font-variant-numeric:tabular-nums}[data-v-1daf6ac6] .metrics-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:24px}[data-v-1daf6ac6] .metric-card{background:#fafafa;border-radius:10px;padding:14px 12px;text-align:center;border:1px solid #f0f0f0;-webkit-transition:-webkit-transform .2s,-webkit-box-shadow .2s;transition:-webkit-transform .2s,-webkit-box-shadow .2s;transition:transform .2s,box-shadow .2s;transition:transform .2s,box-shadow .2s,-webkit-transform .2s,-webkit-box-shadow .2s}[data-v-1daf6ac6] .metric-card:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-box-shadow:0 4px 12px rgba(0,0,0,.08);box-shadow:0 4px 12px rgba(0,0,0,.08)}[data-v-1daf6ac6] .metric-card .metric-label{font-size:11px;color:#8c8c8c;margin-bottom:6px;text-transform:uppercase;letter-spacing:.3px}[data-v-1daf6ac6] .metric-card .metric-value{font-size:20px;font-weight:700;font-variant-numeric:tabular-nums;color:#333;line-height:1.2}[data-v-1daf6ac6] .metric-card .metric-sub{font-size:11px;color:#8c8c8c;margin-top:4px;font-variant-numeric:tabular-nums}[data-v-1daf6ac6] .metric-card.positive .metric-value{color:#52c41a}[data-v-1daf6ac6] .metric-card.negative .metric-value{color:#f5222d}[data-v-1daf6ac6] .chart-section{margin-bottom:24px}[data-v-1daf6ac6] .chart-section .chart-title{font-size:14px;font-weight:600;color:#333;margin-bottom:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}[data-v-1daf6ac6] .chart-section .equity-chart{width:100%;height:300px;border-radius:8px}[data-v-1daf6ac6] .trades-section .chart-title{font-size:14px;font-weight:600;color:#333;margin-bottom:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}[data-v-1daf6ac6] .result-ai-loading{padding:26px 0;text-align:center}[data-v-1daf6ac6] .result-ai-loading-text{margin-top:12px;color:#8c8c8c}[data-v-1daf6ac6] .result-ai-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:14px}[data-v-1daf6ac6] .result-ai-meta-card{border:1px solid #edf2f7;border-radius:12px;padding:14px;background:-webkit-gradient(linear,left top,left bottom,from(#fbfdff),to(#f7faff));background:linear-gradient(180deg,#fbfdff,#f7faff)}[data-v-1daf6ac6] .result-ai-meta-top{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px}[data-v-1daf6ac6] .result-ai-meta-actions,[data-v-1daf6ac6] .result-ai-meta-left,[data-v-1daf6ac6] .result-ai-meta-top{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap}[data-v-1daf6ac6] .result-ai-meta-actions,[data-v-1daf6ac6] .result-ai-meta-left{gap:8px}[data-v-1daf6ac6] .result-ai-markdown-card{border:1px solid #eef2f7;border-radius:12px;padding:18px 20px;background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fcfcfc));background:linear-gradient(180deg,#fff,#fcfcfc);-webkit-box-shadow:0 6px 18px rgba(0,0,0,.04);box-shadow:0 6px 18px rgba(0,0,0,.04)}[data-v-1daf6ac6] .result-ai-markdown-content{color:#262626;font-size:14px;line-height:1.8}[data-v-1daf6ac6] .result-ai-markdown-content/deep/h1,[data-v-1daf6ac6] .result-ai-markdown-content/deep/h2,[data-v-1daf6ac6] .result-ai-markdown-content/deep/h3{margin:0 0 12px;font-weight:700;color:#1f1f1f;line-height:1.5}[data-v-1daf6ac6] .result-ai-markdown-content/deep/h1{font-size:20px}[data-v-1daf6ac6] .result-ai-markdown-content/deep/h2{font-size:17px}[data-v-1daf6ac6] .result-ai-markdown-content/deep/h3{font-size:15px;padding-left:10px;border-left:3px solid #1890ff}[data-v-1daf6ac6] .result-ai-markdown-content/deep/p{margin:0 0 12px;color:#434343}[data-v-1daf6ac6] .result-ai-markdown-content/deep/ol,[data-v-1daf6ac6] .result-ai-markdown-content/deep/ul{margin:0 0 14px 20px;padding:0}[data-v-1daf6ac6] .result-ai-markdown-content/deep/li{margin-bottom:8px;color:#434343}[data-v-1daf6ac6] .result-ai-markdown-content/deep/strong{color:#262626;font-weight:700}[data-v-1daf6ac6] .result-ai-markdown-content/deep/em{color:#595959}[data-v-1daf6ac6] .result-ai-markdown-content/deep/code{padding:1px 6px;border-radius:6px;background:#f5f5f5;color:#cf1322;font-size:13px}[data-v-1daf6ac6] .result-ai-markdown-content/deep/pre{margin:0 0 14px;padding:12px 14px;border-radius:10px;background:#141414;overflow-x:auto}[data-v-1daf6ac6] .result-ai-markdown-content/deep/pre code{padding:0;background:transparent;color:hsla(0,0%,100%,.88)}[data-v-1daf6ac6] .result-ai-markdown-content/deep/blockquote{margin:0 0 14px;padding:10px 14px;border-left:3px solid #91d5ff;background:#f5fbff;color:#595959}[data-v-1daf6ac6] .result-ai-empty{padding:20px 0 8px;text-align:center;color:#8c8c8c}.add-item-active[data-v-1daf6ac6]{background:#e6f7ff!important}.theme-dark[data-v-1daf6ac6]{background:#141414}.theme-dark .page-header .page-title[data-v-1daf6ac6]{background:linear-gradient(135deg,#e0e6ed,#c5ccd6);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.theme-dark .page-header .page-title .title-icon[data-v-1daf6ac6]{-webkit-text-fill-color:unset;color:#40a9ff!important;background:none;-webkit-background-clip:unset;background-clip:unset}.theme-dark .page-header .page-subtitle[data-v-1daf6ac6]{color:hsla(0,0%,100%,.45)}.theme-dark .main-tabs[data-v-1daf6ac6] .ant-tabs-bar{border-bottom-color:#303030}.theme-dark .main-tabs[data-v-1daf6ac6] .ant-tabs-tab{color:hsla(0,0%,100%,.65)}.theme-dark .main-tabs[data-v-1daf6ac6] .ant-tabs-tab:hover{color:#fff}.theme-dark .main-tabs[data-v-1daf6ac6] .ant-tabs-tab-active{color:#177ddc!important}.theme-dark .main-tabs[data-v-1daf6ac6] .ant-tabs-ink-bar{background:#177ddc}.theme-dark .config-panel[data-v-1daf6ac6]{background:-webkit-gradient(linear,left top,left bottom,from(#1f1f1f),to(#191919));background:linear-gradient(180deg,#1f1f1f,#191919);border-color:#2f3540;-webkit-box-shadow:0 10px 30px rgba(0,0,0,.35);box-shadow:0 10px 30px rgba(0,0,0,.35)}.theme-dark .config-panel[data-v-1daf6ac6]::-webkit-scrollbar-thumb{background:#434343}.theme-dark .section[data-v-1daf6ac6]{background:-webkit-gradient(linear,left top,left bottom,from(hsla(0,0%,100%,.02)),to(hsla(0,0%,100%,.01)));background:linear-gradient(180deg,hsla(0,0%,100%,.02),hsla(0,0%,100%,.01));border-color:#2d323b}.theme-dark .section .section-title[data-v-1daf6ac6]{color:hsla(0,0%,100%,.78)}.theme-dark .section .section-title .hint[data-v-1daf6ac6]{color:hsla(0,0%,100%,.35)}.theme-dark .field-label[data-v-1daf6ac6]{color:hsla(0,0%,100%,.58)}.theme-dark[data-v-1daf6ac6] .ant-select .ant-select-selection{background:#141414;border-color:#434343;color:hsla(0,0%,100%,.85)}.theme-dark[data-v-1daf6ac6] .ant-select .ant-select-selection .ant-select-arrow{color:hsla(0,0%,100%,.45)}.theme-dark[data-v-1daf6ac6] .ant-select .ant-select-selection:hover{border-color:#177ddc}.theme-dark[data-v-1daf6ac6] .ant-select-selection__placeholder{color:hsla(0,0%,100%,.35)}.theme-dark[data-v-1daf6ac6] .ant-input,.theme-dark[data-v-1daf6ac6] .ant-input-number{background:#141414;border-color:#434343;color:hsla(0,0%,100%,.85)}.theme-dark[data-v-1daf6ac6] .ant-input-number:focus,.theme-dark[data-v-1daf6ac6] .ant-input-number:hover,.theme-dark[data-v-1daf6ac6] .ant-input:focus,.theme-dark[data-v-1daf6ac6] .ant-input:hover{border-color:#177ddc}.theme-dark[data-v-1daf6ac6] .ant-input-number-handler-wrap{background:#1f1f1f;border-left-color:#434343}.theme-dark[data-v-1daf6ac6] .ant-input-number-handler{color:hsla(0,0%,100%,.45)}.theme-dark[data-v-1daf6ac6] .ant-input-number-handler:hover{color:#177ddc}.theme-dark[data-v-1daf6ac6] .ant-calendar-picker-input{background:#141414;border-color:#434343;color:hsla(0,0%,100%,.85)}.theme-dark[data-v-1daf6ac6] .ant-calendar-picker-icon{color:hsla(0,0%,100%,.45)}.theme-dark[data-v-1daf6ac6] .ant-radio-button-wrapper{background:#141414;border-color:#434343;color:hsla(0,0%,100%,.65)}.theme-dark[data-v-1daf6ac6] .ant-radio-button-wrapper:hover{color:#177ddc}.theme-dark[data-v-1daf6ac6] .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#177ddc;border-color:#177ddc;color:#fff}.theme-dark[data-v-1daf6ac6] .ant-checkbox-wrapper{color:hsla(0,0%,100%,.85)}.theme-dark[data-v-1daf6ac6] .ant-checkbox-inner{background:#141414;border-color:#434343}.theme-dark[data-v-1daf6ac6] .ant-btn-default{background:#1f1f1f;border-color:#434343;color:hsla(0,0%,100%,.65)}.theme-dark[data-v-1daf6ac6] .ant-btn-default:hover{border-color:#177ddc;color:#177ddc}.theme-dark .run-section[data-v-1daf6ac6]{border-top-color:#303030}.theme-dark .strategy-summary-card[data-v-1daf6ac6]{background:-webkit-gradient(linear,left top,left bottom,from(rgba(23,125,220,.12)),to(hsla(0,0%,100%,.03)));background:linear-gradient(180deg,rgba(23,125,220,.12),hsla(0,0%,100%,.03));border-color:rgba(23,125,220,.22)}.theme-dark .strategy-summary-title[data-v-1daf6ac6]{color:hsla(0,0%,100%,.92)}.theme-dark .strategy-summary-text[data-v-1daf6ac6]{color:hsla(0,0%,100%,.65)}.theme-dark .result-panel[data-v-1daf6ac6]{background:#1f1f1f;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.45);box-shadow:0 2px 8px rgba(0,0,0,.45)}.theme-dark[data-v-1daf6ac6] .running-spinner .spinner-track{border-color:#303030}.theme-dark[data-v-1daf6ac6] .running-spinner .spinner-fill{border-top-color:#177ddc}.theme-dark[data-v-1daf6ac6] .running-title{color:hsla(0,0%,100%,.85)}.theme-dark[data-v-1daf6ac6] .running-elapsed{color:#177ddc}.theme-dark[data-v-1daf6ac6] .running-steps .step-item{background:#141414;border-color:#303030}.theme-dark[data-v-1daf6ac6] .running-steps .step-item .step-icon{color:hsla(0,0%,100%,.38)}.theme-dark[data-v-1daf6ac6] .running-steps .step-item .step-label{color:hsla(0,0%,100%,.35)}.theme-dark[data-v-1daf6ac6] .running-steps .step-item.active{background:rgba(23,125,220,.1);border-color:rgba(23,125,220,.3)}.theme-dark[data-v-1daf6ac6] .running-steps .step-item.active .step-icon,.theme-dark[data-v-1daf6ac6] .running-steps .step-item.active .step-label{color:#177ddc}.theme-dark[data-v-1daf6ac6] .running-steps .step-item.done{background:rgba(73,170,25,.08);border-color:rgba(73,170,25,.25)}.theme-dark[data-v-1daf6ac6] .running-steps .step-item.done .step-icon,.theme-dark[data-v-1daf6ac6] .running-steps .step-item.done .step-label{color:#49aa19}.theme-dark[data-v-1daf6ac6] .running-steps .step-item .step-icon .anticon{color:inherit!important}.theme-dark[data-v-1daf6ac6] .result-header-actions .ant-btn.ant-btn-primary.ant-btn-background-ghost .anticon{color:#177ddc}.theme-dark[data-v-1daf6ac6] .empty-result .empty-icon{background:linear-gradient(135deg,rgba(23,125,220,.15),rgba(23,125,220,.08));color:#177ddc}.theme-dark[data-v-1daf6ac6] .empty-result h3{color:hsla(0,0%,100%,.85)}.theme-dark[data-v-1daf6ac6] .empty-result p,.theme-dark[data-v-1daf6ac6] .result-ai-loading-text,.theme-dark[data-v-1daf6ac6] .result-header .run-id{color:hsla(0,0%,100%,.45)}.theme-dark[data-v-1daf6ac6] .result-ai-meta-card{background:-webkit-gradient(linear,left top,left bottom,from(rgba(23,125,220,.08)),to(hsla(0,0%,100%,.02)));background:linear-gradient(180deg,rgba(23,125,220,.08),hsla(0,0%,100%,.02));border-color:rgba(23,125,220,.22)}.theme-dark[data-v-1daf6ac6] .result-ai-markdown-card{background:-webkit-gradient(linear,left top,left bottom,from(#171717),to(#141414));background:linear-gradient(180deg,#171717,#141414);border-color:#2f3540;-webkit-box-shadow:0 8px 24px rgba(0,0,0,.25);box-shadow:0 8px 24px rgba(0,0,0,.25)}.theme-dark[data-v-1daf6ac6] .result-ai-markdown-content{color:hsla(0,0%,100%,.82)}.theme-dark[data-v-1daf6ac6] .result-ai-markdown-content/deep/h1,.theme-dark[data-v-1daf6ac6] .result-ai-markdown-content/deep/h2,.theme-dark[data-v-1daf6ac6] .result-ai-markdown-content/deep/h3{color:hsla(0,0%,100%,.92)}.theme-dark[data-v-1daf6ac6] .result-ai-markdown-content/deep/li,.theme-dark[data-v-1daf6ac6] .result-ai-markdown-content/deep/p{color:hsla(0,0%,100%,.72)}.theme-dark[data-v-1daf6ac6] .result-ai-markdown-content/deep/strong{color:hsla(0,0%,100%,.92)}.theme-dark[data-v-1daf6ac6] .result-ai-markdown-content/deep/em{color:hsla(0,0%,100%,.62)}.theme-dark[data-v-1daf6ac6] .result-ai-markdown-content/deep/code{background:hsla(0,0%,100%,.08);color:#ff9c6e}.theme-dark[data-v-1daf6ac6] .result-ai-markdown-content/deep/blockquote{background:rgba(23,125,220,.08);color:hsla(0,0%,100%,.68);border-left-color:rgba(23,125,220,.45)}.theme-dark[data-v-1daf6ac6] .result-ai-empty{color:hsla(0,0%,100%,.45)}.theme-dark[data-v-1daf6ac6] .metric-card{background:#141414;border-color:#303030}.theme-dark[data-v-1daf6ac6] .metric-card:hover{-webkit-box-shadow:0 4px 12px rgba(0,0,0,.4);box-shadow:0 4px 12px rgba(0,0,0,.4)}.theme-dark[data-v-1daf6ac6] .metric-card .metric-label{color:hsla(0,0%,100%,.45)}.theme-dark[data-v-1daf6ac6] .metric-card .metric-value{color:hsla(0,0%,100%,.85)}.theme-dark[data-v-1daf6ac6] .metric-card .metric-sub{color:hsla(0,0%,100%,.35)}.theme-dark[data-v-1daf6ac6] .metric-card.positive .metric-value{color:#49aa19}.theme-dark[data-v-1daf6ac6] .metric-card.negative .metric-value{color:#d32029}.theme-dark[data-v-1daf6ac6] .chart-section .chart-title,.theme-dark[data-v-1daf6ac6] .trades-section .chart-title{color:hsla(0,0%,100%,.85)}.theme-dark[data-v-1daf6ac6] .ant-table{background:transparent;color:hsla(0,0%,100%,.85)}.theme-dark[data-v-1daf6ac6] .ant-table .ant-table-thead>tr>th{background:hsla(0,0%,100%,.04);color:hsla(0,0%,100%,.65);border-bottom-color:#303030}.theme-dark[data-v-1daf6ac6] .ant-table .ant-table-tbody>tr>td{border-bottom-color:#303030}.theme-dark[data-v-1daf6ac6] .ant-table .ant-table-tbody>tr:hover>td{background:hsla(0,0%,100%,.04)}.theme-dark[data-v-1daf6ac6] .ant-table .ant-table-placeholder{background:transparent;color:hsla(0,0%,100%,.35)}.theme-dark[data-v-1daf6ac6] .ant-pagination .ant-pagination-total-text{color:hsla(0,0%,100%,.65)}.theme-dark[data-v-1daf6ac6] .ant-pagination .ant-pagination-item{background:#1f1f1f;border-color:#434343}.theme-dark[data-v-1daf6ac6] .ant-pagination .ant-pagination-item a{color:hsla(0,0%,100%,.65)}.theme-dark[data-v-1daf6ac6] .ant-pagination .ant-pagination-item.ant-pagination-item-active{border-color:#177ddc}.theme-dark[data-v-1daf6ac6] .ant-pagination .ant-pagination-item.ant-pagination-item-active a{color:#177ddc}.theme-dark[data-v-1daf6ac6] .ant-pagination .ant-pagination-next .ant-pagination-item-link,.theme-dark[data-v-1daf6ac6] .ant-pagination .ant-pagination-prev .ant-pagination-item-link{background:#1f1f1f;border-color:#434343;color:hsla(0,0%,100%,.45)}.theme-dark[data-v-1daf6ac6] .ant-empty-description{color:hsla(0,0%,100%,.35)}.theme-dark[data-v-1daf6ac6] .ant-empty-image svg{fill:hsla(0,0%,100%,.1)}.theme-dark[data-v-1daf6ac6] .empty-icon .anticon{color:#177ddc!important}.bc-modal-wrap--dark .ant-modal-content{background:#1f1f1f;-webkit-box-shadow:0 8px 32px rgba(0,0,0,.55);box-shadow:0 8px 32px rgba(0,0,0,.55)}.bc-modal-wrap--dark .ant-modal-header{background:#1f1f1f;border-bottom-color:#303030}.bc-modal-wrap--dark .ant-modal-title{color:hsla(0,0%,100%,.88)}.bc-modal-wrap--dark .ant-modal-close{color:hsla(0,0%,100%,.55)}.bc-modal-wrap--dark .ant-modal-close:hover{color:hsla(0,0%,100%,.88)}.bc-modal-wrap--dark .ant-modal-body{background:#1f1f1f;color:hsla(0,0%,100%,.85)}.bc-modal-wrap--dark .ant-modal-footer{background:#1f1f1f;border-top-color:#303030}.bc-modal-wrap--dark .ant-tabs-bar{border-bottom-color:#303030}.bc-modal-wrap--dark .ant-tabs-tab{color:hsla(0,0%,100%,.55)}.bc-modal-wrap--dark .ant-tabs-tab:hover{color:hsla(0,0%,100%,.85)}.bc-modal-wrap--dark .ant-tabs-tab-active{color:#177ddc!important}.bc-modal-wrap--dark .ant-input-search .ant-input{background:#141414;border-color:#434343;color:hsla(0,0%,100%,.88)}.bc-modal-wrap--dark .ant-input-search .ant-input:focus,.bc-modal-wrap--dark .ant-input-search .ant-input:hover{border-color:#177ddc}.bc-modal-wrap--dark .ant-input-search-icon{color:hsla(0,0%,100%,.45)}.bc-modal-wrap--dark .ant-list-item{color:hsla(0,0%,100%,.85);border-bottom-color:#303030}.bc-modal-wrap--dark .ant-list-item:hover{background:hsla(0,0%,100%,.04)} \ No newline at end of file diff --git a/frontend/dist/css/419.d911c6d3.css b/frontend/dist/css/419.d911c6d3.css deleted file mode 100644 index 8b64494..0000000 --- a/frontend/dist/css/419.d911c6d3.css +++ /dev/null @@ -1 +0,0 @@ -.drawer-toolbar[data-v-2a402d06]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:14px;-ms-flex-wrap:wrap;flex-wrap:wrap}.drawer-toolbar .toolbar-left[data-v-2a402d06],.drawer-toolbar .toolbar-right[data-v-2a402d06],.drawer-toolbar[data-v-2a402d06]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.selected-tip[data-v-2a402d06]{font-size:12px;color:#8c8c8c}.ai-modal-content[data-v-2a402d06]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:14px}.ai-meta-card[data-v-2a402d06]{border:1px solid #f0f0f0;border-radius:10px;padding:14px;background:#fafafa}.ai-meta-top[data-v-2a402d06]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px}.ai-meta-actions[data-v-2a402d06],.ai-meta-left[data-v-2a402d06],.ai-meta-top[data-v-2a402d06],.ai-run-tags[data-v-2a402d06]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap}.ai-meta-actions[data-v-2a402d06],.ai-meta-left[data-v-2a402d06],.ai-run-tags[data-v-2a402d06]{gap:8px}.ai-markdown-card[data-v-2a402d06]{border:1px solid #f0f0f0;border-radius:12px;padding:18px 20px;background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fcfcfc));background:linear-gradient(180deg,#fff,#fcfcfc);-webkit-box-shadow:0 6px 18px rgba(0,0,0,.04);box-shadow:0 6px 18px rgba(0,0,0,.04)}.ai-markdown-content[data-v-2a402d06]{color:#262626;font-size:14px;line-height:1.8}.ai-markdown-content[data-v-2a402d06] h1,.ai-markdown-content[data-v-2a402d06] h2,.ai-markdown-content[data-v-2a402d06] h3{margin:0 0 12px;font-weight:700;color:#1f1f1f;line-height:1.5}.ai-markdown-content[data-v-2a402d06] h1{font-size:20px}.ai-markdown-content[data-v-2a402d06] h2{font-size:17px}.ai-markdown-content[data-v-2a402d06] h3{font-size:15px;padding-left:10px;border-left:3px solid #1890ff}.ai-markdown-content[data-v-2a402d06] p{margin:0 0 12px;color:#434343}.ai-markdown-content[data-v-2a402d06] ol,.ai-markdown-content[data-v-2a402d06] ul{margin:0 0 14px 20px;padding:0}.ai-markdown-content[data-v-2a402d06] li{margin-bottom:8px;color:#434343}.ai-markdown-content[data-v-2a402d06] strong{color:#262626;font-weight:700}.ai-markdown-content[data-v-2a402d06] em{color:#595959}.ai-markdown-content[data-v-2a402d06] code{padding:2px 6px;border-radius:6px;background:#f5f5f5;color:#cf1322;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px}.ai-markdown-content[data-v-2a402d06] pre{overflow:auto;margin:0 0 14px;padding:14px;border-radius:10px;background:#141414;color:#f0f0f0}.ai-markdown-content[data-v-2a402d06] pre code{padding:0;background:transparent;color:inherit}.ai-markdown-content[data-v-2a402d06] blockquote{margin:0 0 14px;padding:10px 14px;border-left:4px solid #91d5ff;border-radius:0 8px 8px 0;background:#f0f7ff;color:#595959}.ai-result-content[data-v-2a402d06]{white-space:pre-wrap;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:13px;line-height:1.7;padding:8px 0}.backtest-run-viewer[data-v-a484239a] .ant-modal-body{padding:16px;max-height:70vh;overflow-y:auto}.metrics-cards[data-v-a484239a]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.metric-card[data-v-a484239a]{background:#fff;border:1px solid #f0f0f0;border-radius:8px;padding:12px}.metric-card.positive[data-v-a484239a]{border-color:rgba(82,196,26,.35)}.metric-card.negative[data-v-a484239a]{border-color:rgba(245,34,45,.35)}.metric-label[data-v-a484239a]{color:#8c8c8c;font-size:12px}.metric-value[data-v-a484239a]{font-size:18px;font-weight:600;margin-top:4px}.metric-amount[data-v-a484239a]{color:#8c8c8c;font-size:12px;margin-top:4px}.chart-section[data-v-a484239a]{margin-top:8px}.chart-title[data-v-a484239a]{font-weight:600;margin:8px 0;color:#262626}.equity-chart[data-v-a484239a]{width:100%;height:280px}.trades-section[data-v-a484239a]{margin-top:16px}.backtest-center[data-v-6853ba40]{padding:20px;min-height:calc(100vh - 120px)}.page-header[data-v-6853ba40]{margin-bottom:16px}.page-header .page-title[data-v-6853ba40]{font-size:22px;font-weight:700;margin:0 0 2px;background:linear-gradient(135deg,#1e3a5f,#2d5a87);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px}.page-header .page-title .title-icon[data-v-6853ba40]{font-size:24px;-webkit-text-fill-color:#1890ff}.page-header .page-subtitle[data-v-6853ba40]{margin:0;font-size:13px;color:#8c8c8c}.main-tabs[data-v-6853ba40] .ant-tabs-bar{margin-bottom:14px;border-bottom:2px solid #f0f0f0}.main-tabs[data-v-6853ba40] .ant-tabs-tab{font-size:15px;font-weight:500;padding:10px 20px}.config-col .config-panel[data-v-6853ba40]{background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fcfdff));background:linear-gradient(180deg,#fff,#fcfdff);border-radius:16px;padding:18px;border:1px solid #eef2f7;-webkit-box-shadow:0 10px 30px rgba(31,41,55,.08);box-shadow:0 10px 30px rgba(31,41,55,.08);max-height:calc(100vh - 200px);overflow-y:auto}.config-col .config-panel[data-v-6853ba40]::-webkit-scrollbar{width:4px}.config-col .config-panel[data-v-6853ba40]::-webkit-scrollbar-thumb{background:#d9d9d9;border-radius:2px}.section[data-v-6853ba40]{margin-bottom:14px;padding:14px;border-radius:14px;border:1px solid #f0f3f8;background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fafcff));background:linear-gradient(180deg,#fff,#fafcff)}.section .section-title[data-v-6853ba40]{font-size:12px;font-weight:700;color:#445066;margin-bottom:10px;text-transform:uppercase;letter-spacing:.6px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.section .section-title .hint[data-v-6853ba40]{font-weight:400;color:#bfbfbf;font-size:11px;text-transform:none}.field-label[data-v-6853ba40]{font-size:12px;color:#6b7280;margin-bottom:6px;font-weight:500}.tf-group[data-v-6853ba40]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.tf-group[data-v-6853ba40] .ant-radio-button-wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1;text-align:center;min-width:36px;padding:0 6px}.date-presets[data-v-6853ba40]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:6px;-ms-flex-wrap:wrap;flex-wrap:wrap}.run-section[data-v-6853ba40]{margin-top:14px;padding-top:14px;border-top:1px dashed #e5e7eb}.strategy-info[data-v-6853ba40]{margin-top:6px}.strategy-summary-card[data-v-6853ba40]{margin-top:10px;padding:12px;border-radius:10px;background:-webkit-gradient(linear,left top,left bottom,from(#f7fbff),to(#f5f7fa));background:linear-gradient(180deg,#f7fbff,#f5f7fa);border:1px solid #e6f4ff}.strategy-summary-head[data-v-6853ba40]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:8px}.strategy-summary-title[data-v-6853ba40]{font-size:14px;font-weight:600;color:#1f1f1f}.strategy-summary-meta[data-v-6853ba40]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:6px;margin-top:8px}.strategy-summary-text[data-v-6853ba40]{margin-top:8px;font-size:12px;color:#595959;line-height:1.6}.result-col .result-panel[data-v-6853ba40]{background:#fff;border-radius:12px;padding:24px;-webkit-box-shadow:0 2px 12px rgba(0,0,0,.06);box-shadow:0 2px 12px rgba(0,0,0,.06);min-height:500px}[data-v-6853ba40] .empty-result{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-height:450px}[data-v-6853ba40] .empty-result,[data-v-6853ba40] .empty-result .empty-icon{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}[data-v-6853ba40] .empty-result .empty-icon{width:100px;height:100px;border-radius:50%;background:linear-gradient(135deg,#e6f7ff,#f0f5ff);margin-bottom:24px;font-size:42px;color:#1890ff}[data-v-6853ba40] .empty-result h3{font-size:20px;font-weight:700;color:#333;margin-bottom:8px}[data-v-6853ba40] .empty-result p{font-size:14px;color:#8c8c8c;max-width:320px;text-align:center;line-height:1.6}[data-v-6853ba40] .running-overlay{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;min-height:450px}[data-v-6853ba40] .running-overlay .running-content{text-align:center;width:280px}[data-v-6853ba40] .running-spinner{width:64px;height:64px;margin:0 auto 20px;position:relative}[data-v-6853ba40] .running-spinner .spinner-track{position:absolute;inset:0;border-radius:50%;border:3px solid #f0f0f0}[data-v-6853ba40] .running-spinner .spinner-fill{position:absolute;inset:0;border-radius:50%;border:3px solid transparent;border-top-color:#1890ff;-webkit-animation:spin-6853ba40 1s linear infinite;animation:spin-6853ba40 1s linear infinite}@-webkit-keyframes spin-6853ba40{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin-6853ba40{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}[data-v-6853ba40] .running-title{font-size:17px;font-weight:700;color:#333;margin-bottom:4px}[data-v-6853ba40] .running-elapsed{font-size:24px;font-weight:300;color:#1890ff;margin-bottom:24px;font-variant-numeric:tabular-nums;letter-spacing:1px}[data-v-6853ba40] .running-steps{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px;text-align:left}[data-v-6853ba40] .running-steps .step-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px;padding:8px 14px;border-radius:8px;background:#fafafa;border:1px solid #f0f0f0;-webkit-transition:all .3s;transition:all .3s}[data-v-6853ba40] .running-steps .step-item .step-icon{font-size:16px;color:#d9d9d9;-ms-flex-negative:0;flex-shrink:0}[data-v-6853ba40] .running-steps .step-item .step-label{font-size:13px;color:#999}[data-v-6853ba40] .running-steps .step-item.active{background:#e6f7ff;border-color:#91d5ff}[data-v-6853ba40] .running-steps .step-item.active .step-icon{color:#1890ff;-webkit-animation:pulseIcon-6853ba40 1.2s ease-in-out infinite;animation:pulseIcon-6853ba40 1.2s ease-in-out infinite}[data-v-6853ba40] .running-steps .step-item.active .step-label{color:#1890ff;font-weight:600}[data-v-6853ba40] .running-steps .step-item.done{background:#f6ffed;border-color:#b7eb8f}[data-v-6853ba40] .running-steps .step-item.done .step-icon,[data-v-6853ba40] .running-steps .step-item.done .step-label{color:#52c41a}@-webkit-keyframes pulseIcon-6853ba40{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.15);transform:scale(1.15)}}@keyframes pulseIcon-6853ba40{0%,to{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.15);transform:scale(1.15)}}[data-v-6853ba40] .result-content{padding:0}[data-v-6853ba40] .result-header{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:16px;gap:12px}[data-v-6853ba40] .result-header,[data-v-6853ba40] .result-header .result-header-left{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap}[data-v-6853ba40] .result-header .result-header-left{gap:10px}[data-v-6853ba40] .result-header .result-header-actions{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}[data-v-6853ba40] .result-header .result-tag{display:-webkit-box;display:-ms-flexbox;display:flex;gap:4px;-ms-flex-wrap:wrap;flex-wrap:wrap}[data-v-6853ba40] .result-header .run-id{font-size:12px;color:#999;font-variant-numeric:tabular-nums}[data-v-6853ba40] .metrics-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:24px}[data-v-6853ba40] .metric-card{background:#fafafa;border-radius:10px;padding:14px 12px;text-align:center;border:1px solid #f0f0f0;-webkit-transition:-webkit-transform .2s,-webkit-box-shadow .2s;transition:-webkit-transform .2s,-webkit-box-shadow .2s;transition:transform .2s,box-shadow .2s;transition:transform .2s,box-shadow .2s,-webkit-transform .2s,-webkit-box-shadow .2s}[data-v-6853ba40] .metric-card:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-box-shadow:0 4px 12px rgba(0,0,0,.08);box-shadow:0 4px 12px rgba(0,0,0,.08)}[data-v-6853ba40] .metric-card .metric-label{font-size:11px;color:#8c8c8c;margin-bottom:6px;text-transform:uppercase;letter-spacing:.3px}[data-v-6853ba40] .metric-card .metric-value{font-size:20px;font-weight:700;font-variant-numeric:tabular-nums;color:#333;line-height:1.2}[data-v-6853ba40] .metric-card .metric-sub{font-size:11px;color:#8c8c8c;margin-top:4px;font-variant-numeric:tabular-nums}[data-v-6853ba40] .metric-card.positive .metric-value{color:#52c41a}[data-v-6853ba40] .metric-card.negative .metric-value{color:#f5222d}[data-v-6853ba40] .chart-section{margin-bottom:24px}[data-v-6853ba40] .chart-section .chart-title{font-size:14px;font-weight:600;color:#333;margin-bottom:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}[data-v-6853ba40] .chart-section .equity-chart{width:100%;height:300px;border-radius:8px}[data-v-6853ba40] .trades-section .chart-title{font-size:14px;font-weight:600;color:#333;margin-bottom:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}[data-v-6853ba40] .result-ai-loading{padding:26px 0;text-align:center}[data-v-6853ba40] .result-ai-loading-text{margin-top:12px;color:#8c8c8c}[data-v-6853ba40] .result-ai-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:14px}[data-v-6853ba40] .result-ai-meta-card{border:1px solid #edf2f7;border-radius:12px;padding:14px;background:-webkit-gradient(linear,left top,left bottom,from(#fbfdff),to(#f7faff));background:linear-gradient(180deg,#fbfdff,#f7faff)}[data-v-6853ba40] .result-ai-meta-top{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px}[data-v-6853ba40] .result-ai-meta-actions,[data-v-6853ba40] .result-ai-meta-left,[data-v-6853ba40] .result-ai-meta-top{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap}[data-v-6853ba40] .result-ai-meta-actions,[data-v-6853ba40] .result-ai-meta-left{gap:8px}[data-v-6853ba40] .result-ai-markdown-card{border:1px solid #eef2f7;border-radius:12px;padding:18px 20px;background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fcfcfc));background:linear-gradient(180deg,#fff,#fcfcfc);-webkit-box-shadow:0 6px 18px rgba(0,0,0,.04);box-shadow:0 6px 18px rgba(0,0,0,.04)}[data-v-6853ba40] .result-ai-markdown-content{color:#262626;font-size:14px;line-height:1.8}[data-v-6853ba40] .result-ai-markdown-content/deep/h1,[data-v-6853ba40] .result-ai-markdown-content/deep/h2,[data-v-6853ba40] .result-ai-markdown-content/deep/h3{margin:0 0 12px;font-weight:700;color:#1f1f1f;line-height:1.5}[data-v-6853ba40] .result-ai-markdown-content/deep/h1{font-size:20px}[data-v-6853ba40] .result-ai-markdown-content/deep/h2{font-size:17px}[data-v-6853ba40] .result-ai-markdown-content/deep/h3{font-size:15px;padding-left:10px;border-left:3px solid #1890ff}[data-v-6853ba40] .result-ai-markdown-content/deep/p{margin:0 0 12px;color:#434343}[data-v-6853ba40] .result-ai-markdown-content/deep/ol,[data-v-6853ba40] .result-ai-markdown-content/deep/ul{margin:0 0 14px 20px;padding:0}[data-v-6853ba40] .result-ai-markdown-content/deep/li{margin-bottom:8px;color:#434343}[data-v-6853ba40] .result-ai-markdown-content/deep/strong{color:#262626;font-weight:700}[data-v-6853ba40] .result-ai-markdown-content/deep/em{color:#595959}[data-v-6853ba40] .result-ai-markdown-content/deep/code{padding:1px 6px;border-radius:6px;background:#f5f5f5;color:#cf1322;font-size:13px}[data-v-6853ba40] .result-ai-markdown-content/deep/pre{margin:0 0 14px;padding:12px 14px;border-radius:10px;background:#141414;overflow-x:auto}[data-v-6853ba40] .result-ai-markdown-content/deep/pre code{padding:0;background:transparent;color:hsla(0,0%,100%,.88)}[data-v-6853ba40] .result-ai-markdown-content/deep/blockquote{margin:0 0 14px;padding:10px 14px;border-left:3px solid #91d5ff;background:#f5fbff;color:#595959}[data-v-6853ba40] .result-ai-empty{padding:20px 0 8px;text-align:center;color:#8c8c8c}.add-item-active[data-v-6853ba40]{background:#e6f7ff!important}.theme-dark[data-v-6853ba40]{background:#141414}.theme-dark .page-header .page-title[data-v-6853ba40]{background:linear-gradient(135deg,#e0e6ed,#c5ccd6);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.theme-dark .page-header .page-title .title-icon[data-v-6853ba40]{-webkit-text-fill-color:unset;color:#40a9ff!important;background:none;-webkit-background-clip:unset;background-clip:unset}.theme-dark .page-header .page-subtitle[data-v-6853ba40]{color:hsla(0,0%,100%,.45)}.theme-dark .main-tabs[data-v-6853ba40] .ant-tabs-bar{border-bottom-color:#303030}.theme-dark .main-tabs[data-v-6853ba40] .ant-tabs-tab{color:hsla(0,0%,100%,.65)}.theme-dark .main-tabs[data-v-6853ba40] .ant-tabs-tab:hover{color:#fff}.theme-dark .main-tabs[data-v-6853ba40] .ant-tabs-tab-active{color:#177ddc!important}.theme-dark .main-tabs[data-v-6853ba40] .ant-tabs-ink-bar{background:#177ddc}.theme-dark .config-panel[data-v-6853ba40]{background:-webkit-gradient(linear,left top,left bottom,from(#1f1f1f),to(#191919));background:linear-gradient(180deg,#1f1f1f,#191919);border-color:#2f3540;-webkit-box-shadow:0 10px 30px rgba(0,0,0,.35);box-shadow:0 10px 30px rgba(0,0,0,.35)}.theme-dark .config-panel[data-v-6853ba40]::-webkit-scrollbar-thumb{background:#434343}.theme-dark .section[data-v-6853ba40]{background:-webkit-gradient(linear,left top,left bottom,from(hsla(0,0%,100%,.02)),to(hsla(0,0%,100%,.01)));background:linear-gradient(180deg,hsla(0,0%,100%,.02),hsla(0,0%,100%,.01));border-color:#2d323b}.theme-dark .section .section-title[data-v-6853ba40]{color:hsla(0,0%,100%,.78)}.theme-dark .section .section-title .hint[data-v-6853ba40]{color:hsla(0,0%,100%,.35)}.theme-dark .field-label[data-v-6853ba40]{color:hsla(0,0%,100%,.58)}.theme-dark[data-v-6853ba40] .ant-select .ant-select-selection{background:#141414;border-color:#434343;color:hsla(0,0%,100%,.85)}.theme-dark[data-v-6853ba40] .ant-select .ant-select-selection .ant-select-arrow{color:hsla(0,0%,100%,.45)}.theme-dark[data-v-6853ba40] .ant-select .ant-select-selection:hover{border-color:#177ddc}.theme-dark[data-v-6853ba40] .ant-select-selection__placeholder{color:hsla(0,0%,100%,.35)}.theme-dark[data-v-6853ba40] .ant-input,.theme-dark[data-v-6853ba40] .ant-input-number{background:#141414;border-color:#434343;color:hsla(0,0%,100%,.85)}.theme-dark[data-v-6853ba40] .ant-input-number:focus,.theme-dark[data-v-6853ba40] .ant-input-number:hover,.theme-dark[data-v-6853ba40] .ant-input:focus,.theme-dark[data-v-6853ba40] .ant-input:hover{border-color:#177ddc}.theme-dark[data-v-6853ba40] .ant-input-number-handler-wrap{background:#1f1f1f;border-left-color:#434343}.theme-dark[data-v-6853ba40] .ant-input-number-handler{color:hsla(0,0%,100%,.45)}.theme-dark[data-v-6853ba40] .ant-input-number-handler:hover{color:#177ddc}.theme-dark[data-v-6853ba40] .ant-calendar-picker-input{background:#141414;border-color:#434343;color:hsla(0,0%,100%,.85)}.theme-dark[data-v-6853ba40] .ant-calendar-picker-icon{color:hsla(0,0%,100%,.45)}.theme-dark[data-v-6853ba40] .ant-radio-button-wrapper{background:#141414;border-color:#434343;color:hsla(0,0%,100%,.65)}.theme-dark[data-v-6853ba40] .ant-radio-button-wrapper:hover{color:#177ddc}.theme-dark[data-v-6853ba40] .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#177ddc;border-color:#177ddc;color:#fff}.theme-dark[data-v-6853ba40] .ant-checkbox-wrapper{color:hsla(0,0%,100%,.85)}.theme-dark[data-v-6853ba40] .ant-checkbox-inner{background:#141414;border-color:#434343}.theme-dark[data-v-6853ba40] .ant-btn-default{background:#1f1f1f;border-color:#434343;color:hsla(0,0%,100%,.65)}.theme-dark[data-v-6853ba40] .ant-btn-default:hover{border-color:#177ddc;color:#177ddc}.theme-dark .run-section[data-v-6853ba40]{border-top-color:#303030}.theme-dark .strategy-summary-card[data-v-6853ba40]{background:-webkit-gradient(linear,left top,left bottom,from(rgba(23,125,220,.12)),to(hsla(0,0%,100%,.03)));background:linear-gradient(180deg,rgba(23,125,220,.12),hsla(0,0%,100%,.03));border-color:rgba(23,125,220,.22)}.theme-dark .strategy-summary-title[data-v-6853ba40]{color:hsla(0,0%,100%,.92)}.theme-dark .strategy-summary-text[data-v-6853ba40]{color:hsla(0,0%,100%,.65)}.theme-dark .result-panel[data-v-6853ba40]{background:#1f1f1f;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.45);box-shadow:0 2px 8px rgba(0,0,0,.45)}.theme-dark[data-v-6853ba40] .running-spinner .spinner-track{border-color:#303030}.theme-dark[data-v-6853ba40] .running-spinner .spinner-fill{border-top-color:#177ddc}.theme-dark[data-v-6853ba40] .running-title{color:hsla(0,0%,100%,.85)}.theme-dark[data-v-6853ba40] .running-elapsed{color:#177ddc}.theme-dark[data-v-6853ba40] .running-steps .step-item{background:#141414;border-color:#303030}.theme-dark[data-v-6853ba40] .running-steps .step-item .step-icon{color:hsla(0,0%,100%,.38)}.theme-dark[data-v-6853ba40] .running-steps .step-item .step-label{color:hsla(0,0%,100%,.35)}.theme-dark[data-v-6853ba40] .running-steps .step-item.active{background:rgba(23,125,220,.1);border-color:rgba(23,125,220,.3)}.theme-dark[data-v-6853ba40] .running-steps .step-item.active .step-icon,.theme-dark[data-v-6853ba40] .running-steps .step-item.active .step-label{color:#177ddc}.theme-dark[data-v-6853ba40] .running-steps .step-item.done{background:rgba(73,170,25,.08);border-color:rgba(73,170,25,.25)}.theme-dark[data-v-6853ba40] .running-steps .step-item.done .step-icon,.theme-dark[data-v-6853ba40] .running-steps .step-item.done .step-label{color:#49aa19}.theme-dark[data-v-6853ba40] .running-steps .step-item .step-icon .anticon{color:inherit!important}.theme-dark[data-v-6853ba40] .result-header-actions .ant-btn.ant-btn-primary.ant-btn-background-ghost .anticon{color:#177ddc}.theme-dark[data-v-6853ba40] .empty-result .empty-icon{background:linear-gradient(135deg,rgba(23,125,220,.15),rgba(23,125,220,.08));color:#177ddc}.theme-dark[data-v-6853ba40] .empty-result h3{color:hsla(0,0%,100%,.85)}.theme-dark[data-v-6853ba40] .empty-result p,.theme-dark[data-v-6853ba40] .result-ai-loading-text,.theme-dark[data-v-6853ba40] .result-header .run-id{color:hsla(0,0%,100%,.45)}.theme-dark[data-v-6853ba40] .result-ai-meta-card{background:-webkit-gradient(linear,left top,left bottom,from(rgba(23,125,220,.08)),to(hsla(0,0%,100%,.02)));background:linear-gradient(180deg,rgba(23,125,220,.08),hsla(0,0%,100%,.02));border-color:rgba(23,125,220,.22)}.theme-dark[data-v-6853ba40] .result-ai-markdown-card{background:-webkit-gradient(linear,left top,left bottom,from(#171717),to(#141414));background:linear-gradient(180deg,#171717,#141414);border-color:#2f3540;-webkit-box-shadow:0 8px 24px rgba(0,0,0,.25);box-shadow:0 8px 24px rgba(0,0,0,.25)}.theme-dark[data-v-6853ba40] .result-ai-markdown-content{color:hsla(0,0%,100%,.82)}.theme-dark[data-v-6853ba40] .result-ai-markdown-content/deep/h1,.theme-dark[data-v-6853ba40] .result-ai-markdown-content/deep/h2,.theme-dark[data-v-6853ba40] .result-ai-markdown-content/deep/h3{color:hsla(0,0%,100%,.92)}.theme-dark[data-v-6853ba40] .result-ai-markdown-content/deep/li,.theme-dark[data-v-6853ba40] .result-ai-markdown-content/deep/p{color:hsla(0,0%,100%,.72)}.theme-dark[data-v-6853ba40] .result-ai-markdown-content/deep/strong{color:hsla(0,0%,100%,.92)}.theme-dark[data-v-6853ba40] .result-ai-markdown-content/deep/em{color:hsla(0,0%,100%,.62)}.theme-dark[data-v-6853ba40] .result-ai-markdown-content/deep/code{background:hsla(0,0%,100%,.08);color:#ff9c6e}.theme-dark[data-v-6853ba40] .result-ai-markdown-content/deep/blockquote{background:rgba(23,125,220,.08);color:hsla(0,0%,100%,.68);border-left-color:rgba(23,125,220,.45)}.theme-dark[data-v-6853ba40] .result-ai-empty{color:hsla(0,0%,100%,.45)}.theme-dark[data-v-6853ba40] .metric-card{background:#141414;border-color:#303030}.theme-dark[data-v-6853ba40] .metric-card:hover{-webkit-box-shadow:0 4px 12px rgba(0,0,0,.4);box-shadow:0 4px 12px rgba(0,0,0,.4)}.theme-dark[data-v-6853ba40] .metric-card .metric-label{color:hsla(0,0%,100%,.45)}.theme-dark[data-v-6853ba40] .metric-card .metric-value{color:hsla(0,0%,100%,.85)}.theme-dark[data-v-6853ba40] .metric-card .metric-sub{color:hsla(0,0%,100%,.35)}.theme-dark[data-v-6853ba40] .metric-card.positive .metric-value{color:#49aa19}.theme-dark[data-v-6853ba40] .metric-card.negative .metric-value{color:#d32029}.theme-dark[data-v-6853ba40] .chart-section .chart-title,.theme-dark[data-v-6853ba40] .trades-section .chart-title{color:hsla(0,0%,100%,.85)}.theme-dark[data-v-6853ba40] .ant-table{background:transparent;color:hsla(0,0%,100%,.85)}.theme-dark[data-v-6853ba40] .ant-table .ant-table-thead>tr>th{background:hsla(0,0%,100%,.04);color:hsla(0,0%,100%,.65);border-bottom-color:#303030}.theme-dark[data-v-6853ba40] .ant-table .ant-table-tbody>tr>td{border-bottom-color:#303030}.theme-dark[data-v-6853ba40] .ant-table .ant-table-tbody>tr:hover>td{background:hsla(0,0%,100%,.04)}.theme-dark[data-v-6853ba40] .ant-table .ant-table-placeholder{background:transparent;color:hsla(0,0%,100%,.35)}.theme-dark[data-v-6853ba40] .ant-pagination .ant-pagination-item{background:#1f1f1f;border-color:#434343}.theme-dark[data-v-6853ba40] .ant-pagination .ant-pagination-item a{color:hsla(0,0%,100%,.65)}.theme-dark[data-v-6853ba40] .ant-pagination .ant-pagination-item.ant-pagination-item-active{border-color:#177ddc}.theme-dark[data-v-6853ba40] .ant-pagination .ant-pagination-item.ant-pagination-item-active a{color:#177ddc}.theme-dark[data-v-6853ba40] .ant-pagination .ant-pagination-next .ant-pagination-item-link,.theme-dark[data-v-6853ba40] .ant-pagination .ant-pagination-prev .ant-pagination-item-link{background:#1f1f1f;border-color:#434343;color:hsla(0,0%,100%,.45)}.theme-dark[data-v-6853ba40] .ant-empty-description{color:hsla(0,0%,100%,.35)}.theme-dark[data-v-6853ba40] .ant-empty-image svg{fill:hsla(0,0%,100%,.1)}.theme-dark[data-v-6853ba40] .empty-icon .anticon{color:#177ddc!important}.bc-modal-wrap--dark .ant-modal-content{background:#1f1f1f;-webkit-box-shadow:0 8px 32px rgba(0,0,0,.55);box-shadow:0 8px 32px rgba(0,0,0,.55)}.bc-modal-wrap--dark .ant-modal-header{background:#1f1f1f;border-bottom-color:#303030}.bc-modal-wrap--dark .ant-modal-title{color:hsla(0,0%,100%,.88)}.bc-modal-wrap--dark .ant-modal-close{color:hsla(0,0%,100%,.55)}.bc-modal-wrap--dark .ant-modal-close:hover{color:hsla(0,0%,100%,.88)}.bc-modal-wrap--dark .ant-modal-body{background:#1f1f1f;color:hsla(0,0%,100%,.85)}.bc-modal-wrap--dark .ant-modal-footer{background:#1f1f1f;border-top-color:#303030}.bc-modal-wrap--dark .ant-tabs-bar{border-bottom-color:#303030}.bc-modal-wrap--dark .ant-tabs-tab{color:hsla(0,0%,100%,.55)}.bc-modal-wrap--dark .ant-tabs-tab:hover{color:hsla(0,0%,100%,.85)}.bc-modal-wrap--dark .ant-tabs-tab-active{color:#177ddc!important}.bc-modal-wrap--dark .ant-input-search .ant-input{background:#141414;border-color:#434343;color:hsla(0,0%,100%,.88)}.bc-modal-wrap--dark .ant-input-search .ant-input:focus,.bc-modal-wrap--dark .ant-input-search .ant-input:hover{border-color:#177ddc}.bc-modal-wrap--dark .ant-input-search-icon{color:hsla(0,0%,100%,.45)}.bc-modal-wrap--dark .ant-list-item{color:hsla(0,0%,100%,.85);border-bottom-color:#303030}.bc-modal-wrap--dark .ant-list-item:hover{background:hsla(0,0%,100%,.04)} \ No newline at end of file diff --git a/frontend/dist/css/44.62d3ef3b.css b/frontend/dist/css/44.62d3ef3b.css deleted file mode 100644 index ba0a63f..0000000 --- a/frontend/dist/css/44.62d3ef3b.css +++ /dev/null @@ -1 +0,0 @@ -.trading-records[data-v-a5bdef7e]{width:100%;min-height:300px;padding:0;overflow-x:visible;overflow-y:visible}.trading-records .empty-state[data-v-a5bdef7e]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;min-height:200px;padding:40px 0;background:linear-gradient(135deg,rgba(248,250,252,.5),rgba(241,245,249,.5));border-radius:12px;border:2px dashed #e0e6ed}.trading-records[data-v-a5bdef7e] .ant-spin-container,.trading-records[data-v-a5bdef7e] .ant-spin-nested-loading{overflow-x:visible}.trading-records[data-v-a5bdef7e] .ant-table-wrapper{overflow-x:visible;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.trading-records[data-v-a5bdef7e] .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.trading-records[data-v-a5bdef7e] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.trading-records[data-v-a5bdef7e] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.trading-records[data-v-a5bdef7e] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.trading-records[data-v-a5bdef7e] .ant-table{font-size:13px;color:#333}.trading-records[data-v-a5bdef7e] .ant-table-container{overflow-x:visible}.trading-records[data-v-a5bdef7e] .ant-table-body{overflow-x:auto;overflow-y:visible;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.trading-records[data-v-a5bdef7e] .ant-table-body::-webkit-scrollbar{height:6px;width:6px}.trading-records[data-v-a5bdef7e] .ant-table-body::-webkit-scrollbar-track{background:transparent;border-radius:3px}.trading-records[data-v-a5bdef7e] .ant-table-body::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.trading-records[data-v-a5bdef7e] .ant-table-body::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.trading-records[data-v-a5bdef7e] .ant-table-container{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.trading-records[data-v-a5bdef7e] .ant-table-container::-webkit-scrollbar{height:6px;width:6px}.trading-records[data-v-a5bdef7e] .ant-table-container::-webkit-scrollbar-track{background:transparent;border-radius:3px}.trading-records[data-v-a5bdef7e] .ant-table-container::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.trading-records[data-v-a5bdef7e] .ant-table-container::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.trading-records[data-v-a5bdef7e] .ant-table-content{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.trading-records[data-v-a5bdef7e] .ant-table-content::-webkit-scrollbar{height:6px;width:6px}.trading-records[data-v-a5bdef7e] .ant-table-content::-webkit-scrollbar-track{background:transparent;border-radius:3px}.trading-records[data-v-a5bdef7e] .ant-table-content::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.trading-records[data-v-a5bdef7e] .ant-table-content::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.trading-records[data-v-a5bdef7e] .ant-table-tbody>tr>td,.trading-records[data-v-a5bdef7e] .ant-table-thead>tr>th{white-space:nowrap}.trading-records[data-v-a5bdef7e] .ant-table-thead>tr>th{background:-webkit-gradient(linear,left top,left bottom,from(#f8fafc),to(#f1f5f9));background:linear-gradient(180deg,#f8fafc,#f1f5f9);font-weight:600;color:#475569;border-bottom:2px solid #e2e8f0;padding:12px 16px;font-size:13px}.trading-records[data-v-a5bdef7e] .ant-table-tbody>tr>td{padding:12px 16px;color:#334155;border-bottom:1px solid #f1f5f9;-webkit-transition:background .2s ease;transition:background .2s ease}.trading-records[data-v-a5bdef7e] .ant-table-tbody>tr:hover>td{background:#f0f7ff!important}.trading-records[data-v-a5bdef7e] .ant-tag{border-radius:6px;padding:3px 10px;font-weight:600;font-size:11px;border:none;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-records[data-v-a5bdef7e] .ant-tag[color=cyan],.trading-records[data-v-a5bdef7e] .ant-tag[color=green],.trading-records[data-v-a5bdef7e] .ant-tag[color=lime]{background:linear-gradient(135deg,rgba(14,203,129,.15),rgba(14,203,129,.08));color:#0ecb81;border:1px solid rgba(14,203,129,.3)}.trading-records[data-v-a5bdef7e] .ant-tag[color=magenta],.trading-records[data-v-a5bdef7e] .ant-tag[color=red]{background:linear-gradient(135deg,rgba(246,70,93,.15),rgba(246,70,93,.08));color:#f6465d;border:1px solid rgba(246,70,93,.3)}.trading-records[data-v-a5bdef7e] .ant-tag[color=orange]{background:linear-gradient(135deg,rgba(250,173,20,.15),rgba(250,173,20,.08));color:#d48806;border:1px solid rgba(250,173,20,.3)}.trading-records[data-v-a5bdef7e] .ant-tag[color=blue]{background:linear-gradient(135deg,rgba(24,144,255,.15),rgba(24,144,255,.08));color:#1890ff;border:1px solid rgba(24,144,255,.3)}.trading-records[data-v-a5bdef7e] .ant-pagination{margin-top:16px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-item{border-radius:8px;border:1px solid #e2e8f0;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-item:hover{border-color:#1890ff}.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-item:hover a{color:#1890ff}.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-item.ant-pagination-item-active{background:linear-gradient(135deg,#1890ff,#40a9ff);border-color:#1890ff}.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-item.ant-pagination-item-active a{color:#fff}.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-next .ant-pagination-item-link,.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-prev .ant-pagination-item-link{border-radius:8px;border:1px solid #e2e8f0;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-next .ant-pagination-item-link:hover,.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-prev .ant-pagination-item-link:hover{border-color:#1890ff;color:#1890ff}.theme-dark .trading-records[data-v-a5bdef7e] .ant-table,.trading-records.theme-dark[data-v-a5bdef7e] .ant-table{background:#1e222d!important;color:#d1d4dc!important}.theme-dark .trading-records[data-v-a5bdef7e] .ant-table-thead>tr>th,.trading-records.theme-dark[data-v-a5bdef7e] .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important;font-weight:600}.theme-dark .trading-records[data-v-a5bdef7e] .ant-table-tbody>tr>td,.trading-records.theme-dark[data-v-a5bdef7e] .ant-table-tbody>tr>td{background:#1e222d!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records[data-v-a5bdef7e] .ant-table-tbody>tr:hover>td,.trading-records.theme-dark[data-v-a5bdef7e] .ant-table-tbody>tr:hover>td{background:#2a2e39!important}.theme-dark .trading-records[data-v-a5bdef7e] .ant-table-tbody>tr>td span,.trading-records.theme-dark[data-v-a5bdef7e] .ant-table-tbody>tr>td span{color:#d1d4dc!important}.trading-records[data-v-a5bdef7e] .ant-table-tbody>tr:hover>td{background:#fafafa}@media (max-width:768px){.trading-records[data-v-a5bdef7e]{min-height:200px;overflow-x:visible}.trading-records[data-v-a5bdef7e] .ant-table{font-size:12px}.trading-records[data-v-a5bdef7e] .ant-table-body,.trading-records[data-v-a5bdef7e] .ant-table-container,.trading-records[data-v-a5bdef7e] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.trading-records[data-v-a5bdef7e] .ant-table-body::-webkit-scrollbar,.trading-records[data-v-a5bdef7e] .ant-table-container::-webkit-scrollbar,.trading-records[data-v-a5bdef7e] .ant-table-wrapper::-webkit-scrollbar{height:4px;width:4px}.trading-records[data-v-a5bdef7e] .ant-table-body::-webkit-scrollbar-track,.trading-records[data-v-a5bdef7e] .ant-table-container::-webkit-scrollbar-track,.trading-records[data-v-a5bdef7e] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:2px}.trading-records[data-v-a5bdef7e] .ant-table-body::-webkit-scrollbar-thumb,.trading-records[data-v-a5bdef7e] .ant-table-container::-webkit-scrollbar-thumb,.trading-records[data-v-a5bdef7e] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:2px}.trading-records[data-v-a5bdef7e] .ant-table-body::-webkit-scrollbar-thumb:hover,.trading-records[data-v-a5bdef7e] .ant-table-container::-webkit-scrollbar-thumb:hover,.trading-records[data-v-a5bdef7e] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.trading-records[data-v-a5bdef7e] .ant-table-tbody>tr>td,.trading-records[data-v-a5bdef7e] .ant-table-thead>tr>th{padding:8px 10px;font-size:11px;white-space:nowrap}.trading-records[data-v-a5bdef7e] .ant-pagination{margin-top:12px;text-align:center}.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-item,.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-next,.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-prev{margin:0 2px;min-width:28px;height:28px;line-height:26px;font-size:12px}}@media (max-width:480px){.trading-records[data-v-a5bdef7e] .ant-table{font-size:11px}.trading-records[data-v-a5bdef7e] .ant-table-tbody>tr>td,.trading-records[data-v-a5bdef7e] .ant-table-thead>tr>th{padding:6px 8px;font-size:10px}}.theme-dark .trading-records .ant-table-tbody>tr>td,.theme-dark .trading-records[data-v] .ant-table-tbody>tr>td,body.dark .trading-records .ant-table-tbody>tr>td,body.realdark .trading-records .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1e222d!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records .ant-table-thead>tr>th,.theme-dark .trading-records[data-v] .ant-table-thead>tr>th,body.dark .trading-records .ant-table-thead>tr>th,body.realdark .trading-records .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important;font-weight:600!important}.theme-dark .trading-records .ant-table,.theme-dark .trading-records[data-v] .ant-table,body.dark .trading-records .ant-table,body.realdark .trading-records .ant-table{background:#1e222d!important;color:#d1d4dc!important}.theme-dark .trading-records .ant-table-tbody>tr>td *,.theme-dark .trading-records[data-v] .ant-table-tbody>tr>td *,body.dark .trading-records .ant-table-tbody>tr>td *,body.realdark .trading-records .ant-table-tbody>tr>td *{color:#d1d4dc!important}.theme-dark .trading-records .ant-table-tbody>tr:hover>td,.theme-dark .trading-records[data-v] .ant-table-tbody>tr:hover>td,body.dark .trading-records .ant-table-tbody>tr:hover>td,body.realdark .trading-records .ant-table-tbody>tr:hover>td{background:#2a2e39!important}.theme-dark .trading-records .ant-table-thead>tr>th .ant-table-column-title,.theme-dark .trading-records[data-v] .ant-table-thead>tr>th .ant-table-column-title,body.dark .trading-records .ant-table-thead>tr>th .ant-table-column-title,body.realdark .trading-records .ant-table-thead>tr>th .ant-table-column-title{color:#d1d4dc!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-table-tbody>tr:hover>td{background:#2a2e39!important}body.dark .trading-records[data-v-8a68b65a] .ant-table-tbody>tr>td,body.realdark .trading-records[data-v-8a68b65a] .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1e222d!important;border-bottom-color:#363c4e!important}body.dark .trading-records[data-v-8a68b65a] .ant-table-thead>tr>th,body.realdark .trading-records[data-v-8a68b65a] .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records[data-v] .ant-table-tbody>tr>td,body.dark .trading-records[data-v] .ant-table-tbody>tr>td,body.realdark .trading-records[data-v] .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1e222d!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records[data-v] .ant-table-thead>tr>th,body.dark .trading-records[data-v] .ant-table-thead>tr>th,body.realdark .trading-records[data-v] .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item{background:#1e222d!important;border-color:#363c4e!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item a,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item a,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item a{color:#d1d4dc!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover{border-color:#1890ff!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover a,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover a,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover a{color:#1890ff!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item-active,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item-active,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item-active{background:#1890ff!important;border-color:#1890ff!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item-active a,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item-active a,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item-active a{color:#fff!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-next .ant-pagination-item-link,.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-prev .ant-pagination-item-link,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-next .ant-pagination-item-link,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-prev .ant-pagination-item-link,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-next .ant-pagination-item-link,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-prev .ant-pagination-item-link{background:#1e222d!important;border-color:#363c4e!important;color:#d1d4dc!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-next:hover .ant-pagination-item-link,.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-prev:hover .ant-pagination-item-link,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-next:hover .ant-pagination-item-link,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-prev:hover .ant-pagination-item-link,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-next:hover .ant-pagination-item-link,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-prev:hover .ant-pagination-item-link{border-color:#1890ff!important;color:#1890ff!important}.theme-dark .trading-records[data-v] .ant-pagination-item,body.dark .trading-records[data-v] .ant-pagination-item,body.realdark .trading-records[data-v] .ant-pagination-item{background:#1e222d!important;border-color:#363c4e!important}.theme-dark .trading-records[data-v] .ant-pagination-item a,body.dark .trading-records[data-v] .ant-pagination-item a,body.realdark .trading-records[data-v] .ant-pagination-item a{color:#d1d4dc!important}.theme-dark .trading-records[data-v] .ant-pagination-item:hover,body.dark .trading-records[data-v] .ant-pagination-item:hover,body.realdark .trading-records[data-v] .ant-pagination-item:hover{border-color:#1890ff!important}.theme-dark .trading-records[data-v] .ant-pagination-item:hover a,body.dark .trading-records[data-v] .ant-pagination-item:hover a,body.realdark .trading-records[data-v] .ant-pagination-item:hover a{color:#1890ff!important}.theme-dark .trading-records[data-v] .ant-pagination-item-active,body.dark .trading-records[data-v] .ant-pagination-item-active,body.realdark .trading-records[data-v] .ant-pagination-item-active{background:#1890ff!important;border-color:#1890ff!important}.theme-dark .trading-records[data-v] .ant-pagination-item-active a,body.dark .trading-records[data-v] .ant-pagination-item-active a,body.realdark .trading-records[data-v] .ant-pagination-item-active a{color:#fff!important}.theme-dark .trading-records[data-v] .ant-pagination-next .ant-pagination-item-link,.theme-dark .trading-records[data-v] .ant-pagination-prev .ant-pagination-item-link,body.dark .trading-records[data-v] .ant-pagination-next .ant-pagination-item-link,body.dark .trading-records[data-v] .ant-pagination-prev .ant-pagination-item-link,body.realdark .trading-records[data-v] .ant-pagination-next .ant-pagination-item-link,body.realdark .trading-records[data-v] .ant-pagination-prev .ant-pagination-item-link{background:#1e222d!important;border-color:#363c4e!important;color:#d1d4dc!important}.theme-dark .trading-records[data-v] .ant-pagination-next:hover .ant-pagination-item-link,.theme-dark .trading-records[data-v] .ant-pagination-prev:hover .ant-pagination-item-link,body.dark .trading-records[data-v] .ant-pagination-next:hover .ant-pagination-item-link,body.dark .trading-records[data-v] .ant-pagination-prev:hover .ant-pagination-item-link,body.realdark .trading-records[data-v] .ant-pagination-next:hover .ant-pagination-item-link,body.realdark .trading-records[data-v] .ant-pagination-prev:hover .ant-pagination-item-link{border-color:#1890ff!important;color:#1890ff!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-table-body,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-container,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-content,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-wrapper,body.dark .trading-records[data-v-8a68b65a] .ant-table-body,body.dark .trading-records[data-v-8a68b65a] .ant-table-container,body.dark .trading-records[data-v-8a68b65a] .ant-table-content,body.dark .trading-records[data-v-8a68b65a] .ant-table-wrapper,body.realdark .trading-records[data-v-8a68b65a] .ant-table-body,body.realdark .trading-records[data-v-8a68b65a] .ant-table-container,body.realdark .trading-records[data-v-8a68b65a] .ant-table-content,body.realdark .trading-records[data-v-8a68b65a] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(209,212,220,.3) transparent}.theme-dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar,body.dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar,body.dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar,body.dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar,body.dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar,body.realdark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar,body.realdark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar,body.realdark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar,body.realdark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.theme-dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-track,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-track,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-track,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-track,body.dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-track,body.dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-track,body.dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-track,body.dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-track,body.realdark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-track,body.realdark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-track,body.realdark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-track,body.realdark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.theme-dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-thumb,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-thumb,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-thumb,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-thumb,body.dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-thumb,body.dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-thumb,body.dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-thumb,body.dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(209,212,220,.3);border-radius:3px}.theme-dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(209,212,220,.5)}.theme-dark .trading-records[data-v] .ant-table-body,.theme-dark .trading-records[data-v] .ant-table-container,.theme-dark .trading-records[data-v] .ant-table-content,.theme-dark .trading-records[data-v] .ant-table-wrapper,body.dark .trading-records[data-v] .ant-table-body,body.dark .trading-records[data-v] .ant-table-container,body.dark .trading-records[data-v] .ant-table-content,body.dark .trading-records[data-v] .ant-table-wrapper,body.realdark .trading-records[data-v] .ant-table-body,body.realdark .trading-records[data-v] .ant-table-container,body.realdark .trading-records[data-v] .ant-table-content,body.realdark .trading-records[data-v] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(209,212,220,.3) transparent}.theme-dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar,.theme-dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar,.theme-dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar,.theme-dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar,body.dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar,body.dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar,body.dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar,body.dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar,body.realdark .trading-records[data-v] .ant-table-body::-webkit-scrollbar,body.realdark .trading-records[data-v] .ant-table-container::-webkit-scrollbar,body.realdark .trading-records[data-v] .ant-table-content::-webkit-scrollbar,body.realdark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.theme-dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-track,.theme-dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-track,.theme-dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-track,.theme-dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-track,body.dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-track,body.dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-track,body.dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-track,body.dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-track,body.realdark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-track,body.realdark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-track,body.realdark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-track,body.realdark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.theme-dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-thumb,.theme-dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-thumb,.theme-dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-thumb,.theme-dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb,body.dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-thumb,body.dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-thumb,body.dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-thumb,body.dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(209,212,220,.3);border-radius:3px}.theme-dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(209,212,220,.5)}.theme-dark .trading-records ::v-deep .ant-table{background:#1e222d!important;color:#d1d4dc!important}.theme-dark .trading-records ::v-deep .ant-table table{background:#1e222d!important;color:#d1d4dc!important}.theme-dark .trading-records ::v-deep .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records ::v-deep .ant-table-tbody{color:#d1d4dc!important}.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td{background:#1e222d!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td div,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td span{color:#d1d4dc!important}.theme-dark .trading-records ::v-deep .ant-table-tbody>tr:hover>td{background:#2a2e39!important}.theme-dark .trading-records ::v-deep .ant-table-placeholder{background:#1e222d!important;color:#868993!important}.theme-dark .trading-records ::v-deep .ant-table-body,.theme-dark .trading-records ::v-deep .ant-table-container,.theme-dark .trading-records ::v-deep .ant-table-content,.theme-dark .trading-records ::v-deep .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(209,212,220,.3) transparent}.theme-dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar,.theme-dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar,.theme-dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar,.theme-dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.theme-dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-track,.theme-dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-track,.theme-dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-track,.theme-dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.theme-dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-thumb,.theme-dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-thumb,.theme-dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-thumb,.theme-dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(209,212,220,.3);border-radius:3px}.theme-dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(209,212,220,.5)}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item{background:#1e222d!important;border-color:#363c4e!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item a{color:#d1d4dc!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover{border-color:#1890ff!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a{color:#1890ff!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active{background:#1890ff!important;border-color:#1890ff!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active a{color:#fff!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link{background:#1e222d!important;border-color:#363c4e!important;color:#d1d4dc!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link{border-color:#1890ff!important;color:#1890ff!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector{background:#1e222d!important;border-color:#363c4e!important;color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-table,body.realdark .trading-records ::v-deep .ant-table{background:#1e222d!important;color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-table table,body.realdark .trading-records ::v-deep .ant-table table{background:#1e222d!important;color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-table-thead>tr>th,body.realdark .trading-records ::v-deep .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}body.dark .trading-records ::v-deep .ant-table-tbody,body.realdark .trading-records ::v-deep .ant-table-tbody{color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-table-tbody>tr>td,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td{background:#1e222d!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}body.dark .trading-records ::v-deep .ant-table-tbody>tr>td,body.dark .trading-records ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),body.dark .trading-records ::v-deep .ant-table-tbody>tr>td div,body.dark .trading-records ::v-deep .ant-table-tbody>tr>td span,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td div,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td span{color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-table-tbody>tr:hover>td,body.realdark .trading-records ::v-deep .ant-table-tbody>tr:hover>td{background:#2a2e39!important}body.dark .trading-records ::v-deep .ant-table-placeholder,body.realdark .trading-records ::v-deep .ant-table-placeholder{background:#1e222d!important;color:#868993!important}body.dark .trading-records ::v-deep .ant-table-body,body.dark .trading-records ::v-deep .ant-table-container,body.dark .trading-records ::v-deep .ant-table-content,body.dark .trading-records ::v-deep .ant-table-wrapper,body.realdark .trading-records ::v-deep .ant-table-body,body.realdark .trading-records ::v-deep .ant-table-container,body.realdark .trading-records ::v-deep .ant-table-content,body.realdark .trading-records ::v-deep .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(209,212,220,.3) transparent}body.dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar,body.dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar,body.dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar,body.dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar,body.realdark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar,body.realdark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar,body.realdark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar,body.realdark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}body.dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-track,body.dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-track,body.dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-track,body.dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-track,body.realdark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-track,body.realdark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-track,body.realdark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-track,body.realdark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}body.dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-thumb,body.dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-thumb,body.dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-thumb,body.dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-thumb,body.realdark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-thumb,body.realdark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-thumb,body.realdark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-thumb,body.realdark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(209,212,220,.3);border-radius:3px}body.dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-thumb:hover,body.dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-thumb:hover,body.dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-thumb:hover,body.dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.realdark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-thumb:hover,body.realdark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-thumb:hover,body.realdark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-thumb:hover,body.realdark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(209,212,220,.5)}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item{background:#1e222d!important;border-color:#363c4e!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item a,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item a{color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover{border-color:#1890ff!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a{color:#1890ff!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active{background:#1890ff!important;border-color:#1890ff!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active a,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active a{color:#fff!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link{background:#1e222d!important;border-color:#363c4e!important;color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link{border-color:#1890ff!important;color:#1890ff!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector{background:#1e222d!important;border-color:#363c4e!important;color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-table,.theme-dark .trading-records ::v-deep .ant-table,body.dark .trading-records * ::v-deep .ant-table,body.dark .trading-records ::v-deep .ant-table,body.realdark .trading-records * ::v-deep .ant-table,body.realdark .trading-records ::v-deep .ant-table{background:#1e222d!important;color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-table table,.theme-dark .trading-records ::v-deep .ant-table table,body.dark .trading-records * ::v-deep .ant-table table,body.dark .trading-records ::v-deep .ant-table table,body.realdark .trading-records * ::v-deep .ant-table table,body.realdark .trading-records ::v-deep .ant-table table{background:#1e222d!important;color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-table-thead>tr>th,.theme-dark .trading-records ::v-deep .ant-table-thead>tr>th,body.dark .trading-records * ::v-deep .ant-table-thead>tr>th,body.dark .trading-records ::v-deep .ant-table-thead>tr>th,body.realdark .trading-records * ::v-deep .ant-table-thead>tr>th,body.realdark .trading-records ::v-deep .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records * ::v-deep .ant-table-tbody,.theme-dark .trading-records ::v-deep .ant-table-tbody,body.dark .trading-records * ::v-deep .ant-table-tbody,body.dark .trading-records ::v-deep .ant-table-tbody,body.realdark .trading-records * ::v-deep .ant-table-tbody,body.realdark .trading-records ::v-deep .ant-table-tbody{color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-table-tbody>tr>td,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td,body.dark .trading-records * ::v-deep .ant-table-tbody>tr>td,body.dark .trading-records ::v-deep .ant-table-tbody>tr>td,body.realdark .trading-records * ::v-deep .ant-table-tbody>tr>td,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td{background:#1e222d!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records * ::v-deep .ant-table-tbody>tr>td,.theme-dark .trading-records * ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),.theme-dark .trading-records * ::v-deep .ant-table-tbody>tr>td div,.theme-dark .trading-records * ::v-deep .ant-table-tbody>tr>td span,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td div,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td span,body.dark .trading-records * ::v-deep .ant-table-tbody>tr>td,body.dark .trading-records * ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),body.dark .trading-records * ::v-deep .ant-table-tbody>tr>td div,body.dark .trading-records * ::v-deep .ant-table-tbody>tr>td span,body.dark .trading-records ::v-deep .ant-table-tbody>tr>td,body.dark .trading-records ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),body.dark .trading-records ::v-deep .ant-table-tbody>tr>td div,body.dark .trading-records ::v-deep .ant-table-tbody>tr>td span,body.realdark .trading-records * ::v-deep .ant-table-tbody>tr>td,body.realdark .trading-records * ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),body.realdark .trading-records * ::v-deep .ant-table-tbody>tr>td div,body.realdark .trading-records * ::v-deep .ant-table-tbody>tr>td span,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td div,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td span{color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-table-tbody>tr:hover>td,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr:hover>td,body.dark .trading-records * ::v-deep .ant-table-tbody>tr:hover>td,body.dark .trading-records ::v-deep .ant-table-tbody>tr:hover>td,body.realdark .trading-records * ::v-deep .ant-table-tbody>tr:hover>td,body.realdark .trading-records ::v-deep .ant-table-tbody>tr:hover>td{background:#2a2e39!important}.theme-dark .trading-records * ::v-deep .ant-table-placeholder,.theme-dark .trading-records ::v-deep .ant-table-placeholder,body.dark .trading-records * ::v-deep .ant-table-placeholder,body.dark .trading-records ::v-deep .ant-table-placeholder,body.realdark .trading-records * ::v-deep .ant-table-placeholder,body.realdark .trading-records ::v-deep .ant-table-placeholder{background:#1e222d!important;color:#868993!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-item,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item{background:#1e222d!important;border-color:#363c4e!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item a,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item a,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item a,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item a,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-item a,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item a{color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover{border-color:#1890ff!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover a,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover a,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover a,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a{color:#1890ff!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active{background:#1890ff!important;border-color:#1890ff!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active a,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active a,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active a,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active a,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active a,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active a{color:#fff!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link{background:#1e222d!important;border-color:#363c4e!important;color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link{border-color:#1890ff!important;color:#1890ff!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector{background:#1e222d!important;border-color:#363c4e!important;color:#d1d4dc!important}.position-records[data-v-2abcf4f1]{width:100%;min-height:300px;padding:0}.position-records .empty-state[data-v-2abcf4f1]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;min-height:200px;padding:40px 0;background:linear-gradient(135deg,rgba(248,250,252,.5),rgba(241,245,249,.5));border-radius:12px;border:2px dashed #e0e6ed}.position-records[data-v-2abcf4f1] .ant-table{font-size:13px;color:#333}.position-records[data-v-2abcf4f1] .ant-table-body{overflow-x:auto;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.position-records[data-v-2abcf4f1] .ant-table-body::-webkit-scrollbar{height:6px;width:6px}.position-records[data-v-2abcf4f1] .ant-table-body::-webkit-scrollbar-track{background:transparent;border-radius:3px}.position-records[data-v-2abcf4f1] .ant-table-body::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.position-records[data-v-2abcf4f1] .ant-table-body::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.position-records[data-v-2abcf4f1] .ant-table-container{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.position-records[data-v-2abcf4f1] .ant-table-container::-webkit-scrollbar{height:6px;width:6px}.position-records[data-v-2abcf4f1] .ant-table-container::-webkit-scrollbar-track{background:transparent;border-radius:3px}.position-records[data-v-2abcf4f1] .ant-table-container::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.position-records[data-v-2abcf4f1] .ant-table-container::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.position-records[data-v-2abcf4f1] .ant-table-content,.position-records[data-v-2abcf4f1] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.position-records[data-v-2abcf4f1] .ant-table-content::-webkit-scrollbar,.position-records[data-v-2abcf4f1] .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.position-records[data-v-2abcf4f1] .ant-table-content::-webkit-scrollbar-track,.position-records[data-v-2abcf4f1] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.position-records[data-v-2abcf4f1] .ant-table-content::-webkit-scrollbar-thumb,.position-records[data-v-2abcf4f1] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.position-records[data-v-2abcf4f1] .ant-table-content::-webkit-scrollbar-thumb:hover,.position-records[data-v-2abcf4f1] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.position-records[data-v-2abcf4f1] .ant-table-thead>tr>th{background:-webkit-gradient(linear,left top,left bottom,from(#f8fafc),to(#f1f5f9));background:linear-gradient(180deg,#f8fafc,#f1f5f9);font-weight:600;color:#475569;border-bottom:2px solid #e2e8f0;padding:12px 16px;font-size:13px}.position-records[data-v-2abcf4f1] .ant-table-tbody>tr>td{padding:12px 16px;color:#334155;border-bottom:1px solid #f1f5f9;-webkit-transition:background .2s ease;transition:background .2s ease}.position-records[data-v-2abcf4f1] .ant-table-tbody>tr>td strong{color:#1e293b;font-weight:600}.position-records[data-v-2abcf4f1] .ant-table-tbody>tr:hover>td{background:#f0f7ff!important}.position-records[data-v-2abcf4f1] .ant-tag{border-radius:6px;padding:2px 10px;font-weight:600;font-size:11px;border:none}.position-records[data-v-2abcf4f1] .ant-tag[color=green]{background:linear-gradient(135deg,rgba(14,203,129,.15),rgba(14,203,129,.08));color:#0ecb81;border:1px solid rgba(14,203,129,.3)}.position-records[data-v-2abcf4f1] .ant-tag[color=red]{background:linear-gradient(135deg,rgba(246,70,93,.15),rgba(246,70,93,.08));color:#f6465d;border:1px solid rgba(246,70,93,.3)}.position-records.theme-dark[data-v-2abcf4f1] .ant-table,.theme-dark .position-records[data-v-2abcf4f1] .ant-table{background:#1e222d!important;color:#d1d4dc!important}.position-records.theme-dark[data-v-2abcf4f1] .ant-table-thead>tr>th,.theme-dark .position-records[data-v-2abcf4f1] .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important;font-weight:600}.position-records.theme-dark[data-v-2abcf4f1] .ant-table-tbody>tr>td,.theme-dark .position-records[data-v-2abcf4f1] .ant-table-tbody>tr>td{background:#1e222d!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.position-records.theme-dark[data-v-2abcf4f1] .ant-table-tbody>tr:hover>td,.theme-dark .position-records[data-v-2abcf4f1] .ant-table-tbody>tr:hover>td{background:#2a2e39!important}.position-records.theme-dark[data-v-2abcf4f1] .ant-table-tbody>tr>td strong,.theme-dark .position-records[data-v-2abcf4f1] .ant-table-tbody>tr>td strong{color:#d1d4dc!important}.position-records[data-v-2abcf4f1] .ant-table-tbody>tr:hover>td{background:#fafafa}.position-records[data-v-2abcf4f1] .ant-empty{margin:40px 0}.position-records[data-v-2abcf4f1] .ant-empty .ant-empty-description{color:#8c8c8c}.position-records .profit[data-v-2abcf4f1]{color:#0ecb81;font-weight:700;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;padding:2px 8px;background:linear-gradient(135deg,rgba(14,203,129,.12),rgba(14,203,129,.06));border-radius:6px}.position-records .profit[data-v-2abcf4f1]:before{content:"▲";font-size:8px}.position-records .loss[data-v-2abcf4f1]{color:#f6465d;font-weight:700;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;padding:2px 8px;background:linear-gradient(135deg,rgba(246,70,93,.12),rgba(246,70,93,.06));border-radius:6px}.position-records .loss[data-v-2abcf4f1]:before{content:"▼";font-size:8px}@media (max-width:768px){.position-records[data-v-2abcf4f1]{min-height:200px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.position-records[data-v-2abcf4f1]::-webkit-scrollbar{height:4px;width:4px}.position-records[data-v-2abcf4f1]::-webkit-scrollbar-track{background:transparent;border-radius:2px}.position-records[data-v-2abcf4f1]::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:2px}.position-records[data-v-2abcf4f1]::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.position-records .empty-state[data-v-2abcf4f1]{min-height:150px;padding:20px 0}.position-records[data-v-2abcf4f1] .ant-table{font-size:12px;min-width:700px}.position-records[data-v-2abcf4f1] .ant-table-body,.position-records[data-v-2abcf4f1] .ant-table-container,.position-records[data-v-2abcf4f1] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.position-records[data-v-2abcf4f1] .ant-table-body::-webkit-scrollbar,.position-records[data-v-2abcf4f1] .ant-table-container::-webkit-scrollbar,.position-records[data-v-2abcf4f1] .ant-table-wrapper::-webkit-scrollbar{height:4px;width:4px}.position-records[data-v-2abcf4f1] .ant-table-body::-webkit-scrollbar-track,.position-records[data-v-2abcf4f1] .ant-table-container::-webkit-scrollbar-track,.position-records[data-v-2abcf4f1] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:2px}.position-records[data-v-2abcf4f1] .ant-table-body::-webkit-scrollbar-thumb,.position-records[data-v-2abcf4f1] .ant-table-container::-webkit-scrollbar-thumb,.position-records[data-v-2abcf4f1] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:2px}.position-records[data-v-2abcf4f1] .ant-table-body::-webkit-scrollbar-thumb:hover,.position-records[data-v-2abcf4f1] .ant-table-container::-webkit-scrollbar-thumb:hover,.position-records[data-v-2abcf4f1] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.position-records[data-v-2abcf4f1] .ant-table-tbody>tr>td,.position-records[data-v-2abcf4f1] .ant-table-thead>tr>th{padding:8px 10px;font-size:11px;white-space:nowrap}.position-records[data-v-2abcf4f1] .ant-empty{margin:20px 0}}@media (max-width:480px){.position-records[data-v-2abcf4f1] .ant-table{font-size:11px;min-width:600px}.position-records[data-v-2abcf4f1] .ant-table-tbody>tr>td,.position-records[data-v-2abcf4f1] .ant-table-thead>tr>th{padding:6px 8px;font-size:10px}.position-records .loss[data-v-2abcf4f1],.position-records .profit[data-v-2abcf4f1]{font-size:11px}}.theme-dark .position-records .ant-table-tbody>tr>td,.theme-dark .position-records[data-v] .ant-table-tbody>tr>td,body.dark .position-records .ant-table-tbody>tr>td,body.realdark .position-records .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1e222d!important;border-bottom-color:#363c4e!important}.theme-dark .position-records .ant-table-thead>tr>th,.theme-dark .position-records[data-v] .ant-table-thead>tr>th,body.dark .position-records .ant-table-thead>tr>th,body.realdark .position-records .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important;font-weight:600!important}.theme-dark .position-records .ant-table,.theme-dark .position-records[data-v] .ant-table,body.dark .position-records .ant-table,body.realdark .position-records .ant-table{background:#1e222d!important;color:#d1d4dc!important}.theme-dark .position-records .ant-table-tbody>tr>td *,.theme-dark .position-records[data-v] .ant-table-tbody>tr>td *,body.dark .position-records .ant-table-tbody>tr>td *,body.realdark .position-records .ant-table-tbody>tr>td *{color:#d1d4dc!important}.theme-dark .position-records .ant-table-tbody>tr:hover>td,.theme-dark .position-records[data-v] .ant-table-tbody>tr:hover>td,body.dark .position-records .ant-table-tbody>tr:hover>td,body.realdark .position-records .ant-table-tbody>tr:hover>td{background:#2a2e39!important}.theme-dark .position-records .ant-table-thead>tr>th .ant-table-column-title,.theme-dark .position-records[data-v] .ant-table-thead>tr>th .ant-table-column-title,body.dark .position-records .ant-table-thead>tr>th .ant-table-column-title,body.realdark .position-records .ant-table-thead>tr>th .ant-table-column-title{color:#d1d4dc!important}.theme-dark .position-records[data-v] .ant-table-tbody>tr>td,.theme-dark [class*=position-records][data-v] .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1e222d!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v] .ant-table-thead>tr>th,.theme-dark [class*=position-records][data-v] .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v-6c1eb557] .ant-table-tbody>tr>td,.theme-dark [data-v-6c1eb557] .ant-table-tbody>tr>td,.theme-dark [data-v-6c1eb557] .position-records .ant-table-tbody>tr>td,.theme-dark [data-v-6c1eb557].position-records .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1e222d!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v-6c1eb557] .ant-table-thead>tr>th,.theme-dark [data-v-6c1eb557].position-records .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v-6c1eb557] .ant-table,.theme-dark [data-v-6c1eb557].position-records .ant-table{background:#1e222d!important;color:#d1d4dc!important}.theme-dark .position-records[data-v-6c1eb557] .ant-table-tbody>tr:hover>td,.theme-dark [data-v-6c1eb557].position-records .ant-table-tbody>tr:hover>td{background:#2a2e39!important}body.dark .position-records[data-v-6c1eb557] .ant-table-tbody>tr>td,body.dark [data-v-6c1eb557] .ant-table-tbody>tr>td,body.dark [data-v-6c1eb557] .position-records .ant-table-tbody>tr>td,body.dark [data-v-6c1eb557].position-records .ant-table-tbody>tr>td,body.realdark .position-records[data-v-6c1eb557] .ant-table-tbody>tr>td,body.realdark [data-v-6c1eb557] .ant-table-tbody>tr>td,body.realdark [data-v-6c1eb557] .position-records .ant-table-tbody>tr>td,body.realdark [data-v-6c1eb557].position-records .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1e222d!important;border-bottom-color:#363c4e!important}body.dark .position-records[data-v-6c1eb557] .ant-table-thead>tr>th,body.dark [data-v-6c1eb557] .ant-table-thead>tr>th,body.dark [data-v-6c1eb557] .position-records .ant-table-thead>tr>th,body.dark [data-v-6c1eb557].position-records .ant-table-thead>tr>th,body.realdark .position-records[data-v-6c1eb557] .ant-table-thead>tr>th,body.realdark [data-v-6c1eb557] .ant-table-thead>tr>th,body.realdark [data-v-6c1eb557] .position-records .ant-table-thead>tr>th,body.realdark [data-v-6c1eb557].position-records .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v] .ant-table-tbody>tr>td,body.dark .position-records[data-v] .ant-table-tbody>tr>td,body.realdark .position-records[data-v] .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1e222d!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v] .ant-table-thead>tr>th,body.dark .position-records[data-v] .ant-table-thead>tr>th,body.realdark .position-records[data-v] .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v-6c1eb557] .ant-empty .ant-empty-description,body.dark .position-records[data-v-6c1eb557] .ant-empty .ant-empty-description,body.realdark .position-records[data-v-6c1eb557] .ant-empty .ant-empty-description{color:#868993!important}.theme-dark .position-records[data-v-6c1eb557] .profit,body.dark .position-records[data-v-6c1eb557] .profit,body.realdark .position-records[data-v-6c1eb557] .profit{color:#52c41a!important}.theme-dark .position-records[data-v-6c1eb557] .loss,body.dark .position-records[data-v-6c1eb557] .loss,body.realdark .position-records[data-v-6c1eb557] .loss{color:#ff4d4f!important}.theme-dark .trading-assistant .position-records[data-v-6c1eb557] .ant-table-tbody>tr>td,.theme-dark .trading-assistant [data-v-6c1eb557].position-records .ant-table-tbody>tr>td,body.dark .trading-assistant .position-records[data-v-6c1eb557] .ant-table-tbody>tr>td,body.dark .trading-assistant [data-v-6c1eb557].position-records .ant-table-tbody>tr>td,body.realdark .trading-assistant .position-records[data-v-6c1eb557] .ant-table-tbody>tr>td,body.realdark .trading-assistant [data-v-6c1eb557].position-records .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1e222d!important;border-bottom-color:#363c4e!important}.theme-dark .trading-assistant .position-records[data-v-6c1eb557] .ant-table-thead>tr>th,.theme-dark .trading-assistant [data-v-6c1eb557].position-records .ant-table-thead>tr>th,body.dark .trading-assistant .position-records[data-v-6c1eb557] .ant-table-thead>tr>th,body.dark .trading-assistant [data-v-6c1eb557].position-records .ant-table-thead>tr>th,body.realdark .trading-assistant .position-records[data-v-6c1eb557] .ant-table-thead>tr>th,body.realdark .trading-assistant [data-v-6c1eb557].position-records .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v-6c1eb557] .ant-table-body,.theme-dark .position-records[data-v-6c1eb557] .ant-table-container,.theme-dark .position-records[data-v-6c1eb557] .ant-table-content,.theme-dark .position-records[data-v-6c1eb557] .ant-table-wrapper,body.dark .position-records[data-v-6c1eb557] .ant-table-body,body.dark .position-records[data-v-6c1eb557] .ant-table-container,body.dark .position-records[data-v-6c1eb557] .ant-table-content,body.dark .position-records[data-v-6c1eb557] .ant-table-wrapper,body.realdark .position-records[data-v-6c1eb557] .ant-table-body,body.realdark .position-records[data-v-6c1eb557] .ant-table-container,body.realdark .position-records[data-v-6c1eb557] .ant-table-content,body.realdark .position-records[data-v-6c1eb557] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(209,212,220,.3) transparent}.theme-dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar,.theme-dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar,.theme-dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar,.theme-dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar,body.dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar,body.dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar,body.dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar,body.dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar,body.realdark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar,body.realdark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar,body.realdark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar,body.realdark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.theme-dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-track,.theme-dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-track,.theme-dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-track,.theme-dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-track,body.dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-track,body.dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-track,body.dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-track,body.dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-track,body.realdark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-track,body.realdark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-track,body.realdark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-track,body.realdark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.theme-dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-thumb,.theme-dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-thumb,.theme-dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-thumb,.theme-dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-thumb,body.dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-thumb,body.dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-thumb,body.dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-thumb,body.dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-thumb,body.realdark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-thumb,body.realdark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-thumb,body.realdark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-thumb,body.realdark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(209,212,220,.3);border-radius:3px}.theme-dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-thumb:hover,.theme-dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-thumb:hover,.theme-dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-thumb:hover,.theme-dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(209,212,220,.5)}.theme-dark .position-records[data-v] .ant-table-body,.theme-dark .position-records[data-v] .ant-table-container,.theme-dark .position-records[data-v] .ant-table-content,.theme-dark .position-records[data-v] .ant-table-wrapper,body.dark .position-records[data-v] .ant-table-body,body.dark .position-records[data-v] .ant-table-container,body.dark .position-records[data-v] .ant-table-content,body.dark .position-records[data-v] .ant-table-wrapper,body.realdark .position-records[data-v] .ant-table-body,body.realdark .position-records[data-v] .ant-table-container,body.realdark .position-records[data-v] .ant-table-content,body.realdark .position-records[data-v] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(209,212,220,.3) transparent}.theme-dark .position-records[data-v] .ant-table-body::-webkit-scrollbar,.theme-dark .position-records[data-v] .ant-table-container::-webkit-scrollbar,.theme-dark .position-records[data-v] .ant-table-content::-webkit-scrollbar,.theme-dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar,body.dark .position-records[data-v] .ant-table-body::-webkit-scrollbar,body.dark .position-records[data-v] .ant-table-container::-webkit-scrollbar,body.dark .position-records[data-v] .ant-table-content::-webkit-scrollbar,body.dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar,body.realdark .position-records[data-v] .ant-table-body::-webkit-scrollbar,body.realdark .position-records[data-v] .ant-table-container::-webkit-scrollbar,body.realdark .position-records[data-v] .ant-table-content::-webkit-scrollbar,body.realdark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.theme-dark .position-records[data-v] .ant-table-body::-webkit-scrollbar-track,.theme-dark .position-records[data-v] .ant-table-container::-webkit-scrollbar-track,.theme-dark .position-records[data-v] .ant-table-content::-webkit-scrollbar-track,.theme-dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-track,body.dark .position-records[data-v] .ant-table-body::-webkit-scrollbar-track,body.dark .position-records[data-v] .ant-table-container::-webkit-scrollbar-track,body.dark .position-records[data-v] .ant-table-content::-webkit-scrollbar-track,body.dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-track,body.realdark .position-records[data-v] .ant-table-body::-webkit-scrollbar-track,body.realdark .position-records[data-v] .ant-table-container::-webkit-scrollbar-track,body.realdark .position-records[data-v] .ant-table-content::-webkit-scrollbar-track,body.realdark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.theme-dark .position-records[data-v] .ant-table-body::-webkit-scrollbar-thumb,.theme-dark .position-records[data-v] .ant-table-container::-webkit-scrollbar-thumb,.theme-dark .position-records[data-v] .ant-table-content::-webkit-scrollbar-thumb,.theme-dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb,body.dark .position-records[data-v] .ant-table-body::-webkit-scrollbar-thumb,body.dark .position-records[data-v] .ant-table-container::-webkit-scrollbar-thumb,body.dark .position-records[data-v] .ant-table-content::-webkit-scrollbar-thumb,body.dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb,body.realdark .position-records[data-v] .ant-table-body::-webkit-scrollbar-thumb,body.realdark .position-records[data-v] .ant-table-container::-webkit-scrollbar-thumb,body.realdark .position-records[data-v] .ant-table-content::-webkit-scrollbar-thumb,body.realdark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(209,212,220,.3);border-radius:3px}.theme-dark .position-records[data-v] .ant-table-body::-webkit-scrollbar-thumb:hover,.theme-dark .position-records[data-v] .ant-table-container::-webkit-scrollbar-thumb:hover,.theme-dark .position-records[data-v] .ant-table-content::-webkit-scrollbar-thumb:hover,.theme-dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v] .ant-table-body::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v] .ant-table-container::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v] .ant-table-content::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v] .ant-table-body::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v] .ant-table-container::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v] .ant-table-content::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(209,212,220,.5)}.strategy-type-selector[data-v-1cfbbafc]{padding:8px 0}.selector-header[data-v-1cfbbafc]{text-align:center;margin-bottom:24px}.selector-header h3[data-v-1cfbbafc]{margin:0 0 4px;font-size:18px;font-weight:600}.selector-header .selector-hint[data-v-1cfbbafc]{color:#999;font-size:13px;margin:0}.mode-cards[data-v-1cfbbafc]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:16px}@media (max-width:768px){.mode-cards[data-v-1cfbbafc]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.mode-card[data-v-1cfbbafc]{-webkit-box-flex:1;-ms-flex:1;flex:1;border:2px solid #f0f0f0;border-radius:12px;padding:24px;cursor:pointer;-webkit-transition:all .3s;transition:all .3s;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center;position:relative;overflow:hidden}.mode-card[data-v-1cfbbafc]:hover{border-color:#1890ff;-webkit-box-shadow:0 4px 16px rgba(24,144,255,.12);box-shadow:0 4px 16px rgba(24,144,255,.12);-webkit-transform:translateY(-2px);transform:translateY(-2px)}.mode-card.selected[data-v-1cfbbafc]{border-color:#1890ff;background:rgba(24,144,255,.02)}.mode-card.selected[data-v-1cfbbafc]:after{content:"✓";position:absolute;top:8px;right:12px;color:#1890ff;font-size:18px;font-weight:700}.card-icon[data-v-1cfbbafc]{width:56px;height:56px;border-radius:14px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;font-size:26px;margin-bottom:16px}.card-icon.signal-icon[data-v-1cfbbafc]{background:linear-gradient(135deg,#e6f7ff,#bae7ff);color:#1890ff}.card-icon.script-icon[data-v-1cfbbafc]{background:linear-gradient(135deg,#f6ffed,#d9f7be);color:#52c41a}.card-body[data-v-1cfbbafc]{-webkit-box-flex:1;-ms-flex:1;flex:1}.card-body .card-badge-row[data-v-1cfbbafc]{margin-bottom:10px}.card-body .card-badge[data-v-1cfbbafc]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:3px 10px;border-radius:999px;background:rgba(24,144,255,.08);color:#1890ff;font-size:12px;font-weight:600;line-height:1.4}.card-body .card-badge.card-badge--script[data-v-1cfbbafc]{background:rgba(82,196,26,.12);color:#389e0d}.card-body h4[data-v-1cfbbafc]{font-size:16px;font-weight:600;margin:0 0 8px}.card-body .card-desc[data-v-1cfbbafc]{color:#666;font-size:13px;line-height:1.5;margin-bottom:12px}.card-features[data-v-1cfbbafc]{list-style:none;padding:0;margin:0 0 16px;text-align:left}.card-features li[data-v-1cfbbafc]{font-size:13px;color:#555;padding:3px 0}.card-features li .anticon[data-v-1cfbbafc]{color:#52c41a;margin-right:6px;font-size:12px}.card-btn[data-v-1cfbbafc]{width:100%}.template-quick-start[data-v-1cfbbafc]{margin-top:8px}.template-quick-start .divider-text[data-v-1cfbbafc]{color:#999;font-size:13px}.template-tags[data-v-1cfbbafc]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:8px}.template-tag[data-v-1cfbbafc]{cursor:pointer;padding:4px 12px;font-size:13px;border-radius:16px;-webkit-transition:all .2s;transition:all .2s}.template-tag .tpl-icon[data-v-1cfbbafc]{margin-right:4px}.template-tag[data-v-1cfbbafc]:hover{color:#1890ff;border-color:#1890ff;background:#e6f7ff}.theme-dark .selector-header h3[data-v-1cfbbafc]{color:#e0e6ed}.theme-dark .selector-header .selector-hint[data-v-1cfbbafc]{color:hsla(0,0%,100%,.4)}.theme-dark .mode-card[data-v-1cfbbafc]{border-color:hsla(0,0%,100%,.08);background:#1a1e28}.theme-dark .mode-card[data-v-1cfbbafc]:hover{border-color:#177ddc;-webkit-box-shadow:0 4px 16px rgba(23,125,220,.2);box-shadow:0 4px 16px rgba(23,125,220,.2)}.theme-dark .mode-card.selected[data-v-1cfbbafc]{border-color:#177ddc;background:rgba(23,125,220,.06)}.theme-dark .mode-card.selected[data-v-1cfbbafc]:after{color:#40a9ff}.theme-dark .card-icon.signal-icon[data-v-1cfbbafc]{background:linear-gradient(135deg,rgba(24,144,255,.15),rgba(24,144,255,.08));color:#40a9ff}.theme-dark .card-icon.script-icon[data-v-1cfbbafc]{background:linear-gradient(135deg,rgba(82,196,26,.15),rgba(82,196,26,.08));color:#73d13d}.theme-dark .card-body h4[data-v-1cfbbafc]{color:#e0e6ed}.theme-dark .card-body .card-desc[data-v-1cfbbafc]{color:hsla(0,0%,100%,.45)}.theme-dark .card-body .card-badge[data-v-1cfbbafc]{background:rgba(64,169,255,.12);color:#69c0ff}.theme-dark .card-body .card-badge.card-badge--script[data-v-1cfbbafc]{background:rgba(115,209,61,.16);color:#95de64}.theme-dark .card-features li[data-v-1cfbbafc]{color:hsla(0,0%,100%,.6)}.theme-dark .card-features li .anticon[data-v-1cfbbafc]{color:#73d13d}.theme-dark .card-btn[data-v-1cfbbafc]{border-color:rgba(24,144,255,.4);color:#40a9ff}.theme-dark .card-btn[data-v-1cfbbafc]:hover{border-color:#1890ff;color:#1890ff}.theme-dark .template-quick-start[data-v-1cfbbafc] .ant-divider-inner-text{color:hsla(0,0%,100%,.35)}.theme-dark .template-quick-start[data-v-1cfbbafc] .ant-divider:after,.theme-dark .template-quick-start[data-v-1cfbbafc] .ant-divider:before{border-top-color:hsla(0,0%,100%,.08)}.theme-dark .divider-text[data-v-1cfbbafc]{color:hsla(0,0%,100%,.35)}.theme-dark .template-tag[data-v-1cfbbafc]{background:hsla(0,0%,100%,.04);border-color:hsla(0,0%,100%,.1);color:hsla(0,0%,100%,.65)}.theme-dark .template-tag[data-v-1cfbbafc]:hover{color:#40a9ff;border-color:#177ddc;background:rgba(23,125,220,.1)}.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:transparent}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:transparent}.cm-fat-cursor{caret-color:transparent}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative;z-index:0}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none;outline:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-webkit-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}.cm-s-monokai.CodeMirror{background:#272822;color:#f8f8f2}.cm-s-monokai div.CodeMirror-selected{background:#49483e}.cm-s-monokai .CodeMirror-line::selection,.cm-s-monokai .CodeMirror-line>span::selection,.cm-s-monokai .CodeMirror-line>span>span::selection{background:rgba(73,72,62,.99)}.cm-s-monokai .CodeMirror-line::-moz-selection,.cm-s-monokai .CodeMirror-line>span::-moz-selection,.cm-s-monokai .CodeMirror-line>span>span::-moz-selection{background:rgba(73,72,62,.99)}.cm-s-monokai .CodeMirror-gutters{background:#272822;border-right:0}.cm-s-monokai .CodeMirror-guttermarker{color:#fff}.cm-s-monokai .CodeMirror-guttermarker-subtle,.cm-s-monokai .CodeMirror-linenumber{color:#d0d0d0}.cm-s-monokai .CodeMirror-cursor{border-left:1px solid #f8f8f0}.cm-s-monokai span.cm-comment{color:#75715e}.cm-s-monokai span.cm-atom,.cm-s-monokai span.cm-number{color:#ae81ff}.cm-s-monokai span.cm-comment.cm-attribute{color:#97b757}.cm-s-monokai span.cm-comment.cm-def{color:#bc9262}.cm-s-monokai span.cm-comment.cm-tag{color:#bc6283}.cm-s-monokai span.cm-comment.cm-type{color:#5998a6}.cm-s-monokai span.cm-attribute,.cm-s-monokai span.cm-property{color:#a6e22e}.cm-s-monokai span.cm-keyword{color:#f92672}.cm-s-monokai span.cm-builtin{color:#66d9ef}.cm-s-monokai span.cm-string{color:#e6db74}.cm-s-monokai span.cm-variable{color:#f8f8f2}.cm-s-monokai span.cm-variable-2{color:#9effff}.cm-s-monokai span.cm-type,.cm-s-monokai span.cm-variable-3{color:#66d9ef}.cm-s-monokai span.cm-def{color:#fd971f}.cm-s-monokai span.cm-bracket{color:#f8f8f2}.cm-s-monokai span.cm-tag{color:#f92672}.cm-s-monokai span.cm-header,.cm-s-monokai span.cm-link{color:#ae81ff}.cm-s-monokai span.cm-error{background:#f92672;color:#f8f8f0}.cm-s-monokai .CodeMirror-activeline-background{background:#373831}.cm-s-monokai .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.cm-s-eclipse span.cm-meta{color:#ff1717}.cm-s-eclipse span.cm-keyword{line-height:1em;font-weight:700;color:#7f0055}.cm-s-eclipse span.cm-atom{color:#219}.cm-s-eclipse span.cm-number{color:#164}.cm-s-eclipse span.cm-def{color:#00f}.cm-s-eclipse span.cm-variable{color:#000}.cm-s-eclipse span.cm-type,.cm-s-eclipse span.cm-variable-2,.cm-s-eclipse span.cm-variable-3{color:#0000c0}.cm-s-eclipse span.cm-operator,.cm-s-eclipse span.cm-property{color:#000}.cm-s-eclipse span.cm-comment{color:#3f7f5f}.cm-s-eclipse span.cm-string{color:#2a00ff}.cm-s-eclipse span.cm-string-2{color:#f50}.cm-s-eclipse span.cm-qualifier{color:#555}.cm-s-eclipse span.cm-builtin{color:#30a}.cm-s-eclipse span.cm-bracket{color:#cc7}.cm-s-eclipse span.cm-tag{color:#170}.cm-s-eclipse span.cm-attribute{color:#00c}.cm-s-eclipse span.cm-link{color:#219}.cm-s-eclipse span.cm-error{color:red}.cm-s-eclipse .CodeMirror-activeline-background{background:#e8f2ff}.cm-s-eclipse .CodeMirror-matchingbracket{outline:1px solid grey;color:#000!important}.strategy-editor[data-v-6c7c8660]{width:100%}.editor-layout[data-v-6c7c8660]{min-height:450px}.code-section[data-v-6c7c8660]{border:1px solid #e8e8e8;border-radius:8px;overflow:hidden}.section-header[data-v-6c7c8660]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:8px 12px;background:#fafafa;border-bottom:1px solid #e8e8e8}.section-header[data-v-6c7c8660],.section-title-wrap[data-v-6c7c8660]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.section-title-wrap[data-v-6c7c8660]{gap:8px;min-width:0}.section-title[data-v-6c7c8660]{font-weight:600;font-size:14px}.section-title .anticon[data-v-6c7c8660]{margin-right:6px}.current-template-tag[data-v-6c7c8660]{margin-right:0}.verify-btn[data-v-6c7c8660]{color:#52c41a;font-weight:600}.code-editor-container[data-v-6c7c8660]{height:420px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.code-editor-container[data-v-6c7c8660] .CodeMirror{-webkit-box-flex:1;-ms-flex:1;flex:1;height:100%;font-family:Courier New,Consolas,Liberation Mono,Menlo,monospace;font-size:13px;line-height:1.6;background:#fff}.code-editor-container[data-v-6c7c8660] .CodeMirror-scroll{min-height:100%;overflow-x:auto!important;overflow-y:auto!important}.code-editor-container[data-v-6c7c8660] .CodeMirror-gutters{min-width:48px;border-right:1px solid #e8e8e8;background:-webkit-gradient(linear,left top,right top,from(#fafafa),to(#f5f5f5));background:linear-gradient(90deg,#fafafa 0,#f5f5f5)}.code-editor-container[data-v-6c7c8660] .CodeMirror-linenumbers{width:44px!important}.code-editor-container[data-v-6c7c8660] .CodeMirror-linenumber{min-width:36px;padding:0 8px 0 0;text-align:right;color:#999;font-size:12px}.code-editor-container[data-v-6c7c8660] .CodeMirror-sizer{margin-left:0!important;min-height:100%!important}.code-editor-container[data-v-6c7c8660] .CodeMirror-lines{padding:12px 0}.code-editor-container[data-v-6c7c8660] .CodeMirror pre.CodeMirror-line,.code-editor-container[data-v-6c7c8660] .CodeMirror pre.CodeMirror-line-like{padding:0 12px 0 12px}.code-editor-container[data-v-6c7c8660] .CodeMirror-cursor{border-left:2px solid #1890ff}.side-tabs[data-v-6c7c8660]{height:100%}.side-tabs[data-v-6c7c8660] .ant-tabs-content{height:calc(100% - 40px);overflow-y:auto}.panel-intro[data-v-6c7c8660]{margin-bottom:12px;padding:12px;border-radius:8px;background:#fafafa;border:1px solid #f0f0f0}.panel-intro__title[data-v-6c7c8660]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;font-size:14px;font-weight:600;color:#262626}.panel-intro__desc[data-v-6c7c8660]{margin-top:4px;font-size:12px;line-height:1.6;color:#8c8c8c}.template-list[data-v-6c7c8660]{padding:4px 0}.template-item[data-v-6c7c8660]{padding:12px;border:1px solid #f0f0f0;border-radius:8px;margin-bottom:8px;cursor:pointer;-webkit-transition:all .2s;transition:all .2s}.template-item.active[data-v-6c7c8660],.template-item[data-v-6c7c8660]:hover{border-color:#1890ff;background:#fafafa}.template-item .tpl-header[data-v-6c7c8660]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:4px}.template-item .tpl-icon[data-v-6c7c8660]{font-size:16px;margin-right:8px}.template-item .tpl-name[data-v-6c7c8660]{font-weight:600;font-size:14px}.template-item .tpl-desc[data-v-6c7c8660]{font-size:12px;color:#888;margin:0 0 4px}.template-item .tpl-use-btn[data-v-6c7c8660]{padding:0;font-size:12px}.params-tip[data-v-6c7c8660]{margin-bottom:12px}.param-list[data-v-6c7c8660]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px}.param-item[data-v-6c7c8660]{padding:12px;border:1px solid #f0f0f0;border-radius:8px;background:#fff}.param-item__label-row[data-v-6c7c8660]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px;margin-bottom:4px}.param-item__label[data-v-6c7c8660]{font-size:13px;font-weight:600;color:#262626}.param-item__type[data-v-6c7c8660]{font-size:11px;color:#8c8c8c}.param-item__desc[data-v-6c7c8660]{margin-bottom:8px;font-size:12px;line-height:1.5;color:#8c8c8c}.param-item__switch[data-v-6c7c8660]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.params-actions[data-v-6c7c8660]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;gap:8px;margin-top:16px}.ai-suggestions[data-v-6c7c8660]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;margin-bottom:10px}.prompt-tag[data-v-6c7c8660]{cursor:pointer}.ai-status[data-v-6c7c8660]{margin-top:8px;color:#1890ff;font-size:13px;text-align:center}.docs-content[data-v-6c7c8660]{font-size:13px;line-height:1.6}.docs-content[data-v-6c7c8660] h4{font-size:16px;font-weight:600;margin-bottom:12px}.docs-content[data-v-6c7c8660] h5{font-size:14px;font-weight:600;margin:16px 0 8px;color:#1890ff}.docs-content[data-v-6c7c8660] pre{background:#f6f8fa;padding:12px;border-radius:6px;overflow-x:auto;font-size:12px;line-height:1.5}.docs-content[data-v-6c7c8660] code{font-family:Courier New,Consolas,monospace}.theme-dark .code-section[data-v-6c7c8660]{border-color:hsla(0,0%,100%,.1)}.theme-dark .section-header[data-v-6c7c8660]{background:#1a1e28;border-color:hsla(0,0%,100%,.1)}.theme-dark .section-title[data-v-6c7c8660]{color:#e0e6ed}.theme-dark .side-tabs[data-v-6c7c8660] .ant-tabs-nav .ant-tabs-tab{color:hsla(0,0%,100%,.55)}.theme-dark .side-tabs[data-v-6c7c8660] .ant-tabs-nav .ant-tabs-tab:hover{color:hsla(0,0%,100%,.85)}.theme-dark .side-tabs[data-v-6c7c8660] .ant-tabs-nav .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn{color:#1890ff}.theme-dark .side-tabs[data-v-6c7c8660] .ant-tabs-bar{border-bottom-color:hsla(0,0%,100%,.08)}.theme-dark .panel-intro[data-v-6c7c8660]{background:#1a1e28;border-color:hsla(0,0%,100%,.08)}.theme-dark .panel-intro__title[data-v-6c7c8660],.theme-dark .param-item__label[data-v-6c7c8660]{color:#e0e6ed}.theme-dark .panel-intro__desc[data-v-6c7c8660],.theme-dark .param-item__desc[data-v-6c7c8660],.theme-dark .param-item__type[data-v-6c7c8660]{color:hsla(0,0%,100%,.45)}.theme-dark .param-item[data-v-6c7c8660],.theme-dark .template-item[data-v-6c7c8660]{border-color:hsla(0,0%,100%,.08);background:#1a1e28}.theme-dark .template-item.active[data-v-6c7c8660],.theme-dark .template-item[data-v-6c7c8660]:hover{border-color:#177ddc;background:rgba(23,125,220,.06)}.theme-dark .tpl-name[data-v-6c7c8660]{color:#e0e6ed}.theme-dark .tpl-desc[data-v-6c7c8660]{color:hsla(0,0%,100%,.4)}.theme-dark .prompt-tag[data-v-6c7c8660]{background:hsla(0,0%,100%,.04);border-color:hsla(0,0%,100%,.1);color:hsla(0,0%,100%,.7)}.theme-dark[data-v-6c7c8660] .ant-input,.theme-dark[data-v-6c7c8660] .ant-input-number,.theme-dark[data-v-6c7c8660] .ant-input-number-input,.theme-dark[data-v-6c7c8660] .ant-select-selection,.theme-dark[data-v-6c7c8660] .ant-select-selection--single,.theme-dark[data-v-6c7c8660] textarea.ant-input{background:#141821!important;border-color:hsla(0,0%,100%,.1)!important;color:#d1d4dc!important}.theme-dark[data-v-6c7c8660] .ant-select-selection-placeholder,.theme-dark[data-v-6c7c8660] .ant-select-selection-selected-value{color:#d1d4dc!important}.theme-dark .ai-status[data-v-6c7c8660]{color:#40a9ff}.theme-dark .docs-content[data-v-6c7c8660]{color:hsla(0,0%,100%,.75)}.theme-dark .docs-content[data-v-6c7c8660] h4{color:#e0e6ed}.theme-dark .docs-content[data-v-6c7c8660] h5{color:#40a9ff}.theme-dark .docs-content[data-v-6c7c8660] pre{background:#141821;color:hsla(0,0%,100%,.7);border:1px solid hsla(0,0%,100%,.06)}.theme-dark .code-editor-container[data-v-6c7c8660] .CodeMirror{background:#0f141c;color:#d1d4dc}.theme-dark .code-editor-container[data-v-6c7c8660] .CodeMirror-gutters{border-right-color:hsla(0,0%,100%,.08);background:-webkit-gradient(linear,left top,right top,from(#151922),to(#1a1e28));background:linear-gradient(90deg,#151922 0,#1a1e28)}.theme-dark .code-editor-container[data-v-6c7c8660] .CodeMirror-linenumber{color:hsla(0,0%,100%,.32)}.performance-analysis[data-v-192d71db]{padding:4px 0}.metrics-grid[data-v-192d71db]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:20px}@media (max-width:768px){.metrics-grid[data-v-192d71db]{grid-template-columns:repeat(2,1fr)}}.metric-card[data-v-192d71db]{background:#fafafa;border-radius:8px;padding:12px 16px;text-align:center}.metric-card.positive .metric-value[data-v-192d71db]{color:#52c41a}.metric-card.negative .metric-value[data-v-192d71db]{color:#ff4d4f}.metric-card .metric-label[data-v-192d71db]{font-size:12px;color:#999;margin-bottom:4px}.metric-card .metric-value[data-v-192d71db]{font-size:18px;font-weight:700;font-variant-numeric:tabular-nums}.chart-section[data-v-192d71db]{margin-bottom:20px}.chart-section .chart-title[data-v-192d71db]{font-size:14px;font-weight:600;margin-bottom:8px;padding-left:4px}.chart-container[data-v-192d71db]{width:100%;height:300px;border-radius:8px;overflow:hidden}.theme-dark .metrics-grid .metric-card[data-v-192d71db]{background:#1a1e28;border:1px solid hsla(0,0%,100%,.06)}.theme-dark .metrics-grid .metric-card .metric-label[data-v-192d71db]{color:hsla(0,0%,100%,.4)}.theme-dark .metrics-grid .metric-card .metric-value[data-v-192d71db]{color:#e0e6ed}.theme-dark .metrics-grid .metric-card.positive .metric-value[data-v-192d71db]{color:#52c41a}.theme-dark .metrics-grid .metric-card.negative .metric-value[data-v-192d71db]{color:#ff4d4f}.theme-dark .chart-section .chart-title[data-v-192d71db]{color:#e0e6ed}.theme-dark .chart-container[data-v-192d71db]{background:#141821;border:1px solid hsla(0,0%,100%,.06)}.theme-dark[data-v-192d71db] .ant-empty-description{color:hsla(0,0%,100%,.35)}.strategy-logs[data-v-129fed65]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%}.logs-toolbar[data-v-129fed65]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:8px 0;margin-bottom:8px}.logs-toolbar .toolbar-right[data-v-129fed65],.logs-toolbar[data-v-129fed65]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.logs-toolbar .toolbar-right[data-v-129fed65]{gap:6px}.logs-toolbar .toolbar-right .auto-refresh-label[data-v-129fed65]{font-size:12px;color:#999}.logs-container[data-v-129fed65]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-height:300px;max-height:500px;overflow-y:auto;border:1px solid #f0f0f0;border-radius:8px;padding:8px;font-family:Fira Code,Consolas,monospace;font-size:12px;line-height:1.7;background:#fafafa}.logs-empty[data-v-129fed65]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:200px;color:#ccc}.logs-empty p[data-v-129fed65]{margin-top:8px;font-family:-apple-system,BlinkMacSystemFont,sans-serif}.log-entry[data-v-129fed65]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:8px;padding:2px 4px;border-radius:3px}.log-entry[data-v-129fed65]:hover{background:rgba(0,0,0,.02)}.log-entry.level-error[data-v-129fed65]{background:rgba(255,77,79,.04)}.log-entry.level-trade[data-v-129fed65]{background:rgba(82,196,26,.04)}.log-time[data-v-129fed65]{color:#999;white-space:nowrap;font-size:11px;min-width:65px}.log-level[data-v-129fed65]{-ms-flex-negative:0;flex-shrink:0;font-size:10px}.log-message[data-v-129fed65]{-webkit-box-flex:1;-ms-flex:1;flex:1;word-break:break-all}.theme-dark .logs-toolbar .toolbar-right .auto-refresh-label[data-v-129fed65]{color:hsla(0,0%,100%,.4)}.theme-dark .logs-toolbar[data-v-129fed65] .ant-radio-group .ant-radio-button-wrapper{background:#1a1e28;border-color:hsla(0,0%,100%,.12);color:hsla(0,0%,100%,.55)}.theme-dark .logs-toolbar[data-v-129fed65] .ant-radio-group .ant-radio-button-wrapper:hover{color:#40a9ff}.theme-dark .logs-toolbar[data-v-129fed65] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#1890ff;border-color:#1890ff;color:#fff}.theme-dark .logs-container[data-v-129fed65]{background:#141821;border-color:hsla(0,0%,100%,.08)}.theme-dark .logs-empty[data-v-129fed65]{color:hsla(0,0%,100%,.25)}.theme-dark .logs-empty .anticon[data-v-129fed65]{color:hsla(0,0%,100%,.15)!important}.theme-dark .logs-empty p[data-v-129fed65]{color:hsla(0,0%,100%,.3)}.theme-dark .log-entry[data-v-129fed65]:hover{background:hsla(0,0%,100%,.03)}.theme-dark .log-entry.level-error[data-v-129fed65]{background:rgba(255,77,79,.06)}.theme-dark .log-entry.level-trade[data-v-129fed65]{background:rgba(82,196,26,.06)}.theme-dark .log-time[data-v-129fed65]{color:hsla(0,0%,100%,.3)}.theme-dark .log-message[data-v-129fed65]{color:hsla(0,0%,100%,.75)}.dashboard-pro[data-v-a3f2f566]{min-height:100vh;padding:20px;background:#f8fafc;-webkit-transition:background .3s;transition:background .3s}.dashboard-pro.theme-dark[data-v-a3f2f566]{background:#141414}.dashboard-pro.theme-dark .kpi-card[data-v-a3f2f566]{background:#1c1c1c;border-color:#2a2a2a}.dashboard-pro.theme-dark .kpi-card .kpi-label[data-v-a3f2f566]{color:#888}.dashboard-pro.theme-dark .kpi-card .kpi-value .amount[data-v-a3f2f566]{color:#f1f5f9}.dashboard-pro.theme-dark .kpi-card .kpi-sub[data-v-a3f2f566]{color:#888}.dashboard-pro.theme-dark .chart-panel[data-v-a3f2f566],.dashboard-pro.theme-dark .table-panel[data-v-a3f2f566]{background:#1c1c1c;border-color:#2a2a2a}.dashboard-pro.theme-dark .chart-panel .panel-header[data-v-a3f2f566],.dashboard-pro.theme-dark .table-panel .panel-header[data-v-a3f2f566]{border-color:#2a2a2a}.dashboard-pro.theme-dark .chart-panel .panel-header .panel-title[data-v-a3f2f566],.dashboard-pro.theme-dark .table-panel .panel-header .panel-title[data-v-a3f2f566]{color:#f1f5f9}.dashboard-pro.theme-dark .setup-guide-card[data-v-a3f2f566]{background:linear-gradient(135deg,rgba(23,125,220,.14),rgba(139,92,246,.12));border-color:rgba(23,125,220,.26)}.dashboard-pro.theme-dark .setup-guide-card .setup-guide-title[data-v-a3f2f566]{color:#f1f5f9}.dashboard-pro.theme-dark .setup-guide-card .setup-guide-desc[data-v-a3f2f566]{color:hsla(0,0%,100%,.72)}.dashboard-pro.theme-dark .setup-guide-card .setup-guide-path[data-v-a3f2f566]{color:hsla(0,0%,100%,.48)}.dashboard-pro.theme-dark .ranking-card[data-v-a3f2f566]{background:hsla(0,0%,100%,.03);border-color:#2a2a2a}.dashboard-pro.theme-dark .ranking-card .rank-name[data-v-a3f2f566]{color:#f1f5f9}.dashboard-pro.theme-dark .ranking-card .rank-stats label[data-v-a3f2f566]{color:#888}.dashboard-pro.theme-dark .calendar-nav .current-month[data-v-a3f2f566]{color:#f1f5f9}.dashboard-pro.theme-dark .calendar-nav .ant-btn-link[data-v-a3f2f566],.dashboard-pro.theme-dark .profit-calendar .calendar-empty[data-v-a3f2f566]{color:#888}.dashboard-pro.theme-dark .profit-calendar .month-summary[data-v-a3f2f566]{background:hsla(0,0%,100%,.03)}.dashboard-pro.theme-dark .profit-calendar .calendar-weekdays .weekday[data-v-a3f2f566],.dashboard-pro.theme-dark .profit-calendar .month-summary .summary-label[data-v-a3f2f566]{color:#888}.dashboard-pro.theme-dark .profit-calendar .calendar-grid .calendar-cell[data-v-a3f2f566]{background:hsla(0,0%,100%,.03)}.dashboard-pro.theme-dark .profit-calendar .calendar-grid .calendar-cell.no-data[data-v-a3f2f566]{background:hsla(0,0%,100%,.02)}.dashboard-pro.theme-dark .profit-calendar .calendar-grid .calendar-cell.profit[data-v-a3f2f566]{background:linear-gradient(135deg,rgba(34,197,94,.15),rgba(34,197,94,.25))}.dashboard-pro.theme-dark .profit-calendar .calendar-grid .calendar-cell.loss[data-v-a3f2f566]{background:linear-gradient(135deg,rgba(239,68,68,.15),rgba(239,68,68,.25))}.dashboard-pro.theme-dark .profit-calendar .calendar-grid .calendar-cell.zero[data-v-a3f2f566]{background:hsla(0,0%,100%,.03)}.dashboard-pro.theme-dark .profit-calendar .calendar-grid .calendar-cell .day-number[data-v-a3f2f566]{color:#f1f5f9}.dashboard-pro.theme-dark .pro-table[data-v-a3f2f566] .ant-table{background:transparent;color:#f1f5f9}.dashboard-pro.theme-dark .pro-table[data-v-a3f2f566] .ant-table-thead>tr>th{background:#141414;color:#888;border-color:#2a2a2a}.dashboard-pro.theme-dark .pro-table[data-v-a3f2f566] .ant-table-tbody>tr>td{border-color:#2a2a2a;color:#f1f5f9}.dashboard-pro.theme-dark .pro-table[data-v-a3f2f566] .ant-table-tbody>tr:hover>td{background:#252525}.dashboard-pro.theme-dark .pro-table[data-v-a3f2f566] .ant-table-placeholder{background:transparent}.dashboard-pro.theme-dark .pro-table[data-v-a3f2f566] .ant-table-placeholder .ant-empty-description{color:#888}.dashboard-pro.theme-dark .pro-table[data-v-a3f2f566] .ant-pagination .ant-pagination-item{background:#1c1c1c;border-color:#2a2a2a}.dashboard-pro.theme-dark .pro-table[data-v-a3f2f566] .ant-pagination .ant-pagination-item a{color:#f1f5f9}.dashboard-pro.theme-dark .pro-table[data-v-a3f2f566] .ant-pagination .ant-pagination-item.ant-pagination-item-active{background:#3b82f6;border-color:#3b82f6}.dashboard-pro.theme-dark .pro-table[data-v-a3f2f566] .ant-pagination .ant-pagination-next .ant-pagination-item-link,.dashboard-pro.theme-dark .pro-table[data-v-a3f2f566] .ant-pagination .ant-pagination-prev .ant-pagination-item-link{background:#1c1c1c;border-color:#2a2a2a;color:#f1f5f9}.dashboard-pro .kpi-grid[data-v-a3f2f566]{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px;margin-bottom:20px}.dashboard-pro .setup-guide-card[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:16px;margin-bottom:20px;padding:18px 20px;background:linear-gradient(135deg,rgba(59,130,246,.08),rgba(139,92,246,.08));border:1px solid rgba(59,130,246,.16);border-radius:16px}.dashboard-pro .setup-guide-card .setup-guide-copy[data-v-a3f2f566]{min-width:0}.dashboard-pro .setup-guide-card .setup-guide-title[data-v-a3f2f566]{font-size:16px;font-weight:700;color:#1e293b}.dashboard-pro .setup-guide-card .setup-guide-desc[data-v-a3f2f566]{margin-top:4px;color:#64748b;line-height:1.7}.dashboard-pro .setup-guide-card .setup-guide-path[data-v-a3f2f566]{margin-top:6px;font-size:12px;color:#64748b}.dashboard-pro .setup-guide-card .setup-guide-actions[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px;-ms-flex-negative:0;flex-shrink:0}.dashboard-pro .kpi-card[data-v-a3f2f566]{position:relative;background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:20px;overflow:hidden;-webkit-transition:all .3s cubic-bezier(.4,0,.2,1);transition:all .3s cubic-bezier(.4,0,.2,1)}.dashboard-pro .kpi-card[data-v-a3f2f566]:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-box-shadow:0 10px 40px rgba(0,0,0,.1);box-shadow:0 10px 40px rgba(0,0,0,.1)}.dashboard-pro .kpi-card.clickable[data-v-a3f2f566]{cursor:pointer}.dashboard-pro .kpi-card.clickable .card-arrow[data-v-a3f2f566]{position:absolute;right:16px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);opacity:.4;-webkit-transition:all .3s;transition:all .3s}.dashboard-pro .kpi-card.clickable:hover .card-arrow[data-v-a3f2f566]{opacity:1;right:12px}.dashboard-pro .kpi-card .kpi-glow[data-v-a3f2f566]{position:absolute;top:-50%;right:-50%;width:100%;height:100%;background:radial-gradient(circle,rgba(59,130,246,.15) 0,transparent 70%);pointer-events:none}.dashboard-pro .kpi-card .kpi-content[data-v-a3f2f566]{position:relative;z-index:1}.dashboard-pro .kpi-card .kpi-header[data-v-a3f2f566]{gap:8px;margin-bottom:12px}.dashboard-pro .kpi-card .kpi-header[data-v-a3f2f566],.dashboard-pro .kpi-card .kpi-icon[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.dashboard-pro .kpi-card .kpi-icon[data-v-a3f2f566]{width:32px;height:32px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:8px;background:rgba(59,130,246,.1);color:#3b82f6;font-size:16px}.dashboard-pro .kpi-card .kpi-label[data-v-a3f2f566]{font-size:12px;font-weight:600;color:#64748b;text-transform:uppercase;letter-spacing:.5px}.dashboard-pro .kpi-card .kpi-value[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline;gap:2px}.dashboard-pro .kpi-card .kpi-value .currency[data-v-a3f2f566]{font-size:18px;font-weight:500;color:#64748b}.dashboard-pro .kpi-card .kpi-value .amount[data-v-a3f2f566]{font-size:28px;font-weight:700;color:#1e293b;-webkit-font-feature-settings:"tnum";font-feature-settings:"tnum"}.dashboard-pro .kpi-card .kpi-value .unit[data-v-a3f2f566]{font-size:14px;font-weight:500;color:#64748b;margin-left:4px}.dashboard-pro .kpi-card .kpi-sub[data-v-a3f2f566]{margin-top:8px;font-size:12px;color:#64748b}.dashboard-pro .kpi-card .kpi-sub .label[data-v-a3f2f566]{margin:0 2px}.dashboard-pro .kpi-card .kpi-sub .divider[data-v-a3f2f566]{margin:0 6px;opacity:.5}.dashboard-pro .kpi-card .kpi-sub .highlight[data-v-a3f2f566]{font-weight:600;color:#3b82f6}.dashboard-pro .kpi-card.kpi-primary[data-v-a3f2f566]{background:linear-gradient(135deg,#1e40af,#3b82f6 50%,#60a5fa);border:none}.dashboard-pro .kpi-card.kpi-primary .kpi-icon[data-v-a3f2f566]{background:hsla(0,0%,100%,.2);color:#fff}.dashboard-pro .kpi-card.kpi-primary .kpi-label[data-v-a3f2f566]{color:hsla(0,0%,100%,.8)}.dashboard-pro .kpi-card.kpi-primary .kpi-value .amount[data-v-a3f2f566],.dashboard-pro .kpi-card.kpi-primary .kpi-value .currency[data-v-a3f2f566],.dashboard-pro .kpi-card.kpi-primary .kpi-value .unit[data-v-a3f2f566]{color:#fff}.dashboard-pro .kpi-card.kpi-primary .kpi-sub[data-v-a3f2f566]{color:hsla(0,0%,100%,.7)}.dashboard-pro .kpi-card.kpi-win-rate .kpi-ring[data-v-a3f2f566]{position:absolute;right:12px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:60px;height:60px}.dashboard-pro .kpi-card.kpi-win-rate .kpi-ring svg[data-v-a3f2f566]{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.dashboard-pro .kpi-card.kpi-win-rate .kpi-ring svg .ring-bg[data-v-a3f2f566]{fill:none;stroke:rgba(16,185,129,.15);stroke-width:3}.dashboard-pro .kpi-card.kpi-win-rate .kpi-ring svg .ring-progress[data-v-a3f2f566]{fill:none;stroke:#10b981;stroke-width:3;stroke-linecap:round;-webkit-transition:stroke-dasharray .5s ease;transition:stroke-dasharray .5s ease}.dashboard-pro .kpi-card.kpi-win-rate .kpi-icon[data-v-a3f2f566]{background:rgba(16,185,129,.1);color:#10b981}.dashboard-pro .kpi-card.kpi-profit-factor .kpi-icon[data-v-a3f2f566]{background:rgba(139,92,246,.1);color:#8b5cf6}.dashboard-pro .kpi-card.kpi-drawdown .kpi-icon[data-v-a3f2f566]{background:rgba(239,68,68,.1);color:#ef4444}.dashboard-pro .kpi-card.kpi-drawdown .kpi-value .amount[data-v-a3f2f566]{color:#ef4444}.dashboard-pro .kpi-card.kpi-trades .kpi-icon[data-v-a3f2f566]{background:rgba(6,182,212,.1);color:#06b6d4}.dashboard-pro .kpi-card.kpi-strategies .kpi-icon[data-v-a3f2f566]{background:rgba(245,158,11,.1);color:#f59e0b}.dashboard-pro .chart-row[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:16px;margin-bottom:16px}@media (max-width:1024px){.dashboard-pro .chart-row[data-v-a3f2f566]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.dashboard-pro .chart-panel[data-v-a3f2f566]{background:#fff;border:1px solid #e2e8f0;border-radius:16px;overflow:hidden}.dashboard-pro .chart-panel.chart-main[data-v-a3f2f566]{-webkit-box-flex:2;-ms-flex:2;flex:2}.dashboard-pro .chart-panel.chart-side[data-v-a3f2f566]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:300px}.dashboard-pro .chart-panel.chart-half[data-v-a3f2f566]{-webkit-box-flex:1;-ms-flex:1;flex:1}.dashboard-pro .chart-panel .panel-header[data-v-a3f2f566]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #e2e8f0}.dashboard-pro .chart-panel .panel-header[data-v-a3f2f566],.dashboard-pro .chart-panel .panel-title[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.dashboard-pro .chart-panel .panel-title[data-v-a3f2f566]{gap:8px;font-size:14px;font-weight:600;color:#1e293b}.dashboard-pro .chart-panel .panel-title .anticon[data-v-a3f2f566]{color:#3b82f6}.dashboard-pro .chart-panel .panel-legend[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:16px;font-size:12px;color:#64748b}.dashboard-pro .chart-panel .panel-legend .legend-item[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.dashboard-pro .chart-panel .panel-legend .legend-item .dot[data-v-a3f2f566]{width:10px;height:10px;border-radius:2px}.dashboard-pro .chart-panel .panel-legend .legend-item .dot.bar[data-v-a3f2f566]{background:-webkit-gradient(linear,left top,left bottom,from(#34d399),to(#10b981));background:linear-gradient(180deg,#34d399,#10b981)}.dashboard-pro .chart-panel .panel-legend .legend-item .dot.line[data-v-a3f2f566]{background:-webkit-gradient(linear,left top,right top,from(#3b82f6),to(#8b5cf6));background:linear-gradient(90deg,#3b82f6,#8b5cf6)}.dashboard-pro .chart-panel .panel-legend .legend-item .dot.loss[data-v-a3f2f566]{background:#ef4444}.dashboard-pro .chart-panel .panel-legend .legend-item .dot.profit[data-v-a3f2f566]{background:#10b981}.dashboard-pro .chart-panel .panel-legend.calendar-legend[data-v-a3f2f566]{-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px}.dashboard-pro .chart-panel .panel-legend.calendar-legend .legend-gradient[data-v-a3f2f566]{width:80px;height:10px;border-radius:3px;background:-webkit-gradient(linear,left top,right top,from(#ef4444),color-stop(#fca5a5),color-stop(#f4f4f5),color-stop(#86efac),to(#22c55e));background:linear-gradient(90deg,#ef4444,#fca5a5,#f4f4f5,#86efac,#22c55e)}.dashboard-pro .chart-panel .panel-badge[data-v-a3f2f566]{background:#3b82f6;color:#fff;font-size:11px;font-weight:600;padding:2px 8px;border-radius:10px}.dashboard-pro .chart-panel .chart-body[data-v-a3f2f566]{height:320px;padding:16px}.dashboard-pro .chart-panel .chart-body.chart-sm[data-v-a3f2f566]{height:220px}.dashboard-pro .chart-panel .chart-body.calendar-chart[data-v-a3f2f566]{height:280px}.dashboard-pro .chart-panel .calendar-nav[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.dashboard-pro .chart-panel .calendar-nav .current-month[data-v-a3f2f566]{font-size:14px;font-weight:600;color:#1e293b;min-width:80px;text-align:center}.dashboard-pro .chart-panel .calendar-nav .ant-btn-link[data-v-a3f2f566]{padding:0;height:auto;color:#64748b}.dashboard-pro .chart-panel .calendar-nav .ant-btn-link[data-v-a3f2f566]:hover:not(:disabled){color:#3b82f6}.dashboard-pro .chart-panel .calendar-nav .ant-btn-link[data-v-a3f2f566]:disabled{opacity:.3}.dashboard-pro .chart-panel .profit-calendar[data-v-a3f2f566]{padding:12px 16px;overflow:hidden}.dashboard-pro .chart-panel .profit-calendar .calendar-empty[data-v-a3f2f566],.dashboard-pro .chart-panel .profit-calendar[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.dashboard-pro .chart-panel .profit-calendar .calendar-empty[data-v-a3f2f566]{height:280px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:#64748b}.dashboard-pro .chart-panel .profit-calendar .calendar-empty .anticon[data-v-a3f2f566]{font-size:40px;margin-bottom:10px;opacity:.3}.dashboard-pro .chart-panel .profit-calendar .month-summary[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:20px;margin-bottom:10px;padding:8px 12px;background:rgba(241,245,249,.5);border-radius:8px}.dashboard-pro .chart-panel .profit-calendar .month-summary .summary-item[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:2px}.dashboard-pro .chart-panel .profit-calendar .month-summary .summary-item .summary-label[data-v-a3f2f566]{font-size:10px;color:#64748b;text-transform:uppercase;letter-spacing:.5px}.dashboard-pro .chart-panel .profit-calendar .month-summary .summary-item .summary-value[data-v-a3f2f566]{font-size:15px;font-weight:700;font-family:JetBrains Mono,monospace}.dashboard-pro .chart-panel .profit-calendar .month-summary .summary-item .summary-value.positive[data-v-a3f2f566]{color:#10b981}.dashboard-pro .chart-panel .profit-calendar .month-summary .summary-item .summary-value.negative[data-v-a3f2f566]{color:#ef4444}.dashboard-pro .chart-panel .profit-calendar .calendar-weekdays[data-v-a3f2f566]{display:grid;grid-template-columns:repeat(7,1fr);gap:3px;margin-bottom:4px}.dashboard-pro .chart-panel .profit-calendar .calendar-weekdays .weekday[data-v-a3f2f566]{text-align:center;font-size:10px;font-weight:600;color:#64748b;padding:4px 0}.dashboard-pro .chart-panel .profit-calendar .calendar-grid[data-v-a3f2f566]{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell[data-v-a3f2f566]{height:36px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:6px;background:rgba(241,245,249,.5);border:1px solid transparent;-webkit-transition:all .2s ease;transition:all .2s ease;position:relative}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.empty[data-v-a3f2f566]{background:transparent;border:none}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.no-data[data-v-a3f2f566]{background:rgba(241,245,249,.3)}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.profit[data-v-a3f2f566]{background:linear-gradient(135deg,rgba(34,197,94,.12),rgba(34,197,94,.2));border-color:rgba(34,197,94,.3)}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.profit[data-v-a3f2f566]:hover{background:linear-gradient(135deg,rgba(34,197,94,.2),rgba(34,197,94,.3));-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-box-shadow:0 4px 12px rgba(34,197,94,.2);box-shadow:0 4px 12px rgba(34,197,94,.2)}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.loss[data-v-a3f2f566]{background:linear-gradient(135deg,rgba(239,68,68,.12),rgba(239,68,68,.2));border-color:rgba(239,68,68,.3)}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.loss[data-v-a3f2f566]:hover{background:linear-gradient(135deg,rgba(239,68,68,.2),rgba(239,68,68,.3));-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-box-shadow:0 4px 12px rgba(239,68,68,.2);box-shadow:0 4px 12px rgba(239,68,68,.2)}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.zero[data-v-a3f2f566]{background:hsla(240,5%,65%,.1);border-color:hsla(240,5%,65%,.2)}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell .day-number[data-v-a3f2f566]{font-size:11px;font-weight:600;color:#1e293b;line-height:1}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell .day-profit[data-v-a3f2f566]{font-size:9px;font-weight:600;font-family:JetBrains Mono,monospace;margin-top:1px;line-height:1}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell .day-profit.positive[data-v-a3f2f566]{color:#10b981}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell .day-profit.negative[data-v-a3f2f566]{color:#ef4444}.dashboard-pro .strategy-ranking[data-v-a3f2f566]{padding:16px}.dashboard-pro .strategy-ranking .empty-state[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:40px;color:#64748b}.dashboard-pro .strategy-ranking .empty-state .anticon[data-v-a3f2f566]{font-size:40px;margin-bottom:12px;opacity:.3}.dashboard-pro .strategy-ranking .ranking-grid[data-v-a3f2f566]{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:12px}.dashboard-pro .strategy-ranking .ranking-card[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:12px;padding:14px 16px;background:rgba(241,245,249,.5);border:1px solid #e2e8f0;border-radius:12px;position:relative;overflow:hidden}.dashboard-pro .strategy-ranking .ranking-card.rank-top[data-v-a3f2f566]{border-color:transparent;background:linear-gradient(135deg,rgba(59,130,246,.08),rgba(139,92,246,.08))}.dashboard-pro .strategy-ranking .ranking-card .rank-badge[data-v-a3f2f566]{width:28px;height:28px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:8px;font-size:12px;font-weight:700;background:#64748b;color:#fff;-ms-flex-negative:0;flex-shrink:0}.dashboard-pro .strategy-ranking .ranking-card .rank-badge.rank-1[data-v-a3f2f566]{background:linear-gradient(135deg,#fbbf24,#f59e0b)}.dashboard-pro .strategy-ranking .ranking-card .rank-badge.rank-2[data-v-a3f2f566]{background:linear-gradient(135deg,#9ca3af,#6b7280)}.dashboard-pro .strategy-ranking .ranking-card .rank-badge.rank-3[data-v-a3f2f566]{background:linear-gradient(135deg,#cd7f32,#b87333)}.dashboard-pro .strategy-ranking .ranking-card .rank-info[data-v-a3f2f566]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.dashboard-pro .strategy-ranking .ranking-card .rank-info .rank-name[data-v-a3f2f566]{font-size:13px;font-weight:600;color:#1e293b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:4px}.dashboard-pro .strategy-ranking .ranking-card .rank-info .rank-stats[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px;-ms-flex-wrap:wrap;flex-wrap:wrap}.dashboard-pro .strategy-ranking .ranking-card .rank-info .rank-stats .stat[data-v-a3f2f566]{font-size:11px}.dashboard-pro .strategy-ranking .ranking-card .rank-info .rank-stats .stat label[data-v-a3f2f566]{color:#64748b;margin-right:4px}.dashboard-pro .strategy-ranking .ranking-card .rank-pnl-bar[data-v-a3f2f566]{position:absolute;bottom:0;left:0;right:0;height:3px;background:rgba(0,0,0,.05)}.dashboard-pro .strategy-ranking .ranking-card .rank-pnl-bar .bar-fill[data-v-a3f2f566]{height:100%;border-radius:0 3px 3px 0;-webkit-transition:width .5s ease;transition:width .5s ease}.dashboard-pro .strategy-ranking .ranking-card .rank-pnl-bar .bar-fill.positive[data-v-a3f2f566]{background:-webkit-gradient(linear,left top,right top,from(#10b981),to(#34d399));background:linear-gradient(90deg,#10b981,#34d399)}.dashboard-pro .strategy-ranking .ranking-card .rank-pnl-bar .bar-fill.negative[data-v-a3f2f566]{background:-webkit-gradient(linear,left top,right top,from(#ef4444),to(#f87171));background:linear-gradient(90deg,#ef4444,#f87171)}.dashboard-pro .table-row[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:16px;margin-top:16px;margin-bottom:16px}@media (max-width:1024px){.dashboard-pro .table-row[data-v-a3f2f566]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.dashboard-pro .table-panel[data-v-a3f2f566]{-webkit-box-flex:1;-ms-flex:1;flex:1;background:#fff;border:1px solid #e2e8f0;border-radius:16px;overflow:hidden}.dashboard-pro .table-panel .panel-header[data-v-a3f2f566]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #e2e8f0}.dashboard-pro .table-panel .panel-header[data-v-a3f2f566],.dashboard-pro .table-panel .panel-title[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.dashboard-pro .table-panel .panel-title[data-v-a3f2f566]{gap:8px;font-size:14px;font-weight:600;color:#1e293b}.dashboard-pro .table-panel .panel-title .anticon[data-v-a3f2f566]{color:#3b82f6}.dashboard-pro .table-panel .panel-title .sound-toggle[data-v-a3f2f566]{margin-left:8px;font-size:16px;cursor:pointer;color:#10b981;-webkit-transition:all .2s;transition:all .2s}.dashboard-pro .table-panel .panel-title .sound-toggle[data-v-a3f2f566]:hover{-webkit-transform:scale(1.1);transform:scale(1.1)}.dashboard-pro .table-panel .panel-title .sound-toggle.sound-off[data-v-a3f2f566]{color:#64748b}.dashboard-pro .table-panel .panel-badge[data-v-a3f2f566]{background:#3b82f6;color:#fff;font-size:11px;font-weight:600;padding:2px 8px;border-radius:10px}.dashboard-pro .orders-panel[data-v-a3f2f566]{margin-bottom:20px}.dashboard-pro .pro-table[data-v-a3f2f566] .ant-table{font-size:13px}.dashboard-pro .pro-table[data-v-a3f2f566] .ant-table-thead>tr>th{background:rgba(241,245,249,.8);font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.5px;color:#64748b;border-bottom:1px solid #e2e8f0;padding:12px 16px}.dashboard-pro .pro-table[data-v-a3f2f566] .ant-table-tbody>tr>td{padding:12px 16px;border-bottom:1px solid #e2e8f0}.dashboard-pro .pro-table[data-v-a3f2f566] .ant-table-tbody>tr:hover>td{background:rgba(59,130,246,.04)}.dashboard-pro .pro-table[data-v-a3f2f566] .ant-pagination{padding:12px 16px;margin:0}.dashboard-pro .symbol-cell .symbol-name[data-v-a3f2f566]{font-weight:600;display:block}.dashboard-pro .symbol-cell .symbol-strategy[data-v-a3f2f566]{font-size:11px;color:#64748b}.dashboard-pro .side-tag[data-v-a3f2f566]{display:inline-block;padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600}.dashboard-pro .side-tag.long[data-v-a3f2f566]{background:rgba(16,185,129,.1);color:#10b981}.dashboard-pro .side-tag.short[data-v-a3f2f566]{background:rgba(239,68,68,.1);color:#ef4444}.dashboard-pro .type-tag[data-v-a3f2f566]{display:inline-block;padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600}.dashboard-pro .type-tag.long[data-v-a3f2f566]{background:rgba(16,185,129,.1);color:#10b981}.dashboard-pro .type-tag.short[data-v-a3f2f566]{background:rgba(239,68,68,.1);color:#ef4444}.dashboard-pro .type-tag.close-long[data-v-a3f2f566]{background:rgba(245,158,11,.1);color:#f59e0b}.dashboard-pro .type-tag.close-short[data-v-a3f2f566]{background:rgba(139,92,246,.1);color:#8b5cf6}.dashboard-pro .symbol-tag[data-v-a3f2f566]{background:rgba(59,130,246,.1);color:#3b82f6}.dashboard-pro .exchange-tag[data-v-a3f2f566],.dashboard-pro .symbol-tag[data-v-a3f2f566]{display:inline-block;padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600}.dashboard-pro .exchange-tag.binance[data-v-a3f2f566]{background:rgba(240,185,11,.1);color:#f0b90b}.dashboard-pro .exchange-tag.okx[data-v-a3f2f566]{background:rgba(139,92,246,.1);color:#8b5cf6}.dashboard-pro .exchange-tag.bitget[data-v-a3f2f566]{background:rgba(6,182,212,.1);color:#06b6d4}.dashboard-pro .exchange-tag.signal[data-v-a3f2f566]{background:rgba(59,130,246,.1);color:#3b82f6}.dashboard-pro .market-type[data-v-a3f2f566]{font-size:10px;color:#64748b;margin-top:2px}.dashboard-pro .status-tag[data-v-a3f2f566]{display:inline-block;padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600}.dashboard-pro .status-tag.pending[data-v-a3f2f566]{background:rgba(245,158,11,.1);color:#f59e0b}.dashboard-pro .status-tag.processing[data-v-a3f2f566]{background:rgba(59,130,246,.1);color:#3b82f6}.dashboard-pro .status-tag.completed[data-v-a3f2f566]{background:rgba(16,185,129,.1);color:#10b981}.dashboard-pro .status-tag.failed[data-v-a3f2f566]{background:rgba(239,68,68,.1);color:#ef4444}.dashboard-pro .status-tag.cancelled[data-v-a3f2f566]{background:rgba(100,116,139,.1);color:#64748b}.dashboard-pro .error-hint[data-v-a3f2f566]{font-size:11px;color:#ef4444;margin-top:4px;cursor:pointer}.dashboard-pro .error-hint .anticon[data-v-a3f2f566]{margin-right:4px}.dashboard-pro .notify-icons[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px}.dashboard-pro .notify-icons .notify-icon[data-v-a3f2f566]{color:#64748b;font-size:14px}.dashboard-pro .pnl-cell[data-v-a3f2f566]{text-align:right}.dashboard-pro .pnl-cell .pnl-percent[data-v-a3f2f566]{display:block;font-size:11px}.dashboard-pro .time-cell[data-v-a3f2f566]{font-size:12px;color:#64748b}.dashboard-pro .sub-text[data-v-a3f2f566]{font-size:11px;color:#64748b}.dashboard-pro .text-muted[data-v-a3f2f566]{color:#64748b}.dashboard-pro .positive[data-v-a3f2f566]{color:#10b981}.dashboard-pro .negative[data-v-a3f2f566]{color:#ef4444}@media (max-width:768px){.dashboard-pro[data-v-a3f2f566]{padding:12px}.dashboard-pro .setup-guide-card[data-v-a3f2f566]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;padding:16px}.dashboard-pro .setup-guide-card .setup-guide-actions[data-v-a3f2f566]{width:100%}.dashboard-pro .setup-guide-card .setup-guide-actions .ant-btn[data-v-a3f2f566]{-webkit-box-flex:1;-ms-flex:1;flex:1}.dashboard-pro .kpi-grid[data-v-a3f2f566]{grid-template-columns:repeat(2,1fr);gap:10px}.dashboard-pro .kpi-card[data-v-a3f2f566]{padding:14px}.dashboard-pro .kpi-card .kpi-value .amount[data-v-a3f2f566]{font-size:22px}.dashboard-pro .kpi-card.kpi-win-rate .kpi-ring[data-v-a3f2f566]{width:48px;height:48px;right:8px}.dashboard-pro .chart-panel .chart-body[data-v-a3f2f566]{height:260px;padding:12px}.dashboard-pro .chart-panel .chart-body.chart-sm[data-v-a3f2f566]{height:180px}.dashboard-pro .ranking-grid[data-v-a3f2f566]{grid-template-columns:1fr}}.top-level-tabs[data-v-bbcac474] .ant-tabs-bar{margin-bottom:16px;border-bottom:1px solid #e8e8e8}.top-level-tabs[data-v-bbcac474] .ant-tabs-tab{font-size:15px;padding:12px 20px}.theme-dark .top-level-tabs[data-v-bbcac474] .ant-tabs-bar{border-bottom-color:#303030}.theme-dark .top-level-tabs[data-v-bbcac474] .ant-tabs-tab{color:hsla(0,0%,100%,.65)}.theme-dark .top-level-tabs[data-v-bbcac474] .ant-tabs-tab-active{color:#177ddc}.theme-dark .top-level-tabs[data-v-bbcac474] .ant-tabs-ink-bar{background:#177ddc}.assistant-guide-bar[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px;padding:16px 18px;margin-bottom:16px;border:1px solid rgba(24,144,255,.14);border-radius:16px;background:linear-gradient(135deg,rgba(24,144,255,.08),rgba(114,46,209,.06))}.assistant-guide-bar .assistant-guide-copy[data-v-bbcac474]{min-width:0;-webkit-box-flex:1;-ms-flex:1 1 240px;flex:1 1 240px}.assistant-guide-bar .assistant-guide-eyebrow[data-v-bbcac474]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:4px 10px;margin-bottom:8px;border-radius:999px;background:rgba(24,144,255,.12);color:#1677ff;font-size:12px;font-weight:600}.assistant-guide-bar .assistant-guide-title[data-v-bbcac474]{font-size:16px;font-weight:700;color:#1f2937}.assistant-guide-bar .assistant-guide-desc[data-v-bbcac474]{margin-top:4px;color:#475569;line-height:1.6}.assistant-guide-bar .assistant-guide-steps[data-v-bbcac474]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;-webkit-box-flex:1;-ms-flex:1 1 520px;flex:1 1 520px}.assistant-guide-bar .assistant-step-card[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:10px;min-height:92px;padding:12px;border-radius:14px;background:hsla(0,0%,100%,.66);border:1px solid rgba(148,163,184,.16);-webkit-box-shadow:0 4px 12px rgba(15,23,42,.04);box-shadow:0 4px 12px rgba(15,23,42,.04)}.assistant-guide-bar .assistant-step-index[data-v-bbcac474]{width:28px;height:28px;border-radius:999px;background:linear-gradient(135deg,#1677ff,#6d28d9);color:#fff;font-size:13px;font-weight:700;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-ms-flex-negative:0;flex-shrink:0}.assistant-guide-bar .assistant-step-body[data-v-bbcac474]{min-width:0}.assistant-guide-bar .assistant-step-title[data-v-bbcac474]{font-size:13px;font-weight:700;color:#1f2937}.assistant-guide-bar .assistant-step-desc[data-v-bbcac474]{margin-top:4px;font-size:12px;line-height:1.6;color:#64748b}.assistant-guide-bar .assistant-guide-actions[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px;-ms-flex-negative:0;flex-shrink:0}.strategy-empty-state[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:10px;padding:28px 16px 32px;text-align:center}.strategy-empty-state .strategy-empty-desc[data-v-bbcac474]{max-width:420px;color:#475569;line-height:1.7}.strategy-empty-state .strategy-empty-path[data-v-bbcac474]{font-size:12px;color:#64748b}.trading-assistant[data-v-bbcac474]{padding:0;height:calc(100vh - 120px);background:-webkit-gradient(linear,left top,left bottom,from(#f8fafc),to(#f1f5f9));background:linear-gradient(180deg,#f8fafc,#f1f5f9)}.trading-assistant .strategy-layout[data-v-bbcac474]{height:calc(100vh - 120px)}@media (max-width:768px){.trading-assistant[data-v-bbcac474]{min-height:auto;margin:-24px}.trading-assistant .assistant-guide-bar[data-v-bbcac474]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;margin:0 12px 12px;padding:14px}.trading-assistant .assistant-guide-bar .assistant-guide-steps[data-v-bbcac474]{grid-template-columns:1fr}.trading-assistant .assistant-guide-bar .assistant-guide-actions[data-v-bbcac474]{width:100%}.trading-assistant .assistant-guide-bar .assistant-guide-actions .ant-btn[data-v-bbcac474]{-webkit-box-flex:1;-ms-flex:1;flex:1}.trading-assistant .strategy-layout[data-v-bbcac474]{height:auto;min-height:calc(100vh - 120px)}.trading-assistant .strategy-list-col[data-v-bbcac474]{margin-bottom:12px;height:auto;max-height:50vh}.trading-assistant .strategy-list-col .strategy-list-card[data-v-bbcac474]{height:auto;max-height:50vh}.trading-assistant .strategy-list-col .strategy-list-card .card-title[data-v-bbcac474]{-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;padding:12px 16px}.trading-assistant .strategy-list-col .strategy-list-card .card-title span[data-v-bbcac474]{font-size:14px;font-weight:600}.trading-assistant .strategy-list-col .strategy-list-card .card-title .ant-btn[data-v-bbcac474]{font-size:12px;padding:0 10px;height:28px;line-height:28px}.trading-assistant .strategy-list-col .strategy-list-card[data-v-bbcac474] .ant-card-body{max-height:calc(50vh - 60px);overflow-y:auto;padding:8px;-webkit-overflow-scrolling:touch}.trading-assistant .strategy-list-col .strategy-list-card[data-v-bbcac474] .ant-card-head{padding:0;min-height:48px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474]{padding:12px 8px;margin-bottom:4px;border-radius:8px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta{width:100%}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-action{margin-left:8px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header[data-v-bbcac474]{width:100%}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper[data-v-bbcac474]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;margin-bottom:6px;-ms-flex-wrap:wrap;flex-wrap:wrap}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .exchange-tag[data-v-bbcac474],.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .strategy-type-tag[data-v-bbcac474]{font-size:10px;padding:2px 6px;line-height:1.4;margin:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .exchange-tag .anticon[data-v-bbcac474]{font-size:10px;margin-right:2px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .strategy-name[data-v-bbcac474]{font-size:14px;font-weight:600;-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;margin-top:4px;font-size:11px;-ms-flex-wrap:wrap;flex-wrap:wrap}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info .info-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:3px;-ms-flex-negative:0;flex-shrink:0;font-size:11px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info .info-item .anticon{font-size:11px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info .status-label{font-size:10px;padding:2px 6px;line-height:1.4}.trading-assistant .strategy-detail-col[data-v-bbcac474]{height:auto;min-height:calc(50vh - 60px)}.trading-assistant .strategy-detail-col .strategy-detail-panel[data-v-bbcac474]{gap:12px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card[data-v-bbcac474] .ant-card-body{padding:16px 12px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card[data-v-bbcac474] .ant-card-head{padding:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header[data-v-bbcac474]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left[data-v-bbcac474]{width:100%}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title[data-v-bbcac474]{font-size:18px;font-weight:600;margin-bottom:12px;line-height:1.4;word-break:break-word}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta[data-v-bbcac474]{display:grid;grid-template-columns:1fr 1fr;gap:8px;-webkit-box-align:start;-ms-flex-align:start;align-items:start}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta[data-v-bbcac474] .ant-tag{grid-column:-1;justify-self:start;margin:0;font-size:11px;padding:4px 8px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta .meta-item[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:4px;font-size:12px;line-height:1.5;word-break:break-word}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta .meta-item .anticon[data-v-bbcac474]{font-size:12px;-ms-flex-negative:0;flex-shrink:0;margin-top:2px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta .meta-item>span[data-v-bbcac474]{word-break:break-word;line-height:1.5;-webkit-box-flex:1;-ms-flex:1;flex:1}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta .meta-item span[data-v-bbcac474]:not(.anticon){display:inline;word-break:break-word;overflow-wrap:break-word}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right[data-v-bbcac474]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .ant-btn[data-v-bbcac474]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:100px;font-size:13px;padding:0 12px;height:36px;line-height:36px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .ant-btn .anticon[data-v-bbcac474]{margin-right:4px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-card-body{padding:12px 8px;overflow-x:hidden}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-card-head{padding:0 8px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-tabs .ant-tabs-nav{padding:0 4px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-tabs .ant-tabs-nav .ant-tabs-tab{font-size:13px;padding:8px 10px;margin:0 2px;white-space:nowrap}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-tabs .ant-tabs-content{padding-top:12px;overflow-x:hidden}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-tabs .ant-tabs-content .ant-tabs-tabpane{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:768px) and (max-width:480px){.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta[data-v-bbcac474]{grid-template-columns:1fr}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta[data-v-bbcac474] .ant-tag{grid-column:1}}@media (max-width:480px){.trading-assistant .strategy-list-col .strategy-list-card[data-v-bbcac474],.trading-assistant .strategy-list-col[data-v-bbcac474]{max-height:45vh}.trading-assistant .strategy-list-col .strategy-list-card[data-v-bbcac474] .ant-card-body{max-height:calc(45vh - 60px)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta[data-v-bbcac474]{grid-template-columns:1fr;gap:6px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta .meta-item[data-v-bbcac474]{font-size:11px;line-height:1.6}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .ant-btn[data-v-bbcac474]{width:100%;-webkit-box-flex:0;-ms-flex:none;flex:none}}.trading-assistant .strategy-list-col[data-v-bbcac474]{height:100%}.trading-assistant .strategy-list-col .strategy-list-card[data-v-bbcac474]{height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;border-radius:16px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08);border:none;overflow:hidden;-webkit-transition:-webkit-box-shadow .3s ease;transition:-webkit-box-shadow .3s ease;transition:box-shadow .3s ease;transition:box-shadow .3s ease,-webkit-box-shadow .3s ease}.trading-assistant .strategy-list-col .strategy-list-card[data-v-bbcac474]:hover{-webkit-box-shadow:0 8px 32px rgba(0,0,0,.12);box-shadow:0 8px 32px rgba(0,0,0,.12)}.trading-assistant .strategy-list-col .strategy-list-card .card-title[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.trading-assistant .strategy-list-col .strategy-list-card .card-title span[data-v-bbcac474]{font-size:16px;font-weight:700;background:linear-gradient(135deg,#1e3a5f,#2d5a87);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.trading-assistant .strategy-list-col .strategy-list-card .card-title .ant-btn-primary[data-v-bbcac474]{border-radius:8px;background:linear-gradient(135deg,#1890ff,#40a9ff);border:none;-webkit-box-shadow:0 4px 12px rgba(24,144,255,.35);box-shadow:0 4px 12px rgba(24,144,255,.35);-webkit-transition:all .3s ease;transition:all .3s ease}.trading-assistant .strategy-list-col .strategy-list-card .card-title .ant-btn-primary[data-v-bbcac474]:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-box-shadow:0 6px 16px rgba(24,144,255,.45);box-shadow:0 6px 16px rgba(24,144,255,.45)}.trading-assistant .strategy-list-col .strategy-list-card .group-mode-switch[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;padding:8px 0 12px;border-bottom:1px solid #f0f0f0;margin-bottom:12px}.trading-assistant .strategy-list-col .strategy-list-card .group-mode-switch .group-mode-label[data-v-bbcac474]{font-size:13px;color:#8c8c8c;font-weight:500}.trading-assistant .strategy-list-col .strategy-list-card .group-mode-switch[data-v-bbcac474] .ant-radio-group .ant-radio-button-wrapper{font-size:12px;padding:0 10px;height:26px;line-height:24px;border-radius:4px}.trading-assistant .strategy-list-col .strategy-list-card .group-mode-switch[data-v-bbcac474] .ant-radio-group .ant-radio-button-wrapper:first-child{border-radius:4px 0 0 4px}.trading-assistant .strategy-list-col .strategy-list-card .group-mode-switch[data-v-bbcac474] .ant-radio-group .ant-radio-button-wrapper:last-child{border-radius:0 4px 4px 0}.trading-assistant .strategy-list-col .strategy-list-card .group-mode-switch[data-v-bbcac474] .ant-radio-group .ant-radio-button-wrapper .anticon{margin-right:4px}.trading-assistant .strategy-list-col .strategy-list-card[data-v-bbcac474] .ant-card-body{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;background:#fff;padding:12px}.trading-assistant .strategy-list-col .strategy-list-card[data-v-bbcac474] .ant-card-head{background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fafbfc));background:linear-gradient(180deg,#fff,#fafbfc);border-bottom:1px solid #f0f0f0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group[data-v-bbcac474]{margin-bottom:12px;background:#fff;border-radius:12px;border:1px solid #e8ecf1;overflow:hidden}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:10px 12px;background:linear-gradient(135deg,#f8fafc,#f1f5f9);cursor:pointer;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header[data-v-bbcac474]:hover{background:linear-gradient(135deg,#e8f4fd,#e3f0fc)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-left[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-left .collapse-icon[data-v-bbcac474]{font-size:12px;color:#8c8c8c;-webkit-transition:-webkit-transform .2s ease;transition:-webkit-transform .2s ease;transition:transform .2s ease;transition:transform .2s ease,-webkit-transform .2s ease}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-left .group-icon[data-v-bbcac474]{font-size:16px;color:#1890ff}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-left .group-name[data-v-bbcac474]{font-weight:600;font-size:14px;color:#1e3a5f;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-right[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-right .group-status[data-v-bbcac474]{font-size:11px;padding:2px 8px;border-radius:10px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-right .group-status.running[data-v-bbcac474]{background:rgba(14,203,129,.1);color:#0ecb81}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-right .group-status.stopped[data-v-bbcac474]{background:rgba(246,70,93,.1);color:#f6465d}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content[data-v-bbcac474]{padding:4px 8px 8px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:8px 10px;margin-bottom:4px;margin-left:20px;border-left:2px solid #e8ecf1;background:#fafbfc;border-radius:0 8px 8px 0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item[data-v-bbcac474]:last-child{margin-bottom:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item[data-v-bbcac474]:hover{background:#f0f7ff;border-left-color:#1890ff}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item.active[data-v-bbcac474]{background:#e6f4ff;border-left-color:#1890ff;border-left-width:3px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-content[data-v-bbcac474]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-actions[data-v-bbcac474]{-ms-flex-negative:0;flex-shrink:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474]{cursor:pointer;padding:14px 16px;border-radius:12px;-webkit-transition:all .3s cubic-bezier(.4,0,.2,1);transition:all .3s cubic-bezier(.4,0,.2,1);position:relative;margin-bottom:8px;background:#fafbfc;border:1px solid transparent}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474]:hover{background:linear-gradient(135deg,#f0f7ff,#f5f9ff);border-color:rgba(24,144,255,.2);-webkit-transform:translateX(4px);transform:translateX(4px);-webkit-box-shadow:0 2px 12px rgba(24,144,255,.1);box-shadow:0 2px 12px rgba(24,144,255,.1)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item.active[data-v-bbcac474]{background:linear-gradient(135deg,#e6f4ff,#f0f9ff);border-color:#1890ff;border-left:4px solid #1890ff;-webkit-box-shadow:0 4px 16px rgba(24,144,255,.15);box-shadow:0 4px 16px rgba(24,144,255,.15)}@media (max-width:768px){.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474]{padding:12px 8px;margin:0 4px 4px 4px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item.active[data-v-bbcac474]{border-left-width:2px}}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px;-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .strategy-name[data-v-bbcac474]{font-weight:600;font-size:14px;-ms-flex-negative:0;flex-shrink:0;color:#1e3a5f;-webkit-transition:color .2s ease;transition:color .2s ease}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .exchange-tag[data-v-bbcac474]{-ms-flex-negative:0;flex-shrink:0;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:11px;line-height:1.5;padding:2px 8px;border-radius:6px;background:linear-gradient(135deg,rgba(102,126,234,.1),rgba(118,75,162,.1));border:1px solid rgba(102,126,234,.2);color:#667eea;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .exchange-tag .anticon[data-v-bbcac474]{font-size:11px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .strategy-type-tag[data-v-bbcac474]{-ms-flex-negative:0;flex-shrink:0;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:10px;line-height:1.5;margin-left:4px;padding:2px 8px;border-radius:6px;background:linear-gradient(135deg,rgba(156,39,176,.1),rgba(103,58,183,.1));border:1px solid rgba(156,39,176,.2)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .strategy-type-tag .anticon[data-v-bbcac474]{font-size:10px;margin-right:3px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header[data-v-bbcac474] .status-stopped{color:#f6465d!important;border-color:#f6465d!important}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description{max-width:calc(100% - 20px);overflow:hidden}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;gap:12px;margin-top:8px;font-size:12px;color:var(--text-color-secondary,#8c8c8c);-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;max-width:100%;overflow:hidden}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info .status-label{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;padding:4px 12px;border-radius:16px;font-size:11px;font-weight:600;line-height:1;border:1px solid transparent;-ms-flex-negative:0;flex-shrink:0;background:linear-gradient(135deg,#f0f2f5,#e8eaed);color:#595959;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info .status-label:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info .status-running{background:linear-gradient(135deg,rgba(14,203,129,.15),rgba(14,203,129,.08));color:#0ecb81;border-color:rgba(14,203,129,.3);-webkit-box-shadow:0 2px 8px rgba(14,203,129,.2);box-shadow:0 2px 8px rgba(14,203,129,.2)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info .status-running:before{-webkit-animation:statusPulse-bbcac474 2s infinite;animation:statusPulse-bbcac474 2s infinite;-webkit-box-shadow:0 0 8px #0ecb81;box-shadow:0 0 8px #0ecb81}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info .status-stopped{background:linear-gradient(135deg,rgba(246,70,93,.15),rgba(246,70,93,.08));color:#f6465d;border-color:rgba(246,70,93,.3)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info .status-error{background:linear-gradient(135deg,rgba(255,77,79,.15),rgba(255,77,79,.08));color:#ff4d4f;border-color:rgba(255,77,79,.3)}@-webkit-keyframes statusPulse-bbcac474{0%,to{opacity:1}50%{opacity:.5}}@keyframes statusPulse-bbcac474{0%,to{opacity:1}50%{opacity:.5}}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info .info-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;-ms-flex-negative:1;flex-shrink:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info .info-item.strategy-name-text{font-weight:500;color:#1e3a5f;max-width:120px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info/deep/.ant-tag{margin-right:0;font-size:11px;line-height:18px;padding:0 6px}.trading-assistant .strategy-detail-col[data-v-bbcac474]{height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;overflow-y:auto}.trading-assistant .strategy-detail-col .empty-detail[data-v-bbcac474]{height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background:linear-gradient(135deg,hsla(0,0%,100%,.8),rgba(248,250,252,.9));border-radius:16px;border:2px dashed #e0e6ed;-webkit-transition:all .3s ease;transition:all .3s ease}.trading-assistant .strategy-detail-col .empty-detail[data-v-bbcac474]:hover{border-color:#1890ff;background:linear-gradient(135deg,rgba(24,144,255,.02),rgba(24,144,255,.05))}.trading-assistant .strategy-detail-col .empty-detail[data-v-bbcac474] .ant-empty-image{opacity:.6}.trading-assistant .strategy-detail-col .empty-detail[data-v-bbcac474] .ant-empty-description{color:#8c8c8c;font-size:14px}.trading-assistant .strategy-detail-col .strategy-detail-panel[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:16px;min-height:100%}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card[data-v-bbcac474]{-ms-flex-negative:0;flex-shrink:0;background:linear-gradient(135deg,#fff,#f8fafc);border:none;border-radius:16px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08);-webkit-transition:all .3s ease;transition:all .3s ease}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card[data-v-bbcac474]:hover{-webkit-box-shadow:0 8px 32px rgba(0,0,0,.12);box-shadow:0 8px 32px rgba(0,0,0,.12)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card[data-v-bbcac474] .ant-card-head{background:transparent;border-bottom:none}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card[data-v-bbcac474] .ant-card-body{background:transparent;padding:20px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:24px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left[data-v-bbcac474]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:12px;margin-bottom:16px;-ms-flex-wrap:wrap;flex-wrap:wrap}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .strategy-title[data-v-bbcac474]{font-size:20px;font-weight:700;margin:0;background:linear-gradient(135deg,#1e3a5f,#2d5a87);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge[data-v-bbcac474]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;padding:6px 14px;border-radius:20px;font-size:13px;font-weight:600;-webkit-transition:all .3s ease;transition:all .3s ease}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge .status-dot[data-v-bbcac474]{width:8px;height:8px;border-radius:50%;-webkit-animation:pulse-bbcac474 2s infinite;animation:pulse-bbcac474 2s infinite}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge.status-running[data-v-bbcac474]{background:linear-gradient(135deg,rgba(14,203,129,.15),rgba(14,203,129,.08));color:#0ecb81;border:1px solid rgba(14,203,129,.3)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge.status-running .status-dot[data-v-bbcac474]{background:#0ecb81;-webkit-box-shadow:0 0 12px #0ecb81;box-shadow:0 0 12px #0ecb81}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge.status-stopped[data-v-bbcac474]{background:linear-gradient(135deg,rgba(246,70,93,.15),rgba(246,70,93,.08));color:#f6465d;border:1px solid rgba(246,70,93,.3)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge.status-stopped .status-dot[data-v-bbcac474]{background:#f6465d;-webkit-animation:none;animation:none}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge.status-error[data-v-bbcac474]{background:linear-gradient(135deg,rgba(255,77,79,.15),rgba(255,77,79,.08));color:#ff4d4f;border:1px solid rgba(255,77,79,.3)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge.status-error .status-dot[data-v-bbcac474]{background:#ff4d4f;-webkit-animation:none;animation:none}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:12px;margin-bottom:14px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px;padding:10px 14px;background:#fff;border-radius:8px;border:1px solid #f0f0f0;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card[data-v-bbcac474]:hover{-webkit-box-shadow:0 2px 8px rgba(0,0,0,.06);box-shadow:0 2px 8px rgba(0,0,0,.06)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-icon[data-v-bbcac474]{width:36px;height:36px;border-radius:8px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;font-size:16px;-ms-flex-negative:0;flex-shrink:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-icon.investment[data-v-bbcac474]{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-icon.equity[data-v-bbcac474]{background:linear-gradient(135deg,#11998e,#38ef7d);color:#fff}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-icon.pnl[data-v-bbcac474]{background:linear-gradient(135deg,#f093fb,#f5576c);color:#fff}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-content[data-v-bbcac474]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-content .stat-label[data-v-bbcac474]{font-size:11px;color:#8c8c8c;margin-bottom:2px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-content .stat-value[data-v-bbcac474]{font-size:15px;font-weight:700;color:#1e3a5f;line-height:1.2}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-content .stat-value .pnl-percent[data-v-bbcac474]{font-size:12px;font-weight:500;opacity:.8}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card.pnl-card.profit .stat-content .stat-value[data-v-bbcac474]{color:#0ecb81}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card.pnl-card.loss .stat-content .stat-value[data-v-bbcac474]{color:#f6465d}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-tags[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-tags .tag-item[data-v-bbcac474]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;padding:4px 10px;background:#f5f7fa;border-radius:14px;font-size:12px;color:#5a6872;border:1px solid #e8ecf1}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-tags .tag-item .anticon[data-v-bbcac474]{font-size:12px;color:#1890ff}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right[data-v-bbcac474]{-ms-flex-negative:0;flex-shrink:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .action-btn[data-v-bbcac474]{min-width:120px;height:38px;border-radius:8px;font-size:14px;font-weight:600;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:6px;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .action-btn .anticon[data-v-bbcac474]{font-size:16px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .action-btn.start-btn[data-v-bbcac474]{background:linear-gradient(135deg,#0ecb81,#26d87d);border:none;-webkit-box-shadow:0 2px 8px rgba(14,203,129,.3);box-shadow:0 2px 8px rgba(14,203,129,.3)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .action-btn.start-btn[data-v-bbcac474]:hover{-webkit-box-shadow:0 4px 12px rgba(14,203,129,.4);box-shadow:0 4px 12px rgba(14,203,129,.4)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .action-btn.stop-btn[data-v-bbcac474]{background:linear-gradient(135deg,#f6465d,#ff6b7a);border:none;-webkit-box-shadow:0 2px 8px rgba(246,70,93,.3);box-shadow:0 2px 8px rgba(246,70,93,.3)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .action-btn.stop-btn[data-v-bbcac474]:hover{-webkit-box-shadow:0 4px 12px rgba(246,70,93,.4);box-shadow:0 4px 12px rgba(246,70,93,.4)}@-webkit-keyframes pulse-bbcac474{0%,to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}50%{opacity:.6;-webkit-transform:scale(1.1);transform:scale(1.1)}}@keyframes pulse-bbcac474{0%,to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}50%{opacity:.6;-webkit-transform:scale(1.1);transform:scale(1.1)}}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474]{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;background:#fff;border:none;border-radius:16px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08);-webkit-transition:all .3s ease;transition:all .3s ease;min-height:400px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474]:hover{-webkit-box-shadow:0 8px 32px rgba(0,0,0,.12);box-shadow:0 8px 32px rgba(0,0,0,.12)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-card-head{background:-webkit-gradient(linear,left top,left bottom,from(#fafbfc),to(#fff));background:linear-gradient(180deg,#fafbfc,#fff);border-bottom:1px solid #f0f0f0;-ms-flex-negative:0;flex-shrink:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-card-body{padding:16px;background:#fff}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-card-body,.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-card-body .ant-tabs{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-card-body .ant-tabs .ant-tabs-bar{-ms-flex-negative:0;flex-shrink:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-card-body .ant-tabs .ant-tabs-content{-webkit-box-flex:1;-ms-flex:1;flex:1}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-card-body .ant-tabs .ant-tabs-tabpane .position-records,.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-card-body .ant-tabs .ant-tabs-tabpane .trading-records{width:100%}.trading-assistant.theme-dark[data-v-bbcac474]{background:-webkit-gradient(linear,left top,left bottom,from(#0d1117),to(#161b22));background:linear-gradient(180deg,#0d1117,#161b22);color:var(--dark-text-color,#fff)}.trading-assistant.theme-dark .creation-mode-toggle[data-v-bbcac474]{background:rgba(24,144,255,.08);border-color:rgba(24,144,255,.2)}.trading-assistant.theme-dark .creation-mode-toggle .mode-hint[data-v-bbcac474]{color:hsla(0,0%,100%,.45)}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-bbcac474]{background:-webkit-gradient(linear,left top,left bottom,from(#1e222d),to(#1a1e28));background:linear-gradient(180deg,#1e222d,#1a1e28);border:1px solid hsla(0,0%,100%,.06);-webkit-box-shadow:0 4px 24px rgba(0,0,0,.25);box-shadow:0 4px 24px rgba(0,0,0,.25)}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card .card-title span[data-v-bbcac474]{background:linear-gradient(135deg,#e0e6ed,#c5ccd6);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-bbcac474] .ant-card-head{background:-webkit-gradient(linear,left top,left bottom,from(#252a36),to(#1e222d));background:linear-gradient(180deg,#252a36,#1e222d);border-bottom-color:hsla(0,0%,100%,.06)}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-bbcac474] .ant-card-head .ant-card-head-title{color:#d1d4dc}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-bbcac474] .ant-card-body{background:transparent}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-bbcac474] .ant-empty-description{color:#868993}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-bbcac474] .ant-list .ant-list-item{border-bottom-color:hsla(0,0%,100%,.06)}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-bbcac474] .ant-list .ant-list-item .ant-list-item-meta-title{color:#d1d4dc}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-bbcac474] .ant-list .ant-list-item .ant-list-item-meta-description{color:#868993}.trading-assistant.theme-dark .strategy-list-col .strategy-list-item[data-v-bbcac474]{background:hsla(0,0%,100%,.02);border:1px solid hsla(0,0%,100%,.04)}.trading-assistant.theme-dark .strategy-list-col .strategy-list-item[data-v-bbcac474]:hover{background:linear-gradient(135deg,rgba(24,144,255,.08),rgba(24,144,255,.04));border-color:rgba(24,144,255,.2)}.trading-assistant.theme-dark .strategy-list-col .strategy-list-item.active[data-v-bbcac474]{background:linear-gradient(135deg,rgba(24,144,255,.12),rgba(24,144,255,.06));border-color:#1890ff;-webkit-box-shadow:0 4px 20px rgba(24,144,255,.2);box-shadow:0 4px 20px rgba(24,144,255,.2)}.trading-assistant.theme-dark .strategy-list-col .strategy-list-item .strategy-name[data-v-bbcac474]{color:#e0e6ed}.trading-assistant.theme-dark .strategy-list-col .strategy-list-item .strategy-item-info[data-v-bbcac474]{color:#868993}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card[data-v-bbcac474]{background:linear-gradient(135deg,#1e222d,#1a1e28);border:1px solid hsla(0,0%,100%,.06);-webkit-box-shadow:0 4px 24px rgba(0,0,0,.25);box-shadow:0 4px 24px rgba(0,0,0,.25)}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card[data-v-bbcac474] .ant-card-head{background:transparent;border-bottom:none}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card[data-v-bbcac474] .ant-card-body{background:transparent}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .strategy-title-row .strategy-title[data-v-bbcac474]{background:linear-gradient(135deg,#e0e6ed,#c5ccd6);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .key-stats-grid .stat-card[data-v-bbcac474]{background:hsla(0,0%,100%,.03);border-color:hsla(0,0%,100%,.06)}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .key-stats-grid .stat-card[data-v-bbcac474]:hover{background:hsla(0,0%,100%,.06);border-color:hsla(0,0%,100%,.1)}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .key-stats-grid .stat-card .stat-content .stat-label[data-v-bbcac474]{color:#868993}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .key-stats-grid .stat-card .stat-content .stat-value[data-v-bbcac474]{color:#e0e6ed}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .strategy-tags .tag-item[data-v-bbcac474]{background:hsla(0,0%,100%,.04);border-color:hsla(0,0%,100%,.08);color:#a0a8b3}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .strategy-tags .tag-item[data-v-bbcac474]:hover{background:rgba(24,144,255,.1);border-color:rgba(24,144,255,.3)}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-bbcac474]{background:-webkit-gradient(linear,left top,left bottom,from(#1e222d),to(#1a1e28));background:linear-gradient(180deg,#1e222d,#1a1e28);border:1px solid hsla(0,0%,100%,.06);-webkit-box-shadow:0 4px 24px rgba(0,0,0,.25);box-shadow:0 4px 24px rgba(0,0,0,.25)}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-bbcac474] .ant-card-head{background:hsla(0,0%,100%,.02);border-bottom-color:hsla(0,0%,100%,.06)}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-bbcac474] .ant-card-head .ant-card-head-title{color:#d1d4dc}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-bbcac474] .ant-card-body{background:transparent}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-bbcac474] .ant-tabs .ant-tabs-nav .ant-tabs-tab{color:#868993}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-bbcac474] .ant-tabs .ant-tabs-nav .ant-tabs-tab:hover{color:#d1d4dc}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-bbcac474] .ant-tabs .ant-tabs-nav .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn{color:#1890ff}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-bbcac474] .ant-tabs .ant-tabs-nav .ant-tabs-ink-bar{background:-webkit-gradient(linear,left top,right top,from(#1890ff),to(#40a9ff));background:linear-gradient(90deg,#1890ff,#40a9ff)}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-bbcac474] .ant-tabs .ant-tabs-content{color:#d1d4dc}.trading-assistant.theme-dark .empty-detail[data-v-bbcac474] .ant-empty-description,.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-bbcac474] .ant-empty-description{color:#868993}.theme-dark .assistant-guide-bar[data-v-bbcac474]{border-color:rgba(23,125,220,.28);background:linear-gradient(135deg,rgba(23,125,220,.14),rgba(114,46,209,.12))}.theme-dark .assistant-guide-bar .assistant-guide-eyebrow[data-v-bbcac474]{background:rgba(23,125,220,.2);color:#69c0ff}.theme-dark .assistant-guide-bar .assistant-guide-title[data-v-bbcac474]{color:hsla(0,0%,100%,.92)}.theme-dark .assistant-guide-bar .assistant-guide-desc[data-v-bbcac474]{color:hsla(0,0%,100%,.72)}.theme-dark .assistant-guide-bar .assistant-step-card[data-v-bbcac474]{background:rgba(15,23,42,.38);border-color:hsla(0,0%,100%,.08)}.theme-dark .assistant-guide-bar .assistant-step-title[data-v-bbcac474]{color:hsla(0,0%,100%,.9)}.theme-dark .assistant-guide-bar .assistant-step-desc[data-v-bbcac474]{color:hsla(0,0%,100%,.58)}.theme-dark .strategy-empty-state .strategy-empty-desc[data-v-bbcac474]{color:hsla(0,0%,100%,.72)}.theme-dark .strategy-empty-state .strategy-empty-path[data-v-bbcac474]{color:hsla(0,0%,100%,.48)}.ai-filter-box[data-v-bbcac474]{margin-top:12px;padding:14px 14px 12px;border:1px solid #e8e8e8;border-radius:10px;background:-webkit-gradient(linear,left top,left bottom,from(#fafcff),to(#fff));background:linear-gradient(180deg,#fafcff,#fff)}.ai-filter-header[data-v-bbcac474]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px}.ai-filter-header[data-v-bbcac474],.ai-filter-title[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ai-filter-title[data-v-bbcac474]{gap:8px;font-weight:600;color:#262626}.ai-filter-title .anticon[data-v-bbcac474]{color:#1890ff}.ai-filter-hint[data-v-bbcac474]{margin-top:6px;font-size:12px;line-height:1.5;color:#8c8c8c}.symbol-option[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.symbol-name[data-v-bbcac474]{font-weight:600;color:#8f8d8d;margin-right:8px}.symbol-name-extra[data-v-bbcac474]{font-size:12px;color:#999;margin-left:4px}.creation-mode-toggle[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:16px;margin-bottom:16px;padding:14px 16px;background:rgba(24,144,255,.04);border-radius:8px;border:1px solid rgba(24,144,255,.12)}.creation-mode-toggle .mode-meta[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:4px}.creation-mode-toggle .mode-title[data-v-bbcac474]{font-size:14px;font-weight:600;color:#262626}.creation-mode-toggle .mode-hint[data-v-bbcac474]{color:rgba(0,0,0,.45);font-size:12px}@media (max-width:768px){.creation-mode-toggle[data-v-bbcac474]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}}.section-block-title[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:4px;margin-bottom:16px;font-size:14px;font-weight:600;color:#262626}.section-block-desc[data-v-bbcac474]{font-size:12px;font-weight:400;color:#8c8c8c}.simple-mode-hero[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:16px;padding:14px 16px;margin-bottom:16px;border-radius:10px;background:linear-gradient(135deg,rgba(24,144,255,.08),rgba(114,46,209,.06));border:1px solid rgba(24,144,255,.14)}.simple-mode-hero-main[data-v-bbcac474]{min-width:0}.simple-mode-kicker[data-v-bbcac474]{font-size:12px;font-weight:600;color:#1890ff;margin-bottom:4px}.simple-mode-hero-desc[data-v-bbcac474]{font-size:12px;line-height:1.6;color:#595959}.simple-mode-badges[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}.advanced-settings-shell[data-v-bbcac474],.selected-indicator-card[data-v-bbcac474],.simple-essentials-card[data-v-bbcac474]{padding:20px;margin-bottom:18px;border-radius:12px;background:#fafcff;border:1px solid rgba(24,144,255,.12);-webkit-box-shadow:0 8px 24px rgba(15,23,42,.04);box-shadow:0 8px 24px rgba(15,23,42,.04)}.required-label[data-v-bbcac474]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.required-star[data-v-bbcac474]{color:#f5222d;margin-right:4px}.compact-form-item[data-v-bbcac474]{margin-bottom:18px}.compact-grid-row[data-v-bbcac474]{margin-bottom:4px}.execution-step-layout[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:16px}.execution-step-hero[data-v-bbcac474]{padding:16px 18px;border-radius:12px;background:linear-gradient(135deg,rgba(82,196,26,.08),rgba(24,144,255,.08));border:1px solid rgba(24,144,255,.14)}.execution-step-hero-desc[data-v-bbcac474]{font-size:12px;line-height:1.7;color:#595959}.execution-section-card[data-v-bbcac474]{padding:18px 20px;border-radius:12px;background:#fafcff;border:1px solid rgba(24,144,255,.12);-webkit-box-shadow:0 8px 24px rgba(15,23,42,.04);box-shadow:0 8px 24px rgba(15,23,42,.04)}.section-inline-alert[data-v-bbcac474]{margin-top:4px}.notify-channel-grid[data-v-bbcac474]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 12px}.execution-warn-text[data-v-bbcac474]{color:#ff9800}.execution-mode-cards[data-v-bbcac474]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.execution-mode-card[data-v-bbcac474]{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:14px;min-height:110px;padding:16px;border-radius:12px;border:1px solid rgba(24,144,255,.12);background:#fff;cursor:pointer;-webkit-transition:all .2s ease;transition:all .2s ease}.execution-mode-card[data-v-bbcac474]:hover{border-color:rgba(24,144,255,.35);-webkit-box-shadow:0 8px 24px rgba(24,144,255,.08);box-shadow:0 8px 24px rgba(24,144,255,.08)}.execution-mode-card.active[data-v-bbcac474]{border-color:#1890ff;background:linear-gradient(135deg,rgba(24,144,255,.08),rgba(24,144,255,.03));-webkit-box-shadow:0 10px 28px rgba(24,144,255,.12);box-shadow:0 10px 28px rgba(24,144,255,.12)}.execution-mode-card.disabled[data-v-bbcac474]{cursor:not-allowed;opacity:.68;background:#fafafa}.execution-mode-card.disabled[data-v-bbcac474]:hover{border-color:rgba(24,144,255,.12);-webkit-box-shadow:none;box-shadow:none}.execution-mode-card-icon[data-v-bbcac474]{-webkit-box-flex:0;-ms-flex:0 0 42px;flex:0 0 42px;width:42px;height:42px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:12px;font-size:18px}.execution-mode-card-icon.signal[data-v-bbcac474]{color:#1890ff;background:rgba(24,144,255,.1)}.execution-mode-card-icon.live[data-v-bbcac474]{color:#fa8c16;background:rgba(250,140,22,.12)}.execution-mode-card-body[data-v-bbcac474]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.execution-mode-card-title[data-v-bbcac474]{font-size:14px;font-weight:600;color:#262626;margin-bottom:6px}.execution-mode-card-desc[data-v-bbcac474]{font-size:12px;line-height:1.6;color:#8c8c8c}.execution-mode-card-check[data-v-bbcac474]{position:absolute;top:12px;right:12px;color:#1890ff;font-size:18px}.steps-container[data-v-bbcac474]{margin-bottom:24px}@media (max-width:768px){.steps-container[data-v-bbcac474]{margin-bottom:16px}.steps-container[data-v-bbcac474] .ant-steps-item-title{font-size:12px}.steps-container[data-v-bbcac474] .ant-steps-item-icon{width:24px;height:24px;line-height:24px;font-size:12px}}.form-container[data-v-bbcac474]{min-height:400px;padding:24px 0}.form-container .step-content[data-v-bbcac474]{-webkit-animation:fadeIn-bbcac474 .3s;animation:fadeIn-bbcac474 .3s}.form-container[data-v-bbcac474] .ant-form-item{margin-bottom:20px}@media (max-width:768px){.form-container[data-v-bbcac474]{min-height:300px;padding:16px 0}.form-container .simple-mode-hero[data-v-bbcac474]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.form-container .simple-mode-badges[data-v-bbcac474]{width:100%}.form-container .notify-channel-grid[data-v-bbcac474]{grid-template-columns:repeat(2,minmax(0,1fr))}.form-container .execution-mode-cards[data-v-bbcac474]{grid-template-columns:1fr}.form-container .execution-section-card[data-v-bbcac474],.form-container .execution-step-hero[data-v-bbcac474]{padding:16px}.form-container[data-v-bbcac474] .ant-form-item-label{padding-bottom:4px}.form-container[data-v-bbcac474] .ant-form-item-label label{font-size:13px}.form-container[data-v-bbcac474] .ant-input,.form-container[data-v-bbcac474] .ant-input-number,.form-container[data-v-bbcac474] .ant-select{font-size:14px}.form-container[data-v-bbcac474] .ant-radio-group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:8px}.form-container[data-v-bbcac474] .ant-radio-group .ant-radio-wrapper{font-size:13px}}@media (max-width:480px){.form-container[data-v-bbcac474]{min-height:250px;padding:12px 0}.form-container[data-v-bbcac474] .ant-form-item-label label{font-size:12px}.form-container[data-v-bbcac474] .ant-input,.form-container[data-v-bbcac474] .ant-input-number,.form-container[data-v-bbcac474] .ant-select{font-size:13px}}.strategy-type-selector[data-v-bbcac474]{padding:16px 0}.strategy-type-selector .market-category-selector[data-v-bbcac474]{margin-bottom:16px}.strategy-type-selector .market-category-selector .selector-label[data-v-bbcac474]{font-weight:600;margin-bottom:8px;color:#262626}.strategy-type-selector .market-category-selector[data-v-bbcac474] .ant-radio-group{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px}.strategy-type-selector .strategy-type-card[data-v-bbcac474]{cursor:pointer;-webkit-transition:all .3s;transition:all .3s;height:100%;min-height:180px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.strategy-type-selector .strategy-type-card[data-v-bbcac474]:hover{border-color:#1890ff;-webkit-box-shadow:0 2px 8px rgba(24,144,255,.2);box-shadow:0 2px 8px rgba(24,144,255,.2)}.strategy-type-selector .strategy-type-card.selected[data-v-bbcac474]{border-color:#1890ff;background-color:#e6f7ff;-webkit-box-shadow:0 2px 8px rgba(24,144,255,.3);box-shadow:0 2px 8px rgba(24,144,255,.3)}.strategy-type-selector .strategy-type-card .strategy-type-content[data-v-bbcac474]{text-align:center;padding:16px}.strategy-type-selector .strategy-type-card .strategy-type-content .strategy-type-icon[data-v-bbcac474]{font-size:48px;color:#1890ff;margin-bottom:16px}.strategy-type-selector .strategy-type-card .strategy-type-content h3[data-v-bbcac474]{font-size:18px;font-weight:600;margin-bottom:8px;color:#1f1f1f}.strategy-type-selector .strategy-type-card .strategy-type-content p[data-v-bbcac474]{font-size:14px;color:#8c8c8c;margin:0;line-height:1.6}.indicator-option[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:12px}.indicator-option .indicator-option-main[data-v-bbcac474]{-webkit-box-flex:1;-ms-flex:1;flex:1}.indicator-option .indicator-name[data-v-bbcac474]{display:block;color:#262626;font-weight:600}.indicator-option-desc[data-v-bbcac474]{display:block;margin-top:2px;color:#8c8c8c;font-size:12px;line-height:1.5}.selected-indicator-header[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px;margin-bottom:8px}.selected-indicator-name[data-v-bbcac474]{font-weight:600;color:#262626}.indicator-description[data-v-bbcac474]{border-radius:4px;color:var(--text-color,#666);font-size:14px;line-height:1.6}.theme-dark .advanced-settings-shell[data-v-bbcac474],.theme-dark .creation-mode-toggle[data-v-bbcac474],.theme-dark .selected-indicator-card[data-v-bbcac474],.theme-dark .simple-essentials-card[data-v-bbcac474]{background:hsla(0,0%,100%,.04);border-color:hsla(0,0%,100%,.1)}.theme-dark .indicator-option .indicator-name[data-v-bbcac474],.theme-dark .mode-title[data-v-bbcac474],.theme-dark .section-block-title[data-v-bbcac474],.theme-dark .selected-indicator-name[data-v-bbcac474]{color:hsla(0,0%,100%,.9)}.theme-dark .indicator-option-desc[data-v-bbcac474],.theme-dark .mode-hint[data-v-bbcac474],.theme-dark .section-block-desc[data-v-bbcac474]{color:hsla(0,0%,100%,.6)}.theme-dark .simple-mode-hero[data-v-bbcac474]{background:linear-gradient(135deg,rgba(24,144,255,.14),rgba(114,46,209,.12));border-color:rgba(64,169,255,.18)}.theme-dark .execution-step-hero[data-v-bbcac474]{background:linear-gradient(135deg,rgba(82,196,26,.14),rgba(24,144,255,.14));border-color:rgba(64,169,255,.18)}.theme-dark .execution-mode-card[data-v-bbcac474]{background:hsla(0,0%,100%,.03);border-color:hsla(0,0%,100%,.08)}.theme-dark .execution-mode-card[data-v-bbcac474]:hover{border-color:rgba(64,169,255,.3);-webkit-box-shadow:0 8px 24px rgba(24,144,255,.12);box-shadow:0 8px 24px rgba(24,144,255,.12)}.theme-dark .execution-mode-card.active[data-v-bbcac474]{background:linear-gradient(135deg,rgba(24,144,255,.16),rgba(24,144,255,.08));border-color:#1890ff}.theme-dark .execution-mode-card.disabled[data-v-bbcac474]{background:hsla(0,0%,100%,.02)}.theme-dark .execution-mode-card-title[data-v-bbcac474]{color:#e0e6ed}.theme-dark .execution-mode-card-desc[data-v-bbcac474]{color:hsla(0,0%,100%,.6)}.theme-dark .simple-mode-kicker[data-v-bbcac474]{color:#69c0ff}.theme-dark .execution-step-hero-desc[data-v-bbcac474],.theme-dark .simple-mode-hero-desc[data-v-bbcac474]{color:hsla(0,0%,100%,.72)}.indicator-params-form[data-v-bbcac474]{padding:12px;background-color:var(--bg-color-secondary,#f5f7fa);border-radius:6px;border:1px dashed var(--border-color,#e0e0e0)}.indicator-params-form .param-item[data-v-bbcac474]{margin-bottom:12px}.indicator-params-form .param-label[data-v-bbcac474]{display:block;font-size:13px;color:var(--text-color,#666);margin-bottom:4px;font-weight:500}.form-item-hint[data-v-bbcac474]{margin-top:4px;font-size:12px;color:var(--text-color-secondary,#8c8c8c)}.test-result[data-v-bbcac474]{margin-top:8px;padding:8px;border-radius:4px;font-size:14px}.test-result.success[data-v-bbcac474]{background-color:#f6ffed;border:1px solid #b7eb8f;color:#52c41a}.ip-whitelist-tip[data-v-bbcac474]{margin-top:12px;padding:12px;background-color:#e6f7ff;border:1px solid #91d5ff;border-radius:4px;font-size:13px;color:#1890ff;line-height:1.6}.ip-whitelist-tip .anticon[data-v-bbcac474]{margin-right:6px;color:#1890ff}.ip-whitelist-tip .ip-list[data-v-bbcac474]{margin-top:8px;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:6px}.ip-whitelist-tip .ip-list .ant-tag[data-v-bbcac474]{margin:0;font-family:Courier New,monospace;font-size:12px}.ip-whitelist-tip.error[data-v-bbcac474]{background-color:#fff2f0;border:1px solid #ffccc7;color:#ff4d4f}@-webkit-keyframes fadeIn-bbcac474{0%{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes fadeIn-bbcac474{0%{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}[data-v-bbcac474] .danger-item{color:#ff4d4f}[data-v-bbcac474] .mobile-modal .ant-modal{top:20px;padding-bottom:0}[data-v-bbcac474] .mobile-modal .ant-modal-content{max-height:calc(100vh - 40px);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}[data-v-bbcac474] .mobile-modal .ant-modal-body{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:16px}[data-v-bbcac474] .mobile-modal .ant-modal-footer{padding:12px 16px;border-top:1px solid #e8e8e8;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}[data-v-bbcac474] .mobile-modal .ant-modal-footer .ant-btn{font-size:13px;padding:0 12px;height:32px}.add-symbol-modal-content .market-tabs[data-v-bbcac474],.add-symbol-modal-content .symbol-search-section[data-v-bbcac474]{margin-bottom:16px}.add-symbol-modal-content .section-title[data-v-bbcac474]{font-weight:500;margin-bottom:8px;color:rgba(0,0,0,.85);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.add-symbol-modal-content .hot-symbols-section[data-v-bbcac474],.add-symbol-modal-content .search-results-section[data-v-bbcac474]{margin-bottom:16px}.add-symbol-modal-content .symbol-list .symbol-list-item[data-v-bbcac474]{cursor:pointer;-webkit-transition:background-color .3s;transition:background-color .3s;padding:8px 12px;border-radius:4px}.add-symbol-modal-content .symbol-list .symbol-list-item[data-v-bbcac474]:hover{background-color:#f5f5f5}.add-symbol-modal-content .symbol-item-content[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.add-symbol-modal-content .symbol-item-content .symbol-code[data-v-bbcac474]{font-weight:500;margin-right:8px}.add-symbol-modal-content .symbol-item-content .symbol-name[data-v-bbcac474]{color:rgba(0,0,0,.45)}.add-symbol-modal-content .selected-symbol-section[data-v-bbcac474]{padding:12px;background-color:#f6ffed;border:1px solid #b7eb8f;border-radius:4px;margin-top:16px}.add-symbol-modal-content .selected-symbol-section .selected-symbol-info[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-top:8px}.add-symbol-modal-content .selected-symbol-section .selected-symbol-info .symbol-code[data-v-bbcac474]{font-weight:500;margin-right:8px}.add-symbol-modal-content .selected-symbol-section .selected-symbol-info .symbol-name[data-v-bbcac474]{color:rgba(0,0,0,.45)}body.dark .mode-selector-modal .ant-modal-content{background:#1e222d;border:1px solid hsla(0,0%,100%,.08)}body.dark .mode-selector-modal .ant-modal-content .ant-modal-header{background:#252a36;border-bottom-color:hsla(0,0%,100%,.06)}body.dark .mode-selector-modal .ant-modal-content .ant-modal-header .ant-modal-title{color:#e0e6ed}body.dark .mode-selector-modal .ant-modal-content .ant-modal-close-x{color:hsla(0,0%,100%,.45)}body.dark .mode-selector-modal .ant-modal-content .ant-modal-body{color:#d1d4dc}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content{background:#1e222d;border:1px solid hsla(0,0%,100%,.08);-webkit-box-shadow:0 18px 48px rgba(0,0,0,.45);box-shadow:0 18px 48px rgba(0,0,0,.45)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .ant-modal-header{background:-webkit-gradient(linear,left top,left bottom,from(#252a36),to(#1e222d));background:linear-gradient(180deg,#252a36,#1e222d);border-bottom-color:hsla(0,0%,100%,.06)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .ant-modal-header .ant-modal-title{color:#e0e6ed}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .ant-modal-close-x{color:hsla(0,0%,100%,.45)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .ant-modal-body{color:#d1d4dc;background:-webkit-gradient(linear,left top,left bottom,from(rgba(19,23,31,.72)),to(rgba(30,34,45,.9)));background:linear-gradient(180deg,rgba(19,23,31,.72),rgba(30,34,45,.9))}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .creation-mode-toggle{background:rgba(24,144,255,.08);border-color:rgba(24,144,255,.2)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .creation-mode-toggle .mode-hint,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .creation-mode-toggle .mode-title{color:hsla(0,0%,100%,.72)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-title{color:hsla(0,0%,100%,.65)!important}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-description{color:hsla(0,0%,100%,.35)!important}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-icon{border-color:hsla(0,0%,100%,.2)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-icon .ant-steps-icon{color:hsla(0,0%,100%,.45)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-finish .ant-steps-item-icon,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-process .ant-steps-item-icon{border-color:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-tail:after{background:hsla(0,0%,100%,.1)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-form-item-label>label{color:hsla(0,0%,100%,.75)}body.dark .strategy-form-modal.strategy-form-modal-dark .notify-channel-grid .ant-checkbox-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-height:40px;padding:0 12px;border-radius:10px;background:hsla(0,0%,100%,.03);border:1px solid hsla(0,0%,100%,.08);color:hsla(0,0%,100%,.72)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number{background:#1a1e28;border-color:hsla(0,0%,100%,.12);color:#d1d4dc}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number::-webkit-input-placeholder,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input::-webkit-input-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number::-moz-placeholder,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input::-moz-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number:-ms-input-placeholder,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input:-ms-input-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number::-ms-input-placeholder,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input::-ms-input-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number::placeholder,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input::placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number:focus,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number:hover,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input:focus,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input:hover{border-color:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number-handler-wrap{background:#252a36;border-left-color:hsla(0,0%,100%,.12)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number-handler-wrap .ant-input-number-handler{border-bottom-color:hsla(0,0%,100%,.08);color:hsla(0,0%,100%,.45)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number-handler-wrap .ant-input-number-handler:hover{color:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-select .ant-select-selection{background:#1a1e28;border-color:hsla(0,0%,100%,.12);color:#d1d4dc}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-select .ant-select-selection .ant-select-arrow{color:hsla(0,0%,100%,.35)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-select .ant-select-selection:hover{border-color:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-radio-group .ant-radio-button-wrapper{background:#1a1e28;border-color:hsla(0,0%,100%,.12);color:hsla(0,0%,100%,.65)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-radio-group .ant-radio-button-wrapper:hover{color:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#1890ff;border-color:#1890ff;color:#fff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-radio-group .ant-radio-wrapper{color:hsla(0,0%,100%,.65)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-switch{background:hsla(0,0%,100%,.15)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-switch.ant-switch-checked{background:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark textarea.ant-input{background:#1a1e28;border-color:hsla(0,0%,100%,.12);color:#d1d4dc}body.dark .strategy-form-modal.strategy-form-modal-dark textarea.ant-input::-webkit-input-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark textarea.ant-input::-moz-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark textarea.ant-input:-ms-input-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark textarea.ant-input::-ms-input-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark textarea.ant-input::placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-form-explain,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-form-extra{color:hsla(0,0%,100%,.35)}body.dark .strategy-form-modal.strategy-form-modal-dark .advanced-settings-shell,body.dark .strategy-form-modal.strategy-form-modal-dark .execution-section-card,body.dark .strategy-form-modal.strategy-form-modal-dark .selected-indicator-card,body.dark .strategy-form-modal.strategy-form-modal-dark .simple-essentials-card{background:hsla(0,0%,100%,.03);border-color:hsla(0,0%,100%,.08);-webkit-box-shadow:none;box-shadow:none}body.dark .strategy-form-modal.strategy-form-modal-dark .simple-mode-hero{background:linear-gradient(135deg,rgba(24,144,255,.16),rgba(114,46,209,.14));border-color:rgba(64,169,255,.2)}body.dark .strategy-form-modal.strategy-form-modal-dark .execution-step-hero{background:linear-gradient(135deg,rgba(82,196,26,.16),rgba(24,144,255,.14));border-color:rgba(64,169,255,.2)}body.dark .strategy-form-modal.strategy-form-modal-dark .mode-title,body.dark .strategy-form-modal.strategy-form-modal-dark .section-block-title,body.dark .strategy-form-modal.strategy-form-modal-dark .selected-indicator-name{color:#e0e6ed}body.dark .strategy-form-modal.strategy-form-modal-dark .execution-step-hero-desc,body.dark .strategy-form-modal.strategy-form-modal-dark .form-item-hint,body.dark .strategy-form-modal.strategy-form-modal-dark .indicator-description,body.dark .strategy-form-modal.strategy-form-modal-dark .section-block-desc,body.dark .strategy-form-modal.strategy-form-modal-dark .simple-mode-hero-desc{color:hsla(0,0%,100%,.62)}body.dark .strategy-form-modal.strategy-form-modal-dark .ai-filter-box{background:#1a1e28;border-color:hsla(0,0%,100%,.1)}body.dark .strategy-form-modal.strategy-form-modal-dark .ai-filter-box .ai-filter-title{color:#e0e6ed}body.dark .strategy-form-modal.strategy-form-modal-dark .ai-filter-box .ai-filter-hint{color:hsla(0,0%,100%,.4)}body.dark .strategy-form-modal.strategy-form-modal-dark .form-container{color:#d1d4dc}body.dark .strategy-form-modal.strategy-form-modal-dark .form-container .ant-form-item-label>label{color:hsla(0,0%,100%,.75)}body.dark .strategy-form-modal.strategy-form-modal-dark .ip-whitelist-tip{background:rgba(24,144,255,.08);border-color:rgba(24,144,255,.2);color:#40a9ff}body.dark .strategy-form-modal.strategy-form-modal-dark .indicator-description{background:#1a1e28;color:hsla(0,0%,100%,.65)}body.dark .strategy-form-modal.strategy-form-modal-dark .indicator-params-form{background:#1a1e28;border-color:hsla(0,0%,100%,.1)}body.dark .strategy-form-modal.strategy-form-modal-dark .indicator-params-form .param-label{color:hsla(0,0%,100%,.65)}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-type-selector .strategy-type-card{border-color:hsla(0,0%,100%,.1);background:#1a1e28;color:#d1d4dc}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-type-selector .strategy-type-card:hover{border-color:#177ddc}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-type-selector .strategy-type-card.selected{border-color:#177ddc;background:rgba(23,125,220,.08)}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-type-selector .strategy-type-card .strategy-type-content h3{color:#e0e6ed}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-type-selector .strategy-type-card .strategy-type-content p{color:hsla(0,0%,100%,.45)}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-type-selector .market-category-selector .selector-label{color:hsla(0,0%,100%,.75)}body.dark .ant-modal-wrap .ant-modal-content{background:#1e222d}body.dark .ant-modal-wrap .ant-modal-content .ant-modal-header{background:#252a36;border-bottom-color:hsla(0,0%,100%,.06)}body.dark .ant-modal-wrap .ant-modal-content .ant-modal-header .ant-modal-title{color:#e0e6ed}body.dark .ant-modal-wrap .ant-modal-content .ant-modal-close-x{color:hsla(0,0%,100%,.45)}body.dark .ant-modal-wrap .ant-modal-content .ant-modal-body{color:#d1d4dc}body.dark .ant-modal-wrap .ant-modal-content .ant-modal-footer{border-top-color:hsla(0,0%,100%,.06);background:#252a36}body.dark .ant-select-dropdown{background:#1e222d;border:1px solid hsla(0,0%,100%,.1);-webkit-box-shadow:0 4px 12px rgba(0,0,0,.4);box-shadow:0 4px 12px rgba(0,0,0,.4)}body.dark .ant-select-dropdown .ant-select-dropdown-menu-item{color:#d1d4dc}body.dark .ant-select-dropdown .ant-select-dropdown-menu-item-active,body.dark .ant-select-dropdown .ant-select-dropdown-menu-item:hover{background:rgba(24,144,255,.1)}body.dark .ant-select-dropdown .ant-select-dropdown-menu-item-selected{background:rgba(24,144,255,.15);color:#1890ff}body.dark .ant-modal-wrap .ant-spin-text{color:hsla(0,0%,100%,.65)}body.dark .ant-modal-wrap .ant-alert{background:rgba(24,144,255,.06);border-color:rgba(24,144,255,.2)}body.dark .ant-modal-wrap .ant-alert .ant-alert-message{color:hsla(0,0%,100%,.75)}body.dark .ant-modal-wrap .ant-alert .ant-alert-description{color:hsla(0,0%,100%,.55)} \ No newline at end of file diff --git a/frontend/dist/css/447.091cab00.css b/frontend/dist/css/447.091cab00.css new file mode 100644 index 0000000..9804294 --- /dev/null +++ b/frontend/dist/css/447.091cab00.css @@ -0,0 +1 @@ +[data-v-4fea1865] .ant-modal{top:20px!important}.visual-editor-container[data-v-4fea1865]{border:1px solid #d9d9d9;border-radius:6px;background:#fafafa;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:500px;overflow:hidden}.visual-modules-list[data-v-4fea1865]{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;padding:12px}.empty-visual-state[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:100%;color:#999}.visual-module-card[data-v-4fea1865]{background:#fff;border:1px solid #e8e8e8;border-radius:4px;margin-bottom:12px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.visual-module-card .module-header[data-v-4fea1865]{padding:8px 12px;border-bottom:1px solid #f0f0f0;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;background:#f9f9f9}.visual-module-card .module-header .module-title[data-v-4fea1865],.visual-module-card .module-header[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.visual-module-card .module-header .module-title[data-v-4fea1865]{font-weight:500;gap:8px}.visual-module-card .module-header .remove-icon[data-v-4fea1865]{cursor:pointer;color:#999}.visual-module-card .module-header .remove-icon[data-v-4fea1865]:hover{color:#ff4d4f}.visual-module-card .module-body[data-v-4fea1865]{padding:12px}.visual-module-card .style-config[data-v-4fea1865]{margin-top:12px;padding-top:12px;border-top:1px dashed #f0f0f0}.visual-module-card .style-config .label[data-v-4fea1865]{margin-right:8px;color:#666}.add-module-bar[data-v-4fea1865]{padding:12px;background:#fff;border-top:1px solid #e8e8e8}@media (max-width:768px){.visual-editor-container[data-v-4fea1865]{height:auto;min-height:400px}}.ant-form-item[data-v-4fea1865]{margin-bottom:16px}.editor-content[data-v-4fea1865]{padding:24px;background:#fff;min-height:500px;max-height:82vh;overflow-y:auto}.editor-layout[data-v-4fea1865]{min-height:450px}.code-editor-column[data-v-4fea1865]{height:100%}.code-editor-column[data-v-4fea1865],.code-section[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.code-section[data-v-4fea1865]{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;margin-bottom:16px}.code-section .section-header[data-v-4fea1865]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:12px;padding-bottom:12px;border-bottom:2px solid #f0f0f0}.code-section .section-header .section-title[data-v-4fea1865],.code-section .section-header[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.code-section .section-header .section-title[data-v-4fea1865]{font-weight:600;font-size:14px;color:#262626;gap:8px}.code-section .section-header .section-title[data-v-4fea1865]:before{content:"";display:inline-block;width:4px;height:14px;background:#1890ff;border-radius:2px}.code-section .section-header .section-actions[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.code-section .section-header .section-actions[data-v-4fea1865] .ant-btn-link{color:#1890ff;padding:0 8px}.code-section .section-header .section-actions[data-v-4fea1865] .ant-btn-link:hover{color:#40a9ff}.code-editor-container[data-v-4fea1865]{border:1px solid #d9d9d9;border-radius:6px;overflow:hidden;height:62vh;min-height:520px;max-height:none;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05);box-shadow:inset 0 1px 3px rgba(0,0,0,.05);-webkit-transition:all .3s ease;transition:all .3s ease}.code-editor-container[data-v-4fea1865]:hover{border-color:#40a9ff}.code-editor-container[data-v-4fea1865]:focus-within{border-color:#1890ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2),inset 0 1px 3px rgba(0,0,0,.05);box-shadow:0 0 0 2px rgba(24,144,255,.2),inset 0 1px 3px rgba(0,0,0,.05)}.code-editor-container[data-v-4fea1865] .CodeMirror{-webkit-box-flex:1;-ms-flex:1;flex:1;height:100%;font-family:Courier New,Consolas,Liberation Mono,Menlo,monospace;font-size:13px;line-height:1.6;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;background:#fafafa}.code-editor-container[data-v-4fea1865] .CodeMirror-scroll{-webkit-box-flex:1;-ms-flex:1;flex:1;min-height:100%;max-height:none;overflow-y:auto;overflow-x:auto}.code-editor-container[data-v-4fea1865] .CodeMirror-sizer{min-height:100%!important;padding-left:12px!important}.code-editor-container[data-v-4fea1865] .CodeMirror-gutters{border-right:1px solid #e8e8e8;background:-webkit-gradient(linear,left top,right top,from(#fafafa),to(#f5f5f5));background:linear-gradient(90deg,#fafafa 0,#f5f5f5);width:45px;padding-right:4px}.code-editor-container[data-v-4fea1865] .CodeMirror-linenumber{padding:0 8px 0 4px;min-width:30px;text-align:right;color:#999;font-size:12px}.code-editor-container[data-v-4fea1865] .CodeMirror-lines{padding:12px 8px;background:#fff}.code-editor-container[data-v-4fea1865] .CodeMirror-line{padding-left:0}.code-editor-container[data-v-4fea1865] .CodeMirror-cursor{border-left:2px solid #1890ff}.code-editor-container[data-v-4fea1865] .CodeMirror-selected{background:#e6f7ff}.code-mode-split[data-v-4fea1865]{width:100%}.ai-pane[data-v-4fea1865],.ai-panel[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.ai-panel[data-v-4fea1865]{border:1px solid #e8e8e8;border-radius:6px;background:#fafafa;padding:12px;height:62vh;min-height:520px}.ai-panel-title[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;font-weight:600;margin-bottom:10px;color:#262626}.ai-panel-hint[data-v-4fea1865]{margin-top:10px;color:#8c8c8c;font-size:12px;line-height:1.5}.ai-panel[data-v-4fea1865] textarea.ant-input{-webkit-box-flex:1;-ms-flex:1;flex:1;resize:none}.editor-footer[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;gap:12px}.editor-footer[data-v-4fea1865] .ant-btn{height:36px;padding:0 20px;font-weight:500;border-radius:4px;-webkit-transition:all .3s ease;transition:all .3s ease}.editor-footer[data-v-4fea1865] .ant-btn:not(.ant-btn-primary):hover{border-color:#40a9ff;color:#40a9ff;-webkit-transform:translateY(-1px);transform:translateY(-1px);-webkit-box-shadow:0 2px 8px rgba(24,144,255,.2);box-shadow:0 2px 8px rgba(24,144,255,.2)}.editor-footer[data-v-4fea1865] .ant-btn.ant-btn-primary{-webkit-box-shadow:0 2px 4px rgba(24,144,255,.3);box-shadow:0 2px 4px rgba(24,144,255,.3)}.editor-footer[data-v-4fea1865] .ant-btn.ant-btn-primary:hover{-webkit-box-shadow:0 4px 12px rgba(24,144,255,.4);box-shadow:0 4px 12px rgba(24,144,255,.4);-webkit-transform:translateY(-1px);transform:translateY(-1px)}@media (max-width:768px){.indicator-editor-modal[data-v-4fea1865] .ant-modal{width:100%!important;max-width:100%!important;margin:0!important;top:0!important;padding-bottom:0!important;max-height:100vh!important}.indicator-editor-modal[data-v-4fea1865] .ant-modal-content{height:100vh!important;max-height:100vh!important;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;border-radius:0!important}.indicator-editor-modal[data-v-4fea1865] .ant-modal-header{-ms-flex-negative:0;flex-shrink:0;padding:16px;border-bottom:1px solid #e8e8e8}.indicator-editor-modal[data-v-4fea1865] .ant-modal-body{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;padding:0!important;min-height:0}.indicator-editor-modal[data-v-4fea1865] .ant-modal-footer{-ms-flex-negative:0;flex-shrink:0;padding:12px 16px;border-top:1px solid #e8e8e8}.editor-content[data-v-4fea1865]{padding:16px!important;min-height:auto!important;max-height:none!important;overflow-y:visible!important}.editor-layout[data-v-4fea1865]{min-height:auto!important}.code-editor-column[data-v-4fea1865]{width:100%!important;margin-bottom:16px}.code-section[data-v-4fea1865]{margin-bottom:16px}.code-section .section-header[data-v-4fea1865]{padding-bottom:8px;margin-bottom:8px}.code-section .section-header .section-title[data-v-4fea1865]{font-size:13px}.code-editor-container[data-v-4fea1865]{height:250px!important}.code-editor-container[data-v-4fea1865],.code-editor-container[data-v-4fea1865] .CodeMirror-scroll{min-height:250px!important;max-height:250px!important}.code-editor-container[data-v-4fea1865] .CodeMirror-sizer{min-height:250px!important}.ai-panel[data-v-4fea1865]{height:auto!important;min-height:auto!important}.editor-footer[data-v-4fea1865]{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;gap:8px;padding:0}.editor-footer[data-v-4fea1865] .ant-btn{width:100%;height:40px;margin:0}}.chart-left[data-v-58f93984]{width:70%!important;-webkit-box-flex:0!important;-ms-flex:0 0 70%!important;flex:0 0 70%!important;position:relative;border-right:1px solid #e8e8e8;background:#fff;-webkit-transition:background-color .3s;transition:background-color .3s;-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch}.chart-left.theme-dark[data-v-58f93984]{background:#141414;border-right-color:#2a2a2a}.chart-wrapper[data-v-58f93984]{width:100%;height:100%;position:relative;background:#fff;-webkit-transition:background-color .3s;transition:background-color .3s;-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch;display:-webkit-box;display:-ms-flexbox;display:flex}.theme-dark .chart-wrapper[data-v-58f93984]{background:#141414}.drawing-toolbar[data-v-58f93984]{-ms-flex-negative:0;flex-shrink:0;width:40px;background:#fff;border-right:1px solid #e8e8e8;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:8px 4px;gap:4px;z-index:10;overflow-y:auto;overflow-x:hidden}.chart-left.theme-dark .drawing-toolbar[data-v-58f93984]{background:#141414;border-right-color:#2a2a2a}.drawing-tool-btn[data-v-58f93984]{width:32px;height:32px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;border-radius:4px;-webkit-transition:all .2s;transition:all .2s;color:#666;font-size:16px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chart-left.theme-dark .drawing-tool-btn[data-v-58f93984]{color:#d1d4dc}.drawing-tool-btn[data-v-58f93984]:hover{background:#f0f2f5;color:#1890ff}.chart-left.theme-dark .drawing-tool-btn[data-v-58f93984]:hover{background:#252525;color:#13c2c2}.drawing-tool-btn.active[data-v-58f93984]{background:#e6f7ff;color:#1890ff;border:1px solid #1890ff}.chart-left.theme-dark .drawing-tool-btn.active[data-v-58f93984]{background:#252525;color:#13c2c2;border-color:#13c2c2}.drawing-toolbar .ant-divider-vertical[data-v-58f93984]{margin:8px 0;height:20px}.indicator-toolbar[data-v-58f93984]{-ms-flex-negative:0;flex-shrink:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;padding:8px 12px;background:#fff;border-bottom:1px solid #e8e8e8;-ms-flex-wrap:wrap;flex-wrap:wrap;z-index:1;position:relative;width:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none}.indicator-toolbar[data-v-58f93984]::-webkit-scrollbar{display:none;width:0;height:0}.chart-content-area[data-v-58f93984]{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-width:0;overflow:hidden}.chart-left.theme-dark .indicator-toolbar[data-v-58f93984]{background:#141414;border-bottom-color:#2a2a2a}.indicator-btn[data-v-58f93984]{padding:4px 12px;font-size:12px;font-weight:600;color:#666;background:#f0f2f5;border:1px solid #e8e8e8;border-radius:4px;cursor:pointer;-webkit-transition:all .2s;transition:all .2s;white-space:nowrap;min-width:40px;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chart-left.theme-dark .indicator-btn[data-v-58f93984]{color:#d1d4dc;background:#252525;border-color:#2a2a2a}.indicator-btn[data-v-58f93984]:hover{color:#1890ff;border-color:#1890ff;background:#f0f8ff}.chart-left.theme-dark .indicator-btn[data-v-58f93984]:hover{color:#13c2c2;border-color:#13c2c2;background:#252525}.indicator-btn.active[data-v-58f93984]{color:#1890ff;background:#fff;border-color:#1890ff;border-width:2px;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.1);box-shadow:0 0 0 2px rgba(24,144,255,.1)}.chart-left.theme-dark .indicator-btn.active[data-v-58f93984]{color:#13c2c2;background:#252525;border-color:#13c2c2;-webkit-box-shadow:0 0 0 2px rgba(19,194,194,.2);box-shadow:0 0 0 2px rgba(19,194,194,.2)}.kline-chart-container[data-v-58f93984]{-webkit-box-flex:1;-ms-flex:1;flex:1;width:100%;min-width:0;background:#fff;-webkit-transition:background-color .3s;transition:background-color .3s;-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch;overflow:hidden}.theme-dark .kline-chart-container[data-v-58f93984]{background:#141414}.chart-overlay[data-v-58f93984]{position:absolute;top:0;left:0;right:0;bottom:0;background:hsla(0,0%,100%,.95);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;z-index:1;backdrop-filter:blur(2px)}.chart-left.theme-dark .chart-overlay[data-v-58f93984]{background:hsla(0,0%,8%,.95)}.error-box[data-v-58f93984]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#333}.initial-hint[data-v-58f93984]{background:hsla(0,0%,100%,.98)}.chart-left.theme-dark .initial-hint[data-v-58f93984]{background:hsla(0,0%,8%,.98)}.hint-box[data-v-58f93984]{text-align:center;color:#666;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;max-width:400px;padding:20px}.pyodide-warning[data-v-58f93984]{background:hsla(0,0%,100%,.98)}.chart-left.theme-dark .pyodide-warning[data-v-58f93984]{background:hsla(0,0%,8%,.98)}.warning-box[data-v-58f93984]{text-align:center;color:#666;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;max-width:500px;padding:20px}.warning-title[data-v-58f93984]{font-size:16px;font-weight:600;color:#faad14;margin-bottom:8px}.warning-desc[data-v-58f93984]{font-size:14px;color:#666;line-height:1.6}.chart-left.theme-dark .warning-box[data-v-58f93984]{color:#d1d4dc}.chart-left.theme-dark .warning-title[data-v-58f93984]{color:#faad14}.chart-left.theme-dark .warning-desc[data-v-58f93984]{color:#868993}.chart-left.theme-dark .hint-box[data-v-58f93984]{color:#d1d4dc}.hint-title[data-v-58f93984]{font-size:18px;font-weight:600;color:#333;margin-bottom:12px}.chart-left.theme-dark .hint-title[data-v-58f93984]{color:#d1d4dc}.hint-desc[data-v-58f93984]{font-size:14px;color:#999;line-height:1.6}.chart-left.theme-dark .hint-desc[data-v-58f93984]{color:#787b86}.history-loading-hint[data-v-58f93984]{position:absolute;left:20px;top:60px;z-index:1000!important;display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;padding:8px 16px;background:hsla(0,0%,100%,.98)!important;border:1px solid #e8e8e8;border-radius:4px;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.15);box-shadow:0 2px 8px rgba(0,0,0,.15);font-size:14px;color:#666!important;backdrop-filter:blur(4px);pointer-events:none;visibility:visible!important;opacity:1!important}.chart-left.theme-dark .history-loading-hint[data-v-58f93984]{background:hsla(0,0%,8%,.98)!important;border-color:#2a2a2a;color:#d1d4dc!important}.loading-text[data-v-58f93984]{white-space:nowrap;margin-left:4px}@media (max-width:768px){.drawing-toolbar[data-v-58f93984]{display:none}.indicator-toolbar[data-v-58f93984]{padding-left:12px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch}.indicator-toolbar[data-v-58f93984]::-webkit-scrollbar{display:none;width:0;height:0}.indicator-btn[data-v-58f93984]{-ms-flex-negative:0;flex-shrink:0}}@media (max-width:1200px){.drawing-toolbar[data-v-58f93984]{display:none}.indicator-toolbar[data-v-58f93984]{padding-left:12px}.kline-chart-container[data-v-58f93984]{margin-left:0}.chart-left[data-v-58f93984]{width:100%!important;min-width:100%!important;border-right:none;border-bottom:1px solid #e8e8e8;height:600px!important;min-height:600px!important}.chart-wrapper[data-v-58f93984],.kline-chart-container[data-v-58f93984]{height:100%!important;min-height:600px!important}}@media (max-width:992px){.chart-left[data-v-58f93984]{height:650px!important;min-height:650px!important}.chart-wrapper[data-v-58f93984],.kline-chart-container[data-v-58f93984]{height:100%!important;min-height:650px!important}}@media (max-width:768px){.chart-left[data-v-58f93984]{height:60vh!important;min-height:400px!important;max-height:80vh!important}.chart-wrapper[data-v-58f93984]{height:100%!important;min-height:400px!important;max-height:100%!important}.kline-chart-container[data-v-58f93984]{height:calc(100% - 45px)!important;min-height:350px!important;max-height:calc(100% - 45px)!important}}@media (max-width:576px){.chart-left[data-v-58f93984]{height:55vh!important;min-height:350px!important;max-height:75vh!important}.chart-wrapper[data-v-58f93984]{height:100%!important;min-height:350px!important;max-height:100%!important}.kline-chart-container[data-v-58f93984]{height:calc(100% - 45px)!important;min-height:300px!important;max-height:calc(100% - 45px)!important}}.quick-trade-drawer[data-v-75b64b85] .ant-drawer-body{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%;overflow-y:auto}.qt-header[data-v-75b64b85]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid #f0f0f0}.qt-header .qt-header-left[data-v-75b64b85],.qt-header[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-header .qt-header-left[data-v-75b64b85]{gap:8px}.qt-header .qt-header-left .qt-icon[data-v-75b64b85]{font-size:20px;color:#595959}.qt-header .qt-header-left .qt-header-title[data-v-75b64b85]{font-size:16px;font-weight:600}.qt-header .qt-close[data-v-75b64b85]{font-size:16px;cursor:pointer;color:#999}.qt-header .qt-close[data-v-75b64b85]:hover{color:#333}.qt-symbol-bar[data-v-75b64b85]{padding:12px 20px;background:-webkit-gradient(linear,left top,left bottom,from(#fafafa),to(#f0f0f0));background:linear-gradient(180deg,#fafafa,#f0f0f0);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:8px}.qt-symbol-bar .qt-symbol-selector[data-v-75b64b85],.qt-symbol-bar .qt-symbol-selector[data-v-75b64b85] .ant-select{width:100%}.qt-symbol-bar .qt-symbol-selector[data-v-75b64b85] .ant-select-selection{border-radius:6px;border:1px solid #d9d9d9}.qt-symbol-bar .qt-price-display[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.qt-symbol-bar .qt-price-display .qt-current-price[data-v-75b64b85]{font-size:16px;font-weight:600;color:#333}.qt-symbol-option[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.qt-symbol-option .qt-symbol-option-name[data-v-75b64b85]{font-weight:600;font-size:14px}.qt-symbol-option .qt-symbol-option-desc[data-v-75b64b85]{color:#999;font-size:12px}.qt-section[data-v-75b64b85]{padding:8px 20px}.qt-section .qt-label[data-v-75b64b85]{font-size:12px;color:#999;margin-bottom:4px;font-weight:500}.qt-section .qt-crypto-hint[data-v-75b64b85]{font-size:10px;color:#faad14;background:rgba(250,173,20,.1);padding:1px 6px;border-radius:4px;margin-left:4px}.qt-balance[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;margin-top:6px;font-size:12px}.qt-balance .qt-balance-label[data-v-75b64b85]{color:#999}.qt-balance .qt-balance-loading-text[data-v-75b64b85]{margin-left:4px}.qt-balance .qt-balance-value[data-v-75b64b85]{color:#52c41a;font-weight:600}.qt-balance .qt-balance-error[data-v-75b64b85]{color:#faad14;cursor:help}.qt-no-cred-actions[data-v-75b64b85]{margin-top:10px}.qt-manage-link[data-v-75b64b85]{margin-top:8px;font-size:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:4px}.qt-manage-link .qt-manage-sep[data-v-75b64b85]{color:#ccc;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.qt-direction-toggle[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px}.qt-direction-toggle .qt-dir-btn[data-v-75b64b85]{-webkit-box-flex:1;-ms-flex:1;flex:1;padding:10px;text-align:center;border-radius:8px;font-weight:600;font-size:14px;cursor:pointer;-webkit-transition:all .2s;transition:all .2s;border:2px solid transparent;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:6px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.qt-direction-toggle .qt-dir-long[data-v-75b64b85]{color:#52c41a;background:rgba(82,196,26,.06);border-color:rgba(82,196,26,.2)}.qt-direction-toggle .qt-dir-long.active[data-v-75b64b85]{background:#52c41a;color:#fff;border-color:#52c41a;-webkit-box-shadow:0 4px 12px rgba(82,196,26,.3);box-shadow:0 4px 12px rgba(82,196,26,.3)}.qt-direction-toggle .qt-dir-long[data-v-75b64b85]:hover:not(.active){border-color:#52c41a}.qt-direction-toggle .qt-dir-short[data-v-75b64b85]{color:#f5222d;background:rgba(245,34,45,.06);border-color:rgba(245,34,45,.2)}.qt-direction-toggle .qt-dir-short.active[data-v-75b64b85]{background:#f5222d;color:#fff;border-color:#f5222d;-webkit-box-shadow:0 4px 12px rgba(245,34,45,.3);box-shadow:0 4px 12px rgba(245,34,45,.3)}.qt-direction-toggle .qt-dir-short[data-v-75b64b85]:hover:not(.active){border-color:#f5222d}.qt-quick-amounts[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:6px;margin-top:6px}.qt-quick-amounts button[data-v-75b64b85]{-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:12px}.qt-leverage-row[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-leverage-input[data-v-75b64b85]{width:80px}.qt-card[data-v-75b64b85]{margin-left:16px;margin-right:16px;padding:12px 14px;border-radius:10px;background:#f5f5f5;border:1px solid #e8e8e8}.qt-section-title-row[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:8px}.qt-section-title[data-v-75b64b85]{font-size:13px;font-weight:600;color:#333}.qt-badge-contract[data-v-75b64b85]{font-size:10px;font-weight:600;padding:2px 8px;border-radius:999px;background:#ebebeb;color:#595959;border:1px solid #d9d9d9}.qt-optional-tag[data-v-75b64b85]{font-size:10px;color:#8c8c8c;background:#f0f0f0;padding:1px 8px;border-radius:4px}.qt-label-spaced[data-v-75b64b85]{margin-top:10px}.qt-margin-radio[data-v-75b64b85]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex}.qt-margin-radio[data-v-75b64b85] .ant-radio-button-wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1;text-align:center;padding:0 4px}.qt-hint-text[data-v-75b64b85]{font-size:11px;color:#8c8c8c;line-height:1.45;margin-top:8px}.qt-hint-inline[data-v-75b64b85]{margin-top:6px}.qt-spot-banner[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:10px;padding:4px 0}.qt-spot-banner-icon[data-v-75b64b85]{font-size:22px;color:#52c41a;margin-top:2px}.qt-spot-banner-title[data-v-75b64b85]{font-size:13px;font-weight:600;color:#333;margin-bottom:4px}.qt-spot-banner-text .qt-hint-text[data-v-75b64b85]{margin-top:0}.qt-tpsl-row[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px}.qt-tpsl-row .qt-tpsl-item[data-v-75b64b85]{-webkit-box-flex:1;-ms-flex:1;flex:1}.qt-tp-label[data-v-75b64b85]{color:#389e0d!important}.qt-sl-label[data-v-75b64b85]{color:#cf1322!important}.qt-input-full[data-v-75b64b85]{width:100%}.qt-dir-btn.qt-dir-disabled[data-v-75b64b85]{opacity:.42;cursor:not-allowed;pointer-events:none}.qt-empty-icon[data-v-75b64b85]{font-size:28px;color:#d9d9d9;margin-bottom:8px}.qt-empty-desc[data-v-75b64b85]{font-size:12px;color:#8c8c8c;line-height:1.5}.qt-submit-section[data-v-75b64b85]{padding:12px 20px}.qt-submit-section .qt-submit-btn[data-v-75b64b85]{height:48px;font-size:16px;font-weight:700;border-radius:8px;letter-spacing:.5px}.qt-submit-section .qt-btn-long[data-v-75b64b85]{background:#52c41a!important;border-color:#52c41a!important}.qt-submit-section .qt-btn-long[data-v-75b64b85]:hover{background:#73d13d!important}.qt-submit-section .qt-btn-long[data-v-75b64b85]:active{background:#389e0d!important}.qt-submit-section .qt-btn-short[data-v-75b64b85]{background:#f5222d!important;border-color:#f5222d!important}.qt-submit-section .qt-btn-short[data-v-75b64b85]:hover{background:#ff4d4f!important}.qt-submit-section .qt-btn-short[data-v-75b64b85]:active{background:#cf1322!important}.qt-position-section[data-v-75b64b85]{padding:8px 20px 12px}.qt-position-section .qt-section-header[data-v-75b64b85]{font-size:13px;font-weight:600;color:#666;margin-bottom:8px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.qt-history-section[data-v-75b64b85]{padding:8px 20px 12px}.qt-history-section[data-v-75b64b85] .ant-collapse{background:transparent;border:none}.qt-history-section[data-v-75b64b85] .ant-collapse-item{border:none}.qt-history-section[data-v-75b64b85] .ant-collapse-header{padding:0!important;cursor:pointer}.qt-history-section[data-v-75b64b85] .ant-collapse-header:hover{opacity:.8}.qt-history-section[data-v-75b64b85] .ant-collapse-content{border:none;background:transparent}.qt-history-section[data-v-75b64b85] .ant-collapse-content-box{padding:8px 0 0 0!important}.qt-history-section .qt-section-header[data-v-75b64b85]{font-size:13px;font-weight:600;color:#666;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.qt-history-section .qt-history-count[data-v-75b64b85]{font-size:12px;color:#999;font-weight:400}.qt-position-card[data-v-75b64b85]{background:#fafafa;border-radius:8px;padding:10px 12px;border-left:3px solid #d9d9d9}.qt-position-card.long[data-v-75b64b85]{border-left-color:#52c41a}.qt-position-card.short[data-v-75b64b85]{border-left-color:#f5222d}.qt-position-card .qt-pos-row[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;font-size:13px;padding:2px 0}.qt-position-card .qt-pos-row span[data-v-75b64b85]:first-child{color:#999}.qt-position-empty[data-v-75b64b85]{background:#fafafa;border-radius:8px;padding:20px 12px;text-align:center;border:1px dashed #d9d9d9;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-green[data-v-75b64b85]{color:#52c41a!important}.qt-red[data-v-75b64b85]{color:#f5222d!important}.qt-trade-list .qt-trade-item[data-v-75b64b85]{padding:6px 0;border-bottom:1px solid #f5f5f5}.qt-trade-list .qt-trade-item[data-v-75b64b85]:last-child{border-bottom:none}.qt-trade-list .qt-trade-item .qt-trade-main[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.qt-trade-list .qt-trade-item .qt-trade-main .qt-trade-symbol[data-v-75b64b85]{font-weight:600;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-main .qt-trade-amount[data-v-75b64b85]{margin-left:auto;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-meta[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-top:2px}.qt-trade-list .qt-trade-item .qt-trade-meta .qt-trade-time[data-v-75b64b85]{font-size:11px;color:#bbb}.theme-dark .qt-header[data-v-75b64b85]{border-bottom-color:#303030}.theme-dark .qt-header .qt-icon[data-v-75b64b85]{color:#a3a3a3}.theme-dark .qt-header .qt-header-title[data-v-75b64b85]{color:#e0e0e0}.theme-dark .qt-header .qt-close[data-v-75b64b85]{color:#666}.theme-dark .qt-header .qt-close[data-v-75b64b85]:hover{color:#bbb}.theme-dark .qt-symbol-bar[data-v-75b64b85]{background:-webkit-gradient(linear,left top,left bottom,from(#262626),to(#1f1f1f));background:linear-gradient(180deg,#262626,#1f1f1f)}.theme-dark .qt-symbol-bar .qt-current-price[data-v-75b64b85]{color:#e0e0e0}.theme-dark .qt-symbol-bar[data-v-75b64b85] .ant-select-selection{background:#262626;border-color:#303030;color:#e0e0e0}.theme-dark .qt-symbol-bar[data-v-75b64b85] .ant-select-selection__placeholder{color:#666}.theme-dark .qt-symbol-option .qt-symbol-option-name[data-v-75b64b85]{color:#e0e0e0}.theme-dark .qt-symbol-option .qt-symbol-option-desc[data-v-75b64b85]{color:#999}.theme-dark .qt-section .qt-label[data-v-75b64b85]{color:#777}.theme-dark .qt-position-card[data-v-75b64b85]{background:#262626}.theme-dark .qt-position-card .qt-pos-row span[data-v-75b64b85]:first-child{color:#777}.theme-dark .qt-history-section .qt-section-header[data-v-75b64b85],.theme-dark .qt-position-card .qt-pos-row span[data-v-75b64b85]:last-child{color:#ccc}.theme-dark .qt-history-section .qt-history-count[data-v-75b64b85]{color:#888}.theme-dark .qt-history-section[data-v-75b64b85] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark .qt-history-section[data-v-75b64b85] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark .qt-history-section[data-v-75b64b85] .ant-collapse .ant-collapse-header:hover{opacity:.8}.theme-dark .qt-history-section[data-v-75b64b85] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark .qt-trade-item[data-v-75b64b85]{border-bottom-color:#2a2a2a!important}.theme-dark .qt-trade-item .qt-trade-symbol[data-v-75b64b85]{color:#e0e0e0}.theme-dark .qt-trade-item .qt-trade-amount[data-v-75b64b85]{color:#ccc}.theme-dark[data-v-75b64b85] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark[data-v-75b64b85] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark[data-v-75b64b85] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark[data-v-75b64b85] .ant-drawer-content{background:#141414}.theme-dark[data-v-75b64b85] .ant-input-number,.theme-dark[data-v-75b64b85] .ant-select-selection{background:#262626;border-color:#303030;color:#e0e0e0}.theme-dark[data-v-75b64b85] .ant-radio-group .ant-radio-button-wrapper{background:#262626;border-color:#303030;color:#ccc}.theme-dark[data-v-75b64b85] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#434343;border-color:#595959;color:#fff}.theme-dark[data-v-75b64b85] .ant-slider-rail{background:#303030}.theme-dark[data-v-75b64b85] .ant-slider-track{background:#737373}.theme-dark .qt-manage-link a[data-v-75b64b85]{color:#58a6ff}.theme-dark .qt-manage-link .qt-manage-sep[data-v-75b64b85]{color:#555}.theme-dark .qt-card[data-v-75b64b85]{background:#262626;border-color:#3a3a3a}.theme-dark .qt-section-title[data-v-75b64b85]{color:#e8e8e8}.theme-dark .qt-badge-contract[data-v-75b64b85]{background:#333;color:#bfbfbf;border-color:#434343}.theme-dark .qt-optional-tag[data-v-75b64b85]{background:#2a2a2a;color:#888}.theme-dark .qt-hint-text[data-v-75b64b85]{color:#777}.theme-dark .qt-spot-banner-title[data-v-75b64b85]{color:#e0e0e0}.theme-dark .qt-spot-banner-icon[data-v-75b64b85]{color:#73d13d}.theme-dark .qt-tp-label[data-v-75b64b85]{color:#95de64!important}.theme-dark .qt-sl-label[data-v-75b64b85]{color:#ff7875!important}.theme-dark .qt-position-empty[data-v-75b64b85]{background:#262626;border-color:#303030}.theme-dark .qt-empty-icon[data-v-75b64b85]{color:#434343}.theme-dark .qt-empty-desc[data-v-75b64b85]{color:#888}.chart-container[data-v-6bd239a6]{background:#f0f2f5;color:#333;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}.chart-container[data-v-6bd239a6],.chart-header[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:100%;min-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.chart-header[data-v-6bd239a6]{max-width:100%;background:#fff;border-bottom:1px solid #e8e8e8;-webkit-box-shadow:0 2px 4px rgba(0,0,0,.02);box-shadow:0 2px 4px rgba(0,0,0,.02)}.header-top[data-v-6bd239a6]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:0 16px;height:60px}.header-left[data-v-6bd239a6],.header-top[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.header-left[data-v-6bd239a6]{gap:20px}.symbol-select[data-v-6bd239a6]{width:220px}.symbol-select[data-v-6bd239a6] .ant-select-selection{background-color:#fff;border:1px solid #e8e8e8;color:#333;border-radius:4px;-webkit-box-shadow:none;box-shadow:none}.symbol-select[data-v-6bd239a6] .ant-select-selection:hover{border-color:#1890ff}.symbol-select[data-v-6bd239a6] .ant-select-focused .ant-select-selection{border-color:#1890ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2);box-shadow:0 0 0 2px rgba(24,144,255,.2)}.symbol-select[data-v-6bd239a6] .ant-select-arrow,.symbol-select[data-v-6bd239a6] .ant-select-selection__placeholder{color:#999}.timeframe-group[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;background:#f0f2f5;border-radius:4px;padding:2px}.timeframe-item[data-v-6bd239a6]{padding:4px 12px;font-size:13px;font-weight:600;color:#666;cursor:pointer;-webkit-transition:all .2s;transition:all .2s;border-radius:4px}.timeframe-item[data-v-6bd239a6]:hover{color:#1890ff;background:#fff}.timeframe-item.active[data-v-6bd239a6]{color:#1890ff;background:#fff;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.current-symbol[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:24px}.symbol-info[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.symbol-label[data-v-6bd239a6]{font-size:16px;font-weight:700;color:#333;line-height:1.2}.market-tag[data-v-6bd239a6]{font-size:10px;color:#666;background:#f0f2f5;padding:1px 4px;border-radius:2px;margin-top:2px}.price-info[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.price-info.color-up[data-v-6bd239a6]{color:#0ecb81}.price-info.color-down[data-v-6bd239a6]{color:#f6465d}.symbol-price[data-v-6bd239a6]{font-size:18px;font-weight:600;font-family:Roboto Mono,monospace;line-height:1.2}.symbol-change[data-v-6bd239a6]{font-size:12px}.mobile-symbol-price[data-v-6bd239a6]{display:none}.panel-header .theme-switcher[data-v-6bd239a6]{margin-left:auto;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.panel-header .realtime-toggle-btn[data-v-6bd239a6],.panel-header .theme-toggle-btn[data-v-6bd239a6]{color:#666;border:none;padding:4px 8px;-webkit-transition:all .3s;transition:all .3s;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:4px;min-width:32px;height:32px}.panel-header .realtime-toggle-btn[data-v-6bd239a6]:hover,.panel-header .theme-toggle-btn[data-v-6bd239a6]:hover{color:#1890ff;background:#f0f2f5}.panel-header .realtime-toggle-btn.active[data-v-6bd239a6],.panel-header .theme-toggle-btn.active[data-v-6bd239a6]{color:#1890ff;background:#e6f7ff}.panel-header .realtime-toggle-btn .anticon[data-v-6bd239a6],.panel-header .theme-toggle-btn .anticon[data-v-6bd239a6]{font-size:16px}.chart-content[data-v-6bd239a6]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-width:100%;max-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.chart-content[data-v-6bd239a6],.chart-main-row[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;overflow:hidden;width:100%}.chart-main-row[data-v-6bd239a6]{height:80vh!important;min-height:500px!important;max-height:80vh!important;-ms-flex-negative:0;flex-shrink:0}.chart-right[data-v-6bd239a6]{width:30%!important;-webkit-box-flex:0!important;-ms-flex:0 0 30%!important;flex:0 0 30%!important;border-left:1px solid #e8e8e8}.chart-right[data-v-6bd239a6],.indicators-panel[data-v-6bd239a6]{background:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.indicators-panel[data-v-6bd239a6]{height:100%}.panel-header[data-v-6bd239a6]{height:48px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:0 16px;border-bottom:1px solid #e8e8e8;font-weight:600;color:#333;background:#fff}.panel-header .mobile-header-create-btn[data-v-6bd239a6]{margin-right:0}.panel-body[data-v-6bd239a6]{padding:0;overflow:hidden}.indicator-section[data-v-6bd239a6],.panel-body[data-v-6bd239a6]{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.indicator-section[data-v-6bd239a6]{min-height:0;border-bottom:1px solid #e8e8e8}.indicator-section[data-v-6bd239a6]:last-child{border-bottom:none}.indicator-section.section-empty[data-v-6bd239a6]{min-height:200px}.section-label[data-v-6bd239a6]{-ms-flex-negative:0;flex-shrink:0;padding:12px 16px;background:#fafafa;border-bottom:1px solid #e8e8e8;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.section-label .section-label-left[data-v-6bd239a6],.section-label[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.section-label .section-label-left[data-v-6bd239a6]{gap:8px;-webkit-box-flex:1;-ms-flex:1;flex:1}.section-label .section-label-left .collapse-icon[data-v-6bd239a6]{font-size:12px;color:#999;-webkit-transition:-webkit-transform .2s;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s}.section-label .section-label-left span[data-v-6bd239a6]{font-weight:500}.section-label .buy-indicator-btn[data-v-6bd239a6]{padding:0;height:auto;margin-left:8px}.create-indicator-btn[data-v-6bd239a6]{margin-left:auto;margin-right:0}@media (max-width:768px){.create-indicator-btn[data-v-6bd239a6]{display:none!important}}.section-content[data-v-6bd239a6]{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;padding:12px 16px;min-height:0}.indicator-card[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:#fff;padding:10px 12px;border-radius:6px;margin-bottom:8px;cursor:pointer;-webkit-transition:all .2s;transition:all .2s;border:1px solid #e8e8e8}.indicator-card[data-v-6bd239a6]:hover{background:#f0f2f5;border-color:#1890ff;-webkit-transform:translateY(-1px);transform:translateY(-1px);-webkit-box-shadow:0 2px 4px rgba(0,0,0,.05);box-shadow:0 2px 4px rgba(0,0,0,.05)}.indicator-card.active[data-v-6bd239a6]{background:#e6f7ff;border-color:#1890ff}.indicator-card.active .card-name[data-v-6bd239a6]{color:#1890ff}.indicator-card.indicator-active[data-v-6bd239a6]{border-color:#52c41a;border-width:2px;background:#f6ffed}.indicator-card.indicator-active[data-v-6bd239a6]:hover{border-color:#73d13d;-webkit-box-shadow:0 2px 8px rgba(82,196,26,.2);box-shadow:0 2px 8px rgba(82,196,26,.2)}.indicator-card.indicator-active .card-name[data-v-6bd239a6]{color:#52c41a}.indicator-card.disabled[data-v-6bd239a6]{opacity:.5;cursor:not-allowed}.indicator-card.disabled[data-v-6bd239a6]:hover{-webkit-transform:none;transform:none;background:#fff;border-color:#e8e8e8;-webkit-box-shadow:none;box-shadow:none}.card-content[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:100%}.card-header[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:4px}.card-name[data-v-6bd239a6]{font-size:13px;color:#333;font-weight:500;-webkit-box-flex:1;-ms-flex:1;flex:1;margin-right:8px}.card-params[data-v-6bd239a6]{font-size:11px;color:#999;margin-top:2px}.card-desc[data-v-6bd239a6]{font-size:11px;color:#999;margin-top:0;display:-webkit-box;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;line-height:1.4;min-height:1.4em;max-height:2.8em}.card-action[data-v-6bd239a6]{color:#999;font-size:12px}.card-action[data-v-6bd239a6]:hover{color:#1890ff}.card-actions[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:12px;-ms-flex-negative:0;flex-shrink:0}.action-icon[data-v-6bd239a6]{font-size:16px;cursor:pointer;-webkit-transition:all .3s;transition:all .3s;color:#999}.action-icon.edit-icon[data-v-6bd239a6]{color:#1890ff}.action-icon.edit-icon[data-v-6bd239a6]:hover{color:#40a9ff}.action-icon.delete-icon[data-v-6bd239a6]{color:#ff4d4f}.action-icon.delete-icon[data-v-6bd239a6]:hover{color:#ff7875}.action-icon[data-v-6bd239a6]:hover{color:#1890ff}.action-icon.toggle-icon.active[data-v-6bd239a6]{color:#52c41a}.action-icon.backtest-icon[data-v-6bd239a6]{color:#722ed1}.action-icon.backtest-icon[data-v-6bd239a6]:hover{color:#9254de}.action-icon.backtest-history-icon[data-v-6bd239a6]{color:#13c2c2}.action-icon.backtest-history-icon[data-v-6bd239a6]:hover{color:#08979c}.action-icon.publish-icon[data-v-6bd239a6]{color:#1890ff}.action-icon.publish-icon[data-v-6bd239a6]:hover{color:#40a9ff}.action-icon.publish-icon.published[data-v-6bd239a6]{color:#52c41a}.action-icon.publish-icon.published[data-v-6bd239a6]:hover{color:#73d13d}.action-icon.create-strategy-icon[data-v-6bd239a6]{color:#fa8c16}.action-icon.create-strategy-icon[data-v-6bd239a6]:hover{color:#ffa940}.action-icon.status-icon.status-normal[data-v-6bd239a6]{color:#52c41a}.action-icon.status-icon.status-expired[data-v-6bd239a6]{color:#ff4d4f}.action-icon.expiry-icon[data-v-6bd239a6]{color:#1890ff}.empty-indicators[data-v-6bd239a6]{padding:40px 20px;gap:8px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.empty-indicators[data-v-6bd239a6],.loading-indicators[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:#999;font-size:13px}.loading-indicators[data-v-6bd239a6]{padding:20px}.custom-scrollbar[data-v-6bd239a6]{scrollbar-width:none;-ms-overflow-style:none}.custom-scrollbar[data-v-6bd239a6]::-webkit-scrollbar{display:none;width:0;height:0}.dark-dropdown{background-color:#fff;border:1px solid #e8e8e8;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.15);box-shadow:0 2px 8px rgba(0,0,0,.15)}.dark-dropdown .ant-select-dropdown-menu-item{color:#333}.dark-dropdown .ant-select-dropdown-menu-item:hover{background-color:#f0f2f5}.dark-dropdown .ant-select-dropdown-menu-item-active{background-color:#e6f7ff;color:#1890ff}.dark-dropdown .ant-empty-description{color:#999}.symbol-option[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.symbol-option .symbol-name[data-v-6bd239a6]{font-weight:600;color:#8f8d8d;margin-right:8px}.symbol-option .symbol-name-extra[data-v-6bd239a6]{font-size:12px;color:#999;margin-left:4px}.empty-watchlist-hint[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#666;font-size:12px}@media (max-width:768px){.chart-container[data-v-6bd239a6]{padding:0;width:calc(100% + 44px)!important;margin:-22px}.chart-header[data-v-6bd239a6]{padding:12px}.chart-header .header-top[data-v-6bd239a6],.chart-header[data-v-6bd239a6]{gap:12px;height:auto;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.chart-header .header-top[data-v-6bd239a6]{padding:0}.chart-header .header-left[data-v-6bd239a6]{width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px}.chart-header .search-section[data-v-6bd239a6]{width:100%}.chart-header .search-section .symbol-select[data-v-6bd239a6]{width:100%!important}.chart-header .timeframe-group[data-v-6bd239a6]{width:100%;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:4px}.chart-header .timeframe-group .timeframe-item[data-v-6bd239a6]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:calc(14.28% - 4px);text-align:center;padding:6px 8px;font-size:12px}.chart-header .current-symbol[data-v-6bd239a6]{display:none}.chart-content[data-v-6bd239a6]{overflow-y:auto}.chart-content[data-v-6bd239a6],.chart-main-row[data-v-6bd239a6]{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-ms-flex-direction:column!important;flex-direction:column!important;height:auto!important;min-height:auto!important;max-height:none!important}.mobile-symbol-price[data-v-6bd239a6]{-webkit-box-ordinal-group:1!important;-ms-flex-order:0!important;order:0!important;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:12px 16px;background:#fff;width:100%}.mobile-symbol-price .mobile-price-info[data-v-6bd239a6],.mobile-symbol-price[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mobile-symbol-price .mobile-price-info[data-v-6bd239a6]{gap:12px;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.mobile-symbol-price .mobile-price-info.color-up[data-v-6bd239a6]{color:#0ecb81}.mobile-symbol-price .mobile-price-info.color-down[data-v-6bd239a6]{color:#f6465d}.mobile-symbol-price .mobile-price-info .mobile-symbol-price[data-v-6bd239a6]{font-size:18px;font-weight:600;font-family:Roboto Mono,monospace}.mobile-symbol-price .mobile-price-info .mobile-symbol-change[data-v-6bd239a6]{font-size:14px;font-weight:500}kline-chart[data-v-6bd239a6]{-webkit-box-ordinal-group:2!important;-ms-flex-order:1!important;order:1!important;width:100%!important;-webkit-box-flex:0!important;-ms-flex:0 0 auto!important;flex:0 0 auto!important;display:block!important;margin-bottom:0!important}kline-chart[data-v-6bd239a6] .chart-left{width:100%!important;height:350px!important;min-height:350px!important;max-height:350px!important;border-right:none!important;border-bottom:1px solid #e8e8e8!important}.chart-right[data-v-6bd239a6]{-webkit-box-ordinal-group:3!important;-ms-flex-order:2!important;order:2!important;width:100%!important;min-width:100%!important;max-width:100%!important;-webkit-box-flex:0!important;-ms-flex:0 0 auto!important;flex:0 0 auto!important;height:auto!important;max-height:calc(100vh - 470px)!important;border-left:none!important;border-top:none!important;margin-top:0!important;display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;visibility:visible!important;opacity:1!important}.chart-right .indicators-panel[data-v-6bd239a6]{height:auto!important;min-height:600px!important;max-height:calc(100vh - 410px)!important;overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.chart-right .indicators-panel .panel-header[data-v-6bd239a6]{position:sticky;top:0;background:#fff;z-index:10;border-bottom:1px solid #e8e8e8;padding:12px;font-size:14px;-ms-flex-negative:0;flex-shrink:0}.chart-right .indicators-panel .panel-header .mobile-header-create-btn[data-v-6bd239a6]{margin-right:0;font-size:12px;height:28px;padding:0 12px}.chart-right .indicators-panel .panel-body[data-v-6bd239a6]{padding:0;overflow:visible;min-height:400px!important}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6],.chart-right .indicators-panel .panel-body[data-v-6bd239a6]{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6]{overflow:hidden;min-height:0;height:100%}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-bar{margin-bottom:0;-ms-flex-negative:0;flex-shrink:0;border-bottom:1px solid #e8e8e8}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-tab{color:#666;font-size:14px}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-tab-active{color:#1890ff}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-ink-bar{background-color:#1890ff}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-content{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:auto;min-height:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-tabpane{height:100%;overflow:hidden;display:none;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-height:0}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-tabpane-active{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-height:0;height:100%;overflow:hidden}.chart-right .indicators-panel .mobile-indicator-tabs .mobile-tab-content[data-v-6bd239a6],.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-content-holder{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;min-height:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%}.chart-right .indicators-panel .mobile-indicator-tabs .mobile-tab-content[data-v-6bd239a6]{width:100%}.chart-right .indicators-panel .mobile-indicator-tabs .section-content[data-v-6bd239a6]{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto!important;overflow-x:hidden;padding:12px;min-height:0;height:100%;-webkit-overflow-scrolling:touch;position:relative}.chart-right .indicators-panel .mobile-indicator-tabs .mobile-create-btn-wrapper[data-v-6bd239a6],.chart-right .indicators-panel .mobile-indicator-tabs .mobile-create-btn[data-v-6bd239a6]{display:none!important}.chart-right .indicators-panel .indicator-section .section-label[data-v-6bd239a6]{padding:10px 12px;font-size:13px}.chart-right .indicators-panel .section-content[data-v-6bd239a6]{padding:10px 12px}.chart-right .indicators-panel .indicator-card[data-v-6bd239a6]{padding:10px}.chart-right .indicators-panel .indicator-card .card-name[data-v-6bd239a6]{font-size:13px}.chart-right .indicators-panel .indicator-card .card-desc[data-v-6bd239a6],.chart-right .indicators-panel .indicator-card .card-params[data-v-6bd239a6]{font-size:11px}}.qt-header-btn[data-v-6bd239a6]{margin-left:16px;background:linear-gradient(135deg,#1890ff,#722ed1);border:none;color:#fff;border-radius:6px;font-weight:600;font-size:12px;padding:0 12px;height:30px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;-webkit-box-shadow:0 2px 8px rgba(24,144,255,.3);box-shadow:0 2px 8px rgba(24,144,255,.3);-webkit-transition:all .3s;transition:all .3s}.qt-header-btn[data-v-6bd239a6]:focus,.qt-header-btn[data-v-6bd239a6]:hover{background:linear-gradient(135deg,#40a9ff,#9254de);color:#fff;-webkit-box-shadow:0 4px 12px rgba(24,144,255,.45);box-shadow:0 4px 12px rgba(24,144,255,.45);-webkit-transform:translateY(-1px);transform:translateY(-1px)}.qt-floating-btn[data-v-6bd239a6]{position:fixed;right:24px;bottom:80px;width:48px;height:48px;border-radius:50%;background:linear-gradient(135deg,#1890ff,#722ed1);color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;-webkit-box-shadow:0 4px 16px rgba(24,144,255,.4);box-shadow:0 4px 16px rgba(24,144,255,.4);z-index:999;-webkit-transition:all .3s;transition:all .3s;font-size:22px}.qt-floating-btn[data-v-6bd239a6]:hover{-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-box-shadow:0 6px 24px rgba(24,144,255,.55);box-shadow:0 6px 24px rgba(24,144,255,.55)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark[data-v-6bd239a6],body.dark,body.realdark{background:#141414;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-bottom-color:#2a2a2a;-webkit-box-shadow:0 2px 4px rgba(0,0,0,.3);box-shadow:0 2px 4px rgba(0,0,0,.3)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .header-top .current-symbol .symbol-label[data-v-6bd239a6],body.dark,body.realdark{color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .header-top .current-symbol .market-tag[data-v-6bd239a6],body.dark,body.realdark{color:#888;background:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .header-top .current-symbol .price-info.color-up[data-v-6bd239a6],body.dark,body.realdark{color:#0ecb81}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .header-top .current-symbol .price-info.color-down[data-v-6bd239a6],body.dark,body.realdark{color:#f6465d}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .header-top .current-symbol .qt-header-btn[data-v-6bd239a6],body.dark,body.realdark{background:linear-gradient(135deg,#177ddc,#642ab5);-webkit-box-shadow:0 2px 8px rgba(23,125,220,.35);box-shadow:0 2px 8px rgba(23,125,220,.35)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .header-top .current-symbol .qt-header-btn[data-v-6bd239a6]:focus,.chart-container.theme-dark .chart-header .header-top .current-symbol .qt-header-btn[data-v-6bd239a6]:hover,body.dark,body.realdark{background:linear-gradient(135deg,#3c9ae8,#854eca);-webkit-box-shadow:0 4px 12px rgba(23,125,220,.5);box-shadow:0 4px 12px rgba(23,125,220,.5)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .qt-floating-btn[data-v-6bd239a6],body.dark,body.realdark{background:linear-gradient(135deg,#177ddc,#642ab5);-webkit-box-shadow:0 4px 16px rgba(23,125,220,.45);box-shadow:0 4px 16px rgba(23,125,220,.45)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .qt-floating-btn[data-v-6bd239a6]:hover,body.dark,body.realdark{-webkit-box-shadow:0 6px 24px rgba(23,125,220,.6);box-shadow:0 6px 24px rgba(23,125,220,.6)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .symbol-select[data-v-6bd239a6] .ant-select-selection,body.dark,body.realdark{background-color:#1c1c1c;border-color:#2a2a2a;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .symbol-select[data-v-6bd239a6] .ant-select-selection:hover,body.dark,body.realdark{border-color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .symbol-select[data-v-6bd239a6] .ant-select-focused .ant-select-selection,body.dark,body.realdark{border-color:#1890ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.3);box-shadow:0 0 0 2px rgba(24,144,255,.3)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .symbol-select[data-v-6bd239a6] .ant-select-arrow,.chart-container.theme-dark .symbol-select[data-v-6bd239a6] .ant-select-selection__placeholder,body.dark,body.realdark{color:#868993}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .timeframe-group[data-v-6bd239a6],body.dark,body.realdark{background:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .timeframe-group .timeframe-item[data-v-6bd239a6],body.dark,body.realdark{color:#868993}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .timeframe-group .timeframe-item[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#1890ff;background:#1c1c1c}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .timeframe-group .timeframe-item.active[data-v-6bd239a6],body.dark,body.realdark{color:#1890ff;background:#1c1c1c;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.3);box-shadow:0 1px 2px rgba(0,0,0,.3)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-symbol-label[data-v-6bd239a6],body.dark,body.realdark{margin-left:5px;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-market-tag[data-v-6bd239a6],body.dark,body.realdark{color:#888;background:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-price-info.color-up[data-v-6bd239a6],body.dark,body.realdark{color:#0ecb81}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-price-info.color-down[data-v-6bd239a6],body.dark,body.realdark{color:#f6465d}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-left-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .panel-header[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-bottom-color:#2a2a2a;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .panel-header .realtime-toggle-btn[data-v-6bd239a6],body.dark,body.realdark{color:#868993}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .panel-header .realtime-toggle-btn.active[data-v-6bd239a6],.chart-container.theme-dark .chart-right .indicators-panel .panel-header .realtime-toggle-btn[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#1890ff;background:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .panel-body[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-section[data-v-6bd239a6],body.dark,body.realdark{border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .section-label[data-v-6bd239a6],body.dark,body.realdark{color:#868993;background:#2a2a2a;border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .section-label .section-label-left .collapse-icon[data-v-6bd239a6],body.dark,body.realdark{color:#868993}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .section-label .section-label-left span[data-v-6bd239a6],body.dark,body.realdark{color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .section-label .buy-indicator-btn[data-v-6bd239a6],body.dark,body.realdark{color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .section-label .buy-indicator-btn[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#40a9ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card.active[data-v-6bd239a6],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card[data-v-6bd239a6]:hover,body.dark,body.realdark{background:#2a2a2a;border-color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card.active .card-name[data-v-6bd239a6],body.dark,body.realdark{color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card.indicator-active[data-v-6bd239a6],body.dark,body.realdark{border-color:#52c41a;background:#1e3a1e}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card.indicator-active[data-v-6bd239a6]:hover,body.dark,body.realdark{border-color:#73d13d;-webkit-box-shadow:0 2px 8px rgba(82,196,26,.3);box-shadow:0 2px 8px rgba(82,196,26,.3)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card.indicator-active .card-name[data-v-6bd239a6],body.dark,body.realdark{color:#52c41a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .card-name[data-v-6bd239a6],body.dark,body.realdark{color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon[data-v-6bd239a6],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .card-desc[data-v-6bd239a6],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .card-params[data-v-6bd239a6],body.dark,body.realdark{color:#868993}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.edit-icon[data-v-6bd239a6],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.edit-icon[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#40a9ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.delete-icon[data-v-6bd239a6],body.dark,body.realdark{color:#ff4d4f}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.delete-icon[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#ff7875}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.backtest-icon[data-v-6bd239a6],body.dark,body.realdark{color:#b37feb}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.backtest-icon[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#d3adf7}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.backtest-history-icon[data-v-6bd239a6],body.dark,body.realdark{color:#5cdbd3}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.backtest-history-icon[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#87e8de}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.publish-icon[data-v-6bd239a6],body.dark,body.realdark{color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.publish-icon[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#40a9ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.publish-icon.published[data-v-6bd239a6],body.dark,body.realdark{color:#52c41a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.publish-icon.published[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#73d13d}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.toggle-icon.active[data-v-6bd239a6],body.dark,body.realdark{color:#52c41a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .empty-indicators[data-v-6bd239a6],body.dark,body.realdark{color:#868993}@media (max-width:768px){.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .current-symbol[data-v-6bd239a6],body.dark,body.realdark{border-top-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-left[data-v-6bd239a6],body.dark,body.realdark{border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right[data-v-6bd239a6],body.dark,body.realdark{border-top-color:#2a2a2a;max-height:500px!important}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .panel-header[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-bar,body.dark,body.realdark{border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-tab,body.dark,body.realdark{color:#868993}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-tab-active,body.dark,body.realdark{color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-ink-bar,body.dark,body.realdark{background-color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .mobile-indicator-tabs .mobile-create-btn-wrapper[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-symbol-label[data-v-6bd239a6],body.dark,body.realdark{margin-left:5px;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-market-tag[data-v-6bd239a6],body.dark,body.realdark{color:#868993;background:#2a3932}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-price-info.color-up[data-v-6bd239a6],body.dark,body.realdark{color:#0ecb81}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-price-info.color-down[data-v-6bd239a6],body.dark,body.realdark{color:#f6465d}}.add-stock-modal-content .market-tabs[data-v-6bd239a6]{margin-bottom:16px}.add-stock-modal-content .hot-symbols-section[data-v-6bd239a6],.add-stock-modal-content .search-results-section[data-v-6bd239a6],.add-stock-modal-content .symbol-search-section[data-v-6bd239a6]{margin-bottom:24px}.add-stock-modal-content .hot-symbols-section .section-title[data-v-6bd239a6],.add-stock-modal-content .search-results-section .section-title[data-v-6bd239a6]{font-size:14px;font-weight:600;color:#262626;margin-bottom:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.add-stock-modal-content .symbol-list[data-v-6bd239a6]{max-height:200px;overflow-y:auto;border:1px solid #e8e8e8;border-radius:4px}.add-stock-modal-content .symbol-list .symbol-list-item[data-v-6bd239a6]{cursor:pointer;padding:8px 12px;-webkit-transition:background-color .3s;transition:background-color .3s}.add-stock-modal-content .symbol-list .symbol-list-item[data-v-6bd239a6]:hover{background-color:#f5f5f5}.add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content .symbol-code[data-v-6bd239a6]{font-weight:600;color:#262626;min-width:80px}.add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content .symbol-name[data-v-6bd239a6]{color:#595959;-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.add-stock-modal-content .selected-symbol-section[data-v-6bd239a6]{margin-top:16px}.add-stock-modal-content .selected-symbol-section .selected-symbol-info[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.chart-container.theme-dark .add-stock-modal-content .hot-symbols-section .section-title[data-v-6bd239a6],.chart-container.theme-dark .add-stock-modal-content .search-results-section .section-title[data-v-6bd239a6],body.dark,body.realdark{color:#d1d4dc}.chart-container.theme-dark .add-stock-modal-content .symbol-list[data-v-6bd239a6],body.dark,body.realdark{border-color:#363c4e;background-color:#2a2a2a}.chart-container.theme-dark .add-stock-modal-content .symbol-list .symbol-list-item[data-v-6bd239a6]:hover,body.dark,body.realdark{background-color:#363c4e}.chart-container.theme-dark .add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content .symbol-code[data-v-6bd239a6],body.dark,body.realdark{color:#d1d4dc}.chart-container.theme-dark .add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content .symbol-name[data-v-6bd239a6],body.dark,body.realdark{color:#868993}.params-config-modal .indicator-info[data-v-6bd239a6]{text-align:center;margin-bottom:8px}.params-config-modal .indicator-info .indicator-name[data-v-6bd239a6]{font-size:16px;font-weight:600;color:#1f1f1f}.params-config-modal .params-form .param-item[data-v-6bd239a6]{margin-bottom:16px}.params-config-modal .params-form .param-item .param-header[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:6px}.params-config-modal .params-form .param-item .param-header .param-label[data-v-6bd239a6]{font-weight:500;color:#333}.theme-dark .params-config-modal .indicator-info .indicator-name[data-v-6bd239a6]{color:#e0e0e0}.theme-dark .params-config-modal .params-form .param-item .param-header .param-label[data-v-6bd239a6]{color:#d0d0d0} \ No newline at end of file diff --git a/frontend/dist/css/593.3efaa629.css b/frontend/dist/css/593.3efaa629.css new file mode 100644 index 0000000..7bf89a9 --- /dev/null +++ b/frontend/dist/css/593.3efaa629.css @@ -0,0 +1 @@ +.user-manage-page[data-v-7a022132]{padding:24px;min-height:calc(100vh - 120px);background:-webkit-gradient(linear,left top,left bottom,from(#f8fafc),to(#f1f5f9));background:linear-gradient(180deg,#f8fafc,#f1f5f9)}.user-manage-page .page-header[data-v-7a022132]{margin-bottom:24px}.user-manage-page .page-header .page-title[data-v-7a022132]{font-size:24px;font-weight:700;margin:0 0 8px 0;color:#1e3a5f;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:12px}.user-manage-page .page-header .page-title .anticon[data-v-7a022132]{font-size:28px;color:#1890ff}.user-manage-page .page-header .page-desc[data-v-7a022132]{color:#64748b;font-size:14px;margin:0}.user-manage-page .manage-tabs[data-v-7a022132] .ant-tabs-bar{margin-bottom:20px}.user-manage-page .summary-cards[data-v-7a022132]{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:20px}.user-manage-page .summary-cards .summary-card[data-v-7a022132]{background:#fff;border-radius:12px;padding:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:16px;-webkit-box-shadow:0 2px 12px rgba(0,0,0,.06);box-shadow:0 2px 12px rgba(0,0,0,.06);-webkit-transition:-webkit-transform .2s,-webkit-box-shadow .2s;transition:-webkit-transform .2s,-webkit-box-shadow .2s;transition:transform .2s,box-shadow .2s;transition:transform .2s,box-shadow .2s,-webkit-transform .2s,-webkit-box-shadow .2s}.user-manage-page .summary-cards .summary-card[data-v-7a022132]:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-box-shadow:0 4px 20px rgba(0,0,0,.1);box-shadow:0 4px 20px rgba(0,0,0,.1)}.user-manage-page .summary-cards .summary-card .summary-icon[data-v-7a022132]{width:48px;height:48px;border-radius:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-ms-flex-negative:0;flex-shrink:0}.user-manage-page .summary-cards .summary-card .summary-icon .anticon[data-v-7a022132]{font-size:22px;color:#fff}.user-manage-page .summary-cards .summary-card .summary-info[data-v-7a022132]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.user-manage-page .summary-cards .summary-card .summary-info .summary-value[data-v-7a022132]{font-size:22px;font-weight:700;color:#1e293b;line-height:1.3}.user-manage-page .summary-cards .summary-card .summary-info .summary-value .roi-badge[data-v-7a022132]{font-size:13px;font-weight:600;margin-left:6px;padding:1px 6px;border-radius:4px;background:rgba(0,0,0,.04)}.user-manage-page .summary-cards .summary-card .summary-info .summary-sub[data-v-7a022132]{font-size:12px;color:#64748b;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-manage-page .summary-cards .summary-card .summary-info .summary-label[data-v-7a022132]{font-size:13px;color:#94a3b8;margin-top:2px}.user-manage-page .toolbar[data-v-7a022132]{margin-bottom:16px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:12px}.user-manage-page .toolbar .toolbar-left[data-v-7a022132],.user-manage-page .toolbar .toolbar-right[data-v-7a022132]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.user-manage-page .toolbar .toolbar-right[data-v-7a022132]{min-width:0}.user-manage-page .toolbar-search[data-v-7a022132]{width:280px;max-width:100%}.user-manage-page .toolbar-select[data-v-7a022132]{width:140px;max-width:100%}.user-manage-page .section-card-title[data-v-7a022132]{margin-bottom:12px;color:#1e3a5f;font-weight:600;font-size:15px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap;line-height:1.4}.user-manage-page .section-card-title-icon[data-v-7a022132]{-ms-flex-negative:0;flex-shrink:0}.user-manage-page .user-table-card[data-v-7a022132]{border-radius:12px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08);min-width:0;overflow:hidden}.user-manage-page .user-table-card[data-v-7a022132] .ant-card-body{padding:20px 24px}.user-manage-page .user-table-card .text-muted[data-v-7a022132]{color:#94a3b8}.user-manage-page .text-profit[data-v-7a022132]{color:#52c41a;font-weight:600}.user-manage-page .text-loss[data-v-7a022132]{color:#ff4d4f;font-weight:600}.user-manage-page .pnl-value[data-v-7a022132]{font-size:14px}.user-manage-page .roi-text[data-v-7a022132]{font-size:12px;margin-left:4px}.user-manage-page .pnl-detail[data-v-7a022132]{font-size:11px;margin-top:2px}.user-manage-page .symbol-text[data-v-7a022132]{font-weight:500}.user-manage-page .symbol-count[data-v-7a022132]{font-size:11px;margin-top:2px}.user-manage-page .status-cell[data-v-7a022132]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;white-space:nowrap}.user-manage-page .status-cell .status-dot[data-v-7a022132]{display:inline-block;width:7px;height:7px;border-radius:50%;-ms-flex-negative:0;flex-shrink:0}.user-manage-page .status-cell .status-dot.dot-running[data-v-7a022132]{background:#52c41a;-webkit-box-shadow:0 0 6px rgba(82,196,26,.5);box-shadow:0 0 6px rgba(82,196,26,.5);-webkit-animation:pulse-green-7a022132 2s infinite;animation:pulse-green-7a022132 2s infinite}.user-manage-page .status-cell .status-dot.dot-stopped[data-v-7a022132]{background:#d9d9d9}.user-manage-page .status-cell .status-running[data-v-7a022132]{color:#52c41a;font-weight:500;font-size:13px}.user-manage-page .status-cell .status-stopped[data-v-7a022132]{color:#999;font-size:13px}@-webkit-keyframes pulse-green-7a022132{0%,to{opacity:1}50%{opacity:.5}}@keyframes pulse-green-7a022132{0%,to{opacity:1}50%{opacity:.5}}.user-manage-page .user-cell[data-v-7a022132]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;max-width:100%;overflow:hidden;white-space:nowrap;cursor:default}.user-manage-page .user-cell .user-name[data-v-7a022132]{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:80px}.user-manage-page .indicator-name[data-v-7a022132]{color:#722ed1;font-size:12px}.user-manage-page .exchange-name[data-v-7a022132]{font-size:12px;text-transform:capitalize}.user-manage-page .address-text[data-v-7a022132],.user-manage-page .hash-text[data-v-7a022132]{font-family:Roboto Mono,Courier New,monospace;font-size:12px;color:#1890ff;cursor:pointer}.user-manage-page .address-text[data-v-7a022132]:hover,.user-manage-page .hash-text[data-v-7a022132]:hover{text-decoration:underline}.user-manage-page[data-v-7a022132] .ant-tag.ant-tag-grey{background-color:#f5f5f5;border-color:#d9d9d9;color:#595959}.user-manage-page.theme-dark[data-v-7a022132]{background:-webkit-gradient(linear,left top,left bottom,from(#141414),to(#1c1c1c));background:linear-gradient(180deg,#141414,#1c1c1c)}.user-manage-page.theme-dark .page-header .page-title[data-v-7a022132]{color:#e0e6ed}.user-manage-page.theme-dark .page-header .page-desc[data-v-7a022132]{color:#8b949e}.user-manage-page.theme-dark .manage-tabs[data-v-7a022132] .ant-tabs-bar{border-bottom-color:#2a2a2a}.user-manage-page.theme-dark .manage-tabs[data-v-7a022132] .ant-tabs-tab{color:#8b949e}.user-manage-page.theme-dark .manage-tabs[data-v-7a022132] .ant-tabs-tab:hover{color:#c9d1d9}.user-manage-page.theme-dark .manage-tabs[data-v-7a022132] .ant-tabs-tab-active{color:#1890ff}.user-manage-page.theme-dark .summary-cards .summary-card[data-v-7a022132]{background:#1c1c1c;-webkit-box-shadow:0 2px 12px rgba(0,0,0,.3);box-shadow:0 2px 12px rgba(0,0,0,.3)}.user-manage-page.theme-dark .summary-cards .summary-card .summary-info .summary-value[data-v-7a022132]{color:#e0e6ed}.user-manage-page.theme-dark .summary-cards .summary-card .summary-info .summary-value .roi-badge[data-v-7a022132]{background:hsla(0,0%,100%,.08)}.user-manage-page.theme-dark .summary-cards .summary-card .summary-info .summary-sub[data-v-7a022132]{color:#8b949e}.user-manage-page.theme-dark .summary-cards .summary-card .summary-info .summary-label[data-v-7a022132]{color:#6e7681}.user-manage-page.theme-dark .user-table-card[data-v-7a022132]{background:#1c1c1c;-webkit-box-shadow:0 4px 24px rgba(0,0,0,.25);box-shadow:0 4px 24px rgba(0,0,0,.25)}.user-manage-page.theme-dark .user-table-card[data-v-7a022132] .ant-card-body{background:#1c1c1c}.user-manage-page.theme-dark .user-table-card[data-v-7a022132] .ant-table{background:#1c1c1c;color:#c9d1d9}.user-manage-page.theme-dark .user-table-card[data-v-7a022132] .ant-table .ant-table-thead>tr>th{background:#252525;color:#e0e6ed;border-bottom-color:#2a2a2a}.user-manage-page.theme-dark .user-table-card[data-v-7a022132] .ant-table .ant-table-tbody>tr>td{border-bottom-color:#2a2a2a}.user-manage-page.theme-dark .user-table-card[data-v-7a022132] .ant-table .ant-table-tbody>tr:hover>td{background:#252525}.user-manage-page.theme-dark .user-table-card[data-v-7a022132] .ant-table .ant-table-fixed-left .ant-table-thead>tr>th,.user-manage-page.theme-dark .user-table-card[data-v-7a022132] .ant-table .ant-table-fixed-right .ant-table-thead>tr>th{background:#252525!important}.user-manage-page.theme-dark .user-table-card[data-v-7a022132] .ant-table .ant-table-fixed-left .ant-table-tbody>tr>td,.user-manage-page.theme-dark .user-table-card[data-v-7a022132] .ant-table .ant-table-fixed-right .ant-table-tbody>tr>td{background:#1c1c1c}.user-manage-page.theme-dark .user-table-card[data-v-7a022132] .ant-table .ant-table-fixed-left .ant-table-tbody>tr:hover>td,.user-manage-page.theme-dark .user-table-card[data-v-7a022132] .ant-table .ant-table-fixed-right .ant-table-tbody>tr:hover>td{background:#252525}.user-manage-page.theme-dark .user-table-card .text-muted[data-v-7a022132]{color:#6e7681}.user-manage-page.theme-dark .user-table-card h4[data-v-7a022132]{color:#e0e6ed!important}.user-manage-page.theme-dark .section-card-title[data-v-7a022132]{color:#e0e6ed}.user-manage-page .credits-value[data-v-7a022132]{font-weight:600;color:#722ed1}.user-manage-page .current-credits-info[data-v-7a022132],.user-manage-page .current-vip-info[data-v-7a022132]{margin-bottom:16px;padding:12px 16px;background:#f5f5f5;border-radius:8px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:12px}.user-manage-page .current-credits-info .label[data-v-7a022132],.user-manage-page .current-vip-info .label[data-v-7a022132]{color:#666}.user-manage-page .current-credits-info .value[data-v-7a022132],.user-manage-page .current-vip-info .value[data-v-7a022132]{font-weight:600;color:#1890ff;font-size:18px}.user-manage-page .current-credits-info .value.active[data-v-7a022132],.user-manage-page .current-vip-info .value.active[data-v-7a022132]{color:#52c41a}.user-manage-page .current-credits-info .value.expired[data-v-7a022132],.user-manage-page .current-vip-info .value.expired[data-v-7a022132]{color:#999}@media (max-width:1200px){.user-manage-page .summary-cards[data-v-7a022132]{grid-template-columns:repeat(2,1fr)}}@media (max-width:768px){.user-manage-page[data-v-7a022132]{padding:16px 12px;min-height:calc(100vh - 100px)}.user-manage-page .page-header[data-v-7a022132]{margin-bottom:16px}.user-manage-page .page-header .page-title[data-v-7a022132]{font-size:20px}.user-manage-page .page-header .page-title .anticon[data-v-7a022132]{font-size:22px}.user-manage-page .page-header .page-desc[data-v-7a022132]{font-size:13px}.user-manage-page .summary-cards[data-v-7a022132]{grid-template-columns:1fr;gap:12px;margin-bottom:16px}.user-manage-page .summary-cards .summary-card[data-v-7a022132]{padding:14px 16px;gap:12px}.user-manage-page .summary-cards .summary-card .summary-icon[data-v-7a022132]{width:44px;height:44px}.user-manage-page .summary-cards .summary-card .summary-icon .anticon[data-v-7a022132]{font-size:20px}.user-manage-page .summary-cards .summary-card .summary-info .summary-value[data-v-7a022132]{font-size:18px}.user-manage-page .toolbar[data-v-7a022132]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.user-manage-page .toolbar .toolbar-left[data-v-7a022132],.user-manage-page .toolbar .toolbar-right[data-v-7a022132]{width:100%}.user-manage-page .toolbar-search[data-v-7a022132],.user-manage-page .toolbar-select[data-v-7a022132]{width:100%!important}.user-manage-page .manage-tabs[data-v-7a022132] .ant-tabs-bar{margin-bottom:12px}.user-manage-page .manage-tabs[data-v-7a022132] .ant-tabs-nav-container{overflow-x:auto;overflow-y:hidden}.user-manage-page .manage-tabs[data-v-7a022132] .ant-tabs-nav-wrap{margin-bottom:0}.user-manage-page .manage-tabs[data-v-7a022132] .ant-tabs-tab{padding:10px 12px;margin-right:4px;font-size:13px;white-space:nowrap}.user-manage-page .user-table-card[data-v-7a022132] .ant-card-body{padding:12px 10px}.user-manage-page[data-v-7a022132] .ant-table{font-size:12px}.user-manage-page[data-v-7a022132] .ant-table-tbody>tr>td,.user-manage-page[data-v-7a022132] .ant-table-thead>tr>th{padding:8px 6px}.user-manage-page[data-v-7a022132] .ant-pagination{margin:12px 0 0}}@media (max-width:480px){.user-manage-page[data-v-7a022132]{padding:12px 8px}.user-manage-page .page-header .page-title[data-v-7a022132]{font-size:18px}.user-manage-page .toolbar .toolbar-left[data-v-7a022132]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.user-manage-page .toolbar .toolbar-left .ant-btn[data-v-7a022132]{width:100%}.user-manage-page .summary-cards .summary-card .summary-sub[data-v-7a022132]{white-space:normal;line-height:1.35}.user-manage-page[data-v-7a022132] .ant-pagination-options{display:none}}.user-manage-modal-dark .ant-modal-body,.user-manage-modal-dark .ant-modal-content,.user-manage-modal-dark .ant-modal-footer,.user-manage-modal-dark .ant-modal-header{background:#1c1c1c}.user-manage-modal-dark .ant-modal-header{border-bottom-color:#2a2a2a}.user-manage-modal-dark .ant-modal-title{color:#e0e6ed}.user-manage-modal-dark .ant-modal-close{color:hsla(0,0%,100%,.55)}.user-manage-modal-dark .ant-modal-footer{border-top-color:#2a2a2a}.user-manage-modal-dark .ant-form-item-label>label,.user-manage-modal-dark .current-credits-info .label,.user-manage-modal-dark .current-vip-info .label{color:#c9d1d9}.user-manage-modal-dark .ant-calendar-picker-input,.user-manage-modal-dark .ant-input,.user-manage-modal-dark .ant-input-affix-wrapper,.user-manage-modal-dark .ant-input-password,.user-manage-modal-dark .ant-select-selection{background:#141414!important;border-color:#303030!important;color:#e0e6ed!important}.user-manage-modal-dark .ant-input-password input::-webkit-input-placeholder,.user-manage-modal-dark .ant-input::-webkit-input-placeholder{color:#6e7681}.user-manage-modal-dark .ant-input-password input::-moz-placeholder,.user-manage-modal-dark .ant-input::-moz-placeholder{color:#6e7681}.user-manage-modal-dark .ant-input-password input:-ms-input-placeholder,.user-manage-modal-dark .ant-input:-ms-input-placeholder{color:#6e7681}.user-manage-modal-dark .ant-input-password input::-ms-input-placeholder,.user-manage-modal-dark .ant-input::-ms-input-placeholder{color:#6e7681}.user-manage-modal-dark .ant-input-password input::placeholder,.user-manage-modal-dark .ant-input::placeholder{color:#6e7681}.user-manage-modal-dark .ant-calendar-picker-icon,.user-manage-modal-dark .ant-input-affix-wrapper .ant-input-prefix,.user-manage-modal-dark .ant-input-password .anticon,.user-manage-modal-dark .ant-input-password-icon,.user-manage-modal-dark .ant-input-prefix,.user-manage-modal-dark .anticon{color:hsla(0,0%,100%,.55)}.user-manage-modal-dark .current-credits-info,.user-manage-modal-dark .current-vip-info{background:#141414}@media (max-width:576px){.user-manage-modal .ant-modal{max-width:calc(100vw - 16px)!important;margin:8px auto;padding-bottom:0;top:8px}.user-manage-modal .ant-modal-content{border-radius:10px}.user-manage-modal .ant-modal-body{max-height:calc(100vh - 180px);overflow-y:auto;padding:16px}.user-manage-modal .ant-modal-header{padding:12px 16px}.user-manage-modal .ant-modal-footer{padding:10px 16px}} \ No newline at end of file diff --git a/frontend/dist/css/605.0eaa2706.css b/frontend/dist/css/605.0eaa2706.css new file mode 100644 index 0000000..fc70000 --- /dev/null +++ b/frontend/dist/css/605.0eaa2706.css @@ -0,0 +1 @@ +.profile-exchange-modal .exchange-account-form .egress-ip-block{width:100%}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px;margin:0 0 16px;padding:12px 14px;border:1px solid rgba(24,144,255,.18);border-radius:10px;background:-webkit-gradient(linear,left top,right top,from(rgba(24,144,255,.06)),to(rgba(82,196,26,.04)));background:linear-gradient(90deg,rgba(24,144,255,.06),rgba(82,196,26,.04))}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:10px;min-width:0}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__icon{width:28px;height:28px;border-radius:50%;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background:rgba(24,144,255,.12);color:#1890ff;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__text{min-width:0}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__title{color:rgba(0,0,0,.85);font-size:13px;font-weight:600;line-height:1.5}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__hint{color:rgba(0,0,0,.55);font-size:12px;line-height:1.5;margin-top:2px}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__action{padding:0;white-space:nowrap;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.profile-exchange-modal .exchange-account-form .egress-ip-row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:6px}.profile-exchange-modal .exchange-account-form .egress-ip-refresh-row{margin-top:4px}.profile-exchange-modal .exchange-account-form .egress-ip-line{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;margin-bottom:10px}.profile-exchange-modal .exchange-account-form .egress-ip-kind{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;min-width:42px;font-size:12px;color:rgba(0,0,0,.55)}.profile-exchange-modal .exchange-account-form .egress-ip-value{-webkit-box-flex:1;-ms-flex:1 1 160px;flex:1 1 160px;min-width:0;font-family:Consolas,ui-monospace,monospace;font-size:12px;padding:6px 10px;border-radius:4px;border:1px solid #d9d9d9;background:#fafafa;color:#262626;word-break:break-all}.profile-exchange-modal .exchange-account-form .exchange-demo-checkbox-label{color:rgba(0,0,0,.85)}.profile-exchange-modal .exchange-account-form .exchange-demo-hint{margin-top:6px}.profile-exchange-modal .exchange-account-form .field-hint{margin-top:6px;font-size:12px;color:rgba(0,0,0,.45);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:6px}.profile-exchange-modal .exchange-account-form .test-result-msg{margin-top:8px;font-size:13px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.profile-exchange-modal .exchange-account-form .test-result-msg.success{color:#52c41a}.profile-exchange-modal .exchange-account-form .test-result-msg.error{color:#f5222d}.profile-exchange-modal--dark .ant-modal-content{background:#1c1c1c;-webkit-box-shadow:0 8px 32px rgba(0,0,0,.45);box-shadow:0 8px 32px rgba(0,0,0,.45)}.profile-exchange-modal--dark .ant-modal-header{background:#1c1c1c;border-bottom:1px solid #2a2a2a}.profile-exchange-modal--dark .ant-modal-title{color:#e0e6ed}.profile-exchange-modal--dark .ant-modal-close{color:#8b949e}.profile-exchange-modal--dark .ant-modal-body,.profile-exchange-modal--dark .ant-modal-close:hover{color:#c9d1d9}.profile-exchange-modal--dark .ant-modal-footer{background:#1c1c1c;border-top:1px solid #2a2a2a}.profile-exchange-modal--dark .exchange-account-form .ant-form-item-label>label{color:#c9d1d9}.profile-exchange-modal--dark .exchange-account-form .ant-form-item-explain,.profile-exchange-modal--dark .exchange-account-form .ant-form-item-extra{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-input,.profile-exchange-modal--dark .exchange-account-form .ant-input-number,.profile-exchange-modal--dark .exchange-account-form .ant-input-number-input,.profile-exchange-modal--dark .exchange-account-form .ant-input-password .ant-input{background:#141414!important;border-color:#2a2a2a!important;color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-input-password-icon{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-input-number-handler-wrap{background:#141414;border-left-color:#2a2a2a}.profile-exchange-modal--dark .exchange-account-form .ant-input-number-handler-down-inner,.profile-exchange-modal--dark .exchange-account-form .ant-input-number-handler-up-inner{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-select-selector{background:#141414!important;border-color:#2a2a2a!important;color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-item,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-placeholder{color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-selection,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection--single{background:#141414!important;border-color:#2a2a2a!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-placeholder,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-selected-value,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection__rendered{color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-arrow{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-checkbox-wrapper,.profile-exchange-modal--dark .exchange-account-form .ant-checkbox-wrapper span{color:#c9d1d9}.profile-exchange-modal--dark .exchange-account-form .exchange-demo-checkbox-label{color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .egress-ip-hint,.profile-exchange-modal--dark .exchange-account-form .exchange-demo-hint{color:#8b949e!important}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout{background:-webkit-gradient(linear,left top,right top,from(rgba(24,144,255,.12)),to(rgba(82,196,26,.08)));background:linear-gradient(90deg,rgba(24,144,255,.12),rgba(82,196,26,.08));border-color:rgba(88,166,255,.26)}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__icon{background:rgba(88,166,255,.16);color:#58a6ff}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__title{color:#e0e6ed}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__hint{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__action{color:#58a6ff}.profile-exchange-modal--dark .exchange-account-form .egress-ip-value{border-color:#2a2a2a!important;background:#141414!important;color:#e0e6ed!important}.profile-exchange-modal--dark .exchange-account-form a.egress-ip-action{color:#58a6ff}.profile-exchange-modal--dark .exchange-account-form .egress-ip-kind{color:#8b949e!important}.profile-exchange-modal--dark .exchange-account-form .ant-alert{background:rgba(250,173,20,.12);border-color:rgba(250,173,20,.45)}.profile-exchange-modal--dark .exchange-account-form .ant-alert-message{color:#ffc53d}.profile-exchange-modal--dark .exchange-account-form .ant-alert-description{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-alert-icon{color:#faad14}.profile-exchange-modal--dark .exchange-account-form .field-hint{color:#8b949e;margin-top:6px;font-size:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:6px}.profile-exchange-modal--dark .exchange-account-form .field-hint .anticon{color:#8b949e;margin-top:2px}.profile-exchange-modal--dark .exchange-account-form .test-result-msg{color:#c9d1d9}.profile-exchange-modal--dark .exchange-account-form .test-result-msg.success{color:#73d13d}.profile-exchange-modal--dark .exchange-account-form .test-result-msg.error{color:#ff7875}.profile-exchange-select-dropdown-dark.ant-select-dropdown{background:#1c1c1c}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item{color:#c9d1d9}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item:hover{background:#2a2a2a}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item-selected{background:#2a2a2a!important;color:#e0e6ed;font-weight:500}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item-group-title{color:#8b949e!important;font-size:12px}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item,.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item-selected{color:#c9d1d9!important}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-empty-description{color:#8b949e}.profile-page[data-v-2151383b]{padding:24px;min-height:calc(100vh - 120px);background:-webkit-gradient(linear,left top,left bottom,from(#f8fafc),to(#f1f5f9));background:linear-gradient(180deg,#f8fafc,#f1f5f9)}.profile-page .page-header[data-v-2151383b]{margin-bottom:24px}.profile-page .page-header .page-title[data-v-2151383b]{font-size:24px;font-weight:700;margin:0 0 8px 0;color:#1e3a5f;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:12px}.profile-page .page-header .page-title .anticon[data-v-2151383b]{font-size:28px;color:#1890ff}.profile-page .page-header .page-desc[data-v-2151383b]{color:#64748b;font-size:14px;margin:0}.profile-page .profile-cards-row[data-v-2151383b]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.profile-page .profile-cards-row .profile-card-col .ant-card[data-v-2151383b],.profile-page .profile-cards-row .profile-card-col[data-v-2151383b],.profile-page .profile-cards-row .right-cards-col .ant-card[data-v-2151383b],.profile-page .profile-cards-row .right-cards-col[data-v-2151383b]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .profile-cards-row .profile-card-col .ant-card[data-v-2151383b],.profile-page .profile-cards-row .right-cards-col .ant-card[data-v-2151383b]{height:100%}.profile-page .profile-cards-row .profile-card-col[data-v-2151383b] .ant-card-body,.profile-page .profile-cards-row .right-cards-col[data-v-2151383b] .ant-card-body{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .profile-cards-row .right-cards-row[data-v-2151383b]{height:100%;display:-webkit-box;display:-ms-flexbox;display:flex}.profile-page .profile-cards-row .right-cards-row .ant-col .ant-card[data-v-2151383b],.profile-page .profile-cards-row .right-cards-row .ant-col[data-v-2151383b]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .profile-cards-row .right-cards-row .ant-col .ant-card[data-v-2151383b]{height:100%}.profile-page .profile-cards-row .right-cards-row .ant-col[data-v-2151383b] .ant-card-body{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .profile-card[data-v-2151383b]{border-radius:12px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08);text-align:center}.profile-page .profile-card .avatar-section[data-v-2151383b]{padding:20px 0}.profile-page .profile-card .avatar-section .ant-avatar[data-v-2151383b]{-webkit-box-shadow:0 4px 12px rgba(0,0,0,.15);box-shadow:0 4px 12px rgba(0,0,0,.15)}.profile-page .profile-card .avatar-section .username[data-v-2151383b]{margin:16px 0 8px;font-size:20px;font-weight:600;color:#1e3a5f}.profile-page .profile-card .avatar-section .user-role[data-v-2151383b]{margin:0}.profile-page .profile-card .profile-info[data-v-2151383b]{text-align:left;-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:distribute;justify-content:space-around}.profile-page .profile-card .profile-info .info-item[data-v-2151383b]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:12px 0;border-bottom:1px solid #f0f0f0}.profile-page .profile-card .profile-info .info-item[data-v-2151383b]:last-child{border-bottom:none}.profile-page .profile-card .profile-info .info-item .anticon[data-v-2151383b]{font-size:16px;color:#1890ff;margin-right:12px}.profile-page .profile-card .profile-info .info-item .label[data-v-2151383b]{color:#64748b;margin-right:8px}.profile-page .profile-card .profile-info .info-item .value[data-v-2151383b]{color:#1e3a5f;font-weight:500}.profile-page .edit-card[data-v-2151383b]{border-radius:12px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08)}.profile-page .edit-card .password-form[data-v-2151383b],.profile-page .edit-card .profile-form[data-v-2151383b]{max-width:500px}.profile-page .edit-card .password-form[data-v-2151383b] .ant-input,.profile-page .edit-card .password-form[data-v-2151383b] .ant-input-password,.profile-page .edit-card .profile-form[data-v-2151383b] .ant-input,.profile-page .edit-card .profile-form[data-v-2151383b] .ant-input-password{border-radius:8px}.profile-page .edit-card .password-form .email-hint[data-v-2151383b],.profile-page .edit-card .profile-form .email-hint[data-v-2151383b]{margin-top:8px;font-size:12px;color:rgba(0,0,0,.45)}.profile-page .edit-card .password-form .email-hint.email-warning[data-v-2151383b],.profile-page .edit-card .profile-form .email-hint.email-warning[data-v-2151383b]{color:#faad14}.profile-page .edit-card .amount-positive[data-v-2151383b]{color:#52c41a;font-weight:600}.profile-page .edit-card .amount-negative[data-v-2151383b]{color:#ff4d4f;font-weight:600}.profile-page .edit-card .notification-settings-form .field-hint[data-v-2151383b]{margin-top:6px;font-size:12px;color:rgba(0,0,0,.45);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px}.profile-page .edit-card .notification-settings-form .field-hint .anticon[data-v-2151383b]{font-size:12px}.profile-page .edit-card .notification-settings-form[data-v-2151383b] .ant-checkbox-group{width:100%}.profile-page .edit-card .notification-settings-form[data-v-2151383b] .ant-checkbox-wrapper{margin-bottom:8px}.profile-page .credits-card[data-v-2151383b]{border-radius:12px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08);background:linear-gradient(135deg,#667eea,#764ba2);color:#fff}.profile-page .credits-card[data-v-2151383b] .ant-card-body{background:transparent;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .credits-card[data-v-2151383b] .ant-divider{border-color:hsla(0,0%,100%,.2)}.profile-page .credits-card .credits-header .credits-title[data-v-2151383b]{font-size:16px;font-weight:600;margin:0;color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.profile-page .credits-card .credits-header .credits-title .anticon[data-v-2151383b]{font-size:18px}.profile-page .credits-card .credits-body[data-v-2151383b]{padding:20px 0;text-align:center;-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.profile-page .credits-card .credits-body .credits-amount .amount-value[data-v-2151383b]{font-size:42px;font-weight:700;color:#fff;text-shadow:0 2px 4px rgba(0,0,0,.2)}.profile-page .credits-card .credits-body .credits-amount .amount-label[data-v-2151383b]{font-size:16px;color:hsla(0,0%,100%,.9);margin-left:8px}.profile-page .credits-card .credits-body .vip-status[data-v-2151383b]{margin-top:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:6px;font-size:13px}.profile-page .credits-card .credits-body .vip-status .vip-active[data-v-2151383b]{color:gold}.profile-page .credits-card .credits-body .vip-status .vip-expired[data-v-2151383b]{color:hsla(0,0%,100%,.6)}.profile-page .credits-card .credits-body .vip-status .no-vip[data-v-2151383b]{color:hsla(0,0%,100%,.7)}.profile-page .credits-card .credits-actions[data-v-2151383b]{text-align:center;margin-top:auto}.profile-page .credits-card .credits-actions .ant-btn[data-v-2151383b]{border-radius:20px;padding:0 24px;height:36px;font-weight:500;background:#fff;color:#667eea;border:none}.profile-page .credits-card .credits-actions .ant-btn[data-v-2151383b]:hover{background:hsla(0,0%,100%,.9);color:#764ba2}.profile-page .credits-card .credits-hint[data-v-2151383b]{margin-top:12px;text-align:center;font-size:12px;color:hsla(0,0%,100%,.7);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:6px}.profile-page .referral-card[data-v-2151383b]{border-radius:12px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08);background:linear-gradient(135deg,#11998e,#38ef7d);color:#fff}.profile-page .referral-card[data-v-2151383b] .ant-card-body{background:transparent;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .referral-card[data-v-2151383b] .ant-divider{border-color:hsla(0,0%,100%,.2)}.profile-page .referral-card .referral-header .referral-title[data-v-2151383b]{font-size:16px;font-weight:600;margin:0;color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.profile-page .referral-card .referral-header .referral-title .anticon[data-v-2151383b]{font-size:18px}.profile-page .referral-card .referral-body[data-v-2151383b]{padding:12px 0;-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.profile-page .referral-card .referral-body .referral-stats[data-v-2151383b]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around}.profile-page .referral-card .referral-body .referral-stats .stat-item[data-v-2151383b]{text-align:center}.profile-page .referral-card .referral-body .referral-stats .stat-item .stat-value[data-v-2151383b]{font-size:28px;font-weight:700;color:#fff;display:block}.profile-page .referral-card .referral-body .referral-stats .stat-item .stat-label[data-v-2151383b]{font-size:12px;color:hsla(0,0%,100%,.8)}.profile-page .referral-card .referral-body .referral-link-section .link-label[data-v-2151383b]{font-size:12px;color:hsla(0,0%,100%,.9);margin-bottom:6px}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-2151383b] .ant-input{background:hsla(0,0%,100%,.2);border:1px solid hsla(0,0%,100%,.3);color:#fff}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-2151383b] .ant-input::-webkit-input-placeholder{color:hsla(0,0%,100%,.6)}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-2151383b] .ant-input::-moz-placeholder{color:hsla(0,0%,100%,.6)}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-2151383b] .ant-input:-ms-input-placeholder{color:hsla(0,0%,100%,.6)}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-2151383b] .ant-input::-ms-input-placeholder{color:hsla(0,0%,100%,.6)}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-2151383b] .ant-input::placeholder{color:hsla(0,0%,100%,.6)}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-2151383b] .anticon-copy{color:#fff}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-2151383b] .anticon-copy:hover{color:gold}.profile-page .referral-card .referral-body .referral-hint[data-v-2151383b]{margin-top:auto;text-align:center;font-size:12px;color:hsla(0,0%,100%,.85);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:6px}.profile-page .referral-card .referral-body .referral-hint .anticon-gift[data-v-2151383b]{color:gold}.profile-page .referral-user-cell[data-v-2151383b]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px}.profile-page .referral-user-cell .user-info[data-v-2151383b]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .referral-user-cell .user-info .nickname[data-v-2151383b]{font-weight:500;color:#333}.profile-page .referral-user-cell .user-info .username[data-v-2151383b]{font-size:12px;color:#999}.profile-page .exchange-config-section .credential-hint[data-v-2151383b]{font-family:SFMono-Regular,Consolas,monospace;font-size:13px;color:#666}.profile-page .test-result-msg[data-v-2151383b]{margin-top:8px;font-size:13px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.profile-page .test-result-msg.success[data-v-2151383b]{color:#52c41a}.profile-page .test-result-msg.error[data-v-2151383b]{color:#f5222d}.profile-page.theme-dark[data-v-2151383b]{background:-webkit-gradient(linear,left top,left bottom,from(#141414),to(#1c1c1c));background:linear-gradient(180deg,#141414,#1c1c1c)}.profile-page.theme-dark .page-header .page-title[data-v-2151383b]{color:#e0e6ed}.profile-page.theme-dark .page-header .page-desc[data-v-2151383b]{color:#8b949e}.profile-page.theme-dark .edit-card[data-v-2151383b],.profile-page.theme-dark .profile-card[data-v-2151383b]{background:#1c1c1c;-webkit-box-shadow:0 4px 24px rgba(0,0,0,.25);box-shadow:0 4px 24px rgba(0,0,0,.25)}.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-card-body,.profile-page.theme-dark .profile-card[data-v-2151383b] .ant-card-body{background:#1c1c1c}.profile-page.theme-dark .profile-card .avatar-section .username[data-v-2151383b]{color:#e0e6ed}.profile-page.theme-dark .profile-card .profile-info .info-item[data-v-2151383b]{border-bottom-color:#2a2a2a}.profile-page.theme-dark .profile-card .profile-info .info-item .label[data-v-2151383b]{color:#8b949e}.profile-page.theme-dark .profile-card .profile-info .info-item .value[data-v-2151383b]{color:#e0e6ed}.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-tabs-bar{border-bottom-color:#2a2a2a}.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-tabs-tab{color:#8b949e}.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-tabs-tab:hover{color:#e0e6ed}.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-tabs-tab-active{color:#1890ff}.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-form-item-label label{color:#c9d1d9}.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-input,.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-input-password{background:#141414;border-color:#2a2a2a;color:#c9d1d9}.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-input-password:focus,.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-input-password:hover,.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-input:focus,.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-input:hover{border-color:#1890ff}.profile-page.theme-dark .credits-card[data-v-2151383b]{background:linear-gradient(135deg,#1c1c1c,#1a1a1a 50%,#141414);-webkit-box-shadow:0 4px 24px rgba(0,0,0,.25);box-shadow:0 4px 24px rgba(0,0,0,.25)}.profile-page.theme-dark .credits-card[data-v-2151383b] .ant-divider{border-color:hsla(0,0%,100%,.1)}.profile-page.theme-dark .credits-card .credits-actions .ant-btn[data-v-2151383b]{background:hsla(0,0%,100%,.15);color:#fff;border:1px solid hsla(0,0%,100%,.2)}.profile-page.theme-dark .credits-card .credits-actions .ant-btn[data-v-2151383b]:hover{background:hsla(0,0%,100%,.25)}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-table{background:#1c1c1c;color:#c9d1d9}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-table-thead>tr>th{background:#2a2a2a;color:#c9d1d9;border-bottom-color:#2a2a2a}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-table-tbody>tr>td{background:#1c1c1c;color:#c9d1d9;border-bottom-color:#2a2a2a}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-table-tbody>tr:hover>td{background:#2a2a2a}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-table-placeholder{background:#1c1c1c;color:#8b949e}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-table-tbody>tr>td,.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-table-tbody>tr>td :not(.ant-tag):not(.ant-btn),.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-table-tbody>tr>td div,.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-table-tbody>tr>td span{color:#c9d1d9}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .amount-positive{color:#52c41a}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .amount-negative{color:#f5222d}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-tag{border-width:1px;font-weight:600}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-tag-red{background:rgba(245,34,45,.25);border-color:#f5222d;color:#ff7875}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-tag-green{background:rgba(82,196,26,.25);border-color:#52c41a;color:#73d13d}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-tag-blue{background:rgba(24,144,255,.25);border-color:#1890ff;color:#69c0ff}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-tag-gold,.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-tag-orange{background:rgba(250,173,20,.25);border-color:#faad14;color:#ffc53d}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-tag-cyan{background:rgba(19,194,194,.25);border-color:#13c2c2;color:#5cdbd3}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-tag-purple{background:rgba(114,46,209,.25);border-color:#722ed1;color:#b37feb}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-tag-volcano{background:rgba(250,84,28,.25);border-color:#fa541c;color:#ff9c6e}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-tag-lime{background:hsla(89,56%,62%,.25);border-color:#a0d911;color:#bae637}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-tag-default{background:hsla(0,0%,100%,.08);border-color:hsla(0,0%,100%,.2);color:#c9d1d9}.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-form-item-label>label,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-form-item-label>label,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-form-item-label>label{color:#c9d1d9}.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-form-item-explain,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-form-item-extra,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-form-item-explain,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-form-item-extra,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-form-item-explain,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-form-item-extra{color:#8b949e}.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input-number,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input-password,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-select-selector,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input-number,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input-password,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-select-selector,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input-number,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input-password,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-select-selector{background:#141414;border-color:#2a2a2a;color:#c9d1d9}.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input-number::-webkit-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input-password::-webkit-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input::-webkit-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-select-selector::-webkit-input-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input-number::-webkit-input-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input-password::-webkit-input-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input::-webkit-input-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-select-selector::-webkit-input-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input-number::-webkit-input-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input-password::-webkit-input-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input::-webkit-input-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-select-selector::-webkit-input-placeholder{color:#6e7681}.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input-number::-moz-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input-password::-moz-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input::-moz-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-select-selector::-moz-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input-number::-moz-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input-password::-moz-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input::-moz-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-select-selector::-moz-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input-number::-moz-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input-password::-moz-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input::-moz-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-select-selector::-moz-placeholder{color:#6e7681}.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input-number:-ms-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input-password:-ms-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input:-ms-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-select-selector:-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input-number:-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input-password:-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input:-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-select-selector:-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input-number:-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input-password:-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input:-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-select-selector:-ms-input-placeholder{color:#6e7681}.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input-number::-ms-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input-password::-ms-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input::-ms-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-select-selector::-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input-number::-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input-password::-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input::-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-select-selector::-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input-number::-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input-password::-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input::-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-select-selector::-ms-input-placeholder{color:#6e7681}.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input-number::placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input-password::placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input::placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-select-selector::placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input-number::placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input-password::placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input::placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-select-selector::placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input-number::placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input-password::placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input::placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-select-selector::placeholder{color:#6e7681}.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-checkbox-wrapper,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-checkbox-wrapper span,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-radio-wrapper,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-radio-wrapper span,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-select-selection-item,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-select-selection-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-checkbox-wrapper,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-checkbox-wrapper span,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-radio-wrapper,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-radio-wrapper span,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-select-selection-item,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-select-selection-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-checkbox-wrapper,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-checkbox-wrapper span,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-radio-wrapper,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-radio-wrapper span,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-select-selection-item,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-select-selection-placeholder{color:#c9d1d9}.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-checkbox-checked .ant-checkbox-inner,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-radio-checked .ant-radio-inner,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-checkbox-checked .ant-checkbox-inner,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-radio-checked .ant-radio-inner,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-checkbox-checked .ant-checkbox-inner,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-radio-checked .ant-radio-inner{background-color:#1890ff;border-color:#1890ff}.profile-page.theme-dark .notification-settings-form .email-hint[data-v-2151383b],.profile-page.theme-dark .notification-settings-form .field-hint[data-v-2151383b],.profile-page.theme-dark .password-form .email-hint[data-v-2151383b],.profile-page.theme-dark .password-form .field-hint[data-v-2151383b],.profile-page.theme-dark .profile-form .email-hint[data-v-2151383b],.profile-page.theme-dark .profile-form .field-hint[data-v-2151383b]{color:#8b949e}.profile-page.theme-dark .notification-settings-form .email-warning[data-v-2151383b],.profile-page.theme-dark .password-form .email-warning[data-v-2151383b],.profile-page.theme-dark .profile-form .email-warning[data-v-2151383b]{color:#f5222d}.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-alert{background:#1c1c1c;border-color:#2a2a2a;color:#c9d1d9}.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-alert .ant-alert-message{color:#c9d1d9}.profile-page.theme-dark .exchange-config-section .credential-hint[data-v-2151383b],.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-alert .ant-alert-description{color:#8b949e}.profile-page.theme-dark .test-result-msg.success[data-v-2151383b]{color:#52c41a}.profile-page.theme-dark .test-result-msg.error[data-v-2151383b]{color:#f5222d}.profile-page.theme-dark .referral-user-cell .user-info .nickname[data-v-2151383b]{color:#c9d1d9}.profile-page.theme-dark .referral-user-cell .user-info .username[data-v-2151383b]{color:#8b949e}.profile-page.theme-dark[data-v-2151383b] .ant-tag{color:#c9d1d9}.profile-page.theme-dark[data-v-2151383b] .ant-tag.ant-tag-has-color{color:#fff!important;border-color:transparent!important}.profile-page.theme-dark[data-v-2151383b] .ant-input-prefix .anticon,.profile-page.theme-dark[data-v-2151383b] .ant-input-suffix .anticon,.profile-page.theme-dark[data-v-2151383b] .credits-hint .anticon,.profile-page.theme-dark[data-v-2151383b] .email-hint .anticon,.profile-page.theme-dark[data-v-2151383b] .field-hint .anticon,.profile-page.theme-dark[data-v-2151383b] .notification-settings-form .anticon{color:#c9d1d9!important}.profile-page.theme-dark[data-v-2151383b] .ant-pagination .ant-pagination-item{background:#1c1c1c;border-color:#2a2a2a}.profile-page.theme-dark[data-v-2151383b] .ant-pagination .ant-pagination-item a{color:#c9d1d9}.profile-page.theme-dark[data-v-2151383b] .ant-pagination .ant-pagination-item:hover{border-color:#1890ff}.profile-page.theme-dark[data-v-2151383b] .ant-pagination .ant-pagination-item-active{background:#1890ff;border-color:#1890ff}.profile-page.theme-dark[data-v-2151383b] .ant-pagination .ant-pagination-item-active a{color:#fff}.profile-page.theme-dark[data-v-2151383b] .ant-pagination .ant-pagination-next .ant-pagination-item-link,.profile-page.theme-dark[data-v-2151383b] .ant-pagination .ant-pagination-prev .ant-pagination-item-link{background:#1c1c1c;border-color:#2a2a2a;color:#c9d1d9}.profile-page.theme-dark[data-v-2151383b] .ant-pagination .ant-pagination-options .ant-select-selector{background:#141414;border-color:#2a2a2a;color:#c9d1d9}.profile-page.theme-dark[data-v-2151383b] .ant-btn.ant-btn-default{background:#1c1c1c;border-color:#2a2a2a;color:#c9d1d9}.profile-page.theme-dark[data-v-2151383b] .ant-btn.ant-btn-default:hover{border-color:#1890ff;color:#1890ff}@media screen and (max-width:768px){.profile-page[data-v-2151383b]{padding:12px}.profile-page .page-header[data-v-2151383b]{margin-bottom:16px}.profile-page .page-header .page-title[data-v-2151383b]{font-size:20px}.profile-page .page-header .page-title .anticon[data-v-2151383b]{font-size:22px}.profile-page .page-header .page-desc[data-v-2151383b]{font-size:13px}.profile-page .profile-cards-row[data-v-2151383b]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .profile-cards-row .profile-card-col[data-v-2151383b]{margin-bottom:12px}.profile-page .profile-cards-row .right-cards-col .right-cards-row[data-v-2151383b]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .profile-cards-row .right-cards-col .right-cards-row .ant-col[data-v-2151383b]{margin-bottom:12px}.profile-page .profile-card[data-v-2151383b]{border-radius:10px}.profile-page .profile-card .avatar-section[data-v-2151383b]{padding:16px 0}.profile-page .profile-card .avatar-section[data-v-2151383b] .ant-avatar{width:80px!important;height:80px!important;line-height:80px!important}.profile-page .profile-card .avatar-section .username[data-v-2151383b]{font-size:18px;margin:12px 0 6px}.profile-page .profile-card .profile-info .info-item[data-v-2151383b]{padding:10px 0;-ms-flex-wrap:wrap;flex-wrap:wrap}.profile-page .profile-card .profile-info .info-item .anticon[data-v-2151383b]{font-size:14px;margin-right:8px}.profile-page .profile-card .profile-info .info-item .label[data-v-2151383b]{font-size:13px}.profile-page .profile-card .profile-info .info-item .value[data-v-2151383b]{font-size:13px;word-break:break-all}.profile-page .credits-card[data-v-2151383b]{border-radius:10px}.profile-page .credits-card .credits-header .credits-title[data-v-2151383b]{font-size:15px}.profile-page .credits-card .credits-header .credits-title .anticon[data-v-2151383b]{font-size:16px}.profile-page .credits-card .credits-body[data-v-2151383b]{padding:16px 0}.profile-page .credits-card .credits-body .credits-amount .amount-value[data-v-2151383b]{font-size:32px}.profile-page .credits-card .credits-body .credits-amount .amount-label[data-v-2151383b]{font-size:14px}.profile-page .credits-card .credits-body .vip-status[data-v-2151383b]{font-size:12px;margin-top:10px}.profile-page .credits-card .credits-actions .ant-btn[data-v-2151383b]{height:34px;padding:0 20px;font-size:14px}.profile-page .credits-card .credits-hint[data-v-2151383b]{font-size:11px;margin-top:10px}.profile-page .referral-card[data-v-2151383b]{border-radius:10px}.profile-page .referral-card .referral-header .referral-title[data-v-2151383b]{font-size:15px}.profile-page .referral-card .referral-header .referral-title .anticon[data-v-2151383b]{font-size:16px}.profile-page .referral-card .referral-body[data-v-2151383b]{padding:10px 0}.profile-page .referral-card .referral-body .referral-stats .stat-item .stat-value[data-v-2151383b]{font-size:24px}.profile-page .referral-card .referral-body .referral-link-section .link-label[data-v-2151383b],.profile-page .referral-card .referral-body .referral-stats .stat-item .stat-label[data-v-2151383b]{font-size:11px}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-2151383b] .ant-input{font-size:12px}.profile-page .referral-card .referral-body .referral-hint[data-v-2151383b]{font-size:11px;padding-top:8px}.profile-page .edit-card[data-v-2151383b]{border-radius:10px;margin-top:12px!important}.profile-page .edit-card[data-v-2151383b] .ant-card-body{padding:12px}.profile-page .edit-card[data-v-2151383b] .ant-tabs-nav .ant-tabs-tab{padding:10px 12px;font-size:13px}.profile-page .edit-card[data-v-2151383b] .ant-tabs-nav-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}.profile-page .edit-card[data-v-2151383b] .ant-tabs-nav-scroll::-webkit-scrollbar{display:none}.profile-page .edit-card .password-form[data-v-2151383b],.profile-page .edit-card .profile-form[data-v-2151383b]{max-width:100%}.profile-page .edit-card .password-form[data-v-2151383b] .ant-form-item-label,.profile-page .edit-card .profile-form[data-v-2151383b] .ant-form-item-label{padding-bottom:4px}.profile-page .edit-card .password-form[data-v-2151383b] .ant-form-item-label label,.profile-page .edit-card .profile-form[data-v-2151383b] .ant-form-item-label label{font-size:13px}.profile-page .edit-card .password-form[data-v-2151383b] .ant-input,.profile-page .edit-card .password-form[data-v-2151383b] .ant-input-password,.profile-page .edit-card .profile-form[data-v-2151383b] .ant-input,.profile-page .edit-card .profile-form[data-v-2151383b] .ant-input-password{font-size:14px}.profile-page .edit-card .password-form .email-hint[data-v-2151383b],.profile-page .edit-card .profile-form .email-hint[data-v-2151383b]{font-size:11px}.profile-page .edit-card .password-form[data-v-2151383b] .ant-alert{font-size:12px;padding:8px 12px}.profile-page .edit-card .notification-settings-form[data-v-2151383b] .ant-alert{font-size:12px;padding:8px 12px;margin-bottom:16px!important}.profile-page .edit-card .notification-settings-form[data-v-2151383b] .ant-form{max-width:100%}.profile-page .edit-card .notification-settings-form[data-v-2151383b] .ant-checkbox-group .ant-row{margin-left:0!important;margin-right:0!important}.profile-page .edit-card .notification-settings-form[data-v-2151383b] .ant-checkbox-group .ant-row .ant-col{padding-left:0!important;padding-right:8px!important}.profile-page .edit-card .notification-settings-form[data-v-2151383b] .ant-checkbox-group .ant-checkbox-wrapper{font-size:13px;margin-bottom:6px}.profile-page .edit-card .notification-settings-form .field-hint[data-v-2151383b]{font-size:11px;-ms-flex-wrap:wrap;flex-wrap:wrap}.profile-page .edit-card .notification-settings-form[data-v-2151383b] .ant-form-item{margin-bottom:16px}.profile-page .edit-card .notification-settings-form[data-v-2151383b] .ant-form-item:last-child .ant-btn{width:100%;margin-bottom:8px}.profile-page .edit-card .notification-settings-form[data-v-2151383b] .ant-form-item:last-child .ant-btn+.ant-btn{margin-left:0!important}.profile-page .edit-card[data-v-2151383b] .ant-table-wrapper{overflow-x:auto}.profile-page .edit-card[data-v-2151383b] .ant-table-wrapper .ant-table{min-width:500px}.profile-page .referral-user-cell[data-v-2151383b]{gap:8px}.profile-page .referral-user-cell[data-v-2151383b] .ant-avatar{width:28px!important;height:28px!important;line-height:28px!important}.profile-page .referral-user-cell .user-info .nickname[data-v-2151383b]{font-size:13px}.profile-page .referral-user-cell .user-info .username[data-v-2151383b]{font-size:11px}}@media screen and (max-width:480px){.profile-page[data-v-2151383b]{padding:8px}.profile-page .page-header[data-v-2151383b]{margin-bottom:12px}.profile-page .page-header .page-title[data-v-2151383b]{font-size:18px;gap:8px}.profile-page .page-header .page-title .anticon[data-v-2151383b]{font-size:20px}.profile-page .credits-card .credits-body .credits-amount .amount-value[data-v-2151383b]{font-size:28px}.profile-page .credits-card .credits-body .credits-amount .amount-label[data-v-2151383b]{font-size:13px}.profile-page .credits-card .credits-actions .ant-btn[data-v-2151383b]{width:100%}.profile-page .referral-card .referral-body .referral-stats .stat-item .stat-value[data-v-2151383b]{font-size:20px}.profile-page .edit-card[data-v-2151383b] .ant-tabs-nav .ant-tabs-tab{padding:8px 10px;font-size:12px}.profile-page .edit-card .notification-settings-form[data-v-2151383b] .ant-checkbox-group .ant-row .ant-col{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}}.exchange-signup-modal .exchange-signup-promo{margin-bottom:18px;padding:12px 14px;border-radius:12px;background:-webkit-gradient(linear,left top,right top,from(rgba(22,119,255,.12)),to(rgba(99,102,241,.1)));background:linear-gradient(90deg,rgba(22,119,255,.12),rgba(99,102,241,.1));border:1px solid rgba(22,119,255,.2);color:#1e40af;font-size:15px;font-weight:600;line-height:1.5;text-align:center}.exchange-signup-modal .exchange-signup-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.exchange-signup-modal .exchange-signup-card{border:1px solid #eef1f5;border-radius:16px;padding:16px;background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fafcff));background:linear-gradient(180deg,#fff,#fafcff);-webkit-box-shadow:0 8px 24px rgba(15,23,42,.05);box-shadow:0 8px 24px rgba(15,23,42,.05)}.exchange-signup-modal .exchange-signup-card__header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:12px;margin-bottom:12px}.exchange-signup-modal .exchange-signup-logo{width:44px;height:44px;border-radius:12px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;font-size:16px;font-weight:700}.exchange-signup-modal .exchange-signup-name{font-size:16px;font-weight:700;color:#1f2937}.exchange-signup-modal .exchange-signup-actions{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px}.profile-exchange-modal--dark .exchange-signup-modal .exchange-signup-promo{color:#93c5fd;background:-webkit-gradient(linear,left top,right top,from(rgba(59,130,246,.18)),to(rgba(99,102,241,.14)));background:linear-gradient(90deg,rgba(59,130,246,.18),rgba(99,102,241,.14));border-color:rgba(96,165,250,.35)}.profile-exchange-modal--dark .exchange-signup-modal .exchange-signup-card{background:-webkit-gradient(linear,left top,left bottom,from(#171717),to(#1f1f1f));background:linear-gradient(180deg,#171717,#1f1f1f);border-color:#2a2a2a;-webkit-box-shadow:none;box-shadow:none}.profile-exchange-modal--dark .exchange-signup-modal .exchange-signup-name{color:#e0e6ed} \ No newline at end of file diff --git a/frontend/dist/css/747.b2c1db3f.css b/frontend/dist/css/747.b2c1db3f.css deleted file mode 100644 index 58a6346..0000000 --- a/frontend/dist/css/747.b2c1db3f.css +++ /dev/null @@ -1 +0,0 @@ -.quick-trade-drawer[data-v-989be352] .ant-drawer-body{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%;overflow-y:auto}.qt-header[data-v-989be352]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid #f0f0f0}.qt-header .qt-header-left[data-v-989be352],.qt-header[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-header .qt-header-left[data-v-989be352]{gap:8px}.qt-header .qt-header-left .qt-icon[data-v-989be352]{font-size:20px;color:#1890ff}.qt-header .qt-header-left .qt-header-title[data-v-989be352]{font-size:16px;font-weight:600}.qt-header .qt-close[data-v-989be352]{font-size:16px;cursor:pointer;color:#999}.qt-header .qt-close[data-v-989be352]:hover{color:#333}.qt-symbol-bar[data-v-989be352]{padding:12px 20px;background:linear-gradient(135deg,#f6f8fc,#eef2f8);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:8px}.qt-symbol-bar .qt-symbol-selector[data-v-989be352],.qt-symbol-bar .qt-symbol-selector[data-v-989be352] .ant-select{width:100%}.qt-symbol-bar .qt-symbol-selector[data-v-989be352] .ant-select-selection{border-radius:6px;border:1px solid #d9d9d9}.qt-symbol-bar .qt-price-display[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.qt-symbol-bar .qt-price-display .qt-current-price[data-v-989be352]{font-size:16px;font-weight:600;color:#333}.qt-symbol-option[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.qt-symbol-option .qt-symbol-option-name[data-v-989be352]{font-weight:600;font-size:14px}.qt-symbol-option .qt-symbol-option-desc[data-v-989be352]{color:#999;font-size:12px}.qt-section[data-v-989be352]{padding:8px 20px}.qt-section .qt-label[data-v-989be352]{font-size:12px;color:#999;margin-bottom:4px;font-weight:500}.qt-section .qt-crypto-hint[data-v-989be352]{font-size:10px;color:#faad14;background:rgba(250,173,20,.1);padding:1px 6px;border-radius:4px;margin-left:4px}.qt-balance[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;margin-top:6px;font-size:12px}.qt-balance .qt-balance-label[data-v-989be352]{color:#999}.qt-balance .qt-balance-value[data-v-989be352]{color:#52c41a;font-weight:600}.qt-manage-link[data-v-989be352]{margin-top:6px;font-size:12px}.qt-direction-toggle[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px}.qt-direction-toggle .qt-dir-btn[data-v-989be352]{-webkit-box-flex:1;-ms-flex:1;flex:1;padding:10px;text-align:center;border-radius:8px;font-weight:600;font-size:14px;cursor:pointer;-webkit-transition:all .2s;transition:all .2s;border:2px solid transparent;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:6px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.qt-direction-toggle .qt-dir-long[data-v-989be352]{color:#52c41a;background:rgba(82,196,26,.06);border-color:rgba(82,196,26,.2)}.qt-direction-toggle .qt-dir-long.active[data-v-989be352]{background:#52c41a;color:#fff;border-color:#52c41a;-webkit-box-shadow:0 4px 12px rgba(82,196,26,.3);box-shadow:0 4px 12px rgba(82,196,26,.3)}.qt-direction-toggle .qt-dir-long[data-v-989be352]:hover:not(.active){border-color:#52c41a}.qt-direction-toggle .qt-dir-short[data-v-989be352]{color:#f5222d;background:rgba(245,34,45,.06);border-color:rgba(245,34,45,.2)}.qt-direction-toggle .qt-dir-short.active[data-v-989be352]{background:#f5222d;color:#fff;border-color:#f5222d;-webkit-box-shadow:0 4px 12px rgba(245,34,45,.3);box-shadow:0 4px 12px rgba(245,34,45,.3)}.qt-direction-toggle .qt-dir-short[data-v-989be352]:hover:not(.active){border-color:#f5222d}.qt-quick-amounts[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:6px;margin-top:6px}.qt-quick-amounts button[data-v-989be352]{-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:12px}.qt-leverage-row[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-tpsl-row[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px}.qt-tpsl-row .qt-tpsl-item[data-v-989be352]{-webkit-box-flex:1;-ms-flex:1;flex:1}.qt-submit-section[data-v-989be352]{padding:12px 20px}.qt-submit-section .qt-submit-btn[data-v-989be352]{height:48px;font-size:16px;font-weight:700;border-radius:8px;letter-spacing:.5px}.qt-submit-section .qt-btn-long[data-v-989be352]{background:#52c41a!important;border-color:#52c41a!important}.qt-submit-section .qt-btn-long[data-v-989be352]:hover{background:#73d13d!important}.qt-submit-section .qt-btn-long[data-v-989be352]:active{background:#389e0d!important}.qt-submit-section .qt-btn-short[data-v-989be352]{background:#f5222d!important;border-color:#f5222d!important}.qt-submit-section .qt-btn-short[data-v-989be352]:hover{background:#ff4d4f!important}.qt-submit-section .qt-btn-short[data-v-989be352]:active{background:#cf1322!important}.qt-position-section[data-v-989be352]{padding:8px 20px 12px}.qt-position-section .qt-section-header[data-v-989be352]{font-size:13px;font-weight:600;color:#666;margin-bottom:8px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.qt-history-section[data-v-989be352]{padding:8px 20px 12px}.qt-history-section[data-v-989be352] .ant-collapse{background:transparent;border:none}.qt-history-section[data-v-989be352] .ant-collapse-item{border:none}.qt-history-section[data-v-989be352] .ant-collapse-header{padding:0!important;cursor:pointer}.qt-history-section[data-v-989be352] .ant-collapse-header:hover{opacity:.8}.qt-history-section[data-v-989be352] .ant-collapse-content{border:none;background:transparent}.qt-history-section[data-v-989be352] .ant-collapse-content-box{padding:8px 0 0 0!important}.qt-history-section .qt-section-header[data-v-989be352]{font-size:13px;font-weight:600;color:#666;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.qt-history-section .qt-history-count[data-v-989be352]{font-size:12px;color:#999;font-weight:400}.qt-position-card[data-v-989be352]{background:#fafafa;border-radius:8px;padding:10px 12px;border-left:3px solid #d9d9d9}.qt-position-card.long[data-v-989be352]{border-left-color:#52c41a}.qt-position-card.short[data-v-989be352]{border-left-color:#f5222d}.qt-position-card .qt-pos-row[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;font-size:13px;padding:2px 0}.qt-position-card .qt-pos-row span[data-v-989be352]:first-child{color:#999}.qt-position-empty[data-v-989be352]{background:#fafafa;border-radius:8px;padding:20px 12px;text-align:center;border:1px dashed #d9d9d9}.qt-green[data-v-989be352]{color:#52c41a!important}.qt-red[data-v-989be352]{color:#f5222d!important}.qt-trade-list .qt-trade-item[data-v-989be352]{padding:6px 0;border-bottom:1px solid #f5f5f5}.qt-trade-list .qt-trade-item[data-v-989be352]:last-child{border-bottom:none}.qt-trade-list .qt-trade-item .qt-trade-main[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.qt-trade-list .qt-trade-item .qt-trade-main .qt-trade-symbol[data-v-989be352]{font-weight:600;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-main .qt-trade-amount[data-v-989be352]{margin-left:auto;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-meta[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-top:2px}.qt-trade-list .qt-trade-item .qt-trade-meta .qt-trade-time[data-v-989be352]{font-size:11px;color:#bbb}.theme-dark .qt-header[data-v-989be352]{border-bottom-color:#303030}.theme-dark .qt-header .qt-header-title[data-v-989be352]{color:#e0e0e0}.theme-dark .qt-header .qt-close[data-v-989be352]{color:#666}.theme-dark .qt-header .qt-close[data-v-989be352]:hover{color:#bbb}.theme-dark .qt-symbol-bar[data-v-989be352]{background:linear-gradient(135deg,#1a1f2e,#141824)}.theme-dark .qt-symbol-bar .qt-current-price[data-v-989be352]{color:#e0e0e0}.theme-dark .qt-symbol-bar[data-v-989be352] .ant-select-selection{background:#1a1f2e;border-color:#303030;color:#e0e0e0}.theme-dark .qt-symbol-bar[data-v-989be352] .ant-select-selection__placeholder{color:#666}.theme-dark .qt-symbol-option .qt-symbol-option-name[data-v-989be352]{color:#e0e0e0}.theme-dark .qt-symbol-option .qt-symbol-option-desc[data-v-989be352]{color:#999}.theme-dark .qt-section .qt-label[data-v-989be352]{color:#777}.theme-dark .qt-position-card[data-v-989be352]{background:#1a1f2e}.theme-dark .qt-position-card .qt-pos-row span[data-v-989be352]:first-child{color:#777}.theme-dark .qt-history-section .qt-section-header[data-v-989be352],.theme-dark .qt-position-card .qt-pos-row span[data-v-989be352]:last-child{color:#ccc}.theme-dark .qt-history-section .qt-history-count[data-v-989be352]{color:#888}.theme-dark .qt-history-section[data-v-989be352] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark .qt-history-section[data-v-989be352] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark .qt-history-section[data-v-989be352] .ant-collapse .ant-collapse-header:hover{opacity:.8}.theme-dark .qt-history-section[data-v-989be352] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark .qt-trade-item[data-v-989be352]{border-bottom-color:#2a2a2a!important}.theme-dark .qt-trade-item .qt-trade-symbol[data-v-989be352]{color:#e0e0e0}.theme-dark .qt-trade-item .qt-trade-amount[data-v-989be352]{color:#ccc}.theme-dark[data-v-989be352] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark[data-v-989be352] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark[data-v-989be352] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark[data-v-989be352] .ant-drawer-content{background:#141414}.theme-dark[data-v-989be352] .ant-input-number,.theme-dark[data-v-989be352] .ant-select-selection{background:#1a1f2e;border-color:#303030;color:#e0e0e0}.theme-dark[data-v-989be352] .ant-radio-group .ant-radio-button-wrapper{background:#1a1f2e;border-color:#303030;color:#ccc}.theme-dark[data-v-989be352] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#1890ff;border-color:#1890ff;color:#fff}.theme-dark[data-v-989be352] .ant-slider-rail{background:#303030}.theme-dark[data-v-989be352] .ant-slider-track{background:#1890ff}.polymarket-analysis-modal .input-section .input-actions[data-v-67e891d2]{margin-top:12px}.polymarket-analysis-modal .result-section .market-info[data-v-67e891d2]{margin-bottom:24px}.polymarket-analysis-modal .result-section .market-info h3[data-v-67e891d2]{margin-bottom:12px;font-size:18px;font-weight:600}.polymarket-analysis-modal .result-section .market-info .market-meta[data-v-67e891d2]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:16px;-ms-flex-wrap:wrap;flex-wrap:wrap}.polymarket-analysis-modal .result-section .market-info .market-meta .meta-item[data-v-67e891d2]{color:rgba(0,0,0,.65);font-size:14px}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison[data-v-67e891d2]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:16px;margin:24px 0}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item[data-v-67e891d2]{-webkit-box-flex:1;-ms-flex:1;flex:1;text-align:center;padding:16px;background:#f5f5f5;border-radius:4px}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item .prob-label[data-v-67e891d2]{font-size:12px;color:rgba(0,0,0,.65);margin-bottom:8px}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item .prob-value[data-v-67e891d2]{font-size:24px;font-weight:600}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item .prob-value.ai-prob[data-v-67e891d2]{color:#1890ff}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item .prob-value.divergence-positive[data-v-67e891d2]{color:#52c41a}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item .prob-value.divergence-negative[data-v-67e891d2]{color:#ff4d4f}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item .prob-value.divergence-neutral[data-v-67e891d2]{color:rgba(0,0,0,.65)}.polymarket-analysis-modal .result-section .analysis-result .recommendation-section[data-v-67e891d2]{margin:24px 0}.polymarket-analysis-modal .result-section .analysis-result .recommendation-section .rec-card[data-v-67e891d2]{text-align:center;padding:16px;background:#f5f5f5;border-radius:4px}.polymarket-analysis-modal .result-section .analysis-result .recommendation-section .rec-card .rec-label[data-v-67e891d2]{font-size:12px;color:rgba(0,0,0,.65);margin-bottom:8px}.polymarket-analysis-modal .result-section .analysis-result .recommendation-section .rec-card .rec-value[data-v-67e891d2]{font-size:24px;font-weight:600;color:#1890ff}.polymarket-analysis-modal .result-section .analysis-result .key-factors-section[data-v-67e891d2],.polymarket-analysis-modal .result-section .analysis-result .reasoning-section[data-v-67e891d2]{margin:24px 0}.polymarket-analysis-modal .result-section .analysis-result .key-factors-section h4[data-v-67e891d2],.polymarket-analysis-modal .result-section .analysis-result .reasoning-section h4[data-v-67e891d2]{margin-bottom:12px;font-size:16px;font-weight:600}.polymarket-analysis-modal .result-section .analysis-result .key-factors-section .reasoning-text[data-v-67e891d2],.polymarket-analysis-modal .result-section .analysis-result .reasoning-section .reasoning-text[data-v-67e891d2]{line-height:1.8;color:rgba(0,0,0,.85);white-space:pre-wrap}.polymarket-analysis-modal .result-section .result-actions[data-v-67e891d2]{margin-top:24px;text-align:right}.polymarket-analysis-modal .loading-section[data-v-67e891d2]{text-align:center;padding:40px 0}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-tabs-bar{border-bottom-color:#2a2a2a}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-tabs-tab{color:#a3a3a3!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-tabs-tab-active{color:#d4d4d4!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-tabs-ink-bar{background:#58a6ff!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-divider{color:#d4d4d4;border-top-color:#2a2a2a}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-divider-inner-text{color:#d4d4d4!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-input,.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-input-affix-wrapper,.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-input-number,.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-input-textarea textarea{background:#141414!important;border-color:#2a2a2a!important;color:#d4d4d4!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-table{background:#1c1c1c;color:#d4d4d4}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-table-thead>tr>th{background:#252525;color:#d4d4d4;border-bottom-color:#2a2a2a}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-table-tbody>tr>td{background:#1c1c1c;color:#d4d4d4;border-bottom-color:#2a2a2a}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-btn-link{color:#58a6ff!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-alert{background:#1c1c1c;border-color:#2a2a2a}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-alert-message{color:#d4d4d4!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-alert-description{color:#a3a3a3!important}.polymarket-analysis-modal.theme-dark .market-info h3[data-v-67e891d2]{color:#d4d4d4}.polymarket-analysis-modal.theme-dark .market-info .market-meta .meta-item[data-v-67e891d2]{color:#a3a3a3}.polymarket-analysis-modal.theme-dark .analysis-result .probability-comparison .prob-item[data-v-67e891d2]{background:#252525;border:1px solid #2a2a2a}.polymarket-analysis-modal.theme-dark .analysis-result .probability-comparison .prob-item .prob-label[data-v-67e891d2]{color:#a3a3a3}.polymarket-analysis-modal.theme-dark .analysis-result .probability-comparison .prob-item .prob-value[data-v-67e891d2]{color:#e5e5e5}.polymarket-analysis-modal.theme-dark .analysis-result .probability-comparison .prob-item .prob-value.divergence-neutral[data-v-67e891d2]{color:#b3b3b3}.polymarket-analysis-modal.theme-dark .analysis-result .recommendation-section .rec-card[data-v-67e891d2]{background:#252525;border:1px solid #2a2a2a}.polymarket-analysis-modal.theme-dark .analysis-result .recommendation-section .rec-card .rec-label[data-v-67e891d2]{color:#a3a3a3}.polymarket-analysis-modal.theme-dark .analysis-result .recommendation-section .rec-card .rec-value[data-v-67e891d2]{color:#e5e5e5}.polymarket-analysis-modal.theme-dark .analysis-result .key-factors-section .reasoning-text[data-v-67e891d2],.polymarket-analysis-modal.theme-dark .analysis-result .key-factors-section h4[data-v-67e891d2],.polymarket-analysis-modal.theme-dark .analysis-result .reasoning-section .reasoning-text[data-v-67e891d2],.polymarket-analysis-modal.theme-dark .analysis-result .reasoning-section h4[data-v-67e891d2]{color:#d4d4d4}.ai-asset-analysis-page[data-v-0d0a10d6]{padding:20px;min-height:calc(100vh - 120px);background:#f0f2f5;width:100%;max-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;overflow-x:hidden}.ai-asset-analysis-page .radar-section[data-v-0d0a10d6]{margin-bottom:20px}.ai-asset-analysis-page .radar-section .radar-header[data-v-0d0a10d6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:14px}.ai-asset-analysis-page .radar-section .radar-header .radar-header-left .radar-title[data-v-0d0a10d6]{margin:0;font-size:16px;font-weight:700;color:#1a1a1a;letter-spacing:-.2px}.ai-asset-analysis-page .radar-section .radar-header .radar-header-left .radar-subtitle[data-v-0d0a10d6]{margin:2px 0 0;font-size:12px;color:#999}.ai-asset-analysis-page .radar-section .radar-header .radar-refresh-btn[data-v-0d0a10d6]{border-radius:8px;border:1px solid #e0e0e0;background:#fff;color:#666;font-size:12px;font-weight:500}.ai-asset-analysis-page .radar-section .radar-header .radar-refresh-btn[data-v-0d0a10d6]:hover{border-color:#6366f1;color:#6366f1}.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]{overflow:hidden;position:relative;border-radius:12px;padding:2px 0}.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]:after,.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]:before{content:"";position:absolute;top:0;bottom:0;width:50px;z-index:2;pointer-events:none}.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]:before{left:0;background:-webkit-gradient(linear,left top,right top,from(#f0f2f5),to(transparent));background:linear-gradient(90deg,#f0f2f5,transparent)}.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]:after{right:0;background:-webkit-gradient(linear,right top,left top,from(#f0f2f5),to(transparent));background:linear-gradient(270deg,#f0f2f5,transparent)}.ai-asset-analysis-page .radar-section .radar-track[data-v-0d0a10d6]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px;-webkit-animation:radar-scroll-0d0a10d6 60s linear infinite;animation:radar-scroll-0d0a10d6 60s linear infinite;width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:4px 0}.ai-asset-analysis-page .radar-section .radar-track.paused[data-v-0d0a10d6]{-webkit-animation-play-state:paused;animation-play-state:paused}@-webkit-keyframes radar-scroll-0d0a10d6{0%{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(-50%);transform:translateX(-50%)}}@keyframes radar-scroll-0d0a10d6{0%{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(-50%);transform:translateX(-50%)}}.ai-asset-analysis-page .radar-section .radar-card[data-v-0d0a10d6]{width:250px;background:#fff;border-radius:12px;padding:16px;cursor:pointer;-ms-flex-negative:0;flex-shrink:0;border:1px solid #eaeaea;-webkit-transition:all .25s cubic-bezier(.4,0,.2,1);transition:all .25s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden}.ai-asset-analysis-page .radar-section .radar-card[data-v-0d0a10d6]:before{content:"";position:absolute;inset:0;border-radius:12px;opacity:0;-webkit-transition:opacity .3s;transition:opacity .3s;background:linear-gradient(135deg,rgba(99,102,241,.04),rgba(139,92,246,.02))}.ai-asset-analysis-page .radar-section .radar-card[data-v-0d0a10d6]:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px);border-color:rgba(99,102,241,.3);-webkit-box-shadow:0 6px 24px rgba(0,0,0,.08),0 0 0 1px rgba(99,102,241,.1);box-shadow:0 6px 24px rgba(0,0,0,.08),0 0 0 1px rgba(99,102,241,.1)}.ai-asset-analysis-page .radar-section .radar-card[data-v-0d0a10d6]:hover:before{opacity:1}.ai-asset-analysis-page .radar-section .radar-card.is-prediction[data-v-0d0a10d6]{width:290px}.ai-asset-analysis-page .radar-section .radar-card .rc-head[data-v-0d0a10d6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:12px;gap:8px}.ai-asset-analysis-page .radar-section .radar-card .rc-symbol[data-v-0d0a10d6]{font-weight:800;font-size:15px;color:#111;letter-spacing:-.2px}.ai-asset-analysis-page .radar-section .radar-card .rc-symbol.rc-prediction-title[data-v-0d0a10d6]{font-size:13px;font-weight:600;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.ai-asset-analysis-page .radar-section .radar-card .rc-market[data-v-0d0a10d6]{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;padding:2px 7px;border-radius:5px;-ms-flex-negative:0;flex-shrink:0;background:#f5f5f5;color:#888}.ai-asset-analysis-page .radar-section .radar-card .rc-market.rc-market-crypto[data-v-0d0a10d6]{color:#7c3aed;background:rgba(124,58,237,.08)}.ai-asset-analysis-page .radar-section .radar-card .rc-market.rc-market-usstock[data-v-0d0a10d6]{color:#16a34a;background:rgba(22,163,74,.08)}.ai-asset-analysis-page .radar-section .radar-card .rc-market.rc-market-forex[data-v-0d0a10d6]{color:#d97706;background:rgba(217,119,6,.08)}.ai-asset-analysis-page .radar-section .radar-card .rc-market.rc-market-predictionmarket[data-v-0d0a10d6]{color:#0891b2;background:rgba(8,145,178,.08)}.ai-asset-analysis-page .radar-section .radar-card .rc-metrics[data-v-0d0a10d6]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:4px;margin-bottom:12px}.ai-asset-analysis-page .radar-section .radar-card .rc-metric[data-v-0d0a10d6]{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:3px;padding:7px;border-radius:8px;background:#fafafa}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-label[data-v-0d0a10d6]{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.4px;color:#999}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value[data-v-0d0a10d6]{font-size:13px;font-weight:700;color:#222}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-up[data-v-0d0a10d6]{color:#16a34a}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-down[data-v-0d0a10d6]{color:#dc2626}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-val[data-v-0d0a10d6]{font-size:11px;font-weight:600}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-bullish_momentum[data-v-0d0a10d6]{color:#0891b2}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-overbought[data-v-0d0a10d6]{color:#d97706}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-oversold[data-v-0d0a10d6]{color:#16a34a}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-bearish_momentum[data-v-0d0a10d6]{color:#dc2626}.ai-asset-analysis-page .radar-section .radar-card .rc-footer[data-v-0d0a10d6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:8px}.ai-asset-analysis-page .radar-section .radar-card .rc-reason[data-v-0d0a10d6]{font-size:11px;color:#999;line-height:1.4;-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.ai-asset-analysis-page .radar-section .radar-card .rc-cta[data-v-0d0a10d6]{font-size:11px;font-weight:700;color:#fff;background:linear-gradient(135deg,#6366f1,#8b5cf6);padding:4px 12px;border-radius:8px;white-space:nowrap;cursor:pointer;-webkit-transition:all .2s;transition:all .2s;-ms-flex-negative:0;flex-shrink:0}.ai-asset-analysis-page .radar-section .radar-card .rc-cta[data-v-0d0a10d6]:hover{-webkit-transform:scale(1.05);transform:scale(1.05);-webkit-box-shadow:0 2px 12px rgba(99,102,241,.35);box-shadow:0 2px 12px rgba(99,102,241,.35)}.ai-asset-analysis-page .qt-floating-btn[data-v-0d0a10d6]{position:fixed;right:24px;bottom:80px;width:48px;height:48px;border-radius:14px;background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;font-size:22px;cursor:pointer;-webkit-box-shadow:0 4px 20px rgba(99,102,241,.35);box-shadow:0 4px 20px rgba(99,102,241,.35);z-index:1000;-webkit-transition:all .3s;transition:all .3s;-webkit-animation:qt-float-pulse-0d0a10d6 2.5s ease-in-out infinite;animation:qt-float-pulse-0d0a10d6 2.5s ease-in-out infinite}.ai-asset-analysis-page .qt-floating-btn[data-v-0d0a10d6]:hover{-webkit-transform:scale(1.08);transform:scale(1.08);-webkit-box-shadow:0 6px 28px rgba(99,102,241,.5);box-shadow:0 6px 28px rgba(99,102,241,.5)}@-webkit-keyframes qt-float-pulse-0d0a10d6{0%,to{-webkit-transform:translateY(0);transform:translateY(0)}50%{-webkit-transform:translateY(-4px);transform:translateY(-4px)}}@keyframes qt-float-pulse-0d0a10d6{0%,to{-webkit-transform:translateY(0);transform:translateY(0)}50%{-webkit-transform:translateY(-4px);transform:translateY(-4px)}}.ai-asset-analysis-page .workspace-card[data-v-0d0a10d6]{border-radius:14px;-webkit-box-shadow:0 1px 4px rgba(0,0,0,.06);box-shadow:0 1px 4px rgba(0,0,0,.06);border:1px solid #e8e8e8}.ai-asset-analysis-page .workspace-card[data-v-0d0a10d6] .ant-card-body{padding:0}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-bar{margin-bottom:0;padding:0 20px;border-bottom:1px solid #f0f0f0}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-tab{font-size:15px;font-weight:600;padding:14px 16px}.ai-asset-analysis-page .workspace-card .tab-body[data-v-0d0a10d6] .ai-analysis-container.embedded,.ai-asset-analysis-page .workspace-card .tab-body[data-v-0d0a10d6] .portfolio-container.embedded{border-radius:0;overflow:hidden}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content[data-v-0d0a10d6]{padding:40px 20px;text-align:center}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content .polymarket-placeholder .placeholder-icon[data-v-0d0a10d6]{font-size:64px;color:#6366f1;margin-bottom:24px}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content .polymarket-placeholder h3[data-v-0d0a10d6]{font-size:20px;font-weight:700;margin-bottom:12px;color:rgba(0,0,0,.85)}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content .polymarket-placeholder p[data-v-0d0a10d6]{font-size:14px;color:rgba(0,0,0,.55);margin-bottom:24px}.ai-asset-analysis-page.theme-dark[data-v-0d0a10d6]{background:#141414}.ai-asset-analysis-page.theme-dark .radar-section .radar-header .radar-title[data-v-0d0a10d6]{color:#e8e8e8}.ai-asset-analysis-page.theme-dark .radar-section .radar-header .radar-subtitle[data-v-0d0a10d6]{color:#666}.ai-asset-analysis-page.theme-dark .radar-section .radar-refresh-btn[data-v-0d0a10d6]{background:#1c1c1c;border-color:#2a2a2a;color:#999}.ai-asset-analysis-page.theme-dark .radar-section .radar-refresh-btn[data-v-0d0a10d6]:hover{border-color:#6366f1;color:#a78bfa}.ai-asset-analysis-page.theme-dark .radar-section .radar-carousel[data-v-0d0a10d6]:before{background:-webkit-gradient(linear,left top,right top,from(#141414),to(transparent));background:linear-gradient(90deg,#141414,transparent)}.ai-asset-analysis-page.theme-dark .radar-section .radar-carousel[data-v-0d0a10d6]:after{background:-webkit-gradient(linear,right top,left top,from(#141414),to(transparent));background:linear-gradient(270deg,#141414,transparent)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card[data-v-0d0a10d6]{background:#1a1a1c;border-color:hsla(0,0%,100%,.06)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card[data-v-0d0a10d6]:before{background:linear-gradient(135deg,rgba(99,102,241,.06),rgba(139,92,246,.03))}.ai-asset-analysis-page.theme-dark .radar-section .radar-card[data-v-0d0a10d6]:hover{border-color:rgba(99,102,241,.25);-webkit-box-shadow:0 8px 32px rgba(0,0,0,.4),0 0 0 1px rgba(99,102,241,.15);box-shadow:0 8px 32px rgba(0,0,0,.4),0 0 0 1px rgba(99,102,241,.15)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-symbol[data-v-0d0a10d6]{color:#f0f0f0}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-market[data-v-0d0a10d6]{background:hsla(0,0%,100%,.06);color:#888}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-market.rc-market-crypto[data-v-0d0a10d6]{color:#a78bfa;background:rgba(167,139,250,.12)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-market.rc-market-usstock[data-v-0d0a10d6]{color:#4ade80;background:rgba(74,222,128,.1)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-market.rc-market-forex[data-v-0d0a10d6]{color:#fbbf24;background:rgba(251,191,36,.1)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-market.rc-market-predictionmarket[data-v-0d0a10d6]{color:#22d3ee;background:rgba(34,211,238,.1)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric[data-v-0d0a10d6]{background:hsla(0,0%,100%,.03)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-label[data-v-0d0a10d6]{color:#666}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value[data-v-0d0a10d6]{color:#ddd}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value.rc-up[data-v-0d0a10d6]{color:#4ade80}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value.rc-down[data-v-0d0a10d6]{color:#f87171}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-bullish_momentum[data-v-0d0a10d6]{color:#22d3ee}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-overbought[data-v-0d0a10d6]{color:#fbbf24}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-oversold[data-v-0d0a10d6]{color:#4ade80}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-bearish_momentum[data-v-0d0a10d6]{color:#f87171}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-reason[data-v-0d0a10d6]{color:#555}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-cta[data-v-0d0a10d6]{color:#fff}.ai-asset-analysis-page.theme-dark .workspace-card[data-v-0d0a10d6]{background:#1c1c1c;border-color:#2a2a2a}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-bar{border-bottom-color:#2a2a2a}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-tab{color:#8b949e}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-tab:hover{color:#c9d1d9}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-tab-active{color:#a78bfa}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-ink-bar{background-color:#a78bfa}.ai-asset-analysis-page.theme-dark .workspace-card .polymarket-tab-content .polymarket-placeholder h3[data-v-0d0a10d6]{color:#d4d4d4}.ai-asset-analysis-page.theme-dark .workspace-card .polymarket-tab-content .polymarket-placeholder p[data-v-0d0a10d6]{color:#a3a3a3}@media (max-width:768px){.ai-asset-analysis-page[data-v-0d0a10d6]{padding:8px;min-height:auto}.ai-asset-analysis-page .radar-section[data-v-0d0a10d6]{margin-bottom:10px}.ai-asset-analysis-page .radar-section .radar-header[data-v-0d0a10d6]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;gap:8px}.ai-asset-analysis-page .radar-section .radar-header .radar-header-left .radar-title[data-v-0d0a10d6]{font-size:15px}.ai-asset-analysis-page .radar-section .radar-header .radar-header-left .radar-subtitle[data-v-0d0a10d6]{font-size:11px}.ai-asset-analysis-page .radar-section .radar-header .radar-refresh-btn[data-v-0d0a10d6]{-ms-flex-item-align:end;align-self:flex-end}.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]:after,.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]:before{width:28px}.ai-asset-analysis-page .radar-section .radar-card[data-v-0d0a10d6]{width:210px;padding:12px}.ai-asset-analysis-page .radar-section .radar-card.is-prediction[data-v-0d0a10d6]{width:248px}.ai-asset-analysis-page .radar-section .radar-card .rc-symbol[data-v-0d0a10d6]{font-size:14px}.ai-asset-analysis-page .radar-section .radar-card .rc-metric[data-v-0d0a10d6]{padding:6px}.ai-asset-analysis-page .qt-floating-btn[data-v-0d0a10d6]{right:max(8px,env(safe-area-inset-right,0px));bottom:max(68px,calc(52px + env(safe-area-inset-bottom, 0px)));width:44px;height:44px;font-size:20px}.ai-asset-analysis-page .workspace-card[data-v-0d0a10d6]{border-radius:10px}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-bar{padding:0 6px}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-nav-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-tab{font-size:14px;padding:10px 8px;margin-right:2px;white-space:nowrap}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content[data-v-0d0a10d6]{padding:16px 8px}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content .polymarket-placeholder .placeholder-icon[data-v-0d0a10d6]{font-size:48px;margin-bottom:12px}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content .polymarket-placeholder h3[data-v-0d0a10d6]{font-size:17px}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content .polymarket-placeholder p[data-v-0d0a10d6]{font-size:13px}}@media (max-width:480px){.ai-asset-analysis-page[data-v-0d0a10d6]{padding:4px}.ai-asset-analysis-page .radar-section .radar-card[data-v-0d0a10d6]{width:188px;padding:10px}.ai-asset-analysis-page .radar-section .radar-card.is-prediction[data-v-0d0a10d6]{width:220px}.ai-asset-analysis-page .radar-section .radar-card .rc-metrics[data-v-0d0a10d6]{gap:3px}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value[data-v-0d0a10d6]{font-size:12px}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-bar{padding:0 4px}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-tab{font-size:13px;padding:8px 6px}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content[data-v-0d0a10d6]{padding:12px 6px}} \ No newline at end of file diff --git a/frontend/dist/css/755.091cab00.css b/frontend/dist/css/755.091cab00.css new file mode 100644 index 0000000..9804294 --- /dev/null +++ b/frontend/dist/css/755.091cab00.css @@ -0,0 +1 @@ +[data-v-4fea1865] .ant-modal{top:20px!important}.visual-editor-container[data-v-4fea1865]{border:1px solid #d9d9d9;border-radius:6px;background:#fafafa;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:500px;overflow:hidden}.visual-modules-list[data-v-4fea1865]{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;padding:12px}.empty-visual-state[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:100%;color:#999}.visual-module-card[data-v-4fea1865]{background:#fff;border:1px solid #e8e8e8;border-radius:4px;margin-bottom:12px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.visual-module-card .module-header[data-v-4fea1865]{padding:8px 12px;border-bottom:1px solid #f0f0f0;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;background:#f9f9f9}.visual-module-card .module-header .module-title[data-v-4fea1865],.visual-module-card .module-header[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.visual-module-card .module-header .module-title[data-v-4fea1865]{font-weight:500;gap:8px}.visual-module-card .module-header .remove-icon[data-v-4fea1865]{cursor:pointer;color:#999}.visual-module-card .module-header .remove-icon[data-v-4fea1865]:hover{color:#ff4d4f}.visual-module-card .module-body[data-v-4fea1865]{padding:12px}.visual-module-card .style-config[data-v-4fea1865]{margin-top:12px;padding-top:12px;border-top:1px dashed #f0f0f0}.visual-module-card .style-config .label[data-v-4fea1865]{margin-right:8px;color:#666}.add-module-bar[data-v-4fea1865]{padding:12px;background:#fff;border-top:1px solid #e8e8e8}@media (max-width:768px){.visual-editor-container[data-v-4fea1865]{height:auto;min-height:400px}}.ant-form-item[data-v-4fea1865]{margin-bottom:16px}.editor-content[data-v-4fea1865]{padding:24px;background:#fff;min-height:500px;max-height:82vh;overflow-y:auto}.editor-layout[data-v-4fea1865]{min-height:450px}.code-editor-column[data-v-4fea1865]{height:100%}.code-editor-column[data-v-4fea1865],.code-section[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.code-section[data-v-4fea1865]{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;margin-bottom:16px}.code-section .section-header[data-v-4fea1865]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:12px;padding-bottom:12px;border-bottom:2px solid #f0f0f0}.code-section .section-header .section-title[data-v-4fea1865],.code-section .section-header[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.code-section .section-header .section-title[data-v-4fea1865]{font-weight:600;font-size:14px;color:#262626;gap:8px}.code-section .section-header .section-title[data-v-4fea1865]:before{content:"";display:inline-block;width:4px;height:14px;background:#1890ff;border-radius:2px}.code-section .section-header .section-actions[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.code-section .section-header .section-actions[data-v-4fea1865] .ant-btn-link{color:#1890ff;padding:0 8px}.code-section .section-header .section-actions[data-v-4fea1865] .ant-btn-link:hover{color:#40a9ff}.code-editor-container[data-v-4fea1865]{border:1px solid #d9d9d9;border-radius:6px;overflow:hidden;height:62vh;min-height:520px;max-height:none;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05);box-shadow:inset 0 1px 3px rgba(0,0,0,.05);-webkit-transition:all .3s ease;transition:all .3s ease}.code-editor-container[data-v-4fea1865]:hover{border-color:#40a9ff}.code-editor-container[data-v-4fea1865]:focus-within{border-color:#1890ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2),inset 0 1px 3px rgba(0,0,0,.05);box-shadow:0 0 0 2px rgba(24,144,255,.2),inset 0 1px 3px rgba(0,0,0,.05)}.code-editor-container[data-v-4fea1865] .CodeMirror{-webkit-box-flex:1;-ms-flex:1;flex:1;height:100%;font-family:Courier New,Consolas,Liberation Mono,Menlo,monospace;font-size:13px;line-height:1.6;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;background:#fafafa}.code-editor-container[data-v-4fea1865] .CodeMirror-scroll{-webkit-box-flex:1;-ms-flex:1;flex:1;min-height:100%;max-height:none;overflow-y:auto;overflow-x:auto}.code-editor-container[data-v-4fea1865] .CodeMirror-sizer{min-height:100%!important;padding-left:12px!important}.code-editor-container[data-v-4fea1865] .CodeMirror-gutters{border-right:1px solid #e8e8e8;background:-webkit-gradient(linear,left top,right top,from(#fafafa),to(#f5f5f5));background:linear-gradient(90deg,#fafafa 0,#f5f5f5);width:45px;padding-right:4px}.code-editor-container[data-v-4fea1865] .CodeMirror-linenumber{padding:0 8px 0 4px;min-width:30px;text-align:right;color:#999;font-size:12px}.code-editor-container[data-v-4fea1865] .CodeMirror-lines{padding:12px 8px;background:#fff}.code-editor-container[data-v-4fea1865] .CodeMirror-line{padding-left:0}.code-editor-container[data-v-4fea1865] .CodeMirror-cursor{border-left:2px solid #1890ff}.code-editor-container[data-v-4fea1865] .CodeMirror-selected{background:#e6f7ff}.code-mode-split[data-v-4fea1865]{width:100%}.ai-pane[data-v-4fea1865],.ai-panel[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.ai-panel[data-v-4fea1865]{border:1px solid #e8e8e8;border-radius:6px;background:#fafafa;padding:12px;height:62vh;min-height:520px}.ai-panel-title[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;font-weight:600;margin-bottom:10px;color:#262626}.ai-panel-hint[data-v-4fea1865]{margin-top:10px;color:#8c8c8c;font-size:12px;line-height:1.5}.ai-panel[data-v-4fea1865] textarea.ant-input{-webkit-box-flex:1;-ms-flex:1;flex:1;resize:none}.editor-footer[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;gap:12px}.editor-footer[data-v-4fea1865] .ant-btn{height:36px;padding:0 20px;font-weight:500;border-radius:4px;-webkit-transition:all .3s ease;transition:all .3s ease}.editor-footer[data-v-4fea1865] .ant-btn:not(.ant-btn-primary):hover{border-color:#40a9ff;color:#40a9ff;-webkit-transform:translateY(-1px);transform:translateY(-1px);-webkit-box-shadow:0 2px 8px rgba(24,144,255,.2);box-shadow:0 2px 8px rgba(24,144,255,.2)}.editor-footer[data-v-4fea1865] .ant-btn.ant-btn-primary{-webkit-box-shadow:0 2px 4px rgba(24,144,255,.3);box-shadow:0 2px 4px rgba(24,144,255,.3)}.editor-footer[data-v-4fea1865] .ant-btn.ant-btn-primary:hover{-webkit-box-shadow:0 4px 12px rgba(24,144,255,.4);box-shadow:0 4px 12px rgba(24,144,255,.4);-webkit-transform:translateY(-1px);transform:translateY(-1px)}@media (max-width:768px){.indicator-editor-modal[data-v-4fea1865] .ant-modal{width:100%!important;max-width:100%!important;margin:0!important;top:0!important;padding-bottom:0!important;max-height:100vh!important}.indicator-editor-modal[data-v-4fea1865] .ant-modal-content{height:100vh!important;max-height:100vh!important;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;border-radius:0!important}.indicator-editor-modal[data-v-4fea1865] .ant-modal-header{-ms-flex-negative:0;flex-shrink:0;padding:16px;border-bottom:1px solid #e8e8e8}.indicator-editor-modal[data-v-4fea1865] .ant-modal-body{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;padding:0!important;min-height:0}.indicator-editor-modal[data-v-4fea1865] .ant-modal-footer{-ms-flex-negative:0;flex-shrink:0;padding:12px 16px;border-top:1px solid #e8e8e8}.editor-content[data-v-4fea1865]{padding:16px!important;min-height:auto!important;max-height:none!important;overflow-y:visible!important}.editor-layout[data-v-4fea1865]{min-height:auto!important}.code-editor-column[data-v-4fea1865]{width:100%!important;margin-bottom:16px}.code-section[data-v-4fea1865]{margin-bottom:16px}.code-section .section-header[data-v-4fea1865]{padding-bottom:8px;margin-bottom:8px}.code-section .section-header .section-title[data-v-4fea1865]{font-size:13px}.code-editor-container[data-v-4fea1865]{height:250px!important}.code-editor-container[data-v-4fea1865],.code-editor-container[data-v-4fea1865] .CodeMirror-scroll{min-height:250px!important;max-height:250px!important}.code-editor-container[data-v-4fea1865] .CodeMirror-sizer{min-height:250px!important}.ai-panel[data-v-4fea1865]{height:auto!important;min-height:auto!important}.editor-footer[data-v-4fea1865]{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;gap:8px;padding:0}.editor-footer[data-v-4fea1865] .ant-btn{width:100%;height:40px;margin:0}}.chart-left[data-v-58f93984]{width:70%!important;-webkit-box-flex:0!important;-ms-flex:0 0 70%!important;flex:0 0 70%!important;position:relative;border-right:1px solid #e8e8e8;background:#fff;-webkit-transition:background-color .3s;transition:background-color .3s;-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch}.chart-left.theme-dark[data-v-58f93984]{background:#141414;border-right-color:#2a2a2a}.chart-wrapper[data-v-58f93984]{width:100%;height:100%;position:relative;background:#fff;-webkit-transition:background-color .3s;transition:background-color .3s;-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch;display:-webkit-box;display:-ms-flexbox;display:flex}.theme-dark .chart-wrapper[data-v-58f93984]{background:#141414}.drawing-toolbar[data-v-58f93984]{-ms-flex-negative:0;flex-shrink:0;width:40px;background:#fff;border-right:1px solid #e8e8e8;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:8px 4px;gap:4px;z-index:10;overflow-y:auto;overflow-x:hidden}.chart-left.theme-dark .drawing-toolbar[data-v-58f93984]{background:#141414;border-right-color:#2a2a2a}.drawing-tool-btn[data-v-58f93984]{width:32px;height:32px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;border-radius:4px;-webkit-transition:all .2s;transition:all .2s;color:#666;font-size:16px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chart-left.theme-dark .drawing-tool-btn[data-v-58f93984]{color:#d1d4dc}.drawing-tool-btn[data-v-58f93984]:hover{background:#f0f2f5;color:#1890ff}.chart-left.theme-dark .drawing-tool-btn[data-v-58f93984]:hover{background:#252525;color:#13c2c2}.drawing-tool-btn.active[data-v-58f93984]{background:#e6f7ff;color:#1890ff;border:1px solid #1890ff}.chart-left.theme-dark .drawing-tool-btn.active[data-v-58f93984]{background:#252525;color:#13c2c2;border-color:#13c2c2}.drawing-toolbar .ant-divider-vertical[data-v-58f93984]{margin:8px 0;height:20px}.indicator-toolbar[data-v-58f93984]{-ms-flex-negative:0;flex-shrink:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;padding:8px 12px;background:#fff;border-bottom:1px solid #e8e8e8;-ms-flex-wrap:wrap;flex-wrap:wrap;z-index:1;position:relative;width:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none}.indicator-toolbar[data-v-58f93984]::-webkit-scrollbar{display:none;width:0;height:0}.chart-content-area[data-v-58f93984]{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-width:0;overflow:hidden}.chart-left.theme-dark .indicator-toolbar[data-v-58f93984]{background:#141414;border-bottom-color:#2a2a2a}.indicator-btn[data-v-58f93984]{padding:4px 12px;font-size:12px;font-weight:600;color:#666;background:#f0f2f5;border:1px solid #e8e8e8;border-radius:4px;cursor:pointer;-webkit-transition:all .2s;transition:all .2s;white-space:nowrap;min-width:40px;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chart-left.theme-dark .indicator-btn[data-v-58f93984]{color:#d1d4dc;background:#252525;border-color:#2a2a2a}.indicator-btn[data-v-58f93984]:hover{color:#1890ff;border-color:#1890ff;background:#f0f8ff}.chart-left.theme-dark .indicator-btn[data-v-58f93984]:hover{color:#13c2c2;border-color:#13c2c2;background:#252525}.indicator-btn.active[data-v-58f93984]{color:#1890ff;background:#fff;border-color:#1890ff;border-width:2px;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.1);box-shadow:0 0 0 2px rgba(24,144,255,.1)}.chart-left.theme-dark .indicator-btn.active[data-v-58f93984]{color:#13c2c2;background:#252525;border-color:#13c2c2;-webkit-box-shadow:0 0 0 2px rgba(19,194,194,.2);box-shadow:0 0 0 2px rgba(19,194,194,.2)}.kline-chart-container[data-v-58f93984]{-webkit-box-flex:1;-ms-flex:1;flex:1;width:100%;min-width:0;background:#fff;-webkit-transition:background-color .3s;transition:background-color .3s;-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch;overflow:hidden}.theme-dark .kline-chart-container[data-v-58f93984]{background:#141414}.chart-overlay[data-v-58f93984]{position:absolute;top:0;left:0;right:0;bottom:0;background:hsla(0,0%,100%,.95);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;z-index:1;backdrop-filter:blur(2px)}.chart-left.theme-dark .chart-overlay[data-v-58f93984]{background:hsla(0,0%,8%,.95)}.error-box[data-v-58f93984]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#333}.initial-hint[data-v-58f93984]{background:hsla(0,0%,100%,.98)}.chart-left.theme-dark .initial-hint[data-v-58f93984]{background:hsla(0,0%,8%,.98)}.hint-box[data-v-58f93984]{text-align:center;color:#666;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;max-width:400px;padding:20px}.pyodide-warning[data-v-58f93984]{background:hsla(0,0%,100%,.98)}.chart-left.theme-dark .pyodide-warning[data-v-58f93984]{background:hsla(0,0%,8%,.98)}.warning-box[data-v-58f93984]{text-align:center;color:#666;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;max-width:500px;padding:20px}.warning-title[data-v-58f93984]{font-size:16px;font-weight:600;color:#faad14;margin-bottom:8px}.warning-desc[data-v-58f93984]{font-size:14px;color:#666;line-height:1.6}.chart-left.theme-dark .warning-box[data-v-58f93984]{color:#d1d4dc}.chart-left.theme-dark .warning-title[data-v-58f93984]{color:#faad14}.chart-left.theme-dark .warning-desc[data-v-58f93984]{color:#868993}.chart-left.theme-dark .hint-box[data-v-58f93984]{color:#d1d4dc}.hint-title[data-v-58f93984]{font-size:18px;font-weight:600;color:#333;margin-bottom:12px}.chart-left.theme-dark .hint-title[data-v-58f93984]{color:#d1d4dc}.hint-desc[data-v-58f93984]{font-size:14px;color:#999;line-height:1.6}.chart-left.theme-dark .hint-desc[data-v-58f93984]{color:#787b86}.history-loading-hint[data-v-58f93984]{position:absolute;left:20px;top:60px;z-index:1000!important;display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;padding:8px 16px;background:hsla(0,0%,100%,.98)!important;border:1px solid #e8e8e8;border-radius:4px;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.15);box-shadow:0 2px 8px rgba(0,0,0,.15);font-size:14px;color:#666!important;backdrop-filter:blur(4px);pointer-events:none;visibility:visible!important;opacity:1!important}.chart-left.theme-dark .history-loading-hint[data-v-58f93984]{background:hsla(0,0%,8%,.98)!important;border-color:#2a2a2a;color:#d1d4dc!important}.loading-text[data-v-58f93984]{white-space:nowrap;margin-left:4px}@media (max-width:768px){.drawing-toolbar[data-v-58f93984]{display:none}.indicator-toolbar[data-v-58f93984]{padding-left:12px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch}.indicator-toolbar[data-v-58f93984]::-webkit-scrollbar{display:none;width:0;height:0}.indicator-btn[data-v-58f93984]{-ms-flex-negative:0;flex-shrink:0}}@media (max-width:1200px){.drawing-toolbar[data-v-58f93984]{display:none}.indicator-toolbar[data-v-58f93984]{padding-left:12px}.kline-chart-container[data-v-58f93984]{margin-left:0}.chart-left[data-v-58f93984]{width:100%!important;min-width:100%!important;border-right:none;border-bottom:1px solid #e8e8e8;height:600px!important;min-height:600px!important}.chart-wrapper[data-v-58f93984],.kline-chart-container[data-v-58f93984]{height:100%!important;min-height:600px!important}}@media (max-width:992px){.chart-left[data-v-58f93984]{height:650px!important;min-height:650px!important}.chart-wrapper[data-v-58f93984],.kline-chart-container[data-v-58f93984]{height:100%!important;min-height:650px!important}}@media (max-width:768px){.chart-left[data-v-58f93984]{height:60vh!important;min-height:400px!important;max-height:80vh!important}.chart-wrapper[data-v-58f93984]{height:100%!important;min-height:400px!important;max-height:100%!important}.kline-chart-container[data-v-58f93984]{height:calc(100% - 45px)!important;min-height:350px!important;max-height:calc(100% - 45px)!important}}@media (max-width:576px){.chart-left[data-v-58f93984]{height:55vh!important;min-height:350px!important;max-height:75vh!important}.chart-wrapper[data-v-58f93984]{height:100%!important;min-height:350px!important;max-height:100%!important}.kline-chart-container[data-v-58f93984]{height:calc(100% - 45px)!important;min-height:300px!important;max-height:calc(100% - 45px)!important}}.quick-trade-drawer[data-v-75b64b85] .ant-drawer-body{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%;overflow-y:auto}.qt-header[data-v-75b64b85]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid #f0f0f0}.qt-header .qt-header-left[data-v-75b64b85],.qt-header[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-header .qt-header-left[data-v-75b64b85]{gap:8px}.qt-header .qt-header-left .qt-icon[data-v-75b64b85]{font-size:20px;color:#595959}.qt-header .qt-header-left .qt-header-title[data-v-75b64b85]{font-size:16px;font-weight:600}.qt-header .qt-close[data-v-75b64b85]{font-size:16px;cursor:pointer;color:#999}.qt-header .qt-close[data-v-75b64b85]:hover{color:#333}.qt-symbol-bar[data-v-75b64b85]{padding:12px 20px;background:-webkit-gradient(linear,left top,left bottom,from(#fafafa),to(#f0f0f0));background:linear-gradient(180deg,#fafafa,#f0f0f0);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:8px}.qt-symbol-bar .qt-symbol-selector[data-v-75b64b85],.qt-symbol-bar .qt-symbol-selector[data-v-75b64b85] .ant-select{width:100%}.qt-symbol-bar .qt-symbol-selector[data-v-75b64b85] .ant-select-selection{border-radius:6px;border:1px solid #d9d9d9}.qt-symbol-bar .qt-price-display[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.qt-symbol-bar .qt-price-display .qt-current-price[data-v-75b64b85]{font-size:16px;font-weight:600;color:#333}.qt-symbol-option[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.qt-symbol-option .qt-symbol-option-name[data-v-75b64b85]{font-weight:600;font-size:14px}.qt-symbol-option .qt-symbol-option-desc[data-v-75b64b85]{color:#999;font-size:12px}.qt-section[data-v-75b64b85]{padding:8px 20px}.qt-section .qt-label[data-v-75b64b85]{font-size:12px;color:#999;margin-bottom:4px;font-weight:500}.qt-section .qt-crypto-hint[data-v-75b64b85]{font-size:10px;color:#faad14;background:rgba(250,173,20,.1);padding:1px 6px;border-radius:4px;margin-left:4px}.qt-balance[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;margin-top:6px;font-size:12px}.qt-balance .qt-balance-label[data-v-75b64b85]{color:#999}.qt-balance .qt-balance-loading-text[data-v-75b64b85]{margin-left:4px}.qt-balance .qt-balance-value[data-v-75b64b85]{color:#52c41a;font-weight:600}.qt-balance .qt-balance-error[data-v-75b64b85]{color:#faad14;cursor:help}.qt-no-cred-actions[data-v-75b64b85]{margin-top:10px}.qt-manage-link[data-v-75b64b85]{margin-top:8px;font-size:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:4px}.qt-manage-link .qt-manage-sep[data-v-75b64b85]{color:#ccc;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.qt-direction-toggle[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px}.qt-direction-toggle .qt-dir-btn[data-v-75b64b85]{-webkit-box-flex:1;-ms-flex:1;flex:1;padding:10px;text-align:center;border-radius:8px;font-weight:600;font-size:14px;cursor:pointer;-webkit-transition:all .2s;transition:all .2s;border:2px solid transparent;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:6px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.qt-direction-toggle .qt-dir-long[data-v-75b64b85]{color:#52c41a;background:rgba(82,196,26,.06);border-color:rgba(82,196,26,.2)}.qt-direction-toggle .qt-dir-long.active[data-v-75b64b85]{background:#52c41a;color:#fff;border-color:#52c41a;-webkit-box-shadow:0 4px 12px rgba(82,196,26,.3);box-shadow:0 4px 12px rgba(82,196,26,.3)}.qt-direction-toggle .qt-dir-long[data-v-75b64b85]:hover:not(.active){border-color:#52c41a}.qt-direction-toggle .qt-dir-short[data-v-75b64b85]{color:#f5222d;background:rgba(245,34,45,.06);border-color:rgba(245,34,45,.2)}.qt-direction-toggle .qt-dir-short.active[data-v-75b64b85]{background:#f5222d;color:#fff;border-color:#f5222d;-webkit-box-shadow:0 4px 12px rgba(245,34,45,.3);box-shadow:0 4px 12px rgba(245,34,45,.3)}.qt-direction-toggle .qt-dir-short[data-v-75b64b85]:hover:not(.active){border-color:#f5222d}.qt-quick-amounts[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:6px;margin-top:6px}.qt-quick-amounts button[data-v-75b64b85]{-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:12px}.qt-leverage-row[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-leverage-input[data-v-75b64b85]{width:80px}.qt-card[data-v-75b64b85]{margin-left:16px;margin-right:16px;padding:12px 14px;border-radius:10px;background:#f5f5f5;border:1px solid #e8e8e8}.qt-section-title-row[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:8px}.qt-section-title[data-v-75b64b85]{font-size:13px;font-weight:600;color:#333}.qt-badge-contract[data-v-75b64b85]{font-size:10px;font-weight:600;padding:2px 8px;border-radius:999px;background:#ebebeb;color:#595959;border:1px solid #d9d9d9}.qt-optional-tag[data-v-75b64b85]{font-size:10px;color:#8c8c8c;background:#f0f0f0;padding:1px 8px;border-radius:4px}.qt-label-spaced[data-v-75b64b85]{margin-top:10px}.qt-margin-radio[data-v-75b64b85]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex}.qt-margin-radio[data-v-75b64b85] .ant-radio-button-wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1;text-align:center;padding:0 4px}.qt-hint-text[data-v-75b64b85]{font-size:11px;color:#8c8c8c;line-height:1.45;margin-top:8px}.qt-hint-inline[data-v-75b64b85]{margin-top:6px}.qt-spot-banner[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:10px;padding:4px 0}.qt-spot-banner-icon[data-v-75b64b85]{font-size:22px;color:#52c41a;margin-top:2px}.qt-spot-banner-title[data-v-75b64b85]{font-size:13px;font-weight:600;color:#333;margin-bottom:4px}.qt-spot-banner-text .qt-hint-text[data-v-75b64b85]{margin-top:0}.qt-tpsl-row[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px}.qt-tpsl-row .qt-tpsl-item[data-v-75b64b85]{-webkit-box-flex:1;-ms-flex:1;flex:1}.qt-tp-label[data-v-75b64b85]{color:#389e0d!important}.qt-sl-label[data-v-75b64b85]{color:#cf1322!important}.qt-input-full[data-v-75b64b85]{width:100%}.qt-dir-btn.qt-dir-disabled[data-v-75b64b85]{opacity:.42;cursor:not-allowed;pointer-events:none}.qt-empty-icon[data-v-75b64b85]{font-size:28px;color:#d9d9d9;margin-bottom:8px}.qt-empty-desc[data-v-75b64b85]{font-size:12px;color:#8c8c8c;line-height:1.5}.qt-submit-section[data-v-75b64b85]{padding:12px 20px}.qt-submit-section .qt-submit-btn[data-v-75b64b85]{height:48px;font-size:16px;font-weight:700;border-radius:8px;letter-spacing:.5px}.qt-submit-section .qt-btn-long[data-v-75b64b85]{background:#52c41a!important;border-color:#52c41a!important}.qt-submit-section .qt-btn-long[data-v-75b64b85]:hover{background:#73d13d!important}.qt-submit-section .qt-btn-long[data-v-75b64b85]:active{background:#389e0d!important}.qt-submit-section .qt-btn-short[data-v-75b64b85]{background:#f5222d!important;border-color:#f5222d!important}.qt-submit-section .qt-btn-short[data-v-75b64b85]:hover{background:#ff4d4f!important}.qt-submit-section .qt-btn-short[data-v-75b64b85]:active{background:#cf1322!important}.qt-position-section[data-v-75b64b85]{padding:8px 20px 12px}.qt-position-section .qt-section-header[data-v-75b64b85]{font-size:13px;font-weight:600;color:#666;margin-bottom:8px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.qt-history-section[data-v-75b64b85]{padding:8px 20px 12px}.qt-history-section[data-v-75b64b85] .ant-collapse{background:transparent;border:none}.qt-history-section[data-v-75b64b85] .ant-collapse-item{border:none}.qt-history-section[data-v-75b64b85] .ant-collapse-header{padding:0!important;cursor:pointer}.qt-history-section[data-v-75b64b85] .ant-collapse-header:hover{opacity:.8}.qt-history-section[data-v-75b64b85] .ant-collapse-content{border:none;background:transparent}.qt-history-section[data-v-75b64b85] .ant-collapse-content-box{padding:8px 0 0 0!important}.qt-history-section .qt-section-header[data-v-75b64b85]{font-size:13px;font-weight:600;color:#666;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.qt-history-section .qt-history-count[data-v-75b64b85]{font-size:12px;color:#999;font-weight:400}.qt-position-card[data-v-75b64b85]{background:#fafafa;border-radius:8px;padding:10px 12px;border-left:3px solid #d9d9d9}.qt-position-card.long[data-v-75b64b85]{border-left-color:#52c41a}.qt-position-card.short[data-v-75b64b85]{border-left-color:#f5222d}.qt-position-card .qt-pos-row[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;font-size:13px;padding:2px 0}.qt-position-card .qt-pos-row span[data-v-75b64b85]:first-child{color:#999}.qt-position-empty[data-v-75b64b85]{background:#fafafa;border-radius:8px;padding:20px 12px;text-align:center;border:1px dashed #d9d9d9;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-green[data-v-75b64b85]{color:#52c41a!important}.qt-red[data-v-75b64b85]{color:#f5222d!important}.qt-trade-list .qt-trade-item[data-v-75b64b85]{padding:6px 0;border-bottom:1px solid #f5f5f5}.qt-trade-list .qt-trade-item[data-v-75b64b85]:last-child{border-bottom:none}.qt-trade-list .qt-trade-item .qt-trade-main[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.qt-trade-list .qt-trade-item .qt-trade-main .qt-trade-symbol[data-v-75b64b85]{font-weight:600;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-main .qt-trade-amount[data-v-75b64b85]{margin-left:auto;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-meta[data-v-75b64b85]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-top:2px}.qt-trade-list .qt-trade-item .qt-trade-meta .qt-trade-time[data-v-75b64b85]{font-size:11px;color:#bbb}.theme-dark .qt-header[data-v-75b64b85]{border-bottom-color:#303030}.theme-dark .qt-header .qt-icon[data-v-75b64b85]{color:#a3a3a3}.theme-dark .qt-header .qt-header-title[data-v-75b64b85]{color:#e0e0e0}.theme-dark .qt-header .qt-close[data-v-75b64b85]{color:#666}.theme-dark .qt-header .qt-close[data-v-75b64b85]:hover{color:#bbb}.theme-dark .qt-symbol-bar[data-v-75b64b85]{background:-webkit-gradient(linear,left top,left bottom,from(#262626),to(#1f1f1f));background:linear-gradient(180deg,#262626,#1f1f1f)}.theme-dark .qt-symbol-bar .qt-current-price[data-v-75b64b85]{color:#e0e0e0}.theme-dark .qt-symbol-bar[data-v-75b64b85] .ant-select-selection{background:#262626;border-color:#303030;color:#e0e0e0}.theme-dark .qt-symbol-bar[data-v-75b64b85] .ant-select-selection__placeholder{color:#666}.theme-dark .qt-symbol-option .qt-symbol-option-name[data-v-75b64b85]{color:#e0e0e0}.theme-dark .qt-symbol-option .qt-symbol-option-desc[data-v-75b64b85]{color:#999}.theme-dark .qt-section .qt-label[data-v-75b64b85]{color:#777}.theme-dark .qt-position-card[data-v-75b64b85]{background:#262626}.theme-dark .qt-position-card .qt-pos-row span[data-v-75b64b85]:first-child{color:#777}.theme-dark .qt-history-section .qt-section-header[data-v-75b64b85],.theme-dark .qt-position-card .qt-pos-row span[data-v-75b64b85]:last-child{color:#ccc}.theme-dark .qt-history-section .qt-history-count[data-v-75b64b85]{color:#888}.theme-dark .qt-history-section[data-v-75b64b85] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark .qt-history-section[data-v-75b64b85] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark .qt-history-section[data-v-75b64b85] .ant-collapse .ant-collapse-header:hover{opacity:.8}.theme-dark .qt-history-section[data-v-75b64b85] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark .qt-trade-item[data-v-75b64b85]{border-bottom-color:#2a2a2a!important}.theme-dark .qt-trade-item .qt-trade-symbol[data-v-75b64b85]{color:#e0e0e0}.theme-dark .qt-trade-item .qt-trade-amount[data-v-75b64b85]{color:#ccc}.theme-dark[data-v-75b64b85] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark[data-v-75b64b85] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark[data-v-75b64b85] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark[data-v-75b64b85] .ant-drawer-content{background:#141414}.theme-dark[data-v-75b64b85] .ant-input-number,.theme-dark[data-v-75b64b85] .ant-select-selection{background:#262626;border-color:#303030;color:#e0e0e0}.theme-dark[data-v-75b64b85] .ant-radio-group .ant-radio-button-wrapper{background:#262626;border-color:#303030;color:#ccc}.theme-dark[data-v-75b64b85] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#434343;border-color:#595959;color:#fff}.theme-dark[data-v-75b64b85] .ant-slider-rail{background:#303030}.theme-dark[data-v-75b64b85] .ant-slider-track{background:#737373}.theme-dark .qt-manage-link a[data-v-75b64b85]{color:#58a6ff}.theme-dark .qt-manage-link .qt-manage-sep[data-v-75b64b85]{color:#555}.theme-dark .qt-card[data-v-75b64b85]{background:#262626;border-color:#3a3a3a}.theme-dark .qt-section-title[data-v-75b64b85]{color:#e8e8e8}.theme-dark .qt-badge-contract[data-v-75b64b85]{background:#333;color:#bfbfbf;border-color:#434343}.theme-dark .qt-optional-tag[data-v-75b64b85]{background:#2a2a2a;color:#888}.theme-dark .qt-hint-text[data-v-75b64b85]{color:#777}.theme-dark .qt-spot-banner-title[data-v-75b64b85]{color:#e0e0e0}.theme-dark .qt-spot-banner-icon[data-v-75b64b85]{color:#73d13d}.theme-dark .qt-tp-label[data-v-75b64b85]{color:#95de64!important}.theme-dark .qt-sl-label[data-v-75b64b85]{color:#ff7875!important}.theme-dark .qt-position-empty[data-v-75b64b85]{background:#262626;border-color:#303030}.theme-dark .qt-empty-icon[data-v-75b64b85]{color:#434343}.theme-dark .qt-empty-desc[data-v-75b64b85]{color:#888}.chart-container[data-v-6bd239a6]{background:#f0f2f5;color:#333;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}.chart-container[data-v-6bd239a6],.chart-header[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:100%;min-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.chart-header[data-v-6bd239a6]{max-width:100%;background:#fff;border-bottom:1px solid #e8e8e8;-webkit-box-shadow:0 2px 4px rgba(0,0,0,.02);box-shadow:0 2px 4px rgba(0,0,0,.02)}.header-top[data-v-6bd239a6]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:0 16px;height:60px}.header-left[data-v-6bd239a6],.header-top[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.header-left[data-v-6bd239a6]{gap:20px}.symbol-select[data-v-6bd239a6]{width:220px}.symbol-select[data-v-6bd239a6] .ant-select-selection{background-color:#fff;border:1px solid #e8e8e8;color:#333;border-radius:4px;-webkit-box-shadow:none;box-shadow:none}.symbol-select[data-v-6bd239a6] .ant-select-selection:hover{border-color:#1890ff}.symbol-select[data-v-6bd239a6] .ant-select-focused .ant-select-selection{border-color:#1890ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2);box-shadow:0 0 0 2px rgba(24,144,255,.2)}.symbol-select[data-v-6bd239a6] .ant-select-arrow,.symbol-select[data-v-6bd239a6] .ant-select-selection__placeholder{color:#999}.timeframe-group[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;background:#f0f2f5;border-radius:4px;padding:2px}.timeframe-item[data-v-6bd239a6]{padding:4px 12px;font-size:13px;font-weight:600;color:#666;cursor:pointer;-webkit-transition:all .2s;transition:all .2s;border-radius:4px}.timeframe-item[data-v-6bd239a6]:hover{color:#1890ff;background:#fff}.timeframe-item.active[data-v-6bd239a6]{color:#1890ff;background:#fff;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.current-symbol[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:24px}.symbol-info[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.symbol-label[data-v-6bd239a6]{font-size:16px;font-weight:700;color:#333;line-height:1.2}.market-tag[data-v-6bd239a6]{font-size:10px;color:#666;background:#f0f2f5;padding:1px 4px;border-radius:2px;margin-top:2px}.price-info[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.price-info.color-up[data-v-6bd239a6]{color:#0ecb81}.price-info.color-down[data-v-6bd239a6]{color:#f6465d}.symbol-price[data-v-6bd239a6]{font-size:18px;font-weight:600;font-family:Roboto Mono,monospace;line-height:1.2}.symbol-change[data-v-6bd239a6]{font-size:12px}.mobile-symbol-price[data-v-6bd239a6]{display:none}.panel-header .theme-switcher[data-v-6bd239a6]{margin-left:auto;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.panel-header .realtime-toggle-btn[data-v-6bd239a6],.panel-header .theme-toggle-btn[data-v-6bd239a6]{color:#666;border:none;padding:4px 8px;-webkit-transition:all .3s;transition:all .3s;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:4px;min-width:32px;height:32px}.panel-header .realtime-toggle-btn[data-v-6bd239a6]:hover,.panel-header .theme-toggle-btn[data-v-6bd239a6]:hover{color:#1890ff;background:#f0f2f5}.panel-header .realtime-toggle-btn.active[data-v-6bd239a6],.panel-header .theme-toggle-btn.active[data-v-6bd239a6]{color:#1890ff;background:#e6f7ff}.panel-header .realtime-toggle-btn .anticon[data-v-6bd239a6],.panel-header .theme-toggle-btn .anticon[data-v-6bd239a6]{font-size:16px}.chart-content[data-v-6bd239a6]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-width:100%;max-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.chart-content[data-v-6bd239a6],.chart-main-row[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;overflow:hidden;width:100%}.chart-main-row[data-v-6bd239a6]{height:80vh!important;min-height:500px!important;max-height:80vh!important;-ms-flex-negative:0;flex-shrink:0}.chart-right[data-v-6bd239a6]{width:30%!important;-webkit-box-flex:0!important;-ms-flex:0 0 30%!important;flex:0 0 30%!important;border-left:1px solid #e8e8e8}.chart-right[data-v-6bd239a6],.indicators-panel[data-v-6bd239a6]{background:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.indicators-panel[data-v-6bd239a6]{height:100%}.panel-header[data-v-6bd239a6]{height:48px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:0 16px;border-bottom:1px solid #e8e8e8;font-weight:600;color:#333;background:#fff}.panel-header .mobile-header-create-btn[data-v-6bd239a6]{margin-right:0}.panel-body[data-v-6bd239a6]{padding:0;overflow:hidden}.indicator-section[data-v-6bd239a6],.panel-body[data-v-6bd239a6]{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.indicator-section[data-v-6bd239a6]{min-height:0;border-bottom:1px solid #e8e8e8}.indicator-section[data-v-6bd239a6]:last-child{border-bottom:none}.indicator-section.section-empty[data-v-6bd239a6]{min-height:200px}.section-label[data-v-6bd239a6]{-ms-flex-negative:0;flex-shrink:0;padding:12px 16px;background:#fafafa;border-bottom:1px solid #e8e8e8;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.section-label .section-label-left[data-v-6bd239a6],.section-label[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.section-label .section-label-left[data-v-6bd239a6]{gap:8px;-webkit-box-flex:1;-ms-flex:1;flex:1}.section-label .section-label-left .collapse-icon[data-v-6bd239a6]{font-size:12px;color:#999;-webkit-transition:-webkit-transform .2s;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s}.section-label .section-label-left span[data-v-6bd239a6]{font-weight:500}.section-label .buy-indicator-btn[data-v-6bd239a6]{padding:0;height:auto;margin-left:8px}.create-indicator-btn[data-v-6bd239a6]{margin-left:auto;margin-right:0}@media (max-width:768px){.create-indicator-btn[data-v-6bd239a6]{display:none!important}}.section-content[data-v-6bd239a6]{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;padding:12px 16px;min-height:0}.indicator-card[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:#fff;padding:10px 12px;border-radius:6px;margin-bottom:8px;cursor:pointer;-webkit-transition:all .2s;transition:all .2s;border:1px solid #e8e8e8}.indicator-card[data-v-6bd239a6]:hover{background:#f0f2f5;border-color:#1890ff;-webkit-transform:translateY(-1px);transform:translateY(-1px);-webkit-box-shadow:0 2px 4px rgba(0,0,0,.05);box-shadow:0 2px 4px rgba(0,0,0,.05)}.indicator-card.active[data-v-6bd239a6]{background:#e6f7ff;border-color:#1890ff}.indicator-card.active .card-name[data-v-6bd239a6]{color:#1890ff}.indicator-card.indicator-active[data-v-6bd239a6]{border-color:#52c41a;border-width:2px;background:#f6ffed}.indicator-card.indicator-active[data-v-6bd239a6]:hover{border-color:#73d13d;-webkit-box-shadow:0 2px 8px rgba(82,196,26,.2);box-shadow:0 2px 8px rgba(82,196,26,.2)}.indicator-card.indicator-active .card-name[data-v-6bd239a6]{color:#52c41a}.indicator-card.disabled[data-v-6bd239a6]{opacity:.5;cursor:not-allowed}.indicator-card.disabled[data-v-6bd239a6]:hover{-webkit-transform:none;transform:none;background:#fff;border-color:#e8e8e8;-webkit-box-shadow:none;box-shadow:none}.card-content[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:100%}.card-header[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:4px}.card-name[data-v-6bd239a6]{font-size:13px;color:#333;font-weight:500;-webkit-box-flex:1;-ms-flex:1;flex:1;margin-right:8px}.card-params[data-v-6bd239a6]{font-size:11px;color:#999;margin-top:2px}.card-desc[data-v-6bd239a6]{font-size:11px;color:#999;margin-top:0;display:-webkit-box;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;line-height:1.4;min-height:1.4em;max-height:2.8em}.card-action[data-v-6bd239a6]{color:#999;font-size:12px}.card-action[data-v-6bd239a6]:hover{color:#1890ff}.card-actions[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:12px;-ms-flex-negative:0;flex-shrink:0}.action-icon[data-v-6bd239a6]{font-size:16px;cursor:pointer;-webkit-transition:all .3s;transition:all .3s;color:#999}.action-icon.edit-icon[data-v-6bd239a6]{color:#1890ff}.action-icon.edit-icon[data-v-6bd239a6]:hover{color:#40a9ff}.action-icon.delete-icon[data-v-6bd239a6]{color:#ff4d4f}.action-icon.delete-icon[data-v-6bd239a6]:hover{color:#ff7875}.action-icon[data-v-6bd239a6]:hover{color:#1890ff}.action-icon.toggle-icon.active[data-v-6bd239a6]{color:#52c41a}.action-icon.backtest-icon[data-v-6bd239a6]{color:#722ed1}.action-icon.backtest-icon[data-v-6bd239a6]:hover{color:#9254de}.action-icon.backtest-history-icon[data-v-6bd239a6]{color:#13c2c2}.action-icon.backtest-history-icon[data-v-6bd239a6]:hover{color:#08979c}.action-icon.publish-icon[data-v-6bd239a6]{color:#1890ff}.action-icon.publish-icon[data-v-6bd239a6]:hover{color:#40a9ff}.action-icon.publish-icon.published[data-v-6bd239a6]{color:#52c41a}.action-icon.publish-icon.published[data-v-6bd239a6]:hover{color:#73d13d}.action-icon.create-strategy-icon[data-v-6bd239a6]{color:#fa8c16}.action-icon.create-strategy-icon[data-v-6bd239a6]:hover{color:#ffa940}.action-icon.status-icon.status-normal[data-v-6bd239a6]{color:#52c41a}.action-icon.status-icon.status-expired[data-v-6bd239a6]{color:#ff4d4f}.action-icon.expiry-icon[data-v-6bd239a6]{color:#1890ff}.empty-indicators[data-v-6bd239a6]{padding:40px 20px;gap:8px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.empty-indicators[data-v-6bd239a6],.loading-indicators[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:#999;font-size:13px}.loading-indicators[data-v-6bd239a6]{padding:20px}.custom-scrollbar[data-v-6bd239a6]{scrollbar-width:none;-ms-overflow-style:none}.custom-scrollbar[data-v-6bd239a6]::-webkit-scrollbar{display:none;width:0;height:0}.dark-dropdown{background-color:#fff;border:1px solid #e8e8e8;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.15);box-shadow:0 2px 8px rgba(0,0,0,.15)}.dark-dropdown .ant-select-dropdown-menu-item{color:#333}.dark-dropdown .ant-select-dropdown-menu-item:hover{background-color:#f0f2f5}.dark-dropdown .ant-select-dropdown-menu-item-active{background-color:#e6f7ff;color:#1890ff}.dark-dropdown .ant-empty-description{color:#999}.symbol-option[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.symbol-option .symbol-name[data-v-6bd239a6]{font-weight:600;color:#8f8d8d;margin-right:8px}.symbol-option .symbol-name-extra[data-v-6bd239a6]{font-size:12px;color:#999;margin-left:4px}.empty-watchlist-hint[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#666;font-size:12px}@media (max-width:768px){.chart-container[data-v-6bd239a6]{padding:0;width:calc(100% + 44px)!important;margin:-22px}.chart-header[data-v-6bd239a6]{padding:12px}.chart-header .header-top[data-v-6bd239a6],.chart-header[data-v-6bd239a6]{gap:12px;height:auto;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.chart-header .header-top[data-v-6bd239a6]{padding:0}.chart-header .header-left[data-v-6bd239a6]{width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px}.chart-header .search-section[data-v-6bd239a6]{width:100%}.chart-header .search-section .symbol-select[data-v-6bd239a6]{width:100%!important}.chart-header .timeframe-group[data-v-6bd239a6]{width:100%;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:4px}.chart-header .timeframe-group .timeframe-item[data-v-6bd239a6]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:calc(14.28% - 4px);text-align:center;padding:6px 8px;font-size:12px}.chart-header .current-symbol[data-v-6bd239a6]{display:none}.chart-content[data-v-6bd239a6]{overflow-y:auto}.chart-content[data-v-6bd239a6],.chart-main-row[data-v-6bd239a6]{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-ms-flex-direction:column!important;flex-direction:column!important;height:auto!important;min-height:auto!important;max-height:none!important}.mobile-symbol-price[data-v-6bd239a6]{-webkit-box-ordinal-group:1!important;-ms-flex-order:0!important;order:0!important;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:12px 16px;background:#fff;width:100%}.mobile-symbol-price .mobile-price-info[data-v-6bd239a6],.mobile-symbol-price[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mobile-symbol-price .mobile-price-info[data-v-6bd239a6]{gap:12px;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.mobile-symbol-price .mobile-price-info.color-up[data-v-6bd239a6]{color:#0ecb81}.mobile-symbol-price .mobile-price-info.color-down[data-v-6bd239a6]{color:#f6465d}.mobile-symbol-price .mobile-price-info .mobile-symbol-price[data-v-6bd239a6]{font-size:18px;font-weight:600;font-family:Roboto Mono,monospace}.mobile-symbol-price .mobile-price-info .mobile-symbol-change[data-v-6bd239a6]{font-size:14px;font-weight:500}kline-chart[data-v-6bd239a6]{-webkit-box-ordinal-group:2!important;-ms-flex-order:1!important;order:1!important;width:100%!important;-webkit-box-flex:0!important;-ms-flex:0 0 auto!important;flex:0 0 auto!important;display:block!important;margin-bottom:0!important}kline-chart[data-v-6bd239a6] .chart-left{width:100%!important;height:350px!important;min-height:350px!important;max-height:350px!important;border-right:none!important;border-bottom:1px solid #e8e8e8!important}.chart-right[data-v-6bd239a6]{-webkit-box-ordinal-group:3!important;-ms-flex-order:2!important;order:2!important;width:100%!important;min-width:100%!important;max-width:100%!important;-webkit-box-flex:0!important;-ms-flex:0 0 auto!important;flex:0 0 auto!important;height:auto!important;max-height:calc(100vh - 470px)!important;border-left:none!important;border-top:none!important;margin-top:0!important;display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;visibility:visible!important;opacity:1!important}.chart-right .indicators-panel[data-v-6bd239a6]{height:auto!important;min-height:600px!important;max-height:calc(100vh - 410px)!important;overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.chart-right .indicators-panel .panel-header[data-v-6bd239a6]{position:sticky;top:0;background:#fff;z-index:10;border-bottom:1px solid #e8e8e8;padding:12px;font-size:14px;-ms-flex-negative:0;flex-shrink:0}.chart-right .indicators-panel .panel-header .mobile-header-create-btn[data-v-6bd239a6]{margin-right:0;font-size:12px;height:28px;padding:0 12px}.chart-right .indicators-panel .panel-body[data-v-6bd239a6]{padding:0;overflow:visible;min-height:400px!important}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6],.chart-right .indicators-panel .panel-body[data-v-6bd239a6]{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6]{overflow:hidden;min-height:0;height:100%}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-bar{margin-bottom:0;-ms-flex-negative:0;flex-shrink:0;border-bottom:1px solid #e8e8e8}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-tab{color:#666;font-size:14px}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-tab-active{color:#1890ff}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-ink-bar{background-color:#1890ff}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-content{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:auto;min-height:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-tabpane{height:100%;overflow:hidden;display:none;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-height:0}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-tabpane-active{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-height:0;height:100%;overflow:hidden}.chart-right .indicators-panel .mobile-indicator-tabs .mobile-tab-content[data-v-6bd239a6],.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-content-holder{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;min-height:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%}.chart-right .indicators-panel .mobile-indicator-tabs .mobile-tab-content[data-v-6bd239a6]{width:100%}.chart-right .indicators-panel .mobile-indicator-tabs .section-content[data-v-6bd239a6]{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto!important;overflow-x:hidden;padding:12px;min-height:0;height:100%;-webkit-overflow-scrolling:touch;position:relative}.chart-right .indicators-panel .mobile-indicator-tabs .mobile-create-btn-wrapper[data-v-6bd239a6],.chart-right .indicators-panel .mobile-indicator-tabs .mobile-create-btn[data-v-6bd239a6]{display:none!important}.chart-right .indicators-panel .indicator-section .section-label[data-v-6bd239a6]{padding:10px 12px;font-size:13px}.chart-right .indicators-panel .section-content[data-v-6bd239a6]{padding:10px 12px}.chart-right .indicators-panel .indicator-card[data-v-6bd239a6]{padding:10px}.chart-right .indicators-panel .indicator-card .card-name[data-v-6bd239a6]{font-size:13px}.chart-right .indicators-panel .indicator-card .card-desc[data-v-6bd239a6],.chart-right .indicators-panel .indicator-card .card-params[data-v-6bd239a6]{font-size:11px}}.qt-header-btn[data-v-6bd239a6]{margin-left:16px;background:linear-gradient(135deg,#1890ff,#722ed1);border:none;color:#fff;border-radius:6px;font-weight:600;font-size:12px;padding:0 12px;height:30px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;-webkit-box-shadow:0 2px 8px rgba(24,144,255,.3);box-shadow:0 2px 8px rgba(24,144,255,.3);-webkit-transition:all .3s;transition:all .3s}.qt-header-btn[data-v-6bd239a6]:focus,.qt-header-btn[data-v-6bd239a6]:hover{background:linear-gradient(135deg,#40a9ff,#9254de);color:#fff;-webkit-box-shadow:0 4px 12px rgba(24,144,255,.45);box-shadow:0 4px 12px rgba(24,144,255,.45);-webkit-transform:translateY(-1px);transform:translateY(-1px)}.qt-floating-btn[data-v-6bd239a6]{position:fixed;right:24px;bottom:80px;width:48px;height:48px;border-radius:50%;background:linear-gradient(135deg,#1890ff,#722ed1);color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;-webkit-box-shadow:0 4px 16px rgba(24,144,255,.4);box-shadow:0 4px 16px rgba(24,144,255,.4);z-index:999;-webkit-transition:all .3s;transition:all .3s;font-size:22px}.qt-floating-btn[data-v-6bd239a6]:hover{-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-box-shadow:0 6px 24px rgba(24,144,255,.55);box-shadow:0 6px 24px rgba(24,144,255,.55)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark[data-v-6bd239a6],body.dark,body.realdark{background:#141414;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-bottom-color:#2a2a2a;-webkit-box-shadow:0 2px 4px rgba(0,0,0,.3);box-shadow:0 2px 4px rgba(0,0,0,.3)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .header-top .current-symbol .symbol-label[data-v-6bd239a6],body.dark,body.realdark{color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .header-top .current-symbol .market-tag[data-v-6bd239a6],body.dark,body.realdark{color:#888;background:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .header-top .current-symbol .price-info.color-up[data-v-6bd239a6],body.dark,body.realdark{color:#0ecb81}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .header-top .current-symbol .price-info.color-down[data-v-6bd239a6],body.dark,body.realdark{color:#f6465d}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .header-top .current-symbol .qt-header-btn[data-v-6bd239a6],body.dark,body.realdark{background:linear-gradient(135deg,#177ddc,#642ab5);-webkit-box-shadow:0 2px 8px rgba(23,125,220,.35);box-shadow:0 2px 8px rgba(23,125,220,.35)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .header-top .current-symbol .qt-header-btn[data-v-6bd239a6]:focus,.chart-container.theme-dark .chart-header .header-top .current-symbol .qt-header-btn[data-v-6bd239a6]:hover,body.dark,body.realdark{background:linear-gradient(135deg,#3c9ae8,#854eca);-webkit-box-shadow:0 4px 12px rgba(23,125,220,.5);box-shadow:0 4px 12px rgba(23,125,220,.5)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .qt-floating-btn[data-v-6bd239a6],body.dark,body.realdark{background:linear-gradient(135deg,#177ddc,#642ab5);-webkit-box-shadow:0 4px 16px rgba(23,125,220,.45);box-shadow:0 4px 16px rgba(23,125,220,.45)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .qt-floating-btn[data-v-6bd239a6]:hover,body.dark,body.realdark{-webkit-box-shadow:0 6px 24px rgba(23,125,220,.6);box-shadow:0 6px 24px rgba(23,125,220,.6)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .symbol-select[data-v-6bd239a6] .ant-select-selection,body.dark,body.realdark{background-color:#1c1c1c;border-color:#2a2a2a;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .symbol-select[data-v-6bd239a6] .ant-select-selection:hover,body.dark,body.realdark{border-color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .symbol-select[data-v-6bd239a6] .ant-select-focused .ant-select-selection,body.dark,body.realdark{border-color:#1890ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.3);box-shadow:0 0 0 2px rgba(24,144,255,.3)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .symbol-select[data-v-6bd239a6] .ant-select-arrow,.chart-container.theme-dark .symbol-select[data-v-6bd239a6] .ant-select-selection__placeholder,body.dark,body.realdark{color:#868993}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .timeframe-group[data-v-6bd239a6],body.dark,body.realdark{background:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .timeframe-group .timeframe-item[data-v-6bd239a6],body.dark,body.realdark{color:#868993}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .timeframe-group .timeframe-item[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#1890ff;background:#1c1c1c}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .timeframe-group .timeframe-item.active[data-v-6bd239a6],body.dark,body.realdark{color:#1890ff;background:#1c1c1c;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.3);box-shadow:0 1px 2px rgba(0,0,0,.3)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-symbol-label[data-v-6bd239a6],body.dark,body.realdark{margin-left:5px;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-market-tag[data-v-6bd239a6],body.dark,body.realdark{color:#888;background:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-price-info.color-up[data-v-6bd239a6],body.dark,body.realdark{color:#0ecb81}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-price-info.color-down[data-v-6bd239a6],body.dark,body.realdark{color:#f6465d}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-left-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .panel-header[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-bottom-color:#2a2a2a;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .panel-header .realtime-toggle-btn[data-v-6bd239a6],body.dark,body.realdark{color:#868993}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .panel-header .realtime-toggle-btn.active[data-v-6bd239a6],.chart-container.theme-dark .chart-right .indicators-panel .panel-header .realtime-toggle-btn[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#1890ff;background:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .panel-body[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-section[data-v-6bd239a6],body.dark,body.realdark{border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .section-label[data-v-6bd239a6],body.dark,body.realdark{color:#868993;background:#2a2a2a;border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .section-label .section-label-left .collapse-icon[data-v-6bd239a6],body.dark,body.realdark{color:#868993}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .section-label .section-label-left span[data-v-6bd239a6],body.dark,body.realdark{color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .section-label .buy-indicator-btn[data-v-6bd239a6],body.dark,body.realdark{color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .section-label .buy-indicator-btn[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#40a9ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card.active[data-v-6bd239a6],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card[data-v-6bd239a6]:hover,body.dark,body.realdark{background:#2a2a2a;border-color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card.active .card-name[data-v-6bd239a6],body.dark,body.realdark{color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card.indicator-active[data-v-6bd239a6],body.dark,body.realdark{border-color:#52c41a;background:#1e3a1e}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card.indicator-active[data-v-6bd239a6]:hover,body.dark,body.realdark{border-color:#73d13d;-webkit-box-shadow:0 2px 8px rgba(82,196,26,.3);box-shadow:0 2px 8px rgba(82,196,26,.3)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card.indicator-active .card-name[data-v-6bd239a6],body.dark,body.realdark{color:#52c41a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .card-name[data-v-6bd239a6],body.dark,body.realdark{color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon[data-v-6bd239a6],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .card-desc[data-v-6bd239a6],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .card-params[data-v-6bd239a6],body.dark,body.realdark{color:#868993}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.edit-icon[data-v-6bd239a6],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.edit-icon[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#40a9ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.delete-icon[data-v-6bd239a6],body.dark,body.realdark{color:#ff4d4f}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.delete-icon[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#ff7875}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.backtest-icon[data-v-6bd239a6],body.dark,body.realdark{color:#b37feb}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.backtest-icon[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#d3adf7}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.backtest-history-icon[data-v-6bd239a6],body.dark,body.realdark{color:#5cdbd3}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.backtest-history-icon[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#87e8de}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.publish-icon[data-v-6bd239a6],body.dark,body.realdark{color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.publish-icon[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#40a9ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.publish-icon.published[data-v-6bd239a6],body.dark,body.realdark{color:#52c41a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.publish-icon.published[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#73d13d}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.toggle-icon.active[data-v-6bd239a6],body.dark,body.realdark{color:#52c41a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .empty-indicators[data-v-6bd239a6],body.dark,body.realdark{color:#868993}@media (max-width:768px){.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .current-symbol[data-v-6bd239a6],body.dark,body.realdark{border-top-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-left[data-v-6bd239a6],body.dark,body.realdark{border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right[data-v-6bd239a6],body.dark,body.realdark{border-top-color:#2a2a2a;max-height:500px!important}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .panel-header[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-bar,body.dark,body.realdark{border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-tab,body.dark,body.realdark{color:#868993}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-tab-active,body.dark,body.realdark{color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-ink-bar,body.dark,body.realdark{background-color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .mobile-indicator-tabs .mobile-create-btn-wrapper[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-symbol-label[data-v-6bd239a6],body.dark,body.realdark{margin-left:5px;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-market-tag[data-v-6bd239a6],body.dark,body.realdark{color:#868993;background:#2a3932}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-price-info.color-up[data-v-6bd239a6],body.dark,body.realdark{color:#0ecb81}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-price-info.color-down[data-v-6bd239a6],body.dark,body.realdark{color:#f6465d}}.add-stock-modal-content .market-tabs[data-v-6bd239a6]{margin-bottom:16px}.add-stock-modal-content .hot-symbols-section[data-v-6bd239a6],.add-stock-modal-content .search-results-section[data-v-6bd239a6],.add-stock-modal-content .symbol-search-section[data-v-6bd239a6]{margin-bottom:24px}.add-stock-modal-content .hot-symbols-section .section-title[data-v-6bd239a6],.add-stock-modal-content .search-results-section .section-title[data-v-6bd239a6]{font-size:14px;font-weight:600;color:#262626;margin-bottom:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.add-stock-modal-content .symbol-list[data-v-6bd239a6]{max-height:200px;overflow-y:auto;border:1px solid #e8e8e8;border-radius:4px}.add-stock-modal-content .symbol-list .symbol-list-item[data-v-6bd239a6]{cursor:pointer;padding:8px 12px;-webkit-transition:background-color .3s;transition:background-color .3s}.add-stock-modal-content .symbol-list .symbol-list-item[data-v-6bd239a6]:hover{background-color:#f5f5f5}.add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content .symbol-code[data-v-6bd239a6]{font-weight:600;color:#262626;min-width:80px}.add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content .symbol-name[data-v-6bd239a6]{color:#595959;-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.add-stock-modal-content .selected-symbol-section[data-v-6bd239a6]{margin-top:16px}.add-stock-modal-content .selected-symbol-section .selected-symbol-info[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.chart-container.theme-dark .add-stock-modal-content .hot-symbols-section .section-title[data-v-6bd239a6],.chart-container.theme-dark .add-stock-modal-content .search-results-section .section-title[data-v-6bd239a6],body.dark,body.realdark{color:#d1d4dc}.chart-container.theme-dark .add-stock-modal-content .symbol-list[data-v-6bd239a6],body.dark,body.realdark{border-color:#363c4e;background-color:#2a2a2a}.chart-container.theme-dark .add-stock-modal-content .symbol-list .symbol-list-item[data-v-6bd239a6]:hover,body.dark,body.realdark{background-color:#363c4e}.chart-container.theme-dark .add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content .symbol-code[data-v-6bd239a6],body.dark,body.realdark{color:#d1d4dc}.chart-container.theme-dark .add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content .symbol-name[data-v-6bd239a6],body.dark,body.realdark{color:#868993}.params-config-modal .indicator-info[data-v-6bd239a6]{text-align:center;margin-bottom:8px}.params-config-modal .indicator-info .indicator-name[data-v-6bd239a6]{font-size:16px;font-weight:600;color:#1f1f1f}.params-config-modal .params-form .param-item[data-v-6bd239a6]{margin-bottom:16px}.params-config-modal .params-form .param-item .param-header[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:6px}.params-config-modal .params-form .param-item .param-header .param-label[data-v-6bd239a6]{font-weight:500;color:#333}.theme-dark .params-config-modal .indicator-info .indicator-name[data-v-6bd239a6]{color:#e0e0e0}.theme-dark .params-config-modal .params-form .param-item .param-header .param-label[data-v-6bd239a6]{color:#d0d0d0} \ No newline at end of file diff --git a/frontend/dist/css/762.d202dad2.css b/frontend/dist/css/762.d202dad2.css new file mode 100644 index 0000000..c7956da --- /dev/null +++ b/frontend/dist/css/762.d202dad2.css @@ -0,0 +1 @@ +.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:transparent}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:transparent}.cm-fat-cursor{caret-color:transparent}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative;z-index:0}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none;outline:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-webkit-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}.cm-s-monokai.CodeMirror{background:#272822;color:#f8f8f2}.cm-s-monokai div.CodeMirror-selected{background:#49483e}.cm-s-monokai .CodeMirror-line::selection,.cm-s-monokai .CodeMirror-line>span::selection,.cm-s-monokai .CodeMirror-line>span>span::selection{background:rgba(73,72,62,.99)}.cm-s-monokai .CodeMirror-line::-moz-selection,.cm-s-monokai .CodeMirror-line>span::-moz-selection,.cm-s-monokai .CodeMirror-line>span>span::-moz-selection{background:rgba(73,72,62,.99)}.cm-s-monokai .CodeMirror-gutters{background:#272822;border-right:0}.cm-s-monokai .CodeMirror-guttermarker{color:#fff}.cm-s-monokai .CodeMirror-guttermarker-subtle,.cm-s-monokai .CodeMirror-linenumber{color:#d0d0d0}.cm-s-monokai .CodeMirror-cursor{border-left:1px solid #f8f8f0}.cm-s-monokai span.cm-comment{color:#75715e}.cm-s-monokai span.cm-atom,.cm-s-monokai span.cm-number{color:#ae81ff}.cm-s-monokai span.cm-comment.cm-attribute{color:#97b757}.cm-s-monokai span.cm-comment.cm-def{color:#bc9262}.cm-s-monokai span.cm-comment.cm-tag{color:#bc6283}.cm-s-monokai span.cm-comment.cm-type{color:#5998a6}.cm-s-monokai span.cm-attribute,.cm-s-monokai span.cm-property{color:#a6e22e}.cm-s-monokai span.cm-keyword{color:#f92672}.cm-s-monokai span.cm-builtin{color:#66d9ef}.cm-s-monokai span.cm-string{color:#e6db74}.cm-s-monokai span.cm-variable{color:#f8f8f2}.cm-s-monokai span.cm-variable-2{color:#9effff}.cm-s-monokai span.cm-type,.cm-s-monokai span.cm-variable-3{color:#66d9ef}.cm-s-monokai span.cm-def{color:#fd971f}.cm-s-monokai span.cm-bracket{color:#f8f8f2}.cm-s-monokai span.cm-tag{color:#f92672}.cm-s-monokai span.cm-header,.cm-s-monokai span.cm-link{color:#ae81ff}.cm-s-monokai span.cm-error{background:#f92672;color:#f8f8f0}.cm-s-monokai .CodeMirror-activeline-background{background:#373831}.cm-s-monokai .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.cm-s-eclipse span.cm-meta{color:#ff1717}.cm-s-eclipse span.cm-keyword{line-height:1em;font-weight:700;color:#7f0055}.cm-s-eclipse span.cm-atom{color:#219}.cm-s-eclipse span.cm-number{color:#164}.cm-s-eclipse span.cm-def{color:#00f}.cm-s-eclipse span.cm-variable{color:#000}.cm-s-eclipse span.cm-type,.cm-s-eclipse span.cm-variable-2,.cm-s-eclipse span.cm-variable-3{color:#0000c0}.cm-s-eclipse span.cm-operator,.cm-s-eclipse span.cm-property{color:#000}.cm-s-eclipse span.cm-comment{color:#3f7f5f}.cm-s-eclipse span.cm-string{color:#2a00ff}.cm-s-eclipse span.cm-string-2{color:#f50}.cm-s-eclipse span.cm-qualifier{color:#555}.cm-s-eclipse span.cm-builtin{color:#30a}.cm-s-eclipse span.cm-bracket{color:#cc7}.cm-s-eclipse span.cm-tag{color:#170}.cm-s-eclipse span.cm-attribute{color:#00c}.cm-s-eclipse span.cm-link{color:#219}.cm-s-eclipse span.cm-error{color:red}.cm-s-eclipse .CodeMirror-activeline-background{background:#e8f2ff}.cm-s-eclipse .CodeMirror-matchingbracket{outline:1px solid grey;color:#000!important}.profile-exchange-modal .exchange-account-form .egress-ip-block{width:100%}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px;margin:0 0 16px;padding:12px 14px;border:1px solid rgba(24,144,255,.18);border-radius:10px;background:-webkit-gradient(linear,left top,right top,from(rgba(24,144,255,.06)),to(rgba(82,196,26,.04)));background:linear-gradient(90deg,rgba(24,144,255,.06),rgba(82,196,26,.04))}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:10px;min-width:0}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__icon{width:28px;height:28px;border-radius:50%;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background:rgba(24,144,255,.12);color:#1890ff;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__text{min-width:0}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__title{color:rgba(0,0,0,.85);font-size:13px;font-weight:600;line-height:1.5}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__hint{color:rgba(0,0,0,.55);font-size:12px;line-height:1.5;margin-top:2px}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__action{padding:0;white-space:nowrap;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.profile-exchange-modal .exchange-account-form .egress-ip-row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:6px}.profile-exchange-modal .exchange-account-form .egress-ip-refresh-row{margin-top:4px}.profile-exchange-modal .exchange-account-form .egress-ip-line{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;margin-bottom:10px}.profile-exchange-modal .exchange-account-form .egress-ip-kind{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;min-width:42px;font-size:12px;color:rgba(0,0,0,.55)}.profile-exchange-modal .exchange-account-form .egress-ip-value{-webkit-box-flex:1;-ms-flex:1 1 160px;flex:1 1 160px;min-width:0;font-family:Consolas,ui-monospace,monospace;font-size:12px;padding:6px 10px;border-radius:4px;border:1px solid #d9d9d9;background:#fafafa;color:#262626;word-break:break-all}.profile-exchange-modal .exchange-account-form .exchange-demo-checkbox-label{color:rgba(0,0,0,.85)}.profile-exchange-modal .exchange-account-form .exchange-demo-hint{margin-top:6px}.profile-exchange-modal .exchange-account-form .field-hint{margin-top:6px;font-size:12px;color:rgba(0,0,0,.45);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:6px}.profile-exchange-modal .exchange-account-form .test-result-msg{margin-top:8px;font-size:13px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.profile-exchange-modal .exchange-account-form .test-result-msg.success{color:#52c41a}.profile-exchange-modal .exchange-account-form .test-result-msg.error{color:#f5222d}.profile-exchange-modal--dark .ant-modal-content{background:#1c1c1c;-webkit-box-shadow:0 8px 32px rgba(0,0,0,.45);box-shadow:0 8px 32px rgba(0,0,0,.45)}.profile-exchange-modal--dark .ant-modal-header{background:#1c1c1c;border-bottom:1px solid #2a2a2a}.profile-exchange-modal--dark .ant-modal-title{color:#e0e6ed}.profile-exchange-modal--dark .ant-modal-close{color:#8b949e}.profile-exchange-modal--dark .ant-modal-body,.profile-exchange-modal--dark .ant-modal-close:hover{color:#c9d1d9}.profile-exchange-modal--dark .ant-modal-footer{background:#1c1c1c;border-top:1px solid #2a2a2a}.profile-exchange-modal--dark .exchange-account-form .ant-form-item-label>label{color:#c9d1d9}.profile-exchange-modal--dark .exchange-account-form .ant-form-item-explain,.profile-exchange-modal--dark .exchange-account-form .ant-form-item-extra{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-input,.profile-exchange-modal--dark .exchange-account-form .ant-input-number,.profile-exchange-modal--dark .exchange-account-form .ant-input-number-input,.profile-exchange-modal--dark .exchange-account-form .ant-input-password .ant-input{background:#141414!important;border-color:#2a2a2a!important;color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-input-password-icon{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-input-number-handler-wrap{background:#141414;border-left-color:#2a2a2a}.profile-exchange-modal--dark .exchange-account-form .ant-input-number-handler-down-inner,.profile-exchange-modal--dark .exchange-account-form .ant-input-number-handler-up-inner{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-select-selector{background:#141414!important;border-color:#2a2a2a!important;color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-item,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-placeholder{color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-selection,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection--single{background:#141414!important;border-color:#2a2a2a!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-placeholder,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-selected-value,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection__rendered{color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-arrow{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-checkbox-wrapper,.profile-exchange-modal--dark .exchange-account-form .ant-checkbox-wrapper span{color:#c9d1d9}.profile-exchange-modal--dark .exchange-account-form .exchange-demo-checkbox-label{color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .egress-ip-hint,.profile-exchange-modal--dark .exchange-account-form .exchange-demo-hint{color:#8b949e!important}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout{background:-webkit-gradient(linear,left top,right top,from(rgba(24,144,255,.12)),to(rgba(82,196,26,.08)));background:linear-gradient(90deg,rgba(24,144,255,.12),rgba(82,196,26,.08));border-color:rgba(88,166,255,.26)}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__icon{background:rgba(88,166,255,.16);color:#58a6ff}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__title{color:#e0e6ed}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__hint{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__action{color:#58a6ff}.profile-exchange-modal--dark .exchange-account-form .egress-ip-value{border-color:#2a2a2a!important;background:#141414!important;color:#e0e6ed!important}.profile-exchange-modal--dark .exchange-account-form a.egress-ip-action{color:#58a6ff}.profile-exchange-modal--dark .exchange-account-form .egress-ip-kind{color:#8b949e!important}.profile-exchange-modal--dark .exchange-account-form .ant-alert{background:rgba(250,173,20,.12);border-color:rgba(250,173,20,.45)}.profile-exchange-modal--dark .exchange-account-form .ant-alert-message{color:#ffc53d}.profile-exchange-modal--dark .exchange-account-form .ant-alert-description{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-alert-icon{color:#faad14}.profile-exchange-modal--dark .exchange-account-form .field-hint{color:#8b949e;margin-top:6px;font-size:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:6px}.profile-exchange-modal--dark .exchange-account-form .field-hint .anticon{color:#8b949e;margin-top:2px}.profile-exchange-modal--dark .exchange-account-form .test-result-msg{color:#c9d1d9}.profile-exchange-modal--dark .exchange-account-form .test-result-msg.success{color:#73d13d}.profile-exchange-modal--dark .exchange-account-form .test-result-msg.error{color:#ff7875}.profile-exchange-select-dropdown-dark.ant-select-dropdown{background:#1c1c1c}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item{color:#c9d1d9}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item:hover{background:#2a2a2a}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item-selected{background:#2a2a2a!important;color:#e0e6ed;font-weight:500}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item-group-title{color:#8b949e!important;font-size:12px}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item,.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item-selected{color:#c9d1d9!important}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-empty-description{color:#8b949e} \ No newline at end of file diff --git a/frontend/dist/css/797.b2c1db3f.css b/frontend/dist/css/797.b2c1db3f.css deleted file mode 100644 index 58a6346..0000000 --- a/frontend/dist/css/797.b2c1db3f.css +++ /dev/null @@ -1 +0,0 @@ -.quick-trade-drawer[data-v-989be352] .ant-drawer-body{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%;overflow-y:auto}.qt-header[data-v-989be352]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid #f0f0f0}.qt-header .qt-header-left[data-v-989be352],.qt-header[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-header .qt-header-left[data-v-989be352]{gap:8px}.qt-header .qt-header-left .qt-icon[data-v-989be352]{font-size:20px;color:#1890ff}.qt-header .qt-header-left .qt-header-title[data-v-989be352]{font-size:16px;font-weight:600}.qt-header .qt-close[data-v-989be352]{font-size:16px;cursor:pointer;color:#999}.qt-header .qt-close[data-v-989be352]:hover{color:#333}.qt-symbol-bar[data-v-989be352]{padding:12px 20px;background:linear-gradient(135deg,#f6f8fc,#eef2f8);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:8px}.qt-symbol-bar .qt-symbol-selector[data-v-989be352],.qt-symbol-bar .qt-symbol-selector[data-v-989be352] .ant-select{width:100%}.qt-symbol-bar .qt-symbol-selector[data-v-989be352] .ant-select-selection{border-radius:6px;border:1px solid #d9d9d9}.qt-symbol-bar .qt-price-display[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.qt-symbol-bar .qt-price-display .qt-current-price[data-v-989be352]{font-size:16px;font-weight:600;color:#333}.qt-symbol-option[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.qt-symbol-option .qt-symbol-option-name[data-v-989be352]{font-weight:600;font-size:14px}.qt-symbol-option .qt-symbol-option-desc[data-v-989be352]{color:#999;font-size:12px}.qt-section[data-v-989be352]{padding:8px 20px}.qt-section .qt-label[data-v-989be352]{font-size:12px;color:#999;margin-bottom:4px;font-weight:500}.qt-section .qt-crypto-hint[data-v-989be352]{font-size:10px;color:#faad14;background:rgba(250,173,20,.1);padding:1px 6px;border-radius:4px;margin-left:4px}.qt-balance[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;margin-top:6px;font-size:12px}.qt-balance .qt-balance-label[data-v-989be352]{color:#999}.qt-balance .qt-balance-value[data-v-989be352]{color:#52c41a;font-weight:600}.qt-manage-link[data-v-989be352]{margin-top:6px;font-size:12px}.qt-direction-toggle[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px}.qt-direction-toggle .qt-dir-btn[data-v-989be352]{-webkit-box-flex:1;-ms-flex:1;flex:1;padding:10px;text-align:center;border-radius:8px;font-weight:600;font-size:14px;cursor:pointer;-webkit-transition:all .2s;transition:all .2s;border:2px solid transparent;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:6px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.qt-direction-toggle .qt-dir-long[data-v-989be352]{color:#52c41a;background:rgba(82,196,26,.06);border-color:rgba(82,196,26,.2)}.qt-direction-toggle .qt-dir-long.active[data-v-989be352]{background:#52c41a;color:#fff;border-color:#52c41a;-webkit-box-shadow:0 4px 12px rgba(82,196,26,.3);box-shadow:0 4px 12px rgba(82,196,26,.3)}.qt-direction-toggle .qt-dir-long[data-v-989be352]:hover:not(.active){border-color:#52c41a}.qt-direction-toggle .qt-dir-short[data-v-989be352]{color:#f5222d;background:rgba(245,34,45,.06);border-color:rgba(245,34,45,.2)}.qt-direction-toggle .qt-dir-short.active[data-v-989be352]{background:#f5222d;color:#fff;border-color:#f5222d;-webkit-box-shadow:0 4px 12px rgba(245,34,45,.3);box-shadow:0 4px 12px rgba(245,34,45,.3)}.qt-direction-toggle .qt-dir-short[data-v-989be352]:hover:not(.active){border-color:#f5222d}.qt-quick-amounts[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:6px;margin-top:6px}.qt-quick-amounts button[data-v-989be352]{-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:12px}.qt-leverage-row[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-tpsl-row[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px}.qt-tpsl-row .qt-tpsl-item[data-v-989be352]{-webkit-box-flex:1;-ms-flex:1;flex:1}.qt-submit-section[data-v-989be352]{padding:12px 20px}.qt-submit-section .qt-submit-btn[data-v-989be352]{height:48px;font-size:16px;font-weight:700;border-radius:8px;letter-spacing:.5px}.qt-submit-section .qt-btn-long[data-v-989be352]{background:#52c41a!important;border-color:#52c41a!important}.qt-submit-section .qt-btn-long[data-v-989be352]:hover{background:#73d13d!important}.qt-submit-section .qt-btn-long[data-v-989be352]:active{background:#389e0d!important}.qt-submit-section .qt-btn-short[data-v-989be352]{background:#f5222d!important;border-color:#f5222d!important}.qt-submit-section .qt-btn-short[data-v-989be352]:hover{background:#ff4d4f!important}.qt-submit-section .qt-btn-short[data-v-989be352]:active{background:#cf1322!important}.qt-position-section[data-v-989be352]{padding:8px 20px 12px}.qt-position-section .qt-section-header[data-v-989be352]{font-size:13px;font-weight:600;color:#666;margin-bottom:8px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.qt-history-section[data-v-989be352]{padding:8px 20px 12px}.qt-history-section[data-v-989be352] .ant-collapse{background:transparent;border:none}.qt-history-section[data-v-989be352] .ant-collapse-item{border:none}.qt-history-section[data-v-989be352] .ant-collapse-header{padding:0!important;cursor:pointer}.qt-history-section[data-v-989be352] .ant-collapse-header:hover{opacity:.8}.qt-history-section[data-v-989be352] .ant-collapse-content{border:none;background:transparent}.qt-history-section[data-v-989be352] .ant-collapse-content-box{padding:8px 0 0 0!important}.qt-history-section .qt-section-header[data-v-989be352]{font-size:13px;font-weight:600;color:#666;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.qt-history-section .qt-history-count[data-v-989be352]{font-size:12px;color:#999;font-weight:400}.qt-position-card[data-v-989be352]{background:#fafafa;border-radius:8px;padding:10px 12px;border-left:3px solid #d9d9d9}.qt-position-card.long[data-v-989be352]{border-left-color:#52c41a}.qt-position-card.short[data-v-989be352]{border-left-color:#f5222d}.qt-position-card .qt-pos-row[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;font-size:13px;padding:2px 0}.qt-position-card .qt-pos-row span[data-v-989be352]:first-child{color:#999}.qt-position-empty[data-v-989be352]{background:#fafafa;border-radius:8px;padding:20px 12px;text-align:center;border:1px dashed #d9d9d9}.qt-green[data-v-989be352]{color:#52c41a!important}.qt-red[data-v-989be352]{color:#f5222d!important}.qt-trade-list .qt-trade-item[data-v-989be352]{padding:6px 0;border-bottom:1px solid #f5f5f5}.qt-trade-list .qt-trade-item[data-v-989be352]:last-child{border-bottom:none}.qt-trade-list .qt-trade-item .qt-trade-main[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.qt-trade-list .qt-trade-item .qt-trade-main .qt-trade-symbol[data-v-989be352]{font-weight:600;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-main .qt-trade-amount[data-v-989be352]{margin-left:auto;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-meta[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-top:2px}.qt-trade-list .qt-trade-item .qt-trade-meta .qt-trade-time[data-v-989be352]{font-size:11px;color:#bbb}.theme-dark .qt-header[data-v-989be352]{border-bottom-color:#303030}.theme-dark .qt-header .qt-header-title[data-v-989be352]{color:#e0e0e0}.theme-dark .qt-header .qt-close[data-v-989be352]{color:#666}.theme-dark .qt-header .qt-close[data-v-989be352]:hover{color:#bbb}.theme-dark .qt-symbol-bar[data-v-989be352]{background:linear-gradient(135deg,#1a1f2e,#141824)}.theme-dark .qt-symbol-bar .qt-current-price[data-v-989be352]{color:#e0e0e0}.theme-dark .qt-symbol-bar[data-v-989be352] .ant-select-selection{background:#1a1f2e;border-color:#303030;color:#e0e0e0}.theme-dark .qt-symbol-bar[data-v-989be352] .ant-select-selection__placeholder{color:#666}.theme-dark .qt-symbol-option .qt-symbol-option-name[data-v-989be352]{color:#e0e0e0}.theme-dark .qt-symbol-option .qt-symbol-option-desc[data-v-989be352]{color:#999}.theme-dark .qt-section .qt-label[data-v-989be352]{color:#777}.theme-dark .qt-position-card[data-v-989be352]{background:#1a1f2e}.theme-dark .qt-position-card .qt-pos-row span[data-v-989be352]:first-child{color:#777}.theme-dark .qt-history-section .qt-section-header[data-v-989be352],.theme-dark .qt-position-card .qt-pos-row span[data-v-989be352]:last-child{color:#ccc}.theme-dark .qt-history-section .qt-history-count[data-v-989be352]{color:#888}.theme-dark .qt-history-section[data-v-989be352] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark .qt-history-section[data-v-989be352] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark .qt-history-section[data-v-989be352] .ant-collapse .ant-collapse-header:hover{opacity:.8}.theme-dark .qt-history-section[data-v-989be352] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark .qt-trade-item[data-v-989be352]{border-bottom-color:#2a2a2a!important}.theme-dark .qt-trade-item .qt-trade-symbol[data-v-989be352]{color:#e0e0e0}.theme-dark .qt-trade-item .qt-trade-amount[data-v-989be352]{color:#ccc}.theme-dark[data-v-989be352] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark[data-v-989be352] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark[data-v-989be352] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark[data-v-989be352] .ant-drawer-content{background:#141414}.theme-dark[data-v-989be352] .ant-input-number,.theme-dark[data-v-989be352] .ant-select-selection{background:#1a1f2e;border-color:#303030;color:#e0e0e0}.theme-dark[data-v-989be352] .ant-radio-group .ant-radio-button-wrapper{background:#1a1f2e;border-color:#303030;color:#ccc}.theme-dark[data-v-989be352] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#1890ff;border-color:#1890ff;color:#fff}.theme-dark[data-v-989be352] .ant-slider-rail{background:#303030}.theme-dark[data-v-989be352] .ant-slider-track{background:#1890ff}.polymarket-analysis-modal .input-section .input-actions[data-v-67e891d2]{margin-top:12px}.polymarket-analysis-modal .result-section .market-info[data-v-67e891d2]{margin-bottom:24px}.polymarket-analysis-modal .result-section .market-info h3[data-v-67e891d2]{margin-bottom:12px;font-size:18px;font-weight:600}.polymarket-analysis-modal .result-section .market-info .market-meta[data-v-67e891d2]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:16px;-ms-flex-wrap:wrap;flex-wrap:wrap}.polymarket-analysis-modal .result-section .market-info .market-meta .meta-item[data-v-67e891d2]{color:rgba(0,0,0,.65);font-size:14px}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison[data-v-67e891d2]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:16px;margin:24px 0}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item[data-v-67e891d2]{-webkit-box-flex:1;-ms-flex:1;flex:1;text-align:center;padding:16px;background:#f5f5f5;border-radius:4px}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item .prob-label[data-v-67e891d2]{font-size:12px;color:rgba(0,0,0,.65);margin-bottom:8px}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item .prob-value[data-v-67e891d2]{font-size:24px;font-weight:600}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item .prob-value.ai-prob[data-v-67e891d2]{color:#1890ff}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item .prob-value.divergence-positive[data-v-67e891d2]{color:#52c41a}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item .prob-value.divergence-negative[data-v-67e891d2]{color:#ff4d4f}.polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item .prob-value.divergence-neutral[data-v-67e891d2]{color:rgba(0,0,0,.65)}.polymarket-analysis-modal .result-section .analysis-result .recommendation-section[data-v-67e891d2]{margin:24px 0}.polymarket-analysis-modal .result-section .analysis-result .recommendation-section .rec-card[data-v-67e891d2]{text-align:center;padding:16px;background:#f5f5f5;border-radius:4px}.polymarket-analysis-modal .result-section .analysis-result .recommendation-section .rec-card .rec-label[data-v-67e891d2]{font-size:12px;color:rgba(0,0,0,.65);margin-bottom:8px}.polymarket-analysis-modal .result-section .analysis-result .recommendation-section .rec-card .rec-value[data-v-67e891d2]{font-size:24px;font-weight:600;color:#1890ff}.polymarket-analysis-modal .result-section .analysis-result .key-factors-section[data-v-67e891d2],.polymarket-analysis-modal .result-section .analysis-result .reasoning-section[data-v-67e891d2]{margin:24px 0}.polymarket-analysis-modal .result-section .analysis-result .key-factors-section h4[data-v-67e891d2],.polymarket-analysis-modal .result-section .analysis-result .reasoning-section h4[data-v-67e891d2]{margin-bottom:12px;font-size:16px;font-weight:600}.polymarket-analysis-modal .result-section .analysis-result .key-factors-section .reasoning-text[data-v-67e891d2],.polymarket-analysis-modal .result-section .analysis-result .reasoning-section .reasoning-text[data-v-67e891d2]{line-height:1.8;color:rgba(0,0,0,.85);white-space:pre-wrap}.polymarket-analysis-modal .result-section .result-actions[data-v-67e891d2]{margin-top:24px;text-align:right}.polymarket-analysis-modal .loading-section[data-v-67e891d2]{text-align:center;padding:40px 0}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-tabs-bar{border-bottom-color:#2a2a2a}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-tabs-tab{color:#a3a3a3!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-tabs-tab-active{color:#d4d4d4!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-tabs-ink-bar{background:#58a6ff!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-divider{color:#d4d4d4;border-top-color:#2a2a2a}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-divider-inner-text{color:#d4d4d4!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-input,.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-input-affix-wrapper,.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-input-number,.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-input-textarea textarea{background:#141414!important;border-color:#2a2a2a!important;color:#d4d4d4!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-table{background:#1c1c1c;color:#d4d4d4}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-table-thead>tr>th{background:#252525;color:#d4d4d4;border-bottom-color:#2a2a2a}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-table-tbody>tr>td{background:#1c1c1c;color:#d4d4d4;border-bottom-color:#2a2a2a}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-btn-link{color:#58a6ff!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-alert{background:#1c1c1c;border-color:#2a2a2a}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-alert-message{color:#d4d4d4!important}.polymarket-analysis-modal.theme-dark[data-v-67e891d2] .ant-alert-description{color:#a3a3a3!important}.polymarket-analysis-modal.theme-dark .market-info h3[data-v-67e891d2]{color:#d4d4d4}.polymarket-analysis-modal.theme-dark .market-info .market-meta .meta-item[data-v-67e891d2]{color:#a3a3a3}.polymarket-analysis-modal.theme-dark .analysis-result .probability-comparison .prob-item[data-v-67e891d2]{background:#252525;border:1px solid #2a2a2a}.polymarket-analysis-modal.theme-dark .analysis-result .probability-comparison .prob-item .prob-label[data-v-67e891d2]{color:#a3a3a3}.polymarket-analysis-modal.theme-dark .analysis-result .probability-comparison .prob-item .prob-value[data-v-67e891d2]{color:#e5e5e5}.polymarket-analysis-modal.theme-dark .analysis-result .probability-comparison .prob-item .prob-value.divergence-neutral[data-v-67e891d2]{color:#b3b3b3}.polymarket-analysis-modal.theme-dark .analysis-result .recommendation-section .rec-card[data-v-67e891d2]{background:#252525;border:1px solid #2a2a2a}.polymarket-analysis-modal.theme-dark .analysis-result .recommendation-section .rec-card .rec-label[data-v-67e891d2]{color:#a3a3a3}.polymarket-analysis-modal.theme-dark .analysis-result .recommendation-section .rec-card .rec-value[data-v-67e891d2]{color:#e5e5e5}.polymarket-analysis-modal.theme-dark .analysis-result .key-factors-section .reasoning-text[data-v-67e891d2],.polymarket-analysis-modal.theme-dark .analysis-result .key-factors-section h4[data-v-67e891d2],.polymarket-analysis-modal.theme-dark .analysis-result .reasoning-section .reasoning-text[data-v-67e891d2],.polymarket-analysis-modal.theme-dark .analysis-result .reasoning-section h4[data-v-67e891d2]{color:#d4d4d4}.ai-asset-analysis-page[data-v-0d0a10d6]{padding:20px;min-height:calc(100vh - 120px);background:#f0f2f5;width:100%;max-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;overflow-x:hidden}.ai-asset-analysis-page .radar-section[data-v-0d0a10d6]{margin-bottom:20px}.ai-asset-analysis-page .radar-section .radar-header[data-v-0d0a10d6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:14px}.ai-asset-analysis-page .radar-section .radar-header .radar-header-left .radar-title[data-v-0d0a10d6]{margin:0;font-size:16px;font-weight:700;color:#1a1a1a;letter-spacing:-.2px}.ai-asset-analysis-page .radar-section .radar-header .radar-header-left .radar-subtitle[data-v-0d0a10d6]{margin:2px 0 0;font-size:12px;color:#999}.ai-asset-analysis-page .radar-section .radar-header .radar-refresh-btn[data-v-0d0a10d6]{border-radius:8px;border:1px solid #e0e0e0;background:#fff;color:#666;font-size:12px;font-weight:500}.ai-asset-analysis-page .radar-section .radar-header .radar-refresh-btn[data-v-0d0a10d6]:hover{border-color:#6366f1;color:#6366f1}.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]{overflow:hidden;position:relative;border-radius:12px;padding:2px 0}.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]:after,.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]:before{content:"";position:absolute;top:0;bottom:0;width:50px;z-index:2;pointer-events:none}.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]:before{left:0;background:-webkit-gradient(linear,left top,right top,from(#f0f2f5),to(transparent));background:linear-gradient(90deg,#f0f2f5,transparent)}.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]:after{right:0;background:-webkit-gradient(linear,right top,left top,from(#f0f2f5),to(transparent));background:linear-gradient(270deg,#f0f2f5,transparent)}.ai-asset-analysis-page .radar-section .radar-track[data-v-0d0a10d6]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px;-webkit-animation:radar-scroll-0d0a10d6 60s linear infinite;animation:radar-scroll-0d0a10d6 60s linear infinite;width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:4px 0}.ai-asset-analysis-page .radar-section .radar-track.paused[data-v-0d0a10d6]{-webkit-animation-play-state:paused;animation-play-state:paused}@-webkit-keyframes radar-scroll-0d0a10d6{0%{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(-50%);transform:translateX(-50%)}}@keyframes radar-scroll-0d0a10d6{0%{-webkit-transform:translateX(0);transform:translateX(0)}to{-webkit-transform:translateX(-50%);transform:translateX(-50%)}}.ai-asset-analysis-page .radar-section .radar-card[data-v-0d0a10d6]{width:250px;background:#fff;border-radius:12px;padding:16px;cursor:pointer;-ms-flex-negative:0;flex-shrink:0;border:1px solid #eaeaea;-webkit-transition:all .25s cubic-bezier(.4,0,.2,1);transition:all .25s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden}.ai-asset-analysis-page .radar-section .radar-card[data-v-0d0a10d6]:before{content:"";position:absolute;inset:0;border-radius:12px;opacity:0;-webkit-transition:opacity .3s;transition:opacity .3s;background:linear-gradient(135deg,rgba(99,102,241,.04),rgba(139,92,246,.02))}.ai-asset-analysis-page .radar-section .radar-card[data-v-0d0a10d6]:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px);border-color:rgba(99,102,241,.3);-webkit-box-shadow:0 6px 24px rgba(0,0,0,.08),0 0 0 1px rgba(99,102,241,.1);box-shadow:0 6px 24px rgba(0,0,0,.08),0 0 0 1px rgba(99,102,241,.1)}.ai-asset-analysis-page .radar-section .radar-card[data-v-0d0a10d6]:hover:before{opacity:1}.ai-asset-analysis-page .radar-section .radar-card.is-prediction[data-v-0d0a10d6]{width:290px}.ai-asset-analysis-page .radar-section .radar-card .rc-head[data-v-0d0a10d6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:12px;gap:8px}.ai-asset-analysis-page .radar-section .radar-card .rc-symbol[data-v-0d0a10d6]{font-weight:800;font-size:15px;color:#111;letter-spacing:-.2px}.ai-asset-analysis-page .radar-section .radar-card .rc-symbol.rc-prediction-title[data-v-0d0a10d6]{font-size:13px;font-weight:600;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.ai-asset-analysis-page .radar-section .radar-card .rc-market[data-v-0d0a10d6]{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;padding:2px 7px;border-radius:5px;-ms-flex-negative:0;flex-shrink:0;background:#f5f5f5;color:#888}.ai-asset-analysis-page .radar-section .radar-card .rc-market.rc-market-crypto[data-v-0d0a10d6]{color:#7c3aed;background:rgba(124,58,237,.08)}.ai-asset-analysis-page .radar-section .radar-card .rc-market.rc-market-usstock[data-v-0d0a10d6]{color:#16a34a;background:rgba(22,163,74,.08)}.ai-asset-analysis-page .radar-section .radar-card .rc-market.rc-market-forex[data-v-0d0a10d6]{color:#d97706;background:rgba(217,119,6,.08)}.ai-asset-analysis-page .radar-section .radar-card .rc-market.rc-market-predictionmarket[data-v-0d0a10d6]{color:#0891b2;background:rgba(8,145,178,.08)}.ai-asset-analysis-page .radar-section .radar-card .rc-metrics[data-v-0d0a10d6]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:4px;margin-bottom:12px}.ai-asset-analysis-page .radar-section .radar-card .rc-metric[data-v-0d0a10d6]{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:3px;padding:7px;border-radius:8px;background:#fafafa}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-label[data-v-0d0a10d6]{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.4px;color:#999}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value[data-v-0d0a10d6]{font-size:13px;font-weight:700;color:#222}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-up[data-v-0d0a10d6]{color:#16a34a}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-down[data-v-0d0a10d6]{color:#dc2626}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-val[data-v-0d0a10d6]{font-size:11px;font-weight:600}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-bullish_momentum[data-v-0d0a10d6]{color:#0891b2}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-overbought[data-v-0d0a10d6]{color:#d97706}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-oversold[data-v-0d0a10d6]{color:#16a34a}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-bearish_momentum[data-v-0d0a10d6]{color:#dc2626}.ai-asset-analysis-page .radar-section .radar-card .rc-footer[data-v-0d0a10d6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:8px}.ai-asset-analysis-page .radar-section .radar-card .rc-reason[data-v-0d0a10d6]{font-size:11px;color:#999;line-height:1.4;-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.ai-asset-analysis-page .radar-section .radar-card .rc-cta[data-v-0d0a10d6]{font-size:11px;font-weight:700;color:#fff;background:linear-gradient(135deg,#6366f1,#8b5cf6);padding:4px 12px;border-radius:8px;white-space:nowrap;cursor:pointer;-webkit-transition:all .2s;transition:all .2s;-ms-flex-negative:0;flex-shrink:0}.ai-asset-analysis-page .radar-section .radar-card .rc-cta[data-v-0d0a10d6]:hover{-webkit-transform:scale(1.05);transform:scale(1.05);-webkit-box-shadow:0 2px 12px rgba(99,102,241,.35);box-shadow:0 2px 12px rgba(99,102,241,.35)}.ai-asset-analysis-page .qt-floating-btn[data-v-0d0a10d6]{position:fixed;right:24px;bottom:80px;width:48px;height:48px;border-radius:14px;background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;font-size:22px;cursor:pointer;-webkit-box-shadow:0 4px 20px rgba(99,102,241,.35);box-shadow:0 4px 20px rgba(99,102,241,.35);z-index:1000;-webkit-transition:all .3s;transition:all .3s;-webkit-animation:qt-float-pulse-0d0a10d6 2.5s ease-in-out infinite;animation:qt-float-pulse-0d0a10d6 2.5s ease-in-out infinite}.ai-asset-analysis-page .qt-floating-btn[data-v-0d0a10d6]:hover{-webkit-transform:scale(1.08);transform:scale(1.08);-webkit-box-shadow:0 6px 28px rgba(99,102,241,.5);box-shadow:0 6px 28px rgba(99,102,241,.5)}@-webkit-keyframes qt-float-pulse-0d0a10d6{0%,to{-webkit-transform:translateY(0);transform:translateY(0)}50%{-webkit-transform:translateY(-4px);transform:translateY(-4px)}}@keyframes qt-float-pulse-0d0a10d6{0%,to{-webkit-transform:translateY(0);transform:translateY(0)}50%{-webkit-transform:translateY(-4px);transform:translateY(-4px)}}.ai-asset-analysis-page .workspace-card[data-v-0d0a10d6]{border-radius:14px;-webkit-box-shadow:0 1px 4px rgba(0,0,0,.06);box-shadow:0 1px 4px rgba(0,0,0,.06);border:1px solid #e8e8e8}.ai-asset-analysis-page .workspace-card[data-v-0d0a10d6] .ant-card-body{padding:0}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-bar{margin-bottom:0;padding:0 20px;border-bottom:1px solid #f0f0f0}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-tab{font-size:15px;font-weight:600;padding:14px 16px}.ai-asset-analysis-page .workspace-card .tab-body[data-v-0d0a10d6] .ai-analysis-container.embedded,.ai-asset-analysis-page .workspace-card .tab-body[data-v-0d0a10d6] .portfolio-container.embedded{border-radius:0;overflow:hidden}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content[data-v-0d0a10d6]{padding:40px 20px;text-align:center}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content .polymarket-placeholder .placeholder-icon[data-v-0d0a10d6]{font-size:64px;color:#6366f1;margin-bottom:24px}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content .polymarket-placeholder h3[data-v-0d0a10d6]{font-size:20px;font-weight:700;margin-bottom:12px;color:rgba(0,0,0,.85)}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content .polymarket-placeholder p[data-v-0d0a10d6]{font-size:14px;color:rgba(0,0,0,.55);margin-bottom:24px}.ai-asset-analysis-page.theme-dark[data-v-0d0a10d6]{background:#141414}.ai-asset-analysis-page.theme-dark .radar-section .radar-header .radar-title[data-v-0d0a10d6]{color:#e8e8e8}.ai-asset-analysis-page.theme-dark .radar-section .radar-header .radar-subtitle[data-v-0d0a10d6]{color:#666}.ai-asset-analysis-page.theme-dark .radar-section .radar-refresh-btn[data-v-0d0a10d6]{background:#1c1c1c;border-color:#2a2a2a;color:#999}.ai-asset-analysis-page.theme-dark .radar-section .radar-refresh-btn[data-v-0d0a10d6]:hover{border-color:#6366f1;color:#a78bfa}.ai-asset-analysis-page.theme-dark .radar-section .radar-carousel[data-v-0d0a10d6]:before{background:-webkit-gradient(linear,left top,right top,from(#141414),to(transparent));background:linear-gradient(90deg,#141414,transparent)}.ai-asset-analysis-page.theme-dark .radar-section .radar-carousel[data-v-0d0a10d6]:after{background:-webkit-gradient(linear,right top,left top,from(#141414),to(transparent));background:linear-gradient(270deg,#141414,transparent)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card[data-v-0d0a10d6]{background:#1a1a1c;border-color:hsla(0,0%,100%,.06)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card[data-v-0d0a10d6]:before{background:linear-gradient(135deg,rgba(99,102,241,.06),rgba(139,92,246,.03))}.ai-asset-analysis-page.theme-dark .radar-section .radar-card[data-v-0d0a10d6]:hover{border-color:rgba(99,102,241,.25);-webkit-box-shadow:0 8px 32px rgba(0,0,0,.4),0 0 0 1px rgba(99,102,241,.15);box-shadow:0 8px 32px rgba(0,0,0,.4),0 0 0 1px rgba(99,102,241,.15)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-symbol[data-v-0d0a10d6]{color:#f0f0f0}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-market[data-v-0d0a10d6]{background:hsla(0,0%,100%,.06);color:#888}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-market.rc-market-crypto[data-v-0d0a10d6]{color:#a78bfa;background:rgba(167,139,250,.12)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-market.rc-market-usstock[data-v-0d0a10d6]{color:#4ade80;background:rgba(74,222,128,.1)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-market.rc-market-forex[data-v-0d0a10d6]{color:#fbbf24;background:rgba(251,191,36,.1)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-market.rc-market-predictionmarket[data-v-0d0a10d6]{color:#22d3ee;background:rgba(34,211,238,.1)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric[data-v-0d0a10d6]{background:hsla(0,0%,100%,.03)}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-label[data-v-0d0a10d6]{color:#666}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value[data-v-0d0a10d6]{color:#ddd}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value.rc-up[data-v-0d0a10d6]{color:#4ade80}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value.rc-down[data-v-0d0a10d6]{color:#f87171}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-bullish_momentum[data-v-0d0a10d6]{color:#22d3ee}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-overbought[data-v-0d0a10d6]{color:#fbbf24}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-oversold[data-v-0d0a10d6]{color:#4ade80}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-metric .rc-metric-value.rc-signal-bearish_momentum[data-v-0d0a10d6]{color:#f87171}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-reason[data-v-0d0a10d6]{color:#555}.ai-asset-analysis-page.theme-dark .radar-section .radar-card .rc-cta[data-v-0d0a10d6]{color:#fff}.ai-asset-analysis-page.theme-dark .workspace-card[data-v-0d0a10d6]{background:#1c1c1c;border-color:#2a2a2a}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-bar{border-bottom-color:#2a2a2a}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-tab{color:#8b949e}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-tab:hover{color:#c9d1d9}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-tab-active{color:#a78bfa}.ai-asset-analysis-page.theme-dark .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-ink-bar{background-color:#a78bfa}.ai-asset-analysis-page.theme-dark .workspace-card .polymarket-tab-content .polymarket-placeholder h3[data-v-0d0a10d6]{color:#d4d4d4}.ai-asset-analysis-page.theme-dark .workspace-card .polymarket-tab-content .polymarket-placeholder p[data-v-0d0a10d6]{color:#a3a3a3}@media (max-width:768px){.ai-asset-analysis-page[data-v-0d0a10d6]{padding:8px;min-height:auto}.ai-asset-analysis-page .radar-section[data-v-0d0a10d6]{margin-bottom:10px}.ai-asset-analysis-page .radar-section .radar-header[data-v-0d0a10d6]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;gap:8px}.ai-asset-analysis-page .radar-section .radar-header .radar-header-left .radar-title[data-v-0d0a10d6]{font-size:15px}.ai-asset-analysis-page .radar-section .radar-header .radar-header-left .radar-subtitle[data-v-0d0a10d6]{font-size:11px}.ai-asset-analysis-page .radar-section .radar-header .radar-refresh-btn[data-v-0d0a10d6]{-ms-flex-item-align:end;align-self:flex-end}.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]:after,.ai-asset-analysis-page .radar-section .radar-carousel[data-v-0d0a10d6]:before{width:28px}.ai-asset-analysis-page .radar-section .radar-card[data-v-0d0a10d6]{width:210px;padding:12px}.ai-asset-analysis-page .radar-section .radar-card.is-prediction[data-v-0d0a10d6]{width:248px}.ai-asset-analysis-page .radar-section .radar-card .rc-symbol[data-v-0d0a10d6]{font-size:14px}.ai-asset-analysis-page .radar-section .radar-card .rc-metric[data-v-0d0a10d6]{padding:6px}.ai-asset-analysis-page .qt-floating-btn[data-v-0d0a10d6]{right:max(8px,env(safe-area-inset-right,0px));bottom:max(68px,calc(52px + env(safe-area-inset-bottom, 0px)));width:44px;height:44px;font-size:20px}.ai-asset-analysis-page .workspace-card[data-v-0d0a10d6]{border-radius:10px}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-bar{padding:0 6px}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-nav-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-tab{font-size:14px;padding:10px 8px;margin-right:2px;white-space:nowrap}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content[data-v-0d0a10d6]{padding:16px 8px}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content .polymarket-placeholder .placeholder-icon[data-v-0d0a10d6]{font-size:48px;margin-bottom:12px}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content .polymarket-placeholder h3[data-v-0d0a10d6]{font-size:17px}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content .polymarket-placeholder p[data-v-0d0a10d6]{font-size:13px}}@media (max-width:480px){.ai-asset-analysis-page[data-v-0d0a10d6]{padding:4px}.ai-asset-analysis-page .radar-section .radar-card[data-v-0d0a10d6]{width:188px;padding:10px}.ai-asset-analysis-page .radar-section .radar-card.is-prediction[data-v-0d0a10d6]{width:220px}.ai-asset-analysis-page .radar-section .radar-card .rc-metrics[data-v-0d0a10d6]{gap:3px}.ai-asset-analysis-page .radar-section .radar-card .rc-metric .rc-metric-value[data-v-0d0a10d6]{font-size:12px}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-bar{padding:0 4px}.ai-asset-analysis-page .workspace-card .workspace-tabs[data-v-0d0a10d6] .ant-tabs-tab{font-size:13px;padding:8px 6px}.ai-asset-analysis-page .workspace-card .tab-body .polymarket-tab-content[data-v-0d0a10d6]{padding:12px 6px}} \ No newline at end of file diff --git a/frontend/dist/css/843.ec5418ba.css b/frontend/dist/css/843.ec5418ba.css deleted file mode 100644 index 3ea0ab5..0000000 --- a/frontend/dist/css/843.ec5418ba.css +++ /dev/null @@ -1 +0,0 @@ -.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:transparent}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:transparent}.cm-fat-cursor{caret-color:transparent}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative;z-index:0}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none;outline:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-webkit-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}.cm-s-monokai.CodeMirror{background:#272822;color:#f8f8f2}.cm-s-monokai div.CodeMirror-selected{background:#49483e}.cm-s-monokai .CodeMirror-line::selection,.cm-s-monokai .CodeMirror-line>span::selection,.cm-s-monokai .CodeMirror-line>span>span::selection{background:rgba(73,72,62,.99)}.cm-s-monokai .CodeMirror-line::-moz-selection,.cm-s-monokai .CodeMirror-line>span::-moz-selection,.cm-s-monokai .CodeMirror-line>span>span::-moz-selection{background:rgba(73,72,62,.99)}.cm-s-monokai .CodeMirror-gutters{background:#272822;border-right:0}.cm-s-monokai .CodeMirror-guttermarker{color:#fff}.cm-s-monokai .CodeMirror-guttermarker-subtle,.cm-s-monokai .CodeMirror-linenumber{color:#d0d0d0}.cm-s-monokai .CodeMirror-cursor{border-left:1px solid #f8f8f0}.cm-s-monokai span.cm-comment{color:#75715e}.cm-s-monokai span.cm-atom,.cm-s-monokai span.cm-number{color:#ae81ff}.cm-s-monokai span.cm-comment.cm-attribute{color:#97b757}.cm-s-monokai span.cm-comment.cm-def{color:#bc9262}.cm-s-monokai span.cm-comment.cm-tag{color:#bc6283}.cm-s-monokai span.cm-comment.cm-type{color:#5998a6}.cm-s-monokai span.cm-attribute,.cm-s-monokai span.cm-property{color:#a6e22e}.cm-s-monokai span.cm-keyword{color:#f92672}.cm-s-monokai span.cm-builtin{color:#66d9ef}.cm-s-monokai span.cm-string{color:#e6db74}.cm-s-monokai span.cm-variable{color:#f8f8f2}.cm-s-monokai span.cm-variable-2{color:#9effff}.cm-s-monokai span.cm-type,.cm-s-monokai span.cm-variable-3{color:#66d9ef}.cm-s-monokai span.cm-def{color:#fd971f}.cm-s-monokai span.cm-bracket{color:#f8f8f2}.cm-s-monokai span.cm-tag{color:#f92672}.cm-s-monokai span.cm-header,.cm-s-monokai span.cm-link{color:#ae81ff}.cm-s-monokai span.cm-error{background:#f92672;color:#f8f8f0}.cm-s-monokai .CodeMirror-activeline-background{background:#373831}.cm-s-monokai .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.cm-s-eclipse span.cm-meta{color:#ff1717}.cm-s-eclipse span.cm-keyword{line-height:1em;font-weight:700;color:#7f0055}.cm-s-eclipse span.cm-atom{color:#219}.cm-s-eclipse span.cm-number{color:#164}.cm-s-eclipse span.cm-def{color:#00f}.cm-s-eclipse span.cm-variable{color:#000}.cm-s-eclipse span.cm-type,.cm-s-eclipse span.cm-variable-2,.cm-s-eclipse span.cm-variable-3{color:#0000c0}.cm-s-eclipse span.cm-operator,.cm-s-eclipse span.cm-property{color:#000}.cm-s-eclipse span.cm-comment{color:#3f7f5f}.cm-s-eclipse span.cm-string{color:#2a00ff}.cm-s-eclipse span.cm-string-2{color:#f50}.cm-s-eclipse span.cm-qualifier{color:#555}.cm-s-eclipse span.cm-builtin{color:#30a}.cm-s-eclipse span.cm-bracket{color:#cc7}.cm-s-eclipse span.cm-tag{color:#170}.cm-s-eclipse span.cm-attribute{color:#00c}.cm-s-eclipse span.cm-link{color:#219}.cm-s-eclipse span.cm-error{color:red}.cm-s-eclipse .CodeMirror-activeline-background{background:#e8f2ff}.cm-s-eclipse .CodeMirror-matchingbracket{outline:1px solid grey;color:#000!important}[data-v-4fea1865] .ant-modal{top:20px!important}.visual-editor-container[data-v-4fea1865]{border:1px solid #d9d9d9;border-radius:6px;background:#fafafa;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:500px;overflow:hidden}.visual-modules-list[data-v-4fea1865]{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;padding:12px}.empty-visual-state[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:100%;color:#999}.visual-module-card[data-v-4fea1865]{background:#fff;border:1px solid #e8e8e8;border-radius:4px;margin-bottom:12px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.visual-module-card .module-header[data-v-4fea1865]{padding:8px 12px;border-bottom:1px solid #f0f0f0;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;background:#f9f9f9}.visual-module-card .module-header .module-title[data-v-4fea1865],.visual-module-card .module-header[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.visual-module-card .module-header .module-title[data-v-4fea1865]{font-weight:500;gap:8px}.visual-module-card .module-header .remove-icon[data-v-4fea1865]{cursor:pointer;color:#999}.visual-module-card .module-header .remove-icon[data-v-4fea1865]:hover{color:#ff4d4f}.visual-module-card .module-body[data-v-4fea1865]{padding:12px}.visual-module-card .style-config[data-v-4fea1865]{margin-top:12px;padding-top:12px;border-top:1px dashed #f0f0f0}.visual-module-card .style-config .label[data-v-4fea1865]{margin-right:8px;color:#666}.add-module-bar[data-v-4fea1865]{padding:12px;background:#fff;border-top:1px solid #e8e8e8}@media (max-width:768px){.visual-editor-container[data-v-4fea1865]{height:auto;min-height:400px}}.ant-form-item[data-v-4fea1865]{margin-bottom:16px}.editor-content[data-v-4fea1865]{padding:24px;background:#fff;min-height:500px;max-height:82vh;overflow-y:auto}.editor-layout[data-v-4fea1865]{min-height:450px}.code-editor-column[data-v-4fea1865]{height:100%}.code-editor-column[data-v-4fea1865],.code-section[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.code-section[data-v-4fea1865]{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;margin-bottom:16px}.code-section .section-header[data-v-4fea1865]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:12px;padding-bottom:12px;border-bottom:2px solid #f0f0f0}.code-section .section-header .section-title[data-v-4fea1865],.code-section .section-header[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.code-section .section-header .section-title[data-v-4fea1865]{font-weight:600;font-size:14px;color:#262626;gap:8px}.code-section .section-header .section-title[data-v-4fea1865]:before{content:"";display:inline-block;width:4px;height:14px;background:#1890ff;border-radius:2px}.code-section .section-header .section-actions[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.code-section .section-header .section-actions[data-v-4fea1865] .ant-btn-link{color:#1890ff;padding:0 8px}.code-section .section-header .section-actions[data-v-4fea1865] .ant-btn-link:hover{color:#40a9ff}.code-editor-container[data-v-4fea1865]{border:1px solid #d9d9d9;border-radius:6px;overflow:hidden;height:62vh;min-height:520px;max-height:none;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05);box-shadow:inset 0 1px 3px rgba(0,0,0,.05);-webkit-transition:all .3s ease;transition:all .3s ease}.code-editor-container[data-v-4fea1865]:hover{border-color:#40a9ff}.code-editor-container[data-v-4fea1865]:focus-within{border-color:#1890ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2),inset 0 1px 3px rgba(0,0,0,.05);box-shadow:0 0 0 2px rgba(24,144,255,.2),inset 0 1px 3px rgba(0,0,0,.05)}.code-editor-container[data-v-4fea1865] .CodeMirror{-webkit-box-flex:1;-ms-flex:1;flex:1;height:100%;font-family:Courier New,Consolas,Liberation Mono,Menlo,monospace;font-size:13px;line-height:1.6;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;background:#fafafa}.code-editor-container[data-v-4fea1865] .CodeMirror-scroll{-webkit-box-flex:1;-ms-flex:1;flex:1;min-height:100%;max-height:none;overflow-y:auto;overflow-x:auto}.code-editor-container[data-v-4fea1865] .CodeMirror-sizer{min-height:100%!important;padding-left:12px!important}.code-editor-container[data-v-4fea1865] .CodeMirror-gutters{border-right:1px solid #e8e8e8;background:-webkit-gradient(linear,left top,right top,from(#fafafa),to(#f5f5f5));background:linear-gradient(90deg,#fafafa 0,#f5f5f5);width:45px;padding-right:4px}.code-editor-container[data-v-4fea1865] .CodeMirror-linenumber{padding:0 8px 0 4px;min-width:30px;text-align:right;color:#999;font-size:12px}.code-editor-container[data-v-4fea1865] .CodeMirror-lines{padding:12px 8px;background:#fff}.code-editor-container[data-v-4fea1865] .CodeMirror-line{padding-left:0}.code-editor-container[data-v-4fea1865] .CodeMirror-cursor{border-left:2px solid #1890ff}.code-editor-container[data-v-4fea1865] .CodeMirror-selected{background:#e6f7ff}.code-mode-split[data-v-4fea1865]{width:100%}.ai-pane[data-v-4fea1865],.ai-panel[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.ai-panel[data-v-4fea1865]{border:1px solid #e8e8e8;border-radius:6px;background:#fafafa;padding:12px;height:62vh;min-height:520px}.ai-panel-title[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;font-weight:600;margin-bottom:10px;color:#262626}.ai-panel-hint[data-v-4fea1865]{margin-top:10px;color:#8c8c8c;font-size:12px;line-height:1.5}.ai-panel[data-v-4fea1865] textarea.ant-input{-webkit-box-flex:1;-ms-flex:1;flex:1;resize:none}.editor-footer[data-v-4fea1865]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;gap:12px}.editor-footer[data-v-4fea1865] .ant-btn{height:36px;padding:0 20px;font-weight:500;border-radius:4px;-webkit-transition:all .3s ease;transition:all .3s ease}.editor-footer[data-v-4fea1865] .ant-btn:not(.ant-btn-primary):hover{border-color:#40a9ff;color:#40a9ff;-webkit-transform:translateY(-1px);transform:translateY(-1px);-webkit-box-shadow:0 2px 8px rgba(24,144,255,.2);box-shadow:0 2px 8px rgba(24,144,255,.2)}.editor-footer[data-v-4fea1865] .ant-btn.ant-btn-primary{-webkit-box-shadow:0 2px 4px rgba(24,144,255,.3);box-shadow:0 2px 4px rgba(24,144,255,.3)}.editor-footer[data-v-4fea1865] .ant-btn.ant-btn-primary:hover{-webkit-box-shadow:0 4px 12px rgba(24,144,255,.4);box-shadow:0 4px 12px rgba(24,144,255,.4);-webkit-transform:translateY(-1px);transform:translateY(-1px)}@media (max-width:768px){.indicator-editor-modal[data-v-4fea1865] .ant-modal{width:100%!important;max-width:100%!important;margin:0!important;top:0!important;padding-bottom:0!important;max-height:100vh!important}.indicator-editor-modal[data-v-4fea1865] .ant-modal-content{height:100vh!important;max-height:100vh!important;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;border-radius:0!important}.indicator-editor-modal[data-v-4fea1865] .ant-modal-header{-ms-flex-negative:0;flex-shrink:0;padding:16px;border-bottom:1px solid #e8e8e8}.indicator-editor-modal[data-v-4fea1865] .ant-modal-body{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;padding:0!important;min-height:0}.indicator-editor-modal[data-v-4fea1865] .ant-modal-footer{-ms-flex-negative:0;flex-shrink:0;padding:12px 16px;border-top:1px solid #e8e8e8}.editor-content[data-v-4fea1865]{padding:16px!important;min-height:auto!important;max-height:none!important;overflow-y:visible!important}.editor-layout[data-v-4fea1865]{min-height:auto!important}.code-editor-column[data-v-4fea1865]{width:100%!important;margin-bottom:16px}.code-section[data-v-4fea1865]{margin-bottom:16px}.code-section .section-header[data-v-4fea1865]{padding-bottom:8px;margin-bottom:8px}.code-section .section-header .section-title[data-v-4fea1865]{font-size:13px}.code-editor-container[data-v-4fea1865]{height:250px!important}.code-editor-container[data-v-4fea1865],.code-editor-container[data-v-4fea1865] .CodeMirror-scroll{min-height:250px!important;max-height:250px!important}.code-editor-container[data-v-4fea1865] .CodeMirror-sizer{min-height:250px!important}.ai-panel[data-v-4fea1865]{height:auto!important;min-height:auto!important}.editor-footer[data-v-4fea1865]{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;gap:8px;padding:0}.editor-footer[data-v-4fea1865] .ant-btn{width:100%;height:40px;margin:0}}.chart-left[data-v-58f93984]{width:70%!important;-webkit-box-flex:0!important;-ms-flex:0 0 70%!important;flex:0 0 70%!important;position:relative;border-right:1px solid #e8e8e8;background:#fff;-webkit-transition:background-color .3s;transition:background-color .3s;-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch}.chart-left.theme-dark[data-v-58f93984]{background:#141414;border-right-color:#2a2a2a}.chart-wrapper[data-v-58f93984]{width:100%;height:100%;position:relative;background:#fff;-webkit-transition:background-color .3s;transition:background-color .3s;-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch;display:-webkit-box;display:-ms-flexbox;display:flex}.theme-dark .chart-wrapper[data-v-58f93984]{background:#141414}.drawing-toolbar[data-v-58f93984]{-ms-flex-negative:0;flex-shrink:0;width:40px;background:#fff;border-right:1px solid #e8e8e8;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:8px 4px;gap:4px;z-index:10;overflow-y:auto;overflow-x:hidden}.chart-left.theme-dark .drawing-toolbar[data-v-58f93984]{background:#141414;border-right-color:#2a2a2a}.drawing-tool-btn[data-v-58f93984]{width:32px;height:32px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;border-radius:4px;-webkit-transition:all .2s;transition:all .2s;color:#666;font-size:16px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chart-left.theme-dark .drawing-tool-btn[data-v-58f93984]{color:#d1d4dc}.drawing-tool-btn[data-v-58f93984]:hover{background:#f0f2f5;color:#1890ff}.chart-left.theme-dark .drawing-tool-btn[data-v-58f93984]:hover{background:#252525;color:#13c2c2}.drawing-tool-btn.active[data-v-58f93984]{background:#e6f7ff;color:#1890ff;border:1px solid #1890ff}.chart-left.theme-dark .drawing-tool-btn.active[data-v-58f93984]{background:#252525;color:#13c2c2;border-color:#13c2c2}.drawing-toolbar .ant-divider-vertical[data-v-58f93984]{margin:8px 0;height:20px}.indicator-toolbar[data-v-58f93984]{-ms-flex-negative:0;flex-shrink:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;padding:8px 12px;background:#fff;border-bottom:1px solid #e8e8e8;-ms-flex-wrap:wrap;flex-wrap:wrap;z-index:1;position:relative;width:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none}.indicator-toolbar[data-v-58f93984]::-webkit-scrollbar{display:none;width:0;height:0}.chart-content-area[data-v-58f93984]{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-width:0;overflow:hidden}.chart-left.theme-dark .indicator-toolbar[data-v-58f93984]{background:#141414;border-bottom-color:#2a2a2a}.indicator-btn[data-v-58f93984]{padding:4px 12px;font-size:12px;font-weight:600;color:#666;background:#f0f2f5;border:1px solid #e8e8e8;border-radius:4px;cursor:pointer;-webkit-transition:all .2s;transition:all .2s;white-space:nowrap;min-width:40px;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chart-left.theme-dark .indicator-btn[data-v-58f93984]{color:#d1d4dc;background:#252525;border-color:#2a2a2a}.indicator-btn[data-v-58f93984]:hover{color:#1890ff;border-color:#1890ff;background:#f0f8ff}.chart-left.theme-dark .indicator-btn[data-v-58f93984]:hover{color:#13c2c2;border-color:#13c2c2;background:#252525}.indicator-btn.active[data-v-58f93984]{color:#1890ff;background:#fff;border-color:#1890ff;border-width:2px;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.1);box-shadow:0 0 0 2px rgba(24,144,255,.1)}.chart-left.theme-dark .indicator-btn.active[data-v-58f93984]{color:#13c2c2;background:#252525;border-color:#13c2c2;-webkit-box-shadow:0 0 0 2px rgba(19,194,194,.2);box-shadow:0 0 0 2px rgba(19,194,194,.2)}.kline-chart-container[data-v-58f93984]{-webkit-box-flex:1;-ms-flex:1;flex:1;width:100%;min-width:0;background:#fff;-webkit-transition:background-color .3s;transition:background-color .3s;-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch;overflow:hidden}.theme-dark .kline-chart-container[data-v-58f93984]{background:#141414}.chart-overlay[data-v-58f93984]{position:absolute;top:0;left:0;right:0;bottom:0;background:hsla(0,0%,100%,.95);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;z-index:1;backdrop-filter:blur(2px)}.chart-left.theme-dark .chart-overlay[data-v-58f93984]{background:hsla(0,0%,8%,.95)}.error-box[data-v-58f93984]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#333}.initial-hint[data-v-58f93984]{background:hsla(0,0%,100%,.98)}.chart-left.theme-dark .initial-hint[data-v-58f93984]{background:hsla(0,0%,8%,.98)}.hint-box[data-v-58f93984]{text-align:center;color:#666;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;max-width:400px;padding:20px}.pyodide-warning[data-v-58f93984]{background:hsla(0,0%,100%,.98)}.chart-left.theme-dark .pyodide-warning[data-v-58f93984]{background:hsla(0,0%,8%,.98)}.warning-box[data-v-58f93984]{text-align:center;color:#666;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;max-width:500px;padding:20px}.warning-title[data-v-58f93984]{font-size:16px;font-weight:600;color:#faad14;margin-bottom:8px}.warning-desc[data-v-58f93984]{font-size:14px;color:#666;line-height:1.6}.chart-left.theme-dark .warning-box[data-v-58f93984]{color:#d1d4dc}.chart-left.theme-dark .warning-title[data-v-58f93984]{color:#faad14}.chart-left.theme-dark .warning-desc[data-v-58f93984]{color:#868993}.chart-left.theme-dark .hint-box[data-v-58f93984]{color:#d1d4dc}.hint-title[data-v-58f93984]{font-size:18px;font-weight:600;color:#333;margin-bottom:12px}.chart-left.theme-dark .hint-title[data-v-58f93984]{color:#d1d4dc}.hint-desc[data-v-58f93984]{font-size:14px;color:#999;line-height:1.6}.chart-left.theme-dark .hint-desc[data-v-58f93984]{color:#787b86}.history-loading-hint[data-v-58f93984]{position:absolute;left:20px;top:60px;z-index:1000!important;display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;padding:8px 16px;background:hsla(0,0%,100%,.98)!important;border:1px solid #e8e8e8;border-radius:4px;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.15);box-shadow:0 2px 8px rgba(0,0,0,.15);font-size:14px;color:#666!important;backdrop-filter:blur(4px);pointer-events:none;visibility:visible!important;opacity:1!important}.chart-left.theme-dark .history-loading-hint[data-v-58f93984]{background:hsla(0,0%,8%,.98)!important;border-color:#2a2a2a;color:#d1d4dc!important}.loading-text[data-v-58f93984]{white-space:nowrap;margin-left:4px}@media (max-width:768px){.drawing-toolbar[data-v-58f93984]{display:none}.indicator-toolbar[data-v-58f93984]{padding-left:12px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch}.indicator-toolbar[data-v-58f93984]::-webkit-scrollbar{display:none;width:0;height:0}.indicator-btn[data-v-58f93984]{-ms-flex-negative:0;flex-shrink:0}}@media (max-width:1200px){.drawing-toolbar[data-v-58f93984]{display:none}.indicator-toolbar[data-v-58f93984]{padding-left:12px}.kline-chart-container[data-v-58f93984]{margin-left:0}.chart-left[data-v-58f93984]{width:100%!important;min-width:100%!important;border-right:none;border-bottom:1px solid #e8e8e8;height:600px!important;min-height:600px!important}.chart-wrapper[data-v-58f93984],.kline-chart-container[data-v-58f93984]{height:100%!important;min-height:600px!important}}@media (max-width:992px){.chart-left[data-v-58f93984]{height:650px!important;min-height:650px!important}.chart-wrapper[data-v-58f93984],.kline-chart-container[data-v-58f93984]{height:100%!important;min-height:650px!important}}@media (max-width:768px){.chart-left[data-v-58f93984]{height:60vh!important;min-height:400px!important;max-height:80vh!important}.chart-wrapper[data-v-58f93984]{height:100%!important;min-height:400px!important;max-height:100%!important}.kline-chart-container[data-v-58f93984]{height:calc(100% - 45px)!important;min-height:350px!important;max-height:calc(100% - 45px)!important}}@media (max-width:576px){.chart-left[data-v-58f93984]{height:55vh!important;min-height:350px!important;max-height:75vh!important}.chart-wrapper[data-v-58f93984]{height:100%!important;min-height:350px!important;max-height:100%!important}.kline-chart-container[data-v-58f93984]{height:calc(100% - 45px)!important;min-height:300px!important;max-height:calc(100% - 45px)!important}}.quick-trade-drawer[data-v-989be352] .ant-drawer-body{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%;overflow-y:auto}.qt-header[data-v-989be352]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid #f0f0f0}.qt-header .qt-header-left[data-v-989be352],.qt-header[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-header .qt-header-left[data-v-989be352]{gap:8px}.qt-header .qt-header-left .qt-icon[data-v-989be352]{font-size:20px;color:#1890ff}.qt-header .qt-header-left .qt-header-title[data-v-989be352]{font-size:16px;font-weight:600}.qt-header .qt-close[data-v-989be352]{font-size:16px;cursor:pointer;color:#999}.qt-header .qt-close[data-v-989be352]:hover{color:#333}.qt-symbol-bar[data-v-989be352]{padding:12px 20px;background:linear-gradient(135deg,#f6f8fc,#eef2f8);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:8px}.qt-symbol-bar .qt-symbol-selector[data-v-989be352],.qt-symbol-bar .qt-symbol-selector[data-v-989be352] .ant-select{width:100%}.qt-symbol-bar .qt-symbol-selector[data-v-989be352] .ant-select-selection{border-radius:6px;border:1px solid #d9d9d9}.qt-symbol-bar .qt-price-display[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.qt-symbol-bar .qt-price-display .qt-current-price[data-v-989be352]{font-size:16px;font-weight:600;color:#333}.qt-symbol-option[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.qt-symbol-option .qt-symbol-option-name[data-v-989be352]{font-weight:600;font-size:14px}.qt-symbol-option .qt-symbol-option-desc[data-v-989be352]{color:#999;font-size:12px}.qt-section[data-v-989be352]{padding:8px 20px}.qt-section .qt-label[data-v-989be352]{font-size:12px;color:#999;margin-bottom:4px;font-weight:500}.qt-section .qt-crypto-hint[data-v-989be352]{font-size:10px;color:#faad14;background:rgba(250,173,20,.1);padding:1px 6px;border-radius:4px;margin-left:4px}.qt-balance[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;margin-top:6px;font-size:12px}.qt-balance .qt-balance-label[data-v-989be352]{color:#999}.qt-balance .qt-balance-value[data-v-989be352]{color:#52c41a;font-weight:600}.qt-manage-link[data-v-989be352]{margin-top:6px;font-size:12px}.qt-direction-toggle[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px}.qt-direction-toggle .qt-dir-btn[data-v-989be352]{-webkit-box-flex:1;-ms-flex:1;flex:1;padding:10px;text-align:center;border-radius:8px;font-weight:600;font-size:14px;cursor:pointer;-webkit-transition:all .2s;transition:all .2s;border:2px solid transparent;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:6px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.qt-direction-toggle .qt-dir-long[data-v-989be352]{color:#52c41a;background:rgba(82,196,26,.06);border-color:rgba(82,196,26,.2)}.qt-direction-toggle .qt-dir-long.active[data-v-989be352]{background:#52c41a;color:#fff;border-color:#52c41a;-webkit-box-shadow:0 4px 12px rgba(82,196,26,.3);box-shadow:0 4px 12px rgba(82,196,26,.3)}.qt-direction-toggle .qt-dir-long[data-v-989be352]:hover:not(.active){border-color:#52c41a}.qt-direction-toggle .qt-dir-short[data-v-989be352]{color:#f5222d;background:rgba(245,34,45,.06);border-color:rgba(245,34,45,.2)}.qt-direction-toggle .qt-dir-short.active[data-v-989be352]{background:#f5222d;color:#fff;border-color:#f5222d;-webkit-box-shadow:0 4px 12px rgba(245,34,45,.3);box-shadow:0 4px 12px rgba(245,34,45,.3)}.qt-direction-toggle .qt-dir-short[data-v-989be352]:hover:not(.active){border-color:#f5222d}.qt-quick-amounts[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:6px;margin-top:6px}.qt-quick-amounts button[data-v-989be352]{-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:12px}.qt-leverage-row[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.qt-tpsl-row[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px}.qt-tpsl-row .qt-tpsl-item[data-v-989be352]{-webkit-box-flex:1;-ms-flex:1;flex:1}.qt-submit-section[data-v-989be352]{padding:12px 20px}.qt-submit-section .qt-submit-btn[data-v-989be352]{height:48px;font-size:16px;font-weight:700;border-radius:8px;letter-spacing:.5px}.qt-submit-section .qt-btn-long[data-v-989be352]{background:#52c41a!important;border-color:#52c41a!important}.qt-submit-section .qt-btn-long[data-v-989be352]:hover{background:#73d13d!important}.qt-submit-section .qt-btn-long[data-v-989be352]:active{background:#389e0d!important}.qt-submit-section .qt-btn-short[data-v-989be352]{background:#f5222d!important;border-color:#f5222d!important}.qt-submit-section .qt-btn-short[data-v-989be352]:hover{background:#ff4d4f!important}.qt-submit-section .qt-btn-short[data-v-989be352]:active{background:#cf1322!important}.qt-position-section[data-v-989be352]{padding:8px 20px 12px}.qt-position-section .qt-section-header[data-v-989be352]{font-size:13px;font-weight:600;color:#666;margin-bottom:8px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.qt-history-section[data-v-989be352]{padding:8px 20px 12px}.qt-history-section[data-v-989be352] .ant-collapse{background:transparent;border:none}.qt-history-section[data-v-989be352] .ant-collapse-item{border:none}.qt-history-section[data-v-989be352] .ant-collapse-header{padding:0!important;cursor:pointer}.qt-history-section[data-v-989be352] .ant-collapse-header:hover{opacity:.8}.qt-history-section[data-v-989be352] .ant-collapse-content{border:none;background:transparent}.qt-history-section[data-v-989be352] .ant-collapse-content-box{padding:8px 0 0 0!important}.qt-history-section .qt-section-header[data-v-989be352]{font-size:13px;font-weight:600;color:#666;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.qt-history-section .qt-history-count[data-v-989be352]{font-size:12px;color:#999;font-weight:400}.qt-position-card[data-v-989be352]{background:#fafafa;border-radius:8px;padding:10px 12px;border-left:3px solid #d9d9d9}.qt-position-card.long[data-v-989be352]{border-left-color:#52c41a}.qt-position-card.short[data-v-989be352]{border-left-color:#f5222d}.qt-position-card .qt-pos-row[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;font-size:13px;padding:2px 0}.qt-position-card .qt-pos-row span[data-v-989be352]:first-child{color:#999}.qt-position-empty[data-v-989be352]{background:#fafafa;border-radius:8px;padding:20px 12px;text-align:center;border:1px dashed #d9d9d9}.qt-green[data-v-989be352]{color:#52c41a!important}.qt-red[data-v-989be352]{color:#f5222d!important}.qt-trade-list .qt-trade-item[data-v-989be352]{padding:6px 0;border-bottom:1px solid #f5f5f5}.qt-trade-list .qt-trade-item[data-v-989be352]:last-child{border-bottom:none}.qt-trade-list .qt-trade-item .qt-trade-main[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.qt-trade-list .qt-trade-item .qt-trade-main .qt-trade-symbol[data-v-989be352]{font-weight:600;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-main .qt-trade-amount[data-v-989be352]{margin-left:auto;font-size:13px}.qt-trade-list .qt-trade-item .qt-trade-meta[data-v-989be352]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-top:2px}.qt-trade-list .qt-trade-item .qt-trade-meta .qt-trade-time[data-v-989be352]{font-size:11px;color:#bbb}.theme-dark .qt-header[data-v-989be352]{border-bottom-color:#303030}.theme-dark .qt-header .qt-header-title[data-v-989be352]{color:#e0e0e0}.theme-dark .qt-header .qt-close[data-v-989be352]{color:#666}.theme-dark .qt-header .qt-close[data-v-989be352]:hover{color:#bbb}.theme-dark .qt-symbol-bar[data-v-989be352]{background:linear-gradient(135deg,#1a1f2e,#141824)}.theme-dark .qt-symbol-bar .qt-current-price[data-v-989be352]{color:#e0e0e0}.theme-dark .qt-symbol-bar[data-v-989be352] .ant-select-selection{background:#1a1f2e;border-color:#303030;color:#e0e0e0}.theme-dark .qt-symbol-bar[data-v-989be352] .ant-select-selection__placeholder{color:#666}.theme-dark .qt-symbol-option .qt-symbol-option-name[data-v-989be352]{color:#e0e0e0}.theme-dark .qt-symbol-option .qt-symbol-option-desc[data-v-989be352]{color:#999}.theme-dark .qt-section .qt-label[data-v-989be352]{color:#777}.theme-dark .qt-position-card[data-v-989be352]{background:#1a1f2e}.theme-dark .qt-position-card .qt-pos-row span[data-v-989be352]:first-child{color:#777}.theme-dark .qt-history-section .qt-section-header[data-v-989be352],.theme-dark .qt-position-card .qt-pos-row span[data-v-989be352]:last-child{color:#ccc}.theme-dark .qt-history-section .qt-history-count[data-v-989be352]{color:#888}.theme-dark .qt-history-section[data-v-989be352] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark .qt-history-section[data-v-989be352] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark .qt-history-section[data-v-989be352] .ant-collapse .ant-collapse-header:hover{opacity:.8}.theme-dark .qt-history-section[data-v-989be352] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark .qt-trade-item[data-v-989be352]{border-bottom-color:#2a2a2a!important}.theme-dark .qt-trade-item .qt-trade-symbol[data-v-989be352]{color:#e0e0e0}.theme-dark .qt-trade-item .qt-trade-amount[data-v-989be352]{color:#ccc}.theme-dark[data-v-989be352] .ant-collapse{background:transparent!important;color:#ccc}.theme-dark[data-v-989be352] .ant-collapse .ant-collapse-header{color:#ccc!important}.theme-dark[data-v-989be352] .ant-collapse .ant-collapse-content{background:transparent;color:#ccc}.theme-dark[data-v-989be352] .ant-drawer-content{background:#141414}.theme-dark[data-v-989be352] .ant-input-number,.theme-dark[data-v-989be352] .ant-select-selection{background:#1a1f2e;border-color:#303030;color:#e0e0e0}.theme-dark[data-v-989be352] .ant-radio-group .ant-radio-button-wrapper{background:#1a1f2e;border-color:#303030;color:#ccc}.theme-dark[data-v-989be352] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#1890ff;border-color:#1890ff;color:#fff}.theme-dark[data-v-989be352] .ant-slider-rail{background:#303030}.theme-dark[data-v-989be352] .ant-slider-track{background:#1890ff}.chart-container[data-v-6bd239a6]{background:#f0f2f5;color:#333;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}.chart-container[data-v-6bd239a6],.chart-header[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:100%;min-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.chart-header[data-v-6bd239a6]{max-width:100%;background:#fff;border-bottom:1px solid #e8e8e8;-webkit-box-shadow:0 2px 4px rgba(0,0,0,.02);box-shadow:0 2px 4px rgba(0,0,0,.02)}.header-top[data-v-6bd239a6]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:0 16px;height:60px}.header-left[data-v-6bd239a6],.header-top[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.header-left[data-v-6bd239a6]{gap:20px}.symbol-select[data-v-6bd239a6]{width:220px}.symbol-select[data-v-6bd239a6] .ant-select-selection{background-color:#fff;border:1px solid #e8e8e8;color:#333;border-radius:4px;-webkit-box-shadow:none;box-shadow:none}.symbol-select[data-v-6bd239a6] .ant-select-selection:hover{border-color:#1890ff}.symbol-select[data-v-6bd239a6] .ant-select-focused .ant-select-selection{border-color:#1890ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.2);box-shadow:0 0 0 2px rgba(24,144,255,.2)}.symbol-select[data-v-6bd239a6] .ant-select-arrow,.symbol-select[data-v-6bd239a6] .ant-select-selection__placeholder{color:#999}.timeframe-group[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;background:#f0f2f5;border-radius:4px;padding:2px}.timeframe-item[data-v-6bd239a6]{padding:4px 12px;font-size:13px;font-weight:600;color:#666;cursor:pointer;-webkit-transition:all .2s;transition:all .2s;border-radius:4px}.timeframe-item[data-v-6bd239a6]:hover{color:#1890ff;background:#fff}.timeframe-item.active[data-v-6bd239a6]{color:#1890ff;background:#fff;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.current-symbol[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:24px}.symbol-info[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.symbol-label[data-v-6bd239a6]{font-size:16px;font-weight:700;color:#333;line-height:1.2}.market-tag[data-v-6bd239a6]{font-size:10px;color:#666;background:#f0f2f5;padding:1px 4px;border-radius:2px;margin-top:2px}.price-info[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.price-info.color-up[data-v-6bd239a6]{color:#0ecb81}.price-info.color-down[data-v-6bd239a6]{color:#f6465d}.symbol-price[data-v-6bd239a6]{font-size:18px;font-weight:600;font-family:Roboto Mono,monospace;line-height:1.2}.symbol-change[data-v-6bd239a6]{font-size:12px}.mobile-symbol-price[data-v-6bd239a6]{display:none}.panel-header .theme-switcher[data-v-6bd239a6]{margin-left:auto;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.panel-header .realtime-toggle-btn[data-v-6bd239a6],.panel-header .theme-toggle-btn[data-v-6bd239a6]{color:#666;border:none;padding:4px 8px;-webkit-transition:all .3s;transition:all .3s;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:4px;min-width:32px;height:32px}.panel-header .realtime-toggle-btn[data-v-6bd239a6]:hover,.panel-header .theme-toggle-btn[data-v-6bd239a6]:hover{color:#1890ff;background:#f0f2f5}.panel-header .realtime-toggle-btn.active[data-v-6bd239a6],.panel-header .theme-toggle-btn.active[data-v-6bd239a6]{color:#1890ff;background:#e6f7ff}.panel-header .realtime-toggle-btn .anticon[data-v-6bd239a6],.panel-header .theme-toggle-btn .anticon[data-v-6bd239a6]{font-size:16px}.chart-content[data-v-6bd239a6]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-width:100%;max-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.chart-content[data-v-6bd239a6],.chart-main-row[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;overflow:hidden;width:100%}.chart-main-row[data-v-6bd239a6]{height:80vh!important;min-height:500px!important;max-height:80vh!important;-ms-flex-negative:0;flex-shrink:0}.chart-right[data-v-6bd239a6]{width:30%!important;-webkit-box-flex:0!important;-ms-flex:0 0 30%!important;flex:0 0 30%!important;border-left:1px solid #e8e8e8}.chart-right[data-v-6bd239a6],.indicators-panel[data-v-6bd239a6]{background:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.indicators-panel[data-v-6bd239a6]{height:100%}.panel-header[data-v-6bd239a6]{height:48px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:0 16px;border-bottom:1px solid #e8e8e8;font-weight:600;color:#333;background:#fff}.panel-header .mobile-header-create-btn[data-v-6bd239a6]{margin-right:0}.panel-body[data-v-6bd239a6]{padding:0;overflow:hidden}.indicator-section[data-v-6bd239a6],.panel-body[data-v-6bd239a6]{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.indicator-section[data-v-6bd239a6]{min-height:0;border-bottom:1px solid #e8e8e8}.indicator-section[data-v-6bd239a6]:last-child{border-bottom:none}.indicator-section.section-empty[data-v-6bd239a6]{min-height:200px}.section-label[data-v-6bd239a6]{-ms-flex-negative:0;flex-shrink:0;padding:12px 16px;background:#fafafa;border-bottom:1px solid #e8e8e8;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.section-label .section-label-left[data-v-6bd239a6],.section-label[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.section-label .section-label-left[data-v-6bd239a6]{gap:8px;-webkit-box-flex:1;-ms-flex:1;flex:1}.section-label .section-label-left .collapse-icon[data-v-6bd239a6]{font-size:12px;color:#999;-webkit-transition:-webkit-transform .2s;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s}.section-label .section-label-left span[data-v-6bd239a6]{font-weight:500}.section-label .buy-indicator-btn[data-v-6bd239a6]{padding:0;height:auto;margin-left:8px}.create-indicator-btn[data-v-6bd239a6]{margin-left:auto;margin-right:0}@media (max-width:768px){.create-indicator-btn[data-v-6bd239a6]{display:none!important}}.section-content[data-v-6bd239a6]{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;padding:12px 16px;min-height:0}.indicator-card[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:#fff;padding:10px 12px;border-radius:6px;margin-bottom:8px;cursor:pointer;-webkit-transition:all .2s;transition:all .2s;border:1px solid #e8e8e8}.indicator-card[data-v-6bd239a6]:hover{background:#f0f2f5;border-color:#1890ff;-webkit-transform:translateY(-1px);transform:translateY(-1px);-webkit-box-shadow:0 2px 4px rgba(0,0,0,.05);box-shadow:0 2px 4px rgba(0,0,0,.05)}.indicator-card.active[data-v-6bd239a6]{background:#e6f7ff;border-color:#1890ff}.indicator-card.active .card-name[data-v-6bd239a6]{color:#1890ff}.indicator-card.indicator-active[data-v-6bd239a6]{border-color:#52c41a;border-width:2px;background:#f6ffed}.indicator-card.indicator-active[data-v-6bd239a6]:hover{border-color:#73d13d;-webkit-box-shadow:0 2px 8px rgba(82,196,26,.2);box-shadow:0 2px 8px rgba(82,196,26,.2)}.indicator-card.indicator-active .card-name[data-v-6bd239a6]{color:#52c41a}.indicator-card.disabled[data-v-6bd239a6]{opacity:.5;cursor:not-allowed}.indicator-card.disabled[data-v-6bd239a6]:hover{-webkit-transform:none;transform:none;background:#fff;border-color:#e8e8e8;-webkit-box-shadow:none;box-shadow:none}.card-content[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:100%}.card-header[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:4px}.card-name[data-v-6bd239a6]{font-size:13px;color:#333;font-weight:500;-webkit-box-flex:1;-ms-flex:1;flex:1;margin-right:8px}.card-params[data-v-6bd239a6]{font-size:11px;color:#999;margin-top:2px}.card-desc[data-v-6bd239a6]{font-size:11px;color:#999;margin-top:0;display:-webkit-box;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;line-height:1.4;min-height:1.4em;max-height:2.8em}.card-action[data-v-6bd239a6]{color:#999;font-size:12px}.card-action[data-v-6bd239a6]:hover{color:#1890ff}.card-actions[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:12px;-ms-flex-negative:0;flex-shrink:0}.action-icon[data-v-6bd239a6]{font-size:16px;cursor:pointer;-webkit-transition:all .3s;transition:all .3s;color:#999}.action-icon.edit-icon[data-v-6bd239a6]{color:#1890ff}.action-icon.edit-icon[data-v-6bd239a6]:hover{color:#40a9ff}.action-icon.delete-icon[data-v-6bd239a6]{color:#ff4d4f}.action-icon.delete-icon[data-v-6bd239a6]:hover{color:#ff7875}.action-icon[data-v-6bd239a6]:hover{color:#1890ff}.action-icon.toggle-icon.active[data-v-6bd239a6]{color:#52c41a}.action-icon.backtest-icon[data-v-6bd239a6]{color:#722ed1}.action-icon.backtest-icon[data-v-6bd239a6]:hover{color:#9254de}.action-icon.backtest-history-icon[data-v-6bd239a6]{color:#13c2c2}.action-icon.backtest-history-icon[data-v-6bd239a6]:hover{color:#08979c}.action-icon.publish-icon[data-v-6bd239a6]{color:#1890ff}.action-icon.publish-icon[data-v-6bd239a6]:hover{color:#40a9ff}.action-icon.publish-icon.published[data-v-6bd239a6]{color:#52c41a}.action-icon.publish-icon.published[data-v-6bd239a6]:hover{color:#73d13d}.action-icon.create-strategy-icon[data-v-6bd239a6]{color:#fa8c16}.action-icon.create-strategy-icon[data-v-6bd239a6]:hover{color:#ffa940}.action-icon.status-icon.status-normal[data-v-6bd239a6]{color:#52c41a}.action-icon.status-icon.status-expired[data-v-6bd239a6]{color:#ff4d4f}.action-icon.expiry-icon[data-v-6bd239a6]{color:#1890ff}.empty-indicators[data-v-6bd239a6]{padding:40px 20px;gap:8px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.empty-indicators[data-v-6bd239a6],.loading-indicators[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:#999;font-size:13px}.loading-indicators[data-v-6bd239a6]{padding:20px}.custom-scrollbar[data-v-6bd239a6]{scrollbar-width:none;-ms-overflow-style:none}.custom-scrollbar[data-v-6bd239a6]::-webkit-scrollbar{display:none;width:0;height:0}.dark-dropdown{background-color:#fff;border:1px solid #e8e8e8;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.15);box-shadow:0 2px 8px rgba(0,0,0,.15)}.dark-dropdown .ant-select-dropdown-menu-item{color:#333}.dark-dropdown .ant-select-dropdown-menu-item:hover{background-color:#f0f2f5}.dark-dropdown .ant-select-dropdown-menu-item-active{background-color:#e6f7ff;color:#1890ff}.dark-dropdown .ant-empty-description{color:#999}.symbol-option[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.symbol-option .symbol-name[data-v-6bd239a6]{font-weight:600;color:#8f8d8d;margin-right:8px}.symbol-option .symbol-name-extra[data-v-6bd239a6]{font-size:12px;color:#999;margin-left:4px}.empty-watchlist-hint[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#666;font-size:12px}@media (max-width:768px){.chart-container[data-v-6bd239a6]{padding:0;width:calc(100% + 44px)!important;margin:-22px}.chart-header[data-v-6bd239a6]{padding:12px}.chart-header .header-top[data-v-6bd239a6],.chart-header[data-v-6bd239a6]{gap:12px;height:auto;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.chart-header .header-top[data-v-6bd239a6]{padding:0}.chart-header .header-left[data-v-6bd239a6]{width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px}.chart-header .search-section[data-v-6bd239a6]{width:100%}.chart-header .search-section .symbol-select[data-v-6bd239a6]{width:100%!important}.chart-header .timeframe-group[data-v-6bd239a6]{width:100%;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:4px}.chart-header .timeframe-group .timeframe-item[data-v-6bd239a6]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:calc(14.28% - 4px);text-align:center;padding:6px 8px;font-size:12px}.chart-header .current-symbol[data-v-6bd239a6]{display:none}.chart-content[data-v-6bd239a6]{overflow-y:auto}.chart-content[data-v-6bd239a6],.chart-main-row[data-v-6bd239a6]{-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-ms-flex-direction:column!important;flex-direction:column!important;height:auto!important;min-height:auto!important;max-height:none!important}.mobile-symbol-price[data-v-6bd239a6]{-webkit-box-ordinal-group:1!important;-ms-flex-order:0!important;order:0!important;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:12px 16px;background:#fff;width:100%}.mobile-symbol-price .mobile-price-info[data-v-6bd239a6],.mobile-symbol-price[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mobile-symbol-price .mobile-price-info[data-v-6bd239a6]{gap:12px;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.mobile-symbol-price .mobile-price-info.color-up[data-v-6bd239a6]{color:#0ecb81}.mobile-symbol-price .mobile-price-info.color-down[data-v-6bd239a6]{color:#f6465d}.mobile-symbol-price .mobile-price-info .mobile-symbol-price[data-v-6bd239a6]{font-size:18px;font-weight:600;font-family:Roboto Mono,monospace}.mobile-symbol-price .mobile-price-info .mobile-symbol-change[data-v-6bd239a6]{font-size:14px;font-weight:500}kline-chart[data-v-6bd239a6]{-webkit-box-ordinal-group:2!important;-ms-flex-order:1!important;order:1!important;width:100%!important;-webkit-box-flex:0!important;-ms-flex:0 0 auto!important;flex:0 0 auto!important;display:block!important;margin-bottom:0!important}kline-chart[data-v-6bd239a6] .chart-left{width:100%!important;height:350px!important;min-height:350px!important;max-height:350px!important;border-right:none!important;border-bottom:1px solid #e8e8e8!important}.chart-right[data-v-6bd239a6]{-webkit-box-ordinal-group:3!important;-ms-flex-order:2!important;order:2!important;width:100%!important;min-width:100%!important;max-width:100%!important;-webkit-box-flex:0!important;-ms-flex:0 0 auto!important;flex:0 0 auto!important;height:auto!important;max-height:calc(100vh - 470px)!important;border-left:none!important;border-top:none!important;margin-top:0!important;display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;visibility:visible!important;opacity:1!important}.chart-right .indicators-panel[data-v-6bd239a6]{height:auto!important;min-height:600px!important;max-height:calc(100vh - 410px)!important;overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.chart-right .indicators-panel .panel-header[data-v-6bd239a6]{position:sticky;top:0;background:#fff;z-index:10;border-bottom:1px solid #e8e8e8;padding:12px;font-size:14px;-ms-flex-negative:0;flex-shrink:0}.chart-right .indicators-panel .panel-header .mobile-header-create-btn[data-v-6bd239a6]{margin-right:0;font-size:12px;height:28px;padding:0 12px}.chart-right .indicators-panel .panel-body[data-v-6bd239a6]{padding:0;overflow:visible;min-height:400px!important}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6],.chart-right .indicators-panel .panel-body[data-v-6bd239a6]{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6]{overflow:hidden;min-height:0;height:100%}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-bar{margin-bottom:0;-ms-flex-negative:0;flex-shrink:0;border-bottom:1px solid #e8e8e8}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-tab{color:#666;font-size:14px}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-tab-active{color:#1890ff}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-ink-bar{background-color:#1890ff}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-content{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:auto;min-height:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-tabpane{height:100%;overflow:hidden;display:none;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-height:0}.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-tabpane-active{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-height:0;height:100%;overflow:hidden}.chart-right .indicators-panel .mobile-indicator-tabs .mobile-tab-content[data-v-6bd239a6],.chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-content-holder{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;min-height:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%}.chart-right .indicators-panel .mobile-indicator-tabs .mobile-tab-content[data-v-6bd239a6]{width:100%}.chart-right .indicators-panel .mobile-indicator-tabs .section-content[data-v-6bd239a6]{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto!important;overflow-x:hidden;padding:12px;min-height:0;height:100%;-webkit-overflow-scrolling:touch;position:relative}.chart-right .indicators-panel .mobile-indicator-tabs .mobile-create-btn-wrapper[data-v-6bd239a6],.chart-right .indicators-panel .mobile-indicator-tabs .mobile-create-btn[data-v-6bd239a6]{display:none!important}.chart-right .indicators-panel .indicator-section .section-label[data-v-6bd239a6]{padding:10px 12px;font-size:13px}.chart-right .indicators-panel .section-content[data-v-6bd239a6]{padding:10px 12px}.chart-right .indicators-panel .indicator-card[data-v-6bd239a6]{padding:10px}.chart-right .indicators-panel .indicator-card .card-name[data-v-6bd239a6]{font-size:13px}.chart-right .indicators-panel .indicator-card .card-desc[data-v-6bd239a6],.chart-right .indicators-panel .indicator-card .card-params[data-v-6bd239a6]{font-size:11px}}.qt-header-btn[data-v-6bd239a6]{margin-left:16px;background:linear-gradient(135deg,#1890ff,#722ed1);border:none;color:#fff;border-radius:6px;font-weight:600;font-size:12px;padding:0 12px;height:30px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;-webkit-box-shadow:0 2px 8px rgba(24,144,255,.3);box-shadow:0 2px 8px rgba(24,144,255,.3);-webkit-transition:all .3s;transition:all .3s}.qt-header-btn[data-v-6bd239a6]:focus,.qt-header-btn[data-v-6bd239a6]:hover{background:linear-gradient(135deg,#40a9ff,#9254de);color:#fff;-webkit-box-shadow:0 4px 12px rgba(24,144,255,.45);box-shadow:0 4px 12px rgba(24,144,255,.45);-webkit-transform:translateY(-1px);transform:translateY(-1px)}.qt-floating-btn[data-v-6bd239a6]{position:fixed;right:24px;bottom:80px;width:48px;height:48px;border-radius:50%;background:linear-gradient(135deg,#1890ff,#722ed1);color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;-webkit-box-shadow:0 4px 16px rgba(24,144,255,.4);box-shadow:0 4px 16px rgba(24,144,255,.4);z-index:999;-webkit-transition:all .3s;transition:all .3s;font-size:22px}.qt-floating-btn[data-v-6bd239a6]:hover{-webkit-transform:scale(1.1);transform:scale(1.1);-webkit-box-shadow:0 6px 24px rgba(24,144,255,.55);box-shadow:0 6px 24px rgba(24,144,255,.55)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark[data-v-6bd239a6],body.dark,body.realdark{background:#141414;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-bottom-color:#2a2a2a;-webkit-box-shadow:0 2px 4px rgba(0,0,0,.3);box-shadow:0 2px 4px rgba(0,0,0,.3)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .header-top .current-symbol .symbol-label[data-v-6bd239a6],body.dark,body.realdark{color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .header-top .current-symbol .market-tag[data-v-6bd239a6],body.dark,body.realdark{color:#888;background:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .header-top .current-symbol .price-info.color-up[data-v-6bd239a6],body.dark,body.realdark{color:#0ecb81}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .header-top .current-symbol .price-info.color-down[data-v-6bd239a6],body.dark,body.realdark{color:#f6465d}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .header-top .current-symbol .qt-header-btn[data-v-6bd239a6],body.dark,body.realdark{background:linear-gradient(135deg,#177ddc,#642ab5);-webkit-box-shadow:0 2px 8px rgba(23,125,220,.35);box-shadow:0 2px 8px rgba(23,125,220,.35)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .header-top .current-symbol .qt-header-btn[data-v-6bd239a6]:focus,.chart-container.theme-dark .chart-header .header-top .current-symbol .qt-header-btn[data-v-6bd239a6]:hover,body.dark,body.realdark{background:linear-gradient(135deg,#3c9ae8,#854eca);-webkit-box-shadow:0 4px 12px rgba(23,125,220,.5);box-shadow:0 4px 12px rgba(23,125,220,.5)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .qt-floating-btn[data-v-6bd239a6],body.dark,body.realdark{background:linear-gradient(135deg,#177ddc,#642ab5);-webkit-box-shadow:0 4px 16px rgba(23,125,220,.45);box-shadow:0 4px 16px rgba(23,125,220,.45)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .qt-floating-btn[data-v-6bd239a6]:hover,body.dark,body.realdark{-webkit-box-shadow:0 6px 24px rgba(23,125,220,.6);box-shadow:0 6px 24px rgba(23,125,220,.6)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .symbol-select[data-v-6bd239a6] .ant-select-selection,body.dark,body.realdark{background-color:#1c1c1c;border-color:#2a2a2a;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .symbol-select[data-v-6bd239a6] .ant-select-selection:hover,body.dark,body.realdark{border-color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .symbol-select[data-v-6bd239a6] .ant-select-focused .ant-select-selection,body.dark,body.realdark{border-color:#1890ff;-webkit-box-shadow:0 0 0 2px rgba(24,144,255,.3);box-shadow:0 0 0 2px rgba(24,144,255,.3)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .symbol-select[data-v-6bd239a6] .ant-select-arrow,.chart-container.theme-dark .symbol-select[data-v-6bd239a6] .ant-select-selection__placeholder,body.dark,body.realdark{color:#868993}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .timeframe-group[data-v-6bd239a6],body.dark,body.realdark{background:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .timeframe-group .timeframe-item[data-v-6bd239a6],body.dark,body.realdark{color:#868993}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .timeframe-group .timeframe-item[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#1890ff;background:#1c1c1c}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .timeframe-group .timeframe-item.active[data-v-6bd239a6],body.dark,body.realdark{color:#1890ff;background:#1c1c1c;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.3);box-shadow:0 1px 2px rgba(0,0,0,.3)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-symbol-label[data-v-6bd239a6],body.dark,body.realdark{margin-left:5px;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-market-tag[data-v-6bd239a6],body.dark,body.realdark{color:#888;background:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-price-info.color-up[data-v-6bd239a6],body.dark,body.realdark{color:#0ecb81}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-price-info.color-down[data-v-6bd239a6],body.dark,body.realdark{color:#f6465d}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-left-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .panel-header[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-bottom-color:#2a2a2a;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .panel-header .realtime-toggle-btn[data-v-6bd239a6],body.dark,body.realdark{color:#868993}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .panel-header .realtime-toggle-btn.active[data-v-6bd239a6],.chart-container.theme-dark .chart-right .indicators-panel .panel-header .realtime-toggle-btn[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#1890ff;background:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .panel-body[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-section[data-v-6bd239a6],body.dark,body.realdark{border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .section-label[data-v-6bd239a6],body.dark,body.realdark{color:#868993;background:#2a2a2a;border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .section-label .section-label-left .collapse-icon[data-v-6bd239a6],body.dark,body.realdark{color:#868993}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .section-label .section-label-left span[data-v-6bd239a6],body.dark,body.realdark{color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .section-label .buy-indicator-btn[data-v-6bd239a6],body.dark,body.realdark{color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .section-label .buy-indicator-btn[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#40a9ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card.active[data-v-6bd239a6],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card[data-v-6bd239a6]:hover,body.dark,body.realdark{background:#2a2a2a;border-color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card.active .card-name[data-v-6bd239a6],body.dark,body.realdark{color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card.indicator-active[data-v-6bd239a6],body.dark,body.realdark{border-color:#52c41a;background:#1e3a1e}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card.indicator-active[data-v-6bd239a6]:hover,body.dark,body.realdark{border-color:#73d13d;-webkit-box-shadow:0 2px 8px rgba(82,196,26,.3);box-shadow:0 2px 8px rgba(82,196,26,.3)}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card.indicator-active .card-name[data-v-6bd239a6],body.dark,body.realdark{color:#52c41a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .card-name[data-v-6bd239a6],body.dark,body.realdark{color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon[data-v-6bd239a6],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .card-desc[data-v-6bd239a6],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .card-params[data-v-6bd239a6],body.dark,body.realdark{color:#868993}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.edit-icon[data-v-6bd239a6],.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.edit-icon[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#40a9ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.delete-icon[data-v-6bd239a6],body.dark,body.realdark{color:#ff4d4f}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.delete-icon[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#ff7875}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.backtest-icon[data-v-6bd239a6],body.dark,body.realdark{color:#b37feb}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.backtest-icon[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#d3adf7}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.backtest-history-icon[data-v-6bd239a6],body.dark,body.realdark{color:#5cdbd3}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.backtest-history-icon[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#87e8de}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.publish-icon[data-v-6bd239a6],body.dark,body.realdark{color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.publish-icon[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#40a9ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.publish-icon.published[data-v-6bd239a6],body.dark,body.realdark{color:#52c41a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.publish-icon.published[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#73d13d}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.toggle-icon.active[data-v-6bd239a6],body.dark,body.realdark{color:#52c41a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .empty-indicators[data-v-6bd239a6],body.dark,body.realdark{color:#868993}@media (max-width:768px){.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-header .current-symbol[data-v-6bd239a6],body.dark,body.realdark{border-top-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-left[data-v-6bd239a6],body.dark,body.realdark{border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right[data-v-6bd239a6],body.dark,body.realdark{border-top-color:#2a2a2a;max-height:500px!important}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .panel-header[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-bar,body.dark,body.realdark{border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-tab,body.dark,body.realdark{color:#868993}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-tab-active,body.dark,body.realdark{color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .mobile-indicator-tabs[data-v-6bd239a6] .ant-tabs-ink-bar,body.dark,body.realdark{background-color:#1890ff}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .mobile-indicator-tabs .mobile-create-btn-wrapper[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price[data-v-6bd239a6],body.dark,body.realdark{background:#1c1c1c;border-bottom-color:#2a2a2a}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-symbol-label[data-v-6bd239a6],body.dark,body.realdark{margin-left:5px;color:#d1d4dc}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-market-tag[data-v-6bd239a6],body.dark,body.realdark{color:#868993;background:#2a3932}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-price-info.color-up[data-v-6bd239a6],body.dark,body.realdark{color:#0ecb81}.ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .mobile-symbol-price .mobile-price-info.color-down[data-v-6bd239a6],body.dark,body.realdark{color:#f6465d}}.add-stock-modal-content .market-tabs[data-v-6bd239a6]{margin-bottom:16px}.add-stock-modal-content .hot-symbols-section[data-v-6bd239a6],.add-stock-modal-content .search-results-section[data-v-6bd239a6],.add-stock-modal-content .symbol-search-section[data-v-6bd239a6]{margin-bottom:24px}.add-stock-modal-content .hot-symbols-section .section-title[data-v-6bd239a6],.add-stock-modal-content .search-results-section .section-title[data-v-6bd239a6]{font-size:14px;font-weight:600;color:#262626;margin-bottom:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.add-stock-modal-content .symbol-list[data-v-6bd239a6]{max-height:200px;overflow-y:auto;border:1px solid #e8e8e8;border-radius:4px}.add-stock-modal-content .symbol-list .symbol-list-item[data-v-6bd239a6]{cursor:pointer;padding:8px 12px;-webkit-transition:background-color .3s;transition:background-color .3s}.add-stock-modal-content .symbol-list .symbol-list-item[data-v-6bd239a6]:hover{background-color:#f5f5f5}.add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content .symbol-code[data-v-6bd239a6]{font-weight:600;color:#262626;min-width:80px}.add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content .symbol-name[data-v-6bd239a6]{color:#595959;-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.add-stock-modal-content .selected-symbol-section[data-v-6bd239a6]{margin-top:16px}.add-stock-modal-content .selected-symbol-section .selected-symbol-info[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.chart-container.theme-dark .add-stock-modal-content .hot-symbols-section .section-title[data-v-6bd239a6],.chart-container.theme-dark .add-stock-modal-content .search-results-section .section-title[data-v-6bd239a6],body.dark,body.realdark{color:#d1d4dc}.chart-container.theme-dark .add-stock-modal-content .symbol-list[data-v-6bd239a6],body.dark,body.realdark{border-color:#363c4e;background-color:#2a2a2a}.chart-container.theme-dark .add-stock-modal-content .symbol-list .symbol-list-item[data-v-6bd239a6]:hover,body.dark,body.realdark{background-color:#363c4e}.chart-container.theme-dark .add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content .symbol-code[data-v-6bd239a6],body.dark,body.realdark{color:#d1d4dc}.chart-container.theme-dark .add-stock-modal-content .symbol-list .symbol-list-item .symbol-item-content .symbol-name[data-v-6bd239a6],body.dark,body.realdark{color:#868993}.params-config-modal .indicator-info[data-v-6bd239a6]{text-align:center;margin-bottom:8px}.params-config-modal .indicator-info .indicator-name[data-v-6bd239a6]{font-size:16px;font-weight:600;color:#1f1f1f}.params-config-modal .params-form .param-item[data-v-6bd239a6]{margin-bottom:16px}.params-config-modal .params-form .param-item .param-header[data-v-6bd239a6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:6px}.params-config-modal .params-form .param-item .param-header .param-label[data-v-6bd239a6]{font-weight:500;color:#333}.theme-dark .params-config-modal .indicator-info .indicator-name[data-v-6bd239a6]{color:#e0e0e0}.theme-dark .params-config-modal .params-form .param-item .param-header .param-label[data-v-6bd239a6]{color:#d0d0d0} \ No newline at end of file diff --git a/frontend/dist/css/846.4eddae0f.css b/frontend/dist/css/846.4eddae0f.css deleted file mode 100644 index 66242ba..0000000 --- a/frontend/dist/css/846.4eddae0f.css +++ /dev/null @@ -1 +0,0 @@ -.user-manage-page[data-v-4e5dc5e0]{padding:24px;min-height:calc(100vh - 120px);background:-webkit-gradient(linear,left top,left bottom,from(#f8fafc),to(#f1f5f9));background:linear-gradient(180deg,#f8fafc,#f1f5f9)}.user-manage-page .page-header[data-v-4e5dc5e0]{margin-bottom:24px}.user-manage-page .page-header .page-title[data-v-4e5dc5e0]{font-size:24px;font-weight:700;margin:0 0 8px 0;color:#1e3a5f;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:12px}.user-manage-page .page-header .page-title .anticon[data-v-4e5dc5e0]{font-size:28px;color:#1890ff}.user-manage-page .page-header .page-desc[data-v-4e5dc5e0]{color:#64748b;font-size:14px;margin:0}.user-manage-page .manage-tabs[data-v-4e5dc5e0] .ant-tabs-bar{margin-bottom:20px}.user-manage-page .summary-cards[data-v-4e5dc5e0]{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:20px}.user-manage-page .summary-cards .summary-card[data-v-4e5dc5e0]{background:#fff;border-radius:12px;padding:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:16px;-webkit-box-shadow:0 2px 12px rgba(0,0,0,.06);box-shadow:0 2px 12px rgba(0,0,0,.06);-webkit-transition:-webkit-transform .2s,-webkit-box-shadow .2s;transition:-webkit-transform .2s,-webkit-box-shadow .2s;transition:transform .2s,box-shadow .2s;transition:transform .2s,box-shadow .2s,-webkit-transform .2s,-webkit-box-shadow .2s}.user-manage-page .summary-cards .summary-card[data-v-4e5dc5e0]:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-box-shadow:0 4px 20px rgba(0,0,0,.1);box-shadow:0 4px 20px rgba(0,0,0,.1)}.user-manage-page .summary-cards .summary-card .summary-icon[data-v-4e5dc5e0]{width:48px;height:48px;border-radius:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-ms-flex-negative:0;flex-shrink:0}.user-manage-page .summary-cards .summary-card .summary-icon .anticon[data-v-4e5dc5e0]{font-size:22px;color:#fff}.user-manage-page .summary-cards .summary-card .summary-info[data-v-4e5dc5e0]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.user-manage-page .summary-cards .summary-card .summary-info .summary-value[data-v-4e5dc5e0]{font-size:22px;font-weight:700;color:#1e293b;line-height:1.3}.user-manage-page .summary-cards .summary-card .summary-info .summary-value .roi-badge[data-v-4e5dc5e0]{font-size:13px;font-weight:600;margin-left:6px;padding:1px 6px;border-radius:4px;background:rgba(0,0,0,.04)}.user-manage-page .summary-cards .summary-card .summary-info .summary-sub[data-v-4e5dc5e0]{font-size:12px;color:#64748b;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-manage-page .summary-cards .summary-card .summary-info .summary-label[data-v-4e5dc5e0]{font-size:13px;color:#94a3b8;margin-top:2px}.user-manage-page .toolbar[data-v-4e5dc5e0]{margin-bottom:16px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:12px}.user-manage-page .toolbar .toolbar-left[data-v-4e5dc5e0],.user-manage-page .toolbar .toolbar-right[data-v-4e5dc5e0]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.user-manage-page .toolbar .toolbar-right[data-v-4e5dc5e0]{min-width:0}.user-manage-page .toolbar-search[data-v-4e5dc5e0]{width:280px;max-width:100%}.user-manage-page .toolbar-select[data-v-4e5dc5e0]{width:140px;max-width:100%}.user-manage-page .section-card-title[data-v-4e5dc5e0]{margin-bottom:12px;color:#1e3a5f;font-weight:600;font-size:15px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap;line-height:1.4}.user-manage-page .section-card-title-icon[data-v-4e5dc5e0]{-ms-flex-negative:0;flex-shrink:0}.user-manage-page .user-table-card[data-v-4e5dc5e0]{border-radius:12px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08);min-width:0;overflow:hidden}.user-manage-page .user-table-card[data-v-4e5dc5e0] .ant-card-body{padding:20px 24px}.user-manage-page .user-table-card .text-muted[data-v-4e5dc5e0]{color:#94a3b8}.user-manage-page .text-profit[data-v-4e5dc5e0]{color:#52c41a;font-weight:600}.user-manage-page .text-loss[data-v-4e5dc5e0]{color:#ff4d4f;font-weight:600}.user-manage-page .pnl-value[data-v-4e5dc5e0]{font-size:14px}.user-manage-page .roi-text[data-v-4e5dc5e0]{font-size:12px;margin-left:4px}.user-manage-page .pnl-detail[data-v-4e5dc5e0]{font-size:11px;margin-top:2px}.user-manage-page .symbol-text[data-v-4e5dc5e0]{font-weight:500}.user-manage-page .symbol-count[data-v-4e5dc5e0]{font-size:11px;margin-top:2px}.user-manage-page .status-cell[data-v-4e5dc5e0]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;white-space:nowrap}.user-manage-page .status-cell .status-dot[data-v-4e5dc5e0]{display:inline-block;width:7px;height:7px;border-radius:50%;-ms-flex-negative:0;flex-shrink:0}.user-manage-page .status-cell .status-dot.dot-running[data-v-4e5dc5e0]{background:#52c41a;-webkit-box-shadow:0 0 6px rgba(82,196,26,.5);box-shadow:0 0 6px rgba(82,196,26,.5);-webkit-animation:pulse-green-4e5dc5e0 2s infinite;animation:pulse-green-4e5dc5e0 2s infinite}.user-manage-page .status-cell .status-dot.dot-stopped[data-v-4e5dc5e0]{background:#d9d9d9}.user-manage-page .status-cell .status-running[data-v-4e5dc5e0]{color:#52c41a;font-weight:500;font-size:13px}.user-manage-page .status-cell .status-stopped[data-v-4e5dc5e0]{color:#999;font-size:13px}@-webkit-keyframes pulse-green-4e5dc5e0{0%,to{opacity:1}50%{opacity:.5}}@keyframes pulse-green-4e5dc5e0{0%,to{opacity:1}50%{opacity:.5}}.user-manage-page .user-cell[data-v-4e5dc5e0]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;max-width:100%;overflow:hidden;white-space:nowrap;cursor:default}.user-manage-page .user-cell .user-name[data-v-4e5dc5e0]{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:80px}.user-manage-page .indicator-name[data-v-4e5dc5e0]{color:#722ed1;font-size:12px}.user-manage-page .exchange-name[data-v-4e5dc5e0]{font-size:12px;text-transform:capitalize}.user-manage-page .address-text[data-v-4e5dc5e0],.user-manage-page .hash-text[data-v-4e5dc5e0]{font-family:Roboto Mono,Courier New,monospace;font-size:12px;color:#1890ff;cursor:pointer}.user-manage-page .address-text[data-v-4e5dc5e0]:hover,.user-manage-page .hash-text[data-v-4e5dc5e0]:hover{text-decoration:underline}.user-manage-page[data-v-4e5dc5e0] .ant-tag.ant-tag-grey{background-color:#f5f5f5;border-color:#d9d9d9;color:#595959}.user-manage-page.theme-dark[data-v-4e5dc5e0]{background:-webkit-gradient(linear,left top,left bottom,from(#141414),to(#1c1c1c));background:linear-gradient(180deg,#141414,#1c1c1c)}.user-manage-page.theme-dark .page-header .page-title[data-v-4e5dc5e0]{color:#e0e6ed}.user-manage-page.theme-dark .page-header .page-desc[data-v-4e5dc5e0]{color:#8b949e}.user-manage-page.theme-dark .manage-tabs[data-v-4e5dc5e0] .ant-tabs-bar{border-bottom-color:#2a2a2a}.user-manage-page.theme-dark .manage-tabs[data-v-4e5dc5e0] .ant-tabs-tab{color:#8b949e}.user-manage-page.theme-dark .manage-tabs[data-v-4e5dc5e0] .ant-tabs-tab:hover{color:#c9d1d9}.user-manage-page.theme-dark .manage-tabs[data-v-4e5dc5e0] .ant-tabs-tab-active{color:#1890ff}.user-manage-page.theme-dark .summary-cards .summary-card[data-v-4e5dc5e0]{background:#1c1c1c;-webkit-box-shadow:0 2px 12px rgba(0,0,0,.3);box-shadow:0 2px 12px rgba(0,0,0,.3)}.user-manage-page.theme-dark .summary-cards .summary-card .summary-info .summary-value[data-v-4e5dc5e0]{color:#e0e6ed}.user-manage-page.theme-dark .summary-cards .summary-card .summary-info .summary-value .roi-badge[data-v-4e5dc5e0]{background:hsla(0,0%,100%,.08)}.user-manage-page.theme-dark .summary-cards .summary-card .summary-info .summary-sub[data-v-4e5dc5e0]{color:#8b949e}.user-manage-page.theme-dark .summary-cards .summary-card .summary-info .summary-label[data-v-4e5dc5e0]{color:#6e7681}.user-manage-page.theme-dark .user-table-card[data-v-4e5dc5e0]{background:#1c1c1c;-webkit-box-shadow:0 4px 24px rgba(0,0,0,.25);box-shadow:0 4px 24px rgba(0,0,0,.25)}.user-manage-page.theme-dark .user-table-card[data-v-4e5dc5e0] .ant-card-body{background:#1c1c1c}.user-manage-page.theme-dark .user-table-card[data-v-4e5dc5e0] .ant-table{background:#1c1c1c;color:#c9d1d9}.user-manage-page.theme-dark .user-table-card[data-v-4e5dc5e0] .ant-table .ant-table-thead>tr>th{background:#252525;color:#e0e6ed;border-bottom-color:#2a2a2a}.user-manage-page.theme-dark .user-table-card[data-v-4e5dc5e0] .ant-table .ant-table-tbody>tr>td{border-bottom-color:#2a2a2a}.user-manage-page.theme-dark .user-table-card[data-v-4e5dc5e0] .ant-table .ant-table-tbody>tr:hover>td{background:#252525}.user-manage-page.theme-dark .user-table-card[data-v-4e5dc5e0] .ant-table .ant-table-fixed-left .ant-table-thead>tr>th,.user-manage-page.theme-dark .user-table-card[data-v-4e5dc5e0] .ant-table .ant-table-fixed-right .ant-table-thead>tr>th{background:#252525!important}.user-manage-page.theme-dark .user-table-card[data-v-4e5dc5e0] .ant-table .ant-table-fixed-left .ant-table-tbody>tr>td,.user-manage-page.theme-dark .user-table-card[data-v-4e5dc5e0] .ant-table .ant-table-fixed-right .ant-table-tbody>tr>td{background:#1c1c1c}.user-manage-page.theme-dark .user-table-card[data-v-4e5dc5e0] .ant-table .ant-table-fixed-left .ant-table-tbody>tr:hover>td,.user-manage-page.theme-dark .user-table-card[data-v-4e5dc5e0] .ant-table .ant-table-fixed-right .ant-table-tbody>tr:hover>td{background:#252525}.user-manage-page.theme-dark .user-table-card .text-muted[data-v-4e5dc5e0]{color:#6e7681}.user-manage-page.theme-dark .user-table-card h4[data-v-4e5dc5e0]{color:#e0e6ed!important}.user-manage-page.theme-dark .section-card-title[data-v-4e5dc5e0]{color:#e0e6ed}.user-manage-page .credits-value[data-v-4e5dc5e0]{font-weight:600;color:#722ed1}.user-manage-page .current-credits-info[data-v-4e5dc5e0],.user-manage-page .current-vip-info[data-v-4e5dc5e0]{margin-bottom:16px;padding:12px 16px;background:#f5f5f5;border-radius:8px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:12px}.user-manage-page .current-credits-info .label[data-v-4e5dc5e0],.user-manage-page .current-vip-info .label[data-v-4e5dc5e0]{color:#666}.user-manage-page .current-credits-info .value[data-v-4e5dc5e0],.user-manage-page .current-vip-info .value[data-v-4e5dc5e0]{font-weight:600;color:#1890ff;font-size:18px}.user-manage-page .current-credits-info .value.active[data-v-4e5dc5e0],.user-manage-page .current-vip-info .value.active[data-v-4e5dc5e0]{color:#52c41a}.user-manage-page .current-credits-info .value.expired[data-v-4e5dc5e0],.user-manage-page .current-vip-info .value.expired[data-v-4e5dc5e0]{color:#999}@media (max-width:1200px){.user-manage-page .summary-cards[data-v-4e5dc5e0]{grid-template-columns:repeat(2,1fr)}}@media (max-width:768px){.user-manage-page[data-v-4e5dc5e0]{padding:16px 12px;min-height:calc(100vh - 100px)}.user-manage-page .page-header[data-v-4e5dc5e0]{margin-bottom:16px}.user-manage-page .page-header .page-title[data-v-4e5dc5e0]{font-size:20px}.user-manage-page .page-header .page-title .anticon[data-v-4e5dc5e0]{font-size:22px}.user-manage-page .page-header .page-desc[data-v-4e5dc5e0]{font-size:13px}.user-manage-page .summary-cards[data-v-4e5dc5e0]{grid-template-columns:1fr;gap:12px;margin-bottom:16px}.user-manage-page .summary-cards .summary-card[data-v-4e5dc5e0]{padding:14px 16px;gap:12px}.user-manage-page .summary-cards .summary-card .summary-icon[data-v-4e5dc5e0]{width:44px;height:44px}.user-manage-page .summary-cards .summary-card .summary-icon .anticon[data-v-4e5dc5e0]{font-size:20px}.user-manage-page .summary-cards .summary-card .summary-info .summary-value[data-v-4e5dc5e0]{font-size:18px}.user-manage-page .toolbar[data-v-4e5dc5e0]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.user-manage-page .toolbar .toolbar-left[data-v-4e5dc5e0],.user-manage-page .toolbar .toolbar-right[data-v-4e5dc5e0]{width:100%}.user-manage-page .toolbar-search[data-v-4e5dc5e0],.user-manage-page .toolbar-select[data-v-4e5dc5e0]{width:100%!important}.user-manage-page .manage-tabs[data-v-4e5dc5e0] .ant-tabs-bar{margin-bottom:12px}.user-manage-page .manage-tabs[data-v-4e5dc5e0] .ant-tabs-nav-container{overflow-x:auto;overflow-y:hidden}.user-manage-page .manage-tabs[data-v-4e5dc5e0] .ant-tabs-nav-wrap{margin-bottom:0}.user-manage-page .manage-tabs[data-v-4e5dc5e0] .ant-tabs-tab{padding:10px 12px;margin-right:4px;font-size:13px;white-space:nowrap}.user-manage-page .user-table-card[data-v-4e5dc5e0] .ant-card-body{padding:12px 10px}.user-manage-page[data-v-4e5dc5e0] .ant-table{font-size:12px}.user-manage-page[data-v-4e5dc5e0] .ant-table-tbody>tr>td,.user-manage-page[data-v-4e5dc5e0] .ant-table-thead>tr>th{padding:8px 6px}.user-manage-page[data-v-4e5dc5e0] .ant-pagination{margin:12px 0 0}}@media (max-width:480px){.user-manage-page[data-v-4e5dc5e0]{padding:12px 8px}.user-manage-page .page-header .page-title[data-v-4e5dc5e0]{font-size:18px}.user-manage-page .toolbar .toolbar-left[data-v-4e5dc5e0]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.user-manage-page .toolbar .toolbar-left .ant-btn[data-v-4e5dc5e0]{width:100%}.user-manage-page .summary-cards .summary-card .summary-sub[data-v-4e5dc5e0]{white-space:normal;line-height:1.35}.user-manage-page[data-v-4e5dc5e0] .ant-pagination-options{display:none}}@media (max-width:576px){.user-manage-modal .ant-modal{max-width:calc(100vw - 16px)!important;margin:8px auto;padding-bottom:0;top:8px}.user-manage-modal .ant-modal-content{border-radius:10px}.user-manage-modal .ant-modal-body{max-height:calc(100vh - 180px);overflow-y:auto;padding:16px}.user-manage-modal .ant-modal-header{padding:12px 16px}.user-manage-modal .ant-modal-footer{padding:10px 16px}} \ No newline at end of file diff --git a/frontend/dist/css/878.0eaa2706.css b/frontend/dist/css/878.0eaa2706.css new file mode 100644 index 0000000..fc70000 --- /dev/null +++ b/frontend/dist/css/878.0eaa2706.css @@ -0,0 +1 @@ +.profile-exchange-modal .exchange-account-form .egress-ip-block{width:100%}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px;margin:0 0 16px;padding:12px 14px;border:1px solid rgba(24,144,255,.18);border-radius:10px;background:-webkit-gradient(linear,left top,right top,from(rgba(24,144,255,.06)),to(rgba(82,196,26,.04)));background:linear-gradient(90deg,rgba(24,144,255,.06),rgba(82,196,26,.04))}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:10px;min-width:0}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__icon{width:28px;height:28px;border-radius:50%;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background:rgba(24,144,255,.12);color:#1890ff;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__text{min-width:0}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__title{color:rgba(0,0,0,.85);font-size:13px;font-weight:600;line-height:1.5}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__hint{color:rgba(0,0,0,.55);font-size:12px;line-height:1.5;margin-top:2px}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__action{padding:0;white-space:nowrap;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.profile-exchange-modal .exchange-account-form .egress-ip-row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:6px}.profile-exchange-modal .exchange-account-form .egress-ip-refresh-row{margin-top:4px}.profile-exchange-modal .exchange-account-form .egress-ip-line{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;margin-bottom:10px}.profile-exchange-modal .exchange-account-form .egress-ip-kind{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;min-width:42px;font-size:12px;color:rgba(0,0,0,.55)}.profile-exchange-modal .exchange-account-form .egress-ip-value{-webkit-box-flex:1;-ms-flex:1 1 160px;flex:1 1 160px;min-width:0;font-family:Consolas,ui-monospace,monospace;font-size:12px;padding:6px 10px;border-radius:4px;border:1px solid #d9d9d9;background:#fafafa;color:#262626;word-break:break-all}.profile-exchange-modal .exchange-account-form .exchange-demo-checkbox-label{color:rgba(0,0,0,.85)}.profile-exchange-modal .exchange-account-form .exchange-demo-hint{margin-top:6px}.profile-exchange-modal .exchange-account-form .field-hint{margin-top:6px;font-size:12px;color:rgba(0,0,0,.45);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:6px}.profile-exchange-modal .exchange-account-form .test-result-msg{margin-top:8px;font-size:13px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.profile-exchange-modal .exchange-account-form .test-result-msg.success{color:#52c41a}.profile-exchange-modal .exchange-account-form .test-result-msg.error{color:#f5222d}.profile-exchange-modal--dark .ant-modal-content{background:#1c1c1c;-webkit-box-shadow:0 8px 32px rgba(0,0,0,.45);box-shadow:0 8px 32px rgba(0,0,0,.45)}.profile-exchange-modal--dark .ant-modal-header{background:#1c1c1c;border-bottom:1px solid #2a2a2a}.profile-exchange-modal--dark .ant-modal-title{color:#e0e6ed}.profile-exchange-modal--dark .ant-modal-close{color:#8b949e}.profile-exchange-modal--dark .ant-modal-body,.profile-exchange-modal--dark .ant-modal-close:hover{color:#c9d1d9}.profile-exchange-modal--dark .ant-modal-footer{background:#1c1c1c;border-top:1px solid #2a2a2a}.profile-exchange-modal--dark .exchange-account-form .ant-form-item-label>label{color:#c9d1d9}.profile-exchange-modal--dark .exchange-account-form .ant-form-item-explain,.profile-exchange-modal--dark .exchange-account-form .ant-form-item-extra{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-input,.profile-exchange-modal--dark .exchange-account-form .ant-input-number,.profile-exchange-modal--dark .exchange-account-form .ant-input-number-input,.profile-exchange-modal--dark .exchange-account-form .ant-input-password .ant-input{background:#141414!important;border-color:#2a2a2a!important;color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-input-password-icon{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-input-number-handler-wrap{background:#141414;border-left-color:#2a2a2a}.profile-exchange-modal--dark .exchange-account-form .ant-input-number-handler-down-inner,.profile-exchange-modal--dark .exchange-account-form .ant-input-number-handler-up-inner{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-select-selector{background:#141414!important;border-color:#2a2a2a!important;color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-item,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-placeholder{color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-selection,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection--single{background:#141414!important;border-color:#2a2a2a!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-placeholder,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-selected-value,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection__rendered{color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-arrow{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-checkbox-wrapper,.profile-exchange-modal--dark .exchange-account-form .ant-checkbox-wrapper span{color:#c9d1d9}.profile-exchange-modal--dark .exchange-account-form .exchange-demo-checkbox-label{color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .egress-ip-hint,.profile-exchange-modal--dark .exchange-account-form .exchange-demo-hint{color:#8b949e!important}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout{background:-webkit-gradient(linear,left top,right top,from(rgba(24,144,255,.12)),to(rgba(82,196,26,.08)));background:linear-gradient(90deg,rgba(24,144,255,.12),rgba(82,196,26,.08));border-color:rgba(88,166,255,.26)}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__icon{background:rgba(88,166,255,.16);color:#58a6ff}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__title{color:#e0e6ed}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__hint{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__action{color:#58a6ff}.profile-exchange-modal--dark .exchange-account-form .egress-ip-value{border-color:#2a2a2a!important;background:#141414!important;color:#e0e6ed!important}.profile-exchange-modal--dark .exchange-account-form a.egress-ip-action{color:#58a6ff}.profile-exchange-modal--dark .exchange-account-form .egress-ip-kind{color:#8b949e!important}.profile-exchange-modal--dark .exchange-account-form .ant-alert{background:rgba(250,173,20,.12);border-color:rgba(250,173,20,.45)}.profile-exchange-modal--dark .exchange-account-form .ant-alert-message{color:#ffc53d}.profile-exchange-modal--dark .exchange-account-form .ant-alert-description{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-alert-icon{color:#faad14}.profile-exchange-modal--dark .exchange-account-form .field-hint{color:#8b949e;margin-top:6px;font-size:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:6px}.profile-exchange-modal--dark .exchange-account-form .field-hint .anticon{color:#8b949e;margin-top:2px}.profile-exchange-modal--dark .exchange-account-form .test-result-msg{color:#c9d1d9}.profile-exchange-modal--dark .exchange-account-form .test-result-msg.success{color:#73d13d}.profile-exchange-modal--dark .exchange-account-form .test-result-msg.error{color:#ff7875}.profile-exchange-select-dropdown-dark.ant-select-dropdown{background:#1c1c1c}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item{color:#c9d1d9}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item:hover{background:#2a2a2a}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item-selected{background:#2a2a2a!important;color:#e0e6ed;font-weight:500}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item-group-title{color:#8b949e!important;font-size:12px}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item,.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item-selected{color:#c9d1d9!important}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-empty-description{color:#8b949e}.profile-page[data-v-2151383b]{padding:24px;min-height:calc(100vh - 120px);background:-webkit-gradient(linear,left top,left bottom,from(#f8fafc),to(#f1f5f9));background:linear-gradient(180deg,#f8fafc,#f1f5f9)}.profile-page .page-header[data-v-2151383b]{margin-bottom:24px}.profile-page .page-header .page-title[data-v-2151383b]{font-size:24px;font-weight:700;margin:0 0 8px 0;color:#1e3a5f;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:12px}.profile-page .page-header .page-title .anticon[data-v-2151383b]{font-size:28px;color:#1890ff}.profile-page .page-header .page-desc[data-v-2151383b]{color:#64748b;font-size:14px;margin:0}.profile-page .profile-cards-row[data-v-2151383b]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.profile-page .profile-cards-row .profile-card-col .ant-card[data-v-2151383b],.profile-page .profile-cards-row .profile-card-col[data-v-2151383b],.profile-page .profile-cards-row .right-cards-col .ant-card[data-v-2151383b],.profile-page .profile-cards-row .right-cards-col[data-v-2151383b]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .profile-cards-row .profile-card-col .ant-card[data-v-2151383b],.profile-page .profile-cards-row .right-cards-col .ant-card[data-v-2151383b]{height:100%}.profile-page .profile-cards-row .profile-card-col[data-v-2151383b] .ant-card-body,.profile-page .profile-cards-row .right-cards-col[data-v-2151383b] .ant-card-body{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .profile-cards-row .right-cards-row[data-v-2151383b]{height:100%;display:-webkit-box;display:-ms-flexbox;display:flex}.profile-page .profile-cards-row .right-cards-row .ant-col .ant-card[data-v-2151383b],.profile-page .profile-cards-row .right-cards-row .ant-col[data-v-2151383b]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .profile-cards-row .right-cards-row .ant-col .ant-card[data-v-2151383b]{height:100%}.profile-page .profile-cards-row .right-cards-row .ant-col[data-v-2151383b] .ant-card-body{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .profile-card[data-v-2151383b]{border-radius:12px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08);text-align:center}.profile-page .profile-card .avatar-section[data-v-2151383b]{padding:20px 0}.profile-page .profile-card .avatar-section .ant-avatar[data-v-2151383b]{-webkit-box-shadow:0 4px 12px rgba(0,0,0,.15);box-shadow:0 4px 12px rgba(0,0,0,.15)}.profile-page .profile-card .avatar-section .username[data-v-2151383b]{margin:16px 0 8px;font-size:20px;font-weight:600;color:#1e3a5f}.profile-page .profile-card .avatar-section .user-role[data-v-2151383b]{margin:0}.profile-page .profile-card .profile-info[data-v-2151383b]{text-align:left;-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:distribute;justify-content:space-around}.profile-page .profile-card .profile-info .info-item[data-v-2151383b]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:12px 0;border-bottom:1px solid #f0f0f0}.profile-page .profile-card .profile-info .info-item[data-v-2151383b]:last-child{border-bottom:none}.profile-page .profile-card .profile-info .info-item .anticon[data-v-2151383b]{font-size:16px;color:#1890ff;margin-right:12px}.profile-page .profile-card .profile-info .info-item .label[data-v-2151383b]{color:#64748b;margin-right:8px}.profile-page .profile-card .profile-info .info-item .value[data-v-2151383b]{color:#1e3a5f;font-weight:500}.profile-page .edit-card[data-v-2151383b]{border-radius:12px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08)}.profile-page .edit-card .password-form[data-v-2151383b],.profile-page .edit-card .profile-form[data-v-2151383b]{max-width:500px}.profile-page .edit-card .password-form[data-v-2151383b] .ant-input,.profile-page .edit-card .password-form[data-v-2151383b] .ant-input-password,.profile-page .edit-card .profile-form[data-v-2151383b] .ant-input,.profile-page .edit-card .profile-form[data-v-2151383b] .ant-input-password{border-radius:8px}.profile-page .edit-card .password-form .email-hint[data-v-2151383b],.profile-page .edit-card .profile-form .email-hint[data-v-2151383b]{margin-top:8px;font-size:12px;color:rgba(0,0,0,.45)}.profile-page .edit-card .password-form .email-hint.email-warning[data-v-2151383b],.profile-page .edit-card .profile-form .email-hint.email-warning[data-v-2151383b]{color:#faad14}.profile-page .edit-card .amount-positive[data-v-2151383b]{color:#52c41a;font-weight:600}.profile-page .edit-card .amount-negative[data-v-2151383b]{color:#ff4d4f;font-weight:600}.profile-page .edit-card .notification-settings-form .field-hint[data-v-2151383b]{margin-top:6px;font-size:12px;color:rgba(0,0,0,.45);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px}.profile-page .edit-card .notification-settings-form .field-hint .anticon[data-v-2151383b]{font-size:12px}.profile-page .edit-card .notification-settings-form[data-v-2151383b] .ant-checkbox-group{width:100%}.profile-page .edit-card .notification-settings-form[data-v-2151383b] .ant-checkbox-wrapper{margin-bottom:8px}.profile-page .credits-card[data-v-2151383b]{border-radius:12px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08);background:linear-gradient(135deg,#667eea,#764ba2);color:#fff}.profile-page .credits-card[data-v-2151383b] .ant-card-body{background:transparent;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .credits-card[data-v-2151383b] .ant-divider{border-color:hsla(0,0%,100%,.2)}.profile-page .credits-card .credits-header .credits-title[data-v-2151383b]{font-size:16px;font-weight:600;margin:0;color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.profile-page .credits-card .credits-header .credits-title .anticon[data-v-2151383b]{font-size:18px}.profile-page .credits-card .credits-body[data-v-2151383b]{padding:20px 0;text-align:center;-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.profile-page .credits-card .credits-body .credits-amount .amount-value[data-v-2151383b]{font-size:42px;font-weight:700;color:#fff;text-shadow:0 2px 4px rgba(0,0,0,.2)}.profile-page .credits-card .credits-body .credits-amount .amount-label[data-v-2151383b]{font-size:16px;color:hsla(0,0%,100%,.9);margin-left:8px}.profile-page .credits-card .credits-body .vip-status[data-v-2151383b]{margin-top:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:6px;font-size:13px}.profile-page .credits-card .credits-body .vip-status .vip-active[data-v-2151383b]{color:gold}.profile-page .credits-card .credits-body .vip-status .vip-expired[data-v-2151383b]{color:hsla(0,0%,100%,.6)}.profile-page .credits-card .credits-body .vip-status .no-vip[data-v-2151383b]{color:hsla(0,0%,100%,.7)}.profile-page .credits-card .credits-actions[data-v-2151383b]{text-align:center;margin-top:auto}.profile-page .credits-card .credits-actions .ant-btn[data-v-2151383b]{border-radius:20px;padding:0 24px;height:36px;font-weight:500;background:#fff;color:#667eea;border:none}.profile-page .credits-card .credits-actions .ant-btn[data-v-2151383b]:hover{background:hsla(0,0%,100%,.9);color:#764ba2}.profile-page .credits-card .credits-hint[data-v-2151383b]{margin-top:12px;text-align:center;font-size:12px;color:hsla(0,0%,100%,.7);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:6px}.profile-page .referral-card[data-v-2151383b]{border-radius:12px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08);background:linear-gradient(135deg,#11998e,#38ef7d);color:#fff}.profile-page .referral-card[data-v-2151383b] .ant-card-body{background:transparent;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .referral-card[data-v-2151383b] .ant-divider{border-color:hsla(0,0%,100%,.2)}.profile-page .referral-card .referral-header .referral-title[data-v-2151383b]{font-size:16px;font-weight:600;margin:0;color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.profile-page .referral-card .referral-header .referral-title .anticon[data-v-2151383b]{font-size:18px}.profile-page .referral-card .referral-body[data-v-2151383b]{padding:12px 0;-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.profile-page .referral-card .referral-body .referral-stats[data-v-2151383b]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around}.profile-page .referral-card .referral-body .referral-stats .stat-item[data-v-2151383b]{text-align:center}.profile-page .referral-card .referral-body .referral-stats .stat-item .stat-value[data-v-2151383b]{font-size:28px;font-weight:700;color:#fff;display:block}.profile-page .referral-card .referral-body .referral-stats .stat-item .stat-label[data-v-2151383b]{font-size:12px;color:hsla(0,0%,100%,.8)}.profile-page .referral-card .referral-body .referral-link-section .link-label[data-v-2151383b]{font-size:12px;color:hsla(0,0%,100%,.9);margin-bottom:6px}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-2151383b] .ant-input{background:hsla(0,0%,100%,.2);border:1px solid hsla(0,0%,100%,.3);color:#fff}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-2151383b] .ant-input::-webkit-input-placeholder{color:hsla(0,0%,100%,.6)}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-2151383b] .ant-input::-moz-placeholder{color:hsla(0,0%,100%,.6)}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-2151383b] .ant-input:-ms-input-placeholder{color:hsla(0,0%,100%,.6)}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-2151383b] .ant-input::-ms-input-placeholder{color:hsla(0,0%,100%,.6)}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-2151383b] .ant-input::placeholder{color:hsla(0,0%,100%,.6)}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-2151383b] .anticon-copy{color:#fff}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-2151383b] .anticon-copy:hover{color:gold}.profile-page .referral-card .referral-body .referral-hint[data-v-2151383b]{margin-top:auto;text-align:center;font-size:12px;color:hsla(0,0%,100%,.85);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:6px}.profile-page .referral-card .referral-body .referral-hint .anticon-gift[data-v-2151383b]{color:gold}.profile-page .referral-user-cell[data-v-2151383b]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px}.profile-page .referral-user-cell .user-info[data-v-2151383b]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .referral-user-cell .user-info .nickname[data-v-2151383b]{font-weight:500;color:#333}.profile-page .referral-user-cell .user-info .username[data-v-2151383b]{font-size:12px;color:#999}.profile-page .exchange-config-section .credential-hint[data-v-2151383b]{font-family:SFMono-Regular,Consolas,monospace;font-size:13px;color:#666}.profile-page .test-result-msg[data-v-2151383b]{margin-top:8px;font-size:13px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.profile-page .test-result-msg.success[data-v-2151383b]{color:#52c41a}.profile-page .test-result-msg.error[data-v-2151383b]{color:#f5222d}.profile-page.theme-dark[data-v-2151383b]{background:-webkit-gradient(linear,left top,left bottom,from(#141414),to(#1c1c1c));background:linear-gradient(180deg,#141414,#1c1c1c)}.profile-page.theme-dark .page-header .page-title[data-v-2151383b]{color:#e0e6ed}.profile-page.theme-dark .page-header .page-desc[data-v-2151383b]{color:#8b949e}.profile-page.theme-dark .edit-card[data-v-2151383b],.profile-page.theme-dark .profile-card[data-v-2151383b]{background:#1c1c1c;-webkit-box-shadow:0 4px 24px rgba(0,0,0,.25);box-shadow:0 4px 24px rgba(0,0,0,.25)}.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-card-body,.profile-page.theme-dark .profile-card[data-v-2151383b] .ant-card-body{background:#1c1c1c}.profile-page.theme-dark .profile-card .avatar-section .username[data-v-2151383b]{color:#e0e6ed}.profile-page.theme-dark .profile-card .profile-info .info-item[data-v-2151383b]{border-bottom-color:#2a2a2a}.profile-page.theme-dark .profile-card .profile-info .info-item .label[data-v-2151383b]{color:#8b949e}.profile-page.theme-dark .profile-card .profile-info .info-item .value[data-v-2151383b]{color:#e0e6ed}.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-tabs-bar{border-bottom-color:#2a2a2a}.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-tabs-tab{color:#8b949e}.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-tabs-tab:hover{color:#e0e6ed}.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-tabs-tab-active{color:#1890ff}.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-form-item-label label{color:#c9d1d9}.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-input,.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-input-password{background:#141414;border-color:#2a2a2a;color:#c9d1d9}.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-input-password:focus,.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-input-password:hover,.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-input:focus,.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-input:hover{border-color:#1890ff}.profile-page.theme-dark .credits-card[data-v-2151383b]{background:linear-gradient(135deg,#1c1c1c,#1a1a1a 50%,#141414);-webkit-box-shadow:0 4px 24px rgba(0,0,0,.25);box-shadow:0 4px 24px rgba(0,0,0,.25)}.profile-page.theme-dark .credits-card[data-v-2151383b] .ant-divider{border-color:hsla(0,0%,100%,.1)}.profile-page.theme-dark .credits-card .credits-actions .ant-btn[data-v-2151383b]{background:hsla(0,0%,100%,.15);color:#fff;border:1px solid hsla(0,0%,100%,.2)}.profile-page.theme-dark .credits-card .credits-actions .ant-btn[data-v-2151383b]:hover{background:hsla(0,0%,100%,.25)}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-table{background:#1c1c1c;color:#c9d1d9}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-table-thead>tr>th{background:#2a2a2a;color:#c9d1d9;border-bottom-color:#2a2a2a}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-table-tbody>tr>td{background:#1c1c1c;color:#c9d1d9;border-bottom-color:#2a2a2a}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-table-tbody>tr:hover>td{background:#2a2a2a}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-table-placeholder{background:#1c1c1c;color:#8b949e}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-table-tbody>tr>td,.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-table-tbody>tr>td :not(.ant-tag):not(.ant-btn),.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-table-tbody>tr>td div,.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-table-tbody>tr>td span{color:#c9d1d9}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .amount-positive{color:#52c41a}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .amount-negative{color:#f5222d}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-tag{border-width:1px;font-weight:600}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-tag-red{background:rgba(245,34,45,.25);border-color:#f5222d;color:#ff7875}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-tag-green{background:rgba(82,196,26,.25);border-color:#52c41a;color:#73d13d}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-tag-blue{background:rgba(24,144,255,.25);border-color:#1890ff;color:#69c0ff}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-tag-gold,.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-tag-orange{background:rgba(250,173,20,.25);border-color:#faad14;color:#ffc53d}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-tag-cyan{background:rgba(19,194,194,.25);border-color:#13c2c2;color:#5cdbd3}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-tag-purple{background:rgba(114,46,209,.25);border-color:#722ed1;color:#b37feb}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-tag-volcano{background:rgba(250,84,28,.25);border-color:#fa541c;color:#ff9c6e}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-tag-lime{background:hsla(89,56%,62%,.25);border-color:#a0d911;color:#bae637}.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-tag-default{background:hsla(0,0%,100%,.08);border-color:hsla(0,0%,100%,.2);color:#c9d1d9}.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-form-item-label>label,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-form-item-label>label,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-form-item-label>label{color:#c9d1d9}.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-form-item-explain,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-form-item-extra,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-form-item-explain,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-form-item-extra,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-form-item-explain,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-form-item-extra{color:#8b949e}.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input-number,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input-password,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-select-selector,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input-number,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input-password,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-select-selector,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input-number,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input-password,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-select-selector{background:#141414;border-color:#2a2a2a;color:#c9d1d9}.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input-number::-webkit-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input-password::-webkit-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input::-webkit-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-select-selector::-webkit-input-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input-number::-webkit-input-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input-password::-webkit-input-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input::-webkit-input-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-select-selector::-webkit-input-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input-number::-webkit-input-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input-password::-webkit-input-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input::-webkit-input-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-select-selector::-webkit-input-placeholder{color:#6e7681}.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input-number::-moz-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input-password::-moz-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input::-moz-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-select-selector::-moz-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input-number::-moz-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input-password::-moz-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input::-moz-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-select-selector::-moz-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input-number::-moz-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input-password::-moz-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input::-moz-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-select-selector::-moz-placeholder{color:#6e7681}.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input-number:-ms-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input-password:-ms-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input:-ms-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-select-selector:-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input-number:-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input-password:-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input:-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-select-selector:-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input-number:-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input-password:-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input:-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-select-selector:-ms-input-placeholder{color:#6e7681}.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input-number::-ms-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input-password::-ms-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input::-ms-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-select-selector::-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input-number::-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input-password::-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input::-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-select-selector::-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input-number::-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input-password::-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input::-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-select-selector::-ms-input-placeholder{color:#6e7681}.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input-number::placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input-password::placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-input::placeholder,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-select-selector::placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input-number::placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input-password::placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-input::placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-select-selector::placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input-number::placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input-password::placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-input::placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-select-selector::placeholder{color:#6e7681}.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-checkbox-wrapper,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-checkbox-wrapper span,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-radio-wrapper,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-radio-wrapper span,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-select-selection-item,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-select-selection-placeholder,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-checkbox-wrapper,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-checkbox-wrapper span,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-radio-wrapper,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-radio-wrapper span,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-select-selection-item,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-select-selection-placeholder,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-checkbox-wrapper,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-checkbox-wrapper span,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-radio-wrapper,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-radio-wrapper span,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-select-selection-item,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-select-selection-placeholder{color:#c9d1d9}.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-checkbox-checked .ant-checkbox-inner,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-radio-checked .ant-radio-inner,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-checkbox-checked .ant-checkbox-inner,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-radio-checked .ant-radio-inner,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-checkbox-checked .ant-checkbox-inner,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-radio-checked .ant-radio-inner{background-color:#1890ff;border-color:#1890ff}.profile-page.theme-dark .notification-settings-form .email-hint[data-v-2151383b],.profile-page.theme-dark .notification-settings-form .field-hint[data-v-2151383b],.profile-page.theme-dark .password-form .email-hint[data-v-2151383b],.profile-page.theme-dark .password-form .field-hint[data-v-2151383b],.profile-page.theme-dark .profile-form .email-hint[data-v-2151383b],.profile-page.theme-dark .profile-form .field-hint[data-v-2151383b]{color:#8b949e}.profile-page.theme-dark .notification-settings-form .email-warning[data-v-2151383b],.profile-page.theme-dark .password-form .email-warning[data-v-2151383b],.profile-page.theme-dark .profile-form .email-warning[data-v-2151383b]{color:#f5222d}.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-alert{background:#1c1c1c;border-color:#2a2a2a;color:#c9d1d9}.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-alert .ant-alert-message{color:#c9d1d9}.profile-page.theme-dark .exchange-config-section .credential-hint[data-v-2151383b],.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-alert .ant-alert-description{color:#8b949e}.profile-page.theme-dark .test-result-msg.success[data-v-2151383b]{color:#52c41a}.profile-page.theme-dark .test-result-msg.error[data-v-2151383b]{color:#f5222d}.profile-page.theme-dark .referral-user-cell .user-info .nickname[data-v-2151383b]{color:#c9d1d9}.profile-page.theme-dark .referral-user-cell .user-info .username[data-v-2151383b]{color:#8b949e}.profile-page.theme-dark[data-v-2151383b] .ant-tag{color:#c9d1d9}.profile-page.theme-dark[data-v-2151383b] .ant-tag.ant-tag-has-color{color:#fff!important;border-color:transparent!important}.profile-page.theme-dark[data-v-2151383b] .ant-input-prefix .anticon,.profile-page.theme-dark[data-v-2151383b] .ant-input-suffix .anticon,.profile-page.theme-dark[data-v-2151383b] .credits-hint .anticon,.profile-page.theme-dark[data-v-2151383b] .email-hint .anticon,.profile-page.theme-dark[data-v-2151383b] .field-hint .anticon,.profile-page.theme-dark[data-v-2151383b] .notification-settings-form .anticon{color:#c9d1d9!important}.profile-page.theme-dark[data-v-2151383b] .ant-pagination .ant-pagination-item{background:#1c1c1c;border-color:#2a2a2a}.profile-page.theme-dark[data-v-2151383b] .ant-pagination .ant-pagination-item a{color:#c9d1d9}.profile-page.theme-dark[data-v-2151383b] .ant-pagination .ant-pagination-item:hover{border-color:#1890ff}.profile-page.theme-dark[data-v-2151383b] .ant-pagination .ant-pagination-item-active{background:#1890ff;border-color:#1890ff}.profile-page.theme-dark[data-v-2151383b] .ant-pagination .ant-pagination-item-active a{color:#fff}.profile-page.theme-dark[data-v-2151383b] .ant-pagination .ant-pagination-next .ant-pagination-item-link,.profile-page.theme-dark[data-v-2151383b] .ant-pagination .ant-pagination-prev .ant-pagination-item-link{background:#1c1c1c;border-color:#2a2a2a;color:#c9d1d9}.profile-page.theme-dark[data-v-2151383b] .ant-pagination .ant-pagination-options .ant-select-selector{background:#141414;border-color:#2a2a2a;color:#c9d1d9}.profile-page.theme-dark[data-v-2151383b] .ant-btn.ant-btn-default{background:#1c1c1c;border-color:#2a2a2a;color:#c9d1d9}.profile-page.theme-dark[data-v-2151383b] .ant-btn.ant-btn-default:hover{border-color:#1890ff;color:#1890ff}@media screen and (max-width:768px){.profile-page[data-v-2151383b]{padding:12px}.profile-page .page-header[data-v-2151383b]{margin-bottom:16px}.profile-page .page-header .page-title[data-v-2151383b]{font-size:20px}.profile-page .page-header .page-title .anticon[data-v-2151383b]{font-size:22px}.profile-page .page-header .page-desc[data-v-2151383b]{font-size:13px}.profile-page .profile-cards-row[data-v-2151383b]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .profile-cards-row .profile-card-col[data-v-2151383b]{margin-bottom:12px}.profile-page .profile-cards-row .right-cards-col .right-cards-row[data-v-2151383b]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .profile-cards-row .right-cards-col .right-cards-row .ant-col[data-v-2151383b]{margin-bottom:12px}.profile-page .profile-card[data-v-2151383b]{border-radius:10px}.profile-page .profile-card .avatar-section[data-v-2151383b]{padding:16px 0}.profile-page .profile-card .avatar-section[data-v-2151383b] .ant-avatar{width:80px!important;height:80px!important;line-height:80px!important}.profile-page .profile-card .avatar-section .username[data-v-2151383b]{font-size:18px;margin:12px 0 6px}.profile-page .profile-card .profile-info .info-item[data-v-2151383b]{padding:10px 0;-ms-flex-wrap:wrap;flex-wrap:wrap}.profile-page .profile-card .profile-info .info-item .anticon[data-v-2151383b]{font-size:14px;margin-right:8px}.profile-page .profile-card .profile-info .info-item .label[data-v-2151383b]{font-size:13px}.profile-page .profile-card .profile-info .info-item .value[data-v-2151383b]{font-size:13px;word-break:break-all}.profile-page .credits-card[data-v-2151383b]{border-radius:10px}.profile-page .credits-card .credits-header .credits-title[data-v-2151383b]{font-size:15px}.profile-page .credits-card .credits-header .credits-title .anticon[data-v-2151383b]{font-size:16px}.profile-page .credits-card .credits-body[data-v-2151383b]{padding:16px 0}.profile-page .credits-card .credits-body .credits-amount .amount-value[data-v-2151383b]{font-size:32px}.profile-page .credits-card .credits-body .credits-amount .amount-label[data-v-2151383b]{font-size:14px}.profile-page .credits-card .credits-body .vip-status[data-v-2151383b]{font-size:12px;margin-top:10px}.profile-page .credits-card .credits-actions .ant-btn[data-v-2151383b]{height:34px;padding:0 20px;font-size:14px}.profile-page .credits-card .credits-hint[data-v-2151383b]{font-size:11px;margin-top:10px}.profile-page .referral-card[data-v-2151383b]{border-radius:10px}.profile-page .referral-card .referral-header .referral-title[data-v-2151383b]{font-size:15px}.profile-page .referral-card .referral-header .referral-title .anticon[data-v-2151383b]{font-size:16px}.profile-page .referral-card .referral-body[data-v-2151383b]{padding:10px 0}.profile-page .referral-card .referral-body .referral-stats .stat-item .stat-value[data-v-2151383b]{font-size:24px}.profile-page .referral-card .referral-body .referral-link-section .link-label[data-v-2151383b],.profile-page .referral-card .referral-body .referral-stats .stat-item .stat-label[data-v-2151383b]{font-size:11px}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-2151383b] .ant-input{font-size:12px}.profile-page .referral-card .referral-body .referral-hint[data-v-2151383b]{font-size:11px;padding-top:8px}.profile-page .edit-card[data-v-2151383b]{border-radius:10px;margin-top:12px!important}.profile-page .edit-card[data-v-2151383b] .ant-card-body{padding:12px}.profile-page .edit-card[data-v-2151383b] .ant-tabs-nav .ant-tabs-tab{padding:10px 12px;font-size:13px}.profile-page .edit-card[data-v-2151383b] .ant-tabs-nav-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}.profile-page .edit-card[data-v-2151383b] .ant-tabs-nav-scroll::-webkit-scrollbar{display:none}.profile-page .edit-card .password-form[data-v-2151383b],.profile-page .edit-card .profile-form[data-v-2151383b]{max-width:100%}.profile-page .edit-card .password-form[data-v-2151383b] .ant-form-item-label,.profile-page .edit-card .profile-form[data-v-2151383b] .ant-form-item-label{padding-bottom:4px}.profile-page .edit-card .password-form[data-v-2151383b] .ant-form-item-label label,.profile-page .edit-card .profile-form[data-v-2151383b] .ant-form-item-label label{font-size:13px}.profile-page .edit-card .password-form[data-v-2151383b] .ant-input,.profile-page .edit-card .password-form[data-v-2151383b] .ant-input-password,.profile-page .edit-card .profile-form[data-v-2151383b] .ant-input,.profile-page .edit-card .profile-form[data-v-2151383b] .ant-input-password{font-size:14px}.profile-page .edit-card .password-form .email-hint[data-v-2151383b],.profile-page .edit-card .profile-form .email-hint[data-v-2151383b]{font-size:11px}.profile-page .edit-card .password-form[data-v-2151383b] .ant-alert{font-size:12px;padding:8px 12px}.profile-page .edit-card .notification-settings-form[data-v-2151383b] .ant-alert{font-size:12px;padding:8px 12px;margin-bottom:16px!important}.profile-page .edit-card .notification-settings-form[data-v-2151383b] .ant-form{max-width:100%}.profile-page .edit-card .notification-settings-form[data-v-2151383b] .ant-checkbox-group .ant-row{margin-left:0!important;margin-right:0!important}.profile-page .edit-card .notification-settings-form[data-v-2151383b] .ant-checkbox-group .ant-row .ant-col{padding-left:0!important;padding-right:8px!important}.profile-page .edit-card .notification-settings-form[data-v-2151383b] .ant-checkbox-group .ant-checkbox-wrapper{font-size:13px;margin-bottom:6px}.profile-page .edit-card .notification-settings-form .field-hint[data-v-2151383b]{font-size:11px;-ms-flex-wrap:wrap;flex-wrap:wrap}.profile-page .edit-card .notification-settings-form[data-v-2151383b] .ant-form-item{margin-bottom:16px}.profile-page .edit-card .notification-settings-form[data-v-2151383b] .ant-form-item:last-child .ant-btn{width:100%;margin-bottom:8px}.profile-page .edit-card .notification-settings-form[data-v-2151383b] .ant-form-item:last-child .ant-btn+.ant-btn{margin-left:0!important}.profile-page .edit-card[data-v-2151383b] .ant-table-wrapper{overflow-x:auto}.profile-page .edit-card[data-v-2151383b] .ant-table-wrapper .ant-table{min-width:500px}.profile-page .referral-user-cell[data-v-2151383b]{gap:8px}.profile-page .referral-user-cell[data-v-2151383b] .ant-avatar{width:28px!important;height:28px!important;line-height:28px!important}.profile-page .referral-user-cell .user-info .nickname[data-v-2151383b]{font-size:13px}.profile-page .referral-user-cell .user-info .username[data-v-2151383b]{font-size:11px}}@media screen and (max-width:480px){.profile-page[data-v-2151383b]{padding:8px}.profile-page .page-header[data-v-2151383b]{margin-bottom:12px}.profile-page .page-header .page-title[data-v-2151383b]{font-size:18px;gap:8px}.profile-page .page-header .page-title .anticon[data-v-2151383b]{font-size:20px}.profile-page .credits-card .credits-body .credits-amount .amount-value[data-v-2151383b]{font-size:28px}.profile-page .credits-card .credits-body .credits-amount .amount-label[data-v-2151383b]{font-size:13px}.profile-page .credits-card .credits-actions .ant-btn[data-v-2151383b]{width:100%}.profile-page .referral-card .referral-body .referral-stats .stat-item .stat-value[data-v-2151383b]{font-size:20px}.profile-page .edit-card[data-v-2151383b] .ant-tabs-nav .ant-tabs-tab{padding:8px 10px;font-size:12px}.profile-page .edit-card .notification-settings-form[data-v-2151383b] .ant-checkbox-group .ant-row .ant-col{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}}.exchange-signup-modal .exchange-signup-promo{margin-bottom:18px;padding:12px 14px;border-radius:12px;background:-webkit-gradient(linear,left top,right top,from(rgba(22,119,255,.12)),to(rgba(99,102,241,.1)));background:linear-gradient(90deg,rgba(22,119,255,.12),rgba(99,102,241,.1));border:1px solid rgba(22,119,255,.2);color:#1e40af;font-size:15px;font-weight:600;line-height:1.5;text-align:center}.exchange-signup-modal .exchange-signup-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.exchange-signup-modal .exchange-signup-card{border:1px solid #eef1f5;border-radius:16px;padding:16px;background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fafcff));background:linear-gradient(180deg,#fff,#fafcff);-webkit-box-shadow:0 8px 24px rgba(15,23,42,.05);box-shadow:0 8px 24px rgba(15,23,42,.05)}.exchange-signup-modal .exchange-signup-card__header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:12px;margin-bottom:12px}.exchange-signup-modal .exchange-signup-logo{width:44px;height:44px;border-radius:12px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;font-size:16px;font-weight:700}.exchange-signup-modal .exchange-signup-name{font-size:16px;font-weight:700;color:#1f2937}.exchange-signup-modal .exchange-signup-actions{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px}.profile-exchange-modal--dark .exchange-signup-modal .exchange-signup-promo{color:#93c5fd;background:-webkit-gradient(linear,left top,right top,from(rgba(59,130,246,.18)),to(rgba(99,102,241,.14)));background:linear-gradient(90deg,rgba(59,130,246,.18),rgba(99,102,241,.14));border-color:rgba(96,165,250,.35)}.profile-exchange-modal--dark .exchange-signup-modal .exchange-signup-card{background:-webkit-gradient(linear,left top,left bottom,from(#171717),to(#1f1f1f));background:linear-gradient(180deg,#171717,#1f1f1f);border-color:#2a2a2a;-webkit-box-shadow:none;box-shadow:none}.profile-exchange-modal--dark .exchange-signup-modal .exchange-signup-name{color:#e0e6ed} \ No newline at end of file diff --git a/frontend/dist/css/878.62d3ef3b.css b/frontend/dist/css/878.62d3ef3b.css deleted file mode 100644 index ba0a63f..0000000 --- a/frontend/dist/css/878.62d3ef3b.css +++ /dev/null @@ -1 +0,0 @@ -.trading-records[data-v-a5bdef7e]{width:100%;min-height:300px;padding:0;overflow-x:visible;overflow-y:visible}.trading-records .empty-state[data-v-a5bdef7e]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;min-height:200px;padding:40px 0;background:linear-gradient(135deg,rgba(248,250,252,.5),rgba(241,245,249,.5));border-radius:12px;border:2px dashed #e0e6ed}.trading-records[data-v-a5bdef7e] .ant-spin-container,.trading-records[data-v-a5bdef7e] .ant-spin-nested-loading{overflow-x:visible}.trading-records[data-v-a5bdef7e] .ant-table-wrapper{overflow-x:visible;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.trading-records[data-v-a5bdef7e] .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.trading-records[data-v-a5bdef7e] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.trading-records[data-v-a5bdef7e] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.trading-records[data-v-a5bdef7e] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.trading-records[data-v-a5bdef7e] .ant-table{font-size:13px;color:#333}.trading-records[data-v-a5bdef7e] .ant-table-container{overflow-x:visible}.trading-records[data-v-a5bdef7e] .ant-table-body{overflow-x:auto;overflow-y:visible;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.trading-records[data-v-a5bdef7e] .ant-table-body::-webkit-scrollbar{height:6px;width:6px}.trading-records[data-v-a5bdef7e] .ant-table-body::-webkit-scrollbar-track{background:transparent;border-radius:3px}.trading-records[data-v-a5bdef7e] .ant-table-body::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.trading-records[data-v-a5bdef7e] .ant-table-body::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.trading-records[data-v-a5bdef7e] .ant-table-container{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.trading-records[data-v-a5bdef7e] .ant-table-container::-webkit-scrollbar{height:6px;width:6px}.trading-records[data-v-a5bdef7e] .ant-table-container::-webkit-scrollbar-track{background:transparent;border-radius:3px}.trading-records[data-v-a5bdef7e] .ant-table-container::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.trading-records[data-v-a5bdef7e] .ant-table-container::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.trading-records[data-v-a5bdef7e] .ant-table-content{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.trading-records[data-v-a5bdef7e] .ant-table-content::-webkit-scrollbar{height:6px;width:6px}.trading-records[data-v-a5bdef7e] .ant-table-content::-webkit-scrollbar-track{background:transparent;border-radius:3px}.trading-records[data-v-a5bdef7e] .ant-table-content::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.trading-records[data-v-a5bdef7e] .ant-table-content::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.trading-records[data-v-a5bdef7e] .ant-table-tbody>tr>td,.trading-records[data-v-a5bdef7e] .ant-table-thead>tr>th{white-space:nowrap}.trading-records[data-v-a5bdef7e] .ant-table-thead>tr>th{background:-webkit-gradient(linear,left top,left bottom,from(#f8fafc),to(#f1f5f9));background:linear-gradient(180deg,#f8fafc,#f1f5f9);font-weight:600;color:#475569;border-bottom:2px solid #e2e8f0;padding:12px 16px;font-size:13px}.trading-records[data-v-a5bdef7e] .ant-table-tbody>tr>td{padding:12px 16px;color:#334155;border-bottom:1px solid #f1f5f9;-webkit-transition:background .2s ease;transition:background .2s ease}.trading-records[data-v-a5bdef7e] .ant-table-tbody>tr:hover>td{background:#f0f7ff!important}.trading-records[data-v-a5bdef7e] .ant-tag{border-radius:6px;padding:3px 10px;font-weight:600;font-size:11px;border:none;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-records[data-v-a5bdef7e] .ant-tag[color=cyan],.trading-records[data-v-a5bdef7e] .ant-tag[color=green],.trading-records[data-v-a5bdef7e] .ant-tag[color=lime]{background:linear-gradient(135deg,rgba(14,203,129,.15),rgba(14,203,129,.08));color:#0ecb81;border:1px solid rgba(14,203,129,.3)}.trading-records[data-v-a5bdef7e] .ant-tag[color=magenta],.trading-records[data-v-a5bdef7e] .ant-tag[color=red]{background:linear-gradient(135deg,rgba(246,70,93,.15),rgba(246,70,93,.08));color:#f6465d;border:1px solid rgba(246,70,93,.3)}.trading-records[data-v-a5bdef7e] .ant-tag[color=orange]{background:linear-gradient(135deg,rgba(250,173,20,.15),rgba(250,173,20,.08));color:#d48806;border:1px solid rgba(250,173,20,.3)}.trading-records[data-v-a5bdef7e] .ant-tag[color=blue]{background:linear-gradient(135deg,rgba(24,144,255,.15),rgba(24,144,255,.08));color:#1890ff;border:1px solid rgba(24,144,255,.3)}.trading-records[data-v-a5bdef7e] .ant-pagination{margin-top:16px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-item{border-radius:8px;border:1px solid #e2e8f0;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-item:hover{border-color:#1890ff}.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-item:hover a{color:#1890ff}.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-item.ant-pagination-item-active{background:linear-gradient(135deg,#1890ff,#40a9ff);border-color:#1890ff}.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-item.ant-pagination-item-active a{color:#fff}.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-next .ant-pagination-item-link,.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-prev .ant-pagination-item-link{border-radius:8px;border:1px solid #e2e8f0;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-next .ant-pagination-item-link:hover,.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-prev .ant-pagination-item-link:hover{border-color:#1890ff;color:#1890ff}.theme-dark .trading-records[data-v-a5bdef7e] .ant-table,.trading-records.theme-dark[data-v-a5bdef7e] .ant-table{background:#1e222d!important;color:#d1d4dc!important}.theme-dark .trading-records[data-v-a5bdef7e] .ant-table-thead>tr>th,.trading-records.theme-dark[data-v-a5bdef7e] .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important;font-weight:600}.theme-dark .trading-records[data-v-a5bdef7e] .ant-table-tbody>tr>td,.trading-records.theme-dark[data-v-a5bdef7e] .ant-table-tbody>tr>td{background:#1e222d!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records[data-v-a5bdef7e] .ant-table-tbody>tr:hover>td,.trading-records.theme-dark[data-v-a5bdef7e] .ant-table-tbody>tr:hover>td{background:#2a2e39!important}.theme-dark .trading-records[data-v-a5bdef7e] .ant-table-tbody>tr>td span,.trading-records.theme-dark[data-v-a5bdef7e] .ant-table-tbody>tr>td span{color:#d1d4dc!important}.trading-records[data-v-a5bdef7e] .ant-table-tbody>tr:hover>td{background:#fafafa}@media (max-width:768px){.trading-records[data-v-a5bdef7e]{min-height:200px;overflow-x:visible}.trading-records[data-v-a5bdef7e] .ant-table{font-size:12px}.trading-records[data-v-a5bdef7e] .ant-table-body,.trading-records[data-v-a5bdef7e] .ant-table-container,.trading-records[data-v-a5bdef7e] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.trading-records[data-v-a5bdef7e] .ant-table-body::-webkit-scrollbar,.trading-records[data-v-a5bdef7e] .ant-table-container::-webkit-scrollbar,.trading-records[data-v-a5bdef7e] .ant-table-wrapper::-webkit-scrollbar{height:4px;width:4px}.trading-records[data-v-a5bdef7e] .ant-table-body::-webkit-scrollbar-track,.trading-records[data-v-a5bdef7e] .ant-table-container::-webkit-scrollbar-track,.trading-records[data-v-a5bdef7e] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:2px}.trading-records[data-v-a5bdef7e] .ant-table-body::-webkit-scrollbar-thumb,.trading-records[data-v-a5bdef7e] .ant-table-container::-webkit-scrollbar-thumb,.trading-records[data-v-a5bdef7e] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:2px}.trading-records[data-v-a5bdef7e] .ant-table-body::-webkit-scrollbar-thumb:hover,.trading-records[data-v-a5bdef7e] .ant-table-container::-webkit-scrollbar-thumb:hover,.trading-records[data-v-a5bdef7e] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.trading-records[data-v-a5bdef7e] .ant-table-tbody>tr>td,.trading-records[data-v-a5bdef7e] .ant-table-thead>tr>th{padding:8px 10px;font-size:11px;white-space:nowrap}.trading-records[data-v-a5bdef7e] .ant-pagination{margin-top:12px;text-align:center}.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-item,.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-next,.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-prev{margin:0 2px;min-width:28px;height:28px;line-height:26px;font-size:12px}}@media (max-width:480px){.trading-records[data-v-a5bdef7e] .ant-table{font-size:11px}.trading-records[data-v-a5bdef7e] .ant-table-tbody>tr>td,.trading-records[data-v-a5bdef7e] .ant-table-thead>tr>th{padding:6px 8px;font-size:10px}}.theme-dark .trading-records .ant-table-tbody>tr>td,.theme-dark .trading-records[data-v] .ant-table-tbody>tr>td,body.dark .trading-records .ant-table-tbody>tr>td,body.realdark .trading-records .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1e222d!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records .ant-table-thead>tr>th,.theme-dark .trading-records[data-v] .ant-table-thead>tr>th,body.dark .trading-records .ant-table-thead>tr>th,body.realdark .trading-records .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important;font-weight:600!important}.theme-dark .trading-records .ant-table,.theme-dark .trading-records[data-v] .ant-table,body.dark .trading-records .ant-table,body.realdark .trading-records .ant-table{background:#1e222d!important;color:#d1d4dc!important}.theme-dark .trading-records .ant-table-tbody>tr>td *,.theme-dark .trading-records[data-v] .ant-table-tbody>tr>td *,body.dark .trading-records .ant-table-tbody>tr>td *,body.realdark .trading-records .ant-table-tbody>tr>td *{color:#d1d4dc!important}.theme-dark .trading-records .ant-table-tbody>tr:hover>td,.theme-dark .trading-records[data-v] .ant-table-tbody>tr:hover>td,body.dark .trading-records .ant-table-tbody>tr:hover>td,body.realdark .trading-records .ant-table-tbody>tr:hover>td{background:#2a2e39!important}.theme-dark .trading-records .ant-table-thead>tr>th .ant-table-column-title,.theme-dark .trading-records[data-v] .ant-table-thead>tr>th .ant-table-column-title,body.dark .trading-records .ant-table-thead>tr>th .ant-table-column-title,body.realdark .trading-records .ant-table-thead>tr>th .ant-table-column-title{color:#d1d4dc!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-table-tbody>tr:hover>td{background:#2a2e39!important}body.dark .trading-records[data-v-8a68b65a] .ant-table-tbody>tr>td,body.realdark .trading-records[data-v-8a68b65a] .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1e222d!important;border-bottom-color:#363c4e!important}body.dark .trading-records[data-v-8a68b65a] .ant-table-thead>tr>th,body.realdark .trading-records[data-v-8a68b65a] .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records[data-v] .ant-table-tbody>tr>td,body.dark .trading-records[data-v] .ant-table-tbody>tr>td,body.realdark .trading-records[data-v] .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1e222d!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records[data-v] .ant-table-thead>tr>th,body.dark .trading-records[data-v] .ant-table-thead>tr>th,body.realdark .trading-records[data-v] .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item{background:#1e222d!important;border-color:#363c4e!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item a,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item a,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item a{color:#d1d4dc!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover{border-color:#1890ff!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover a,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover a,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover a{color:#1890ff!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item-active,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item-active,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item-active{background:#1890ff!important;border-color:#1890ff!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item-active a,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item-active a,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item-active a{color:#fff!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-next .ant-pagination-item-link,.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-prev .ant-pagination-item-link,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-next .ant-pagination-item-link,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-prev .ant-pagination-item-link,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-next .ant-pagination-item-link,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-prev .ant-pagination-item-link{background:#1e222d!important;border-color:#363c4e!important;color:#d1d4dc!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-next:hover .ant-pagination-item-link,.theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-prev:hover .ant-pagination-item-link,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-next:hover .ant-pagination-item-link,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-prev:hover .ant-pagination-item-link,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-next:hover .ant-pagination-item-link,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-prev:hover .ant-pagination-item-link{border-color:#1890ff!important;color:#1890ff!important}.theme-dark .trading-records[data-v] .ant-pagination-item,body.dark .trading-records[data-v] .ant-pagination-item,body.realdark .trading-records[data-v] .ant-pagination-item{background:#1e222d!important;border-color:#363c4e!important}.theme-dark .trading-records[data-v] .ant-pagination-item a,body.dark .trading-records[data-v] .ant-pagination-item a,body.realdark .trading-records[data-v] .ant-pagination-item a{color:#d1d4dc!important}.theme-dark .trading-records[data-v] .ant-pagination-item:hover,body.dark .trading-records[data-v] .ant-pagination-item:hover,body.realdark .trading-records[data-v] .ant-pagination-item:hover{border-color:#1890ff!important}.theme-dark .trading-records[data-v] .ant-pagination-item:hover a,body.dark .trading-records[data-v] .ant-pagination-item:hover a,body.realdark .trading-records[data-v] .ant-pagination-item:hover a{color:#1890ff!important}.theme-dark .trading-records[data-v] .ant-pagination-item-active,body.dark .trading-records[data-v] .ant-pagination-item-active,body.realdark .trading-records[data-v] .ant-pagination-item-active{background:#1890ff!important;border-color:#1890ff!important}.theme-dark .trading-records[data-v] .ant-pagination-item-active a,body.dark .trading-records[data-v] .ant-pagination-item-active a,body.realdark .trading-records[data-v] .ant-pagination-item-active a{color:#fff!important}.theme-dark .trading-records[data-v] .ant-pagination-next .ant-pagination-item-link,.theme-dark .trading-records[data-v] .ant-pagination-prev .ant-pagination-item-link,body.dark .trading-records[data-v] .ant-pagination-next .ant-pagination-item-link,body.dark .trading-records[data-v] .ant-pagination-prev .ant-pagination-item-link,body.realdark .trading-records[data-v] .ant-pagination-next .ant-pagination-item-link,body.realdark .trading-records[data-v] .ant-pagination-prev .ant-pagination-item-link{background:#1e222d!important;border-color:#363c4e!important;color:#d1d4dc!important}.theme-dark .trading-records[data-v] .ant-pagination-next:hover .ant-pagination-item-link,.theme-dark .trading-records[data-v] .ant-pagination-prev:hover .ant-pagination-item-link,body.dark .trading-records[data-v] .ant-pagination-next:hover .ant-pagination-item-link,body.dark .trading-records[data-v] .ant-pagination-prev:hover .ant-pagination-item-link,body.realdark .trading-records[data-v] .ant-pagination-next:hover .ant-pagination-item-link,body.realdark .trading-records[data-v] .ant-pagination-prev:hover .ant-pagination-item-link{border-color:#1890ff!important;color:#1890ff!important}.theme-dark .trading-records[data-v-8a68b65a] .ant-table-body,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-container,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-content,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-wrapper,body.dark .trading-records[data-v-8a68b65a] .ant-table-body,body.dark .trading-records[data-v-8a68b65a] .ant-table-container,body.dark .trading-records[data-v-8a68b65a] .ant-table-content,body.dark .trading-records[data-v-8a68b65a] .ant-table-wrapper,body.realdark .trading-records[data-v-8a68b65a] .ant-table-body,body.realdark .trading-records[data-v-8a68b65a] .ant-table-container,body.realdark .trading-records[data-v-8a68b65a] .ant-table-content,body.realdark .trading-records[data-v-8a68b65a] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(209,212,220,.3) transparent}.theme-dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar,body.dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar,body.dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar,body.dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar,body.dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar,body.realdark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar,body.realdark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar,body.realdark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar,body.realdark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.theme-dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-track,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-track,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-track,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-track,body.dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-track,body.dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-track,body.dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-track,body.dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-track,body.realdark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-track,body.realdark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-track,body.realdark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-track,body.realdark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.theme-dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-thumb,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-thumb,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-thumb,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-thumb,body.dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-thumb,body.dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-thumb,body.dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-thumb,body.dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(209,212,220,.3);border-radius:3px}.theme-dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v-8a68b65a] .ant-table-body::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v-8a68b65a] .ant-table-container::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v-8a68b65a] .ant-table-content::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v-8a68b65a] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(209,212,220,.5)}.theme-dark .trading-records[data-v] .ant-table-body,.theme-dark .trading-records[data-v] .ant-table-container,.theme-dark .trading-records[data-v] .ant-table-content,.theme-dark .trading-records[data-v] .ant-table-wrapper,body.dark .trading-records[data-v] .ant-table-body,body.dark .trading-records[data-v] .ant-table-container,body.dark .trading-records[data-v] .ant-table-content,body.dark .trading-records[data-v] .ant-table-wrapper,body.realdark .trading-records[data-v] .ant-table-body,body.realdark .trading-records[data-v] .ant-table-container,body.realdark .trading-records[data-v] .ant-table-content,body.realdark .trading-records[data-v] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(209,212,220,.3) transparent}.theme-dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar,.theme-dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar,.theme-dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar,.theme-dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar,body.dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar,body.dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar,body.dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar,body.dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar,body.realdark .trading-records[data-v] .ant-table-body::-webkit-scrollbar,body.realdark .trading-records[data-v] .ant-table-container::-webkit-scrollbar,body.realdark .trading-records[data-v] .ant-table-content::-webkit-scrollbar,body.realdark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.theme-dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-track,.theme-dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-track,.theme-dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-track,.theme-dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-track,body.dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-track,body.dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-track,body.dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-track,body.dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-track,body.realdark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-track,body.realdark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-track,body.realdark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-track,body.realdark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.theme-dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-thumb,.theme-dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-thumb,.theme-dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-thumb,.theme-dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb,body.dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-thumb,body.dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-thumb,body.dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-thumb,body.dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-thumb,body.realdark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(209,212,220,.3);border-radius:3px}.theme-dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-thumb:hover,body.dark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v] .ant-table-body::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v] .ant-table-container::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v] .ant-table-content::-webkit-scrollbar-thumb:hover,body.realdark .trading-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(209,212,220,.5)}.theme-dark .trading-records ::v-deep .ant-table{background:#1e222d!important;color:#d1d4dc!important}.theme-dark .trading-records ::v-deep .ant-table table{background:#1e222d!important;color:#d1d4dc!important}.theme-dark .trading-records ::v-deep .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records ::v-deep .ant-table-tbody{color:#d1d4dc!important}.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td{background:#1e222d!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td div,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td span{color:#d1d4dc!important}.theme-dark .trading-records ::v-deep .ant-table-tbody>tr:hover>td{background:#2a2e39!important}.theme-dark .trading-records ::v-deep .ant-table-placeholder{background:#1e222d!important;color:#868993!important}.theme-dark .trading-records ::v-deep .ant-table-body,.theme-dark .trading-records ::v-deep .ant-table-container,.theme-dark .trading-records ::v-deep .ant-table-content,.theme-dark .trading-records ::v-deep .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(209,212,220,.3) transparent}.theme-dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar,.theme-dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar,.theme-dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar,.theme-dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.theme-dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-track,.theme-dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-track,.theme-dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-track,.theme-dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.theme-dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-thumb,.theme-dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-thumb,.theme-dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-thumb,.theme-dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(209,212,220,.3);border-radius:3px}.theme-dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-thumb:hover,.theme-dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(209,212,220,.5)}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item{background:#1e222d!important;border-color:#363c4e!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item a{color:#d1d4dc!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover{border-color:#1890ff!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a{color:#1890ff!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active{background:#1890ff!important;border-color:#1890ff!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active a{color:#fff!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link{background:#1e222d!important;border-color:#363c4e!important;color:#d1d4dc!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link{border-color:#1890ff!important;color:#1890ff!important}.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector{background:#1e222d!important;border-color:#363c4e!important;color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-table,body.realdark .trading-records ::v-deep .ant-table{background:#1e222d!important;color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-table table,body.realdark .trading-records ::v-deep .ant-table table{background:#1e222d!important;color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-table-thead>tr>th,body.realdark .trading-records ::v-deep .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}body.dark .trading-records ::v-deep .ant-table-tbody,body.realdark .trading-records ::v-deep .ant-table-tbody{color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-table-tbody>tr>td,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td{background:#1e222d!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}body.dark .trading-records ::v-deep .ant-table-tbody>tr>td,body.dark .trading-records ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),body.dark .trading-records ::v-deep .ant-table-tbody>tr>td div,body.dark .trading-records ::v-deep .ant-table-tbody>tr>td span,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td div,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td span{color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-table-tbody>tr:hover>td,body.realdark .trading-records ::v-deep .ant-table-tbody>tr:hover>td{background:#2a2e39!important}body.dark .trading-records ::v-deep .ant-table-placeholder,body.realdark .trading-records ::v-deep .ant-table-placeholder{background:#1e222d!important;color:#868993!important}body.dark .trading-records ::v-deep .ant-table-body,body.dark .trading-records ::v-deep .ant-table-container,body.dark .trading-records ::v-deep .ant-table-content,body.dark .trading-records ::v-deep .ant-table-wrapper,body.realdark .trading-records ::v-deep .ant-table-body,body.realdark .trading-records ::v-deep .ant-table-container,body.realdark .trading-records ::v-deep .ant-table-content,body.realdark .trading-records ::v-deep .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(209,212,220,.3) transparent}body.dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar,body.dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar,body.dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar,body.dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar,body.realdark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar,body.realdark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar,body.realdark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar,body.realdark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}body.dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-track,body.dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-track,body.dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-track,body.dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-track,body.realdark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-track,body.realdark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-track,body.realdark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-track,body.realdark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}body.dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-thumb,body.dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-thumb,body.dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-thumb,body.dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-thumb,body.realdark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-thumb,body.realdark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-thumb,body.realdark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-thumb,body.realdark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(209,212,220,.3);border-radius:3px}body.dark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-thumb:hover,body.dark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-thumb:hover,body.dark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-thumb:hover,body.dark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.realdark .trading-records ::v-deep .ant-table-body::-webkit-scrollbar-thumb:hover,body.realdark .trading-records ::v-deep .ant-table-container::-webkit-scrollbar-thumb:hover,body.realdark .trading-records ::v-deep .ant-table-content::-webkit-scrollbar-thumb:hover,body.realdark .trading-records ::v-deep .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(209,212,220,.5)}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item{background:#1e222d!important;border-color:#363c4e!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item a,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item a{color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover{border-color:#1890ff!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a{color:#1890ff!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active{background:#1890ff!important;border-color:#1890ff!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active a,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active a{color:#fff!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link{background:#1e222d!important;border-color:#363c4e!important;color:#d1d4dc!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link{border-color:#1890ff!important;color:#1890ff!important}body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector{background:#1e222d!important;border-color:#363c4e!important;color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-table,.theme-dark .trading-records ::v-deep .ant-table,body.dark .trading-records * ::v-deep .ant-table,body.dark .trading-records ::v-deep .ant-table,body.realdark .trading-records * ::v-deep .ant-table,body.realdark .trading-records ::v-deep .ant-table{background:#1e222d!important;color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-table table,.theme-dark .trading-records ::v-deep .ant-table table,body.dark .trading-records * ::v-deep .ant-table table,body.dark .trading-records ::v-deep .ant-table table,body.realdark .trading-records * ::v-deep .ant-table table,body.realdark .trading-records ::v-deep .ant-table table{background:#1e222d!important;color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-table-thead>tr>th,.theme-dark .trading-records ::v-deep .ant-table-thead>tr>th,body.dark .trading-records * ::v-deep .ant-table-thead>tr>th,body.dark .trading-records ::v-deep .ant-table-thead>tr>th,body.realdark .trading-records * ::v-deep .ant-table-thead>tr>th,body.realdark .trading-records ::v-deep .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records * ::v-deep .ant-table-tbody,.theme-dark .trading-records ::v-deep .ant-table-tbody,body.dark .trading-records * ::v-deep .ant-table-tbody,body.dark .trading-records ::v-deep .ant-table-tbody,body.realdark .trading-records * ::v-deep .ant-table-tbody,body.realdark .trading-records ::v-deep .ant-table-tbody{color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-table-tbody>tr>td,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td,body.dark .trading-records * ::v-deep .ant-table-tbody>tr>td,body.dark .trading-records ::v-deep .ant-table-tbody>tr>td,body.realdark .trading-records * ::v-deep .ant-table-tbody>tr>td,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td{background:#1e222d!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .trading-records * ::v-deep .ant-table-tbody>tr>td,.theme-dark .trading-records * ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),.theme-dark .trading-records * ::v-deep .ant-table-tbody>tr>td div,.theme-dark .trading-records * ::v-deep .ant-table-tbody>tr>td span,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td div,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr>td span,body.dark .trading-records * ::v-deep .ant-table-tbody>tr>td,body.dark .trading-records * ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),body.dark .trading-records * ::v-deep .ant-table-tbody>tr>td div,body.dark .trading-records * ::v-deep .ant-table-tbody>tr>td span,body.dark .trading-records ::v-deep .ant-table-tbody>tr>td,body.dark .trading-records ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),body.dark .trading-records ::v-deep .ant-table-tbody>tr>td div,body.dark .trading-records ::v-deep .ant-table-tbody>tr>td span,body.realdark .trading-records * ::v-deep .ant-table-tbody>tr>td,body.realdark .trading-records * ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),body.realdark .trading-records * ::v-deep .ant-table-tbody>tr>td div,body.realdark .trading-records * ::v-deep .ant-table-tbody>tr>td span,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td :not(.ant-tag),body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td div,body.realdark .trading-records ::v-deep .ant-table-tbody>tr>td span{color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-table-tbody>tr:hover>td,.theme-dark .trading-records ::v-deep .ant-table-tbody>tr:hover>td,body.dark .trading-records * ::v-deep .ant-table-tbody>tr:hover>td,body.dark .trading-records ::v-deep .ant-table-tbody>tr:hover>td,body.realdark .trading-records * ::v-deep .ant-table-tbody>tr:hover>td,body.realdark .trading-records ::v-deep .ant-table-tbody>tr:hover>td{background:#2a2e39!important}.theme-dark .trading-records * ::v-deep .ant-table-placeholder,.theme-dark .trading-records ::v-deep .ant-table-placeholder,body.dark .trading-records * ::v-deep .ant-table-placeholder,body.dark .trading-records ::v-deep .ant-table-placeholder,body.realdark .trading-records * ::v-deep .ant-table-placeholder,body.realdark .trading-records ::v-deep .ant-table-placeholder{background:#1e222d!important;color:#868993!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-item,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item{background:#1e222d!important;border-color:#363c4e!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item a,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item a,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item a,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item a,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-item a,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item a{color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover{border-color:#1890ff!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover a,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover a,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover a,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a{color:#1890ff!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active{background:#1890ff!important;border-color:#1890ff!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active a,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active a,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active a,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active a,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active a,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active a{color:#fff!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-next .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-prev .ant-pagination-item-link{background:#1e222d!important;border-color:#363c4e!important;color:#d1d4dc!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link{border-color:#1890ff!important;color:#1890ff!important}.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-options .ant-select .ant-select-selector{background:#1e222d!important;border-color:#363c4e!important;color:#d1d4dc!important}.position-records[data-v-2abcf4f1]{width:100%;min-height:300px;padding:0}.position-records .empty-state[data-v-2abcf4f1]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;min-height:200px;padding:40px 0;background:linear-gradient(135deg,rgba(248,250,252,.5),rgba(241,245,249,.5));border-radius:12px;border:2px dashed #e0e6ed}.position-records[data-v-2abcf4f1] .ant-table{font-size:13px;color:#333}.position-records[data-v-2abcf4f1] .ant-table-body{overflow-x:auto;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.position-records[data-v-2abcf4f1] .ant-table-body::-webkit-scrollbar{height:6px;width:6px}.position-records[data-v-2abcf4f1] .ant-table-body::-webkit-scrollbar-track{background:transparent;border-radius:3px}.position-records[data-v-2abcf4f1] .ant-table-body::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.position-records[data-v-2abcf4f1] .ant-table-body::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.position-records[data-v-2abcf4f1] .ant-table-container{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.position-records[data-v-2abcf4f1] .ant-table-container::-webkit-scrollbar{height:6px;width:6px}.position-records[data-v-2abcf4f1] .ant-table-container::-webkit-scrollbar-track{background:transparent;border-radius:3px}.position-records[data-v-2abcf4f1] .ant-table-container::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.position-records[data-v-2abcf4f1] .ant-table-container::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.position-records[data-v-2abcf4f1] .ant-table-content,.position-records[data-v-2abcf4f1] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.position-records[data-v-2abcf4f1] .ant-table-content::-webkit-scrollbar,.position-records[data-v-2abcf4f1] .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.position-records[data-v-2abcf4f1] .ant-table-content::-webkit-scrollbar-track,.position-records[data-v-2abcf4f1] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.position-records[data-v-2abcf4f1] .ant-table-content::-webkit-scrollbar-thumb,.position-records[data-v-2abcf4f1] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:3px}.position-records[data-v-2abcf4f1] .ant-table-content::-webkit-scrollbar-thumb:hover,.position-records[data-v-2abcf4f1] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.position-records[data-v-2abcf4f1] .ant-table-thead>tr>th{background:-webkit-gradient(linear,left top,left bottom,from(#f8fafc),to(#f1f5f9));background:linear-gradient(180deg,#f8fafc,#f1f5f9);font-weight:600;color:#475569;border-bottom:2px solid #e2e8f0;padding:12px 16px;font-size:13px}.position-records[data-v-2abcf4f1] .ant-table-tbody>tr>td{padding:12px 16px;color:#334155;border-bottom:1px solid #f1f5f9;-webkit-transition:background .2s ease;transition:background .2s ease}.position-records[data-v-2abcf4f1] .ant-table-tbody>tr>td strong{color:#1e293b;font-weight:600}.position-records[data-v-2abcf4f1] .ant-table-tbody>tr:hover>td{background:#f0f7ff!important}.position-records[data-v-2abcf4f1] .ant-tag{border-radius:6px;padding:2px 10px;font-weight:600;font-size:11px;border:none}.position-records[data-v-2abcf4f1] .ant-tag[color=green]{background:linear-gradient(135deg,rgba(14,203,129,.15),rgba(14,203,129,.08));color:#0ecb81;border:1px solid rgba(14,203,129,.3)}.position-records[data-v-2abcf4f1] .ant-tag[color=red]{background:linear-gradient(135deg,rgba(246,70,93,.15),rgba(246,70,93,.08));color:#f6465d;border:1px solid rgba(246,70,93,.3)}.position-records.theme-dark[data-v-2abcf4f1] .ant-table,.theme-dark .position-records[data-v-2abcf4f1] .ant-table{background:#1e222d!important;color:#d1d4dc!important}.position-records.theme-dark[data-v-2abcf4f1] .ant-table-thead>tr>th,.theme-dark .position-records[data-v-2abcf4f1] .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important;font-weight:600}.position-records.theme-dark[data-v-2abcf4f1] .ant-table-tbody>tr>td,.theme-dark .position-records[data-v-2abcf4f1] .ant-table-tbody>tr>td{background:#1e222d!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.position-records.theme-dark[data-v-2abcf4f1] .ant-table-tbody>tr:hover>td,.theme-dark .position-records[data-v-2abcf4f1] .ant-table-tbody>tr:hover>td{background:#2a2e39!important}.position-records.theme-dark[data-v-2abcf4f1] .ant-table-tbody>tr>td strong,.theme-dark .position-records[data-v-2abcf4f1] .ant-table-tbody>tr>td strong{color:#d1d4dc!important}.position-records[data-v-2abcf4f1] .ant-table-tbody>tr:hover>td{background:#fafafa}.position-records[data-v-2abcf4f1] .ant-empty{margin:40px 0}.position-records[data-v-2abcf4f1] .ant-empty .ant-empty-description{color:#8c8c8c}.position-records .profit[data-v-2abcf4f1]{color:#0ecb81;font-weight:700;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;padding:2px 8px;background:linear-gradient(135deg,rgba(14,203,129,.12),rgba(14,203,129,.06));border-radius:6px}.position-records .profit[data-v-2abcf4f1]:before{content:"▲";font-size:8px}.position-records .loss[data-v-2abcf4f1]{color:#f6465d;font-weight:700;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;padding:2px 8px;background:linear-gradient(135deg,rgba(246,70,93,.12),rgba(246,70,93,.06));border-radius:6px}.position-records .loss[data-v-2abcf4f1]:before{content:"▼";font-size:8px}@media (max-width:768px){.position-records[data-v-2abcf4f1]{min-height:200px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.position-records[data-v-2abcf4f1]::-webkit-scrollbar{height:4px;width:4px}.position-records[data-v-2abcf4f1]::-webkit-scrollbar-track{background:transparent;border-radius:2px}.position-records[data-v-2abcf4f1]::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:2px}.position-records[data-v-2abcf4f1]::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.position-records .empty-state[data-v-2abcf4f1]{min-height:150px;padding:20px 0}.position-records[data-v-2abcf4f1] .ant-table{font-size:12px;min-width:700px}.position-records[data-v-2abcf4f1] .ant-table-body,.position-records[data-v-2abcf4f1] .ant-table-container,.position-records[data-v-2abcf4f1] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}.position-records[data-v-2abcf4f1] .ant-table-body::-webkit-scrollbar,.position-records[data-v-2abcf4f1] .ant-table-container::-webkit-scrollbar,.position-records[data-v-2abcf4f1] .ant-table-wrapper::-webkit-scrollbar{height:4px;width:4px}.position-records[data-v-2abcf4f1] .ant-table-body::-webkit-scrollbar-track,.position-records[data-v-2abcf4f1] .ant-table-container::-webkit-scrollbar-track,.position-records[data-v-2abcf4f1] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:2px}.position-records[data-v-2abcf4f1] .ant-table-body::-webkit-scrollbar-thumb,.position-records[data-v-2abcf4f1] .ant-table-container::-webkit-scrollbar-thumb,.position-records[data-v-2abcf4f1] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2);border-radius:2px}.position-records[data-v-2abcf4f1] .ant-table-body::-webkit-scrollbar-thumb:hover,.position-records[data-v-2abcf4f1] .ant-table-container::-webkit-scrollbar-thumb:hover,.position-records[data-v-2abcf4f1] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,.3)}.position-records[data-v-2abcf4f1] .ant-table-tbody>tr>td,.position-records[data-v-2abcf4f1] .ant-table-thead>tr>th{padding:8px 10px;font-size:11px;white-space:nowrap}.position-records[data-v-2abcf4f1] .ant-empty{margin:20px 0}}@media (max-width:480px){.position-records[data-v-2abcf4f1] .ant-table{font-size:11px;min-width:600px}.position-records[data-v-2abcf4f1] .ant-table-tbody>tr>td,.position-records[data-v-2abcf4f1] .ant-table-thead>tr>th{padding:6px 8px;font-size:10px}.position-records .loss[data-v-2abcf4f1],.position-records .profit[data-v-2abcf4f1]{font-size:11px}}.theme-dark .position-records .ant-table-tbody>tr>td,.theme-dark .position-records[data-v] .ant-table-tbody>tr>td,body.dark .position-records .ant-table-tbody>tr>td,body.realdark .position-records .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1e222d!important;border-bottom-color:#363c4e!important}.theme-dark .position-records .ant-table-thead>tr>th,.theme-dark .position-records[data-v] .ant-table-thead>tr>th,body.dark .position-records .ant-table-thead>tr>th,body.realdark .position-records .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important;font-weight:600!important}.theme-dark .position-records .ant-table,.theme-dark .position-records[data-v] .ant-table,body.dark .position-records .ant-table,body.realdark .position-records .ant-table{background:#1e222d!important;color:#d1d4dc!important}.theme-dark .position-records .ant-table-tbody>tr>td *,.theme-dark .position-records[data-v] .ant-table-tbody>tr>td *,body.dark .position-records .ant-table-tbody>tr>td *,body.realdark .position-records .ant-table-tbody>tr>td *{color:#d1d4dc!important}.theme-dark .position-records .ant-table-tbody>tr:hover>td,.theme-dark .position-records[data-v] .ant-table-tbody>tr:hover>td,body.dark .position-records .ant-table-tbody>tr:hover>td,body.realdark .position-records .ant-table-tbody>tr:hover>td{background:#2a2e39!important}.theme-dark .position-records .ant-table-thead>tr>th .ant-table-column-title,.theme-dark .position-records[data-v] .ant-table-thead>tr>th .ant-table-column-title,body.dark .position-records .ant-table-thead>tr>th .ant-table-column-title,body.realdark .position-records .ant-table-thead>tr>th .ant-table-column-title{color:#d1d4dc!important}.theme-dark .position-records[data-v] .ant-table-tbody>tr>td,.theme-dark [class*=position-records][data-v] .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1e222d!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v] .ant-table-thead>tr>th,.theme-dark [class*=position-records][data-v] .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v-6c1eb557] .ant-table-tbody>tr>td,.theme-dark [data-v-6c1eb557] .ant-table-tbody>tr>td,.theme-dark [data-v-6c1eb557] .position-records .ant-table-tbody>tr>td,.theme-dark [data-v-6c1eb557].position-records .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1e222d!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v-6c1eb557] .ant-table-thead>tr>th,.theme-dark [data-v-6c1eb557].position-records .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v-6c1eb557] .ant-table,.theme-dark [data-v-6c1eb557].position-records .ant-table{background:#1e222d!important;color:#d1d4dc!important}.theme-dark .position-records[data-v-6c1eb557] .ant-table-tbody>tr:hover>td,.theme-dark [data-v-6c1eb557].position-records .ant-table-tbody>tr:hover>td{background:#2a2e39!important}body.dark .position-records[data-v-6c1eb557] .ant-table-tbody>tr>td,body.dark [data-v-6c1eb557] .ant-table-tbody>tr>td,body.dark [data-v-6c1eb557] .position-records .ant-table-tbody>tr>td,body.dark [data-v-6c1eb557].position-records .ant-table-tbody>tr>td,body.realdark .position-records[data-v-6c1eb557] .ant-table-tbody>tr>td,body.realdark [data-v-6c1eb557] .ant-table-tbody>tr>td,body.realdark [data-v-6c1eb557] .position-records .ant-table-tbody>tr>td,body.realdark [data-v-6c1eb557].position-records .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1e222d!important;border-bottom-color:#363c4e!important}body.dark .position-records[data-v-6c1eb557] .ant-table-thead>tr>th,body.dark [data-v-6c1eb557] .ant-table-thead>tr>th,body.dark [data-v-6c1eb557] .position-records .ant-table-thead>tr>th,body.dark [data-v-6c1eb557].position-records .ant-table-thead>tr>th,body.realdark .position-records[data-v-6c1eb557] .ant-table-thead>tr>th,body.realdark [data-v-6c1eb557] .ant-table-thead>tr>th,body.realdark [data-v-6c1eb557] .position-records .ant-table-thead>tr>th,body.realdark [data-v-6c1eb557].position-records .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v] .ant-table-tbody>tr>td,body.dark .position-records[data-v] .ant-table-tbody>tr>td,body.realdark .position-records[data-v] .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1e222d!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v] .ant-table-thead>tr>th,body.dark .position-records[data-v] .ant-table-thead>tr>th,body.realdark .position-records[data-v] .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v-6c1eb557] .ant-empty .ant-empty-description,body.dark .position-records[data-v-6c1eb557] .ant-empty .ant-empty-description,body.realdark .position-records[data-v-6c1eb557] .ant-empty .ant-empty-description{color:#868993!important}.theme-dark .position-records[data-v-6c1eb557] .profit,body.dark .position-records[data-v-6c1eb557] .profit,body.realdark .position-records[data-v-6c1eb557] .profit{color:#52c41a!important}.theme-dark .position-records[data-v-6c1eb557] .loss,body.dark .position-records[data-v-6c1eb557] .loss,body.realdark .position-records[data-v-6c1eb557] .loss{color:#ff4d4f!important}.theme-dark .trading-assistant .position-records[data-v-6c1eb557] .ant-table-tbody>tr>td,.theme-dark .trading-assistant [data-v-6c1eb557].position-records .ant-table-tbody>tr>td,body.dark .trading-assistant .position-records[data-v-6c1eb557] .ant-table-tbody>tr>td,body.dark .trading-assistant [data-v-6c1eb557].position-records .ant-table-tbody>tr>td,body.realdark .trading-assistant .position-records[data-v-6c1eb557] .ant-table-tbody>tr>td,body.realdark .trading-assistant [data-v-6c1eb557].position-records .ant-table-tbody>tr>td{color:#d1d4dc!important;background:#1e222d!important;border-bottom-color:#363c4e!important}.theme-dark .trading-assistant .position-records[data-v-6c1eb557] .ant-table-thead>tr>th,.theme-dark .trading-assistant [data-v-6c1eb557].position-records .ant-table-thead>tr>th,body.dark .trading-assistant .position-records[data-v-6c1eb557] .ant-table-thead>tr>th,body.dark .trading-assistant [data-v-6c1eb557].position-records .ant-table-thead>tr>th,body.realdark .trading-assistant .position-records[data-v-6c1eb557] .ant-table-thead>tr>th,body.realdark .trading-assistant [data-v-6c1eb557].position-records .ant-table-thead>tr>th{background:#2a2e39!important;color:#d1d4dc!important;border-bottom-color:#363c4e!important}.theme-dark .position-records[data-v-6c1eb557] .ant-table-body,.theme-dark .position-records[data-v-6c1eb557] .ant-table-container,.theme-dark .position-records[data-v-6c1eb557] .ant-table-content,.theme-dark .position-records[data-v-6c1eb557] .ant-table-wrapper,body.dark .position-records[data-v-6c1eb557] .ant-table-body,body.dark .position-records[data-v-6c1eb557] .ant-table-container,body.dark .position-records[data-v-6c1eb557] .ant-table-content,body.dark .position-records[data-v-6c1eb557] .ant-table-wrapper,body.realdark .position-records[data-v-6c1eb557] .ant-table-body,body.realdark .position-records[data-v-6c1eb557] .ant-table-container,body.realdark .position-records[data-v-6c1eb557] .ant-table-content,body.realdark .position-records[data-v-6c1eb557] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(209,212,220,.3) transparent}.theme-dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar,.theme-dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar,.theme-dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar,.theme-dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar,body.dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar,body.dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar,body.dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar,body.dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar,body.realdark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar,body.realdark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar,body.realdark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar,body.realdark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.theme-dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-track,.theme-dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-track,.theme-dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-track,.theme-dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-track,body.dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-track,body.dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-track,body.dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-track,body.dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-track,body.realdark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-track,body.realdark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-track,body.realdark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-track,body.realdark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.theme-dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-thumb,.theme-dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-thumb,.theme-dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-thumb,.theme-dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-thumb,body.dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-thumb,body.dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-thumb,body.dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-thumb,body.dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-thumb,body.realdark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-thumb,body.realdark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-thumb,body.realdark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-thumb,body.realdark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(209,212,220,.3);border-radius:3px}.theme-dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-thumb:hover,.theme-dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-thumb:hover,.theme-dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-thumb:hover,.theme-dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v-6c1eb557] .ant-table-body::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v-6c1eb557] .ant-table-container::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v-6c1eb557] .ant-table-content::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v-6c1eb557] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(209,212,220,.5)}.theme-dark .position-records[data-v] .ant-table-body,.theme-dark .position-records[data-v] .ant-table-container,.theme-dark .position-records[data-v] .ant-table-content,.theme-dark .position-records[data-v] .ant-table-wrapper,body.dark .position-records[data-v] .ant-table-body,body.dark .position-records[data-v] .ant-table-container,body.dark .position-records[data-v] .ant-table-content,body.dark .position-records[data-v] .ant-table-wrapper,body.realdark .position-records[data-v] .ant-table-body,body.realdark .position-records[data-v] .ant-table-container,body.realdark .position-records[data-v] .ant-table-content,body.realdark .position-records[data-v] .ant-table-wrapper{scrollbar-width:thin;scrollbar-color:rgba(209,212,220,.3) transparent}.theme-dark .position-records[data-v] .ant-table-body::-webkit-scrollbar,.theme-dark .position-records[data-v] .ant-table-container::-webkit-scrollbar,.theme-dark .position-records[data-v] .ant-table-content::-webkit-scrollbar,.theme-dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar,body.dark .position-records[data-v] .ant-table-body::-webkit-scrollbar,body.dark .position-records[data-v] .ant-table-container::-webkit-scrollbar,body.dark .position-records[data-v] .ant-table-content::-webkit-scrollbar,body.dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar,body.realdark .position-records[data-v] .ant-table-body::-webkit-scrollbar,body.realdark .position-records[data-v] .ant-table-container::-webkit-scrollbar,body.realdark .position-records[data-v] .ant-table-content::-webkit-scrollbar,body.realdark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar{height:6px;width:6px}.theme-dark .position-records[data-v] .ant-table-body::-webkit-scrollbar-track,.theme-dark .position-records[data-v] .ant-table-container::-webkit-scrollbar-track,.theme-dark .position-records[data-v] .ant-table-content::-webkit-scrollbar-track,.theme-dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-track,body.dark .position-records[data-v] .ant-table-body::-webkit-scrollbar-track,body.dark .position-records[data-v] .ant-table-container::-webkit-scrollbar-track,body.dark .position-records[data-v] .ant-table-content::-webkit-scrollbar-track,body.dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-track,body.realdark .position-records[data-v] .ant-table-body::-webkit-scrollbar-track,body.realdark .position-records[data-v] .ant-table-container::-webkit-scrollbar-track,body.realdark .position-records[data-v] .ant-table-content::-webkit-scrollbar-track,body.realdark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-track{background:transparent;border-radius:3px}.theme-dark .position-records[data-v] .ant-table-body::-webkit-scrollbar-thumb,.theme-dark .position-records[data-v] .ant-table-container::-webkit-scrollbar-thumb,.theme-dark .position-records[data-v] .ant-table-content::-webkit-scrollbar-thumb,.theme-dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb,body.dark .position-records[data-v] .ant-table-body::-webkit-scrollbar-thumb,body.dark .position-records[data-v] .ant-table-container::-webkit-scrollbar-thumb,body.dark .position-records[data-v] .ant-table-content::-webkit-scrollbar-thumb,body.dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb,body.realdark .position-records[data-v] .ant-table-body::-webkit-scrollbar-thumb,body.realdark .position-records[data-v] .ant-table-container::-webkit-scrollbar-thumb,body.realdark .position-records[data-v] .ant-table-content::-webkit-scrollbar-thumb,body.realdark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb{background:rgba(209,212,220,.3);border-radius:3px}.theme-dark .position-records[data-v] .ant-table-body::-webkit-scrollbar-thumb:hover,.theme-dark .position-records[data-v] .ant-table-container::-webkit-scrollbar-thumb:hover,.theme-dark .position-records[data-v] .ant-table-content::-webkit-scrollbar-thumb:hover,.theme-dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v] .ant-table-body::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v] .ant-table-container::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v] .ant-table-content::-webkit-scrollbar-thumb:hover,body.dark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v] .ant-table-body::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v] .ant-table-container::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v] .ant-table-content::-webkit-scrollbar-thumb:hover,body.realdark .position-records[data-v] .ant-table-wrapper::-webkit-scrollbar-thumb:hover{background:rgba(209,212,220,.5)}.strategy-type-selector[data-v-1cfbbafc]{padding:8px 0}.selector-header[data-v-1cfbbafc]{text-align:center;margin-bottom:24px}.selector-header h3[data-v-1cfbbafc]{margin:0 0 4px;font-size:18px;font-weight:600}.selector-header .selector-hint[data-v-1cfbbafc]{color:#999;font-size:13px;margin:0}.mode-cards[data-v-1cfbbafc]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:16px}@media (max-width:768px){.mode-cards[data-v-1cfbbafc]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.mode-card[data-v-1cfbbafc]{-webkit-box-flex:1;-ms-flex:1;flex:1;border:2px solid #f0f0f0;border-radius:12px;padding:24px;cursor:pointer;-webkit-transition:all .3s;transition:all .3s;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center;position:relative;overflow:hidden}.mode-card[data-v-1cfbbafc]:hover{border-color:#1890ff;-webkit-box-shadow:0 4px 16px rgba(24,144,255,.12);box-shadow:0 4px 16px rgba(24,144,255,.12);-webkit-transform:translateY(-2px);transform:translateY(-2px)}.mode-card.selected[data-v-1cfbbafc]{border-color:#1890ff;background:rgba(24,144,255,.02)}.mode-card.selected[data-v-1cfbbafc]:after{content:"✓";position:absolute;top:8px;right:12px;color:#1890ff;font-size:18px;font-weight:700}.card-icon[data-v-1cfbbafc]{width:56px;height:56px;border-radius:14px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;font-size:26px;margin-bottom:16px}.card-icon.signal-icon[data-v-1cfbbafc]{background:linear-gradient(135deg,#e6f7ff,#bae7ff);color:#1890ff}.card-icon.script-icon[data-v-1cfbbafc]{background:linear-gradient(135deg,#f6ffed,#d9f7be);color:#52c41a}.card-body[data-v-1cfbbafc]{-webkit-box-flex:1;-ms-flex:1;flex:1}.card-body .card-badge-row[data-v-1cfbbafc]{margin-bottom:10px}.card-body .card-badge[data-v-1cfbbafc]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:3px 10px;border-radius:999px;background:rgba(24,144,255,.08);color:#1890ff;font-size:12px;font-weight:600;line-height:1.4}.card-body .card-badge.card-badge--script[data-v-1cfbbafc]{background:rgba(82,196,26,.12);color:#389e0d}.card-body h4[data-v-1cfbbafc]{font-size:16px;font-weight:600;margin:0 0 8px}.card-body .card-desc[data-v-1cfbbafc]{color:#666;font-size:13px;line-height:1.5;margin-bottom:12px}.card-features[data-v-1cfbbafc]{list-style:none;padding:0;margin:0 0 16px;text-align:left}.card-features li[data-v-1cfbbafc]{font-size:13px;color:#555;padding:3px 0}.card-features li .anticon[data-v-1cfbbafc]{color:#52c41a;margin-right:6px;font-size:12px}.card-btn[data-v-1cfbbafc]{width:100%}.template-quick-start[data-v-1cfbbafc]{margin-top:8px}.template-quick-start .divider-text[data-v-1cfbbafc]{color:#999;font-size:13px}.template-tags[data-v-1cfbbafc]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:8px}.template-tag[data-v-1cfbbafc]{cursor:pointer;padding:4px 12px;font-size:13px;border-radius:16px;-webkit-transition:all .2s;transition:all .2s}.template-tag .tpl-icon[data-v-1cfbbafc]{margin-right:4px}.template-tag[data-v-1cfbbafc]:hover{color:#1890ff;border-color:#1890ff;background:#e6f7ff}.theme-dark .selector-header h3[data-v-1cfbbafc]{color:#e0e6ed}.theme-dark .selector-header .selector-hint[data-v-1cfbbafc]{color:hsla(0,0%,100%,.4)}.theme-dark .mode-card[data-v-1cfbbafc]{border-color:hsla(0,0%,100%,.08);background:#1a1e28}.theme-dark .mode-card[data-v-1cfbbafc]:hover{border-color:#177ddc;-webkit-box-shadow:0 4px 16px rgba(23,125,220,.2);box-shadow:0 4px 16px rgba(23,125,220,.2)}.theme-dark .mode-card.selected[data-v-1cfbbafc]{border-color:#177ddc;background:rgba(23,125,220,.06)}.theme-dark .mode-card.selected[data-v-1cfbbafc]:after{color:#40a9ff}.theme-dark .card-icon.signal-icon[data-v-1cfbbafc]{background:linear-gradient(135deg,rgba(24,144,255,.15),rgba(24,144,255,.08));color:#40a9ff}.theme-dark .card-icon.script-icon[data-v-1cfbbafc]{background:linear-gradient(135deg,rgba(82,196,26,.15),rgba(82,196,26,.08));color:#73d13d}.theme-dark .card-body h4[data-v-1cfbbafc]{color:#e0e6ed}.theme-dark .card-body .card-desc[data-v-1cfbbafc]{color:hsla(0,0%,100%,.45)}.theme-dark .card-body .card-badge[data-v-1cfbbafc]{background:rgba(64,169,255,.12);color:#69c0ff}.theme-dark .card-body .card-badge.card-badge--script[data-v-1cfbbafc]{background:rgba(115,209,61,.16);color:#95de64}.theme-dark .card-features li[data-v-1cfbbafc]{color:hsla(0,0%,100%,.6)}.theme-dark .card-features li .anticon[data-v-1cfbbafc]{color:#73d13d}.theme-dark .card-btn[data-v-1cfbbafc]{border-color:rgba(24,144,255,.4);color:#40a9ff}.theme-dark .card-btn[data-v-1cfbbafc]:hover{border-color:#1890ff;color:#1890ff}.theme-dark .template-quick-start[data-v-1cfbbafc] .ant-divider-inner-text{color:hsla(0,0%,100%,.35)}.theme-dark .template-quick-start[data-v-1cfbbafc] .ant-divider:after,.theme-dark .template-quick-start[data-v-1cfbbafc] .ant-divider:before{border-top-color:hsla(0,0%,100%,.08)}.theme-dark .divider-text[data-v-1cfbbafc]{color:hsla(0,0%,100%,.35)}.theme-dark .template-tag[data-v-1cfbbafc]{background:hsla(0,0%,100%,.04);border-color:hsla(0,0%,100%,.1);color:hsla(0,0%,100%,.65)}.theme-dark .template-tag[data-v-1cfbbafc]:hover{color:#40a9ff;border-color:#177ddc;background:rgba(23,125,220,.1)}.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:transparent}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:transparent}.cm-fat-cursor{caret-color:transparent}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative;z-index:0}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none;outline:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-webkit-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}.cm-s-monokai.CodeMirror{background:#272822;color:#f8f8f2}.cm-s-monokai div.CodeMirror-selected{background:#49483e}.cm-s-monokai .CodeMirror-line::selection,.cm-s-monokai .CodeMirror-line>span::selection,.cm-s-monokai .CodeMirror-line>span>span::selection{background:rgba(73,72,62,.99)}.cm-s-monokai .CodeMirror-line::-moz-selection,.cm-s-monokai .CodeMirror-line>span::-moz-selection,.cm-s-monokai .CodeMirror-line>span>span::-moz-selection{background:rgba(73,72,62,.99)}.cm-s-monokai .CodeMirror-gutters{background:#272822;border-right:0}.cm-s-monokai .CodeMirror-guttermarker{color:#fff}.cm-s-monokai .CodeMirror-guttermarker-subtle,.cm-s-monokai .CodeMirror-linenumber{color:#d0d0d0}.cm-s-monokai .CodeMirror-cursor{border-left:1px solid #f8f8f0}.cm-s-monokai span.cm-comment{color:#75715e}.cm-s-monokai span.cm-atom,.cm-s-monokai span.cm-number{color:#ae81ff}.cm-s-monokai span.cm-comment.cm-attribute{color:#97b757}.cm-s-monokai span.cm-comment.cm-def{color:#bc9262}.cm-s-monokai span.cm-comment.cm-tag{color:#bc6283}.cm-s-monokai span.cm-comment.cm-type{color:#5998a6}.cm-s-monokai span.cm-attribute,.cm-s-monokai span.cm-property{color:#a6e22e}.cm-s-monokai span.cm-keyword{color:#f92672}.cm-s-monokai span.cm-builtin{color:#66d9ef}.cm-s-monokai span.cm-string{color:#e6db74}.cm-s-monokai span.cm-variable{color:#f8f8f2}.cm-s-monokai span.cm-variable-2{color:#9effff}.cm-s-monokai span.cm-type,.cm-s-monokai span.cm-variable-3{color:#66d9ef}.cm-s-monokai span.cm-def{color:#fd971f}.cm-s-monokai span.cm-bracket{color:#f8f8f2}.cm-s-monokai span.cm-tag{color:#f92672}.cm-s-monokai span.cm-header,.cm-s-monokai span.cm-link{color:#ae81ff}.cm-s-monokai span.cm-error{background:#f92672;color:#f8f8f0}.cm-s-monokai .CodeMirror-activeline-background{background:#373831}.cm-s-monokai .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.cm-s-eclipse span.cm-meta{color:#ff1717}.cm-s-eclipse span.cm-keyword{line-height:1em;font-weight:700;color:#7f0055}.cm-s-eclipse span.cm-atom{color:#219}.cm-s-eclipse span.cm-number{color:#164}.cm-s-eclipse span.cm-def{color:#00f}.cm-s-eclipse span.cm-variable{color:#000}.cm-s-eclipse span.cm-type,.cm-s-eclipse span.cm-variable-2,.cm-s-eclipse span.cm-variable-3{color:#0000c0}.cm-s-eclipse span.cm-operator,.cm-s-eclipse span.cm-property{color:#000}.cm-s-eclipse span.cm-comment{color:#3f7f5f}.cm-s-eclipse span.cm-string{color:#2a00ff}.cm-s-eclipse span.cm-string-2{color:#f50}.cm-s-eclipse span.cm-qualifier{color:#555}.cm-s-eclipse span.cm-builtin{color:#30a}.cm-s-eclipse span.cm-bracket{color:#cc7}.cm-s-eclipse span.cm-tag{color:#170}.cm-s-eclipse span.cm-attribute{color:#00c}.cm-s-eclipse span.cm-link{color:#219}.cm-s-eclipse span.cm-error{color:red}.cm-s-eclipse .CodeMirror-activeline-background{background:#e8f2ff}.cm-s-eclipse .CodeMirror-matchingbracket{outline:1px solid grey;color:#000!important}.strategy-editor[data-v-6c7c8660]{width:100%}.editor-layout[data-v-6c7c8660]{min-height:450px}.code-section[data-v-6c7c8660]{border:1px solid #e8e8e8;border-radius:8px;overflow:hidden}.section-header[data-v-6c7c8660]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:8px 12px;background:#fafafa;border-bottom:1px solid #e8e8e8}.section-header[data-v-6c7c8660],.section-title-wrap[data-v-6c7c8660]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.section-title-wrap[data-v-6c7c8660]{gap:8px;min-width:0}.section-title[data-v-6c7c8660]{font-weight:600;font-size:14px}.section-title .anticon[data-v-6c7c8660]{margin-right:6px}.current-template-tag[data-v-6c7c8660]{margin-right:0}.verify-btn[data-v-6c7c8660]{color:#52c41a;font-weight:600}.code-editor-container[data-v-6c7c8660]{height:420px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.code-editor-container[data-v-6c7c8660] .CodeMirror{-webkit-box-flex:1;-ms-flex:1;flex:1;height:100%;font-family:Courier New,Consolas,Liberation Mono,Menlo,monospace;font-size:13px;line-height:1.6;background:#fff}.code-editor-container[data-v-6c7c8660] .CodeMirror-scroll{min-height:100%;overflow-x:auto!important;overflow-y:auto!important}.code-editor-container[data-v-6c7c8660] .CodeMirror-gutters{min-width:48px;border-right:1px solid #e8e8e8;background:-webkit-gradient(linear,left top,right top,from(#fafafa),to(#f5f5f5));background:linear-gradient(90deg,#fafafa 0,#f5f5f5)}.code-editor-container[data-v-6c7c8660] .CodeMirror-linenumbers{width:44px!important}.code-editor-container[data-v-6c7c8660] .CodeMirror-linenumber{min-width:36px;padding:0 8px 0 0;text-align:right;color:#999;font-size:12px}.code-editor-container[data-v-6c7c8660] .CodeMirror-sizer{margin-left:0!important;min-height:100%!important}.code-editor-container[data-v-6c7c8660] .CodeMirror-lines{padding:12px 0}.code-editor-container[data-v-6c7c8660] .CodeMirror pre.CodeMirror-line,.code-editor-container[data-v-6c7c8660] .CodeMirror pre.CodeMirror-line-like{padding:0 12px 0 12px}.code-editor-container[data-v-6c7c8660] .CodeMirror-cursor{border-left:2px solid #1890ff}.side-tabs[data-v-6c7c8660]{height:100%}.side-tabs[data-v-6c7c8660] .ant-tabs-content{height:calc(100% - 40px);overflow-y:auto}.panel-intro[data-v-6c7c8660]{margin-bottom:12px;padding:12px;border-radius:8px;background:#fafafa;border:1px solid #f0f0f0}.panel-intro__title[data-v-6c7c8660]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;font-size:14px;font-weight:600;color:#262626}.panel-intro__desc[data-v-6c7c8660]{margin-top:4px;font-size:12px;line-height:1.6;color:#8c8c8c}.template-list[data-v-6c7c8660]{padding:4px 0}.template-item[data-v-6c7c8660]{padding:12px;border:1px solid #f0f0f0;border-radius:8px;margin-bottom:8px;cursor:pointer;-webkit-transition:all .2s;transition:all .2s}.template-item.active[data-v-6c7c8660],.template-item[data-v-6c7c8660]:hover{border-color:#1890ff;background:#fafafa}.template-item .tpl-header[data-v-6c7c8660]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:4px}.template-item .tpl-icon[data-v-6c7c8660]{font-size:16px;margin-right:8px}.template-item .tpl-name[data-v-6c7c8660]{font-weight:600;font-size:14px}.template-item .tpl-desc[data-v-6c7c8660]{font-size:12px;color:#888;margin:0 0 4px}.template-item .tpl-use-btn[data-v-6c7c8660]{padding:0;font-size:12px}.params-tip[data-v-6c7c8660]{margin-bottom:12px}.param-list[data-v-6c7c8660]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px}.param-item[data-v-6c7c8660]{padding:12px;border:1px solid #f0f0f0;border-radius:8px;background:#fff}.param-item__label-row[data-v-6c7c8660]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px;margin-bottom:4px}.param-item__label[data-v-6c7c8660]{font-size:13px;font-weight:600;color:#262626}.param-item__type[data-v-6c7c8660]{font-size:11px;color:#8c8c8c}.param-item__desc[data-v-6c7c8660]{margin-bottom:8px;font-size:12px;line-height:1.5;color:#8c8c8c}.param-item__switch[data-v-6c7c8660]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.params-actions[data-v-6c7c8660]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;gap:8px;margin-top:16px}.ai-suggestions[data-v-6c7c8660]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;margin-bottom:10px}.prompt-tag[data-v-6c7c8660]{cursor:pointer}.ai-status[data-v-6c7c8660]{margin-top:8px;color:#1890ff;font-size:13px;text-align:center}.docs-content[data-v-6c7c8660]{font-size:13px;line-height:1.6}.docs-content[data-v-6c7c8660] h4{font-size:16px;font-weight:600;margin-bottom:12px}.docs-content[data-v-6c7c8660] h5{font-size:14px;font-weight:600;margin:16px 0 8px;color:#1890ff}.docs-content[data-v-6c7c8660] pre{background:#f6f8fa;padding:12px;border-radius:6px;overflow-x:auto;font-size:12px;line-height:1.5}.docs-content[data-v-6c7c8660] code{font-family:Courier New,Consolas,monospace}.theme-dark .code-section[data-v-6c7c8660]{border-color:hsla(0,0%,100%,.1)}.theme-dark .section-header[data-v-6c7c8660]{background:#1a1e28;border-color:hsla(0,0%,100%,.1)}.theme-dark .section-title[data-v-6c7c8660]{color:#e0e6ed}.theme-dark .side-tabs[data-v-6c7c8660] .ant-tabs-nav .ant-tabs-tab{color:hsla(0,0%,100%,.55)}.theme-dark .side-tabs[data-v-6c7c8660] .ant-tabs-nav .ant-tabs-tab:hover{color:hsla(0,0%,100%,.85)}.theme-dark .side-tabs[data-v-6c7c8660] .ant-tabs-nav .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn{color:#1890ff}.theme-dark .side-tabs[data-v-6c7c8660] .ant-tabs-bar{border-bottom-color:hsla(0,0%,100%,.08)}.theme-dark .panel-intro[data-v-6c7c8660]{background:#1a1e28;border-color:hsla(0,0%,100%,.08)}.theme-dark .panel-intro__title[data-v-6c7c8660],.theme-dark .param-item__label[data-v-6c7c8660]{color:#e0e6ed}.theme-dark .panel-intro__desc[data-v-6c7c8660],.theme-dark .param-item__desc[data-v-6c7c8660],.theme-dark .param-item__type[data-v-6c7c8660]{color:hsla(0,0%,100%,.45)}.theme-dark .param-item[data-v-6c7c8660],.theme-dark .template-item[data-v-6c7c8660]{border-color:hsla(0,0%,100%,.08);background:#1a1e28}.theme-dark .template-item.active[data-v-6c7c8660],.theme-dark .template-item[data-v-6c7c8660]:hover{border-color:#177ddc;background:rgba(23,125,220,.06)}.theme-dark .tpl-name[data-v-6c7c8660]{color:#e0e6ed}.theme-dark .tpl-desc[data-v-6c7c8660]{color:hsla(0,0%,100%,.4)}.theme-dark .prompt-tag[data-v-6c7c8660]{background:hsla(0,0%,100%,.04);border-color:hsla(0,0%,100%,.1);color:hsla(0,0%,100%,.7)}.theme-dark[data-v-6c7c8660] .ant-input,.theme-dark[data-v-6c7c8660] .ant-input-number,.theme-dark[data-v-6c7c8660] .ant-input-number-input,.theme-dark[data-v-6c7c8660] .ant-select-selection,.theme-dark[data-v-6c7c8660] .ant-select-selection--single,.theme-dark[data-v-6c7c8660] textarea.ant-input{background:#141821!important;border-color:hsla(0,0%,100%,.1)!important;color:#d1d4dc!important}.theme-dark[data-v-6c7c8660] .ant-select-selection-placeholder,.theme-dark[data-v-6c7c8660] .ant-select-selection-selected-value{color:#d1d4dc!important}.theme-dark .ai-status[data-v-6c7c8660]{color:#40a9ff}.theme-dark .docs-content[data-v-6c7c8660]{color:hsla(0,0%,100%,.75)}.theme-dark .docs-content[data-v-6c7c8660] h4{color:#e0e6ed}.theme-dark .docs-content[data-v-6c7c8660] h5{color:#40a9ff}.theme-dark .docs-content[data-v-6c7c8660] pre{background:#141821;color:hsla(0,0%,100%,.7);border:1px solid hsla(0,0%,100%,.06)}.theme-dark .code-editor-container[data-v-6c7c8660] .CodeMirror{background:#0f141c;color:#d1d4dc}.theme-dark .code-editor-container[data-v-6c7c8660] .CodeMirror-gutters{border-right-color:hsla(0,0%,100%,.08);background:-webkit-gradient(linear,left top,right top,from(#151922),to(#1a1e28));background:linear-gradient(90deg,#151922 0,#1a1e28)}.theme-dark .code-editor-container[data-v-6c7c8660] .CodeMirror-linenumber{color:hsla(0,0%,100%,.32)}.performance-analysis[data-v-192d71db]{padding:4px 0}.metrics-grid[data-v-192d71db]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:20px}@media (max-width:768px){.metrics-grid[data-v-192d71db]{grid-template-columns:repeat(2,1fr)}}.metric-card[data-v-192d71db]{background:#fafafa;border-radius:8px;padding:12px 16px;text-align:center}.metric-card.positive .metric-value[data-v-192d71db]{color:#52c41a}.metric-card.negative .metric-value[data-v-192d71db]{color:#ff4d4f}.metric-card .metric-label[data-v-192d71db]{font-size:12px;color:#999;margin-bottom:4px}.metric-card .metric-value[data-v-192d71db]{font-size:18px;font-weight:700;font-variant-numeric:tabular-nums}.chart-section[data-v-192d71db]{margin-bottom:20px}.chart-section .chart-title[data-v-192d71db]{font-size:14px;font-weight:600;margin-bottom:8px;padding-left:4px}.chart-container[data-v-192d71db]{width:100%;height:300px;border-radius:8px;overflow:hidden}.theme-dark .metrics-grid .metric-card[data-v-192d71db]{background:#1a1e28;border:1px solid hsla(0,0%,100%,.06)}.theme-dark .metrics-grid .metric-card .metric-label[data-v-192d71db]{color:hsla(0,0%,100%,.4)}.theme-dark .metrics-grid .metric-card .metric-value[data-v-192d71db]{color:#e0e6ed}.theme-dark .metrics-grid .metric-card.positive .metric-value[data-v-192d71db]{color:#52c41a}.theme-dark .metrics-grid .metric-card.negative .metric-value[data-v-192d71db]{color:#ff4d4f}.theme-dark .chart-section .chart-title[data-v-192d71db]{color:#e0e6ed}.theme-dark .chart-container[data-v-192d71db]{background:#141821;border:1px solid hsla(0,0%,100%,.06)}.theme-dark[data-v-192d71db] .ant-empty-description{color:hsla(0,0%,100%,.35)}.strategy-logs[data-v-129fed65]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%}.logs-toolbar[data-v-129fed65]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:8px 0;margin-bottom:8px}.logs-toolbar .toolbar-right[data-v-129fed65],.logs-toolbar[data-v-129fed65]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.logs-toolbar .toolbar-right[data-v-129fed65]{gap:6px}.logs-toolbar .toolbar-right .auto-refresh-label[data-v-129fed65]{font-size:12px;color:#999}.logs-container[data-v-129fed65]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-height:300px;max-height:500px;overflow-y:auto;border:1px solid #f0f0f0;border-radius:8px;padding:8px;font-family:Fira Code,Consolas,monospace;font-size:12px;line-height:1.7;background:#fafafa}.logs-empty[data-v-129fed65]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:200px;color:#ccc}.logs-empty p[data-v-129fed65]{margin-top:8px;font-family:-apple-system,BlinkMacSystemFont,sans-serif}.log-entry[data-v-129fed65]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:8px;padding:2px 4px;border-radius:3px}.log-entry[data-v-129fed65]:hover{background:rgba(0,0,0,.02)}.log-entry.level-error[data-v-129fed65]{background:rgba(255,77,79,.04)}.log-entry.level-trade[data-v-129fed65]{background:rgba(82,196,26,.04)}.log-time[data-v-129fed65]{color:#999;white-space:nowrap;font-size:11px;min-width:65px}.log-level[data-v-129fed65]{-ms-flex-negative:0;flex-shrink:0;font-size:10px}.log-message[data-v-129fed65]{-webkit-box-flex:1;-ms-flex:1;flex:1;word-break:break-all}.theme-dark .logs-toolbar .toolbar-right .auto-refresh-label[data-v-129fed65]{color:hsla(0,0%,100%,.4)}.theme-dark .logs-toolbar[data-v-129fed65] .ant-radio-group .ant-radio-button-wrapper{background:#1a1e28;border-color:hsla(0,0%,100%,.12);color:hsla(0,0%,100%,.55)}.theme-dark .logs-toolbar[data-v-129fed65] .ant-radio-group .ant-radio-button-wrapper:hover{color:#40a9ff}.theme-dark .logs-toolbar[data-v-129fed65] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#1890ff;border-color:#1890ff;color:#fff}.theme-dark .logs-container[data-v-129fed65]{background:#141821;border-color:hsla(0,0%,100%,.08)}.theme-dark .logs-empty[data-v-129fed65]{color:hsla(0,0%,100%,.25)}.theme-dark .logs-empty .anticon[data-v-129fed65]{color:hsla(0,0%,100%,.15)!important}.theme-dark .logs-empty p[data-v-129fed65]{color:hsla(0,0%,100%,.3)}.theme-dark .log-entry[data-v-129fed65]:hover{background:hsla(0,0%,100%,.03)}.theme-dark .log-entry.level-error[data-v-129fed65]{background:rgba(255,77,79,.06)}.theme-dark .log-entry.level-trade[data-v-129fed65]{background:rgba(82,196,26,.06)}.theme-dark .log-time[data-v-129fed65]{color:hsla(0,0%,100%,.3)}.theme-dark .log-message[data-v-129fed65]{color:hsla(0,0%,100%,.75)}.dashboard-pro[data-v-a3f2f566]{min-height:100vh;padding:20px;background:#f8fafc;-webkit-transition:background .3s;transition:background .3s}.dashboard-pro.theme-dark[data-v-a3f2f566]{background:#141414}.dashboard-pro.theme-dark .kpi-card[data-v-a3f2f566]{background:#1c1c1c;border-color:#2a2a2a}.dashboard-pro.theme-dark .kpi-card .kpi-label[data-v-a3f2f566]{color:#888}.dashboard-pro.theme-dark .kpi-card .kpi-value .amount[data-v-a3f2f566]{color:#f1f5f9}.dashboard-pro.theme-dark .kpi-card .kpi-sub[data-v-a3f2f566]{color:#888}.dashboard-pro.theme-dark .chart-panel[data-v-a3f2f566],.dashboard-pro.theme-dark .table-panel[data-v-a3f2f566]{background:#1c1c1c;border-color:#2a2a2a}.dashboard-pro.theme-dark .chart-panel .panel-header[data-v-a3f2f566],.dashboard-pro.theme-dark .table-panel .panel-header[data-v-a3f2f566]{border-color:#2a2a2a}.dashboard-pro.theme-dark .chart-panel .panel-header .panel-title[data-v-a3f2f566],.dashboard-pro.theme-dark .table-panel .panel-header .panel-title[data-v-a3f2f566]{color:#f1f5f9}.dashboard-pro.theme-dark .setup-guide-card[data-v-a3f2f566]{background:linear-gradient(135deg,rgba(23,125,220,.14),rgba(139,92,246,.12));border-color:rgba(23,125,220,.26)}.dashboard-pro.theme-dark .setup-guide-card .setup-guide-title[data-v-a3f2f566]{color:#f1f5f9}.dashboard-pro.theme-dark .setup-guide-card .setup-guide-desc[data-v-a3f2f566]{color:hsla(0,0%,100%,.72)}.dashboard-pro.theme-dark .setup-guide-card .setup-guide-path[data-v-a3f2f566]{color:hsla(0,0%,100%,.48)}.dashboard-pro.theme-dark .ranking-card[data-v-a3f2f566]{background:hsla(0,0%,100%,.03);border-color:#2a2a2a}.dashboard-pro.theme-dark .ranking-card .rank-name[data-v-a3f2f566]{color:#f1f5f9}.dashboard-pro.theme-dark .ranking-card .rank-stats label[data-v-a3f2f566]{color:#888}.dashboard-pro.theme-dark .calendar-nav .current-month[data-v-a3f2f566]{color:#f1f5f9}.dashboard-pro.theme-dark .calendar-nav .ant-btn-link[data-v-a3f2f566],.dashboard-pro.theme-dark .profit-calendar .calendar-empty[data-v-a3f2f566]{color:#888}.dashboard-pro.theme-dark .profit-calendar .month-summary[data-v-a3f2f566]{background:hsla(0,0%,100%,.03)}.dashboard-pro.theme-dark .profit-calendar .calendar-weekdays .weekday[data-v-a3f2f566],.dashboard-pro.theme-dark .profit-calendar .month-summary .summary-label[data-v-a3f2f566]{color:#888}.dashboard-pro.theme-dark .profit-calendar .calendar-grid .calendar-cell[data-v-a3f2f566]{background:hsla(0,0%,100%,.03)}.dashboard-pro.theme-dark .profit-calendar .calendar-grid .calendar-cell.no-data[data-v-a3f2f566]{background:hsla(0,0%,100%,.02)}.dashboard-pro.theme-dark .profit-calendar .calendar-grid .calendar-cell.profit[data-v-a3f2f566]{background:linear-gradient(135deg,rgba(34,197,94,.15),rgba(34,197,94,.25))}.dashboard-pro.theme-dark .profit-calendar .calendar-grid .calendar-cell.loss[data-v-a3f2f566]{background:linear-gradient(135deg,rgba(239,68,68,.15),rgba(239,68,68,.25))}.dashboard-pro.theme-dark .profit-calendar .calendar-grid .calendar-cell.zero[data-v-a3f2f566]{background:hsla(0,0%,100%,.03)}.dashboard-pro.theme-dark .profit-calendar .calendar-grid .calendar-cell .day-number[data-v-a3f2f566]{color:#f1f5f9}.dashboard-pro.theme-dark .pro-table[data-v-a3f2f566] .ant-table{background:transparent;color:#f1f5f9}.dashboard-pro.theme-dark .pro-table[data-v-a3f2f566] .ant-table-thead>tr>th{background:#141414;color:#888;border-color:#2a2a2a}.dashboard-pro.theme-dark .pro-table[data-v-a3f2f566] .ant-table-tbody>tr>td{border-color:#2a2a2a;color:#f1f5f9}.dashboard-pro.theme-dark .pro-table[data-v-a3f2f566] .ant-table-tbody>tr:hover>td{background:#252525}.dashboard-pro.theme-dark .pro-table[data-v-a3f2f566] .ant-table-placeholder{background:transparent}.dashboard-pro.theme-dark .pro-table[data-v-a3f2f566] .ant-table-placeholder .ant-empty-description{color:#888}.dashboard-pro.theme-dark .pro-table[data-v-a3f2f566] .ant-pagination .ant-pagination-item{background:#1c1c1c;border-color:#2a2a2a}.dashboard-pro.theme-dark .pro-table[data-v-a3f2f566] .ant-pagination .ant-pagination-item a{color:#f1f5f9}.dashboard-pro.theme-dark .pro-table[data-v-a3f2f566] .ant-pagination .ant-pagination-item.ant-pagination-item-active{background:#3b82f6;border-color:#3b82f6}.dashboard-pro.theme-dark .pro-table[data-v-a3f2f566] .ant-pagination .ant-pagination-next .ant-pagination-item-link,.dashboard-pro.theme-dark .pro-table[data-v-a3f2f566] .ant-pagination .ant-pagination-prev .ant-pagination-item-link{background:#1c1c1c;border-color:#2a2a2a;color:#f1f5f9}.dashboard-pro .kpi-grid[data-v-a3f2f566]{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px;margin-bottom:20px}.dashboard-pro .setup-guide-card[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:16px;margin-bottom:20px;padding:18px 20px;background:linear-gradient(135deg,rgba(59,130,246,.08),rgba(139,92,246,.08));border:1px solid rgba(59,130,246,.16);border-radius:16px}.dashboard-pro .setup-guide-card .setup-guide-copy[data-v-a3f2f566]{min-width:0}.dashboard-pro .setup-guide-card .setup-guide-title[data-v-a3f2f566]{font-size:16px;font-weight:700;color:#1e293b}.dashboard-pro .setup-guide-card .setup-guide-desc[data-v-a3f2f566]{margin-top:4px;color:#64748b;line-height:1.7}.dashboard-pro .setup-guide-card .setup-guide-path[data-v-a3f2f566]{margin-top:6px;font-size:12px;color:#64748b}.dashboard-pro .setup-guide-card .setup-guide-actions[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px;-ms-flex-negative:0;flex-shrink:0}.dashboard-pro .kpi-card[data-v-a3f2f566]{position:relative;background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:20px;overflow:hidden;-webkit-transition:all .3s cubic-bezier(.4,0,.2,1);transition:all .3s cubic-bezier(.4,0,.2,1)}.dashboard-pro .kpi-card[data-v-a3f2f566]:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-box-shadow:0 10px 40px rgba(0,0,0,.1);box-shadow:0 10px 40px rgba(0,0,0,.1)}.dashboard-pro .kpi-card.clickable[data-v-a3f2f566]{cursor:pointer}.dashboard-pro .kpi-card.clickable .card-arrow[data-v-a3f2f566]{position:absolute;right:16px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);opacity:.4;-webkit-transition:all .3s;transition:all .3s}.dashboard-pro .kpi-card.clickable:hover .card-arrow[data-v-a3f2f566]{opacity:1;right:12px}.dashboard-pro .kpi-card .kpi-glow[data-v-a3f2f566]{position:absolute;top:-50%;right:-50%;width:100%;height:100%;background:radial-gradient(circle,rgba(59,130,246,.15) 0,transparent 70%);pointer-events:none}.dashboard-pro .kpi-card .kpi-content[data-v-a3f2f566]{position:relative;z-index:1}.dashboard-pro .kpi-card .kpi-header[data-v-a3f2f566]{gap:8px;margin-bottom:12px}.dashboard-pro .kpi-card .kpi-header[data-v-a3f2f566],.dashboard-pro .kpi-card .kpi-icon[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.dashboard-pro .kpi-card .kpi-icon[data-v-a3f2f566]{width:32px;height:32px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:8px;background:rgba(59,130,246,.1);color:#3b82f6;font-size:16px}.dashboard-pro .kpi-card .kpi-label[data-v-a3f2f566]{font-size:12px;font-weight:600;color:#64748b;text-transform:uppercase;letter-spacing:.5px}.dashboard-pro .kpi-card .kpi-value[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline;gap:2px}.dashboard-pro .kpi-card .kpi-value .currency[data-v-a3f2f566]{font-size:18px;font-weight:500;color:#64748b}.dashboard-pro .kpi-card .kpi-value .amount[data-v-a3f2f566]{font-size:28px;font-weight:700;color:#1e293b;-webkit-font-feature-settings:"tnum";font-feature-settings:"tnum"}.dashboard-pro .kpi-card .kpi-value .unit[data-v-a3f2f566]{font-size:14px;font-weight:500;color:#64748b;margin-left:4px}.dashboard-pro .kpi-card .kpi-sub[data-v-a3f2f566]{margin-top:8px;font-size:12px;color:#64748b}.dashboard-pro .kpi-card .kpi-sub .label[data-v-a3f2f566]{margin:0 2px}.dashboard-pro .kpi-card .kpi-sub .divider[data-v-a3f2f566]{margin:0 6px;opacity:.5}.dashboard-pro .kpi-card .kpi-sub .highlight[data-v-a3f2f566]{font-weight:600;color:#3b82f6}.dashboard-pro .kpi-card.kpi-primary[data-v-a3f2f566]{background:linear-gradient(135deg,#1e40af,#3b82f6 50%,#60a5fa);border:none}.dashboard-pro .kpi-card.kpi-primary .kpi-icon[data-v-a3f2f566]{background:hsla(0,0%,100%,.2);color:#fff}.dashboard-pro .kpi-card.kpi-primary .kpi-label[data-v-a3f2f566]{color:hsla(0,0%,100%,.8)}.dashboard-pro .kpi-card.kpi-primary .kpi-value .amount[data-v-a3f2f566],.dashboard-pro .kpi-card.kpi-primary .kpi-value .currency[data-v-a3f2f566],.dashboard-pro .kpi-card.kpi-primary .kpi-value .unit[data-v-a3f2f566]{color:#fff}.dashboard-pro .kpi-card.kpi-primary .kpi-sub[data-v-a3f2f566]{color:hsla(0,0%,100%,.7)}.dashboard-pro .kpi-card.kpi-win-rate .kpi-ring[data-v-a3f2f566]{position:absolute;right:12px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:60px;height:60px}.dashboard-pro .kpi-card.kpi-win-rate .kpi-ring svg[data-v-a3f2f566]{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.dashboard-pro .kpi-card.kpi-win-rate .kpi-ring svg .ring-bg[data-v-a3f2f566]{fill:none;stroke:rgba(16,185,129,.15);stroke-width:3}.dashboard-pro .kpi-card.kpi-win-rate .kpi-ring svg .ring-progress[data-v-a3f2f566]{fill:none;stroke:#10b981;stroke-width:3;stroke-linecap:round;-webkit-transition:stroke-dasharray .5s ease;transition:stroke-dasharray .5s ease}.dashboard-pro .kpi-card.kpi-win-rate .kpi-icon[data-v-a3f2f566]{background:rgba(16,185,129,.1);color:#10b981}.dashboard-pro .kpi-card.kpi-profit-factor .kpi-icon[data-v-a3f2f566]{background:rgba(139,92,246,.1);color:#8b5cf6}.dashboard-pro .kpi-card.kpi-drawdown .kpi-icon[data-v-a3f2f566]{background:rgba(239,68,68,.1);color:#ef4444}.dashboard-pro .kpi-card.kpi-drawdown .kpi-value .amount[data-v-a3f2f566]{color:#ef4444}.dashboard-pro .kpi-card.kpi-trades .kpi-icon[data-v-a3f2f566]{background:rgba(6,182,212,.1);color:#06b6d4}.dashboard-pro .kpi-card.kpi-strategies .kpi-icon[data-v-a3f2f566]{background:rgba(245,158,11,.1);color:#f59e0b}.dashboard-pro .chart-row[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:16px;margin-bottom:16px}@media (max-width:1024px){.dashboard-pro .chart-row[data-v-a3f2f566]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.dashboard-pro .chart-panel[data-v-a3f2f566]{background:#fff;border:1px solid #e2e8f0;border-radius:16px;overflow:hidden}.dashboard-pro .chart-panel.chart-main[data-v-a3f2f566]{-webkit-box-flex:2;-ms-flex:2;flex:2}.dashboard-pro .chart-panel.chart-side[data-v-a3f2f566]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:300px}.dashboard-pro .chart-panel.chart-half[data-v-a3f2f566]{-webkit-box-flex:1;-ms-flex:1;flex:1}.dashboard-pro .chart-panel .panel-header[data-v-a3f2f566]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #e2e8f0}.dashboard-pro .chart-panel .panel-header[data-v-a3f2f566],.dashboard-pro .chart-panel .panel-title[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.dashboard-pro .chart-panel .panel-title[data-v-a3f2f566]{gap:8px;font-size:14px;font-weight:600;color:#1e293b}.dashboard-pro .chart-panel .panel-title .anticon[data-v-a3f2f566]{color:#3b82f6}.dashboard-pro .chart-panel .panel-legend[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:16px;font-size:12px;color:#64748b}.dashboard-pro .chart-panel .panel-legend .legend-item[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.dashboard-pro .chart-panel .panel-legend .legend-item .dot[data-v-a3f2f566]{width:10px;height:10px;border-radius:2px}.dashboard-pro .chart-panel .panel-legend .legend-item .dot.bar[data-v-a3f2f566]{background:-webkit-gradient(linear,left top,left bottom,from(#34d399),to(#10b981));background:linear-gradient(180deg,#34d399,#10b981)}.dashboard-pro .chart-panel .panel-legend .legend-item .dot.line[data-v-a3f2f566]{background:-webkit-gradient(linear,left top,right top,from(#3b82f6),to(#8b5cf6));background:linear-gradient(90deg,#3b82f6,#8b5cf6)}.dashboard-pro .chart-panel .panel-legend .legend-item .dot.loss[data-v-a3f2f566]{background:#ef4444}.dashboard-pro .chart-panel .panel-legend .legend-item .dot.profit[data-v-a3f2f566]{background:#10b981}.dashboard-pro .chart-panel .panel-legend.calendar-legend[data-v-a3f2f566]{-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px}.dashboard-pro .chart-panel .panel-legend.calendar-legend .legend-gradient[data-v-a3f2f566]{width:80px;height:10px;border-radius:3px;background:-webkit-gradient(linear,left top,right top,from(#ef4444),color-stop(#fca5a5),color-stop(#f4f4f5),color-stop(#86efac),to(#22c55e));background:linear-gradient(90deg,#ef4444,#fca5a5,#f4f4f5,#86efac,#22c55e)}.dashboard-pro .chart-panel .panel-badge[data-v-a3f2f566]{background:#3b82f6;color:#fff;font-size:11px;font-weight:600;padding:2px 8px;border-radius:10px}.dashboard-pro .chart-panel .chart-body[data-v-a3f2f566]{height:320px;padding:16px}.dashboard-pro .chart-panel .chart-body.chart-sm[data-v-a3f2f566]{height:220px}.dashboard-pro .chart-panel .chart-body.calendar-chart[data-v-a3f2f566]{height:280px}.dashboard-pro .chart-panel .calendar-nav[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.dashboard-pro .chart-panel .calendar-nav .current-month[data-v-a3f2f566]{font-size:14px;font-weight:600;color:#1e293b;min-width:80px;text-align:center}.dashboard-pro .chart-panel .calendar-nav .ant-btn-link[data-v-a3f2f566]{padding:0;height:auto;color:#64748b}.dashboard-pro .chart-panel .calendar-nav .ant-btn-link[data-v-a3f2f566]:hover:not(:disabled){color:#3b82f6}.dashboard-pro .chart-panel .calendar-nav .ant-btn-link[data-v-a3f2f566]:disabled{opacity:.3}.dashboard-pro .chart-panel .profit-calendar[data-v-a3f2f566]{padding:12px 16px;overflow:hidden}.dashboard-pro .chart-panel .profit-calendar .calendar-empty[data-v-a3f2f566],.dashboard-pro .chart-panel .profit-calendar[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.dashboard-pro .chart-panel .profit-calendar .calendar-empty[data-v-a3f2f566]{height:280px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:#64748b}.dashboard-pro .chart-panel .profit-calendar .calendar-empty .anticon[data-v-a3f2f566]{font-size:40px;margin-bottom:10px;opacity:.3}.dashboard-pro .chart-panel .profit-calendar .month-summary[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:20px;margin-bottom:10px;padding:8px 12px;background:rgba(241,245,249,.5);border-radius:8px}.dashboard-pro .chart-panel .profit-calendar .month-summary .summary-item[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:2px}.dashboard-pro .chart-panel .profit-calendar .month-summary .summary-item .summary-label[data-v-a3f2f566]{font-size:10px;color:#64748b;text-transform:uppercase;letter-spacing:.5px}.dashboard-pro .chart-panel .profit-calendar .month-summary .summary-item .summary-value[data-v-a3f2f566]{font-size:15px;font-weight:700;font-family:JetBrains Mono,monospace}.dashboard-pro .chart-panel .profit-calendar .month-summary .summary-item .summary-value.positive[data-v-a3f2f566]{color:#10b981}.dashboard-pro .chart-panel .profit-calendar .month-summary .summary-item .summary-value.negative[data-v-a3f2f566]{color:#ef4444}.dashboard-pro .chart-panel .profit-calendar .calendar-weekdays[data-v-a3f2f566]{display:grid;grid-template-columns:repeat(7,1fr);gap:3px;margin-bottom:4px}.dashboard-pro .chart-panel .profit-calendar .calendar-weekdays .weekday[data-v-a3f2f566]{text-align:center;font-size:10px;font-weight:600;color:#64748b;padding:4px 0}.dashboard-pro .chart-panel .profit-calendar .calendar-grid[data-v-a3f2f566]{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell[data-v-a3f2f566]{height:36px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:6px;background:rgba(241,245,249,.5);border:1px solid transparent;-webkit-transition:all .2s ease;transition:all .2s ease;position:relative}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.empty[data-v-a3f2f566]{background:transparent;border:none}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.no-data[data-v-a3f2f566]{background:rgba(241,245,249,.3)}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.profit[data-v-a3f2f566]{background:linear-gradient(135deg,rgba(34,197,94,.12),rgba(34,197,94,.2));border-color:rgba(34,197,94,.3)}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.profit[data-v-a3f2f566]:hover{background:linear-gradient(135deg,rgba(34,197,94,.2),rgba(34,197,94,.3));-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-box-shadow:0 4px 12px rgba(34,197,94,.2);box-shadow:0 4px 12px rgba(34,197,94,.2)}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.loss[data-v-a3f2f566]{background:linear-gradient(135deg,rgba(239,68,68,.12),rgba(239,68,68,.2));border-color:rgba(239,68,68,.3)}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.loss[data-v-a3f2f566]:hover{background:linear-gradient(135deg,rgba(239,68,68,.2),rgba(239,68,68,.3));-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-box-shadow:0 4px 12px rgba(239,68,68,.2);box-shadow:0 4px 12px rgba(239,68,68,.2)}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell.zero[data-v-a3f2f566]{background:hsla(240,5%,65%,.1);border-color:hsla(240,5%,65%,.2)}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell .day-number[data-v-a3f2f566]{font-size:11px;font-weight:600;color:#1e293b;line-height:1}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell .day-profit[data-v-a3f2f566]{font-size:9px;font-weight:600;font-family:JetBrains Mono,monospace;margin-top:1px;line-height:1}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell .day-profit.positive[data-v-a3f2f566]{color:#10b981}.dashboard-pro .chart-panel .profit-calendar .calendar-grid .calendar-cell .day-profit.negative[data-v-a3f2f566]{color:#ef4444}.dashboard-pro .strategy-ranking[data-v-a3f2f566]{padding:16px}.dashboard-pro .strategy-ranking .empty-state[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:40px;color:#64748b}.dashboard-pro .strategy-ranking .empty-state .anticon[data-v-a3f2f566]{font-size:40px;margin-bottom:12px;opacity:.3}.dashboard-pro .strategy-ranking .ranking-grid[data-v-a3f2f566]{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:12px}.dashboard-pro .strategy-ranking .ranking-card[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:12px;padding:14px 16px;background:rgba(241,245,249,.5);border:1px solid #e2e8f0;border-radius:12px;position:relative;overflow:hidden}.dashboard-pro .strategy-ranking .ranking-card.rank-top[data-v-a3f2f566]{border-color:transparent;background:linear-gradient(135deg,rgba(59,130,246,.08),rgba(139,92,246,.08))}.dashboard-pro .strategy-ranking .ranking-card .rank-badge[data-v-a3f2f566]{width:28px;height:28px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:8px;font-size:12px;font-weight:700;background:#64748b;color:#fff;-ms-flex-negative:0;flex-shrink:0}.dashboard-pro .strategy-ranking .ranking-card .rank-badge.rank-1[data-v-a3f2f566]{background:linear-gradient(135deg,#fbbf24,#f59e0b)}.dashboard-pro .strategy-ranking .ranking-card .rank-badge.rank-2[data-v-a3f2f566]{background:linear-gradient(135deg,#9ca3af,#6b7280)}.dashboard-pro .strategy-ranking .ranking-card .rank-badge.rank-3[data-v-a3f2f566]{background:linear-gradient(135deg,#cd7f32,#b87333)}.dashboard-pro .strategy-ranking .ranking-card .rank-info[data-v-a3f2f566]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.dashboard-pro .strategy-ranking .ranking-card .rank-info .rank-name[data-v-a3f2f566]{font-size:13px;font-weight:600;color:#1e293b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:4px}.dashboard-pro .strategy-ranking .ranking-card .rank-info .rank-stats[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px;-ms-flex-wrap:wrap;flex-wrap:wrap}.dashboard-pro .strategy-ranking .ranking-card .rank-info .rank-stats .stat[data-v-a3f2f566]{font-size:11px}.dashboard-pro .strategy-ranking .ranking-card .rank-info .rank-stats .stat label[data-v-a3f2f566]{color:#64748b;margin-right:4px}.dashboard-pro .strategy-ranking .ranking-card .rank-pnl-bar[data-v-a3f2f566]{position:absolute;bottom:0;left:0;right:0;height:3px;background:rgba(0,0,0,.05)}.dashboard-pro .strategy-ranking .ranking-card .rank-pnl-bar .bar-fill[data-v-a3f2f566]{height:100%;border-radius:0 3px 3px 0;-webkit-transition:width .5s ease;transition:width .5s ease}.dashboard-pro .strategy-ranking .ranking-card .rank-pnl-bar .bar-fill.positive[data-v-a3f2f566]{background:-webkit-gradient(linear,left top,right top,from(#10b981),to(#34d399));background:linear-gradient(90deg,#10b981,#34d399)}.dashboard-pro .strategy-ranking .ranking-card .rank-pnl-bar .bar-fill.negative[data-v-a3f2f566]{background:-webkit-gradient(linear,left top,right top,from(#ef4444),to(#f87171));background:linear-gradient(90deg,#ef4444,#f87171)}.dashboard-pro .table-row[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:16px;margin-top:16px;margin-bottom:16px}@media (max-width:1024px){.dashboard-pro .table-row[data-v-a3f2f566]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.dashboard-pro .table-panel[data-v-a3f2f566]{-webkit-box-flex:1;-ms-flex:1;flex:1;background:#fff;border:1px solid #e2e8f0;border-radius:16px;overflow:hidden}.dashboard-pro .table-panel .panel-header[data-v-a3f2f566]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #e2e8f0}.dashboard-pro .table-panel .panel-header[data-v-a3f2f566],.dashboard-pro .table-panel .panel-title[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.dashboard-pro .table-panel .panel-title[data-v-a3f2f566]{gap:8px;font-size:14px;font-weight:600;color:#1e293b}.dashboard-pro .table-panel .panel-title .anticon[data-v-a3f2f566]{color:#3b82f6}.dashboard-pro .table-panel .panel-title .sound-toggle[data-v-a3f2f566]{margin-left:8px;font-size:16px;cursor:pointer;color:#10b981;-webkit-transition:all .2s;transition:all .2s}.dashboard-pro .table-panel .panel-title .sound-toggle[data-v-a3f2f566]:hover{-webkit-transform:scale(1.1);transform:scale(1.1)}.dashboard-pro .table-panel .panel-title .sound-toggle.sound-off[data-v-a3f2f566]{color:#64748b}.dashboard-pro .table-panel .panel-badge[data-v-a3f2f566]{background:#3b82f6;color:#fff;font-size:11px;font-weight:600;padding:2px 8px;border-radius:10px}.dashboard-pro .orders-panel[data-v-a3f2f566]{margin-bottom:20px}.dashboard-pro .pro-table[data-v-a3f2f566] .ant-table{font-size:13px}.dashboard-pro .pro-table[data-v-a3f2f566] .ant-table-thead>tr>th{background:rgba(241,245,249,.8);font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.5px;color:#64748b;border-bottom:1px solid #e2e8f0;padding:12px 16px}.dashboard-pro .pro-table[data-v-a3f2f566] .ant-table-tbody>tr>td{padding:12px 16px;border-bottom:1px solid #e2e8f0}.dashboard-pro .pro-table[data-v-a3f2f566] .ant-table-tbody>tr:hover>td{background:rgba(59,130,246,.04)}.dashboard-pro .pro-table[data-v-a3f2f566] .ant-pagination{padding:12px 16px;margin:0}.dashboard-pro .symbol-cell .symbol-name[data-v-a3f2f566]{font-weight:600;display:block}.dashboard-pro .symbol-cell .symbol-strategy[data-v-a3f2f566]{font-size:11px;color:#64748b}.dashboard-pro .side-tag[data-v-a3f2f566]{display:inline-block;padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600}.dashboard-pro .side-tag.long[data-v-a3f2f566]{background:rgba(16,185,129,.1);color:#10b981}.dashboard-pro .side-tag.short[data-v-a3f2f566]{background:rgba(239,68,68,.1);color:#ef4444}.dashboard-pro .type-tag[data-v-a3f2f566]{display:inline-block;padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600}.dashboard-pro .type-tag.long[data-v-a3f2f566]{background:rgba(16,185,129,.1);color:#10b981}.dashboard-pro .type-tag.short[data-v-a3f2f566]{background:rgba(239,68,68,.1);color:#ef4444}.dashboard-pro .type-tag.close-long[data-v-a3f2f566]{background:rgba(245,158,11,.1);color:#f59e0b}.dashboard-pro .type-tag.close-short[data-v-a3f2f566]{background:rgba(139,92,246,.1);color:#8b5cf6}.dashboard-pro .symbol-tag[data-v-a3f2f566]{background:rgba(59,130,246,.1);color:#3b82f6}.dashboard-pro .exchange-tag[data-v-a3f2f566],.dashboard-pro .symbol-tag[data-v-a3f2f566]{display:inline-block;padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600}.dashboard-pro .exchange-tag.binance[data-v-a3f2f566]{background:rgba(240,185,11,.1);color:#f0b90b}.dashboard-pro .exchange-tag.okx[data-v-a3f2f566]{background:rgba(139,92,246,.1);color:#8b5cf6}.dashboard-pro .exchange-tag.bitget[data-v-a3f2f566]{background:rgba(6,182,212,.1);color:#06b6d4}.dashboard-pro .exchange-tag.signal[data-v-a3f2f566]{background:rgba(59,130,246,.1);color:#3b82f6}.dashboard-pro .market-type[data-v-a3f2f566]{font-size:10px;color:#64748b;margin-top:2px}.dashboard-pro .status-tag[data-v-a3f2f566]{display:inline-block;padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600}.dashboard-pro .status-tag.pending[data-v-a3f2f566]{background:rgba(245,158,11,.1);color:#f59e0b}.dashboard-pro .status-tag.processing[data-v-a3f2f566]{background:rgba(59,130,246,.1);color:#3b82f6}.dashboard-pro .status-tag.completed[data-v-a3f2f566]{background:rgba(16,185,129,.1);color:#10b981}.dashboard-pro .status-tag.failed[data-v-a3f2f566]{background:rgba(239,68,68,.1);color:#ef4444}.dashboard-pro .status-tag.cancelled[data-v-a3f2f566]{background:rgba(100,116,139,.1);color:#64748b}.dashboard-pro .error-hint[data-v-a3f2f566]{font-size:11px;color:#ef4444;margin-top:4px;cursor:pointer}.dashboard-pro .error-hint .anticon[data-v-a3f2f566]{margin-right:4px}.dashboard-pro .notify-icons[data-v-a3f2f566]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px}.dashboard-pro .notify-icons .notify-icon[data-v-a3f2f566]{color:#64748b;font-size:14px}.dashboard-pro .pnl-cell[data-v-a3f2f566]{text-align:right}.dashboard-pro .pnl-cell .pnl-percent[data-v-a3f2f566]{display:block;font-size:11px}.dashboard-pro .time-cell[data-v-a3f2f566]{font-size:12px;color:#64748b}.dashboard-pro .sub-text[data-v-a3f2f566]{font-size:11px;color:#64748b}.dashboard-pro .text-muted[data-v-a3f2f566]{color:#64748b}.dashboard-pro .positive[data-v-a3f2f566]{color:#10b981}.dashboard-pro .negative[data-v-a3f2f566]{color:#ef4444}@media (max-width:768px){.dashboard-pro[data-v-a3f2f566]{padding:12px}.dashboard-pro .setup-guide-card[data-v-a3f2f566]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;padding:16px}.dashboard-pro .setup-guide-card .setup-guide-actions[data-v-a3f2f566]{width:100%}.dashboard-pro .setup-guide-card .setup-guide-actions .ant-btn[data-v-a3f2f566]{-webkit-box-flex:1;-ms-flex:1;flex:1}.dashboard-pro .kpi-grid[data-v-a3f2f566]{grid-template-columns:repeat(2,1fr);gap:10px}.dashboard-pro .kpi-card[data-v-a3f2f566]{padding:14px}.dashboard-pro .kpi-card .kpi-value .amount[data-v-a3f2f566]{font-size:22px}.dashboard-pro .kpi-card.kpi-win-rate .kpi-ring[data-v-a3f2f566]{width:48px;height:48px;right:8px}.dashboard-pro .chart-panel .chart-body[data-v-a3f2f566]{height:260px;padding:12px}.dashboard-pro .chart-panel .chart-body.chart-sm[data-v-a3f2f566]{height:180px}.dashboard-pro .ranking-grid[data-v-a3f2f566]{grid-template-columns:1fr}}.top-level-tabs[data-v-bbcac474] .ant-tabs-bar{margin-bottom:16px;border-bottom:1px solid #e8e8e8}.top-level-tabs[data-v-bbcac474] .ant-tabs-tab{font-size:15px;padding:12px 20px}.theme-dark .top-level-tabs[data-v-bbcac474] .ant-tabs-bar{border-bottom-color:#303030}.theme-dark .top-level-tabs[data-v-bbcac474] .ant-tabs-tab{color:hsla(0,0%,100%,.65)}.theme-dark .top-level-tabs[data-v-bbcac474] .ant-tabs-tab-active{color:#177ddc}.theme-dark .top-level-tabs[data-v-bbcac474] .ant-tabs-ink-bar{background:#177ddc}.assistant-guide-bar[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px;padding:16px 18px;margin-bottom:16px;border:1px solid rgba(24,144,255,.14);border-radius:16px;background:linear-gradient(135deg,rgba(24,144,255,.08),rgba(114,46,209,.06))}.assistant-guide-bar .assistant-guide-copy[data-v-bbcac474]{min-width:0;-webkit-box-flex:1;-ms-flex:1 1 240px;flex:1 1 240px}.assistant-guide-bar .assistant-guide-eyebrow[data-v-bbcac474]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:4px 10px;margin-bottom:8px;border-radius:999px;background:rgba(24,144,255,.12);color:#1677ff;font-size:12px;font-weight:600}.assistant-guide-bar .assistant-guide-title[data-v-bbcac474]{font-size:16px;font-weight:700;color:#1f2937}.assistant-guide-bar .assistant-guide-desc[data-v-bbcac474]{margin-top:4px;color:#475569;line-height:1.6}.assistant-guide-bar .assistant-guide-steps[data-v-bbcac474]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;-webkit-box-flex:1;-ms-flex:1 1 520px;flex:1 1 520px}.assistant-guide-bar .assistant-step-card[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:10px;min-height:92px;padding:12px;border-radius:14px;background:hsla(0,0%,100%,.66);border:1px solid rgba(148,163,184,.16);-webkit-box-shadow:0 4px 12px rgba(15,23,42,.04);box-shadow:0 4px 12px rgba(15,23,42,.04)}.assistant-guide-bar .assistant-step-index[data-v-bbcac474]{width:28px;height:28px;border-radius:999px;background:linear-gradient(135deg,#1677ff,#6d28d9);color:#fff;font-size:13px;font-weight:700;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-ms-flex-negative:0;flex-shrink:0}.assistant-guide-bar .assistant-step-body[data-v-bbcac474]{min-width:0}.assistant-guide-bar .assistant-step-title[data-v-bbcac474]{font-size:13px;font-weight:700;color:#1f2937}.assistant-guide-bar .assistant-step-desc[data-v-bbcac474]{margin-top:4px;font-size:12px;line-height:1.6;color:#64748b}.assistant-guide-bar .assistant-guide-actions[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px;-ms-flex-negative:0;flex-shrink:0}.strategy-empty-state[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:10px;padding:28px 16px 32px;text-align:center}.strategy-empty-state .strategy-empty-desc[data-v-bbcac474]{max-width:420px;color:#475569;line-height:1.7}.strategy-empty-state .strategy-empty-path[data-v-bbcac474]{font-size:12px;color:#64748b}.trading-assistant[data-v-bbcac474]{padding:0;height:calc(100vh - 120px);background:-webkit-gradient(linear,left top,left bottom,from(#f8fafc),to(#f1f5f9));background:linear-gradient(180deg,#f8fafc,#f1f5f9)}.trading-assistant .strategy-layout[data-v-bbcac474]{height:calc(100vh - 120px)}@media (max-width:768px){.trading-assistant[data-v-bbcac474]{min-height:auto;margin:-24px}.trading-assistant .assistant-guide-bar[data-v-bbcac474]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;margin:0 12px 12px;padding:14px}.trading-assistant .assistant-guide-bar .assistant-guide-steps[data-v-bbcac474]{grid-template-columns:1fr}.trading-assistant .assistant-guide-bar .assistant-guide-actions[data-v-bbcac474]{width:100%}.trading-assistant .assistant-guide-bar .assistant-guide-actions .ant-btn[data-v-bbcac474]{-webkit-box-flex:1;-ms-flex:1;flex:1}.trading-assistant .strategy-layout[data-v-bbcac474]{height:auto;min-height:calc(100vh - 120px)}.trading-assistant .strategy-list-col[data-v-bbcac474]{margin-bottom:12px;height:auto;max-height:50vh}.trading-assistant .strategy-list-col .strategy-list-card[data-v-bbcac474]{height:auto;max-height:50vh}.trading-assistant .strategy-list-col .strategy-list-card .card-title[data-v-bbcac474]{-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;padding:12px 16px}.trading-assistant .strategy-list-col .strategy-list-card .card-title span[data-v-bbcac474]{font-size:14px;font-weight:600}.trading-assistant .strategy-list-col .strategy-list-card .card-title .ant-btn[data-v-bbcac474]{font-size:12px;padding:0 10px;height:28px;line-height:28px}.trading-assistant .strategy-list-col .strategy-list-card[data-v-bbcac474] .ant-card-body{max-height:calc(50vh - 60px);overflow-y:auto;padding:8px;-webkit-overflow-scrolling:touch}.trading-assistant .strategy-list-col .strategy-list-card[data-v-bbcac474] .ant-card-head{padding:0;min-height:48px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474]{padding:12px 8px;margin-bottom:4px;border-radius:8px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta{width:100%}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-action{margin-left:8px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header[data-v-bbcac474]{width:100%}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper[data-v-bbcac474]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;margin-bottom:6px;-ms-flex-wrap:wrap;flex-wrap:wrap}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .exchange-tag[data-v-bbcac474],.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .strategy-type-tag[data-v-bbcac474]{font-size:10px;padding:2px 6px;line-height:1.4;margin:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .exchange-tag .anticon[data-v-bbcac474]{font-size:10px;margin-right:2px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .strategy-name[data-v-bbcac474]{font-size:14px;font-weight:600;-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;margin-top:4px;font-size:11px;-ms-flex-wrap:wrap;flex-wrap:wrap}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info .info-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:3px;-ms-flex-negative:0;flex-shrink:0;font-size:11px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info .info-item .anticon{font-size:11px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info .status-label{font-size:10px;padding:2px 6px;line-height:1.4}.trading-assistant .strategy-detail-col[data-v-bbcac474]{height:auto;min-height:calc(50vh - 60px)}.trading-assistant .strategy-detail-col .strategy-detail-panel[data-v-bbcac474]{gap:12px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card[data-v-bbcac474] .ant-card-body{padding:16px 12px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card[data-v-bbcac474] .ant-card-head{padding:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header[data-v-bbcac474]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left[data-v-bbcac474]{width:100%}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title[data-v-bbcac474]{font-size:18px;font-weight:600;margin-bottom:12px;line-height:1.4;word-break:break-word}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta[data-v-bbcac474]{display:grid;grid-template-columns:1fr 1fr;gap:8px;-webkit-box-align:start;-ms-flex-align:start;align-items:start}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta[data-v-bbcac474] .ant-tag{grid-column:-1;justify-self:start;margin:0;font-size:11px;padding:4px 8px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta .meta-item[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:4px;font-size:12px;line-height:1.5;word-break:break-word}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta .meta-item .anticon[data-v-bbcac474]{font-size:12px;-ms-flex-negative:0;flex-shrink:0;margin-top:2px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta .meta-item>span[data-v-bbcac474]{word-break:break-word;line-height:1.5;-webkit-box-flex:1;-ms-flex:1;flex:1}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta .meta-item span[data-v-bbcac474]:not(.anticon){display:inline;word-break:break-word;overflow-wrap:break-word}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right[data-v-bbcac474]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .ant-btn[data-v-bbcac474]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:100px;font-size:13px;padding:0 12px;height:36px;line-height:36px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .ant-btn .anticon[data-v-bbcac474]{margin-right:4px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-card-body{padding:12px 8px;overflow-x:hidden}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-card-head{padding:0 8px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-tabs .ant-tabs-nav{padding:0 4px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-tabs .ant-tabs-nav .ant-tabs-tab{font-size:13px;padding:8px 10px;margin:0 2px;white-space:nowrap}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-tabs .ant-tabs-content{padding-top:12px;overflow-x:hidden}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-tabs .ant-tabs-content .ant-tabs-tabpane{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:768px) and (max-width:480px){.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta[data-v-bbcac474]{grid-template-columns:1fr}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta[data-v-bbcac474] .ant-tag{grid-column:1}}@media (max-width:480px){.trading-assistant .strategy-list-col .strategy-list-card[data-v-bbcac474],.trading-assistant .strategy-list-col[data-v-bbcac474]{max-height:45vh}.trading-assistant .strategy-list-col .strategy-list-card[data-v-bbcac474] .ant-card-body{max-height:calc(45vh - 60px)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta[data-v-bbcac474]{grid-template-columns:1fr;gap:6px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-meta .meta-item[data-v-bbcac474]{font-size:11px;line-height:1.6}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .ant-btn[data-v-bbcac474]{width:100%;-webkit-box-flex:0;-ms-flex:none;flex:none}}.trading-assistant .strategy-list-col[data-v-bbcac474]{height:100%}.trading-assistant .strategy-list-col .strategy-list-card[data-v-bbcac474]{height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;border-radius:16px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08);border:none;overflow:hidden;-webkit-transition:-webkit-box-shadow .3s ease;transition:-webkit-box-shadow .3s ease;transition:box-shadow .3s ease;transition:box-shadow .3s ease,-webkit-box-shadow .3s ease}.trading-assistant .strategy-list-col .strategy-list-card[data-v-bbcac474]:hover{-webkit-box-shadow:0 8px 32px rgba(0,0,0,.12);box-shadow:0 8px 32px rgba(0,0,0,.12)}.trading-assistant .strategy-list-col .strategy-list-card .card-title[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.trading-assistant .strategy-list-col .strategy-list-card .card-title span[data-v-bbcac474]{font-size:16px;font-weight:700;background:linear-gradient(135deg,#1e3a5f,#2d5a87);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.trading-assistant .strategy-list-col .strategy-list-card .card-title .ant-btn-primary[data-v-bbcac474]{border-radius:8px;background:linear-gradient(135deg,#1890ff,#40a9ff);border:none;-webkit-box-shadow:0 4px 12px rgba(24,144,255,.35);box-shadow:0 4px 12px rgba(24,144,255,.35);-webkit-transition:all .3s ease;transition:all .3s ease}.trading-assistant .strategy-list-col .strategy-list-card .card-title .ant-btn-primary[data-v-bbcac474]:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-box-shadow:0 6px 16px rgba(24,144,255,.45);box-shadow:0 6px 16px rgba(24,144,255,.45)}.trading-assistant .strategy-list-col .strategy-list-card .group-mode-switch[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;padding:8px 0 12px;border-bottom:1px solid #f0f0f0;margin-bottom:12px}.trading-assistant .strategy-list-col .strategy-list-card .group-mode-switch .group-mode-label[data-v-bbcac474]{font-size:13px;color:#8c8c8c;font-weight:500}.trading-assistant .strategy-list-col .strategy-list-card .group-mode-switch[data-v-bbcac474] .ant-radio-group .ant-radio-button-wrapper{font-size:12px;padding:0 10px;height:26px;line-height:24px;border-radius:4px}.trading-assistant .strategy-list-col .strategy-list-card .group-mode-switch[data-v-bbcac474] .ant-radio-group .ant-radio-button-wrapper:first-child{border-radius:4px 0 0 4px}.trading-assistant .strategy-list-col .strategy-list-card .group-mode-switch[data-v-bbcac474] .ant-radio-group .ant-radio-button-wrapper:last-child{border-radius:0 4px 4px 0}.trading-assistant .strategy-list-col .strategy-list-card .group-mode-switch[data-v-bbcac474] .ant-radio-group .ant-radio-button-wrapper .anticon{margin-right:4px}.trading-assistant .strategy-list-col .strategy-list-card[data-v-bbcac474] .ant-card-body{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;background:#fff;padding:12px}.trading-assistant .strategy-list-col .strategy-list-card[data-v-bbcac474] .ant-card-head{background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fafbfc));background:linear-gradient(180deg,#fff,#fafbfc);border-bottom:1px solid #f0f0f0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group[data-v-bbcac474]{margin-bottom:12px;background:#fff;border-radius:12px;border:1px solid #e8ecf1;overflow:hidden}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:10px 12px;background:linear-gradient(135deg,#f8fafc,#f1f5f9);cursor:pointer;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header[data-v-bbcac474]:hover{background:linear-gradient(135deg,#e8f4fd,#e3f0fc)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-left[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-left .collapse-icon[data-v-bbcac474]{font-size:12px;color:#8c8c8c;-webkit-transition:-webkit-transform .2s ease;transition:-webkit-transform .2s ease;transition:transform .2s ease;transition:transform .2s ease,-webkit-transform .2s ease}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-left .group-icon[data-v-bbcac474]{font-size:16px;color:#1890ff}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-left .group-name[data-v-bbcac474]{font-weight:600;font-size:14px;color:#1e3a5f;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-right[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-right .group-status[data-v-bbcac474]{font-size:11px;padding:2px 8px;border-radius:10px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-right .group-status.running[data-v-bbcac474]{background:rgba(14,203,129,.1);color:#0ecb81}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-right .group-status.stopped[data-v-bbcac474]{background:rgba(246,70,93,.1);color:#f6465d}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content[data-v-bbcac474]{padding:4px 8px 8px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:8px 10px;margin-bottom:4px;margin-left:20px;border-left:2px solid #e8ecf1;background:#fafbfc;border-radius:0 8px 8px 0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item[data-v-bbcac474]:last-child{margin-bottom:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item[data-v-bbcac474]:hover{background:#f0f7ff;border-left-color:#1890ff}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item.active[data-v-bbcac474]{background:#e6f4ff;border-left-color:#1890ff;border-left-width:3px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-content[data-v-bbcac474]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item .strategy-item-actions[data-v-bbcac474]{-ms-flex-negative:0;flex-shrink:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474]{cursor:pointer;padding:14px 16px;border-radius:12px;-webkit-transition:all .3s cubic-bezier(.4,0,.2,1);transition:all .3s cubic-bezier(.4,0,.2,1);position:relative;margin-bottom:8px;background:#fafbfc;border:1px solid transparent}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474]:hover{background:linear-gradient(135deg,#f0f7ff,#f5f9ff);border-color:rgba(24,144,255,.2);-webkit-transform:translateX(4px);transform:translateX(4px);-webkit-box-shadow:0 2px 12px rgba(24,144,255,.1);box-shadow:0 2px 12px rgba(24,144,255,.1)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item.active[data-v-bbcac474]{background:linear-gradient(135deg,#e6f4ff,#f0f9ff);border-color:#1890ff;border-left:4px solid #1890ff;-webkit-box-shadow:0 4px 16px rgba(24,144,255,.15);box-shadow:0 4px 16px rgba(24,144,255,.15)}@media (max-width:768px){.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474]{padding:12px 8px;margin:0 4px 4px 4px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item.active[data-v-bbcac474]{border-left-width:2px}}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px;-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .strategy-name[data-v-bbcac474]{font-weight:600;font-size:14px;-ms-flex-negative:0;flex-shrink:0;color:#1e3a5f;-webkit-transition:color .2s ease;transition:color .2s ease}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .exchange-tag[data-v-bbcac474]{-ms-flex-negative:0;flex-shrink:0;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:11px;line-height:1.5;padding:2px 8px;border-radius:6px;background:linear-gradient(135deg,rgba(102,126,234,.1),rgba(118,75,162,.1));border:1px solid rgba(102,126,234,.2);color:#667eea;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .exchange-tag .anticon[data-v-bbcac474]{font-size:11px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .strategy-type-tag[data-v-bbcac474]{-ms-flex-negative:0;flex-shrink:0;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:10px;line-height:1.5;margin-left:4px;padding:2px 8px;border-radius:6px;background:linear-gradient(135deg,rgba(156,39,176,.1),rgba(103,58,183,.1));border:1px solid rgba(156,39,176,.2)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header .strategy-name-wrapper .strategy-type-tag .anticon[data-v-bbcac474]{font-size:10px;margin-right:3px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item .strategy-item-header[data-v-bbcac474] .status-stopped{color:#f6465d!important;border-color:#f6465d!important}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description{max-width:calc(100% - 20px);overflow:hidden}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;gap:12px;margin-top:8px;font-size:12px;color:var(--text-color-secondary,#8c8c8c);-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;max-width:100%;overflow:hidden}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info .status-label{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;padding:4px 12px;border-radius:16px;font-size:11px;font-weight:600;line-height:1;border:1px solid transparent;-ms-flex-negative:0;flex-shrink:0;background:linear-gradient(135deg,#f0f2f5,#e8eaed);color:#595959;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info .status-label:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info .status-running{background:linear-gradient(135deg,rgba(14,203,129,.15),rgba(14,203,129,.08));color:#0ecb81;border-color:rgba(14,203,129,.3);-webkit-box-shadow:0 2px 8px rgba(14,203,129,.2);box-shadow:0 2px 8px rgba(14,203,129,.2)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info .status-running:before{-webkit-animation:statusPulse-bbcac474 2s infinite;animation:statusPulse-bbcac474 2s infinite;-webkit-box-shadow:0 0 8px #0ecb81;box-shadow:0 0 8px #0ecb81}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info .status-stopped{background:linear-gradient(135deg,rgba(246,70,93,.15),rgba(246,70,93,.08));color:#f6465d;border-color:rgba(246,70,93,.3)}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info .status-error{background:linear-gradient(135deg,rgba(255,77,79,.15),rgba(255,77,79,.08));color:#ff4d4f;border-color:rgba(255,77,79,.3)}@-webkit-keyframes statusPulse-bbcac474{0%,to{opacity:1}50%{opacity:.5}}@keyframes statusPulse-bbcac474{0%,to{opacity:1}50%{opacity:.5}}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info .info-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;-ms-flex-negative:1;flex-shrink:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info .info-item.strategy-name-text{font-weight:500;color:#1e3a5f;max-width:120px}.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474] .ant-list-item-meta-description .strategy-item-info/deep/.ant-tag{margin-right:0;font-size:11px;line-height:18px;padding:0 6px}.trading-assistant .strategy-detail-col[data-v-bbcac474]{height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;overflow-y:auto}.trading-assistant .strategy-detail-col .empty-detail[data-v-bbcac474]{height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background:linear-gradient(135deg,hsla(0,0%,100%,.8),rgba(248,250,252,.9));border-radius:16px;border:2px dashed #e0e6ed;-webkit-transition:all .3s ease;transition:all .3s ease}.trading-assistant .strategy-detail-col .empty-detail[data-v-bbcac474]:hover{border-color:#1890ff;background:linear-gradient(135deg,rgba(24,144,255,.02),rgba(24,144,255,.05))}.trading-assistant .strategy-detail-col .empty-detail[data-v-bbcac474] .ant-empty-image{opacity:.6}.trading-assistant .strategy-detail-col .empty-detail[data-v-bbcac474] .ant-empty-description{color:#8c8c8c;font-size:14px}.trading-assistant .strategy-detail-col .strategy-detail-panel[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:16px;min-height:100%}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card[data-v-bbcac474]{-ms-flex-negative:0;flex-shrink:0;background:linear-gradient(135deg,#fff,#f8fafc);border:none;border-radius:16px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08);-webkit-transition:all .3s ease;transition:all .3s ease}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card[data-v-bbcac474]:hover{-webkit-box-shadow:0 8px 32px rgba(0,0,0,.12);box-shadow:0 8px 32px rgba(0,0,0,.12)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card[data-v-bbcac474] .ant-card-head{background:transparent;border-bottom:none}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card[data-v-bbcac474] .ant-card-body{background:transparent;padding:20px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:24px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left[data-v-bbcac474]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:12px;margin-bottom:16px;-ms-flex-wrap:wrap;flex-wrap:wrap}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .strategy-title[data-v-bbcac474]{font-size:20px;font-weight:700;margin:0;background:linear-gradient(135deg,#1e3a5f,#2d5a87);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge[data-v-bbcac474]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;padding:6px 14px;border-radius:20px;font-size:13px;font-weight:600;-webkit-transition:all .3s ease;transition:all .3s ease}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge .status-dot[data-v-bbcac474]{width:8px;height:8px;border-radius:50%;-webkit-animation:pulse-bbcac474 2s infinite;animation:pulse-bbcac474 2s infinite}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge.status-running[data-v-bbcac474]{background:linear-gradient(135deg,rgba(14,203,129,.15),rgba(14,203,129,.08));color:#0ecb81;border:1px solid rgba(14,203,129,.3)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge.status-running .status-dot[data-v-bbcac474]{background:#0ecb81;-webkit-box-shadow:0 0 12px #0ecb81;box-shadow:0 0 12px #0ecb81}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge.status-stopped[data-v-bbcac474]{background:linear-gradient(135deg,rgba(246,70,93,.15),rgba(246,70,93,.08));color:#f6465d;border:1px solid rgba(246,70,93,.3)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge.status-stopped .status-dot[data-v-bbcac474]{background:#f6465d;-webkit-animation:none;animation:none}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge.status-error[data-v-bbcac474]{background:linear-gradient(135deg,rgba(255,77,79,.15),rgba(255,77,79,.08));color:#ff4d4f;border:1px solid rgba(255,77,79,.3)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-title-row .status-badge.status-error .status-dot[data-v-bbcac474]{background:#ff4d4f;-webkit-animation:none;animation:none}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:12px;margin-bottom:14px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px;padding:10px 14px;background:#fff;border-radius:8px;border:1px solid #f0f0f0;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card[data-v-bbcac474]:hover{-webkit-box-shadow:0 2px 8px rgba(0,0,0,.06);box-shadow:0 2px 8px rgba(0,0,0,.06)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-icon[data-v-bbcac474]{width:36px;height:36px;border-radius:8px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;font-size:16px;-ms-flex-negative:0;flex-shrink:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-icon.investment[data-v-bbcac474]{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-icon.equity[data-v-bbcac474]{background:linear-gradient(135deg,#11998e,#38ef7d);color:#fff}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-icon.pnl[data-v-bbcac474]{background:linear-gradient(135deg,#f093fb,#f5576c);color:#fff}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-content[data-v-bbcac474]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-content .stat-label[data-v-bbcac474]{font-size:11px;color:#8c8c8c;margin-bottom:2px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-content .stat-value[data-v-bbcac474]{font-size:15px;font-weight:700;color:#1e3a5f;line-height:1.2}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card .stat-content .stat-value .pnl-percent[data-v-bbcac474]{font-size:12px;font-weight:500;opacity:.8}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card.pnl-card.profit .stat-content .stat-value[data-v-bbcac474]{color:#0ecb81}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .key-stats-grid .stat-card.pnl-card.loss .stat-content .stat-value[data-v-bbcac474]{color:#f6465d}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-tags[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-tags .tag-item[data-v-bbcac474]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;padding:4px 10px;background:#f5f7fa;border-radius:14px;font-size:12px;color:#5a6872;border:1px solid #e8ecf1}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-tags .tag-item .anticon[data-v-bbcac474]{font-size:12px;color:#1890ff}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right[data-v-bbcac474]{-ms-flex-negative:0;flex-shrink:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .action-btn[data-v-bbcac474]{min-width:120px;height:38px;border-radius:8px;font-size:14px;font-weight:600;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:6px;-webkit-transition:all .2s ease;transition:all .2s ease}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .action-btn .anticon[data-v-bbcac474]{font-size:16px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .action-btn.start-btn[data-v-bbcac474]{background:linear-gradient(135deg,#0ecb81,#26d87d);border:none;-webkit-box-shadow:0 2px 8px rgba(14,203,129,.3);box-shadow:0 2px 8px rgba(14,203,129,.3)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .action-btn.start-btn[data-v-bbcac474]:hover{-webkit-box-shadow:0 4px 12px rgba(14,203,129,.4);box-shadow:0 4px 12px rgba(14,203,129,.4)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .action-btn.stop-btn[data-v-bbcac474]{background:linear-gradient(135deg,#f6465d,#ff6b7a);border:none;-webkit-box-shadow:0 2px 8px rgba(246,70,93,.3);box-shadow:0 2px 8px rgba(246,70,93,.3)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-right .action-btn.stop-btn[data-v-bbcac474]:hover{-webkit-box-shadow:0 4px 12px rgba(246,70,93,.4);box-shadow:0 4px 12px rgba(246,70,93,.4)}@-webkit-keyframes pulse-bbcac474{0%,to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}50%{opacity:.6;-webkit-transform:scale(1.1);transform:scale(1.1)}}@keyframes pulse-bbcac474{0%,to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}50%{opacity:.6;-webkit-transform:scale(1.1);transform:scale(1.1)}}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474]{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;background:#fff;border:none;border-radius:16px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08);-webkit-transition:all .3s ease;transition:all .3s ease;min-height:400px}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474]:hover{-webkit-box-shadow:0 8px 32px rgba(0,0,0,.12);box-shadow:0 8px 32px rgba(0,0,0,.12)}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-card-head{background:-webkit-gradient(linear,left top,left bottom,from(#fafbfc),to(#fff));background:linear-gradient(180deg,#fafbfc,#fff);border-bottom:1px solid #f0f0f0;-ms-flex-negative:0;flex-shrink:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-card-body{padding:16px;background:#fff}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-card-body,.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-card-body .ant-tabs{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-card-body .ant-tabs .ant-tabs-bar{-ms-flex-negative:0;flex-shrink:0}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-card-body .ant-tabs .ant-tabs-content{-webkit-box-flex:1;-ms-flex:1;flex:1}.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-card-body .ant-tabs .ant-tabs-tabpane .position-records,.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-content-card[data-v-bbcac474] .ant-card-body .ant-tabs .ant-tabs-tabpane .trading-records{width:100%}.trading-assistant.theme-dark[data-v-bbcac474]{background:-webkit-gradient(linear,left top,left bottom,from(#0d1117),to(#161b22));background:linear-gradient(180deg,#0d1117,#161b22);color:var(--dark-text-color,#fff)}.trading-assistant.theme-dark .creation-mode-toggle[data-v-bbcac474]{background:rgba(24,144,255,.08);border-color:rgba(24,144,255,.2)}.trading-assistant.theme-dark .creation-mode-toggle .mode-hint[data-v-bbcac474]{color:hsla(0,0%,100%,.45)}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-bbcac474]{background:-webkit-gradient(linear,left top,left bottom,from(#1e222d),to(#1a1e28));background:linear-gradient(180deg,#1e222d,#1a1e28);border:1px solid hsla(0,0%,100%,.06);-webkit-box-shadow:0 4px 24px rgba(0,0,0,.25);box-shadow:0 4px 24px rgba(0,0,0,.25)}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card .card-title span[data-v-bbcac474]{background:linear-gradient(135deg,#e0e6ed,#c5ccd6);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-bbcac474] .ant-card-head{background:-webkit-gradient(linear,left top,left bottom,from(#252a36),to(#1e222d));background:linear-gradient(180deg,#252a36,#1e222d);border-bottom-color:hsla(0,0%,100%,.06)}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-bbcac474] .ant-card-head .ant-card-head-title{color:#d1d4dc}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-bbcac474] .ant-card-body{background:transparent}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-bbcac474] .ant-empty-description{color:#868993}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-bbcac474] .ant-list .ant-list-item{border-bottom-color:hsla(0,0%,100%,.06)}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-bbcac474] .ant-list .ant-list-item .ant-list-item-meta-title{color:#d1d4dc}.trading-assistant.theme-dark .strategy-list-col .strategy-list-card[data-v-bbcac474] .ant-list .ant-list-item .ant-list-item-meta-description{color:#868993}.trading-assistant.theme-dark .strategy-list-col .strategy-list-item[data-v-bbcac474]{background:hsla(0,0%,100%,.02);border:1px solid hsla(0,0%,100%,.04)}.trading-assistant.theme-dark .strategy-list-col .strategy-list-item[data-v-bbcac474]:hover{background:linear-gradient(135deg,rgba(24,144,255,.08),rgba(24,144,255,.04));border-color:rgba(24,144,255,.2)}.trading-assistant.theme-dark .strategy-list-col .strategy-list-item.active[data-v-bbcac474]{background:linear-gradient(135deg,rgba(24,144,255,.12),rgba(24,144,255,.06));border-color:#1890ff;-webkit-box-shadow:0 4px 20px rgba(24,144,255,.2);box-shadow:0 4px 20px rgba(24,144,255,.2)}.trading-assistant.theme-dark .strategy-list-col .strategy-list-item .strategy-name[data-v-bbcac474]{color:#e0e6ed}.trading-assistant.theme-dark .strategy-list-col .strategy-list-item .strategy-item-info[data-v-bbcac474]{color:#868993}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card[data-v-bbcac474]{background:linear-gradient(135deg,#1e222d,#1a1e28);border:1px solid hsla(0,0%,100%,.06);-webkit-box-shadow:0 4px 24px rgba(0,0,0,.25);box-shadow:0 4px 24px rgba(0,0,0,.25)}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card[data-v-bbcac474] .ant-card-head{background:transparent;border-bottom:none}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card[data-v-bbcac474] .ant-card-body{background:transparent}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .strategy-title-row .strategy-title[data-v-bbcac474]{background:linear-gradient(135deg,#e0e6ed,#c5ccd6);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .key-stats-grid .stat-card[data-v-bbcac474]{background:hsla(0,0%,100%,.03);border-color:hsla(0,0%,100%,.06)}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .key-stats-grid .stat-card[data-v-bbcac474]:hover{background:hsla(0,0%,100%,.06);border-color:hsla(0,0%,100%,.1)}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .key-stats-grid .stat-card .stat-content .stat-label[data-v-bbcac474]{color:#868993}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .key-stats-grid .stat-card .stat-content .stat-value[data-v-bbcac474]{color:#e0e6ed}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .strategy-tags .tag-item[data-v-bbcac474]{background:hsla(0,0%,100%,.04);border-color:hsla(0,0%,100%,.08);color:#a0a8b3}.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .strategy-tags .tag-item[data-v-bbcac474]:hover{background:rgba(24,144,255,.1);border-color:rgba(24,144,255,.3)}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-bbcac474]{background:-webkit-gradient(linear,left top,left bottom,from(#1e222d),to(#1a1e28));background:linear-gradient(180deg,#1e222d,#1a1e28);border:1px solid hsla(0,0%,100%,.06);-webkit-box-shadow:0 4px 24px rgba(0,0,0,.25);box-shadow:0 4px 24px rgba(0,0,0,.25)}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-bbcac474] .ant-card-head{background:hsla(0,0%,100%,.02);border-bottom-color:hsla(0,0%,100%,.06)}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-bbcac474] .ant-card-head .ant-card-head-title{color:#d1d4dc}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-bbcac474] .ant-card-body{background:transparent}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-bbcac474] .ant-tabs .ant-tabs-nav .ant-tabs-tab{color:#868993}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-bbcac474] .ant-tabs .ant-tabs-nav .ant-tabs-tab:hover{color:#d1d4dc}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-bbcac474] .ant-tabs .ant-tabs-nav .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn{color:#1890ff}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-bbcac474] .ant-tabs .ant-tabs-nav .ant-tabs-ink-bar{background:-webkit-gradient(linear,left top,right top,from(#1890ff),to(#40a9ff));background:linear-gradient(90deg,#1890ff,#40a9ff)}.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-bbcac474] .ant-tabs .ant-tabs-content{color:#d1d4dc}.trading-assistant.theme-dark .empty-detail[data-v-bbcac474] .ant-empty-description,.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-bbcac474] .ant-empty-description{color:#868993}.theme-dark .assistant-guide-bar[data-v-bbcac474]{border-color:rgba(23,125,220,.28);background:linear-gradient(135deg,rgba(23,125,220,.14),rgba(114,46,209,.12))}.theme-dark .assistant-guide-bar .assistant-guide-eyebrow[data-v-bbcac474]{background:rgba(23,125,220,.2);color:#69c0ff}.theme-dark .assistant-guide-bar .assistant-guide-title[data-v-bbcac474]{color:hsla(0,0%,100%,.92)}.theme-dark .assistant-guide-bar .assistant-guide-desc[data-v-bbcac474]{color:hsla(0,0%,100%,.72)}.theme-dark .assistant-guide-bar .assistant-step-card[data-v-bbcac474]{background:rgba(15,23,42,.38);border-color:hsla(0,0%,100%,.08)}.theme-dark .assistant-guide-bar .assistant-step-title[data-v-bbcac474]{color:hsla(0,0%,100%,.9)}.theme-dark .assistant-guide-bar .assistant-step-desc[data-v-bbcac474]{color:hsla(0,0%,100%,.58)}.theme-dark .strategy-empty-state .strategy-empty-desc[data-v-bbcac474]{color:hsla(0,0%,100%,.72)}.theme-dark .strategy-empty-state .strategy-empty-path[data-v-bbcac474]{color:hsla(0,0%,100%,.48)}.ai-filter-box[data-v-bbcac474]{margin-top:12px;padding:14px 14px 12px;border:1px solid #e8e8e8;border-radius:10px;background:-webkit-gradient(linear,left top,left bottom,from(#fafcff),to(#fff));background:linear-gradient(180deg,#fafcff,#fff)}.ai-filter-header[data-v-bbcac474]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px}.ai-filter-header[data-v-bbcac474],.ai-filter-title[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ai-filter-title[data-v-bbcac474]{gap:8px;font-weight:600;color:#262626}.ai-filter-title .anticon[data-v-bbcac474]{color:#1890ff}.ai-filter-hint[data-v-bbcac474]{margin-top:6px;font-size:12px;line-height:1.5;color:#8c8c8c}.symbol-option[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.symbol-name[data-v-bbcac474]{font-weight:600;color:#8f8d8d;margin-right:8px}.symbol-name-extra[data-v-bbcac474]{font-size:12px;color:#999;margin-left:4px}.creation-mode-toggle[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:16px;margin-bottom:16px;padding:14px 16px;background:rgba(24,144,255,.04);border-radius:8px;border:1px solid rgba(24,144,255,.12)}.creation-mode-toggle .mode-meta[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:4px}.creation-mode-toggle .mode-title[data-v-bbcac474]{font-size:14px;font-weight:600;color:#262626}.creation-mode-toggle .mode-hint[data-v-bbcac474]{color:rgba(0,0,0,.45);font-size:12px}@media (max-width:768px){.creation-mode-toggle[data-v-bbcac474]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}}.section-block-title[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:4px;margin-bottom:16px;font-size:14px;font-weight:600;color:#262626}.section-block-desc[data-v-bbcac474]{font-size:12px;font-weight:400;color:#8c8c8c}.simple-mode-hero[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:16px;padding:14px 16px;margin-bottom:16px;border-radius:10px;background:linear-gradient(135deg,rgba(24,144,255,.08),rgba(114,46,209,.06));border:1px solid rgba(24,144,255,.14)}.simple-mode-hero-main[data-v-bbcac474]{min-width:0}.simple-mode-kicker[data-v-bbcac474]{font-size:12px;font-weight:600;color:#1890ff;margin-bottom:4px}.simple-mode-hero-desc[data-v-bbcac474]{font-size:12px;line-height:1.6;color:#595959}.simple-mode-badges[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}.advanced-settings-shell[data-v-bbcac474],.selected-indicator-card[data-v-bbcac474],.simple-essentials-card[data-v-bbcac474]{padding:20px;margin-bottom:18px;border-radius:12px;background:#fafcff;border:1px solid rgba(24,144,255,.12);-webkit-box-shadow:0 8px 24px rgba(15,23,42,.04);box-shadow:0 8px 24px rgba(15,23,42,.04)}.required-label[data-v-bbcac474]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.required-star[data-v-bbcac474]{color:#f5222d;margin-right:4px}.compact-form-item[data-v-bbcac474]{margin-bottom:18px}.compact-grid-row[data-v-bbcac474]{margin-bottom:4px}.execution-step-layout[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:16px}.execution-step-hero[data-v-bbcac474]{padding:16px 18px;border-radius:12px;background:linear-gradient(135deg,rgba(82,196,26,.08),rgba(24,144,255,.08));border:1px solid rgba(24,144,255,.14)}.execution-step-hero-desc[data-v-bbcac474]{font-size:12px;line-height:1.7;color:#595959}.execution-section-card[data-v-bbcac474]{padding:18px 20px;border-radius:12px;background:#fafcff;border:1px solid rgba(24,144,255,.12);-webkit-box-shadow:0 8px 24px rgba(15,23,42,.04);box-shadow:0 8px 24px rgba(15,23,42,.04)}.section-inline-alert[data-v-bbcac474]{margin-top:4px}.notify-channel-grid[data-v-bbcac474]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 12px}.execution-warn-text[data-v-bbcac474]{color:#ff9800}.execution-mode-cards[data-v-bbcac474]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.execution-mode-card[data-v-bbcac474]{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:14px;min-height:110px;padding:16px;border-radius:12px;border:1px solid rgba(24,144,255,.12);background:#fff;cursor:pointer;-webkit-transition:all .2s ease;transition:all .2s ease}.execution-mode-card[data-v-bbcac474]:hover{border-color:rgba(24,144,255,.35);-webkit-box-shadow:0 8px 24px rgba(24,144,255,.08);box-shadow:0 8px 24px rgba(24,144,255,.08)}.execution-mode-card.active[data-v-bbcac474]{border-color:#1890ff;background:linear-gradient(135deg,rgba(24,144,255,.08),rgba(24,144,255,.03));-webkit-box-shadow:0 10px 28px rgba(24,144,255,.12);box-shadow:0 10px 28px rgba(24,144,255,.12)}.execution-mode-card.disabled[data-v-bbcac474]{cursor:not-allowed;opacity:.68;background:#fafafa}.execution-mode-card.disabled[data-v-bbcac474]:hover{border-color:rgba(24,144,255,.12);-webkit-box-shadow:none;box-shadow:none}.execution-mode-card-icon[data-v-bbcac474]{-webkit-box-flex:0;-ms-flex:0 0 42px;flex:0 0 42px;width:42px;height:42px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:12px;font-size:18px}.execution-mode-card-icon.signal[data-v-bbcac474]{color:#1890ff;background:rgba(24,144,255,.1)}.execution-mode-card-icon.live[data-v-bbcac474]{color:#fa8c16;background:rgba(250,140,22,.12)}.execution-mode-card-body[data-v-bbcac474]{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:0}.execution-mode-card-title[data-v-bbcac474]{font-size:14px;font-weight:600;color:#262626;margin-bottom:6px}.execution-mode-card-desc[data-v-bbcac474]{font-size:12px;line-height:1.6;color:#8c8c8c}.execution-mode-card-check[data-v-bbcac474]{position:absolute;top:12px;right:12px;color:#1890ff;font-size:18px}.steps-container[data-v-bbcac474]{margin-bottom:24px}@media (max-width:768px){.steps-container[data-v-bbcac474]{margin-bottom:16px}.steps-container[data-v-bbcac474] .ant-steps-item-title{font-size:12px}.steps-container[data-v-bbcac474] .ant-steps-item-icon{width:24px;height:24px;line-height:24px;font-size:12px}}.form-container[data-v-bbcac474]{min-height:400px;padding:24px 0}.form-container .step-content[data-v-bbcac474]{-webkit-animation:fadeIn-bbcac474 .3s;animation:fadeIn-bbcac474 .3s}.form-container[data-v-bbcac474] .ant-form-item{margin-bottom:20px}@media (max-width:768px){.form-container[data-v-bbcac474]{min-height:300px;padding:16px 0}.form-container .simple-mode-hero[data-v-bbcac474]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.form-container .simple-mode-badges[data-v-bbcac474]{width:100%}.form-container .notify-channel-grid[data-v-bbcac474]{grid-template-columns:repeat(2,minmax(0,1fr))}.form-container .execution-mode-cards[data-v-bbcac474]{grid-template-columns:1fr}.form-container .execution-section-card[data-v-bbcac474],.form-container .execution-step-hero[data-v-bbcac474]{padding:16px}.form-container[data-v-bbcac474] .ant-form-item-label{padding-bottom:4px}.form-container[data-v-bbcac474] .ant-form-item-label label{font-size:13px}.form-container[data-v-bbcac474] .ant-input,.form-container[data-v-bbcac474] .ant-input-number,.form-container[data-v-bbcac474] .ant-select{font-size:14px}.form-container[data-v-bbcac474] .ant-radio-group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:8px}.form-container[data-v-bbcac474] .ant-radio-group .ant-radio-wrapper{font-size:13px}}@media (max-width:480px){.form-container[data-v-bbcac474]{min-height:250px;padding:12px 0}.form-container[data-v-bbcac474] .ant-form-item-label label{font-size:12px}.form-container[data-v-bbcac474] .ant-input,.form-container[data-v-bbcac474] .ant-input-number,.form-container[data-v-bbcac474] .ant-select{font-size:13px}}.strategy-type-selector[data-v-bbcac474]{padding:16px 0}.strategy-type-selector .market-category-selector[data-v-bbcac474]{margin-bottom:16px}.strategy-type-selector .market-category-selector .selector-label[data-v-bbcac474]{font-weight:600;margin-bottom:8px;color:#262626}.strategy-type-selector .market-category-selector[data-v-bbcac474] .ant-radio-group{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px}.strategy-type-selector .strategy-type-card[data-v-bbcac474]{cursor:pointer;-webkit-transition:all .3s;transition:all .3s;height:100%;min-height:180px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.strategy-type-selector .strategy-type-card[data-v-bbcac474]:hover{border-color:#1890ff;-webkit-box-shadow:0 2px 8px rgba(24,144,255,.2);box-shadow:0 2px 8px rgba(24,144,255,.2)}.strategy-type-selector .strategy-type-card.selected[data-v-bbcac474]{border-color:#1890ff;background-color:#e6f7ff;-webkit-box-shadow:0 2px 8px rgba(24,144,255,.3);box-shadow:0 2px 8px rgba(24,144,255,.3)}.strategy-type-selector .strategy-type-card .strategy-type-content[data-v-bbcac474]{text-align:center;padding:16px}.strategy-type-selector .strategy-type-card .strategy-type-content .strategy-type-icon[data-v-bbcac474]{font-size:48px;color:#1890ff;margin-bottom:16px}.strategy-type-selector .strategy-type-card .strategy-type-content h3[data-v-bbcac474]{font-size:18px;font-weight:600;margin-bottom:8px;color:#1f1f1f}.strategy-type-selector .strategy-type-card .strategy-type-content p[data-v-bbcac474]{font-size:14px;color:#8c8c8c;margin:0;line-height:1.6}.indicator-option[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:12px}.indicator-option .indicator-option-main[data-v-bbcac474]{-webkit-box-flex:1;-ms-flex:1;flex:1}.indicator-option .indicator-name[data-v-bbcac474]{display:block;color:#262626;font-weight:600}.indicator-option-desc[data-v-bbcac474]{display:block;margin-top:2px;color:#8c8c8c;font-size:12px;line-height:1.5}.selected-indicator-header[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px;margin-bottom:8px}.selected-indicator-name[data-v-bbcac474]{font-weight:600;color:#262626}.indicator-description[data-v-bbcac474]{border-radius:4px;color:var(--text-color,#666);font-size:14px;line-height:1.6}.theme-dark .advanced-settings-shell[data-v-bbcac474],.theme-dark .creation-mode-toggle[data-v-bbcac474],.theme-dark .selected-indicator-card[data-v-bbcac474],.theme-dark .simple-essentials-card[data-v-bbcac474]{background:hsla(0,0%,100%,.04);border-color:hsla(0,0%,100%,.1)}.theme-dark .indicator-option .indicator-name[data-v-bbcac474],.theme-dark .mode-title[data-v-bbcac474],.theme-dark .section-block-title[data-v-bbcac474],.theme-dark .selected-indicator-name[data-v-bbcac474]{color:hsla(0,0%,100%,.9)}.theme-dark .indicator-option-desc[data-v-bbcac474],.theme-dark .mode-hint[data-v-bbcac474],.theme-dark .section-block-desc[data-v-bbcac474]{color:hsla(0,0%,100%,.6)}.theme-dark .simple-mode-hero[data-v-bbcac474]{background:linear-gradient(135deg,rgba(24,144,255,.14),rgba(114,46,209,.12));border-color:rgba(64,169,255,.18)}.theme-dark .execution-step-hero[data-v-bbcac474]{background:linear-gradient(135deg,rgba(82,196,26,.14),rgba(24,144,255,.14));border-color:rgba(64,169,255,.18)}.theme-dark .execution-mode-card[data-v-bbcac474]{background:hsla(0,0%,100%,.03);border-color:hsla(0,0%,100%,.08)}.theme-dark .execution-mode-card[data-v-bbcac474]:hover{border-color:rgba(64,169,255,.3);-webkit-box-shadow:0 8px 24px rgba(24,144,255,.12);box-shadow:0 8px 24px rgba(24,144,255,.12)}.theme-dark .execution-mode-card.active[data-v-bbcac474]{background:linear-gradient(135deg,rgba(24,144,255,.16),rgba(24,144,255,.08));border-color:#1890ff}.theme-dark .execution-mode-card.disabled[data-v-bbcac474]{background:hsla(0,0%,100%,.02)}.theme-dark .execution-mode-card-title[data-v-bbcac474]{color:#e0e6ed}.theme-dark .execution-mode-card-desc[data-v-bbcac474]{color:hsla(0,0%,100%,.6)}.theme-dark .simple-mode-kicker[data-v-bbcac474]{color:#69c0ff}.theme-dark .execution-step-hero-desc[data-v-bbcac474],.theme-dark .simple-mode-hero-desc[data-v-bbcac474]{color:hsla(0,0%,100%,.72)}.indicator-params-form[data-v-bbcac474]{padding:12px;background-color:var(--bg-color-secondary,#f5f7fa);border-radius:6px;border:1px dashed var(--border-color,#e0e0e0)}.indicator-params-form .param-item[data-v-bbcac474]{margin-bottom:12px}.indicator-params-form .param-label[data-v-bbcac474]{display:block;font-size:13px;color:var(--text-color,#666);margin-bottom:4px;font-weight:500}.form-item-hint[data-v-bbcac474]{margin-top:4px;font-size:12px;color:var(--text-color-secondary,#8c8c8c)}.test-result[data-v-bbcac474]{margin-top:8px;padding:8px;border-radius:4px;font-size:14px}.test-result.success[data-v-bbcac474]{background-color:#f6ffed;border:1px solid #b7eb8f;color:#52c41a}.ip-whitelist-tip[data-v-bbcac474]{margin-top:12px;padding:12px;background-color:#e6f7ff;border:1px solid #91d5ff;border-radius:4px;font-size:13px;color:#1890ff;line-height:1.6}.ip-whitelist-tip .anticon[data-v-bbcac474]{margin-right:6px;color:#1890ff}.ip-whitelist-tip .ip-list[data-v-bbcac474]{margin-top:8px;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:6px}.ip-whitelist-tip .ip-list .ant-tag[data-v-bbcac474]{margin:0;font-family:Courier New,monospace;font-size:12px}.ip-whitelist-tip.error[data-v-bbcac474]{background-color:#fff2f0;border:1px solid #ffccc7;color:#ff4d4f}@-webkit-keyframes fadeIn-bbcac474{0%{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes fadeIn-bbcac474{0%{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}[data-v-bbcac474] .danger-item{color:#ff4d4f}[data-v-bbcac474] .mobile-modal .ant-modal{top:20px;padding-bottom:0}[data-v-bbcac474] .mobile-modal .ant-modal-content{max-height:calc(100vh - 40px);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}[data-v-bbcac474] .mobile-modal .ant-modal-body{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:16px}[data-v-bbcac474] .mobile-modal .ant-modal-footer{padding:12px 16px;border-top:1px solid #e8e8e8;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}[data-v-bbcac474] .mobile-modal .ant-modal-footer .ant-btn{font-size:13px;padding:0 12px;height:32px}.add-symbol-modal-content .market-tabs[data-v-bbcac474],.add-symbol-modal-content .symbol-search-section[data-v-bbcac474]{margin-bottom:16px}.add-symbol-modal-content .section-title[data-v-bbcac474]{font-weight:500;margin-bottom:8px;color:rgba(0,0,0,.85);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.add-symbol-modal-content .hot-symbols-section[data-v-bbcac474],.add-symbol-modal-content .search-results-section[data-v-bbcac474]{margin-bottom:16px}.add-symbol-modal-content .symbol-list .symbol-list-item[data-v-bbcac474]{cursor:pointer;-webkit-transition:background-color .3s;transition:background-color .3s;padding:8px 12px;border-radius:4px}.add-symbol-modal-content .symbol-list .symbol-list-item[data-v-bbcac474]:hover{background-color:#f5f5f5}.add-symbol-modal-content .symbol-item-content[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.add-symbol-modal-content .symbol-item-content .symbol-code[data-v-bbcac474]{font-weight:500;margin-right:8px}.add-symbol-modal-content .symbol-item-content .symbol-name[data-v-bbcac474]{color:rgba(0,0,0,.45)}.add-symbol-modal-content .selected-symbol-section[data-v-bbcac474]{padding:12px;background-color:#f6ffed;border:1px solid #b7eb8f;border-radius:4px;margin-top:16px}.add-symbol-modal-content .selected-symbol-section .selected-symbol-info[data-v-bbcac474]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-top:8px}.add-symbol-modal-content .selected-symbol-section .selected-symbol-info .symbol-code[data-v-bbcac474]{font-weight:500;margin-right:8px}.add-symbol-modal-content .selected-symbol-section .selected-symbol-info .symbol-name[data-v-bbcac474]{color:rgba(0,0,0,.45)}body.dark .mode-selector-modal .ant-modal-content{background:#1e222d;border:1px solid hsla(0,0%,100%,.08)}body.dark .mode-selector-modal .ant-modal-content .ant-modal-header{background:#252a36;border-bottom-color:hsla(0,0%,100%,.06)}body.dark .mode-selector-modal .ant-modal-content .ant-modal-header .ant-modal-title{color:#e0e6ed}body.dark .mode-selector-modal .ant-modal-content .ant-modal-close-x{color:hsla(0,0%,100%,.45)}body.dark .mode-selector-modal .ant-modal-content .ant-modal-body{color:#d1d4dc}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content{background:#1e222d;border:1px solid hsla(0,0%,100%,.08);-webkit-box-shadow:0 18px 48px rgba(0,0,0,.45);box-shadow:0 18px 48px rgba(0,0,0,.45)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .ant-modal-header{background:-webkit-gradient(linear,left top,left bottom,from(#252a36),to(#1e222d));background:linear-gradient(180deg,#252a36,#1e222d);border-bottom-color:hsla(0,0%,100%,.06)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .ant-modal-header .ant-modal-title{color:#e0e6ed}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .ant-modal-close-x{color:hsla(0,0%,100%,.45)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .ant-modal-body{color:#d1d4dc;background:-webkit-gradient(linear,left top,left bottom,from(rgba(19,23,31,.72)),to(rgba(30,34,45,.9)));background:linear-gradient(180deg,rgba(19,23,31,.72),rgba(30,34,45,.9))}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .creation-mode-toggle{background:rgba(24,144,255,.08);border-color:rgba(24,144,255,.2)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .creation-mode-toggle .mode-hint,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .creation-mode-toggle .mode-title{color:hsla(0,0%,100%,.72)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-title{color:hsla(0,0%,100%,.65)!important}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-description{color:hsla(0,0%,100%,.35)!important}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-icon{border-color:hsla(0,0%,100%,.2)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-icon .ant-steps-icon{color:hsla(0,0%,100%,.45)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-finish .ant-steps-item-icon,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-process .ant-steps-item-icon{border-color:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-tail:after{background:hsla(0,0%,100%,.1)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-form-item-label>label{color:hsla(0,0%,100%,.75)}body.dark .strategy-form-modal.strategy-form-modal-dark .notify-channel-grid .ant-checkbox-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-height:40px;padding:0 12px;border-radius:10px;background:hsla(0,0%,100%,.03);border:1px solid hsla(0,0%,100%,.08);color:hsla(0,0%,100%,.72)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number{background:#1a1e28;border-color:hsla(0,0%,100%,.12);color:#d1d4dc}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number::-webkit-input-placeholder,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input::-webkit-input-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number::-moz-placeholder,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input::-moz-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number:-ms-input-placeholder,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input:-ms-input-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number::-ms-input-placeholder,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input::-ms-input-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number::placeholder,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input::placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number:focus,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number:hover,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input:focus,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input:hover{border-color:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number-handler-wrap{background:#252a36;border-left-color:hsla(0,0%,100%,.12)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number-handler-wrap .ant-input-number-handler{border-bottom-color:hsla(0,0%,100%,.08);color:hsla(0,0%,100%,.45)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number-handler-wrap .ant-input-number-handler:hover{color:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-select .ant-select-selection{background:#1a1e28;border-color:hsla(0,0%,100%,.12);color:#d1d4dc}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-select .ant-select-selection .ant-select-arrow{color:hsla(0,0%,100%,.35)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-select .ant-select-selection:hover{border-color:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-radio-group .ant-radio-button-wrapper{background:#1a1e28;border-color:hsla(0,0%,100%,.12);color:hsla(0,0%,100%,.65)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-radio-group .ant-radio-button-wrapper:hover{color:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#1890ff;border-color:#1890ff;color:#fff}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-radio-group .ant-radio-wrapper{color:hsla(0,0%,100%,.65)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-switch{background:hsla(0,0%,100%,.15)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-switch.ant-switch-checked{background:#1890ff}body.dark .strategy-form-modal.strategy-form-modal-dark textarea.ant-input{background:#1a1e28;border-color:hsla(0,0%,100%,.12);color:#d1d4dc}body.dark .strategy-form-modal.strategy-form-modal-dark textarea.ant-input::-webkit-input-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark textarea.ant-input::-moz-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark textarea.ant-input:-ms-input-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark textarea.ant-input::-ms-input-placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark textarea.ant-input::placeholder{color:hsla(0,0%,100%,.25)}body.dark .strategy-form-modal.strategy-form-modal-dark .ant-form-explain,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-form-extra{color:hsla(0,0%,100%,.35)}body.dark .strategy-form-modal.strategy-form-modal-dark .advanced-settings-shell,body.dark .strategy-form-modal.strategy-form-modal-dark .execution-section-card,body.dark .strategy-form-modal.strategy-form-modal-dark .selected-indicator-card,body.dark .strategy-form-modal.strategy-form-modal-dark .simple-essentials-card{background:hsla(0,0%,100%,.03);border-color:hsla(0,0%,100%,.08);-webkit-box-shadow:none;box-shadow:none}body.dark .strategy-form-modal.strategy-form-modal-dark .simple-mode-hero{background:linear-gradient(135deg,rgba(24,144,255,.16),rgba(114,46,209,.14));border-color:rgba(64,169,255,.2)}body.dark .strategy-form-modal.strategy-form-modal-dark .execution-step-hero{background:linear-gradient(135deg,rgba(82,196,26,.16),rgba(24,144,255,.14));border-color:rgba(64,169,255,.2)}body.dark .strategy-form-modal.strategy-form-modal-dark .mode-title,body.dark .strategy-form-modal.strategy-form-modal-dark .section-block-title,body.dark .strategy-form-modal.strategy-form-modal-dark .selected-indicator-name{color:#e0e6ed}body.dark .strategy-form-modal.strategy-form-modal-dark .execution-step-hero-desc,body.dark .strategy-form-modal.strategy-form-modal-dark .form-item-hint,body.dark .strategy-form-modal.strategy-form-modal-dark .indicator-description,body.dark .strategy-form-modal.strategy-form-modal-dark .section-block-desc,body.dark .strategy-form-modal.strategy-form-modal-dark .simple-mode-hero-desc{color:hsla(0,0%,100%,.62)}body.dark .strategy-form-modal.strategy-form-modal-dark .ai-filter-box{background:#1a1e28;border-color:hsla(0,0%,100%,.1)}body.dark .strategy-form-modal.strategy-form-modal-dark .ai-filter-box .ai-filter-title{color:#e0e6ed}body.dark .strategy-form-modal.strategy-form-modal-dark .ai-filter-box .ai-filter-hint{color:hsla(0,0%,100%,.4)}body.dark .strategy-form-modal.strategy-form-modal-dark .form-container{color:#d1d4dc}body.dark .strategy-form-modal.strategy-form-modal-dark .form-container .ant-form-item-label>label{color:hsla(0,0%,100%,.75)}body.dark .strategy-form-modal.strategy-form-modal-dark .ip-whitelist-tip{background:rgba(24,144,255,.08);border-color:rgba(24,144,255,.2);color:#40a9ff}body.dark .strategy-form-modal.strategy-form-modal-dark .indicator-description{background:#1a1e28;color:hsla(0,0%,100%,.65)}body.dark .strategy-form-modal.strategy-form-modal-dark .indicator-params-form{background:#1a1e28;border-color:hsla(0,0%,100%,.1)}body.dark .strategy-form-modal.strategy-form-modal-dark .indicator-params-form .param-label{color:hsla(0,0%,100%,.65)}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-type-selector .strategy-type-card{border-color:hsla(0,0%,100%,.1);background:#1a1e28;color:#d1d4dc}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-type-selector .strategy-type-card:hover{border-color:#177ddc}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-type-selector .strategy-type-card.selected{border-color:#177ddc;background:rgba(23,125,220,.08)}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-type-selector .strategy-type-card .strategy-type-content h3{color:#e0e6ed}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-type-selector .strategy-type-card .strategy-type-content p{color:hsla(0,0%,100%,.45)}body.dark .strategy-form-modal.strategy-form-modal-dark .strategy-type-selector .market-category-selector .selector-label{color:hsla(0,0%,100%,.75)}body.dark .ant-modal-wrap .ant-modal-content{background:#1e222d}body.dark .ant-modal-wrap .ant-modal-content .ant-modal-header{background:#252a36;border-bottom-color:hsla(0,0%,100%,.06)}body.dark .ant-modal-wrap .ant-modal-content .ant-modal-header .ant-modal-title{color:#e0e6ed}body.dark .ant-modal-wrap .ant-modal-content .ant-modal-close-x{color:hsla(0,0%,100%,.45)}body.dark .ant-modal-wrap .ant-modal-content .ant-modal-body{color:#d1d4dc}body.dark .ant-modal-wrap .ant-modal-content .ant-modal-footer{border-top-color:hsla(0,0%,100%,.06);background:#252a36}body.dark .ant-select-dropdown{background:#1e222d;border:1px solid hsla(0,0%,100%,.1);-webkit-box-shadow:0 4px 12px rgba(0,0,0,.4);box-shadow:0 4px 12px rgba(0,0,0,.4)}body.dark .ant-select-dropdown .ant-select-dropdown-menu-item{color:#d1d4dc}body.dark .ant-select-dropdown .ant-select-dropdown-menu-item-active,body.dark .ant-select-dropdown .ant-select-dropdown-menu-item:hover{background:rgba(24,144,255,.1)}body.dark .ant-select-dropdown .ant-select-dropdown-menu-item-selected{background:rgba(24,144,255,.15);color:#1890ff}body.dark .ant-modal-wrap .ant-spin-text{color:hsla(0,0%,100%,.65)}body.dark .ant-modal-wrap .ant-alert{background:rgba(24,144,255,.06);border-color:rgba(24,144,255,.2)}body.dark .ant-modal-wrap .ant-alert .ant-alert-message{color:hsla(0,0%,100%,.75)}body.dark .ant-modal-wrap .ant-alert .ant-alert-description{color:hsla(0,0%,100%,.55)} \ No newline at end of file diff --git a/frontend/dist/css/971.cc4abc36.css b/frontend/dist/css/971.cc4abc36.css deleted file mode 100644 index 4c08d5b..0000000 --- a/frontend/dist/css/971.cc4abc36.css +++ /dev/null @@ -1 +0,0 @@ -.profile-page[data-v-06c79ed5]{padding:24px;min-height:calc(100vh - 120px);background:-webkit-gradient(linear,left top,left bottom,from(#f8fafc),to(#f1f5f9));background:linear-gradient(180deg,#f8fafc,#f1f5f9)}.profile-page .page-header[data-v-06c79ed5]{margin-bottom:24px}.profile-page .page-header .page-title[data-v-06c79ed5]{font-size:24px;font-weight:700;margin:0 0 8px 0;color:#1e3a5f;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:12px}.profile-page .page-header .page-title .anticon[data-v-06c79ed5]{font-size:28px;color:#1890ff}.profile-page .page-header .page-desc[data-v-06c79ed5]{color:#64748b;font-size:14px;margin:0}.profile-page .profile-cards-row[data-v-06c79ed5]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.profile-page .profile-cards-row .profile-card-col .ant-card[data-v-06c79ed5],.profile-page .profile-cards-row .profile-card-col[data-v-06c79ed5],.profile-page .profile-cards-row .right-cards-col .ant-card[data-v-06c79ed5],.profile-page .profile-cards-row .right-cards-col[data-v-06c79ed5]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .profile-cards-row .profile-card-col .ant-card[data-v-06c79ed5],.profile-page .profile-cards-row .right-cards-col .ant-card[data-v-06c79ed5]{height:100%}.profile-page .profile-cards-row .profile-card-col[data-v-06c79ed5] .ant-card-body,.profile-page .profile-cards-row .right-cards-col[data-v-06c79ed5] .ant-card-body{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .profile-cards-row .right-cards-row[data-v-06c79ed5]{height:100%;display:-webkit-box;display:-ms-flexbox;display:flex}.profile-page .profile-cards-row .right-cards-row .ant-col .ant-card[data-v-06c79ed5],.profile-page .profile-cards-row .right-cards-row .ant-col[data-v-06c79ed5]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .profile-cards-row .right-cards-row .ant-col .ant-card[data-v-06c79ed5]{height:100%}.profile-page .profile-cards-row .right-cards-row .ant-col[data-v-06c79ed5] .ant-card-body{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .profile-card[data-v-06c79ed5]{border-radius:12px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08);text-align:center}.profile-page .profile-card .avatar-section[data-v-06c79ed5]{padding:20px 0}.profile-page .profile-card .avatar-section .ant-avatar[data-v-06c79ed5]{-webkit-box-shadow:0 4px 12px rgba(0,0,0,.15);box-shadow:0 4px 12px rgba(0,0,0,.15)}.profile-page .profile-card .avatar-section .username[data-v-06c79ed5]{margin:16px 0 8px;font-size:20px;font-weight:600;color:#1e3a5f}.profile-page .profile-card .avatar-section .user-role[data-v-06c79ed5]{margin:0}.profile-page .profile-card .profile-info[data-v-06c79ed5]{text-align:left;-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:distribute;justify-content:space-around}.profile-page .profile-card .profile-info .info-item[data-v-06c79ed5]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:12px 0;border-bottom:1px solid #f0f0f0}.profile-page .profile-card .profile-info .info-item[data-v-06c79ed5]:last-child{border-bottom:none}.profile-page .profile-card .profile-info .info-item .anticon[data-v-06c79ed5]{font-size:16px;color:#1890ff;margin-right:12px}.profile-page .profile-card .profile-info .info-item .label[data-v-06c79ed5]{color:#64748b;margin-right:8px}.profile-page .profile-card .profile-info .info-item .value[data-v-06c79ed5]{color:#1e3a5f;font-weight:500}.profile-page .edit-card[data-v-06c79ed5]{border-radius:12px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08)}.profile-page .edit-card .password-form[data-v-06c79ed5],.profile-page .edit-card .profile-form[data-v-06c79ed5]{max-width:500px}.profile-page .edit-card .password-form[data-v-06c79ed5] .ant-input,.profile-page .edit-card .password-form[data-v-06c79ed5] .ant-input-password,.profile-page .edit-card .profile-form[data-v-06c79ed5] .ant-input,.profile-page .edit-card .profile-form[data-v-06c79ed5] .ant-input-password{border-radius:8px}.profile-page .edit-card .password-form .email-hint[data-v-06c79ed5],.profile-page .edit-card .profile-form .email-hint[data-v-06c79ed5]{margin-top:8px;font-size:12px;color:rgba(0,0,0,.45)}.profile-page .edit-card .password-form .email-hint.email-warning[data-v-06c79ed5],.profile-page .edit-card .profile-form .email-hint.email-warning[data-v-06c79ed5]{color:#faad14}.profile-page .edit-card .amount-positive[data-v-06c79ed5]{color:#52c41a;font-weight:600}.profile-page .edit-card .amount-negative[data-v-06c79ed5]{color:#ff4d4f;font-weight:600}.profile-page .edit-card .notification-settings-form .field-hint[data-v-06c79ed5]{margin-top:6px;font-size:12px;color:rgba(0,0,0,.45);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px}.profile-page .edit-card .notification-settings-form .field-hint .anticon[data-v-06c79ed5]{font-size:12px}.profile-page .edit-card .notification-settings-form[data-v-06c79ed5] .ant-checkbox-group{width:100%}.profile-page .edit-card .notification-settings-form[data-v-06c79ed5] .ant-checkbox-wrapper{margin-bottom:8px}.profile-page .credits-card[data-v-06c79ed5]{border-radius:12px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08);background:linear-gradient(135deg,#667eea,#764ba2);color:#fff}.profile-page .credits-card[data-v-06c79ed5] .ant-card-body{background:transparent;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .credits-card[data-v-06c79ed5] .ant-divider{border-color:hsla(0,0%,100%,.2)}.profile-page .credits-card .credits-header .credits-title[data-v-06c79ed5]{font-size:16px;font-weight:600;margin:0;color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.profile-page .credits-card .credits-header .credits-title .anticon[data-v-06c79ed5]{font-size:18px}.profile-page .credits-card .credits-body[data-v-06c79ed5]{padding:20px 0;text-align:center;-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.profile-page .credits-card .credits-body .credits-amount .amount-value[data-v-06c79ed5]{font-size:42px;font-weight:700;color:#fff;text-shadow:0 2px 4px rgba(0,0,0,.2)}.profile-page .credits-card .credits-body .credits-amount .amount-label[data-v-06c79ed5]{font-size:16px;color:hsla(0,0%,100%,.9);margin-left:8px}.profile-page .credits-card .credits-body .vip-status[data-v-06c79ed5]{margin-top:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:6px;font-size:13px}.profile-page .credits-card .credits-body .vip-status .vip-active[data-v-06c79ed5]{color:gold}.profile-page .credits-card .credits-body .vip-status .vip-expired[data-v-06c79ed5]{color:hsla(0,0%,100%,.6)}.profile-page .credits-card .credits-body .vip-status .no-vip[data-v-06c79ed5]{color:hsla(0,0%,100%,.7)}.profile-page .credits-card .credits-actions[data-v-06c79ed5]{text-align:center;margin-top:auto}.profile-page .credits-card .credits-actions .ant-btn[data-v-06c79ed5]{border-radius:20px;padding:0 24px;height:36px;font-weight:500;background:#fff;color:#667eea;border:none}.profile-page .credits-card .credits-actions .ant-btn[data-v-06c79ed5]:hover{background:hsla(0,0%,100%,.9);color:#764ba2}.profile-page .credits-card .credits-hint[data-v-06c79ed5]{margin-top:12px;text-align:center;font-size:12px;color:hsla(0,0%,100%,.7);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:6px}.profile-page .referral-card[data-v-06c79ed5]{border-radius:12px;-webkit-box-shadow:0 4px 20px rgba(0,0,0,.08);box-shadow:0 4px 20px rgba(0,0,0,.08);background:linear-gradient(135deg,#11998e,#38ef7d);color:#fff}.profile-page .referral-card[data-v-06c79ed5] .ant-card-body{background:transparent;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .referral-card[data-v-06c79ed5] .ant-divider{border-color:hsla(0,0%,100%,.2)}.profile-page .referral-card .referral-header .referral-title[data-v-06c79ed5]{font-size:16px;font-weight:600;margin:0;color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.profile-page .referral-card .referral-header .referral-title .anticon[data-v-06c79ed5]{font-size:18px}.profile-page .referral-card .referral-body[data-v-06c79ed5]{padding:12px 0;-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.profile-page .referral-card .referral-body .referral-stats[data-v-06c79ed5]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around}.profile-page .referral-card .referral-body .referral-stats .stat-item[data-v-06c79ed5]{text-align:center}.profile-page .referral-card .referral-body .referral-stats .stat-item .stat-value[data-v-06c79ed5]{font-size:28px;font-weight:700;color:#fff;display:block}.profile-page .referral-card .referral-body .referral-stats .stat-item .stat-label[data-v-06c79ed5]{font-size:12px;color:hsla(0,0%,100%,.8)}.profile-page .referral-card .referral-body .referral-link-section .link-label[data-v-06c79ed5]{font-size:12px;color:hsla(0,0%,100%,.9);margin-bottom:6px}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-06c79ed5] .ant-input{background:hsla(0,0%,100%,.2);border:1px solid hsla(0,0%,100%,.3);color:#fff}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-06c79ed5] .ant-input::-webkit-input-placeholder{color:hsla(0,0%,100%,.6)}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-06c79ed5] .ant-input::-moz-placeholder{color:hsla(0,0%,100%,.6)}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-06c79ed5] .ant-input:-ms-input-placeholder{color:hsla(0,0%,100%,.6)}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-06c79ed5] .ant-input::-ms-input-placeholder{color:hsla(0,0%,100%,.6)}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-06c79ed5] .ant-input::placeholder{color:hsla(0,0%,100%,.6)}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-06c79ed5] .anticon-copy{color:#fff}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-06c79ed5] .anticon-copy:hover{color:gold}.profile-page .referral-card .referral-body .referral-hint[data-v-06c79ed5]{margin-top:auto;text-align:center;font-size:12px;color:hsla(0,0%,100%,.85);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:6px}.profile-page .referral-card .referral-body .referral-hint .anticon-gift[data-v-06c79ed5]{color:gold}.profile-page .referral-user-cell[data-v-06c79ed5]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:10px}.profile-page .referral-user-cell .user-info[data-v-06c79ed5]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .referral-user-cell .user-info .nickname[data-v-06c79ed5]{font-weight:500;color:#333}.profile-page .referral-user-cell .user-info .username[data-v-06c79ed5]{font-size:12px;color:#999}.profile-page .exchange-config-section .credential-hint[data-v-06c79ed5]{font-family:SFMono-Regular,Consolas,monospace;font-size:13px;color:#666}.profile-page .test-result-msg[data-v-06c79ed5]{margin-top:8px;font-size:13px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px}.profile-page .test-result-msg.success[data-v-06c79ed5]{color:#52c41a}.profile-page .test-result-msg.error[data-v-06c79ed5]{color:#f5222d}.profile-page.theme-dark[data-v-06c79ed5]{background:-webkit-gradient(linear,left top,left bottom,from(#141414),to(#1c1c1c));background:linear-gradient(180deg,#141414,#1c1c1c)}.profile-page.theme-dark .page-header .page-title[data-v-06c79ed5]{color:#e0e6ed}.profile-page.theme-dark .page-header .page-desc[data-v-06c79ed5]{color:#8b949e}.profile-page.theme-dark .edit-card[data-v-06c79ed5],.profile-page.theme-dark .profile-card[data-v-06c79ed5]{background:#1c1c1c;-webkit-box-shadow:0 4px 24px rgba(0,0,0,.25);box-shadow:0 4px 24px rgba(0,0,0,.25)}.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-card-body,.profile-page.theme-dark .profile-card[data-v-06c79ed5] .ant-card-body{background:#1c1c1c}.profile-page.theme-dark .profile-card .avatar-section .username[data-v-06c79ed5]{color:#e0e6ed}.profile-page.theme-dark .profile-card .profile-info .info-item[data-v-06c79ed5]{border-bottom-color:#2a2a2a}.profile-page.theme-dark .profile-card .profile-info .info-item .label[data-v-06c79ed5]{color:#8b949e}.profile-page.theme-dark .profile-card .profile-info .info-item .value[data-v-06c79ed5]{color:#e0e6ed}.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-tabs-bar{border-bottom-color:#2a2a2a}.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-tabs-tab{color:#8b949e}.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-tabs-tab:hover{color:#e0e6ed}.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-tabs-tab-active{color:#1890ff}.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-form-item-label label{color:#c9d1d9}.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-input,.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-input-password{background:#141414;border-color:#2a2a2a;color:#c9d1d9}.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-input-password:focus,.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-input-password:hover,.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-input:focus,.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-input:hover{border-color:#1890ff}.profile-page.theme-dark .credits-card[data-v-06c79ed5]{background:linear-gradient(135deg,#1c1c1c,#1a1a1a 50%,#141414);-webkit-box-shadow:0 4px 24px rgba(0,0,0,.25);box-shadow:0 4px 24px rgba(0,0,0,.25)}.profile-page.theme-dark .credits-card[data-v-06c79ed5] .ant-divider{border-color:hsla(0,0%,100%,.1)}.profile-page.theme-dark .credits-card .credits-actions .ant-btn[data-v-06c79ed5]{background:hsla(0,0%,100%,.15);color:#fff;border:1px solid hsla(0,0%,100%,.2)}.profile-page.theme-dark .credits-card .credits-actions .ant-btn[data-v-06c79ed5]:hover{background:hsla(0,0%,100%,.25)}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-table{background:#1c1c1c;color:#c9d1d9}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-table-thead>tr>th{background:#2a2a2a;color:#c9d1d9;border-bottom-color:#2a2a2a}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-table-tbody>tr>td{background:#1c1c1c;color:#c9d1d9;border-bottom-color:#2a2a2a}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-table-tbody>tr:hover>td{background:#2a2a2a}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-table-placeholder{background:#1c1c1c;color:#8b949e}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-table-tbody>tr>td,.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-table-tbody>tr>td :not(.ant-tag):not(.ant-btn),.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-table-tbody>tr>td div,.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-table-tbody>tr>td span{color:#c9d1d9}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .amount-positive{color:#52c41a}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .amount-negative{color:#f5222d}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-tag{border-width:1px;font-weight:600}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-tag-red{background:rgba(245,34,45,.25);border-color:#f5222d;color:#ff7875}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-tag-green{background:rgba(82,196,26,.25);border-color:#52c41a;color:#73d13d}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-tag-blue{background:rgba(24,144,255,.25);border-color:#1890ff;color:#69c0ff}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-tag-gold,.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-tag-orange{background:rgba(250,173,20,.25);border-color:#faad14;color:#ffc53d}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-tag-cyan{background:rgba(19,194,194,.25);border-color:#13c2c2;color:#5cdbd3}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-tag-purple{background:rgba(114,46,209,.25);border-color:#722ed1;color:#b37feb}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-tag-volcano{background:rgba(250,84,28,.25);border-color:#fa541c;color:#ff9c6e}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-tag-lime{background:hsla(89,56%,62%,.25);border-color:#a0d911;color:#bae637}.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-tag-default{background:hsla(0,0%,100%,.08);border-color:hsla(0,0%,100%,.2);color:#c9d1d9}.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-form-item-label>label,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-form-item-label>label,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-form-item-label>label{color:#c9d1d9}.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-form-item-explain,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-form-item-extra,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-form-item-explain,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-form-item-extra,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-form-item-explain,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-form-item-extra{color:#8b949e}.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input-number,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input-password,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-select-selector,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input-number,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input-password,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-select-selector,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input-number,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input-password,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-select-selector{background:#141414;border-color:#2a2a2a;color:#c9d1d9}.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input-number::-webkit-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input-password::-webkit-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input::-webkit-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-select-selector::-webkit-input-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input-number::-webkit-input-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input-password::-webkit-input-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input::-webkit-input-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-select-selector::-webkit-input-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input-number::-webkit-input-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input-password::-webkit-input-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input::-webkit-input-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-select-selector::-webkit-input-placeholder{color:#6e7681}.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input-number::-moz-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input-password::-moz-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input::-moz-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-select-selector::-moz-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input-number::-moz-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input-password::-moz-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input::-moz-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-select-selector::-moz-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input-number::-moz-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input-password::-moz-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input::-moz-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-select-selector::-moz-placeholder{color:#6e7681}.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input-number:-ms-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input-password:-ms-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input:-ms-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-select-selector:-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input-number:-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input-password:-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input:-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-select-selector:-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input-number:-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input-password:-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input:-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-select-selector:-ms-input-placeholder{color:#6e7681}.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input-number::-ms-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input-password::-ms-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input::-ms-input-placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-select-selector::-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input-number::-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input-password::-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input::-ms-input-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-select-selector::-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input-number::-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input-password::-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input::-ms-input-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-select-selector::-ms-input-placeholder{color:#6e7681}.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input-number::placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input-password::placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-input::placeholder,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-select-selector::placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input-number::placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input-password::placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-input::placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-select-selector::placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input-number::placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input-password::placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-input::placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-select-selector::placeholder{color:#6e7681}.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-checkbox-wrapper,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-checkbox-wrapper span,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-radio-wrapper,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-radio-wrapper span,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-select-selection-item,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-select-selection-placeholder,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-checkbox-wrapper,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-checkbox-wrapper span,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-radio-wrapper,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-radio-wrapper span,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-select-selection-item,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-select-selection-placeholder,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-checkbox-wrapper,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-checkbox-wrapper span,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-radio-wrapper,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-radio-wrapper span,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-select-selection-item,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-select-selection-placeholder{color:#c9d1d9}.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-checkbox-checked .ant-checkbox-inner,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-radio-checked .ant-radio-inner,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-checkbox-checked .ant-checkbox-inner,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-radio-checked .ant-radio-inner,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-checkbox-checked .ant-checkbox-inner,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-radio-checked .ant-radio-inner{background-color:#1890ff;border-color:#1890ff}.profile-page.theme-dark .notification-settings-form .email-hint[data-v-06c79ed5],.profile-page.theme-dark .notification-settings-form .field-hint[data-v-06c79ed5],.profile-page.theme-dark .password-form .email-hint[data-v-06c79ed5],.profile-page.theme-dark .password-form .field-hint[data-v-06c79ed5],.profile-page.theme-dark .profile-form .email-hint[data-v-06c79ed5],.profile-page.theme-dark .profile-form .field-hint[data-v-06c79ed5]{color:#8b949e}.profile-page.theme-dark .notification-settings-form .email-warning[data-v-06c79ed5],.profile-page.theme-dark .password-form .email-warning[data-v-06c79ed5],.profile-page.theme-dark .profile-form .email-warning[data-v-06c79ed5]{color:#f5222d}.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-alert{background:#1c1c1c;border-color:#2a2a2a;color:#c9d1d9}.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-alert .ant-alert-message{color:#c9d1d9}.profile-page.theme-dark .exchange-config-section .credential-hint[data-v-06c79ed5],.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-alert .ant-alert-description{color:#8b949e}.profile-page.theme-dark .test-result-msg.success[data-v-06c79ed5]{color:#52c41a}.profile-page.theme-dark .test-result-msg.error[data-v-06c79ed5]{color:#f5222d}.profile-page.theme-dark .referral-user-cell .user-info .nickname[data-v-06c79ed5]{color:#c9d1d9}.profile-page.theme-dark .referral-user-cell .user-info .username[data-v-06c79ed5]{color:#8b949e}.profile-page.theme-dark[data-v-06c79ed5] .ant-tag{color:#c9d1d9}.profile-page.theme-dark[data-v-06c79ed5] .ant-tag.ant-tag-has-color{color:#fff!important;border-color:transparent!important}.profile-page.theme-dark[data-v-06c79ed5] .ant-input-prefix .anticon,.profile-page.theme-dark[data-v-06c79ed5] .ant-input-suffix .anticon,.profile-page.theme-dark[data-v-06c79ed5] .credits-hint .anticon,.profile-page.theme-dark[data-v-06c79ed5] .email-hint .anticon,.profile-page.theme-dark[data-v-06c79ed5] .field-hint .anticon,.profile-page.theme-dark[data-v-06c79ed5] .notification-settings-form .anticon{color:#c9d1d9!important}.profile-page.theme-dark[data-v-06c79ed5] .ant-pagination .ant-pagination-item{background:#1c1c1c;border-color:#2a2a2a}.profile-page.theme-dark[data-v-06c79ed5] .ant-pagination .ant-pagination-item a{color:#c9d1d9}.profile-page.theme-dark[data-v-06c79ed5] .ant-pagination .ant-pagination-item:hover{border-color:#1890ff}.profile-page.theme-dark[data-v-06c79ed5] .ant-pagination .ant-pagination-item-active{background:#1890ff;border-color:#1890ff}.profile-page.theme-dark[data-v-06c79ed5] .ant-pagination .ant-pagination-item-active a{color:#fff}.profile-page.theme-dark[data-v-06c79ed5] .ant-pagination .ant-pagination-next .ant-pagination-item-link,.profile-page.theme-dark[data-v-06c79ed5] .ant-pagination .ant-pagination-prev .ant-pagination-item-link{background:#1c1c1c;border-color:#2a2a2a;color:#c9d1d9}.profile-page.theme-dark[data-v-06c79ed5] .ant-pagination .ant-pagination-options .ant-select-selector{background:#141414;border-color:#2a2a2a;color:#c9d1d9}.profile-page.theme-dark[data-v-06c79ed5] .ant-btn.ant-btn-default{background:#1c1c1c;border-color:#2a2a2a;color:#c9d1d9}.profile-page.theme-dark[data-v-06c79ed5] .ant-btn.ant-btn-default:hover{border-color:#1890ff;color:#1890ff}@media screen and (max-width:768px){.profile-page[data-v-06c79ed5]{padding:12px}.profile-page .page-header[data-v-06c79ed5]{margin-bottom:16px}.profile-page .page-header .page-title[data-v-06c79ed5]{font-size:20px}.profile-page .page-header .page-title .anticon[data-v-06c79ed5]{font-size:22px}.profile-page .page-header .page-desc[data-v-06c79ed5]{font-size:13px}.profile-page .profile-cards-row[data-v-06c79ed5]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .profile-cards-row .profile-card-col[data-v-06c79ed5]{margin-bottom:12px}.profile-page .profile-cards-row .right-cards-col .right-cards-row[data-v-06c79ed5]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.profile-page .profile-cards-row .right-cards-col .right-cards-row .ant-col[data-v-06c79ed5]{margin-bottom:12px}.profile-page .profile-card[data-v-06c79ed5]{border-radius:10px}.profile-page .profile-card .avatar-section[data-v-06c79ed5]{padding:16px 0}.profile-page .profile-card .avatar-section[data-v-06c79ed5] .ant-avatar{width:80px!important;height:80px!important;line-height:80px!important}.profile-page .profile-card .avatar-section .username[data-v-06c79ed5]{font-size:18px;margin:12px 0 6px}.profile-page .profile-card .profile-info .info-item[data-v-06c79ed5]{padding:10px 0;-ms-flex-wrap:wrap;flex-wrap:wrap}.profile-page .profile-card .profile-info .info-item .anticon[data-v-06c79ed5]{font-size:14px;margin-right:8px}.profile-page .profile-card .profile-info .info-item .label[data-v-06c79ed5]{font-size:13px}.profile-page .profile-card .profile-info .info-item .value[data-v-06c79ed5]{font-size:13px;word-break:break-all}.profile-page .credits-card[data-v-06c79ed5]{border-radius:10px}.profile-page .credits-card .credits-header .credits-title[data-v-06c79ed5]{font-size:15px}.profile-page .credits-card .credits-header .credits-title .anticon[data-v-06c79ed5]{font-size:16px}.profile-page .credits-card .credits-body[data-v-06c79ed5]{padding:16px 0}.profile-page .credits-card .credits-body .credits-amount .amount-value[data-v-06c79ed5]{font-size:32px}.profile-page .credits-card .credits-body .credits-amount .amount-label[data-v-06c79ed5]{font-size:14px}.profile-page .credits-card .credits-body .vip-status[data-v-06c79ed5]{font-size:12px;margin-top:10px}.profile-page .credits-card .credits-actions .ant-btn[data-v-06c79ed5]{height:34px;padding:0 20px;font-size:14px}.profile-page .credits-card .credits-hint[data-v-06c79ed5]{font-size:11px;margin-top:10px}.profile-page .referral-card[data-v-06c79ed5]{border-radius:10px}.profile-page .referral-card .referral-header .referral-title[data-v-06c79ed5]{font-size:15px}.profile-page .referral-card .referral-header .referral-title .anticon[data-v-06c79ed5]{font-size:16px}.profile-page .referral-card .referral-body[data-v-06c79ed5]{padding:10px 0}.profile-page .referral-card .referral-body .referral-stats .stat-item .stat-value[data-v-06c79ed5]{font-size:24px}.profile-page .referral-card .referral-body .referral-link-section .link-label[data-v-06c79ed5],.profile-page .referral-card .referral-body .referral-stats .stat-item .stat-label[data-v-06c79ed5]{font-size:11px}.profile-page .referral-card .referral-body .referral-link-section .link-box[data-v-06c79ed5] .ant-input{font-size:12px}.profile-page .referral-card .referral-body .referral-hint[data-v-06c79ed5]{font-size:11px;padding-top:8px}.profile-page .edit-card[data-v-06c79ed5]{border-radius:10px;margin-top:12px!important}.profile-page .edit-card[data-v-06c79ed5] .ant-card-body{padding:12px}.profile-page .edit-card[data-v-06c79ed5] .ant-tabs-nav .ant-tabs-tab{padding:10px 12px;font-size:13px}.profile-page .edit-card[data-v-06c79ed5] .ant-tabs-nav-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}.profile-page .edit-card[data-v-06c79ed5] .ant-tabs-nav-scroll::-webkit-scrollbar{display:none}.profile-page .edit-card .password-form[data-v-06c79ed5],.profile-page .edit-card .profile-form[data-v-06c79ed5]{max-width:100%}.profile-page .edit-card .password-form[data-v-06c79ed5] .ant-form-item-label,.profile-page .edit-card .profile-form[data-v-06c79ed5] .ant-form-item-label{padding-bottom:4px}.profile-page .edit-card .password-form[data-v-06c79ed5] .ant-form-item-label label,.profile-page .edit-card .profile-form[data-v-06c79ed5] .ant-form-item-label label{font-size:13px}.profile-page .edit-card .password-form[data-v-06c79ed5] .ant-input,.profile-page .edit-card .password-form[data-v-06c79ed5] .ant-input-password,.profile-page .edit-card .profile-form[data-v-06c79ed5] .ant-input,.profile-page .edit-card .profile-form[data-v-06c79ed5] .ant-input-password{font-size:14px}.profile-page .edit-card .password-form .email-hint[data-v-06c79ed5],.profile-page .edit-card .profile-form .email-hint[data-v-06c79ed5]{font-size:11px}.profile-page .edit-card .password-form[data-v-06c79ed5] .ant-alert{font-size:12px;padding:8px 12px}.profile-page .edit-card .notification-settings-form[data-v-06c79ed5] .ant-alert{font-size:12px;padding:8px 12px;margin-bottom:16px!important}.profile-page .edit-card .notification-settings-form[data-v-06c79ed5] .ant-form{max-width:100%}.profile-page .edit-card .notification-settings-form[data-v-06c79ed5] .ant-checkbox-group .ant-row{margin-left:0!important;margin-right:0!important}.profile-page .edit-card .notification-settings-form[data-v-06c79ed5] .ant-checkbox-group .ant-row .ant-col{padding-left:0!important;padding-right:8px!important}.profile-page .edit-card .notification-settings-form[data-v-06c79ed5] .ant-checkbox-group .ant-checkbox-wrapper{font-size:13px;margin-bottom:6px}.profile-page .edit-card .notification-settings-form .field-hint[data-v-06c79ed5]{font-size:11px;-ms-flex-wrap:wrap;flex-wrap:wrap}.profile-page .edit-card .notification-settings-form[data-v-06c79ed5] .ant-form-item{margin-bottom:16px}.profile-page .edit-card .notification-settings-form[data-v-06c79ed5] .ant-form-item:last-child .ant-btn{width:100%;margin-bottom:8px}.profile-page .edit-card .notification-settings-form[data-v-06c79ed5] .ant-form-item:last-child .ant-btn+.ant-btn{margin-left:0!important}.profile-page .edit-card[data-v-06c79ed5] .ant-table-wrapper{overflow-x:auto}.profile-page .edit-card[data-v-06c79ed5] .ant-table-wrapper .ant-table{min-width:500px}.profile-page .referral-user-cell[data-v-06c79ed5]{gap:8px}.profile-page .referral-user-cell[data-v-06c79ed5] .ant-avatar{width:28px!important;height:28px!important;line-height:28px!important}.profile-page .referral-user-cell .user-info .nickname[data-v-06c79ed5]{font-size:13px}.profile-page .referral-user-cell .user-info .username[data-v-06c79ed5]{font-size:11px}}@media screen and (max-width:480px){.profile-page[data-v-06c79ed5]{padding:8px}.profile-page .page-header[data-v-06c79ed5]{margin-bottom:12px}.profile-page .page-header .page-title[data-v-06c79ed5]{font-size:18px;gap:8px}.profile-page .page-header .page-title .anticon[data-v-06c79ed5]{font-size:20px}.profile-page .credits-card .credits-body .credits-amount .amount-value[data-v-06c79ed5]{font-size:28px}.profile-page .credits-card .credits-body .credits-amount .amount-label[data-v-06c79ed5]{font-size:13px}.profile-page .credits-card .credits-actions .ant-btn[data-v-06c79ed5]{width:100%}.profile-page .referral-card .referral-body .referral-stats .stat-item .stat-value[data-v-06c79ed5]{font-size:20px}.profile-page .edit-card[data-v-06c79ed5] .ant-tabs-nav .ant-tabs-tab{padding:8px 10px;font-size:12px}.profile-page .edit-card .notification-settings-form[data-v-06c79ed5] .ant-checkbox-group .ant-row .ant-col{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}}.profile-exchange-modal .exchange-account-form .egress-ip-block{width:100%}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:12px;margin:0 0 16px;padding:12px 14px;border:1px solid rgba(24,144,255,.18);border-radius:10px;background:-webkit-gradient(linear,left top,right top,from(rgba(24,144,255,.06)),to(rgba(82,196,26,.04)));background:linear-gradient(90deg,rgba(24,144,255,.06),rgba(82,196,26,.04))}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:10px;min-width:0}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__icon{width:28px;height:28px;border-radius:50%;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background:rgba(24,144,255,.12);color:#1890ff;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__text{min-width:0}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__title{color:rgba(0,0,0,.85);font-size:13px;font-weight:600;line-height:1.5}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__hint{color:rgba(0,0,0,.55);font-size:12px;line-height:1.5;margin-top:2px}.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__action{padding:0;white-space:nowrap;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.profile-exchange-modal .exchange-account-form .egress-ip-row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:6px}.profile-exchange-modal .exchange-account-form .egress-ip-refresh-row{margin-top:4px}.profile-exchange-modal .exchange-account-form .egress-ip-line{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;margin-bottom:10px}.profile-exchange-modal .exchange-account-form .egress-ip-kind{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;min-width:42px;font-size:12px;color:rgba(0,0,0,.55)}.profile-exchange-modal .exchange-account-form .egress-ip-value{-webkit-box-flex:1;-ms-flex:1 1 160px;flex:1 1 160px;min-width:0;font-family:Consolas,ui-monospace,monospace;font-size:12px;padding:6px 10px;border-radius:4px;border:1px solid #d9d9d9;background:#fafafa;color:#262626;word-break:break-all}.profile-exchange-modal .exchange-account-form .exchange-demo-checkbox-label{color:rgba(0,0,0,.85)}.profile-exchange-modal .exchange-account-form .exchange-demo-hint{margin-top:6px}.profile-exchange-modal--dark .ant-modal-content{background:#1c1c1c;-webkit-box-shadow:0 8px 32px rgba(0,0,0,.45);box-shadow:0 8px 32px rgba(0,0,0,.45)}.profile-exchange-modal--dark .ant-modal-header{background:#1c1c1c;border-bottom:1px solid #2a2a2a}.profile-exchange-modal--dark .ant-modal-title{color:#e0e6ed}.profile-exchange-modal--dark .ant-modal-close{color:#8b949e}.profile-exchange-modal--dark .ant-modal-body,.profile-exchange-modal--dark .ant-modal-close:hover{color:#c9d1d9}.profile-exchange-modal--dark .ant-modal-footer{background:#1c1c1c;border-top:1px solid #2a2a2a}.profile-exchange-modal--dark .exchange-account-form .ant-form-item-label>label{color:#c9d1d9}.profile-exchange-modal--dark .exchange-account-form .ant-form-item-explain,.profile-exchange-modal--dark .exchange-account-form .ant-form-item-extra{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-input,.profile-exchange-modal--dark .exchange-account-form .ant-input-number,.profile-exchange-modal--dark .exchange-account-form .ant-input-number-input,.profile-exchange-modal--dark .exchange-account-form .ant-input-password .ant-input{background:#141414!important;border-color:#2a2a2a!important;color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-input-password-icon{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-input-number-handler-wrap{background:#141414;border-left-color:#2a2a2a}.profile-exchange-modal--dark .exchange-account-form .ant-input-number-handler-down-inner,.profile-exchange-modal--dark .exchange-account-form .ant-input-number-handler-up-inner{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-select-selector{background:#141414!important;border-color:#2a2a2a!important;color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-item,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-placeholder{color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-selection,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection--single{background:#141414!important;border-color:#2a2a2a!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-placeholder,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection-selected-value,.profile-exchange-modal--dark .exchange-account-form .ant-select-selection__rendered{color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .ant-select-arrow{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-checkbox-wrapper,.profile-exchange-modal--dark .exchange-account-form .ant-checkbox-wrapper span{color:#c9d1d9}.profile-exchange-modal--dark .exchange-account-form .exchange-demo-checkbox-label{color:#c9d1d9!important}.profile-exchange-modal--dark .exchange-account-form .egress-ip-hint,.profile-exchange-modal--dark .exchange-account-form .exchange-demo-hint{color:#8b949e!important}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout{background:-webkit-gradient(linear,left top,right top,from(rgba(24,144,255,.12)),to(rgba(82,196,26,.08)));background:linear-gradient(90deg,rgba(24,144,255,.12),rgba(82,196,26,.08));border-color:rgba(88,166,255,.26)}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__icon{background:rgba(88,166,255,.16);color:#58a6ff}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__title{color:#e0e6ed}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__hint{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout__action{color:#58a6ff}.profile-exchange-modal--dark .exchange-account-form .egress-ip-value{border-color:#2a2a2a!important;background:#141414!important;color:#e0e6ed!important}.profile-exchange-modal--dark .exchange-account-form a.egress-ip-action{color:#58a6ff}.profile-exchange-modal--dark .exchange-account-form .egress-ip-kind{color:#8b949e!important}.profile-exchange-modal--dark .exchange-account-form .ant-alert{background:rgba(250,173,20,.12);border-color:rgba(250,173,20,.45)}.profile-exchange-modal--dark .exchange-account-form .ant-alert-message{color:#ffc53d}.profile-exchange-modal--dark .exchange-account-form .ant-alert-description{color:#8b949e}.profile-exchange-modal--dark .exchange-account-form .ant-alert-icon{color:#faad14}.profile-exchange-modal--dark .exchange-account-form .field-hint{color:#8b949e;margin-top:6px;font-size:12px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:6px}.profile-exchange-modal--dark .exchange-account-form .field-hint .anticon{color:#8b949e;margin-top:2px}.profile-exchange-modal--dark .exchange-account-form .test-result-msg{color:#c9d1d9}.profile-exchange-modal--dark .exchange-account-form .test-result-msg.success{color:#73d13d}.profile-exchange-modal--dark .exchange-account-form .test-result-msg.error{color:#ff7875}.profile-exchange-select-dropdown-dark.ant-select-dropdown{background:#1c1c1c}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item{color:#c9d1d9}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item:hover{background:#2a2a2a}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item-selected{background:#2a2a2a!important;color:#e0e6ed;font-weight:500}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item-group-title{color:#8b949e!important;font-size:12px}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item,.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-select-dropdown-menu-item-selected{color:#c9d1d9!important}.profile-exchange-select-dropdown-dark.ant-select-dropdown .ant-empty-description{color:#8b949e}.exchange-signup-modal .exchange-signup-promo{margin-bottom:18px;padding:12px 14px;border-radius:12px;background:-webkit-gradient(linear,left top,right top,from(rgba(22,119,255,.12)),to(rgba(99,102,241,.1)));background:linear-gradient(90deg,rgba(22,119,255,.12),rgba(99,102,241,.1));border:1px solid rgba(22,119,255,.2);color:#1e40af;font-size:15px;font-weight:600;line-height:1.5;text-align:center}.exchange-signup-modal .exchange-signup-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.exchange-signup-modal .exchange-signup-card{border:1px solid #eef1f5;border-radius:16px;padding:16px;background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fafcff));background:linear-gradient(180deg,#fff,#fafcff);-webkit-box-shadow:0 8px 24px rgba(15,23,42,.05);box-shadow:0 8px 24px rgba(15,23,42,.05)}.exchange-signup-modal .exchange-signup-card__header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:12px;margin-bottom:12px}.exchange-signup-modal .exchange-signup-logo{width:44px;height:44px;border-radius:12px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;font-size:16px;font-weight:700}.exchange-signup-modal .exchange-signup-name{font-size:16px;font-weight:700;color:#1f2937}.exchange-signup-modal .exchange-signup-actions{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px}.profile-exchange-modal--dark .exchange-signup-modal .exchange-signup-promo{color:#93c5fd;background:-webkit-gradient(linear,left top,right top,from(rgba(59,130,246,.18)),to(rgba(99,102,241,.14)));background:linear-gradient(90deg,rgba(59,130,246,.18),rgba(99,102,241,.14));border-color:rgba(96,165,250,.35)}.profile-exchange-modal--dark .exchange-signup-modal .exchange-signup-card{background:-webkit-gradient(linear,left top,left bottom,from(#171717),to(#1f1f1f));background:linear-gradient(180deg,#171717,#1f1f1f);border-color:#2a2a2a;-webkit-box-shadow:none;box-shadow:none}.profile-exchange-modal--dark .exchange-signup-modal .exchange-signup-name{color:#e0e6ed} \ No newline at end of file diff --git a/frontend/dist/css/theme-colors-590b2867.css b/frontend/dist/css/theme-colors-ed7e9530.css similarity index 87% rename from frontend/dist/css/theme-colors-590b2867.css rename to frontend/dist/css/theme-colors-ed7e9530.css index bb17071..9ed0181 100644 --- a/frontend/dist/css/theme-colors-590b2867.css +++ b/frontend/dist/css/theme-colors-ed7e9530.css @@ -39,9 +39,9 @@ body.dark .ant-pagination-item-active,body.realdark .ant-pagination-item-active{ body.dark .ant-btn-default:hover,body.realdark .ant-btn-default:hover{border-color:#1890ff!important;color:#1890ff!important} body.dark .ant-tabs-tab-active,body.realdark .ant-tabs-tab-active{color:#1890ff!important} body.dark .ant-select-dropdown .ant-select-dropdown-menu-item-selected,body.realdark .ant-select-dropdown .ant-select-dropdown-menu-item-selected{background:rgba(24,144,255,.1)!important;color:#1890ff!important} -.qt-header .qt-header-left .qt-icon[data-v-989be352]{color:#1890ff} -.theme-dark[data-v-989be352] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#1890ff;border-color:#1890ff} -.theme-dark[data-v-989be352] .ant-slider-track{background:#1890ff} +.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout{border:1px solid rgba(24,144,255,.18);background:-webkit-gradient(linear,left top,right top,from(rgba(24,144,255,.06)),to(rgba(82,196,26,.04)));background:linear-gradient(90deg,rgba(24,144,255,.06),rgba(82,196,26,.04))} +.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__icon{background:rgba(24,144,255,.12);color:#1890ff} +.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout{background:-webkit-gradient(linear,left top,right top,from(rgba(24,144,255,.12)),to(rgba(82,196,26,.08)));background:linear-gradient(90deg,rgba(24,144,255,.12),rgba(82,196,26,.08))} .polymarket-analysis-modal .result-section .analysis-result .probability-comparison .prob-item .prob-value.ai-prob[data-v-67e891d2]{color:#1890ff} .polymarket-analysis-modal .result-section .analysis-result .recommendation-section .rec-card .rec-value[data-v-67e891d2]{color:#1890ff} .code-section .section-header .section-title[data-v-4fea1865]:before{background:#1890ff} @@ -92,24 +92,26 @@ body.dark .ant-select-dropdown .ant-select-dropdown-menu-item-selected,body.real .ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.edit-icon[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#40a9ff} .ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.publish-icon[data-v-6bd239a6],body.dark,body.realdark{color:#1890ff} .ant-layout.dark,.ant-layout.realdark,.ant-pro-layout.dark,.ant-pro-layout.realdark,.chart-container.theme-dark .chart-right .indicators-panel .indicator-card .action-icon.publish-icon[data-v-6bd239a6]:hover,body.dark,body.realdark{color:#40a9ff} -.ai-markdown-content[data-v-2a402d06] h3{border-left:3px solid #1890ff} -.ai-markdown-content[data-v-2a402d06] blockquote{border-left:4px solid #91d5ff} -.page-header .page-title .title-icon[data-v-6853ba40]{-webkit-text-fill-color:#1890ff} -[data-v-6853ba40] .empty-result .empty-icon{background:linear-gradient(135deg,#e6f7ff,#f0f5ff);color:#1890ff} -[data-v-6853ba40] .running-spinner .spinner-fill{border-top-color:#1890ff} -[data-v-6853ba40] .running-elapsed{color:#1890ff} -[data-v-6853ba40] .running-steps .step-item.active{background:#e6f7ff;border-color:#91d5ff} -[data-v-6853ba40] .running-steps .step-item.active .step-icon{color:#1890ff} -[data-v-6853ba40] .running-steps .step-item.active .step-label{color:#1890ff} -[data-v-6853ba40] .result-ai-markdown-content/deep/h3{border-left:3px solid #1890ff} -[data-v-6853ba40] .result-ai-markdown-content/deep/blockquote{border-left:3px solid #91d5ff} -.add-item-active[data-v-6853ba40]{background:#e6f7ff!important} -.theme-dark .page-header .page-title .title-icon[data-v-6853ba40]{color:#40a9ff!important} -.trading-records[data-v-a5bdef7e] .ant-tag[color=blue]{background:linear-gradient(135deg,rgba(24,144,255,.15),rgba(24,144,255,.08));color:#1890ff;border:1px solid rgba(24,144,255,.3)} -.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-item:hover{border-color:#1890ff} -.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-item:hover a{color:#1890ff} -.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-item.ant-pagination-item-active{background:linear-gradient(135deg,#1890ff,#40a9ff);border-color:#1890ff} -.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-next .ant-pagination-item-link:hover,.trading-records[data-v-a5bdef7e] .ant-pagination .ant-pagination-prev .ant-pagination-item-link:hover{border-color:#1890ff;color:#1890ff} +.ai-markdown-content[data-v-9c4d8af2] h3{border-left:3px solid #1890ff} +.ai-markdown-content[data-v-9c4d8af2] blockquote{border-left:4px solid #91d5ff} +.backtest-history-drawer-wrap--dark .drawer-toolbar .ant-btn-primary.ant-btn-background-ghost{color:#69c0ff} +.backtest-history-drawer-wrap--dark .drawer-toolbar .ant-btn-primary.ant-btn-background-ghost:focus:not(:disabled),.backtest-history-drawer-wrap--dark .drawer-toolbar .ant-btn-primary.ant-btn-background-ghost:hover:not(:disabled){color:#91d5ff} +.page-header .page-title .title-icon[data-v-1daf6ac6]{-webkit-text-fill-color:#1890ff} +[data-v-1daf6ac6] .empty-result .empty-icon{background:linear-gradient(135deg,#e6f7ff,#f0f5ff);color:#1890ff} +[data-v-1daf6ac6] .running-spinner .spinner-fill{border-top-color:#1890ff} +[data-v-1daf6ac6] .running-elapsed{color:#1890ff} +[data-v-1daf6ac6] .running-steps .step-item.active{background:#e6f7ff;border-color:#91d5ff} +[data-v-1daf6ac6] .running-steps .step-item.active .step-icon{color:#1890ff} +[data-v-1daf6ac6] .running-steps .step-item.active .step-label{color:#1890ff} +[data-v-1daf6ac6] .result-ai-markdown-content/deep/h3{border-left:3px solid #1890ff} +[data-v-1daf6ac6] .result-ai-markdown-content/deep/blockquote{border-left:3px solid #91d5ff} +.add-item-active[data-v-1daf6ac6]{background:#e6f7ff!important} +.theme-dark .page-header .page-title .title-icon[data-v-1daf6ac6]{color:#40a9ff!important} +.trading-records[data-v-bdf54cd6] .ant-tag[color=blue]{background:linear-gradient(135deg,rgba(24,144,255,.15),rgba(24,144,255,.08));color:#1890ff;border:1px solid rgba(24,144,255,.3)} +.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-item:hover{border-color:#1890ff} +.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-item:hover a{color:#1890ff} +.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-item.ant-pagination-item-active{background:linear-gradient(135deg,#1890ff,#40a9ff);border-color:#1890ff} +.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-next .ant-pagination-item-link:hover,.trading-records[data-v-bdf54cd6] .ant-pagination .ant-pagination-prev .ant-pagination-item-link:hover{border-color:#1890ff;color:#1890ff} .theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover{border-color:#1890ff!important} .theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover a,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover a,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item:hover a{color:#1890ff!important} .theme-dark .trading-records[data-v-8a68b65a] .ant-pagination-item-active,body.dark .trading-records[data-v-8a68b65a] .ant-pagination-item-active,body.realdark .trading-records[data-v-8a68b65a] .ant-pagination-item-active{background:#1890ff!important;border-color:#1890ff!important} @@ -130,70 +132,77 @@ body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover . .theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover a,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover a,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-item:hover a,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item:hover a{color:#1890ff!important} .theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-item-active,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-item-active{background:#1890ff!important;border-color:#1890ff!important} .theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,.theme-dark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,.theme-dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.dark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.dark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.realdark .trading-records * ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-next:hover .ant-pagination-item-link,body.realdark .trading-records ::v-deep .ant-pagination .ant-pagination-prev:hover .ant-pagination-item-link{border-color:#1890ff!important;color:#1890ff!important} -.mode-card[data-v-1cfbbafc]:hover{border-color:#1890ff;-webkit-box-shadow:0 4px 16px rgba(24,144,255,.12);box-shadow:0 4px 16px rgba(24,144,255,.12)} -.mode-card.selected[data-v-1cfbbafc]{border-color:#1890ff;background:rgba(24,144,255,.02)} -.mode-card.selected[data-v-1cfbbafc]:after{color:#1890ff} -.card-icon.signal-icon[data-v-1cfbbafc]{background:linear-gradient(135deg,#e6f7ff,#bae7ff);color:#1890ff} -.card-body .card-badge[data-v-1cfbbafc]{background:rgba(24,144,255,.08);color:#1890ff} -.template-tag[data-v-1cfbbafc]:hover{color:#1890ff;border-color:#1890ff;background:#e6f7ff} -.theme-dark .mode-card.selected[data-v-1cfbbafc]:after{color:#40a9ff} -.theme-dark .card-icon.signal-icon[data-v-1cfbbafc]{background:linear-gradient(135deg,rgba(24,144,255,.15),rgba(24,144,255,.08));color:#40a9ff} -.theme-dark .card-body .card-badge[data-v-1cfbbafc]{color:#69c0ff} -.theme-dark .card-btn[data-v-1cfbbafc]{border-color:rgba(24,144,255,.4);color:#40a9ff} -.theme-dark .card-btn[data-v-1cfbbafc]:hover{border-color:#1890ff;color:#1890ff} -.theme-dark .template-tag[data-v-1cfbbafc]:hover{color:#40a9ff} -.code-editor-container[data-v-6c7c8660] .CodeMirror-cursor{border-left:2px solid #1890ff} -.template-item.active[data-v-6c7c8660],.template-item[data-v-6c7c8660]:hover{border-color:#1890ff} -.ai-status[data-v-6c7c8660]{color:#1890ff} -.docs-content[data-v-6c7c8660] h5{color:#1890ff} -.theme-dark .side-tabs[data-v-6c7c8660] .ant-tabs-nav .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn{color:#1890ff} -.theme-dark .ai-status[data-v-6c7c8660]{color:#40a9ff} -.theme-dark .docs-content[data-v-6c7c8660] h5{color:#40a9ff} -.theme-dark .logs-toolbar[data-v-129fed65] .ant-radio-group .ant-radio-button-wrapper:hover{color:#40a9ff} -.theme-dark .logs-toolbar[data-v-129fed65] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#1890ff;border-color:#1890ff} -.assistant-guide-bar[data-v-bbcac474]{border:1px solid rgba(24,144,255,.14);background:linear-gradient(135deg,rgba(24,144,255,.08),rgba(114,46,209,.06))} -.assistant-guide-bar .assistant-guide-eyebrow[data-v-bbcac474]{background:rgba(24,144,255,.12)} -.trading-assistant .strategy-list-col .strategy-list-card .card-title .ant-btn-primary[data-v-bbcac474]{background:linear-gradient(135deg,#1890ff,#40a9ff);-webkit-box-shadow:0 4px 12px rgba(24,144,255,.35);box-shadow:0 4px 12px rgba(24,144,255,.35)} -.trading-assistant .strategy-list-col .strategy-list-card .card-title .ant-btn-primary[data-v-bbcac474]:hover{-webkit-box-shadow:0 6px 16px rgba(24,144,255,.45);box-shadow:0 6px 16px rgba(24,144,255,.45)} -.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-left .group-icon[data-v-bbcac474]{color:#1890ff} -.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item[data-v-bbcac474]:hover{border-left-color:#1890ff} -.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item.active[data-v-bbcac474]{border-left-color:#1890ff} -.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-bbcac474]:hover{border-color:rgba(24,144,255,.2);-webkit-box-shadow:0 2px 12px rgba(24,144,255,.1);box-shadow:0 2px 12px rgba(24,144,255,.1)} -.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item.active[data-v-bbcac474]{border-color:#1890ff;border-left:4px solid #1890ff;-webkit-box-shadow:0 4px 16px rgba(24,144,255,.15);box-shadow:0 4px 16px rgba(24,144,255,.15)} -.trading-assistant .strategy-detail-col .empty-detail[data-v-bbcac474]:hover{border-color:#1890ff;background:linear-gradient(135deg,rgba(24,144,255,.02),rgba(24,144,255,.05))} -.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-tags .tag-item .anticon[data-v-bbcac474]{color:#1890ff} -.trading-assistant.theme-dark .creation-mode-toggle[data-v-bbcac474]{background:rgba(24,144,255,.08);border-color:rgba(24,144,255,.2)} -.trading-assistant.theme-dark .strategy-list-col .strategy-list-item[data-v-bbcac474]:hover{background:linear-gradient(135deg,rgba(24,144,255,.08),rgba(24,144,255,.04));border-color:rgba(24,144,255,.2)} -.trading-assistant.theme-dark .strategy-list-col .strategy-list-item.active[data-v-bbcac474]{background:linear-gradient(135deg,rgba(24,144,255,.12),rgba(24,144,255,.06));border-color:#1890ff;-webkit-box-shadow:0 4px 20px rgba(24,144,255,.2);box-shadow:0 4px 20px rgba(24,144,255,.2)} -.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .strategy-tags .tag-item[data-v-bbcac474]:hover{background:rgba(24,144,255,.1);border-color:rgba(24,144,255,.3)} -.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-bbcac474] .ant-tabs .ant-tabs-nav .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn{color:#1890ff} -.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-bbcac474] .ant-tabs .ant-tabs-nav .ant-tabs-ink-bar{background:-webkit-gradient(linear,left top,right top,from(#1890ff),to(#40a9ff));background:linear-gradient(90deg,#1890ff,#40a9ff)} -.theme-dark .assistant-guide-bar .assistant-guide-eyebrow[data-v-bbcac474]{color:#69c0ff} -.ai-filter-title .anticon[data-v-bbcac474]{color:#1890ff} -.creation-mode-toggle[data-v-bbcac474]{background:rgba(24,144,255,.04);border:1px solid rgba(24,144,255,.12)} -.simple-mode-hero[data-v-bbcac474]{background:linear-gradient(135deg,rgba(24,144,255,.08),rgba(114,46,209,.06));border:1px solid rgba(24,144,255,.14)} -.simple-mode-kicker[data-v-bbcac474]{color:#1890ff} -.advanced-settings-shell[data-v-bbcac474],.selected-indicator-card[data-v-bbcac474],.simple-essentials-card[data-v-bbcac474]{border:1px solid rgba(24,144,255,.12)} -.execution-step-hero[data-v-bbcac474]{background:linear-gradient(135deg,rgba(82,196,26,.08),rgba(24,144,255,.08));border:1px solid rgba(24,144,255,.14)} -.execution-section-card[data-v-bbcac474]{border:1px solid rgba(24,144,255,.12)} -.execution-mode-card[data-v-bbcac474]{border:1px solid rgba(24,144,255,.12)} -.execution-mode-card[data-v-bbcac474]:hover{border-color:rgba(24,144,255,.35);-webkit-box-shadow:0 8px 24px rgba(24,144,255,.08);box-shadow:0 8px 24px rgba(24,144,255,.08)} -.execution-mode-card.active[data-v-bbcac474]{border-color:#1890ff;background:linear-gradient(135deg,rgba(24,144,255,.08),rgba(24,144,255,.03));-webkit-box-shadow:0 10px 28px rgba(24,144,255,.12);box-shadow:0 10px 28px rgba(24,144,255,.12)} -.execution-mode-card.disabled[data-v-bbcac474]:hover{border-color:rgba(24,144,255,.12)} -.execution-mode-card-icon.signal[data-v-bbcac474]{color:#1890ff;background:rgba(24,144,255,.1)} -.execution-mode-card-check[data-v-bbcac474]{color:#1890ff} -.strategy-type-selector .strategy-type-card[data-v-bbcac474]:hover{border-color:#1890ff;-webkit-box-shadow:0 2px 8px rgba(24,144,255,.2);box-shadow:0 2px 8px rgba(24,144,255,.2)} -.strategy-type-selector .strategy-type-card.selected[data-v-bbcac474]{border-color:#1890ff;background-color:#e6f7ff;-webkit-box-shadow:0 2px 8px rgba(24,144,255,.3);box-shadow:0 2px 8px rgba(24,144,255,.3)} -.strategy-type-selector .strategy-type-card .strategy-type-content .strategy-type-icon[data-v-bbcac474]{color:#1890ff} -.theme-dark .simple-mode-hero[data-v-bbcac474]{background:linear-gradient(135deg,rgba(24,144,255,.14),rgba(114,46,209,.12))} -.theme-dark .execution-step-hero[data-v-bbcac474]{background:linear-gradient(135deg,rgba(82,196,26,.14),rgba(24,144,255,.14))} -.theme-dark .execution-mode-card[data-v-bbcac474]:hover{-webkit-box-shadow:0 8px 24px rgba(24,144,255,.12);box-shadow:0 8px 24px rgba(24,144,255,.12)} -.theme-dark .execution-mode-card.active[data-v-bbcac474]{background:linear-gradient(135deg,rgba(24,144,255,.16),rgba(24,144,255,.08));border-color:#1890ff} -.theme-dark .simple-mode-kicker[data-v-bbcac474]{color:#69c0ff} -.ip-whitelist-tip[data-v-bbcac474]{background-color:#e6f7ff;border:1px solid #91d5ff;color:#1890ff} -.ip-whitelist-tip .anticon[data-v-bbcac474]{color:#1890ff} +.mode-card[data-v-8ec7ab14]:hover{border-color:#1890ff;-webkit-box-shadow:0 4px 16px rgba(24,144,255,.12);box-shadow:0 4px 16px rgba(24,144,255,.12)} +.mode-card.selected[data-v-8ec7ab14]{border-color:#1890ff;background:rgba(24,144,255,.02)} +.mode-card.selected[data-v-8ec7ab14]:after{color:#1890ff} +.card-icon.signal-icon[data-v-8ec7ab14]{background:linear-gradient(135deg,#e6f7ff,#bae7ff);color:#1890ff} +.card-body .card-badge[data-v-8ec7ab14]{background:rgba(24,144,255,.08);color:#1890ff} +.template-tag[data-v-8ec7ab14]:hover{color:#1890ff;border-color:#1890ff;background:#e6f7ff} +.theme-dark .mode-card.selected[data-v-8ec7ab14]:after{color:#40a9ff} +.theme-dark .card-icon.signal-icon[data-v-8ec7ab14]{background:linear-gradient(135deg,rgba(24,144,255,.15),rgba(24,144,255,.08));color:#40a9ff} +.theme-dark .card-body .card-badge[data-v-8ec7ab14]{color:#69c0ff} +.theme-dark .card-btn[data-v-8ec7ab14]{border-color:rgba(24,144,255,.4);color:#40a9ff} +.theme-dark .card-btn[data-v-8ec7ab14]:hover{border-color:#1890ff;color:#1890ff} +.theme-dark .template-tag[data-v-8ec7ab14]:hover{color:#40a9ff} +.code-editor-container[data-v-35a0a386] .CodeMirror-cursor{border-left:2px solid #1890ff} +.template-item.active[data-v-35a0a386],.template-item[data-v-35a0a386]:hover{border-color:#1890ff} +.ai-status[data-v-35a0a386]{color:#1890ff} +.theme-dark .side-tabs[data-v-35a0a386] .ant-tabs-nav .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn{color:#1890ff} +.theme-dark .ai-status[data-v-35a0a386]{color:#40a9ff} +.theme-dark[data-v-35a0a386] .ant-alert-info{background:rgba(24,144,255,.08);border-color:rgba(24,144,255,.2)} +.theme-dark .logs-toolbar[data-v-73589ce4] .ant-radio-group .ant-radio-button-wrapper:hover{color:#40a9ff} +.theme-dark .logs-toolbar[data-v-73589ce4] .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked{background:#1890ff;border-color:#1890ff} +.assistant-guide-bar[data-v-533cb131]{border:1px solid rgba(24,144,255,.14);background:linear-gradient(135deg,rgba(24,144,255,.08),rgba(114,46,209,.06))} +.assistant-guide-bar .assistant-guide-eyebrow[data-v-533cb131]{background:rgba(24,144,255,.12)} +.assistant-guide-bar .assistant-guide-actions .assistant-guide-close[data-v-533cb131]:focus,.assistant-guide-bar .assistant-guide-actions .assistant-guide-close[data-v-533cb131]:hover{border-color:rgba(24,144,255,.35)} +.trading-assistant .strategy-list-col .strategy-list-card .card-title .ant-btn-primary[data-v-533cb131]{background:linear-gradient(135deg,#1890ff,#40a9ff);-webkit-box-shadow:0 4px 12px rgba(24,144,255,.35);box-shadow:0 4px 12px rgba(24,144,255,.35)} +.trading-assistant .strategy-list-col .strategy-list-card .card-title .ant-btn-primary[data-v-533cb131]:hover{-webkit-box-shadow:0 6px 16px rgba(24,144,255,.45);box-shadow:0 6px 16px rgba(24,144,255,.45)} +.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-header .group-header-left .group-icon[data-v-533cb131]{color:#1890ff} +.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item[data-v-533cb131]:hover{border-left-color:#1890ff;border-color:rgba(24,144,255,.22);-webkit-box-shadow:0 2px 8px rgba(24,144,255,.08);box-shadow:0 2px 8px rgba(24,144,255,.08)} +.trading-assistant .strategy-list-col .strategy-list-card .strategy-grouped-list .strategy-group .strategy-group-content .strategy-list-item.active[data-v-533cb131]{border-color:rgba(24,144,255,.35);border-left-color:#1890ff;-webkit-box-shadow:0 2px 12px rgba(24,144,255,.12);box-shadow:0 2px 12px rgba(24,144,255,.12)} +.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item[data-v-533cb131]:hover{border-color:rgba(24,144,255,.2);-webkit-box-shadow:0 2px 12px rgba(24,144,255,.1);box-shadow:0 2px 12px rgba(24,144,255,.1)} +.trading-assistant .strategy-list-col .strategy-list-card .strategy-list-item.active[data-v-533cb131]{border-color:#1890ff;border-left:4px solid #1890ff;-webkit-box-shadow:0 4px 16px rgba(24,144,255,.15);box-shadow:0 4px 16px rgba(24,144,255,.15)} +.trading-assistant .strategy-detail-col .strategy-empty-detail-icon[data-v-533cb131]{background:linear-gradient(135deg,rgba(24,144,255,.12),rgba(64,169,255,.08));color:#1890ff} +.trading-assistant .strategy-detail-col .strategy-detail-panel .strategy-header-card .strategy-header .header-left .strategy-tags .tag-item .anticon[data-v-533cb131]{color:#1890ff} +.trading-assistant.theme-dark .creation-mode-toggle[data-v-533cb131]{background:rgba(24,144,255,.08);border-color:rgba(24,144,255,.2)} +.trading-assistant.theme-dark .strategy-list-col .group-mode-switch[data-v-533cb131] .ant-radio-button-wrapper:hover{color:#69c0ff} +.trading-assistant.theme-dark .strategy-list-col .group-mode-switch[data-v-533cb131] .ant-radio-button-wrapper-checked{background:rgba(24,144,255,.25)!important;border-color:#1890ff!important} +.trading-assistant.theme-dark .strategy-list-col .strategy-group-content .strategy-list-item[data-v-533cb131]:hover{border-left-color:#1890ff} +.trading-assistant.theme-dark .strategy-list-col .strategy-group-content .strategy-list-item.active[data-v-533cb131]{background:rgba(24,144,255,.12);border-color:rgba(24,144,255,.28);border-left-color:#1890ff} +.trading-assistant.theme-dark .strategy-list-col .strategy-list-item.active[data-v-533cb131]{background:rgba(24,144,255,.1);border-color:#1890ff;-webkit-box-shadow:0 4px 20px rgba(24,144,255,.2);box-shadow:0 4px 20px rgba(24,144,255,.2)} +.trading-assistant.theme-dark .strategy-detail-col .strategy-header-card .strategy-tags .tag-item[data-v-533cb131]:hover{background:rgba(24,144,255,.1);border-color:rgba(24,144,255,.3)} +.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-533cb131] .ant-tabs .ant-tabs-nav .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn{color:#1890ff} +.trading-assistant.theme-dark .strategy-detail-col .strategy-content-card[data-v-533cb131] .ant-tabs .ant-tabs-nav .ant-tabs-ink-bar{background:-webkit-gradient(linear,left top,right top,from(#1890ff),to(#40a9ff));background:linear-gradient(90deg,#1890ff,#40a9ff)} +.trading-assistant.theme-dark .strategy-detail-col .strategy-empty-detail-icon[data-v-533cb131]{background:linear-gradient(135deg,rgba(24,144,255,.22),rgba(64,169,255,.1));color:#69c0ff} +.theme-dark .assistant-guide-bar .assistant-guide-eyebrow[data-v-533cb131]{color:#69c0ff} +.theme-dark .assistant-guide-bar .assistant-guide-close[data-v-533cb131]:focus,.theme-dark .assistant-guide-bar .assistant-guide-close[data-v-533cb131]:hover{color:#91d5ff} +.ai-filter-title .anticon[data-v-533cb131]{color:#1890ff} +.creation-mode-toggle[data-v-533cb131]{background:rgba(24,144,255,.04);border:1px solid rgba(24,144,255,.12)} +.simple-mode-hero[data-v-533cb131]{background:linear-gradient(135deg,rgba(24,144,255,.08),rgba(114,46,209,.06));border:1px solid rgba(24,144,255,.14)} +.simple-mode-kicker[data-v-533cb131]{color:#1890ff} +.advanced-settings-shell[data-v-533cb131],.selected-indicator-card[data-v-533cb131],.simple-essentials-card[data-v-533cb131]{border:1px solid rgba(24,144,255,.12)} +.execution-step-hero[data-v-533cb131]{background:linear-gradient(135deg,rgba(82,196,26,.08),rgba(24,144,255,.08));border:1px solid rgba(24,144,255,.14)} +.execution-section-card[data-v-533cb131]{border:1px solid rgba(24,144,255,.12)} +.execution-mode-card[data-v-533cb131]{border:1px solid rgba(24,144,255,.12)} +.execution-mode-card[data-v-533cb131]:hover{border-color:rgba(24,144,255,.35);-webkit-box-shadow:0 8px 24px rgba(24,144,255,.08);box-shadow:0 8px 24px rgba(24,144,255,.08)} +.execution-mode-card.active[data-v-533cb131]{border-color:#1890ff;background:linear-gradient(135deg,rgba(24,144,255,.08),rgba(24,144,255,.03));-webkit-box-shadow:0 10px 28px rgba(24,144,255,.12);box-shadow:0 10px 28px rgba(24,144,255,.12)} +.execution-mode-card.disabled[data-v-533cb131]:hover{border-color:rgba(24,144,255,.12)} +.execution-mode-card-icon.signal[data-v-533cb131]{color:#1890ff;background:rgba(24,144,255,.1)} +.execution-mode-card-check[data-v-533cb131]{color:#1890ff} +.strategy-type-selector .strategy-type-card[data-v-533cb131]:hover{border-color:#1890ff;-webkit-box-shadow:0 2px 8px rgba(24,144,255,.2);box-shadow:0 2px 8px rgba(24,144,255,.2)} +.strategy-type-selector .strategy-type-card.selected[data-v-533cb131]{border-color:#1890ff;background-color:#e6f7ff;-webkit-box-shadow:0 2px 8px rgba(24,144,255,.3);box-shadow:0 2px 8px rgba(24,144,255,.3)} +.strategy-type-selector .strategy-type-card .strategy-type-content .strategy-type-icon[data-v-533cb131]{color:#1890ff} +.theme-dark .simple-mode-hero[data-v-533cb131]{background:linear-gradient(135deg,rgba(24,144,255,.14),rgba(114,46,209,.12))} +.theme-dark .execution-step-hero[data-v-533cb131]{background:linear-gradient(135deg,rgba(82,196,26,.14),rgba(24,144,255,.14))} +.theme-dark .execution-mode-card[data-v-533cb131]:hover{-webkit-box-shadow:0 8px 24px rgba(24,144,255,.12);box-shadow:0 8px 24px rgba(24,144,255,.12)} +.theme-dark .execution-mode-card.active[data-v-533cb131]{background:linear-gradient(135deg,rgba(24,144,255,.16),rgba(24,144,255,.08));border-color:#1890ff} +.theme-dark .simple-mode-kicker[data-v-533cb131]{color:#69c0ff} +.ip-whitelist-tip[data-v-533cb131]{background-color:#e6f7ff;border:1px solid #91d5ff;color:#1890ff} +.ip-whitelist-tip .anticon[data-v-533cb131]{color:#1890ff} body.dark .strategy-form-modal.strategy-form-modal-dark .ant-modal-content .creation-mode-toggle{background:rgba(24,144,255,.08);border-color:rgba(24,144,255,.2)} -body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-finish .ant-steps-item-icon,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-process .ant-steps-item-icon{border-color:#1890ff} +body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-process .ant-steps-item-icon{background:#1890ff;border-color:#1890ff} +body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-finish .ant-steps-item-icon{border-color:#1890ff} +body.dark .strategy-form-modal.strategy-form-modal-dark .ant-steps .ant-steps-item-finish .ant-steps-item-icon .ant-steps-icon{color:#1890ff} body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number:focus,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number:hover,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input:focus,body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input:hover{border-color:#1890ff} body.dark .strategy-form-modal.strategy-form-modal-dark .ant-input-number-handler-wrap .ant-input-number-handler:hover{color:#1890ff} body.dark .strategy-form-modal.strategy-form-modal-dark .ant-select .ant-select-selection:hover{border-color:#1890ff} @@ -203,6 +212,10 @@ body.dark .strategy-form-modal.strategy-form-modal-dark .ant-switch.ant-switch-c body.dark .strategy-form-modal.strategy-form-modal-dark .simple-mode-hero{background:linear-gradient(135deg,rgba(24,144,255,.16),rgba(114,46,209,.14))} body.dark .strategy-form-modal.strategy-form-modal-dark .execution-step-hero{background:linear-gradient(135deg,rgba(82,196,26,.16),rgba(24,144,255,.14))} body.dark .strategy-form-modal.strategy-form-modal-dark .ip-whitelist-tip{background:rgba(24,144,255,.08);border-color:rgba(24,144,255,.2);color:#40a9ff} +body.dark .strategy-form-modal.strategy-form-modal-dark .execution-mode-card:hover{-webkit-box-shadow:0 8px 24px rgba(24,144,255,.12);box-shadow:0 8px 24px rgba(24,144,255,.12)} +body.dark .strategy-form-modal.strategy-form-modal-dark .execution-mode-card.active{background:linear-gradient(135deg,rgba(24,144,255,.16),rgba(24,144,255,.08));border-color:#1890ff} +body.dark .strategy-form-modal.strategy-form-modal-dark .execution-mode-card-icon.signal{color:#69c0ff;background:rgba(24,144,255,.15)} +body.dark .strategy-form-modal.strategy-form-modal-dark .simple-mode-kicker{color:#69c0ff} body.dark .ant-select-dropdown .ant-select-dropdown-menu-item-active,body.dark .ant-select-dropdown .ant-select-dropdown-menu-item:hover{background:rgba(24,144,255,.1)} body.dark .ant-select-dropdown .ant-select-dropdown-menu-item-selected{background:rgba(24,144,255,.15);color:#1890ff} body.dark .ant-modal-wrap .ant-alert{background:rgba(24,144,255,.06);border-color:rgba(24,144,255,.2)} @@ -297,25 +310,22 @@ body.dark .ant-modal-wrap .ant-alert{background:rgba(24,144,255,.06);border-colo .theme-dark .position-checkbox-item[data-v-398d904c]:hover{background:rgba(24,144,255,.1)} .theme-dark .alert-symbol-info .current-price-info[data-v-398d904c]{background:linear-gradient(135deg,rgba(24,144,255,.15),rgba(114,46,209,.1))} .theme-dark .alert-symbol-info .current-price-info .price[data-v-398d904c]{color:#40a9ff} -.profile-page .page-header .page-title .anticon[data-v-06c79ed5]{color:#1890ff} -.profile-page .profile-card .profile-info .info-item .anticon[data-v-06c79ed5]{color:#1890ff} -.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-tabs-tab-active{color:#1890ff} -.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-input-password:focus,.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-input-password:hover,.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-input:focus,.profile-page.theme-dark .edit-card[data-v-06c79ed5] .ant-input:hover{border-color:#1890ff} -.profile-page.theme-dark[data-v-06c79ed5] .ant-table-wrapper .ant-tag-blue{background:rgba(24,144,255,.25);border-color:#1890ff;color:#69c0ff} -.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-checkbox-checked .ant-checkbox-inner,.profile-page.theme-dark .notification-settings-form[data-v-06c79ed5] .ant-radio-checked .ant-radio-inner,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-checkbox-checked .ant-checkbox-inner,.profile-page.theme-dark .password-form[data-v-06c79ed5] .ant-radio-checked .ant-radio-inner,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-checkbox-checked .ant-checkbox-inner,.profile-page.theme-dark .profile-form[data-v-06c79ed5] .ant-radio-checked .ant-radio-inner{background-color:#1890ff;border-color:#1890ff} -.profile-page.theme-dark[data-v-06c79ed5] .ant-pagination .ant-pagination-item:hover{border-color:#1890ff} -.profile-page.theme-dark[data-v-06c79ed5] .ant-pagination .ant-pagination-item-active{background:#1890ff;border-color:#1890ff} -.profile-page.theme-dark[data-v-06c79ed5] .ant-btn.ant-btn-default:hover{border-color:#1890ff;color:#1890ff} -.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout{border:1px solid rgba(24,144,255,.18);background:-webkit-gradient(linear,left top,right top,from(rgba(24,144,255,.06)),to(rgba(82,196,26,.04)));background:linear-gradient(90deg,rgba(24,144,255,.06),rgba(82,196,26,.04))} -.profile-exchange-modal .exchange-account-form .exchange-api-doc-callout__icon{background:rgba(24,144,255,.12);color:#1890ff} -.profile-exchange-modal--dark .exchange-account-form .exchange-api-doc-callout{background:-webkit-gradient(linear,left top,right top,from(rgba(24,144,255,.12)),to(rgba(82,196,26,.08)));background:linear-gradient(90deg,rgba(24,144,255,.12),rgba(82,196,26,.08))} +.profile-page .page-header .page-title .anticon[data-v-2151383b]{color:#1890ff} +.profile-page .profile-card .profile-info .info-item .anticon[data-v-2151383b]{color:#1890ff} +.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-tabs-tab-active{color:#1890ff} +.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-input-password:focus,.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-input-password:hover,.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-input:focus,.profile-page.theme-dark .edit-card[data-v-2151383b] .ant-input:hover{border-color:#1890ff} +.profile-page.theme-dark[data-v-2151383b] .ant-table-wrapper .ant-tag-blue{background:rgba(24,144,255,.25);border-color:#1890ff;color:#69c0ff} +.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-checkbox-checked .ant-checkbox-inner,.profile-page.theme-dark .notification-settings-form[data-v-2151383b] .ant-radio-checked .ant-radio-inner,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-checkbox-checked .ant-checkbox-inner,.profile-page.theme-dark .password-form[data-v-2151383b] .ant-radio-checked .ant-radio-inner,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-checkbox-checked .ant-checkbox-inner,.profile-page.theme-dark .profile-form[data-v-2151383b] .ant-radio-checked .ant-radio-inner{background-color:#1890ff;border-color:#1890ff} +.profile-page.theme-dark[data-v-2151383b] .ant-pagination .ant-pagination-item:hover{border-color:#1890ff} +.profile-page.theme-dark[data-v-2151383b] .ant-pagination .ant-pagination-item-active{background:#1890ff;border-color:#1890ff} +.profile-page.theme-dark[data-v-2151383b] .ant-btn.ant-btn-default:hover{border-color:#1890ff;color:#1890ff} .billing-page .plan-card.highlight[data-v-714c882a]{border:1px solid rgba(24,144,255,.35)} .usdt-checkout .checkout-body .info-section .addr-box .copy-btn:hover,.usdt-checkout .checkout-body .info-section .amt-box .copy-btn:hover{background:rgba(24,144,255,.08);color:#1890ff} body.dark .usdt-checkout .checkout-body .info-section .addr-box .copy-btn:hover,body.dark .usdt-checkout .checkout-body .info-section .amt-box .copy-btn:hover,body.realdark .usdt-checkout .checkout-body .info-section .addr-box .copy-btn:hover,body.realdark .usdt-checkout .checkout-body .info-section .amt-box .copy-btn:hover{background:rgba(24,144,255,.15);color:#40a9ff} -.user-manage-page .page-header .page-title .anticon[data-v-4e5dc5e0]{color:#1890ff} -.user-manage-page .address-text[data-v-4e5dc5e0],.user-manage-page .hash-text[data-v-4e5dc5e0]{color:#1890ff} -.user-manage-page.theme-dark .manage-tabs[data-v-4e5dc5e0] .ant-tabs-tab-active{color:#1890ff} -.user-manage-page .current-credits-info .value[data-v-4e5dc5e0],.user-manage-page .current-vip-info .value[data-v-4e5dc5e0]{color:#1890ff} +.user-manage-page .page-header .page-title .anticon[data-v-7a022132]{color:#1890ff} +.user-manage-page .address-text[data-v-7a022132],.user-manage-page .hash-text[data-v-7a022132]{color:#1890ff} +.user-manage-page.theme-dark .manage-tabs[data-v-7a022132] .ant-tabs-tab-active{color:#1890ff} +.user-manage-page .current-credits-info .value[data-v-7a022132],.user-manage-page .current-vip-info .value[data-v-7a022132]{color:#1890ff} .settings-page .settings-header .page-title .anticon[data-v-15e1ba02]{color:#1890ff} .settings-page .openrouter-balance-card .ant-card[data-v-15e1ba02]{background:linear-gradient(135deg,#e6f7ff,#f0f5ff);border:1px solid #91d5ff} .settings-page .openrouter-balance-card .balance-header .balance-title[data-v-15e1ba02]{color:#1890ff} diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 1326233..e212296 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -421,4 +421,4 @@ .brand-text { font-size: 20px; } - }

Landing

QuantDinger
\ No newline at end of file + }

Landing

QuantDinger
\ No newline at end of file diff --git a/frontend/dist/js/11.e5204d5e.js b/frontend/dist/js/11.e5204d5e.js new file mode 100644 index 0000000..dcce1e0 --- /dev/null +++ b/frontend/dist/js/11.e5204d5e.js @@ -0,0 +1 @@ +"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[11],{40011:function(e,t,a){a.d(t,{A:function(){return m}});var r=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.$t("profile.exchange.addTitle"),visible:e.visible,"wrap-class-name":e.modalWrapClass,confirmLoading:e.savingExchange,okText:e.$t("common.save"),cancelText:e.$t("common.cancel"),maskClosable:!1,width:"520px"},on:{ok:e.handleSaveExchange,cancel:e.handleCancel}},[t("a-form",{staticClass:"exchange-account-form",attrs:{form:e.exchangeForm,layout:"vertical"}},[t("a-form-item",{attrs:{label:e.$t("profile.exchange.selectExchange")}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["exchange_id",{rules:[{required:!0,message:e.$t("profile.exchange.selectExchange")}]}],expression:"['exchange_id', { rules: [{ required: true, message: $t('profile.exchange.selectExchange') }] }]"}],attrs:{placeholder:e.$t("profile.exchange.selectExchange"),"dropdown-class-name":e.isDarkTheme?"profile-exchange-select-dropdown-dark":"","get-popup-container":e.getExchangeSelectPopupContainer},on:{change:e.handleExchangeTypeChange}},[t("a-select-opt-group",{attrs:{label:e.$t("profile.exchange.typeCrypto")}},e._l(e.cryptoExchangeList,function(a){return t("a-select-option",{key:a.id,attrs:{value:a.id}},[e._v(" "+e._s(a.name)+" ")])}),1),t("a-select-opt-group",{attrs:{label:e.$t("profile.exchange.typeIBKR")}},[t("a-select-option",{attrs:{value:"ibkr"}},[e._v("Interactive Brokers (IBKR)")])],1),t("a-select-opt-group",{attrs:{label:e.$t("profile.exchange.typeMT5")}},[t("a-select-option",{attrs:{value:"mt5"}},[e._v("MetaTrader 5")])],1)],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.accountName")}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name"],expression:"['name']"}],attrs:{placeholder:e.$t("profile.exchange.accountNamePlaceholder")}})],1),"crypto"===e.addExchangeType?t("a-form-item",{attrs:{label:e.$t("profile.exchange.whitelistIpLabel")}},[t("div",{staticClass:"egress-ip-block"},[e.egressIpLoading?t("a-spin",{attrs:{size:"small"}}):[t("div",{staticClass:"egress-ip-line"},[t("span",{staticClass:"egress-ip-kind"},[e._v(e._s(e.$t("profile.exchange.whitelistIpv4")))]),t("code",{staticClass:"egress-ip-value"},[e._v(e._s(e.egressServerIpv4||"—"))]),t("a-button",{staticClass:"egress-ip-action",attrs:{type:"link",size:"small",disabled:!e.egressServerIpv4},on:{click:function(t){return e.copyEgressIp("v4")}}},[e._v(" "+e._s(e.$t("profile.exchange.whitelistIpCopy"))+" ")])],1),t("div",{staticClass:"egress-ip-line"},[t("span",{staticClass:"egress-ip-kind"},[e._v(e._s(e.$t("profile.exchange.whitelistIpv6")))]),t("code",{staticClass:"egress-ip-value"},[e._v(e._s(e.egressServerIpv6||"—"))]),t("a-button",{staticClass:"egress-ip-action",attrs:{type:"link",size:"small",disabled:!e.egressServerIpv6},on:{click:function(t){return e.copyEgressIp("v6")}}},[e._v(" "+e._s(e.$t("profile.exchange.whitelistIpCopy"))+" ")])],1),t("div",{staticClass:"egress-ip-row egress-ip-refresh-row"},[t("a-button",{staticClass:"egress-ip-action",attrs:{type:"link",size:"small"},on:{click:e.fetchEgressIp}},[e._v(" "+e._s(e.$t("profile.exchange.whitelistIpRefresh"))+" ")])],1)]],2),t("div",{staticClass:"field-hint egress-ip-hint"},[e._v(e._s(e.$t("profile.exchange.whitelistIpHint")))])]):e._e(),"crypto"===e.addExchangeType?[e.selectedExchangeApiDocUrl?t("div",{staticClass:"exchange-api-doc-callout"},[t("div",{staticClass:"exchange-api-doc-callout__content"},[t("div",{staticClass:"exchange-api-doc-callout__icon"},[t("a-icon",{attrs:{type:"link"}})],1),t("div",{staticClass:"exchange-api-doc-callout__text"},[t("div",{staticClass:"exchange-api-doc-callout__title"},[e._v(" "+e._s(e.selectedCryptoExchangeName)+" "+e._s(e.$t("profile.exchange.apiDocTitleSuffix"))+" ")]),t("div",{staticClass:"exchange-api-doc-callout__hint"},[e._v(" "+e._s(e.$t("profile.exchange.apiDocHint"))+" ")])])]),t("a-button",{staticClass:"exchange-api-doc-callout__action",attrs:{type:"link",size:"small"},on:{click:e.openSelectedExchangeApiDoc}},[e._v(" "+e._s(e.$t("profile.exchange.apiDocAction"))+" "),t("a-icon",{attrs:{type:"arrow-right"}})],1)],1):e._e(),t("a-form-item",{attrs:{label:e.$t("profile.exchange.apiKey")}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["api_key",{rules:[{required:!0,message:"API Key is required"}]}],expression:"['api_key', { rules: [{ required: true, message: 'API Key is required' }] }]"}],attrs:{placeholder:"API Key",autocomplete:"new-password"}})],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.secretKey")}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["secret_key",{rules:[{required:!0,message:"Secret Key is required"}]}],expression:"['secret_key', { rules: [{ required: true, message: 'Secret Key is required' }] }]"}],attrs:{placeholder:"Secret Key",autocomplete:"new-password"}})],1),e.addExchangeNeedsPassphrase?t("a-form-item",{attrs:{label:e.$t("profile.exchange.passphrase")}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["passphrase"],expression:"['passphrase']"}],attrs:{placeholder:"Passphrase",autocomplete:"new-password"}})],1):e._e(),e.addExchangeShowDemo?t("a-form-item",[t("a-checkbox",{directives:[{name:"decorator",rawName:"v-decorator",value:["enable_demo_trading",{valuePropName:"checked",initialValue:!1}],expression:"['enable_demo_trading', { valuePropName: 'checked', initialValue: false }]"}],staticClass:"exchange-demo-checkbox"},[t("span",{staticClass:"exchange-demo-checkbox-label"},[e._v(e._s(e.$t("profile.exchange.demoTrading")))])]),t("div",{staticClass:"field-hint exchange-demo-hint"},[e._v(e._s(e.$t("profile.exchange.demoTradingHint")))])],1):e._e()]:e._e(),"ibkr"===e.addExchangeType?[t("a-alert",{staticStyle:{"margin-bottom":"16px"},attrs:{type:"warning",showIcon:"",message:e.$t("profile.exchange.localDeploymentRequired"),description:e.$t("profile.exchange.localDeploymentHint")}}),t("a-form-item",{attrs:{label:e.$t("profile.exchange.ibkrHost")}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["ibkr_host",{initialValue:"127.0.0.1"}],expression:"['ibkr_host', { initialValue: '127.0.0.1' }]"}],attrs:{placeholder:"127.0.0.1"}})],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.ibkrPort")}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["ibkr_port",{initialValue:7497}],expression:"['ibkr_port', { initialValue: 7497 }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:65535}}),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.exchange.ibkrPortHint")))])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.ibkrClientId")}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["ibkr_client_id",{initialValue:1}],expression:"['ibkr_client_id', { initialValue: 1 }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:999}})],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.ibkrAccount")}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["ibkr_account"],expression:"['ibkr_account']"}],attrs:{placeholder:"DU123456"}})],1)]:e._e(),"mt5"===e.addExchangeType?[t("a-alert",{staticStyle:{"margin-bottom":"16px"},attrs:{type:"warning",showIcon:"",message:e.$t("profile.exchange.localDeploymentRequired"),description:e.$t("profile.exchange.localDeploymentHint")}}),t("a-form-item",{attrs:{label:e.$t("profile.exchange.mt5Server")}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["mt5_server",{rules:[{required:!0,message:"Server is required"}]}],expression:"['mt5_server', { rules: [{ required: true, message: 'Server is required' }] }]"}],attrs:{placeholder:"MetaQuotes-Demo"}})],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.mt5Login")}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["mt5_login",{rules:[{required:!0,message:"Login is required"}]}],expression:"['mt5_login', { rules: [{ required: true, message: 'Login is required' }] }]"}],staticStyle:{width:"100%"},attrs:{min:1,placeholder:"12345678"}})],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.mt5Password")}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["mt5_password",{rules:[{required:!0,message:"Password is required"}]}],expression:"['mt5_password', { rules: [{ required: true, message: 'Password is required' }] }]"}],attrs:{placeholder:"Password",autocomplete:"new-password"}})],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.mt5TerminalPath")}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["mt5_terminal_path"],expression:"['mt5_terminal_path']"}],attrs:{placeholder:"C:\\Program Files\\MetaTrader 5\\terminal64.exe"}}),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.exchange.mt5TerminalPathHint")))])],1)],1)]:e._e(),e.addExchangeType?t("a-form-item",[t("a-button",{attrs:{block:"",loading:e.testingExchange},on:{click:e.handleTestExchangeConnection}},[t("a-icon",{attrs:{type:"api"}}),e._v(" "+e._s(e.$t("profile.exchange.testConnection"))+" ")],1),e.exchangeTestResult?t("div",{staticClass:"test-result-msg",class:e.exchangeTestResult.success?"success":"error"},[t("a-icon",{attrs:{type:e.exchangeTestResult.success?"check-circle":"close-circle"}}),e._v(" "+e._s(e.exchangeTestResult.message)+" ")],1):e._e()],1):e._e()],2)],1)},s=[],i=a(81127),n=a(56252),c=a(76338),o=(a(74423),a(95353)),l=a(42430),p=a(36911),d={name:"ExchangeAccountModal",props:{visible:{type:Boolean,default:!1}},data:function(){return{savingExchange:!1,testingExchange:!1,exchangeTestResult:null,addExchangeType:"",selectedExchangeId:"",egressServerIpv4:"",egressServerIpv6:"",egressIpLoading:!1,cryptoExchangeList:[{id:"binance",name:"Binance",docsUrl:"https://www.binance.com/en/support/faq/detail/360002502072"},{id:"okx",name:"OKX",docsUrl:"https://www.okx.com/docs-v5/zh/#overview-v5-api-key-creation"},{id:"bitget",name:"Bitget",docsUrl:"https://www.bitget.com/api-doc/common/quick-start"},{id:"bybit",name:"Bybit",docsUrl:"https://www.bybit.com/en/help-center/article/How-to-create-your-API-key/"},{id:"coinbaseexchange",name:"Coinbase",docsUrl:"https://docs.cdp.coinbase.com/exchange/rest-api/authentication"},{id:"kraken",name:"Kraken",docsUrl:"https://support.kraken.com/articles/360000919966-how-to-create-an-api-key"},{id:"kucoin",name:"KuCoin",docsUrl:"https://www.kucoin.com/docs-new/authentication"},{id:"gate",name:"Gate.io",docsUrl:"https://www.gate.com/docs/developers/apiv4/"},{id:"bitfinex",name:"Bitfinex",docsUrl:"https://docs.bitfinex.com/docs/create-an-api-key"},{id:"deepcoin",name:"Deepcoin",docsUrl:"https://www.deepcoin.com/docs/authentication"},{id:"htx",name:"HTX",docsUrl:"https://www.htx.com/en-us/opend/newApiPages/?id=414"}]}},computed:(0,c.A)((0,c.A)({},(0,o.aH)({navTheme:function(e){return e.app.theme}})),{},{isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},modalWrapClass:function(){var e="profile-exchange-modal";return this.isDarkTheme?"".concat(e," ").concat(e,"--dark"):e},addExchangeNeedsPassphrase:function(){return["okx","bitget","kucoin"].includes(this.selectedExchangeId)},addExchangeShowDemo:function(){return"crypto"===this.addExchangeType&&!!this.selectedExchangeId},selectedCryptoExchangeMeta:function(){var e=this;return this.cryptoExchangeList.find(function(t){return t.id===e.selectedExchangeId})||null},selectedCryptoExchangeName:function(){return this.selectedCryptoExchangeMeta?this.selectedCryptoExchangeMeta.name:this.getExchangeDisplayName(this.selectedExchangeId)},selectedExchangeApiDocUrl:function(){return this.selectedCryptoExchangeMeta?this.selectedCryptoExchangeMeta.docsUrl:""}}),watch:{visible:function(e){e&&this.fetchEgressIp()}},beforeCreate:function(){this.exchangeForm=this.$form.createForm(this,{name:"exchangeAccountModal"})},methods:{getExchangeSelectPopupContainer:function(){return document.body},handleCancel:function(){this.$emit("update:visible",!1)},getExchangeDisplayName:function(e){var t={binance:"Binance",okx:"OKX",bitget:"Bitget",bybit:"Bybit",coinbaseexchange:"Coinbase",kraken:"Kraken",kucoin:"KuCoin",gate:"Gate.io",bitfinex:"Bitfinex",deepcoin:"Deepcoin",htx:"HTX",ibkr:"IBKR",mt5:"MetaTrader 5"};return t[e]||e},fetchEgressIp:function(){var e=this;return(0,n.A)((0,i.A)().m(function t(){var a,r,s,n;return(0,i.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return e.egressIpLoading=!0,e.egressServerIpv4="",e.egressServerIpv6="",t.p=1,t.n=2,(0,l.N6)();case 2:a=t.v,1===a.code&&a.data&&(r=null!=a.data.ipv4?String(a.data.ipv4).trim():"",s=null!=a.data.ipv6?String(a.data.ipv6).trim():"",e.egressServerIpv4=r,e.egressServerIpv6=s,r||s||!a.data.ip||(n=String(a.data.ip).trim(),n.includes(":")?e.egressServerIpv6=n:e.egressServerIpv4=n)),t.n=4;break;case 3:t.p=3,t.v,e.egressServerIpv4="",e.egressServerIpv6="";case 4:return t.p=4,e.egressIpLoading=!1,t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}))()},copyEgressIp:function(e){var t=this,a="v6"===e?this.egressServerIpv6:this.egressServerIpv4;if(a){var r=function(){return t.$message.success(t.$t("profile.exchange.whitelistIpCopied"))};navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(a).then(r).catch(function(){return t._fallbackCopyText(a,r)}):this._fallbackCopyText(a,r)}},_fallbackCopyText:function(e,t){try{var a=document.createElement("textarea");a.value=e,a.style.position="fixed",a.style.left="-9999px",document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a),t&&t()}catch(r){this.$message.error(this.$t("profile.exchange.whitelistIpCopyFail"))}},handleExchangeTypeChange:function(e){this.selectedExchangeId=e,this.exchangeTestResult=null;var t=this.cryptoExchangeList.map(function(e){return e.id});t.includes(e)?this.addExchangeType="crypto":this.addExchangeType="ibkr"===e?"ibkr":"mt5"===e?"mt5":""},openSelectedExchangeApiDoc:function(){var e=this.selectedExchangeApiDocUrl;e&&window.open(e,"_blank")},handleSaveExchange:function(){var e=this;this.exchangeForm.validateFields(function(){var t=(0,n.A)((0,i.A)().m(function t(a,r){var s,n,o;return(0,i.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(!a){t.n=1;break}return t.a(2);case 1:return e.savingExchange=!0,t.p=2,s=(0,c.A)({},r),t.n=3,(0,l.PR)(s);case 3:n=t.v,1===n.code?(e.$message.success(e.$t("profile.exchange.saveSuccess")),e.$emit("update:visible",!1),e.exchangeForm.resetFields(),e.addExchangeType="",e.selectedExchangeId="",e.exchangeTestResult=null,e.$emit("success",n.data)):e.$message.error(n.msg||e.$t("profile.exchange.saveFailed")),t.n=5;break;case 4:t.p=4,o=t.v,e.$message.error(o.message||e.$t("profile.exchange.saveFailed"));case 5:return t.p=5,e.savingExchange=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}));return function(e,a){return t.apply(this,arguments)}}())},handleTestExchangeConnection:function(){var e=this;return(0,n.A)((0,i.A)().m(function t(){var a,r,s,n,o,l;return(0,i.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(a=e.exchangeForm.getFieldsValue(),r=a.exchange_id,r){t.n=1;break}return t.a(2);case 1:return e.testingExchange=!0,e.exchangeTestResult=null,t.p=2,s=(0,c.A)({},a),t.n=3,(0,p.kv)(s);case 3:n=t.v,1===n.code?e.exchangeTestResult={success:!0,message:e.$t("profile.exchange.testSuccess")}:(o=n.data&&n.data.hint_cn?" ".concat(n.data.hint_cn):"",e.exchangeTestResult={success:!1,message:"".concat(e.$t("profile.exchange.testFailed"),": ").concat(n.msg||"Unknown error").concat(o)}),t.n=5;break;case 4:t.p=4,l=t.v,e.exchangeTestResult={success:!1,message:"".concat(e.$t("profile.exchange.testFailed"),": ").concat(l.message||"Network error")};case 5:return t.p=5,e.testingExchange=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}))()}}},h=d,u=a(845),g=(0,u.A)(h,r,s,!1,null,null,null),m=g.exports},42430:function(e,t,a){a.d(t,{IA:function(){return n},N6:function(){return l},PR:function(){return c},kI:function(){return o}});var r=a(76338),s=a(75769),i={list:"/api/credentials/list",get:"/api/credentials/get",create:"/api/credentials/create",delete:"/api/credentials/delete",egressIp:"/api/credentials/egress-ip"};function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,s.Ay)({url:i.list,method:"get",params:e})}function c(e){return(0,s.Ay)({url:i.create,method:"post",data:e})}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,s.Ay)({url:i.delete,method:"delete",params:(0,r.A)({id:e},t)})}function l(){return(0,s.Ay)({url:i.egressIp,method:"get"})}}}]); \ No newline at end of file diff --git a/frontend/dist/js/140.98593fae.js b/frontend/dist/js/140.98593fae.js deleted file mode 100644 index ac32363..0000000 --- a/frontend/dist/js/140.98593fae.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[140],{2140:function(e,t,a){a.r(t),a.d(t,{default:function(){return v}});var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"profile-page",class:{"theme-dark":e.isDarkTheme}},[t("div",{staticClass:"page-header"},[t("h2",{staticClass:"page-title"},[t("a-icon",{attrs:{type:"user"}}),t("span",[e._v(e._s(e.$t("profile.title")||"My Profile"))])],1),t("p",{staticClass:"page-desc"},[e._v(e._s(e.$t("profile.description")||"Manage your account settings and preferences"))])]),t("a-row",{staticClass:"profile-cards-row",attrs:{gutter:24}},[t("a-col",{staticClass:"profile-card-col",attrs:{xs:24,md:8}},[t("a-card",{staticClass:"profile-card",attrs:{bordered:!1}},[t("div",{staticClass:"avatar-section"},[t("a-avatar",{attrs:{size:100,src:e.profile.avatar||"/avatar2.jpg"}}),t("h3",{staticClass:"username"},[e._v(e._s(e.profile.nickname||e.profile.username))]),t("p",{staticClass:"user-role"},[t("a-tag",{attrs:{color:e.getRoleColor(e.profile.role)}},[e._v(" "+e._s(e.getRoleLabel(e.profile.role))+" ")]),e.isVip?t("a-tag",{attrs:{color:"gold"}},[t("a-icon",{attrs:{type:"crown"}}),e._v(" VIP ")],1):e._e()],1)],1),t("a-divider"),t("div",{staticClass:"profile-info"},[t("div",{staticClass:"info-item"},[t("a-icon",{attrs:{type:"user"}}),t("span",{staticClass:"label"},[e._v(e._s(e.$t("profile.username")||"Username")+":")]),t("span",{staticClass:"value"},[e._v(e._s(e.profile.username))])],1),t("div",{staticClass:"info-item"},[t("a-icon",{attrs:{type:"mail"}}),t("span",{staticClass:"label"},[e._v(e._s(e.$t("profile.email")||"Email")+":")]),t("span",{staticClass:"value"},[e._v(e._s(e.profile.email||"-"))])],1),t("div",{staticClass:"info-item"},[t("a-icon",{attrs:{type:"calendar"}}),t("span",{staticClass:"label"},[e._v(e._s(e.$t("profile.lastLogin")||"Last Login")+":")]),t("span",{staticClass:"value"},[e._v(e._s(e.formatTime(e.profile.last_login_at)||"-"))])],1)])],1)],1),t("a-col",{staticClass:"right-cards-col",attrs:{xs:24,md:16}},[t("a-row",{staticClass:"right-cards-row",attrs:{gutter:16}},[t("a-col",{attrs:{xs:24,md:12}},[t("a-card",{staticClass:"credits-card",attrs:{bordered:!1}},[t("div",{staticClass:"credits-header"},[t("h3",{staticClass:"credits-title"},[t("a-icon",{attrs:{type:"wallet"}}),e._v(" "+e._s(e.$t("profile.credits.title")||"我的积分")+" ")],1)]),t("div",{staticClass:"credits-body"},[t("div",{staticClass:"credits-amount"},[t("span",{staticClass:"amount-value"},[e._v(e._s(e.formatCredits(e.billing.credits)))]),t("span",{staticClass:"amount-label"},[e._v(e._s(e.$t("profile.credits.unit")||"积分"))])]),e.billing.vip_expires_at?t("div",{staticClass:"vip-status"},[t("a-icon",{style:{color:e.isVip?"#faad14":"#999"},attrs:{type:"crown"}}),e.isVip?t("span",{staticClass:"vip-active"},[e._v(" "+e._s(e.$t("profile.credits.vipExpires")||"VIP有效期至")+": "+e._s(e.formatDate(e.billing.vip_expires_at))+" ")]):t("span",{staticClass:"vip-expired"},[e._v(" "+e._s(e.$t("profile.credits.vipExpired")||"VIP已过期")+" ")])],1):e.billing.is_vip?e._e():t("div",{staticClass:"vip-status"},[t("span",{staticClass:"no-vip"},[e._v(e._s(e.$t("profile.credits.noVip")||"非VIP用户"))])])]),t("a-divider"),t("div",{staticClass:"credits-actions"},[t("a-button",{attrs:{type:"primary",icon:"shopping"},on:{click:e.handleRecharge}},[e._v(" "+e._s(e.$t("profile.credits.recharge")||"开通/充值")+" ")])],1),e.billing.billing_enabled?t("div",{staticClass:"credits-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.credits.hint")||"使用AI分析/回测/监控等功能会消耗积分;VIP仅可免费使用VIP免费指标。"))])],1):e._e()],1)],1),t("a-col",{attrs:{xs:24,md:12}},[t("a-card",{staticClass:"referral-card",attrs:{bordered:!1}},[t("div",{staticClass:"referral-header"},[t("h3",{staticClass:"referral-title"},[t("a-icon",{attrs:{type:"team"}}),e._v(" "+e._s(e.$t("profile.referral.title")||"邀请好友")+" ")],1)]),t("div",{staticClass:"referral-body"},[t("div",{staticClass:"referral-stats"},[t("div",{staticClass:"stat-item"},[t("span",{staticClass:"stat-value"},[e._v(e._s(e.referralData.total||0))]),t("span",{staticClass:"stat-label"},[e._v(e._s(e.$t("profile.referral.totalInvited")||"已邀请"))])]),e.referralData.referral_bonus>0?t("div",{staticClass:"stat-item"},[t("span",{staticClass:"stat-value"},[e._v("+"+e._s(e.referralData.referral_bonus))]),t("span",{staticClass:"stat-label"},[e._v(e._s(e.$t("profile.referral.bonusPerInvite")||"每邀请获得"))])]):e._e()]),t("a-divider",{staticStyle:{margin:"12px 0"}}),t("div",{staticClass:"referral-link-section"},[t("div",{staticClass:"link-label"},[e._v(e._s(e.$t("profile.referral.yourLink")||"您的邀请链接"))]),t("div",{staticClass:"link-box"},[t("a-input",{attrs:{value:e.referralLink,readonly:"",size:"small"}},[t("a-tooltip",{attrs:{slot:"suffix",title:e.$t("profile.referral.copyLink")||"复制链接"},slot:"suffix"},[t("a-icon",{staticStyle:{cursor:"pointer"},attrs:{type:"copy"},on:{click:e.copyReferralLink}})],1)],1)],1)]),e.referralData.register_bonus>0?t("div",{staticClass:"referral-hint"},[t("a-icon",{attrs:{type:"gift"}}),t("span",[e._v(e._s(e.$t("profile.referral.newUserBonus")||"新用户注册获得")+" "+e._s(e.referralData.register_bonus)+" "+e._s(e.$t("profile.credits.unit")||"积分"))])],1):e._e()],1)])],1)],1)],1)],1),t("a-row",{staticStyle:{"margin-top":"24px"},attrs:{gutter:24}},[t("a-col",{attrs:{xs:24}},[t("a-card",{staticClass:"edit-card",attrs:{bordered:!1}},[t("a-tabs",{model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[t("a-tab-pane",{key:"basic",attrs:{tab:e.$t("profile.basicInfo")||"Basic Info"}},[t("a-form",{staticClass:"profile-form",attrs:{form:e.profileForm,layout:"vertical"}},[t("a-form-item",{attrs:{label:e.$t("profile.nickname")||"Nickname"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["nickname",{initialValue:e.profile.nickname}],expression:"['nickname', { initialValue: profile.nickname }]"}],attrs:{placeholder:e.$t("profile.nicknamePlaceholder")||"Enter your nickname"}},[t("a-icon",{attrs:{slot:"prefix",type:"smile"},slot:"prefix"})],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.email")||"Email"}},[t("a-input",{attrs:{value:e.profile.email||"-",disabled:""}},[t("a-icon",{attrs:{slot:"prefix",type:"mail"},slot:"prefix"}),t("a-tooltip",{attrs:{slot:"suffix",title:e.$t("profile.emailCannotChange")||"Email cannot be changed after registration"},slot:"suffix"},[t("a-icon",{staticStyle:{color:"rgba(0,0,0,.45)"},attrs:{type:"info-circle"}})],1)],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.timezone")||"时区"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["timezone",{initialValue:e.profile.timezone||""}],expression:"['timezone', { initialValue: profile.timezone || '' }]"}],attrs:{placeholder:e.$t("profile.timezonePlaceholder")||"跟随浏览器/系统","show-search":"","allow-clear":"","option-filter-prop":"children"}},[t("a-select-option",{attrs:{value:""}},[e._v(" "+e._s(e.$t("profile.timezoneBrowser")||"跟随浏览器")+" ")]),e._l(e.timezoneIanaList,function(a){return t("a-select-option",{key:a,attrs:{value:a}},[e._v(" "+e._s(a)+" ")])})],2)],1),t("a-form-item",[t("a-button",{attrs:{type:"primary",loading:e.saving},on:{click:e.handleSaveProfile}},[t("a-icon",{attrs:{type:"save"}}),e._v(" "+e._s(e.$t("common.save")||"Save")+" ")],1)],1)],1)],1),t("a-tab-pane",{key:"password",attrs:{tab:e.$t("profile.changePassword")||"Change Password"}},[t("a-form",{staticClass:"password-form",attrs:{form:e.passwordForm,layout:"vertical"}},[t("a-alert",{staticStyle:{"margin-bottom":"24px"},attrs:{message:e.$t("profile.passwordHintNew")||"For security, email verification is required to change password. Password must be at least 8 characters with uppercase, lowercase, and number.",type:"info",showIcon:""}}),t("a-form-item",{attrs:{label:e.$t("profile.verificationCode")||"Verification Code"}},[t("a-row",{attrs:{gutter:12}},[t("a-col",{attrs:{span:16}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["code",{rules:[{required:!0,message:e.$t("profile.codeRequired")||"Please enter verification code"}]}],expression:"['code', {\n rules: [{ required: true, message: $t('profile.codeRequired') || 'Please enter verification code' }]\n }]"}],attrs:{placeholder:e.$t("profile.codePlaceholder")||"Enter verification code"}},[t("a-icon",{attrs:{slot:"prefix",type:"safety-certificate"},slot:"prefix"})],1)],1),t("a-col",{attrs:{span:8}},[t("a-button",{attrs:{block:"",loading:e.sendingPwdCode,disabled:e.sendingPwdCode||e.pwdCodeCountdown>0||!e.profile.email},on:{click:e.handleSendPwdCode}},[e._v(" "+e._s(e.pwdCodeCountdown>0?"".concat(e.pwdCodeCountdown,"s"):e.$t("profile.sendCode")||"Send Code")+" ")])],1)],1),e.profile.email?t("div",{staticClass:"email-hint"},[e._v(" "+e._s(e.$t("profile.codeWillSendTo")||"Code will be sent to")+": "+e._s(e.profile.email)+" ")]):t("div",{staticClass:"email-hint email-warning"},[e._v(" "+e._s(e.$t("profile.noEmailWarning")||"Please set your email first in Basic Info tab")+" ")])],1),t("a-form-item",{attrs:{label:e.$t("profile.newPassword")||"New Password"}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["new_password",{rules:[{required:!0,message:e.$t("profile.newPasswordRequired")||"Please enter new password"},{validator:e.validateNewPassword}]}],expression:"['new_password', {\n rules: [\n { required: true, message: $t('profile.newPasswordRequired') || 'Please enter new password' },\n { validator: validateNewPassword }\n ]\n }]"}],attrs:{placeholder:e.$t("profile.newPasswordPlaceholder")||"Enter new password"}},[t("a-icon",{attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.confirmPassword")||"Confirm Password"}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["confirm_password",{rules:[{required:!0,message:e.$t("profile.confirmPasswordRequired")||"Please confirm password"},{validator:e.validateConfirmPassword}]}],expression:"['confirm_password', {\n rules: [\n { required: true, message: $t('profile.confirmPasswordRequired') || 'Please confirm password' },\n { validator: validateConfirmPassword }\n ]\n }]"}],attrs:{placeholder:e.$t("profile.confirmPasswordPlaceholder")||"Confirm new password"}},[t("a-icon",{attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),t("a-form-item",[t("a-button",{attrs:{type:"primary",loading:e.changingPassword,disabled:!e.profile.email},on:{click:e.handleChangePassword}},[t("a-icon",{attrs:{type:"key"}}),e._v(" "+e._s(e.$t("profile.changePassword")||"Change Password")+" ")],1)],1)],1)],1),t("a-tab-pane",{key:"credits",attrs:{tab:e.$t("profile.creditsLog")||"消费记录"}},[t("a-table",{attrs:{columns:e.creditsLogColumns,dataSource:e.creditsLog,loading:e.creditsLogLoading,pagination:e.creditsLogPagination,rowKey:function(e){return e.id},size:"small"},on:{change:e.handleCreditsLogChange},scopedSlots:e._u([{key:"action",fn:function(a){return[t("a-tag",{attrs:{color:e.getActionColor(a)}},[e._v(" "+e._s(e.getActionLabel(a))+" ")])]}},{key:"amount",fn:function(a){return[t("span",{class:a>=0?"amount-positive":"amount-negative"},[e._v(" "+e._s(a>=0?"+":"")+e._s(a)+" ")])]}},{key:"created_at",fn:function(t){return[e._v(" "+e._s(e.formatCreditsLogTime(t))+" ")]}}])})],1),t("a-tab-pane",{key:"notifications",attrs:{tab:e.$t("profile.notifications.title")||"通知设置"}},[t("div",{staticClass:"notification-settings-form"},[t("a-alert",{staticStyle:{"margin-bottom":"24px"},attrs:{message:e.$t("profile.notifications.hint")||"配置您的默认通知方式,在创建资产监控和预警时将自动使用这些设置",type:"info",showIcon:""}}),t("a-form",{staticStyle:{"max-width":"600px"},attrs:{form:e.notificationForm,layout:"vertical"}},[t("a-form-item",{attrs:{label:e.$t("profile.notifications.defaultChannels")||"默认通知渠道"}},[t("a-checkbox-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["default_channels",{initialValue:e.notificationSettings.default_channels||["browser"]}],expression:"['default_channels', { initialValue: notificationSettings.default_channels || ['browser'] }]"}]},[t("a-row",{attrs:{gutter:16}},[t("a-col",{attrs:{span:8}},[t("a-checkbox",{attrs:{value:"browser"}},[t("a-icon",{attrs:{type:"bell"}}),e._v(" "+e._s(e.$t("profile.notifications.browser")||"站内通知")+" ")],1)],1),t("a-col",{attrs:{span:8}},[t("a-checkbox",{attrs:{value:"telegram"}},[t("a-icon",{attrs:{type:"send"}}),e._v(" Telegram ")],1)],1),t("a-col",{attrs:{span:8}},[t("a-checkbox",{attrs:{value:"email"}},[t("a-icon",{attrs:{type:"mail"}}),e._v(" "+e._s(e.$t("profile.notifications.email")||"邮件")+" ")],1)],1)],1),t("a-row",{staticStyle:{"margin-top":"8px"},attrs:{gutter:16}},[t("a-col",{attrs:{span:8}},[t("a-checkbox",{attrs:{value:"phone"}},[t("a-icon",{attrs:{type:"phone"}}),e._v(" "+e._s(e.$t("profile.notifications.phone")||"短信")+" ")],1)],1),t("a-col",{attrs:{span:8}},[t("a-checkbox",{attrs:{value:"discord"}},[t("a-icon",{attrs:{type:"message"}}),e._v(" Discord ")],1)],1),t("a-col",{attrs:{span:8}},[t("a-checkbox",{attrs:{value:"webhook"}},[t("a-icon",{attrs:{type:"api"}}),e._v(" Webhook ")],1)],1)],1)],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.telegramBotToken")||"Telegram Bot Token"}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["telegram_bot_token",{initialValue:e.notificationSettings.telegram_bot_token}],expression:"['telegram_bot_token', { initialValue: notificationSettings.telegram_bot_token }]"}],attrs:{placeholder:e.$t("profile.notifications.telegramBotTokenPlaceholder")||"请输入您的 Telegram Bot Token"}},[t("a-icon",{attrs:{slot:"prefix",type:"robot"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(" "+e._s(e.$t("profile.notifications.telegramBotTokenHint")||"通过 @BotFather 创建机器人获取 Token")+" "),t("a",{attrs:{href:"https://t.me/BotFather",target:"_blank",rel:"noopener noreferrer"}},[e._v("@BotFather")])])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.telegramChatId")||"Telegram Chat ID"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["telegram_chat_id",{initialValue:e.notificationSettings.telegram_chat_id}],expression:"['telegram_chat_id', { initialValue: notificationSettings.telegram_chat_id }]"}],attrs:{placeholder:e.$t("profile.notifications.telegramPlaceholder")||"请输入您的 Telegram Chat ID(如 123456789)"}},[t("a-icon",{attrs:{slot:"prefix",type:"message"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.notifications.telegramHint")||"发送 /start 给 @userinfobot 可获取您的 Chat ID"))])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.notifyEmail")||"通知邮箱"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["email",{initialValue:e.notificationSettings.email||e.profile.email}],expression:"['email', { initialValue: notificationSettings.email || profile.email }]"}],attrs:{placeholder:e.$t("profile.notifications.emailPlaceholder")||"接收通知的邮箱地址"}},[t("a-icon",{attrs:{slot:"prefix",type:"mail"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.notifications.emailHint")||"默认使用账户邮箱,可设置其他邮箱接收通知"))])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.phone")||"手机号(短信通知)"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["phone",{initialValue:e.notificationSettings.phone}],expression:"['phone', { initialValue: notificationSettings.phone }]"}],attrs:{placeholder:e.$t("profile.notifications.phonePlaceholder")||"请输入手机号(如 +8613800138000)"}},[t("a-icon",{attrs:{slot:"prefix",type:"phone"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.notifications.phoneHint")||"需要管理员配置 Twilio 服务后才能使用短信通知"))])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.discordWebhook")||"Discord Webhook"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["discord_webhook",{initialValue:e.notificationSettings.discord_webhook}],expression:"['discord_webhook', { initialValue: notificationSettings.discord_webhook }]"}],attrs:{placeholder:e.$t("profile.notifications.discordPlaceholder")||"https://discord.com/api/webhooks/..."}},[t("a-icon",{attrs:{slot:"prefix",type:"message"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.notifications.discordHint")||"在 Discord 服务器设置中创建 Webhook"))])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.webhookUrl")||"Webhook URL"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["webhook_url",{initialValue:e.notificationSettings.webhook_url}],expression:"['webhook_url', { initialValue: notificationSettings.webhook_url }]"}],attrs:{placeholder:e.$t("profile.notifications.webhookPlaceholder")||"https://your-server.com/webhook"}},[t("a-icon",{attrs:{slot:"prefix",type:"api"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.notifications.webhookHint")||"自定义 Webhook 地址,将以 POST JSON 方式推送通知"))])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.webhookToken")||"Webhook Token(可选)"}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["webhook_token",{initialValue:e.notificationSettings.webhook_token}],expression:"['webhook_token', { initialValue: notificationSettings.webhook_token }]"}],attrs:{placeholder:e.$t("profile.notifications.webhookTokenPlaceholder")||"用于验证请求的 Bearer Token"}},[t("a-icon",{attrs:{slot:"prefix",type:"key"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.notifications.webhookTokenHint")||"将作为 Authorization: Bearer Token 发送到 Webhook"))])],1)],1),t("a-form-item",[t("a-button",{attrs:{type:"primary",loading:e.savingNotifications},on:{click:e.handleSaveNotifications}},[t("a-icon",{attrs:{type:"save"}}),e._v(" "+e._s(e.$t("common.save")||"保存")+" ")],1),t("a-button",{staticStyle:{"margin-left":"12px"},attrs:{loading:e.testingNotification},on:{click:e.handleTestNotification}},[t("a-icon",{attrs:{type:"experiment"}}),e._v(" "+e._s(e.$t("profile.notifications.testBtn")||"发送测试通知")+" ")],1)],1)],1)],1)]),t("a-tab-pane",{key:"exchange",attrs:{tab:e.$t("profile.exchange.title")||"交易所配置"}},[t("div",{staticClass:"exchange-config-section"},[t("a-alert",{staticStyle:{"margin-bottom":"16px"},attrs:{message:e.$t("profile.exchange.hint"),type:"info",showIcon:""}}),t("div",{staticStyle:{"margin-bottom":"16px","text-align":"right"}},[t("a-button",{staticStyle:{"margin-right":"12px"},on:{click:e.openExchangeSignupModal}},[t("a-icon",{attrs:{type:"rocket"}}),e._v(" "+e._s(e.$t("profile.exchange.openAccount"))+" ")],1),t("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:e.openAddExchangeModal}},[e._v(" "+e._s(e.$t("profile.exchange.addAccount"))+" ")])],1),t("a-table",{attrs:{columns:e.exchangeColumns,dataSource:e.exchangeCredentials,loading:e.exchangeLoading,rowKey:function(e){return e.id},locale:{emptyText:e.$t("profile.exchange.noAccounts")||"暂无交易所账户,请点击上方按钮添加"},size:"small"},scopedSlots:e._u([{key:"exchange_id",fn:function(a,i){return[t("span",{staticStyle:{"text-transform":"capitalize","font-weight":"500"}},[e._v(e._s(e.getExchangeDisplayName(a)))]),i.enable_demo_trading?t("a-tag",{staticStyle:{"margin-left":"6px"},attrs:{color:"orange",size:"small"}},[e._v(" "+e._s(e.$t("profile.exchange.demoTag"))+" ")]):e._e()]}},{key:"api_key_hint",fn:function(a,i){return[t("span",{staticClass:"credential-hint"},[e._v(e._s(a||i.name||"-"))])]}},{key:"created_at",fn:function(t){return[e._v(" "+e._s(e.formatTime(t))+" ")]}},{key:"action",fn:function(a,i){return[t("a-popconfirm",{attrs:{title:e.$t("profile.exchange.deleteConfirm"),okText:e.$t("common.confirm"),cancelText:e.$t("common.cancel")},on:{confirm:function(t){return e.handleDeleteCredential(i.id)}}},[t("a-button",{attrs:{type:"danger",size:"small",ghost:"",icon:"delete"}},[e._v(" "+e._s(e.$t("common.delete"))+" ")])],1)]}}])})],1)]),t("a-tab-pane",{key:"referrals",attrs:{tab:e.$t("profile.referral.listTab")||"邀请列表"}},[t("a-table",{attrs:{columns:e.referralColumns,dataSource:e.referralData.list||[],loading:e.referralLoading,pagination:e.referralPagination,rowKey:function(e){return e.id},locale:{emptyText:e.$t("profile.referral.noReferrals")||"暂无邀请记录"},size:"small"},on:{change:e.handleReferralChange},scopedSlots:e._u([{key:"user",fn:function(a,i){return[t("div",{staticClass:"referral-user-cell"},[t("a-avatar",{attrs:{size:32,src:i.avatar||"/avatar2.jpg"}}),t("div",{staticClass:"user-info"},[t("span",{staticClass:"nickname"},[e._v(e._s(i.nickname||i.username))]),t("span",{staticClass:"username"},[e._v("@"+e._s(i.username))])])],1)]}},{key:"created_at",fn:function(t){return[e._v(" "+e._s(e.formatTime(t))+" ")]}}])})],1)],1)],1)],1)],1),t("a-modal",{attrs:{title:e.$t("profile.exchange.addTitle"),visible:e.showAddExchangeModal,"wrap-class-name":e.exchangeModalWrapClass,confirmLoading:e.savingExchange,okText:e.$t("common.save"),cancelText:e.$t("common.cancel"),maskClosable:!1,width:"520px"},on:{ok:e.handleSaveExchange,cancel:function(t){e.showAddExchangeModal=!1}}},[t("a-form",{staticClass:"exchange-account-form",attrs:{form:e.exchangeForm,layout:"vertical"}},[t("a-form-item",{attrs:{label:e.$t("profile.exchange.selectExchange")}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["exchange_id",{rules:[{required:!0,message:e.$t("profile.exchange.selectExchange")}]}],expression:"['exchange_id', { rules: [{ required: true, message: $t('profile.exchange.selectExchange') }] }]"}],attrs:{placeholder:e.$t("profile.exchange.selectExchange"),"dropdown-class-name":e.isDarkTheme?"profile-exchange-select-dropdown-dark":"","get-popup-container":e.getExchangeSelectPopupContainer},on:{change:e.handleExchangeTypeChange}},[t("a-select-opt-group",{attrs:{label:e.$t("profile.exchange.typeCrypto")}},e._l(e.cryptoExchangeList,function(a){return t("a-select-option",{key:a.id,attrs:{value:a.id}},[e._v(" "+e._s(a.name)+" ")])}),1),t("a-select-opt-group",{attrs:{label:e.$t("profile.exchange.typeIBKR")}},[t("a-select-option",{attrs:{value:"ibkr"}},[e._v("Interactive Brokers (IBKR)")])],1),t("a-select-opt-group",{attrs:{label:e.$t("profile.exchange.typeMT5")}},[t("a-select-option",{attrs:{value:"mt5"}},[e._v("MetaTrader 5")])],1)],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.accountName")}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name"],expression:"['name']"}],attrs:{placeholder:e.$t("profile.exchange.accountNamePlaceholder")}})],1),"crypto"===e.addExchangeType?t("a-form-item",{attrs:{label:e.$t("profile.exchange.whitelistIpLabel")}},[t("div",{staticClass:"egress-ip-block"},[e.egressIpLoading?t("a-spin",{attrs:{size:"small"}}):[t("div",{staticClass:"egress-ip-line"},[t("span",{staticClass:"egress-ip-kind"},[e._v(e._s(e.$t("profile.exchange.whitelistIpv4")))]),t("code",{staticClass:"egress-ip-value"},[e._v(e._s(e.egressServerIpv4||"—"))]),t("a-button",{staticClass:"egress-ip-action",attrs:{type:"link",size:"small",disabled:!e.egressServerIpv4},on:{click:function(t){return e.copyEgressIp("v4")}}},[e._v(" "+e._s(e.$t("profile.exchange.whitelistIpCopy"))+" ")])],1),t("div",{staticClass:"egress-ip-line"},[t("span",{staticClass:"egress-ip-kind"},[e._v(e._s(e.$t("profile.exchange.whitelistIpv6")))]),t("code",{staticClass:"egress-ip-value"},[e._v(e._s(e.egressServerIpv6||"—"))]),t("a-button",{staticClass:"egress-ip-action",attrs:{type:"link",size:"small",disabled:!e.egressServerIpv6},on:{click:function(t){return e.copyEgressIp("v6")}}},[e._v(" "+e._s(e.$t("profile.exchange.whitelistIpCopy"))+" ")])],1),t("div",{staticClass:"egress-ip-row egress-ip-refresh-row"},[t("a-button",{staticClass:"egress-ip-action",attrs:{type:"link",size:"small"},on:{click:e.fetchEgressIp}},[e._v(" "+e._s(e.$t("profile.exchange.whitelistIpRefresh"))+" ")])],1)]],2),t("div",{staticClass:"field-hint egress-ip-hint"},[e._v(e._s(e.$t("profile.exchange.whitelistIpHint")))])]):e._e(),"crypto"===e.addExchangeType?[e.selectedExchangeApiDocUrl?t("div",{staticClass:"exchange-api-doc-callout"},[t("div",{staticClass:"exchange-api-doc-callout__content"},[t("div",{staticClass:"exchange-api-doc-callout__icon"},[t("a-icon",{attrs:{type:"link"}})],1),t("div",{staticClass:"exchange-api-doc-callout__text"},[t("div",{staticClass:"exchange-api-doc-callout__title"},[e._v(" "+e._s(e.selectedCryptoExchangeName)+" "+e._s(e.$t("profile.exchange.apiDocTitleSuffix"))+" ")]),t("div",{staticClass:"exchange-api-doc-callout__hint"},[e._v(" "+e._s(e.$t("profile.exchange.apiDocHint"))+" ")])])]),t("a-button",{staticClass:"exchange-api-doc-callout__action",attrs:{type:"link",size:"small"},on:{click:e.openSelectedExchangeApiDoc}},[e._v(" "+e._s(e.$t("profile.exchange.apiDocAction"))+" "),t("a-icon",{attrs:{type:"arrow-right"}})],1)],1):e._e(),t("a-form-item",{attrs:{label:e.$t("profile.exchange.apiKey")}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["api_key",{rules:[{required:!0,message:"API Key is required"}]}],expression:"['api_key', { rules: [{ required: true, message: 'API Key is required' }] }]"}],attrs:{placeholder:"API Key",autocomplete:"new-password"}})],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.secretKey")}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["secret_key",{rules:[{required:!0,message:"Secret Key is required"}]}],expression:"['secret_key', { rules: [{ required: true, message: 'Secret Key is required' }] }]"}],attrs:{placeholder:"Secret Key",autocomplete:"new-password"}})],1),e.addExchangeNeedsPassphrase?t("a-form-item",{attrs:{label:e.$t("profile.exchange.passphrase")}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["passphrase"],expression:"['passphrase']"}],attrs:{placeholder:"Passphrase",autocomplete:"new-password"}})],1):e._e(),e.addExchangeShowDemo?t("a-form-item",[t("a-checkbox",{directives:[{name:"decorator",rawName:"v-decorator",value:["enable_demo_trading",{valuePropName:"checked",initialValue:!1}],expression:"['enable_demo_trading', { valuePropName: 'checked', initialValue: false }]"}],staticClass:"exchange-demo-checkbox"},[t("span",{staticClass:"exchange-demo-checkbox-label"},[e._v(e._s(e.$t("profile.exchange.demoTrading")))])]),t("div",{staticClass:"field-hint exchange-demo-hint"},[e._v(e._s(e.$t("profile.exchange.demoTradingHint")))])],1):e._e()]:e._e(),"ibkr"===e.addExchangeType?[t("a-alert",{staticStyle:{"margin-bottom":"16px"},attrs:{type:"warning",showIcon:"",message:e.$t("profile.exchange.localDeploymentRequired"),description:e.$t("profile.exchange.localDeploymentHint")}}),t("a-form-item",{attrs:{label:e.$t("profile.exchange.ibkrHost")}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["ibkr_host",{initialValue:"127.0.0.1"}],expression:"['ibkr_host', { initialValue: '127.0.0.1' }]"}],attrs:{placeholder:"127.0.0.1"}})],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.ibkrPort")}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["ibkr_port",{initialValue:7497}],expression:"['ibkr_port', { initialValue: 7497 }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:65535}}),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.exchange.ibkrPortHint")))])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.ibkrClientId")}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["ibkr_client_id",{initialValue:1}],expression:"['ibkr_client_id', { initialValue: 1 }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:999}})],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.ibkrAccount")}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["ibkr_account"],expression:"['ibkr_account']"}],attrs:{placeholder:"DU123456"}})],1)]:e._e(),"mt5"===e.addExchangeType?[t("a-alert",{staticStyle:{"margin-bottom":"16px"},attrs:{type:"warning",showIcon:"",message:e.$t("profile.exchange.localDeploymentRequired"),description:e.$t("profile.exchange.localDeploymentHint")}}),t("a-form-item",{attrs:{label:e.$t("profile.exchange.mt5Server")}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["mt5_server",{rules:[{required:!0,message:"Server is required"}]}],expression:"['mt5_server', { rules: [{ required: true, message: 'Server is required' }] }]"}],attrs:{placeholder:"MetaQuotes-Demo"}})],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.mt5Login")}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["mt5_login",{rules:[{required:!0,message:"Login is required"}]}],expression:"['mt5_login', { rules: [{ required: true, message: 'Login is required' }] }]"}],staticStyle:{width:"100%"},attrs:{min:1,placeholder:"12345678"}})],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.mt5Password")}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["mt5_password",{rules:[{required:!0,message:"Password is required"}]}],expression:"['mt5_password', { rules: [{ required: true, message: 'Password is required' }] }]"}],attrs:{placeholder:"Password",autocomplete:"new-password"}})],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.mt5TerminalPath")}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["mt5_terminal_path"],expression:"['mt5_terminal_path']"}],attrs:{placeholder:"C:\\Program Files\\MetaTrader 5\\terminal64.exe"}}),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.exchange.mt5TerminalPathHint")))])],1)],1)]:e._e(),e.addExchangeType?t("a-form-item",[t("a-button",{attrs:{block:"",loading:e.testingExchange},on:{click:e.handleTestExchangeConnection}},[t("a-icon",{attrs:{type:"api"}}),e._v(" "+e._s(e.$t("profile.exchange.testConnection"))+" ")],1),e.exchangeTestResult?t("div",{staticClass:"test-result-msg",class:e.exchangeTestResult.success?"success":"error"},[t("a-icon",{attrs:{type:e.exchangeTestResult.success?"check-circle":"close-circle"}}),e._v(" "+e._s(e.exchangeTestResult.message)+" ")],1):e._e()],1):e._e()],2)],1),t("a-modal",{attrs:{title:e.$t("profile.exchange.openAccountTitle"),visible:e.showExchangeSignupModal,"wrap-class-name":e.exchangeModalWrapClass,footer:null,width:"860px"},on:{cancel:function(t){e.showExchangeSignupModal=!1}}},[t("div",{staticClass:"exchange-signup-modal"},[t("div",{staticClass:"exchange-signup-promo"},[e._v(e._s(e.$t("profile.exchange.openAccountPromo")))]),t("div",{staticClass:"exchange-signup-grid"},e._l(e.exchangeSignupCards,function(a){return t("div",{key:a.id,staticClass:"exchange-signup-card"},[t("div",{staticClass:"exchange-signup-card__header"},[t("div",{staticClass:"exchange-signup-logo",style:{background:a.brandBg,color:a.brandColor}},[e._v(" "+e._s(a.short)+" ")]),t("div",{staticClass:"exchange-signup-meta"},[t("div",{staticClass:"exchange-signup-name"},[e._v(e._s(a.name))])])]),t("div",{staticClass:"exchange-signup-actions"},[t("a-button",{attrs:{type:"primary",block:"",disabled:!a.signupUrl},on:{click:function(t){return e.openExchangeSignupLink(a.signupUrl)}}},[e._v(" "+e._s(e.$t("profile.exchange.openAccountButton"))+" ")])],1)])}),0)])])],1)},r=[],n=a(76338),o=a(81127),s=a(56252),c=(a(74423),a(84841)),l=a(53003),d=a(42430),p=a(36911),u=a(55434),f={name:"Profile",mixins:[u.t],data:function(){return{loading:!1,saving:!1,changingPassword:!1,sendingPwdCode:!1,pwdCodeCountdown:0,pwdCodeTimer:null,activeTab:"basic",profile:{id:null,username:"",nickname:"",email:"",avatar:"",timezone:"",role:"user",last_login_at:null},timezoneIanaList:["UTC","Etc/UTC","Asia/Shanghai","Asia/Hong_Kong","Asia/Taipei","Asia/Tokyo","Asia/Seoul","Asia/Singapore","Asia/Dubai","Asia/Kolkata","Europe/London","Europe/Paris","Europe/Berlin","America/New_York","America/Chicago","America/Denver","America/Los_Angeles","America/Toronto","America/Sao_Paulo","Australia/Sydney","Pacific/Auckland"],creditsLog:[],creditsLogLoading:!1,creditsLogPagination:{current:1,pageSize:10,total:0},referralData:{list:[],total:0,referral_code:"",referral_bonus:0,register_bonus:0},referralLoading:!1,referralPagination:{current:1,pageSize:10,total:0},billing:{credits:0,is_vip:!1,vip_expires_at:null,billing_enabled:!1,feature_costs:{}},rechargeTelegramUrl:"https://t.me/your_support_bot",notificationSettings:{default_channels:["browser"],telegram_bot_token:"",telegram_chat_id:"",email:"",phone:"",discord_webhook:"",webhook_url:"",webhook_token:""},savingNotifications:!1,testingNotification:!1,exchangeCredentials:[],exchangeLoading:!1,showAddExchangeModal:!1,showExchangeSignupModal:!1,savingExchange:!1,testingExchange:!1,exchangeTestResult:null,addExchangeType:"",selectedExchangeId:"",egressServerIpv4:"",egressServerIpv6:"",egressIpLoading:!1,cryptoExchangeList:[{id:"binance",name:"Binance",docsUrl:"https://www.binance.com/en/support/faq/api-faq-360027369792"},{id:"okx",name:"OKX",docsUrl:"https://www.okx.com/help/how-do-i-create-my-api-key"},{id:"bitget",name:"Bitget",docsUrl:"https://www.bitget.com/api-doc/common/introduction"},{id:"bybit",name:"Bybit",docsUrl:"https://www.bybit.com/en/help-center/article/How-to-create-your-API-key/"},{id:"coinbaseexchange",name:"Coinbase",docsUrl:"https://docs.cdp.coinbase.com/exchange/rest-api/authentication"},{id:"kraken",name:"Kraken",docsUrl:"https://support.kraken.com/articles/360000919966-how-to-create-an-api-key"},{id:"kucoin",name:"KuCoin",docsUrl:"https://www.kucoin.com/docs-new/authentication"},{id:"gate",name:"Gate.io",docsUrl:"https://www.gate.com/docs/developers/apiv4/"},{id:"bitfinex",name:"Bitfinex",docsUrl:"https://docs.bitfinex.com/docs/create-an-api-key"},{id:"deepcoin",name:"Deepcoin",docsUrl:"https://www.deepcoin.com/docs/deepcoinApiDocs/"},{id:"htx",name:"HTX",docsUrl:"https://www.htx.com/support/en-us/detail/360000188081"}],exchangeSignupCards:[{id:"binance",name:"Binance",short:"BN",brandBg:"rgba(243, 186, 47, 0.16)",brandColor:"#f0b90b",signupUrl:"https://www.bsmkweb.cc/register?ref=QUANTDINGER"},{id:"bitget",name:"Bitget",short:"BG",brandBg:"rgba(0, 193, 255, 0.14)",brandColor:"#00c1ff",signupUrl:"https://partner.hdmune.cn/bg/7r4xz8kd"},{id:"bybit",name:"Bybit",short:"BY",brandBg:"rgba(247, 166, 0, 0.14)",brandColor:"#f7a600",signupUrl:"https://partner.bybit.com/b/DINGER"},{id:"okx",name:"OKX",short:"OK",brandBg:"rgba(17, 24, 39, 0.08)",brandColor:"#111827",signupUrl:"https://www.xqmnobxky.com/join/QUANTDINGER"},{id:"gate",name:"Gate.io",short:"GT",brandBg:"rgba(42, 93, 255, 0.12)",brandColor:"#2a5dff",signupUrl:"https://www.gateport.company/share/DINGER"},{id:"htx",name:"HTX",short:"HX",brandBg:"rgba(22, 119, 255, 0.12)",brandColor:"#1677ff",signupUrl:"https://www.htx.com/invite/zh-cn/1f?invite_code=dinger"}]}},computed:{isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},exchangeModalWrapClass:function(){var e="profile-exchange-modal";return this.isDarkTheme?"".concat(e," ").concat(e,"--dark"):e},isVip:function(){if(!this.billing.vip_expires_at)return!1;var e=new Date(this.billing.vip_expires_at);return e>new Date},creditsLogColumns:function(){return[{title:this.$t("profile.creditsLog.time")||"时间",dataIndex:"created_at",width:160,scopedSlots:{customRender:"created_at"}},{title:this.$t("profile.creditsLog.action")||"类型",dataIndex:"action",width:100,scopedSlots:{customRender:"action"}},{title:this.$t("profile.creditsLog.amount")||"变动",dataIndex:"amount",width:100,scopedSlots:{customRender:"amount"}},{title:this.$t("profile.creditsLog.balance")||"余额",dataIndex:"balance_after",width:100},{title:this.$t("profile.creditsLog.remark")||"备注",dataIndex:"remark",ellipsis:!0}]},referralColumns:function(){return[{title:this.$t("profile.referral.user")||"用户",dataIndex:"username",scopedSlots:{customRender:"user"}},{title:this.$t("profile.referral.registerTime")||"注册时间",dataIndex:"created_at",width:180,scopedSlots:{customRender:"created_at"}}]},referralLink:function(){var e=window.location.origin+window.location.pathname,t=this.referralData.referral_code||this.profile.id;return"".concat(e,"#/user/login?ref=").concat(t)},exchangeColumns:function(){return[{title:this.$t("profile.exchange.colExchange")||"Exchange",dataIndex:"exchange_id",width:140,scopedSlots:{customRender:"exchange_id"}},{title:this.$t("profile.exchange.colName")||"Name",dataIndex:"name",width:140,customRender:function(e){return e||"-"}},{title:this.$t("profile.exchange.colHint")||"Connection Info",dataIndex:"api_key_hint",scopedSlots:{customRender:"api_key_hint"}},{title:this.$t("profile.exchange.colCreatedAt")||"Created At",dataIndex:"created_at",width:180,scopedSlots:{customRender:"created_at"}},{title:this.$t("profile.exchange.colActions")||"Actions",width:120,scopedSlots:{customRender:"action"}}]},addExchangeNeedsPassphrase:function(){var e=["okx","bitget","kucoin"];return e.includes(this.selectedExchangeId)},addExchangeShowDemo:function(){return"crypto"===this.addExchangeType&&!!this.selectedExchangeId},selectedCryptoExchangeMeta:function(){var e=this;return this.cryptoExchangeList.find(function(t){return t.id===e.selectedExchangeId})||null},selectedCryptoExchangeName:function(){return this.selectedCryptoExchangeMeta?this.selectedCryptoExchangeMeta.name:this.getExchangeDisplayName(this.selectedExchangeId)},selectedExchangeApiDocUrl:function(){return this.selectedCryptoExchangeMeta?this.selectedCryptoExchangeMeta.docsUrl:""}},watch:{showAddExchangeModal:function(e){e&&this.fetchEgressIp()},activeTab:function(e){"credits"===e&&0===this.creditsLog.length&&this.loadCreditsLog(),"referrals"!==e||this.referralData.list&&0!==this.referralData.list.length||this.loadReferrals(),"notifications"!==e||this.notificationSettings.telegram_chat_id||this.notificationSettings.discord_webhook||this.loadNotificationSettings(),"exchange"===e&&0===this.exchangeCredentials.length&&this.loadExchangeCredentials()}},beforeCreate:function(){this.profileForm=this.$form.createForm(this,{name:"profile"}),this.passwordForm=this.$form.createForm(this,{name:"password"}),this.notificationForm=this.$form.createForm(this,{name:"notification"}),this.exchangeForm=this.$form.createForm(this,{name:"exchange"})},mounted:function(){this.loadProfile(),this.loadReferrals()},beforeDestroy:function(){this.pwdCodeTimer&&clearInterval(this.pwdCodeTimer)},methods:{loadProfile:function(){var e=this;return(0,s.A)((0,o.A)().m(function t(){var a;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return e.loading=!0,t.p=1,t.n=2,(0,c.E$)();case 2:a=t.v,1===a.code?(e.profile=a.data,a.data.billing&&(e.billing=a.data.billing),a.data.notification_settings&&(e.notificationSettings={default_channels:a.data.notification_settings.default_channels||["browser"],telegram_bot_token:a.data.notification_settings.telegram_bot_token||"",telegram_chat_id:a.data.notification_settings.telegram_chat_id||"",email:a.data.notification_settings.email||a.data.email||"",phone:a.data.notification_settings.phone||"",discord_webhook:a.data.notification_settings.discord_webhook||"",webhook_url:a.data.notification_settings.webhook_url||"",webhook_token:a.data.notification_settings.webhook_token||""}),e.$nextTick(function(){e.profileForm.setFieldsValue({nickname:e.profile.nickname,email:e.profile.email,timezone:e.profile.timezone||""})})):e.$message.error(a.msg||"Failed to load profile"),t.n=4;break;case 3:t.p=3,t.v,e.$message.error("Failed to load profile");case 4:return t.p=4,e.loading=!1,t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}))()},loadRechargeUrl:function(){var e=this;return(0,s.A)((0,o.A)().m(function t(){var a;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if("admin"!==e.profile.role){t.n=4;break}return t.p=1,t.n=2,(0,l.YT)();case 2:a=t.v,1===a.code&&a.data&&a.data.billing&&(e.rechargeTelegramUrl=a.data.billing.RECHARGE_TELEGRAM_URL||e.rechargeTelegramUrl),t.n=4;break;case 3:t.p=3,t.v;case 4:return t.a(2)}},t,null,[[1,3]])}))()},handleRecharge:function(){this.$router.push("/billing")},formatCredits:function(e){return e||0===e?Number(e).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:2}):"0"},formatDate:function(e){if(!e)return"";var t=new Date(e);return t.toLocaleDateString()},handleSaveProfile:function(){var e=this;this.profileForm.validateFields(function(){var t=(0,s.A)((0,o.A)().m(function t(a,i){var r;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(!a){t.n=1;break}return t.a(2);case 1:return e.saving=!0,t.p=2,t.n=3,(0,c.r7)({nickname:i.nickname,timezone:null!=i.timezone?i.timezone:""});case 3:r=t.v,1===r.code?(e.$message.success(r.msg||"Profile updated successfully"),e.loadProfile(),e.$store.dispatch("FetchUserInfo").catch(function(){})):e.$message.error(r.msg||"Update failed"),t.n=5;break;case 4:t.p=4,t.v,e.$message.error("Update failed");case 5:return t.p=5,e.saving=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}));return function(e,a){return t.apply(this,arguments)}}())},validateConfirmPassword:function(e,t,a){var i=this.passwordForm.getFieldValue("new_password");t&&t!==i?a(this.$t("profile.passwordMismatch")||"Passwords do not match"):a()},handleSendPwdCode:function(){var e=this;return(0,s.A)((0,o.A)().m(function t(){var i,r,n,s,c;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e.profile.email){t.n=1;break}return e.$message.error(e.$t("profile.noEmailWarning")||"Please set your email first"),t.a(2);case 1:return e.sendingPwdCode=!0,t.p=2,t.n=3,a.e(824).then(a.bind(a,95824));case 3:return i=t.v,r=i.sendVerificationCode,t.n=4,r({email:e.profile.email,type:"change_password"});case 4:n=t.v,1===n.code?(e.$message.success(e.$t("profile.codeSent")||"Verification code sent"),e.startPwdCodeCountdown()):e.$message.error(n.msg||"Failed to send code"),t.n=6;break;case 5:t.p=5,c=t.v,e.$message.error((null===(s=c.response)||void 0===s||null===(s=s.data)||void 0===s?void 0:s.msg)||"Failed to send code");case 6:return t.p=6,e.sendingPwdCode=!1,t.f(6);case 7:return t.a(2)}},t,null,[[2,5,6,7]])}))()},startPwdCodeCountdown:function(){var e=this;this.pwdCodeCountdown=60,this.pwdCodeTimer=setInterval(function(){e.pwdCodeCountdown--,e.pwdCodeCountdown<=0&&(clearInterval(e.pwdCodeTimer),e.pwdCodeTimer=null)},1e3)},validateNewPassword:function(e,t,a){t?t.length<8?a(new Error(this.$t("user.register.pwdMinLength")||"At least 8 characters")):/[A-Z]/.test(t)?/[a-z]/.test(t)?/[0-9]/.test(t)?a():a(new Error(this.$t("user.register.pwdNumber")||"At least one number")):a(new Error(this.$t("user.register.pwdLowercase")||"At least one lowercase letter")):a(new Error(this.$t("user.register.pwdUppercase")||"At least one uppercase letter")):a()},handleChangePassword:function(){var e=this;this.passwordForm.validateFields(function(){var t=(0,s.A)((0,o.A)().m(function t(i,r){var n,s,c,l,d;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(!i){t.n=1;break}return t.a(2);case 1:return e.changingPassword=!0,t.p=2,t.n=3,a.e(824).then(a.bind(a,95824));case 3:return n=t.v,s=n.changePassword,t.n=4,s({code:r.code,new_password:r.new_password});case 4:c=t.v,1===c.code?(e.$message.success(c.msg||"Password changed successfully"),e.passwordForm.resetFields()):e.$message.error(c.msg||"Change password failed"),t.n=6;break;case 5:t.p=5,d=t.v,e.$message.error((null===(l=d.response)||void 0===l||null===(l=l.data)||void 0===l?void 0:l.msg)||"Change password failed");case 6:return t.p=6,e.changingPassword=!1,t.f(6);case 7:return t.a(2)}},t,null,[[2,5,6,7]])}));return function(e,a){return t.apply(this,arguments)}}())},getRoleColor:function(e){var t={admin:"red",manager:"orange",user:"blue",viewer:"default"};return t[e]||"default"},getRoleLabel:function(e){var t={admin:this.$t("userManage.roleAdmin")||"Admin",manager:this.$t("userManage.roleManager")||"Manager",user:this.$t("userManage.roleUser")||"User",viewer:this.$t("userManage.roleViewer")||"Viewer"};return t[e]||e},_profileDateTimeLocaleOptions:function(){var e=String(this.profile&&this.profile.timezone||"").trim();if(!e)return{};try{return Intl.DateTimeFormat(void 0,{timeZone:e}).format(new Date),{timeZone:e}}catch(t){return{}}},formatTime:function(e){if(!e)return"";var t=new Date("number"===typeof e?1e3*e:e);return Number.isNaN(t.getTime())?"":t.toLocaleString(void 0,this._profileDateTimeLocaleOptions())},formatCreditsLogTime:function(e){if(!e)return"";if("string"===typeof e){var t=e.trim();if(t.endsWith("Z")&&t.includes("T"))return t.replace("T"," ").replace("Z","")}return this.formatTime(e)},loadCreditsLog:function(){var e=this;return(0,s.A)((0,o.A)().m(function t(){var a;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return e.creditsLogLoading=!0,t.p=1,t.n=2,(0,c.v9)({page:e.creditsLogPagination.current,page_size:e.creditsLogPagination.pageSize});case 2:a=t.v,1===a.code&&(e.creditsLog=a.data.items||[],e.creditsLogPagination.total=a.data.total||0),t.n=4;break;case 3:t.p=3,t.v,e.$message.error("Failed to load credits log");case 4:return t.p=4,e.creditsLogLoading=!1,t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}))()},handleCreditsLogChange:function(e){this.creditsLogPagination.current=e.current,this.loadCreditsLog()},loadReferrals:function(){var e=this;return(0,s.A)((0,o.A)().m(function t(){var a;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return e.referralLoading=!0,t.p=1,t.n=2,(0,c.rx)({page:e.referralPagination.current,page_size:e.referralPagination.pageSize});case 2:a=t.v,1===a.code&&(e.referralData={list:a.data.list||[],total:a.data.total||0,referral_code:a.data.referral_code||"",referral_bonus:a.data.referral_bonus||0,register_bonus:a.data.register_bonus||0},e.referralPagination.total=a.data.total||0),t.n=4;break;case 3:t.p=3,t.v,e.$message.error("Failed to load referral data");case 4:return t.p=4,e.referralLoading=!1,t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}))()},handleReferralChange:function(e){this.referralPagination.current=e.current,this.loadReferrals()},copyReferralLink:function(){var e=this,t=this.referralLink;navigator.clipboard?navigator.clipboard.writeText(t).then(function(){e.$message.success(e.$t("profile.referral.linkCopied")||"邀请链接已复制")}).catch(function(){e.fallbackCopy(t)}):this.fallbackCopy(t)},fallbackCopy:function(e){var t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select();try{document.execCommand("copy"),this.$message.success(this.$t("profile.referral.linkCopied")||"邀请链接已复制")}catch(a){this.$message.error("Copy failed")}document.body.removeChild(t)},getActionColor:function(e){var t={consume:"red",recharge:"green",admin_adjust:"blue",refund:"orange",vip_grant:"gold",vip_revoke:"default",register_bonus:"cyan",referral_bonus:"purple",indicator_purchase:"volcano",indicator_sale:"lime"};return t[e]||"default"},getActionLabel:function(e){var t={consume:this.$t("profile.creditsLog.actionConsume")||"消费",recharge:this.$t("profile.creditsLog.actionRecharge")||"充值",admin_adjust:this.$t("profile.creditsLog.actionAdjust")||"调整",refund:this.$t("profile.creditsLog.actionRefund")||"退款",vip_grant:this.$t("profile.creditsLog.actionVipGrant")||"VIP授予",vip_revoke:this.$t("profile.creditsLog.actionVipRevoke")||"VIP取消",register_bonus:this.$t("profile.creditsLog.actionRegisterBonus")||"注册奖励",referral_bonus:this.$t("profile.creditsLog.actionReferralBonus")||"邀请奖励",indicator_purchase:this.$t("profile.creditsLog.actionIndicatorPurchase")||"购买指标",indicator_sale:this.$t("profile.creditsLog.actionIndicatorSale")||"出售指标"};return t[e]||e},loadExchangeCredentials:function(){var e=this;return(0,s.A)((0,o.A)().m(function t(){var a;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return e.exchangeLoading=!0,t.p=1,t.n=2,(0,d.IA)();case 2:a=t.v,1===a.code&&a.data&&(e.exchangeCredentials=a.data.items||[]),t.n=4;break;case 3:t.p=3,t.v,e.$message.error("Failed to load exchange accounts");case 4:return t.p=4,e.exchangeLoading=!1,t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}))()},getExchangeSelectPopupContainer:function(){return document.body},openAddExchangeModal:function(){this.showAddExchangeModal=!0},openExchangeSignupModal:function(){this.showExchangeSignupModal=!0},openExternalLink:function(e){e&&window.open(e,"_blank")},openExchangeSignupLink:function(e){this.openExternalLink(e)},openSelectedExchangeApiDoc:function(){this.openExternalLink(this.selectedExchangeApiDocUrl)},fetchEgressIp:function(){var e=this;return(0,s.A)((0,o.A)().m(function t(){var a,i,r,n;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return e.egressIpLoading=!0,e.egressServerIpv4="",e.egressServerIpv6="",t.p=1,t.n=2,(0,d.N6)();case 2:a=t.v,1===a.code&&a.data&&(i=null!=a.data.ipv4?String(a.data.ipv4).trim():"",r=null!=a.data.ipv6?String(a.data.ipv6).trim():"",e.egressServerIpv4=i,e.egressServerIpv6=r,i||r||!a.data.ip||(n=String(a.data.ip).trim(),n.includes(":")?e.egressServerIpv6=n:e.egressServerIpv4=n)),t.n=4;break;case 3:t.p=3,t.v,e.egressServerIpv4="",e.egressServerIpv6="";case 4:return t.p=4,e.egressIpLoading=!1,t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}))()},copyEgressIp:function(e){var t=this,a="v6"===e?this.egressServerIpv6:this.egressServerIpv4;if(a){var i=function(){return t.$message.success(t.$t("profile.exchange.whitelistIpCopied"))};navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(a).then(i).catch(function(){return t._fallbackCopyText(a,i)}):this._fallbackCopyText(a,i)}},_fallbackCopyText:function(e,t){try{var a=document.createElement("textarea");a.value=e,a.style.position="fixed",a.style.left="-9999px",document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a),t&&t()}catch(i){this.$message.error(this.$t("profile.exchange.whitelistIpCopyFail"))}},handleExchangeTypeChange:function(e){this.selectedExchangeId=e,this.exchangeTestResult=null;var t=this.cryptoExchangeList.map(function(e){return e.id});t.includes(e)?this.addExchangeType="crypto":this.addExchangeType="ibkr"===e?"ibkr":"mt5"===e?"mt5":""},getExchangeDisplayName:function(e){var t={binance:"Binance",okx:"OKX",bitget:"Bitget",bybit:"Bybit",coinbaseexchange:"Coinbase",kraken:"Kraken",kucoin:"KuCoin",gate:"Gate.io",bitfinex:"Bitfinex",deepcoin:"Deepcoin",htx:"HTX",ibkr:"IBKR",mt5:"MetaTrader 5"};return t[e]||e},handleSaveExchange:function(){var e=this;this.exchangeForm.validateFields(function(){var t=(0,s.A)((0,o.A)().m(function t(a,i){var r,s,c;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(!a){t.n=1;break}return t.a(2);case 1:return e.savingExchange=!0,t.p=2,r=(0,n.A)({},i),t.n=3,(0,d.PR)(r);case 3:s=t.v,1===s.code?(e.$message.success(e.$t("profile.exchange.saveSuccess")),e.showAddExchangeModal=!1,e.exchangeForm.resetFields(),e.addExchangeType="",e.selectedExchangeId="",e.exchangeTestResult=null,e.loadExchangeCredentials()):e.$message.error(s.msg||e.$t("profile.exchange.saveFailed")),t.n=5;break;case 4:t.p=4,c=t.v,e.$message.error(c.message||e.$t("profile.exchange.saveFailed"));case 5:return t.p=5,e.savingExchange=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}));return function(e,a){return t.apply(this,arguments)}}())},handleDeleteCredential:function(e){var t=this;return(0,s.A)((0,o.A)().m(function a(){var i;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return a.p=0,a.n=1,(0,d.kI)(e);case 1:i=a.v,1===i.code?(t.$message.success(t.$t("profile.exchange.deleteSuccess")),t.loadExchangeCredentials()):t.$message.error(i.msg||"Delete failed"),a.n=3;break;case 2:a.p=2,a.v,t.$message.error("Delete failed");case 3:return a.a(2)}},a,null,[[0,2]])}))()},handleTestExchangeConnection:function(){var e=this;return(0,s.A)((0,o.A)().m(function t(){var a,i,r,s,c;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(a=e.exchangeForm.getFieldsValue(),i=a.exchange_id,i){t.n=1;break}return t.a(2);case 1:return e.testingExchange=!0,e.exchangeTestResult=null,t.p=2,r=(0,n.A)({},a),t.n=3,(0,p.kv)(r);case 3:s=t.v,1===s.code?e.exchangeTestResult={success:!0,message:e.$t("profile.exchange.testSuccess")}:e.exchangeTestResult={success:!1,message:"".concat(e.$t("profile.exchange.testFailed"),": ").concat(s.msg||"Unknown error")},t.n=5;break;case 4:t.p=4,c=t.v,e.exchangeTestResult={success:!1,message:"".concat(e.$t("profile.exchange.testFailed"),": ").concat(c.message||"Network error")};case 5:return t.p=5,e.testingExchange=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}))()},loadNotificationSettings:function(){var e=this;return(0,s.A)((0,o.A)().m(function t(){var a;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return t.p=0,t.n=1,(0,c.vF)();case 1:a=t.v,1===a.code&&a.data&&(e.notificationSettings={default_channels:a.data.default_channels||["browser"],telegram_bot_token:a.data.telegram_bot_token||"",telegram_chat_id:a.data.telegram_chat_id||"",email:a.data.email||e.profile.email||"",phone:a.data.phone||"",discord_webhook:a.data.discord_webhook||"",webhook_url:a.data.webhook_url||"",webhook_token:a.data.webhook_token||""},e.$nextTick(function(){e.notificationForm.setFieldsValue({default_channels:e.notificationSettings.default_channels,telegram_bot_token:e.notificationSettings.telegram_bot_token,telegram_chat_id:e.notificationSettings.telegram_chat_id,email:e.notificationSettings.email,phone:e.notificationSettings.phone,discord_webhook:e.notificationSettings.discord_webhook,webhook_url:e.notificationSettings.webhook_url,webhook_token:e.notificationSettings.webhook_token})})),t.n=3;break;case 2:t.p=2,t.v;case 3:return t.a(2)}},t,null,[[0,2]])}))()},_mapNotifyTestError:function(e,t){var a=(t||"").trim();if("email"===e){if("missing_SMTP_HOST"===a)return this.$t("profile.notifications.errSmtpHost")||"email:服务器未配置发信 SMTP(管理员在「系统设置 → 邮件」或环境变量 SMTP_HOST/SMTP_USER 等)";if("missing_SMTP_FROM"===a)return this.$t("profile.notifications.errSmtpFrom")||"email:未配置发件人 SMTP_FROM(或 SMTP_USER)";if("missing_email_target"===a)return this.$t("profile.notifications.errEmailTarget")||"email:未填写通知邮箱且账号无邮箱"}return a?"".concat(e,": ").concat(a):""},handleSaveNotifications:function(){var e=this;this.notificationForm.validateFields(function(){var t=(0,s.A)((0,o.A)().m(function t(a,i){var r;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(!a){t.n=1;break}return t.a(2);case 1:return e.savingNotifications=!0,t.p=2,t.n=3,(0,c.Gl)({default_channels:i.default_channels||["browser"],telegram_bot_token:i.telegram_bot_token||"",telegram_chat_id:i.telegram_chat_id||"",email:i.email||"",phone:i.phone||"",discord_webhook:i.discord_webhook||"",webhook_url:i.webhook_url||"",webhook_token:i.webhook_token||""});case 3:r=t.v,1===r.code?(e.$message.success(e.$t("profile.notifications.saveSuccess")||"通知设置保存成功"),e.notificationSettings=r.data||e.notificationSettings):e.$message.error(r.msg||"保存失败"),t.n=5;break;case 4:t.p=4,t.v,e.$message.error("保存失败");case 5:return t.p=5,e.savingNotifications=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}));return function(e,a){return t.apply(this,arguments)}}())},handleTestNotification:function(){var e=this;return(0,s.A)((0,o.A)().m(function t(){var a,i,r,n,s,l,d;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(a=e.notificationForm.getFieldsValue(),i=a.default_channels||[],0!==i.length){t.n=1;break}return e.$message.warning(e.$t("profile.notifications.selectChannel")||"请至少选择一个通知渠道"),t.a(2);case 1:if(!i.includes("telegram")){t.n=3;break}if(a.telegram_bot_token){t.n=2;break}return e.$message.warning(e.$t("profile.notifications.fillTelegramToken")||"请填写 Telegram Bot Token"),t.a(2);case 2:if(a.telegram_chat_id){t.n=3;break}return e.$message.warning(e.$t("profile.notifications.fillTelegram")||"请填写 Telegram Chat ID"),t.a(2);case 3:if(!i.includes("email")||a.email){t.n=4;break}return e.$message.warning(e.$t("profile.notifications.fillEmail")||"请填写通知邮箱"),t.a(2);case 4:if(!i.includes("phone")||a.phone){t.n=5;break}return e.$message.warning(e.$t("profile.notifications.fillPhone")||"请填写手机号"),t.a(2);case 5:if(!i.includes("discord")||a.discord_webhook){t.n=6;break}return e.$message.warning(e.$t("profile.notifications.fillDiscord")||"请填写 Discord Webhook URL"),t.a(2);case 6:if(!i.includes("webhook")||a.webhook_url){t.n=7;break}return e.$message.warning(e.$t("profile.notifications.fillWebhook")||"请填写 Webhook URL"),t.a(2);case 7:return e.testingNotification=!0,t.p=8,t.n=9,(0,c.Gl)({default_channels:i,telegram_bot_token:a.telegram_bot_token||"",telegram_chat_id:a.telegram_chat_id||"",email:a.email||"",phone:a.phone||"",discord_webhook:a.discord_webhook||"",webhook_url:a.webhook_url||"",webhook_token:a.webhook_token||""});case 9:if(r=t.v,1===r.code){t.n=10;break}return e.$message.error(r.msg||"保存设置失败"),t.a(2);case 10:return t.n=11,(0,c.hl)();case 11:if(n=t.v,1===n.code){t.n=12;break}return e.$message.error(n.msg||e.$t("profile.notifications.testFailed")||"测试通知发送失败"),t.a(2);case 12:s=n.data&&n.data.results||{},l=Object.keys(s).filter(function(e){return!s[e].ok}),0===l.length?e.$message.success(e.$t("profile.notifications.testSent")||"测试通知已发送,请检查各渠道"):(d=l.map(function(t){var a=s[t]&&s[t].error||"",i=e._mapNotifyTestError(t,a);return i||(a?"".concat(t,": ").concat(a):t)}).join(";"),e.$message.warning((e.$t("profile.notifications.testPartial")||"部分渠道发送失败")+" — ".concat(d),8)),t.n=14;break;case 13:t.p=13,t.v,e.$message.error(e.$t("profile.notifications.testFailed")||"发送测试通知失败");case 14:return t.p=14,e.testingNotification=!1,t.f(14);case 15:return t.a(2)}},t,null,[[8,13,14,15]])}))()}}},g=f,h=a(845),m=(0,h.A)(g,i,r,!1,null,"06c79ed5",null),v=m.exports},42430:function(e,t,a){a.d(t,{IA:function(){return o},N6:function(){return l},PR:function(){return s},kI:function(){return c}});var i=a(76338),r=a(75769),n={list:"/api/credentials/list",get:"/api/credentials/get",create:"/api/credentials/create",delete:"/api/credentials/delete",egressIp:"/api/credentials/egress-ip"};function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,r.Ay)({url:n.list,method:"get",params:e})}function s(e){return(0,r.Ay)({url:n.create,method:"post",data:e})}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,r.Ay)({url:n.delete,method:"delete",params:(0,i.A)({id:e},t)})}function l(){return(0,r.Ay)({url:n.egressIp,method:"get"})}},53003:function(e,t,a){a.d(t,{DZ:function(){return o},YT:function(){return n},_d:function(){return s},lo:function(){return r}});var i=a(75769);function r(){return(0,i.Ay)({url:"/api/settings/schema",method:"get"})}function n(){return(0,i.Ay)({url:"/api/settings/values",method:"get"})}function o(e){return(0,i.Ay)({url:"/api/settings/save",method:"post",data:e})}function s(){return(0,i.Ay)({url:"/api/settings/openrouter-balance",method:"get"})}},84841:function(e,t,a){a.d(t,{DK:function(){return w},E$:function(){return d},Gl:function(){return f},O0:function(){return l},TK:function(){return o},aU:function(){return r},cw:function(){return c},d$:function(){return x},hG:function(){return s},hl:function(){return g},kg:function(){return n},nY:function(){return _},r7:function(){return p},rx:function(){return m},v9:function(){return h},vF:function(){return u},vi:function(){return b},wq:function(){return v}});var i=a(75769);function r(e){return(0,i.Ay)({url:"/api/users/list",method:"get",params:e})}function n(e){return(0,i.Ay)({url:"/api/users/create",method:"post",data:e})}function o(e,t){return(0,i.Ay)({url:"/api/users/update",method:"put",params:{id:e},data:t})}function s(e){return(0,i.Ay)({url:"/api/users/delete",method:"delete",params:{id:e}})}function c(e){return(0,i.Ay)({url:"/api/users/reset-password",method:"post",data:e})}function l(){return(0,i.Ay)({url:"/api/users/roles",method:"get"})}function d(){return(0,i.Ay)({url:"/api/users/profile",method:"get"})}function p(e){return(0,i.Ay)({url:"/api/users/profile/update",method:"put",data:e})}function u(){return(0,i.Ay)({url:"/api/users/notification-settings",method:"get"})}function f(e){return(0,i.Ay)({url:"/api/users/notification-settings",method:"put",data:e})}function g(){return(0,i.Ay)({url:"/api/users/notification-settings/test",method:"post",data:{}})}function h(e){return(0,i.Ay)({url:"/api/users/my-credits-log",method:"get",params:e})}function m(e){return(0,i.Ay)({url:"/api/users/my-referrals",method:"get",params:e})}function v(e){return(0,i.Ay)({url:"/api/users/set-credits",method:"post",data:e})}function _(e){return(0,i.Ay)({url:"/api/users/set-vip",method:"post",data:e})}function w(e){return(0,i.Ay)({url:"/api/users/system-strategies",method:"get",params:e})}function b(e){return(0,i.Ay)({url:"/api/users/admin-orders",method:"get",params:e})}function x(e){return(0,i.Ay)({url:"/api/users/admin-ai-stats",method:"get",params:e})}}}]); \ No newline at end of file diff --git a/frontend/dist/js/747-legacy.b1e9550b.js b/frontend/dist/js/161-legacy.48ab2cbb.js similarity index 80% rename from frontend/dist/js/747-legacy.b1e9550b.js rename to frontend/dist/js/161-legacy.48ab2cbb.js index a885ca9..8f8e3df 100644 --- a/frontend/dist/js/747-legacy.b1e9550b.js +++ b/frontend/dist/js/161-legacy.48ab2cbb.js @@ -1 +1 @@ -"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[747],{7126:function(t,a,e){e.r(a),e.d(a,{default:function(){return R}});e(62010),e(9868);var s=function(){var t=this,a=t._self._c;return a("div",{staticClass:"ai-asset-analysis-page",class:{"theme-dark":t.isDarkTheme}},[t.opportunities.length>0?a("div",{staticClass:"radar-section"},[a("div",{staticClass:"radar-header"},[a("div",{staticClass:"radar-header-left"},[a("h2",{staticClass:"radar-title"},[t._v(t._s(t.$t("aiAssetAnalysis.opportunities.title")))]),a("p",{staticClass:"radar-subtitle"},[t._v(t._s(t.$t("aiAssetAnalysis.opportunities.updateHint")))])]),a("a-button",{staticClass:"radar-refresh-btn",attrs:{size:"small",loading:t.oppLoading},on:{click:function(a){return t.loadOpportunities(!0)}}},[a("a-icon",{attrs:{type:"sync"}}),t._v(" "+t._s(t.$t("common.refresh")||"Refresh")+" ")],1)],1),a("div",{staticClass:"radar-carousel",on:{mouseenter:function(a){t.oppHover=!0},mouseleave:function(a){t.oppHover=!1}}},[a("div",{staticClass:"radar-track",class:{paused:t.oppHover},style:t.oppTrackStyle},t._l(t.carouselItems,function(e,s){return a("div",{key:"opp-"+s,staticClass:"radar-card",class:[e.impact,{"is-prediction":"PredictionMarket"===e.market}],on:{click:function(a){return t.analyzeOpportunity(e)}}},[a("div",{staticClass:"rc-head"},[a("span",{staticClass:"rc-symbol",class:{"rc-prediction-title":"PredictionMarket"===e.market}},[t._v(" "+t._s("PredictionMarket"===e.market&&e.name||e.symbol)+" ")]),a("span",{staticClass:"rc-market",class:"rc-market-"+(e.market||"").toLowerCase()},[t._v(" "+t._s(t.getMarketLabel(e.market))+" ")])]),"PredictionMarket"!==e.market?a("div",{staticClass:"rc-metrics"},[a("div",{staticClass:"rc-metric"},[a("span",{staticClass:"rc-metric-label"},[t._v(t._s(t.$i18n&&"zh-CN"===t.$i18n.locale?"当前价格":"Price"))]),a("span",{staticClass:"rc-metric-value"},[t._v("$"+t._s(t.formatOppPrice(e.price)))])]),a("div",{staticClass:"rc-metric"},[a("span",{staticClass:"rc-metric-label"},[t._v(t._s(t.$i18n&&"zh-CN"===t.$i18n.locale?"24h涨跌":"24h Change"))]),a("span",{staticClass:"rc-metric-value",class:e.change_24h>=0?"rc-up":"rc-down"},[t._v(" "+t._s(e.change_24h>=0?"+":"")+t._s((e.change_24h||0).toFixed(2))+"% ")])]),a("div",{staticClass:"rc-metric"},[a("span",{staticClass:"rc-metric-label"},[t._v(t._s(t.$i18n&&"zh-CN"===t.$i18n.locale?"信号":"Signal"))]),a("span",{staticClass:"rc-metric-value rc-signal-val",class:"rc-signal-"+(e.signal||"")},[t._v(" "+t._s(t.getSignalLabel(e.signal))+" ")])])]):a("div",{staticClass:"rc-metrics"},[a("div",{staticClass:"rc-metric"},[a("span",{staticClass:"rc-metric-label"},[t._v(t._s(t.$i18n&&"zh-CN"===t.$i18n.locale?"市场概率":"Probability"))]),a("span",{staticClass:"rc-metric-value"},[t._v(t._s((e.price||0).toFixed(1))+"%")])]),e.ai_analysis?a("div",{staticClass:"rc-metric"},[a("span",{staticClass:"rc-metric-label"},[t._v(t._s(t.$i18n&&"zh-CN"===t.$i18n.locale?"机会评分":"Score"))]),a("span",{staticClass:"rc-metric-value rc-up"},[t._v(t._s(e.ai_analysis.opportunity_score.toFixed(0)))])]):t._e(),e.ai_analysis?a("div",{staticClass:"rc-metric"},[a("span",{staticClass:"rc-metric-label"},[t._v(t._s(t.$i18n&&"zh-CN"===t.$i18n.locale?"建议":"Rec."))]),a("span",{staticClass:"rc-metric-value",class:"YES"===e.ai_analysis.recommendation?"rc-up":"NO"===e.ai_analysis.recommendation?"rc-down":""},[t._v(" "+t._s(t.getRecommendationLabel(e.ai_analysis.recommendation))+" ")])]):t._e()]),a("div",{staticClass:"rc-footer"},[a("span",{staticClass:"rc-reason"},[t._v(t._s(t.getReasonText(e)))]),"Crypto"===e.market?a("span",{staticClass:"rc-cta",on:{click:function(a){return a.stopPropagation(),t.openQuickTradeFromOpp(e)}}},[a("a-icon",{attrs:{type:"transaction"}}),t._v(" "+t._s(t.$t("quickTrade.tradeNow"))+" ")],1):t._e()])])}),0)])]):t._e(),a("a-tooltip",{attrs:{title:t.$t("quickTrade.openPanel"),placement:"left"}},[!t.showQuickTrade&&t.currentAnalysisSymbol?a("div",{staticClass:"qt-floating-btn",on:{click:t.openQuickTradeFromCurrent}},[a("a-icon",{attrs:{type:"thunderbolt",theme:"filled"}})],1):t._e()]),a("quick-trade-panel",{attrs:{visible:t.showQuickTrade,symbol:t.qtSymbol,"preset-side":t.qtSide,"preset-price":t.qtPrice,source:t.qtSource,"market-type":"swap"},on:{close:function(a){t.showQuickTrade=!1},"order-success":t.onQuickTradeSuccess,"update:symbol":t.handleQuickTradeSymbolChange}}),a("a-card",{staticClass:"workspace-card",attrs:{bordered:!1}},[a("a-tabs",{staticClass:"workspace-tabs",attrs:{size:"large"},model:{value:t.activeTab,callback:function(a){t.activeTab=a},expression:"activeTab"}},[a("a-tab-pane",{key:"quick"},[a("span",{attrs:{slot:"tab"},slot:"tab"},[a("a-icon",{attrs:{type:"thunderbolt"}}),t._v(" "+t._s(t.$t("aiAssetAnalysis.tabs.quick"))+" ")],1),a("div",{staticClass:"tab-body"},["quick"===t.activeTab?a("AnalysisView",{attrs:{embedded:!0,"preset-symbol":t.presetSymbol,"auto-analyze-signal":t.autoAnalyzeSignal},on:{"symbol-change":t.onAnalysisSymbolChange}}):t._e()],1)]),a("a-tab-pane",{key:"polymarket"},[a("span",{attrs:{slot:"tab"},slot:"tab"},[a("a-icon",{attrs:{type:"radar-chart"}}),t._v(" "+t._s(t.$t("aiAssetAnalysis.tabs.polymarket"))+" ")],1),a("div",{staticClass:"tab-body"},[a("div",{staticClass:"polymarket-tab-content"},[a("div",{staticClass:"polymarket-placeholder"},[a("div",{staticClass:"placeholder-icon"},[a("a-icon",{attrs:{type:"radar-chart"}})],1),a("h3",[t._v(t._s(t.$t("polymarket.analysis.title")))]),a("p",[t._v(t._s(t.$t("polymarket.analysis.description")))]),a("a-button",{staticStyle:{"margin-top":"16px"},attrs:{type:"primary",size:"large",icon:"thunderbolt"},on:{click:function(a){t.showPolymarketModal=!0}}},[t._v(" "+t._s(t.$t("polymarket.analysis.startAnalysis"))+" ")])],1)])])])],1)],1),a("PolymarketAnalysisModal",{attrs:{visible:t.showPolymarketModal},on:{close:function(a){t.showPolymarketModal=!1}}})],1)},i=[],n=e(81127),r=e(56252),o=e(2403),l=e(76338),c=(e(28706),e(74423),e(34782),e(27495),e(21699),e(25440),e(95353)),u=e(82631),d=e(44146),y=e(23022),p=(e(42762),function(){var t=this,a=t._self._c;return a("a-modal",{attrs:{visible:t.visible,title:t.$t("polymarket.analysis.title"),width:900,footer:null,wrapClassName:t.isDarkTheme?"qd-dark-modal":"",maskClosable:!1},on:{cancel:t.handleClose}},[a("div",{staticClass:"polymarket-analysis-modal",class:{"theme-dark":t.isDarkTheme}},[a("a-tabs",{attrs:{"default-active-key":"analyze"},on:{change:t.handleTabChange}},[a("a-tab-pane",{key:"analyze",attrs:{tab:t.$t("polymarket.analysis.tabAnalyze")}},[t.analysisResult?t._e():a("div",{staticClass:"input-section"},[a("a-alert",{staticStyle:{"margin-bottom":"16px"},attrs:{message:t.$t("polymarket.analysis.inputHint"),type:"info","show-icon":""}}),a("a-textarea",{attrs:{placeholder:t.$t("polymarket.analysis.inputPlaceholder"),rows:3,disabled:t.analyzing},on:{pressEnter:t.handleAnalyze},model:{value:t.inputText,callback:function(a){t.inputText=a},expression:"inputText"}}),a("div",{staticClass:"input-actions"},[a("a-button",{staticStyle:{width:"100%","margin-top":"12px"},attrs:{type:"primary",size:"large",icon:"thunderbolt",loading:t.analyzing,disabled:!t.inputText.trim()},on:{click:t.handleAnalyze}},[t._v(" "+t._s(t.$t("polymarket.analysis.analyzeButton"))+" ")])],1)],1),t.analysisResult?a("div",{staticClass:"result-section"},[a("div",{staticClass:"market-info"},[a("h3",[t._v(t._s(t.analysisResult.market.question))]),a("div",{staticClass:"market-meta"},[a("a-tag",{attrs:{color:t.getStatusColor(t.analysisResult.market.status)}},[t._v(" "+t._s(t.analysisResult.market.status)+" ")]),a("span",{staticClass:"meta-item"},[a("a-icon",{attrs:{type:"percentage"}}),t._v(" "+t._s(t.analysisResult.market.current_probability)+"% ")],1),t.analysisResult.market.volume_24h?a("span",{staticClass:"meta-item"},[a("a-icon",{attrs:{type:"dollar"}}),t._v(" "+t._s(t.formatVolume(t.analysisResult.market.volume_24h))+" ")],1):t._e(),t.analysisResult.market.polymarket_url?a("a-button",{attrs:{type:"link",size:"small",icon:"link",href:t.analysisResult.market.polymarket_url,target:"_blank"}},[t._v(" "+t._s(t.$t("polymarket.analysis.viewOnPolymarket"))+" ")]):t._e()],1)]),a("div",{staticClass:"analysis-result"},[a("a-divider",[t._v(t._s(t.$t("polymarket.analysis.aiAnalysis")))]),a("div",{staticClass:"probability-comparison"},[a("div",{staticClass:"prob-item"},[a("div",{staticClass:"prob-label"},[t._v(t._s(t.$t("polymarket.analysis.marketProbability")))]),a("div",{staticClass:"prob-value"},[t._v(t._s(t.analysisResult.analysis.market_probability)+"%")])]),a("div",{staticClass:"prob-item"},[a("div",{staticClass:"prob-label"},[t._v(t._s(t.$t("polymarket.analysis.aiPredictedProbability")))]),a("div",{staticClass:"prob-value ai-prob"},[t._v(t._s(t.analysisResult.analysis.ai_predicted_probability)+"%")])]),a("div",{staticClass:"prob-item"},[a("div",{staticClass:"prob-label"},[t._v(t._s(t.$t("polymarket.analysis.divergence")))]),a("div",{staticClass:"prob-value",class:t.getDivergenceClass(t.analysisResult.analysis.divergence)},[t._v(" "+t._s(t.analysisResult.analysis.divergence>=0?"+":"")+t._s(t.analysisResult.analysis.divergence.toFixed(2))+"% ")])])]),a("div",{staticClass:"recommendation-section"},[a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{span:8}},[a("div",{staticClass:"rec-card"},[a("div",{staticClass:"rec-label"},[t._v(t._s(t.$t("polymarket.analysis.recommendation")))]),a("a-tag",{staticStyle:{"font-size":"16px",padding:"4px 12px"},attrs:{color:t.getRecommendationColor(t.analysisResult.analysis.recommendation)}},[t._v(" "+t._s(t.getRecommendationLabel(t.analysisResult.analysis.recommendation))+" ")])],1)]),a("a-col",{attrs:{span:8}},[a("div",{staticClass:"rec-card"},[a("div",{staticClass:"rec-label"},[t._v(t._s(t.$t("polymarket.analysis.confidenceScore")))]),a("div",{staticClass:"rec-value"},[t._v(t._s(t.analysisResult.analysis.confidence_score.toFixed(0)))])])]),a("a-col",{attrs:{span:8}},[a("div",{staticClass:"rec-card"},[a("div",{staticClass:"rec-label"},[t._v(t._s(t.$t("polymarket.analysis.opportunityScore")))]),a("div",{staticClass:"rec-value"},[t._v(t._s(t.analysisResult.analysis.opportunity_score.toFixed(0)))])])])],1)],1),t.analysisResult.analysis.reasoning?a("div",{staticClass:"reasoning-section"},[a("h4",[t._v(t._s(t.$t("polymarket.analysis.reasoning")))]),a("p",{staticClass:"reasoning-text"},[t._v(t._s(t.analysisResult.analysis.reasoning))])]):t._e(),t.analysisResult.analysis.key_factors&&t.analysisResult.analysis.key_factors.length>0?a("div",{staticClass:"key-factors-section"},[a("h4",[t._v(t._s(t.$t("polymarket.analysis.keyFactors")))]),t._l(t.analysisResult.analysis.key_factors,function(e,s){return a("a-tag",{key:s,staticStyle:{margin:"4px"},attrs:{color:"blue"}},[t._v(" "+t._s(e)+" ")])})],2):t._e(),t.analysisResult.credits_charged>0?a("div",{staticClass:"billing-info"},[a("a-alert",{staticStyle:{"margin-top":"16px"},attrs:{message:t.$t("polymarket.analysis.creditsCharged",{credits:t.analysisResult.credits_charged}),type:"success","show-icon":""}}),void 0!==t.analysisResult.remaining_credits?a("div",{staticStyle:{"margin-top":"8px","text-align":"right"},style:{color:t.isDarkTheme?"rgba(255,255,255,0.75)":"rgba(0,0,0,0.65)"}},[t._v(" "+t._s(t.$t("polymarket.analysis.remainingCredits",{credits:t.analysisResult.remaining_credits.toFixed(0)}))+" ")]):t._e()],1):t._e()],1),a("div",{staticClass:"result-actions"},[a("a-button",{staticStyle:{"margin-right":"8px"},on:{click:t.handleNewAnalysis}},[t._v(" "+t._s(t.$t("polymarket.analysis.newAnalysis"))+" ")]),a("a-button",{attrs:{type:"primary"},on:{click:t.handleClose}},[t._v(" "+t._s(t.$t("common.close"))+" ")])],1)]):t._e(),t.analyzing?a("div",{staticClass:"loading-section"},[a("a-spin",{attrs:{size:"large"}}),a("p",{style:{marginTop:"16px",color:t.isDarkTheme?"rgba(255,255,255,0.75)":"rgba(0,0,0,0.65)"}},[t._v(" "+t._s(t.$t("polymarket.analysis.analyzing"))+" ")])],1):t._e()]),a("a-tab-pane",{key:"history",attrs:{tab:t.$t("polymarket.analysis.tabHistory")}},[a("div",{staticClass:"history-section"},[a("a-spin",{attrs:{spinning:t.historyLoading}},[a("a-table",{attrs:{columns:t.historyColumns,"data-source":t.historyList,pagination:t.historyPagination,"row-key":function(t){return t.id},size:"small"},on:{change:t.handleHistoryTableChange},scopedSlots:t._u([{key:"market_title",fn:function(e,s){return[a("a-button",{staticStyle:{padding:"0"},attrs:{type:"link"},on:{click:function(a){return t.viewHistoryItem(s)}}},[t._v(" "+t._s(e)+" ")])]}},{key:"recommendation",fn:function(e){return[a("a-tag",{attrs:{color:t.getRecommendationColor(e)}},[t._v(" "+t._s(t.getRecommendationLabel(e))+" ")])]}},{key:"created_at",fn:function(a){return[t._v(" "+t._s(t.formatDateTime(a))+" ")]}}])})],1)],1)])],1)],1)])}),m=[],h=(e(26099),e(75769)),v="/api/polymarket";function _(t){return(0,h.Ay)({url:"".concat(v,"/analyze"),method:"post",data:t,timeout:12e4})}function k(t){return(0,h.Ay)({url:"".concat(v,"/history"),method:"get",params:t})}var g={name:"PolymarketAnalysisModal",props:{visible:{type:Boolean,default:!1}},data:function(){var t=this;return{inputText:"",analyzing:!1,analysisResult:null,activeTab:"analyze",historyLoading:!1,historyList:[],historyPagination:{current:1,pageSize:20,total:0,showSizeChanger:!0,showTotal:function(a){return t.$t("polymarket.analysis.historyTotal",{total:a})}},historyColumns:[]}},computed:(0,l.A)((0,l.A)({},(0,c.aH)({navTheme:function(t){return t.app.theme}})),{},{isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme}}),methods:{handleAnalyze:function(){var t=this;this.inputText.trim()?(this.analyzing=!0,this.analysisResult=null,_({input:this.inputText.trim(),language:this.$i18n.locale||"zh-CN"}).then(function(a){1===a.code?(t.analysisResult=a.data,t.$message.success(t.$t("polymarket.analysis.success"))):"Insufficient credits"===a.msg?(t.$message.error(t.$t("polymarket.analysis.insufficientCredits")),t.$router.push("/billing")):t.$message.error(a.msg||t.$t("polymarket.analysis.failed"))}).catch(function(a){a.response&&a.response.data&&"Insufficient credits"===a.response.data.msg?(t.$message.error(t.$t("polymarket.analysis.insufficientCredits")),t.$router.push("/billing")):t.$message.error(t.$t("polymarket.analysis.failed"))}).finally(function(){t.analyzing=!1})):this.$message.warning(this.$t("polymarket.analysis.inputRequired"))},handleNewAnalysis:function(){this.inputText="",this.analysisResult=null},handleClose:function(){var t=this;this.$emit("close"),setTimeout(function(){t.inputText="",t.analysisResult=null,t.analyzing=!1},300)},getStatusColor:function(t){var a={active:"green",closed:"default",resolved:"blue"};return a[t]||"default"},getRecommendationColor:function(t){var a={YES:"green",NO:"red",HOLD:"orange"};return a[t]||"default"},getRecommendationLabel:function(t){var a={YES:this.$t("polymarket.analysis.recommendationYes"),NO:this.$t("polymarket.analysis.recommendationNo"),HOLD:this.$t("polymarket.analysis.recommendationHold")};return a[t]||t},getDivergenceClass:function(t){return t>5?"divergence-positive":t<-5?"divergence-negative":"divergence-neutral"},formatVolume:function(t){return t>=1e6?"$".concat((t/1e6).toFixed(2),"M"):t>=1e3?"$".concat((t/1e3).toFixed(2),"K"):"$".concat(t.toFixed(2))},handleTabChange:function(t){this.activeTab=t,"history"===t&&0===this.historyList.length&&this.loadHistory()},loadHistory:function(){var t=this;return(0,r.A)((0,n.A)().m(function a(){var e;return(0,n.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return t.historyLoading=!0,a.p=1,a.n=2,k({page:t.historyPagination.current,page_size:t.historyPagination.pageSize});case 2:e=a.v,1===e.code&&e.data&&(t.historyList=e.data.items||[],t.historyPagination.total=e.data.total||0),a.n=4;break;case 3:a.p=3,a.v,t.$message.error(t.$t("polymarket.analysis.loadHistoryFailed"));case 4:return a.p=4,t.historyLoading=!1,a.f(4);case 5:return a.a(2)}},a,null,[[1,3,4,5]])}))()},handleHistoryTableChange:function(t){this.historyPagination.current=t.current,this.historyPagination.pageSize=t.pageSize,this.loadHistory()},viewHistoryItem:function(t){this.activeTab="analyze",this.analysisResult={market:{question:t.market_title,market_id:t.market_id,polymarket_url:t.market_url,current_probability:t.market_probability,status:"active"},analysis:{ai_predicted_probability:t.ai_predicted_probability,market_probability:t.market_probability,recommendation:t.recommendation,opportunity_score:t.opportunity_score,confidence_score:t.confidence_score}}},formatDateTime:function(t){if(!t)return"";var a=new Date(t);return a.toLocaleString("zh-CN"===this.$i18n.locale?"zh-CN":"en-US")}},mounted:function(){this.historyColumns=[{title:this.$t("polymarket.analysis.historyMarket"),dataIndex:"market_title",key:"market_title",scopedSlots:{customRender:"market_title"}},{title:this.$t("polymarket.analysis.historyRecommendation"),dataIndex:"recommendation",key:"recommendation",width:120,scopedSlots:{customRender:"recommendation"}},{title:this.$t("polymarket.analysis.historyOpportunityScore"),dataIndex:"opportunity_score",key:"opportunity_score",width:120,align:"right"},{title:this.$t("polymarket.analysis.historyCreatedAt"),dataIndex:"created_at",key:"created_at",width:180,scopedSlots:{customRender:"created_at"}}]}},b=g,f=e(845),C=(0,f.A)(b,p,m,!1,null,"67e891d2",null),$=C.exports,S={name:"AIAssetAnalysis",components:{AnalysisView:u["default"],QuickTradePanel:y.A,PolymarketAnalysisModal:$},data:function(){return{activeTab:"quick",opportunities:[],oppLoading:!1,oppHover:!1,presetSymbol:"",autoAnalyzeSignal:0,showQuickTrade:!1,qtSymbol:"",qtSide:"",qtPrice:0,qtSource:"ai_radar",currentAnalysisSymbol:"",currentAnalysisMarket:"",showPolymarketModal:!1}},computed:(0,l.A)((0,l.A)({},(0,c.aH)({navTheme:function(t){return t.app.theme}})),{},{isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},carouselItems:function(){return 0===this.opportunities.length?[]:[].concat((0,o.A)(this.opportunities),(0,o.A)(this.opportunities))},oppTrackStyle:function(){var t=3*this.opportunities.length;return{animationDuration:t+"s"}}}),created:function(){this.loadOpportunities()},methods:{loadOpportunities:function(){var t=arguments,a=this;return(0,r.A)((0,n.A)().m(function e(){var s,i,r;return(0,n.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return s=t.length>0&&void 0!==t[0]&&t[0],a.oppLoading=!0,e.p=1,i=s?{force:!0}:{},e.n=2,(0,d.r9)(i);case 2:r=e.v,r&&1===r.code&&Array.isArray(r.data)&&(a.opportunities=r.data.slice(0,20)),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.p=4,a.oppLoading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},getSignalColor:function(t){var a={overbought:"volcano",oversold:"green",bullish_momentum:"cyan",bearish_momentum:"red"};return a[t]||"default"},getSignalLabel:function(t){var a="aiAssetAnalysis.opportunities.signal.".concat(t),e=this.$t(a);return e!==a?e:t},getMarketTagColor:function(t){var a={Crypto:"purple",USStock:"green",Forex:"gold",PredictionMarket:"cyan"};return a[t]||"default"},getMarketLabel:function(t){var a="aiAssetAnalysis.opportunities.market.".concat(t),e=this.$t(a);return e!==a?e:t},getReasonText:function(t){var a=(t.market||"Crypto").toLowerCase(),e=t.signal||"",s="aiAssetAnalysis.opportunities.reason.".concat(a,".").concat(e),i=this.$t(s);if(i===s)return t.reason||"";var n=Math.abs(t.change_24h||0).toFixed(1),r=Math.abs(t.change_7d||0).toFixed(1);return i.replace("{change}",n).replace("{change7d}",r)},formatOppPrice:function(t){return t?t>=1e4?(t/1e3).toFixed(1)+"K":t>=1?t.toFixed(2):t.toFixed(4):"--"},analyzeOpportunity:function(t){var a=this;if("PredictionMarket"===t.market)return this.activeTab="polymarket",void(this.showPolymarketModal=!0);this.activeTab="quick";var e=t.market||"Crypto";this.presetSymbol="".concat(e,":").concat(t.symbol),this.$nextTick(function(){a.autoAnalyzeSignal++})},getRecommendationColor:function(t){var a={YES:"green",NO:"red",HOLD:"default"};return a[t]||"default"},getRecommendationLabel:function(t){return this.$t("polymarket.recommendation.".concat(t))||t},onAnalysisSymbolChange:function(t){if(!t)return this.currentAnalysisSymbol="",void(this.currentAnalysisMarket="");var a=t.split(":"),e=a.length>1?a[0]:"Crypto",s=a.length>1?a[1]:a[0];this.currentAnalysisMarket=e,this.currentAnalysisSymbol="Crypto"===e?s:""},openQuickTradeFromCurrent:function(){this.currentAnalysisSymbol&&(this.qtSymbol=this.currentAnalysisSymbol,this.qtSide="",this.qtPrice=0,this.qtSource="ai_analysis",this.showQuickTrade=!0)},openQuickTradeFromOpp:function(t){if("Crypto"===t.market){this.qtSymbol=t.symbol||"";var a=(t.signal||"").toLowerCase();a.includes("oversold")||a.includes("bullish")?this.qtSide="buy":a.includes("overbought")||a.includes("bearish")?this.qtSide="sell":this.qtSide="",this.qtPrice=t.price||0,this.qtSource="ai_radar",this.showQuickTrade=!0}},onQuickTradeSuccess:function(){this.$message.success(this.$t("quickTrade.orderSuccess"))},handleQuickTradeSymbolChange:function(t){t&&(this.qtSymbol=t)}}},A=S,T=(0,f.A)(A,s,i,!1,null,"0d0a10d6",null),R=T.exports},42430:function(t,a,e){e.d(a,{IA:function(){return r},N6:function(){return c},PR:function(){return o},kI:function(){return l}});var s=e(76338),i=e(75769),n={list:"/api/credentials/list",get:"/api/credentials/get",create:"/api/credentials/create",delete:"/api/credentials/delete",egressIp:"/api/credentials/egress-ip"};function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i.Ay)({url:n.list,method:"get",params:t})}function o(t){return(0,i.Ay)({url:n.create,method:"post",data:t})}function l(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.Ay)({url:n.delete,method:"delete",params:(0,s.A)({id:t},a)})}function c(){return(0,i.Ay)({url:n.egressIp,method:"get"})}}}]); \ No newline at end of file +"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[161],{7126:function(t,a,s){s.r(a),s.d(a,{default:function(){return R}});s(62010),s(9868);var e=function(){var t=this,a=t._self._c;return a("div",{staticClass:"ai-asset-analysis-page",class:{"theme-dark":t.isDarkTheme}},[t.opportunities.length>0?a("div",{staticClass:"radar-section"},[a("div",{staticClass:"radar-header"},[a("div",{staticClass:"radar-header-left"},[a("h2",{staticClass:"radar-title"},[t._v(t._s(t.$t("aiAssetAnalysis.opportunities.title")))]),a("p",{staticClass:"radar-subtitle"},[t._v(t._s(t.$t("aiAssetAnalysis.opportunities.updateHint")))])]),a("a-button",{staticClass:"radar-refresh-btn",attrs:{size:"small",loading:t.oppLoading},on:{click:function(a){return t.loadOpportunities(!0)}}},[a("a-icon",{attrs:{type:"sync"}}),t._v(" "+t._s(t.$t("common.refresh")||"Refresh")+" ")],1)],1),a("div",{staticClass:"radar-carousel",on:{mouseenter:function(a){t.oppHover=!0},mouseleave:function(a){t.oppHover=!1}}},[a("div",{staticClass:"radar-track",class:{paused:t.oppHover},style:t.oppTrackStyle},t._l(t.carouselItems,function(s,e){return a("div",{key:"opp-"+e,staticClass:"radar-card",class:[s.impact,{"is-prediction":"PredictionMarket"===s.market}],on:{click:function(a){return t.analyzeOpportunity(s)}}},[a("div",{staticClass:"rc-head"},[a("span",{staticClass:"rc-symbol",class:{"rc-prediction-title":"PredictionMarket"===s.market}},[t._v(" "+t._s("PredictionMarket"===s.market&&s.name||s.symbol)+" ")]),a("span",{staticClass:"rc-market",class:"rc-market-"+(s.market||"").toLowerCase()},[t._v(" "+t._s(t.getMarketLabel(s.market))+" ")])]),"PredictionMarket"!==s.market?a("div",{staticClass:"rc-metrics"},[a("div",{staticClass:"rc-metric"},[a("span",{staticClass:"rc-metric-label"},[t._v(t._s(t.$i18n&&"zh-CN"===t.$i18n.locale?"当前价格":"Price"))]),a("span",{staticClass:"rc-metric-value"},[t._v("$"+t._s(t.formatOppPrice(s.price)))])]),a("div",{staticClass:"rc-metric"},[a("span",{staticClass:"rc-metric-label"},[t._v(t._s(t.$i18n&&"zh-CN"===t.$i18n.locale?"24h涨跌":"24h Change"))]),a("span",{staticClass:"rc-metric-value",class:s.change_24h>=0?"rc-up":"rc-down"},[t._v(" "+t._s(s.change_24h>=0?"+":"")+t._s((s.change_24h||0).toFixed(2))+"% ")])]),a("div",{staticClass:"rc-metric"},[a("span",{staticClass:"rc-metric-label"},[t._v(t._s(t.$i18n&&"zh-CN"===t.$i18n.locale?"信号":"Signal"))]),a("span",{staticClass:"rc-metric-value rc-signal-val",class:"rc-signal-"+(s.signal||"")},[t._v(" "+t._s(t.getSignalLabel(s.signal))+" ")])])]):a("div",{staticClass:"rc-metrics"},[a("div",{staticClass:"rc-metric"},[a("span",{staticClass:"rc-metric-label"},[t._v(t._s(t.$i18n&&"zh-CN"===t.$i18n.locale?"市场概率":"Probability"))]),a("span",{staticClass:"rc-metric-value"},[t._v(t._s((s.price||0).toFixed(1))+"%")])]),s.ai_analysis?a("div",{staticClass:"rc-metric"},[a("span",{staticClass:"rc-metric-label"},[t._v(t._s(t.$i18n&&"zh-CN"===t.$i18n.locale?"机会评分":"Score"))]),a("span",{staticClass:"rc-metric-value rc-up"},[t._v(t._s(s.ai_analysis.opportunity_score.toFixed(0)))])]):t._e(),s.ai_analysis?a("div",{staticClass:"rc-metric"},[a("span",{staticClass:"rc-metric-label"},[t._v(t._s(t.$i18n&&"zh-CN"===t.$i18n.locale?"建议":"Rec."))]),a("span",{staticClass:"rc-metric-value",class:"YES"===s.ai_analysis.recommendation?"rc-up":"NO"===s.ai_analysis.recommendation?"rc-down":""},[t._v(" "+t._s(t.getRecommendationLabel(s.ai_analysis.recommendation))+" ")])]):t._e()]),a("div",{staticClass:"rc-footer"},[a("span",{staticClass:"rc-reason"},[t._v(t._s(t.getReasonText(s)))]),"Crypto"===s.market?a("span",{staticClass:"rc-cta",on:{click:function(a){return a.stopPropagation(),t.openQuickTradeFromOpp(s)}}},[a("a-icon",{attrs:{type:"transaction"}}),t._v(" "+t._s(t.$t("quickTrade.tradeNow"))+" ")],1):t._e()])])}),0)])]):t._e(),a("a-tooltip",{attrs:{title:t.$t("quickTrade.openPanel"),placement:"left"}},[!t.showQuickTrade&&t.currentAnalysisSymbol?a("div",{staticClass:"qt-floating-btn",on:{click:t.openQuickTradeFromCurrent}},[a("a-icon",{attrs:{type:"thunderbolt",theme:"filled"}})],1):t._e()]),a("quick-trade-panel",{attrs:{visible:t.showQuickTrade,symbol:t.qtSymbol,"preset-side":t.qtSide,"preset-price":t.qtPrice,source:t.qtSource,"market-type":"swap"},on:{close:function(a){t.showQuickTrade=!1},"order-success":t.onQuickTradeSuccess,"update:symbol":t.handleQuickTradeSymbolChange}}),a("a-card",{staticClass:"workspace-card",attrs:{bordered:!1}},[a("a-tabs",{staticClass:"workspace-tabs",attrs:{size:"large"},model:{value:t.activeTab,callback:function(a){t.activeTab=a},expression:"activeTab"}},[a("a-tab-pane",{key:"quick"},[a("span",{attrs:{slot:"tab"},slot:"tab"},[a("a-icon",{attrs:{type:"thunderbolt"}}),t._v(" "+t._s(t.$t("aiAssetAnalysis.tabs.quick"))+" ")],1),a("div",{staticClass:"tab-body"},["quick"===t.activeTab?a("AnalysisView",{attrs:{embedded:!0,"preset-symbol":t.presetSymbol,"auto-analyze-signal":t.autoAnalyzeSignal},on:{"symbol-change":t.onAnalysisSymbolChange}}):t._e()],1)]),a("a-tab-pane",{key:"polymarket"},[a("span",{attrs:{slot:"tab"},slot:"tab"},[a("a-icon",{attrs:{type:"radar-chart"}}),t._v(" "+t._s(t.$t("aiAssetAnalysis.tabs.polymarket"))+" ")],1),a("div",{staticClass:"tab-body"},[a("div",{staticClass:"polymarket-tab-content"},[a("div",{staticClass:"polymarket-placeholder"},[a("div",{staticClass:"placeholder-icon"},[a("a-icon",{attrs:{type:"radar-chart"}})],1),a("h3",[t._v(t._s(t.$t("polymarket.analysis.title")))]),a("p",[t._v(t._s(t.$t("polymarket.analysis.description")))]),a("a-button",{staticStyle:{"margin-top":"16px"},attrs:{type:"primary",size:"large",icon:"thunderbolt"},on:{click:function(a){t.showPolymarketModal=!0}}},[t._v(" "+t._s(t.$t("polymarket.analysis.startAnalysis"))+" ")])],1)])])])],1)],1),a("PolymarketAnalysisModal",{attrs:{visible:t.showPolymarketModal},on:{close:function(a){t.showPolymarketModal=!1}}})],1)},i=[],n=s(81127),r=s(56252),o=s(2403),l=s(76338),c=(s(28706),s(74423),s(34782),s(27495),s(21699),s(25440),s(95353)),u=s(82631),d=s(44146),y=s(32945),p=(s(42762),function(){var t=this,a=t._self._c;return a("a-modal",{attrs:{visible:t.visible,title:t.$t("polymarket.analysis.title"),width:900,footer:null,wrapClassName:t.isDarkTheme?"qd-dark-modal":"",maskClosable:!1},on:{cancel:t.handleClose}},[a("div",{staticClass:"polymarket-analysis-modal",class:{"theme-dark":t.isDarkTheme}},[a("a-tabs",{attrs:{"default-active-key":"analyze"},on:{change:t.handleTabChange}},[a("a-tab-pane",{key:"analyze",attrs:{tab:t.$t("polymarket.analysis.tabAnalyze")}},[t.analysisResult?t._e():a("div",{staticClass:"input-section"},[a("a-alert",{staticStyle:{"margin-bottom":"16px"},attrs:{message:t.$t("polymarket.analysis.inputHint"),type:"info","show-icon":""}}),a("a-textarea",{attrs:{placeholder:t.$t("polymarket.analysis.inputPlaceholder"),rows:3,disabled:t.analyzing},on:{pressEnter:t.handleAnalyze},model:{value:t.inputText,callback:function(a){t.inputText=a},expression:"inputText"}}),a("div",{staticClass:"input-actions"},[a("a-button",{staticStyle:{width:"100%","margin-top":"12px"},attrs:{type:"primary",size:"large",icon:"thunderbolt",loading:t.analyzing,disabled:!t.inputText.trim()},on:{click:t.handleAnalyze}},[t._v(" "+t._s(t.$t("polymarket.analysis.analyzeButton"))+" ")])],1)],1),t.analysisResult?a("div",{staticClass:"result-section"},[a("div",{staticClass:"market-info"},[a("h3",[t._v(t._s(t.analysisResult.market.question))]),a("div",{staticClass:"market-meta"},[a("a-tag",{attrs:{color:t.getStatusColor(t.analysisResult.market.status)}},[t._v(" "+t._s(t.analysisResult.market.status)+" ")]),a("span",{staticClass:"meta-item"},[a("a-icon",{attrs:{type:"percentage"}}),t._v(" "+t._s(t.analysisResult.market.current_probability)+"% ")],1),t.analysisResult.market.volume_24h?a("span",{staticClass:"meta-item"},[a("a-icon",{attrs:{type:"dollar"}}),t._v(" "+t._s(t.formatVolume(t.analysisResult.market.volume_24h))+" ")],1):t._e(),t.analysisResult.market.polymarket_url?a("a-button",{attrs:{type:"link",size:"small",icon:"link",href:t.analysisResult.market.polymarket_url,target:"_blank"}},[t._v(" "+t._s(t.$t("polymarket.analysis.viewOnPolymarket"))+" ")]):t._e()],1)]),a("div",{staticClass:"analysis-result"},[a("a-divider",[t._v(t._s(t.$t("polymarket.analysis.aiAnalysis")))]),a("div",{staticClass:"probability-comparison"},[a("div",{staticClass:"prob-item"},[a("div",{staticClass:"prob-label"},[t._v(t._s(t.$t("polymarket.analysis.marketProbability")))]),a("div",{staticClass:"prob-value"},[t._v(t._s(t.analysisResult.analysis.market_probability)+"%")])]),a("div",{staticClass:"prob-item"},[a("div",{staticClass:"prob-label"},[t._v(t._s(t.$t("polymarket.analysis.aiPredictedProbability")))]),a("div",{staticClass:"prob-value ai-prob"},[t._v(t._s(t.analysisResult.analysis.ai_predicted_probability)+"%")])]),a("div",{staticClass:"prob-item"},[a("div",{staticClass:"prob-label"},[t._v(t._s(t.$t("polymarket.analysis.divergence")))]),a("div",{staticClass:"prob-value",class:t.getDivergenceClass(t.analysisResult.analysis.divergence)},[t._v(" "+t._s(t.analysisResult.analysis.divergence>=0?"+":"")+t._s(t.analysisResult.analysis.divergence.toFixed(2))+"% ")])])]),a("div",{staticClass:"recommendation-section"},[a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{span:8}},[a("div",{staticClass:"rec-card"},[a("div",{staticClass:"rec-label"},[t._v(t._s(t.$t("polymarket.analysis.recommendation")))]),a("a-tag",{staticStyle:{"font-size":"16px",padding:"4px 12px"},attrs:{color:t.getRecommendationColor(t.analysisResult.analysis.recommendation)}},[t._v(" "+t._s(t.getRecommendationLabel(t.analysisResult.analysis.recommendation))+" ")])],1)]),a("a-col",{attrs:{span:8}},[a("div",{staticClass:"rec-card"},[a("div",{staticClass:"rec-label"},[t._v(t._s(t.$t("polymarket.analysis.confidenceScore")))]),a("div",{staticClass:"rec-value"},[t._v(t._s(t.analysisResult.analysis.confidence_score.toFixed(0)))])])]),a("a-col",{attrs:{span:8}},[a("div",{staticClass:"rec-card"},[a("div",{staticClass:"rec-label"},[t._v(t._s(t.$t("polymarket.analysis.opportunityScore")))]),a("div",{staticClass:"rec-value"},[t._v(t._s(t.analysisResult.analysis.opportunity_score.toFixed(0)))])])])],1)],1),t.analysisResult.analysis.reasoning?a("div",{staticClass:"reasoning-section"},[a("h4",[t._v(t._s(t.$t("polymarket.analysis.reasoning")))]),a("p",{staticClass:"reasoning-text"},[t._v(t._s(t.analysisResult.analysis.reasoning))])]):t._e(),t.analysisResult.analysis.key_factors&&t.analysisResult.analysis.key_factors.length>0?a("div",{staticClass:"key-factors-section"},[a("h4",[t._v(t._s(t.$t("polymarket.analysis.keyFactors")))]),t._l(t.analysisResult.analysis.key_factors,function(s,e){return a("a-tag",{key:e,staticStyle:{margin:"4px"},attrs:{color:"blue"}},[t._v(" "+t._s(s)+" ")])})],2):t._e(),t.analysisResult.credits_charged>0?a("div",{staticClass:"billing-info"},[a("a-alert",{staticStyle:{"margin-top":"16px"},attrs:{message:t.$t("polymarket.analysis.creditsCharged",{credits:t.analysisResult.credits_charged}),type:"success","show-icon":""}}),void 0!==t.analysisResult.remaining_credits?a("div",{staticStyle:{"margin-top":"8px","text-align":"right"},style:{color:t.isDarkTheme?"rgba(255,255,255,0.75)":"rgba(0,0,0,0.65)"}},[t._v(" "+t._s(t.$t("polymarket.analysis.remainingCredits",{credits:t.analysisResult.remaining_credits.toFixed(0)}))+" ")]):t._e()],1):t._e()],1),a("div",{staticClass:"result-actions"},[a("a-button",{staticStyle:{"margin-right":"8px"},on:{click:t.handleNewAnalysis}},[t._v(" "+t._s(t.$t("polymarket.analysis.newAnalysis"))+" ")]),a("a-button",{attrs:{type:"primary"},on:{click:t.handleClose}},[t._v(" "+t._s(t.$t("common.close"))+" ")])],1)]):t._e(),t.analyzing?a("div",{staticClass:"loading-section"},[a("a-spin",{attrs:{size:"large"}}),a("p",{style:{marginTop:"16px",color:t.isDarkTheme?"rgba(255,255,255,0.75)":"rgba(0,0,0,0.65)"}},[t._v(" "+t._s(t.$t("polymarket.analysis.analyzing"))+" ")])],1):t._e()]),a("a-tab-pane",{key:"history",attrs:{tab:t.$t("polymarket.analysis.tabHistory")}},[a("div",{staticClass:"history-section"},[a("a-spin",{attrs:{spinning:t.historyLoading}},[a("a-table",{attrs:{columns:t.historyColumns,"data-source":t.historyList,pagination:t.historyPagination,"row-key":function(t){return t.id},size:"small"},on:{change:t.handleHistoryTableChange},scopedSlots:t._u([{key:"market_title",fn:function(s,e){return[a("a-button",{staticStyle:{padding:"0"},attrs:{type:"link"},on:{click:function(a){return t.viewHistoryItem(e)}}},[t._v(" "+t._s(s)+" ")])]}},{key:"recommendation",fn:function(s){return[a("a-tag",{attrs:{color:t.getRecommendationColor(s)}},[t._v(" "+t._s(t.getRecommendationLabel(s))+" ")])]}},{key:"created_at",fn:function(a){return[t._v(" "+t._s(t.formatDateTime(a))+" ")]}}])})],1)],1)])],1)],1)])}),m=[],h=(s(26099),s(75769)),v="/api/polymarket";function _(t){return(0,h.Ay)({url:"".concat(v,"/analyze"),method:"post",data:t,timeout:12e4})}function k(t){return(0,h.Ay)({url:"".concat(v,"/history"),method:"get",params:t})}var g={name:"PolymarketAnalysisModal",props:{visible:{type:Boolean,default:!1}},data:function(){var t=this;return{inputText:"",analyzing:!1,analysisResult:null,activeTab:"analyze",historyLoading:!1,historyList:[],historyPagination:{current:1,pageSize:20,total:0,showSizeChanger:!0,showTotal:function(a){return t.$t("polymarket.analysis.historyTotal",{total:a})}},historyColumns:[]}},computed:(0,l.A)((0,l.A)({},(0,c.aH)({navTheme:function(t){return t.app.theme}})),{},{isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme}}),methods:{handleAnalyze:function(){var t=this;this.inputText.trim()?(this.analyzing=!0,this.analysisResult=null,_({input:this.inputText.trim(),language:this.$i18n.locale||"zh-CN"}).then(function(a){1===a.code?(t.analysisResult=a.data,t.$message.success(t.$t("polymarket.analysis.success"))):"Insufficient credits"===a.msg?(t.$message.error(t.$t("polymarket.analysis.insufficientCredits")),t.$router.push("/billing")):t.$message.error(a.msg||t.$t("polymarket.analysis.failed"))}).catch(function(a){a.response&&a.response.data&&"Insufficient credits"===a.response.data.msg?(t.$message.error(t.$t("polymarket.analysis.insufficientCredits")),t.$router.push("/billing")):t.$message.error(t.$t("polymarket.analysis.failed"))}).finally(function(){t.analyzing=!1})):this.$message.warning(this.$t("polymarket.analysis.inputRequired"))},handleNewAnalysis:function(){this.inputText="",this.analysisResult=null},handleClose:function(){var t=this;this.$emit("close"),setTimeout(function(){t.inputText="",t.analysisResult=null,t.analyzing=!1},300)},getStatusColor:function(t){var a={active:"green",closed:"default",resolved:"blue"};return a[t]||"default"},getRecommendationColor:function(t){var a={YES:"green",NO:"red",HOLD:"orange"};return a[t]||"default"},getRecommendationLabel:function(t){var a={YES:this.$t("polymarket.analysis.recommendationYes"),NO:this.$t("polymarket.analysis.recommendationNo"),HOLD:this.$t("polymarket.analysis.recommendationHold")};return a[t]||t},getDivergenceClass:function(t){return t>5?"divergence-positive":t<-5?"divergence-negative":"divergence-neutral"},formatVolume:function(t){return t>=1e6?"$".concat((t/1e6).toFixed(2),"M"):t>=1e3?"$".concat((t/1e3).toFixed(2),"K"):"$".concat(t.toFixed(2))},handleTabChange:function(t){this.activeTab=t,"history"===t&&0===this.historyList.length&&this.loadHistory()},loadHistory:function(){var t=this;return(0,r.A)((0,n.A)().m(function a(){var s;return(0,n.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return t.historyLoading=!0,a.p=1,a.n=2,k({page:t.historyPagination.current,page_size:t.historyPagination.pageSize});case 2:s=a.v,1===s.code&&s.data&&(t.historyList=s.data.items||[],t.historyPagination.total=s.data.total||0),a.n=4;break;case 3:a.p=3,a.v,t.$message.error(t.$t("polymarket.analysis.loadHistoryFailed"));case 4:return a.p=4,t.historyLoading=!1,a.f(4);case 5:return a.a(2)}},a,null,[[1,3,4,5]])}))()},handleHistoryTableChange:function(t){this.historyPagination.current=t.current,this.historyPagination.pageSize=t.pageSize,this.loadHistory()},viewHistoryItem:function(t){this.activeTab="analyze",this.analysisResult={market:{question:t.market_title,market_id:t.market_id,polymarket_url:t.market_url,current_probability:t.market_probability,status:"active"},analysis:{ai_predicted_probability:t.ai_predicted_probability,market_probability:t.market_probability,recommendation:t.recommendation,opportunity_score:t.opportunity_score,confidence_score:t.confidence_score}}},formatDateTime:function(t){if(!t)return"";var a=new Date(t);return a.toLocaleString("zh-CN"===this.$i18n.locale?"zh-CN":"en-US")}},mounted:function(){this.historyColumns=[{title:this.$t("polymarket.analysis.historyMarket"),dataIndex:"market_title",key:"market_title",scopedSlots:{customRender:"market_title"}},{title:this.$t("polymarket.analysis.historyRecommendation"),dataIndex:"recommendation",key:"recommendation",width:120,scopedSlots:{customRender:"recommendation"}},{title:this.$t("polymarket.analysis.historyOpportunityScore"),dataIndex:"opportunity_score",key:"opportunity_score",width:120,align:"right"},{title:this.$t("polymarket.analysis.historyCreatedAt"),dataIndex:"created_at",key:"created_at",width:180,scopedSlots:{customRender:"created_at"}}]}},b=g,f=s(845),C=(0,f.A)(b,p,m,!1,null,"67e891d2",null),$=C.exports,S={name:"AIAssetAnalysis",components:{AnalysisView:u["default"],QuickTradePanel:y.A,PolymarketAnalysisModal:$},data:function(){return{activeTab:"quick",opportunities:[],oppLoading:!1,oppHover:!1,presetSymbol:"",autoAnalyzeSignal:0,showQuickTrade:!1,qtSymbol:"",qtSide:"",qtPrice:0,qtSource:"ai_radar",currentAnalysisSymbol:"",currentAnalysisMarket:"",showPolymarketModal:!1}},computed:(0,l.A)((0,l.A)({},(0,c.aH)({navTheme:function(t){return t.app.theme}})),{},{isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},carouselItems:function(){return 0===this.opportunities.length?[]:[].concat((0,o.A)(this.opportunities),(0,o.A)(this.opportunities))},oppTrackStyle:function(){var t=3*this.opportunities.length;return{animationDuration:t+"s"}}}),created:function(){this.loadOpportunities()},methods:{loadOpportunities:function(){var t=arguments,a=this;return(0,r.A)((0,n.A)().m(function s(){var e,i,r;return(0,n.A)().w(function(s){while(1)switch(s.p=s.n){case 0:return e=t.length>0&&void 0!==t[0]&&t[0],a.oppLoading=!0,s.p=1,i=e?{force:!0}:{},s.n=2,(0,d.r9)(i);case 2:r=s.v,r&&1===r.code&&Array.isArray(r.data)&&(a.opportunities=r.data.slice(0,20)),s.n=4;break;case 3:s.p=3,s.v;case 4:return s.p=4,a.oppLoading=!1,s.f(4);case 5:return s.a(2)}},s,null,[[1,3,4,5]])}))()},getSignalColor:function(t){var a={overbought:"volcano",oversold:"green",bullish_momentum:"cyan",bearish_momentum:"red"};return a[t]||"default"},getSignalLabel:function(t){var a="aiAssetAnalysis.opportunities.signal.".concat(t),s=this.$t(a);return s!==a?s:t},getMarketTagColor:function(t){var a={Crypto:"purple",USStock:"green",Forex:"gold",PredictionMarket:"cyan"};return a[t]||"default"},getMarketLabel:function(t){var a="aiAssetAnalysis.opportunities.market.".concat(t),s=this.$t(a);return s!==a?s:t},getReasonText:function(t){var a=(t.market||"Crypto").toLowerCase(),s=t.signal||"",e="aiAssetAnalysis.opportunities.reason.".concat(a,".").concat(s),i=this.$t(e);if(i===e)return t.reason||"";var n=Math.abs(t.change_24h||0).toFixed(1),r=Math.abs(t.change_7d||0).toFixed(1);return i.replace("{change}",n).replace("{change7d}",r)},formatOppPrice:function(t){return t?t>=1e4?(t/1e3).toFixed(1)+"K":t>=1?t.toFixed(2):t.toFixed(4):"--"},analyzeOpportunity:function(t){var a=this;if("PredictionMarket"===t.market)return this.activeTab="polymarket",void(this.showPolymarketModal=!0);this.activeTab="quick";var s=t.market||"Crypto";this.presetSymbol="".concat(s,":").concat(t.symbol),this.$nextTick(function(){a.autoAnalyzeSignal++})},getRecommendationColor:function(t){var a={YES:"green",NO:"red",HOLD:"default"};return a[t]||"default"},getRecommendationLabel:function(t){return this.$t("polymarket.recommendation.".concat(t))||t},onAnalysisSymbolChange:function(t){if(!t)return this.currentAnalysisSymbol="",void(this.currentAnalysisMarket="");var a=t.split(":"),s=a.length>1?a[0]:"Crypto",e=a.length>1?a[1]:a[0];this.currentAnalysisMarket=s,this.currentAnalysisSymbol="Crypto"===s?e:""},openQuickTradeFromCurrent:function(){this.currentAnalysisSymbol&&(this.qtSymbol=this.currentAnalysisSymbol,this.qtSide="",this.qtPrice=0,this.qtSource="ai_analysis",this.showQuickTrade=!0)},openQuickTradeFromOpp:function(t){if("Crypto"===t.market){this.qtSymbol=t.symbol||"";var a=(t.signal||"").toLowerCase();a.includes("oversold")||a.includes("bullish")?this.qtSide="buy":a.includes("overbought")||a.includes("bearish")?this.qtSide="sell":this.qtSide="",this.qtPrice=t.price||0,this.qtSource="ai_radar",this.showQuickTrade=!0}},onQuickTradeSuccess:function(){this.$message.success(this.$t("quickTrade.orderSuccess"))},handleQuickTradeSymbolChange:function(t){t&&(this.qtSymbol=t)}}},T=S,A=(0,f.A)(T,e,i,!1,null,"0d0a10d6",null),R=A.exports}}]); \ No newline at end of file diff --git a/frontend/dist/js/19.5d40ba7c.js b/frontend/dist/js/19.5d40ba7c.js new file mode 100644 index 0000000..fe6912d --- /dev/null +++ b/frontend/dist/js/19.5d40ba7c.js @@ -0,0 +1 @@ +"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[19],{17692:function(t,a,s){s.r(a),s.d(a,{default:function(){return R}});var e=function(){var t=this,a=t._self._c;return a("div",{staticClass:"ai-asset-analysis-page",class:{"theme-dark":t.isDarkTheme}},[t.opportunities.length>0?a("div",{staticClass:"radar-section"},[a("div",{staticClass:"radar-header"},[a("div",{staticClass:"radar-header-left"},[a("h2",{staticClass:"radar-title"},[t._v(t._s(t.$t("aiAssetAnalysis.opportunities.title")))]),a("p",{staticClass:"radar-subtitle"},[t._v(t._s(t.$t("aiAssetAnalysis.opportunities.updateHint")))])]),a("a-button",{staticClass:"radar-refresh-btn",attrs:{size:"small",loading:t.oppLoading},on:{click:function(a){return t.loadOpportunities(!0)}}},[a("a-icon",{attrs:{type:"sync"}}),t._v(" "+t._s(t.$t("common.refresh")||"Refresh")+" ")],1)],1),a("div",{staticClass:"radar-carousel",on:{mouseenter:function(a){t.oppHover=!0},mouseleave:function(a){t.oppHover=!1}}},[a("div",{staticClass:"radar-track",class:{paused:t.oppHover},style:t.oppTrackStyle},t._l(t.carouselItems,function(s,e){return a("div",{key:"opp-"+e,staticClass:"radar-card",class:[s.impact,{"is-prediction":"PredictionMarket"===s.market}],on:{click:function(a){return t.analyzeOpportunity(s)}}},[a("div",{staticClass:"rc-head"},[a("span",{staticClass:"rc-symbol",class:{"rc-prediction-title":"PredictionMarket"===s.market}},[t._v(" "+t._s("PredictionMarket"===s.market&&s.name||s.symbol)+" ")]),a("span",{staticClass:"rc-market",class:"rc-market-"+(s.market||"").toLowerCase()},[t._v(" "+t._s(t.getMarketLabel(s.market))+" ")])]),"PredictionMarket"!==s.market?a("div",{staticClass:"rc-metrics"},[a("div",{staticClass:"rc-metric"},[a("span",{staticClass:"rc-metric-label"},[t._v(t._s(t.$i18n&&"zh-CN"===t.$i18n.locale?"当前价格":"Price"))]),a("span",{staticClass:"rc-metric-value"},[t._v("$"+t._s(t.formatOppPrice(s.price)))])]),a("div",{staticClass:"rc-metric"},[a("span",{staticClass:"rc-metric-label"},[t._v(t._s(t.$i18n&&"zh-CN"===t.$i18n.locale?"24h涨跌":"24h Change"))]),a("span",{staticClass:"rc-metric-value",class:s.change_24h>=0?"rc-up":"rc-down"},[t._v(" "+t._s(s.change_24h>=0?"+":"")+t._s((s.change_24h||0).toFixed(2))+"% ")])]),a("div",{staticClass:"rc-metric"},[a("span",{staticClass:"rc-metric-label"},[t._v(t._s(t.$i18n&&"zh-CN"===t.$i18n.locale?"信号":"Signal"))]),a("span",{staticClass:"rc-metric-value rc-signal-val",class:"rc-signal-"+(s.signal||"")},[t._v(" "+t._s(t.getSignalLabel(s.signal))+" ")])])]):a("div",{staticClass:"rc-metrics"},[a("div",{staticClass:"rc-metric"},[a("span",{staticClass:"rc-metric-label"},[t._v(t._s(t.$i18n&&"zh-CN"===t.$i18n.locale?"市场概率":"Probability"))]),a("span",{staticClass:"rc-metric-value"},[t._v(t._s((s.price||0).toFixed(1))+"%")])]),s.ai_analysis?a("div",{staticClass:"rc-metric"},[a("span",{staticClass:"rc-metric-label"},[t._v(t._s(t.$i18n&&"zh-CN"===t.$i18n.locale?"机会评分":"Score"))]),a("span",{staticClass:"rc-metric-value rc-up"},[t._v(t._s(s.ai_analysis.opportunity_score.toFixed(0)))])]):t._e(),s.ai_analysis?a("div",{staticClass:"rc-metric"},[a("span",{staticClass:"rc-metric-label"},[t._v(t._s(t.$i18n&&"zh-CN"===t.$i18n.locale?"建议":"Rec."))]),a("span",{staticClass:"rc-metric-value",class:"YES"===s.ai_analysis.recommendation?"rc-up":"NO"===s.ai_analysis.recommendation?"rc-down":""},[t._v(" "+t._s(t.getRecommendationLabel(s.ai_analysis.recommendation))+" ")])]):t._e()]),a("div",{staticClass:"rc-footer"},[a("span",{staticClass:"rc-reason"},[t._v(t._s(t.getReasonText(s)))]),"Crypto"===s.market?a("span",{staticClass:"rc-cta",on:{click:function(a){return a.stopPropagation(),t.openQuickTradeFromOpp(s)}}},[a("a-icon",{attrs:{type:"transaction"}}),t._v(" "+t._s(t.$t("quickTrade.tradeNow"))+" ")],1):t._e()])])}),0)])]):t._e(),a("a-tooltip",{attrs:{title:t.$t("quickTrade.openPanel"),placement:"left"}},[!t.showQuickTrade&&t.currentAnalysisSymbol?a("div",{staticClass:"qt-floating-btn",on:{click:t.openQuickTradeFromCurrent}},[a("a-icon",{attrs:{type:"thunderbolt",theme:"filled"}})],1):t._e()]),a("quick-trade-panel",{attrs:{visible:t.showQuickTrade,symbol:t.qtSymbol,"preset-side":t.qtSide,"preset-price":t.qtPrice,source:t.qtSource,"market-type":"swap"},on:{close:function(a){t.showQuickTrade=!1},"order-success":t.onQuickTradeSuccess,"update:symbol":t.handleQuickTradeSymbolChange}}),a("a-card",{staticClass:"workspace-card",attrs:{bordered:!1}},[a("a-tabs",{staticClass:"workspace-tabs",attrs:{size:"large"},model:{value:t.activeTab,callback:function(a){t.activeTab=a},expression:"activeTab"}},[a("a-tab-pane",{key:"quick"},[a("span",{attrs:{slot:"tab"},slot:"tab"},[a("a-icon",{attrs:{type:"thunderbolt"}}),t._v(" "+t._s(t.$t("aiAssetAnalysis.tabs.quick"))+" ")],1),a("div",{staticClass:"tab-body"},["quick"===t.activeTab?a("AnalysisView",{attrs:{embedded:!0,"preset-symbol":t.presetSymbol,"auto-analyze-signal":t.autoAnalyzeSignal},on:{"symbol-change":t.onAnalysisSymbolChange}}):t._e()],1)]),a("a-tab-pane",{key:"polymarket"},[a("span",{attrs:{slot:"tab"},slot:"tab"},[a("a-icon",{attrs:{type:"radar-chart"}}),t._v(" "+t._s(t.$t("aiAssetAnalysis.tabs.polymarket"))+" ")],1),a("div",{staticClass:"tab-body"},[a("div",{staticClass:"polymarket-tab-content"},[a("div",{staticClass:"polymarket-placeholder"},[a("div",{staticClass:"placeholder-icon"},[a("a-icon",{attrs:{type:"radar-chart"}})],1),a("h3",[t._v(t._s(t.$t("polymarket.analysis.title")))]),a("p",[t._v(t._s(t.$t("polymarket.analysis.description")))]),a("a-button",{staticStyle:{"margin-top":"16px"},attrs:{type:"primary",size:"large",icon:"thunderbolt"},on:{click:function(a){t.showPolymarketModal=!0}}},[t._v(" "+t._s(t.$t("polymarket.analysis.startAnalysis"))+" ")])],1)])])])],1)],1),a("PolymarketAnalysisModal",{attrs:{visible:t.showPolymarketModal},on:{close:function(a){t.showPolymarketModal=!1}}})],1)},i=[],n=s(81127),r=s(56252),o=s(2403),l=s(76338),c=(s(74423),s(95353)),u=s(67681),d=s(44146),y=s(46500),p=function(){var t=this,a=t._self._c;return a("a-modal",{attrs:{visible:t.visible,title:t.$t("polymarket.analysis.title"),width:900,footer:null,wrapClassName:t.isDarkTheme?"qd-dark-modal":"",maskClosable:!1},on:{cancel:t.handleClose}},[a("div",{staticClass:"polymarket-analysis-modal",class:{"theme-dark":t.isDarkTheme}},[a("a-tabs",{attrs:{"default-active-key":"analyze"},on:{change:t.handleTabChange}},[a("a-tab-pane",{key:"analyze",attrs:{tab:t.$t("polymarket.analysis.tabAnalyze")}},[t.analysisResult?t._e():a("div",{staticClass:"input-section"},[a("a-alert",{staticStyle:{"margin-bottom":"16px"},attrs:{message:t.$t("polymarket.analysis.inputHint"),type:"info","show-icon":""}}),a("a-textarea",{attrs:{placeholder:t.$t("polymarket.analysis.inputPlaceholder"),rows:3,disabled:t.analyzing},on:{pressEnter:t.handleAnalyze},model:{value:t.inputText,callback:function(a){t.inputText=a},expression:"inputText"}}),a("div",{staticClass:"input-actions"},[a("a-button",{staticStyle:{width:"100%","margin-top":"12px"},attrs:{type:"primary",size:"large",icon:"thunderbolt",loading:t.analyzing,disabled:!t.inputText.trim()},on:{click:t.handleAnalyze}},[t._v(" "+t._s(t.$t("polymarket.analysis.analyzeButton"))+" ")])],1)],1),t.analysisResult?a("div",{staticClass:"result-section"},[a("div",{staticClass:"market-info"},[a("h3",[t._v(t._s(t.analysisResult.market.question))]),a("div",{staticClass:"market-meta"},[a("a-tag",{attrs:{color:t.getStatusColor(t.analysisResult.market.status)}},[t._v(" "+t._s(t.analysisResult.market.status)+" ")]),a("span",{staticClass:"meta-item"},[a("a-icon",{attrs:{type:"percentage"}}),t._v(" "+t._s(t.analysisResult.market.current_probability)+"% ")],1),t.analysisResult.market.volume_24h?a("span",{staticClass:"meta-item"},[a("a-icon",{attrs:{type:"dollar"}}),t._v(" "+t._s(t.formatVolume(t.analysisResult.market.volume_24h))+" ")],1):t._e(),t.analysisResult.market.polymarket_url?a("a-button",{attrs:{type:"link",size:"small",icon:"link",href:t.analysisResult.market.polymarket_url,target:"_blank"}},[t._v(" "+t._s(t.$t("polymarket.analysis.viewOnPolymarket"))+" ")]):t._e()],1)]),a("div",{staticClass:"analysis-result"},[a("a-divider",[t._v(t._s(t.$t("polymarket.analysis.aiAnalysis")))]),a("div",{staticClass:"probability-comparison"},[a("div",{staticClass:"prob-item"},[a("div",{staticClass:"prob-label"},[t._v(t._s(t.$t("polymarket.analysis.marketProbability")))]),a("div",{staticClass:"prob-value"},[t._v(t._s(t.analysisResult.analysis.market_probability)+"%")])]),a("div",{staticClass:"prob-item"},[a("div",{staticClass:"prob-label"},[t._v(t._s(t.$t("polymarket.analysis.aiPredictedProbability")))]),a("div",{staticClass:"prob-value ai-prob"},[t._v(t._s(t.analysisResult.analysis.ai_predicted_probability)+"%")])]),a("div",{staticClass:"prob-item"},[a("div",{staticClass:"prob-label"},[t._v(t._s(t.$t("polymarket.analysis.divergence")))]),a("div",{staticClass:"prob-value",class:t.getDivergenceClass(t.analysisResult.analysis.divergence)},[t._v(" "+t._s(t.analysisResult.analysis.divergence>=0?"+":"")+t._s(t.analysisResult.analysis.divergence.toFixed(2))+"% ")])])]),a("div",{staticClass:"recommendation-section"},[a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{span:8}},[a("div",{staticClass:"rec-card"},[a("div",{staticClass:"rec-label"},[t._v(t._s(t.$t("polymarket.analysis.recommendation")))]),a("a-tag",{staticStyle:{"font-size":"16px",padding:"4px 12px"},attrs:{color:t.getRecommendationColor(t.analysisResult.analysis.recommendation)}},[t._v(" "+t._s(t.getRecommendationLabel(t.analysisResult.analysis.recommendation))+" ")])],1)]),a("a-col",{attrs:{span:8}},[a("div",{staticClass:"rec-card"},[a("div",{staticClass:"rec-label"},[t._v(t._s(t.$t("polymarket.analysis.confidenceScore")))]),a("div",{staticClass:"rec-value"},[t._v(t._s(t.analysisResult.analysis.confidence_score.toFixed(0)))])])]),a("a-col",{attrs:{span:8}},[a("div",{staticClass:"rec-card"},[a("div",{staticClass:"rec-label"},[t._v(t._s(t.$t("polymarket.analysis.opportunityScore")))]),a("div",{staticClass:"rec-value"},[t._v(t._s(t.analysisResult.analysis.opportunity_score.toFixed(0)))])])])],1)],1),t.analysisResult.analysis.reasoning?a("div",{staticClass:"reasoning-section"},[a("h4",[t._v(t._s(t.$t("polymarket.analysis.reasoning")))]),a("p",{staticClass:"reasoning-text"},[t._v(t._s(t.analysisResult.analysis.reasoning))])]):t._e(),t.analysisResult.analysis.key_factors&&t.analysisResult.analysis.key_factors.length>0?a("div",{staticClass:"key-factors-section"},[a("h4",[t._v(t._s(t.$t("polymarket.analysis.keyFactors")))]),t._l(t.analysisResult.analysis.key_factors,function(s,e){return a("a-tag",{key:e,staticStyle:{margin:"4px"},attrs:{color:"blue"}},[t._v(" "+t._s(s)+" ")])})],2):t._e(),t.analysisResult.credits_charged>0?a("div",{staticClass:"billing-info"},[a("a-alert",{staticStyle:{"margin-top":"16px"},attrs:{message:t.$t("polymarket.analysis.creditsCharged",{credits:t.analysisResult.credits_charged}),type:"success","show-icon":""}}),void 0!==t.analysisResult.remaining_credits?a("div",{staticStyle:{"margin-top":"8px","text-align":"right"},style:{color:t.isDarkTheme?"rgba(255,255,255,0.75)":"rgba(0,0,0,0.65)"}},[t._v(" "+t._s(t.$t("polymarket.analysis.remainingCredits",{credits:t.analysisResult.remaining_credits.toFixed(0)}))+" ")]):t._e()],1):t._e()],1),a("div",{staticClass:"result-actions"},[a("a-button",{staticStyle:{"margin-right":"8px"},on:{click:t.handleNewAnalysis}},[t._v(" "+t._s(t.$t("polymarket.analysis.newAnalysis"))+" ")]),a("a-button",{attrs:{type:"primary"},on:{click:t.handleClose}},[t._v(" "+t._s(t.$t("common.close"))+" ")])],1)]):t._e(),t.analyzing?a("div",{staticClass:"loading-section"},[a("a-spin",{attrs:{size:"large"}}),a("p",{style:{marginTop:"16px",color:t.isDarkTheme?"rgba(255,255,255,0.75)":"rgba(0,0,0,0.65)"}},[t._v(" "+t._s(t.$t("polymarket.analysis.analyzing"))+" ")])],1):t._e()]),a("a-tab-pane",{key:"history",attrs:{tab:t.$t("polymarket.analysis.tabHistory")}},[a("div",{staticClass:"history-section"},[a("a-spin",{attrs:{spinning:t.historyLoading}},[a("a-table",{attrs:{columns:t.historyColumns,"data-source":t.historyList,pagination:t.historyPagination,"row-key":function(t){return t.id},size:"small"},on:{change:t.handleHistoryTableChange},scopedSlots:t._u([{key:"market_title",fn:function(s,e){return[a("a-button",{staticStyle:{padding:"0"},attrs:{type:"link"},on:{click:function(a){return t.viewHistoryItem(e)}}},[t._v(" "+t._s(s)+" ")])]}},{key:"recommendation",fn:function(s){return[a("a-tag",{attrs:{color:t.getRecommendationColor(s)}},[t._v(" "+t._s(t.getRecommendationLabel(s))+" ")])]}},{key:"created_at",fn:function(a){return[t._v(" "+t._s(t.formatDateTime(a))+" ")]}}])})],1)],1)])],1)],1)])},m=[],h=s(75769),v="/api/polymarket";function _(t){return(0,h.Ay)({url:"".concat(v,"/analyze"),method:"post",data:t,timeout:12e4})}function k(t){return(0,h.Ay)({url:"".concat(v,"/history"),method:"get",params:t})}var g={name:"PolymarketAnalysisModal",props:{visible:{type:Boolean,default:!1}},data:function(){var t=this;return{inputText:"",analyzing:!1,analysisResult:null,activeTab:"analyze",historyLoading:!1,historyList:[],historyPagination:{current:1,pageSize:20,total:0,showSizeChanger:!0,showTotal:function(a){return t.$t("polymarket.analysis.historyTotal",{total:a})}},historyColumns:[]}},computed:(0,l.A)((0,l.A)({},(0,c.aH)({navTheme:function(t){return t.app.theme}})),{},{isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme}}),methods:{handleAnalyze:function(){var t=this;this.inputText.trim()?(this.analyzing=!0,this.analysisResult=null,_({input:this.inputText.trim(),language:this.$i18n.locale||"zh-CN"}).then(function(a){1===a.code?(t.analysisResult=a.data,t.$message.success(t.$t("polymarket.analysis.success"))):"Insufficient credits"===a.msg?(t.$message.error(t.$t("polymarket.analysis.insufficientCredits")),t.$router.push("/billing")):t.$message.error(a.msg||t.$t("polymarket.analysis.failed"))}).catch(function(a){a.response&&a.response.data&&"Insufficient credits"===a.response.data.msg?(t.$message.error(t.$t("polymarket.analysis.insufficientCredits")),t.$router.push("/billing")):t.$message.error(t.$t("polymarket.analysis.failed"))}).finally(function(){t.analyzing=!1})):this.$message.warning(this.$t("polymarket.analysis.inputRequired"))},handleNewAnalysis:function(){this.inputText="",this.analysisResult=null},handleClose:function(){var t=this;this.$emit("close"),setTimeout(function(){t.inputText="",t.analysisResult=null,t.analyzing=!1},300)},getStatusColor:function(t){var a={active:"green",closed:"default",resolved:"blue"};return a[t]||"default"},getRecommendationColor:function(t){var a={YES:"green",NO:"red",HOLD:"orange"};return a[t]||"default"},getRecommendationLabel:function(t){var a={YES:this.$t("polymarket.analysis.recommendationYes"),NO:this.$t("polymarket.analysis.recommendationNo"),HOLD:this.$t("polymarket.analysis.recommendationHold")};return a[t]||t},getDivergenceClass:function(t){return t>5?"divergence-positive":t<-5?"divergence-negative":"divergence-neutral"},formatVolume:function(t){return t>=1e6?"$".concat((t/1e6).toFixed(2),"M"):t>=1e3?"$".concat((t/1e3).toFixed(2),"K"):"$".concat(t.toFixed(2))},handleTabChange:function(t){this.activeTab=t,"history"===t&&0===this.historyList.length&&this.loadHistory()},loadHistory:function(){var t=this;return(0,r.A)((0,n.A)().m(function a(){var s;return(0,n.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return t.historyLoading=!0,a.p=1,a.n=2,k({page:t.historyPagination.current,page_size:t.historyPagination.pageSize});case 2:s=a.v,1===s.code&&s.data&&(t.historyList=s.data.items||[],t.historyPagination.total=s.data.total||0),a.n=4;break;case 3:a.p=3,a.v,t.$message.error(t.$t("polymarket.analysis.loadHistoryFailed"));case 4:return a.p=4,t.historyLoading=!1,a.f(4);case 5:return a.a(2)}},a,null,[[1,3,4,5]])}))()},handleHistoryTableChange:function(t){this.historyPagination.current=t.current,this.historyPagination.pageSize=t.pageSize,this.loadHistory()},viewHistoryItem:function(t){this.activeTab="analyze",this.analysisResult={market:{question:t.market_title,market_id:t.market_id,polymarket_url:t.market_url,current_probability:t.market_probability,status:"active"},analysis:{ai_predicted_probability:t.ai_predicted_probability,market_probability:t.market_probability,recommendation:t.recommendation,opportunity_score:t.opportunity_score,confidence_score:t.confidence_score}}},formatDateTime:function(t){if(!t)return"";var a=new Date(t);return a.toLocaleString("zh-CN"===this.$i18n.locale?"zh-CN":"en-US")}},mounted:function(){this.historyColumns=[{title:this.$t("polymarket.analysis.historyMarket"),dataIndex:"market_title",key:"market_title",scopedSlots:{customRender:"market_title"}},{title:this.$t("polymarket.analysis.historyRecommendation"),dataIndex:"recommendation",key:"recommendation",width:120,scopedSlots:{customRender:"recommendation"}},{title:this.$t("polymarket.analysis.historyOpportunityScore"),dataIndex:"opportunity_score",key:"opportunity_score",width:120,align:"right"},{title:this.$t("polymarket.analysis.historyCreatedAt"),dataIndex:"created_at",key:"created_at",width:180,scopedSlots:{customRender:"created_at"}}]}},b=g,f=s(845),C=(0,f.A)(b,p,m,!1,null,"67e891d2",null),$=C.exports,S={name:"AIAssetAnalysis",components:{AnalysisView:u["default"],QuickTradePanel:y.A,PolymarketAnalysisModal:$},data:function(){return{activeTab:"quick",opportunities:[],oppLoading:!1,oppHover:!1,presetSymbol:"",autoAnalyzeSignal:0,showQuickTrade:!1,qtSymbol:"",qtSide:"",qtPrice:0,qtSource:"ai_radar",currentAnalysisSymbol:"",currentAnalysisMarket:"",showPolymarketModal:!1}},computed:(0,l.A)((0,l.A)({},(0,c.aH)({navTheme:function(t){return t.app.theme}})),{},{isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},carouselItems:function(){return 0===this.opportunities.length?[]:[].concat((0,o.A)(this.opportunities),(0,o.A)(this.opportunities))},oppTrackStyle:function(){var t=3*this.opportunities.length;return{animationDuration:t+"s"}}}),created:function(){this.loadOpportunities()},methods:{loadOpportunities:function(){var t=arguments,a=this;return(0,r.A)((0,n.A)().m(function s(){var e,i,r;return(0,n.A)().w(function(s){while(1)switch(s.p=s.n){case 0:return e=t.length>0&&void 0!==t[0]&&t[0],a.oppLoading=!0,s.p=1,i=e?{force:!0}:{},s.n=2,(0,d.r9)(i);case 2:r=s.v,r&&1===r.code&&Array.isArray(r.data)&&(a.opportunities=r.data.slice(0,20)),s.n=4;break;case 3:s.p=3,s.v;case 4:return s.p=4,a.oppLoading=!1,s.f(4);case 5:return s.a(2)}},s,null,[[1,3,4,5]])}))()},getSignalColor:function(t){var a={overbought:"volcano",oversold:"green",bullish_momentum:"cyan",bearish_momentum:"red"};return a[t]||"default"},getSignalLabel:function(t){var a="aiAssetAnalysis.opportunities.signal.".concat(t),s=this.$t(a);return s!==a?s:t},getMarketTagColor:function(t){var a={Crypto:"purple",USStock:"green",Forex:"gold",PredictionMarket:"cyan"};return a[t]||"default"},getMarketLabel:function(t){var a="aiAssetAnalysis.opportunities.market.".concat(t),s=this.$t(a);return s!==a?s:t},getReasonText:function(t){var a=(t.market||"Crypto").toLowerCase(),s=t.signal||"",e="aiAssetAnalysis.opportunities.reason.".concat(a,".").concat(s),i=this.$t(e);if(i===e)return t.reason||"";var n=Math.abs(t.change_24h||0).toFixed(1),r=Math.abs(t.change_7d||0).toFixed(1);return i.replace("{change}",n).replace("{change7d}",r)},formatOppPrice:function(t){return t?t>=1e4?(t/1e3).toFixed(1)+"K":t>=1?t.toFixed(2):t.toFixed(4):"--"},analyzeOpportunity:function(t){var a=this;if("PredictionMarket"===t.market)return this.activeTab="polymarket",void(this.showPolymarketModal=!0);this.activeTab="quick";var s=t.market||"Crypto";this.presetSymbol="".concat(s,":").concat(t.symbol),this.$nextTick(function(){a.autoAnalyzeSignal++})},getRecommendationColor:function(t){var a={YES:"green",NO:"red",HOLD:"default"};return a[t]||"default"},getRecommendationLabel:function(t){return this.$t("polymarket.recommendation.".concat(t))||t},onAnalysisSymbolChange:function(t){if(!t)return this.currentAnalysisSymbol="",void(this.currentAnalysisMarket="");var a=t.split(":"),s=a.length>1?a[0]:"Crypto",e=a.length>1?a[1]:a[0];this.currentAnalysisMarket=s,this.currentAnalysisSymbol="Crypto"===s?e:""},openQuickTradeFromCurrent:function(){this.currentAnalysisSymbol&&(this.qtSymbol=this.currentAnalysisSymbol,this.qtSide="",this.qtPrice=0,this.qtSource="ai_analysis",this.showQuickTrade=!0)},openQuickTradeFromOpp:function(t){if("Crypto"===t.market){this.qtSymbol=t.symbol||"";var a=(t.signal||"").toLowerCase();a.includes("oversold")||a.includes("bullish")?this.qtSide="buy":a.includes("overbought")||a.includes("bearish")?this.qtSide="sell":this.qtSide="",this.qtPrice=t.price||0,this.qtSource="ai_radar",this.showQuickTrade=!0}},onQuickTradeSuccess:function(){this.$message.success(this.$t("quickTrade.orderSuccess"))},handleQuickTradeSymbolChange:function(t){t&&(this.qtSymbol=t)}}},T=S,A=(0,f.A)(T,e,i,!1,null,"0d0a10d6",null),R=A.exports}}]); \ No newline at end of file diff --git a/frontend/dist/js/194.8925812b.js b/frontend/dist/js/194.8925812b.js new file mode 100644 index 0000000..6772ad4 --- /dev/null +++ b/frontend/dist/js/194.8925812b.js @@ -0,0 +1 @@ +"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[194],{37194:function(t,e,a){a.r(e),a.d(e,{default:function(){return B}});var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"backtest-center",class:{"theme-dark":t.isDarkTheme}},[e("div",{staticClass:"page-header"},[e("h2",{staticClass:"page-title"},[e("a-icon",{staticClass:"title-icon",attrs:{type:"experiment"}}),t._v(" "+t._s(t.$t("backtest-center.title"))+" ")],1),e("p",{staticClass:"page-subtitle"},[t._v(t._s(t.$t("backtest-center.subtitle")))])]),e("a-tabs",{staticClass:"main-tabs",model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[e("a-tab-pane",{key:"indicator",attrs:{tab:t.$t("backtest-center.tabs.indicator")}},[e("a-row",{staticClass:"workspace",attrs:{gutter:20}},[e("a-col",{staticClass:"config-col",attrs:{xs:24,md:9,lg:8}},[e("div",{staticClass:"config-panel"},[e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.indicator.selectIndicator")))]),e("a-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("backtest-center.indicator.selectIndicatorPlaceholder"),loading:t.loadingIndicators,"allow-clear":"","show-search":"","option-filter-prop":"children"},on:{change:t.onIndicatorChange},model:{value:t.selectedIndicatorId,callback:function(e){t.selectedIndicatorId=e},expression:"selectedIndicatorId"}},t._l(t.indicators,function(a){return e("a-select-option",{key:a.id,attrs:{value:a.id}},[t._v(t._s(a.name||"Indicator #"+a.id))])}),1)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.config.symbol")))]),e("a-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("backtest-center.config.watchlistPlaceholder"),"show-search":"","allow-clear":"","filter-option":t.filterWatchlistOption},on:{change:t.handleWatchlistChange},model:{value:t.selectedWatchlistKey,callback:function(e){t.selectedWatchlistKey=e},expression:"selectedWatchlistKey"}},[t._l(t.watchlist,function(a){return e("a-select-option",{key:"".concat(a.market,":").concat(a.symbol),attrs:{value:"".concat(a.market,":").concat(a.symbol)}},[e("a-tag",{attrs:{color:t.getMarketColor(a.market),size:"small"}},[t._v(t._s(a.market))]),e("strong",{staticStyle:{"margin-left":"4px"}},[t._v(t._s(a.symbol))]),a.name?e("span",{staticStyle:{color:"#999","margin-left":"4px","font-size":"12px"}},[t._v(t._s(a.name))]):t._e()],1)}),e("a-select-option",{key:"__add__",staticClass:"add-option",attrs:{value:"__add__"}},[e("div",{staticStyle:{"text-align":"center",color:"#1890ff"}},[e("a-icon",{attrs:{type:"plus"}}),t._v(" "+t._s(t.$t("backtest-center.config.addSymbol"))+" ")],1)])],2)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(" "+t._s(t.$t("backtest-center.config.timeframe"))+" "),e("span",{staticClass:"hint"},[t._v(t._s(t.tfLimitHint))])]),e("a-radio-group",{staticClass:"tf-group",attrs:{"button-style":"solid",size:"small"},on:{change:t.onTimeframeChange},model:{value:t.timeframe,callback:function(e){t.timeframe=e},expression:"timeframe"}},[e("a-radio-button",{attrs:{value:"1m"}},[t._v("1m")]),e("a-radio-button",{attrs:{value:"5m"}},[t._v("5m")]),e("a-radio-button",{attrs:{value:"15m"}},[t._v("15m")]),e("a-radio-button",{attrs:{value:"1H"}},[t._v("1H")]),e("a-radio-button",{attrs:{value:"4H"}},[t._v("4H")]),e("a-radio-button",{attrs:{value:"1D"}},[t._v("1D")]),e("a-radio-button",{attrs:{value:"1W"}},[t._v("1W")])],1)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.config.dateRange")))]),e("div",{staticClass:"date-presets"},t._l(t.filteredDatePresets,function(a){return e("a-button",{key:a.key,attrs:{size:"small",type:t.datePreset===a.key?"primary":"default"},on:{click:function(e){return t.applyDatePreset(a)}}},[t._v(t._s(a.label))])}),1),e("a-row",{staticStyle:{"margin-top":"8px"},attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("a-date-picker",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("backtest-center.config.startDate"),size:"small"},model:{value:t.startDate,callback:function(e){t.startDate=e},expression:"startDate"}})],1),e("a-col",{attrs:{span:12}},[e("a-date-picker",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("backtest-center.config.endDate"),size:"small"},model:{value:t.endDate,callback:function(e){t.endDate=e},expression:"endDate"}})],1)],1)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.config.capital")))]),e("a-row",{attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.initialCapital")))]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:1e3,step:1e4,precision:2,size:"small",formatter:function(t){return"$ ".concat(t).replace(/\B(?=(\d{3})+(?!\d))/g,",")},parser:function(t){return t.replace(/\$\s?|(,*)/g,"")}},model:{value:t.initialCapital,callback:function(e){t.initialCapital=e},expression:"initialCapital"}})],1),e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.leverage")))]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:1,max:125,step:1,precision:0,size:"small",formatter:function(t){return"".concat(t,"x")},parser:function(t){return t.replace("x","")}},model:{value:t.leverage,callback:function(e){t.leverage=e},expression:"leverage"}})],1)],1),e("a-row",{staticStyle:{"margin-top":"8px"},attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.commission"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:10,step:.01,precision:4,size:"small"},model:{value:t.commission,callback:function(e){t.commission=e},expression:"commission"}})],1),e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.slippage"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:10,step:.01,precision:4,size:"small"},model:{value:t.slippage,callback:function(e){t.slippage=e},expression:"slippage"}})],1)],1),e("div",{staticClass:"section",staticStyle:{"margin-top":"8px"}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.signalTiming")))]),e("div",{staticClass:"field-hint",staticStyle:{"margin-bottom":"6px","font-size":"12px",color:"#888"}},[t._v(" "+t._s(t.$t("backtest-center.config.signalTimingHelp"))+" ")]),e("a-radio-group",{attrs:{size:"small","button-style":"solid"},model:{value:t.signalTiming,callback:function(e){t.signalTiming=e},expression:"signalTiming"}},[e("a-radio-button",{attrs:{value:"next_bar_open"}},[t._v(t._s(t.$t("backtest-center.config.signalTimingNext")))]),e("a-radio-button",{attrs:{value:"same_bar_close"}},[t._v(t._s(t.$t("backtest-center.config.signalTimingSame")))])],1)],1)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.config.direction")))]),e("a-radio-group",{attrs:{size:"small","button-style":"solid"},model:{value:t.tradeDirection,callback:function(e){t.tradeDirection=e},expression:"tradeDirection"}},[e("a-radio-button",{attrs:{value:"long"}},[t._v(t._s(t.$t("backtest-center.config.long")))]),e("a-radio-button",{attrs:{value:"short"}},[t._v(t._s(t.$t("backtest-center.config.short")))]),e("a-radio-button",{attrs:{value:"both"}},[t._v(t._s(t.$t("backtest-center.config.both")))])],1)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.config.riskPanel")))]),e("a-row",{attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.stopLoss"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:100,step:.5,precision:2,size:"small"},model:{value:t.stopLossPct,callback:function(e){t.stopLossPct=e},expression:"stopLossPct"}})],1),e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.takeProfit"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:1e3,step:.5,precision:2,size:"small"},model:{value:t.takeProfitPct,callback:function(e){t.takeProfitPct=e},expression:"takeProfitPct"}})],1)],1),e("a-row",{staticStyle:{"margin-top":"8px"},attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.entryPct"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:100,step:5,precision:2,size:"small"},model:{value:t.entryPct,callback:function(e){t.entryPct=e},expression:"entryPct"}})],1),e("a-col",{attrs:{span:12}},[e("a-checkbox",{staticStyle:{"margin-top":"18px"},model:{value:t.trailingEnabled,callback:function(e){t.trailingEnabled=e},expression:"trailingEnabled"}},[t._v(t._s(t.$t("backtest-center.config.trailing")))])],1)],1),t.trailingEnabled?[e("a-row",{staticStyle:{"margin-top":"8px"},attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.trailingPct"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:100,step:.5,precision:2,size:"small"},model:{value:t.trailingStopPct,callback:function(e){t.trailingStopPct=e},expression:"trailingStopPct"}})],1),e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.trailingActivation"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:1e3,step:.5,precision:2,size:"small"},model:{value:t.trailingActivationPct,callback:function(e){t.trailingActivationPct=e},expression:"trailingActivationPct"}})],1)],1)]:t._e()],2),e("div",{staticClass:"run-section"},[e("a-button",{attrs:{type:"primary",block:"",size:"large",loading:t.running,disabled:!t.canRunIndicator},on:{click:t.runIndicatorBacktest}},[t.running?t._e():e("a-icon",{attrs:{type:"thunderbolt"}}),t._v(" "+t._s(t.running?t.$t("backtest-center.running"):t.$t("backtest-center.indicator.runBacktest"))+" ")],1),e("a-button",{staticStyle:{"margin-top":"8px"},attrs:{block:"",disabled:!t.selectedIndicatorId},on:{click:function(e){return t.openHistory("indicator")}}},[e("a-icon",{attrs:{type:"history"}}),t._v(" "+t._s(t.$t("backtest-center.indicator.history"))+" ")],1)],1)])]),e("a-col",{staticClass:"result-col",attrs:{xs:24,md:15,lg:16}},[e("div",{staticClass:"result-panel"},[e("result-view",{attrs:{running:t.running,"run-tip":t.runTip,"has-result":t.hasResult,result:t.result,"user-id":t.userId,backtestRunId:t.backtestRunId,symbol:t.symbol,market:t.market,timeframe:t.timeframe,"is-dark":t.isDarkTheme}})],1)])],1)],1),e("a-tab-pane",{key:"strategy",attrs:{tab:t.$t("backtest-center.tabs.strategy")}},[e("a-row",{staticClass:"workspace",attrs:{gutter:20}},[e("a-col",{staticClass:"config-col",attrs:{xs:24,md:9,lg:8}},[e("div",{staticClass:"config-panel"},[e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.strategy.selectStrategy")))]),e("a-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("backtest-center.strategy.selectStrategyPlaceholder"),loading:t.loadingStrategies,"allow-clear":"","show-search":"","option-filter-prop":"children"},on:{change:t.onStrategyChange},model:{value:t.selectedStrategyId,callback:function(e){t.selectedStrategyId=e},expression:"selectedStrategyId"}},t._l(t.strategies,function(a){return e("a-select-option",{key:a.id,attrs:{value:a.id}},[t._v(t._s(a.strategy_name||"Strategy #"+a.id))])}),1),t.selectedStrategyObj?e("div",{staticClass:"strategy-summary-card"},[e("div",{staticClass:"strategy-summary-head"},[e("div",{staticClass:"strategy-summary-title"},[t._v(t._s(t.selectedStrategyObj.strategy_name||"Strategy #"+t.selectedStrategyObj.id))]),e("a-tag",{attrs:{size:"small",color:t.strategyTypeColor(t.selectedStrategyObj)}},[t._v(t._s(t.strategyTypeLabel(t.selectedStrategyObj)))])],1),e("div",{staticClass:"strategy-summary-meta"},[t.selectedStrategyObj.market_category?e("a-tag",{attrs:{size:"small"}},[t._v(t._s(t.selectedStrategyObj.market_category))]):t._e(),t.selectedStrategyObj.symbol?e("a-tag",{attrs:{size:"small"}},[t._v(t._s(t.selectedStrategyObj.symbol))]):t._e(),t.selectedStrategyObj.timeframe?e("a-tag",{attrs:{size:"small"}},[t._v(t._s(t.selectedStrategyObj.timeframe))]):t._e()],1),e("div",{staticClass:"strategy-summary-text"},[t._v(t._s(t.strategySummaryText(t.selectedStrategyObj)))]),e("a-button",{staticStyle:{"padding-left":"0"},attrs:{type:"link",size:"small"},on:{click:function(e){return t.goToStrategyEditor(t.selectedStrategyObj)}}},[t._v(" "+t._s(t.$t("backtest-center.strategy.goToAssistant"))+" ")])],1):t._e()],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.config.symbol")))]),e("a-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("backtest-center.config.watchlistPlaceholder"),"show-search":"","allow-clear":"","filter-option":t.filterWatchlistOption},on:{change:t.handleStWatchlistChange},model:{value:t.stSelectedWatchlistKey,callback:function(e){t.stSelectedWatchlistKey=e},expression:"stSelectedWatchlistKey"}},[t._l(t.watchlist,function(a){return e("a-select-option",{key:"".concat(a.market,":").concat(a.symbol),attrs:{value:"".concat(a.market,":").concat(a.symbol)}},[e("a-tag",{attrs:{color:t.getMarketColor(a.market),size:"small"}},[t._v(t._s(a.market))]),e("strong",{staticStyle:{"margin-left":"4px"}},[t._v(t._s(a.symbol))]),a.name?e("span",{staticStyle:{color:"#999","margin-left":"4px","font-size":"12px"}},[t._v(t._s(a.name))]):t._e()],1)}),e("a-select-option",{key:"__add__",staticClass:"add-option",attrs:{value:"__add__"}},[e("div",{staticStyle:{"text-align":"center",color:"#1890ff"}},[e("a-icon",{attrs:{type:"plus"}}),t._v(" "+t._s(t.$t("backtest-center.config.addSymbol"))+" ")],1)])],2)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(" "+t._s(t.$t("backtest-center.config.timeframe"))+" "),e("span",{staticClass:"hint"},[t._v(t._s(t.stTfLimitHint))])]),e("a-radio-group",{staticClass:"tf-group",attrs:{"button-style":"solid",size:"small"},on:{change:t.onStTimeframeChange},model:{value:t.stTimeframe,callback:function(e){t.stTimeframe=e},expression:"stTimeframe"}},[e("a-radio-button",{attrs:{value:"1m"}},[t._v("1m")]),e("a-radio-button",{attrs:{value:"5m"}},[t._v("5m")]),e("a-radio-button",{attrs:{value:"15m"}},[t._v("15m")]),e("a-radio-button",{attrs:{value:"1H"}},[t._v("1H")]),e("a-radio-button",{attrs:{value:"4H"}},[t._v("4H")]),e("a-radio-button",{attrs:{value:"1D"}},[t._v("1D")]),e("a-radio-button",{attrs:{value:"1W"}},[t._v("1W")])],1)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.config.dateRange")))]),e("div",{staticClass:"date-presets"},t._l(t.stFilteredDatePresets,function(a){return e("a-button",{key:"st-"+a.key,attrs:{size:"small",type:t.stDatePreset===a.key?"primary":"default"},on:{click:function(e){return t.applyStDatePreset(a)}}},[t._v(t._s(a.label))])}),1),e("a-row",{staticStyle:{"margin-top":"8px"},attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("a-date-picker",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("backtest-center.config.startDate"),size:"small"},model:{value:t.stStartDate,callback:function(e){t.stStartDate=e},expression:"stStartDate"}})],1),e("a-col",{attrs:{span:12}},[e("a-date-picker",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("backtest-center.config.endDate"),size:"small"},model:{value:t.stEndDate,callback:function(e){t.stEndDate=e},expression:"stEndDate"}})],1)],1)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.config.capital")))]),e("a-row",{attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.initialCapital")))]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:1e3,step:1e4,precision:2,size:"small",formatter:function(t){return"$ ".concat(t).replace(/\B(?=(\d{3})+(?!\d))/g,",")},parser:function(t){return t.replace(/\$\s?|(,*)/g,"")}},model:{value:t.stInitialCapital,callback:function(e){t.stInitialCapital=e},expression:"stInitialCapital"}})],1),e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.leverage")))]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:1,max:125,step:1,precision:0,size:"small",formatter:function(t){return"".concat(t,"x")},parser:function(t){return t.replace("x","")}},model:{value:t.stLeverage,callback:function(e){t.stLeverage=e},expression:"stLeverage"}})],1)],1),e("a-row",{staticStyle:{"margin-top":"8px"},attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.commission"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:10,step:.01,precision:4,size:"small"},model:{value:t.stCommission,callback:function(e){t.stCommission=e},expression:"stCommission"}})],1),e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.slippage"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:10,step:.01,precision:4,size:"small"},model:{value:t.stSlippage,callback:function(e){t.stSlippage=e},expression:"stSlippage"}})],1)],1)],1),e("div",{staticClass:"run-section"},[e("a-button",{attrs:{type:"primary",block:"",size:"large",loading:t.stRunning,disabled:!t.canRunStrategy},on:{click:t.runStrategyBacktest}},[t.stRunning?t._e():e("a-icon",{attrs:{type:"thunderbolt"}}),t._v(" "+t._s(t.stRunning?t.$t("backtest-center.strategy.running"):t.$t("backtest-center.strategy.runBacktest"))+" ")],1),e("a-button",{staticStyle:{"margin-top":"8px"},attrs:{block:"",disabled:!t.selectedStrategyId},on:{click:function(e){return t.openHistory("strategy")}}},[e("a-icon",{attrs:{type:"history"}}),t._v(" "+t._s(t.$t("backtest-center.strategy.history"))+" ")],1)],1)])]),e("a-col",{staticClass:"result-col",attrs:{xs:24,md:15,lg:16}},[e("div",{staticClass:"result-panel"},[e("result-view",{attrs:{running:t.stRunning,"run-tip":t.stRunTip,"has-result":t.stHasResult,result:t.stResult,"user-id":t.userId,backtestRunId:t.stBacktestRunId,symbol:t.stSymbol,market:t.stMarket,timeframe:t.stTimeframe,"is-dark":t.isDarkTheme}})],1)])],1)],1)],1),e("a-modal",{attrs:{title:t.$t("dashboard.analysis.modal.addStock.title"),visible:t.showAddModal,confirmLoading:t.addingStock,width:"560px","wrap-class-name":t.isDarkTheme?"bc-modal-wrap bc-modal-wrap--dark":"bc-modal-wrap"},on:{ok:t.handleAddStock,cancel:function(e){t.showAddModal=!1}}},[e("a-tabs",{attrs:{size:"small"},on:{change:t.onAddMarketTabChange},model:{value:t.addMarketTab,callback:function(e){t.addMarketTab=e},expression:"addMarketTab"}},[e("a-tab-pane",{key:"Crypto",attrs:{tab:"Crypto"}}),e("a-tab-pane",{key:"USStock",attrs:{tab:"US Stock"}}),e("a-tab-pane",{key:"HKStock",attrs:{tab:"HK Stock"}}),e("a-tab-pane",{key:"Forex",attrs:{tab:"Forex"}}),e("a-tab-pane",{key:"Futures",attrs:{tab:"Futures"}})],1),e("a-input-search",{staticStyle:{margin:"12px 0"},attrs:{placeholder:t.$t("backtest-center.config.symbolPlaceholder"),loading:t.addSearching,size:"large","allow-clear":""},on:{search:t.doAddSearch,change:t.onAddSearchInput},model:{value:t.addSearchKeyword,callback:function(e){t.addSearchKeyword=e},expression:"addSearchKeyword"}}),t.addSearchResults.length>0?e("a-list",{staticStyle:{"max-height":"240px","overflow-y":"auto"},attrs:{size:"small","data-source":t.addSearchResults},scopedSlots:t._u([{key:"renderItem",fn:function(a){return e("a-list-item",{class:{"add-item-active":t.addSelectedItem&&t.addSelectedItem.symbol===a.symbol},staticStyle:{cursor:"pointer"},on:{click:function(e){t.addSelectedItem=a}}},[e("strong",[t._v(t._s(a.symbol))]),a.name?e("span",{staticStyle:{color:"#999","margin-left":"8px"}},[t._v(t._s(a.name))]):t._e(),t.addSelectedItem&&t.addSelectedItem.symbol===a.symbol?e("a-icon",{staticStyle:{color:"#52c41a","margin-left":"auto"},attrs:{type:"check-circle",theme:"filled"}}):t._e()],1)}}],null,!1,2355352582)}):t._e(),0===t.addSearchResults.length&&t.addSearchKeyword&&t.addSearched?e("div",{staticStyle:{padding:"16px 0","text-align":"center",color:"#999"}},[t._v(" "+t._s(t.$t("backtest-center.config.noSearchResult"))+" ")]):t._e()],1),e("backtest-history-drawer",{attrs:{visible:t.showHistoryDrawer,userId:t.userId,indicatorId:t.historyIndicatorId,strategyId:t.historyStrategyId,runType:t.historyRunType,isMobile:!1,isDark:t.isDarkTheme},on:{cancel:function(e){t.showHistoryDrawer=!1},view:t.handleViewRun}}),e("backtest-run-viewer",{attrs:{visible:t.showRunViewer,run:t.selectedRun,isDark:t.isDarkTheme},on:{cancel:function(e){t.showRunViewer=!1,t.selectedRun=null}}})],1)},i=[],r=a(15863),n=a(76338),o=a(81127),c=a(56252),l=a(57532),d=(a(74423),a(95093)),u=a.n(d),h=a(29362),m=a(55434),p=a(75769),g=a(505),b=a(35038),f=a(36911),y=function(){var t=this,e=t._self._c;return e("a-drawer",{staticClass:"backtest-history-drawer",attrs:{title:t.$t("dashboard.indicator.backtest.historyTitle"),visible:t.visible,width:t.isMobile?"100%":1060,maskClosable:!0,wrapClassName:t.drawerWrapClass},on:{close:function(e){return t.$emit("cancel")}}},[e("div",{staticClass:"drawer-toolbar"},[e("div",{staticClass:"toolbar-left"},[e("a-button",{attrs:{type:"primary",loading:t.loading,icon:"reload",size:"small"},on:{click:t.loadRuns}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyRefresh"))+" ")]),e("a-button",{attrs:{type:"primary",ghost:"",size:"small",disabled:0===t.selectedRowKeys.length,loading:t.analyzing},on:{click:t.handleAIAnalyze}},[e("a-icon",{attrs:{type:"bulb"}}),t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyAISuggest"))+" ")],1),t.selectedRowKeys.length?e("span",{staticClass:"selected-tip"},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historySelectedCount",{count:t.selectedRowKeys.length}))+" ")]):t._e()],1),e("div",{staticClass:"toolbar-right"},[e("a-input",{staticStyle:{width:"160px"},attrs:{size:"small","allow-clear":"",placeholder:t.$t("dashboard.indicator.backtest.historyFilterSymbol")},on:{change:t.debouncedLoad},model:{value:t.filterSymbol,callback:function(e){t.filterSymbol=e},expression:"filterSymbol"}}),e("a-select",{staticStyle:{width:"100px"},attrs:{size:"small",placeholder:t.$t("dashboard.indicator.backtest.historyFilterTimeframe"),"allow-clear":""},on:{change:t.loadRuns},model:{value:t.filterTimeframe,callback:function(e){t.filterTimeframe=e},expression:"filterTimeframe"}},t._l(t.timeframes,function(a){return e("a-select-option",{key:a,attrs:{value:a}},[t._v(t._s(a))])}),1)],1)]),e("a-table",{attrs:{columns:t.columns,"data-source":t.runs,loading:t.loading,size:"small",pagination:{pageSize:15,size:"small"},rowKey:"id",scroll:{x:1120},rowSelection:{selectedRowKeys:t.selectedRowKeys,onChange:t.onRowSelectionChange}},scopedSlots:t._u([{key:"symbol",fn:function(a,s){return[e("span",{staticStyle:{"font-weight":"600"}},[t._v(t._s(s.symbol||"-"))]),s.market?e("a-tag",{staticStyle:{"margin-left":"4px"},attrs:{size:"small"}},[t._v(t._s(s.market))]):t._e()]}},{key:"range",fn:function(a,s){return[e("span",[t._v(t._s((s.start_date||"").slice(0,10))+" ~ "+t._s((s.end_date||"").slice(0,10)))])]}},{key:"returnPct",fn:function(a){return[null!==a&&void 0!==a?e("span",{style:{color:a>=0?"#52c41a":"#f5222d",fontWeight:600}},[t._v(" "+t._s(a>=0?"+":"")+t._s(Number(a).toFixed(2))+"% ")]):e("span",[t._v("-")])]}},{key:"fillTiming",fn:function(a,s){return["same"===t.fillTimingKind(s)?e("a-tag",{attrs:{size:"small",color:"orange"}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyFillTimingSame"))+" ")]):e("a-tag",{attrs:{size:"small",color:"blue"}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyFillTimingNext"))+" ")])]}},{key:"createdAt",fn:function(a){return[e("span",[t._v(t._s(t.formatLocalDateTime(a)))])]}},{key:"status",fn:function(a){return[e("a-tag",{attrs:{color:"success"===a?"green":"failed"===a?"red":"blue"}},[t._v(" "+t._s("success"===a?t.$t("dashboard.indicator.backtest.historyStatusSuccess"):"failed"===a?t.$t("dashboard.indicator.backtest.historyStatusFailed"):a)+" ")])]}},{key:"actions",fn:function(a,s){return[e("a-button",{attrs:{type:"link",size:"small",loading:t.detailLoadingId===s.id},on:{click:function(e){return t.viewRun(s)}}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyView"))+" ")]),e("a-button",{attrs:{type:"link",size:"small",loading:t.analyzingRunId===s.id},on:{click:function(e){return t.handleAIAnalyze(s)}}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyAISuggestShort"))+" ")])]}}])}),t.loading||0!==t.runs.length?t._e():e("a-empty",{attrs:{description:t.$t("dashboard.indicator.backtest.historyNoData")}}),e("a-modal",{attrs:{title:t.$t("dashboard.indicator.backtest.historyAISuggestTitle"),visible:t.showAIResult,footer:null,width:t.isMobile?"100%":900,wrapClassName:t.aiModalWrapClass},on:{cancel:function(e){t.showAIResult=!1}}},[t.analyzing?e("div",{staticStyle:{padding:"24px 0","text-align":"center"}},[e("a-spin",{attrs:{size:"large"}}),e("div",{staticStyle:{"margin-top":"12px",color:"#999"}},[t._v(t._s(t.$t("dashboard.indicator.backtest.historyAISuggestLoading")))])],1):e("div",{staticClass:"ai-modal-content"},[e("div",{staticClass:"ai-meta-card"},[e("div",{staticClass:"ai-meta-top"},[e("div",{staticClass:"ai-meta-left"},[e("a-tag",{attrs:{color:"blue"}},[t._v(t._s(t.$t("dashboard.indicator.backtest.historyAISuggest")))]),e("a-tag",[t._v(t._s(t.aiModeLabel))]),t.lastAnalyzeRunIds.length?e("a-tag",[t._v(t._s(t.$t("dashboard.indicator.backtest.historySelectedCount",{count:t.lastAnalyzeRunIds.length})))]):t._e()],1),e("div",{staticClass:"ai-meta-actions"},[e("a-button",{attrs:{size:"small"},on:{click:t.copyAIResult}},[e("a-icon",{attrs:{type:"copy"}}),t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyAICopy"))+" ")],1),e("a-button",{attrs:{size:"small",type:"primary",ghost:"",disabled:!t.lastAnalyzeRunIds.length},on:{click:function(e){return t.handleAIAnalyze(null,t.lastAnalyzeRunIds)}}},[e("a-icon",{attrs:{type:"redo"}}),t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyAIRetry"))+" ")],1)],1)]),t.analyzeRunSummaries.length?e("div",{staticClass:"ai-run-tags"},t._l(t.analyzeRunSummaries,function(a){return e("a-tag",{key:a.id,attrs:{color:"purple"}},[t._v(" #"+t._s(a.id)+" "+t._s(a.symbol||"-")+" / "+t._s(a.timeframe||"-")+" ")])}),1):t._e(),e("a-alert",{staticStyle:{"margin-top":"12px"},attrs:{type:"info","show-icon":"",message:t.$t("dashboard.indicator.backtest.historyAIHint")}})],1),t.aiResult?e("div",{staticClass:"ai-markdown-card"},[e("div",{staticClass:"ai-markdown-content",domProps:{innerHTML:t._s(t.renderedAIHtml)}})]):e("div",{staticClass:"ai-result-content"},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyNoAIResult"))+" ")])])])],1)},v=[],k=a(2403),_={name:"BacktestHistoryDrawer",props:{visible:{type:Boolean,default:!1},userId:{type:[Number,String],default:1},indicatorId:{type:[Number,String],default:null},strategyId:{type:[Number,String],default:null},runType:{type:String,default:""},symbol:{type:String,default:""},market:{type:String,default:""},timeframe:{type:String,default:""},isMobile:{type:Boolean,default:!1},isDark:{type:Boolean,default:!1}},data:function(){return{loading:!1,detailLoadingId:null,analyzing:!1,showAIResult:!1,aiResult:"",filterSymbol:"",filterTimeframe:void 0,timeframes:["1m","5m","15m","30m","1H","4H","1D","1W"],runs:[],columns:[],selectedRowKeys:[],debounceTimer:null,analyzingRunId:null,lastAnalyzeRunIds:[],aiMode:""}},computed:{isStrategyHistory:function(){return!!this.strategyId||0===String(this.runType||"").indexOf("strategy_")},aiModeLabel:function(){return"llm"===this.aiMode?this.$t("dashboard.indicator.backtest.historyAIModeLLM"):"heuristic"===this.aiMode||"heuristic_fallback"===this.aiMode?this.$t("dashboard.indicator.backtest.historyAIModeRule"):this.$t("dashboard.indicator.backtest.historyAIModeUnknown")},analyzeRunSummaries:function(){var t=new Set((this.lastAnalyzeRunIds||[]).map(function(t){return Number(t)}));return(this.runs||[]).filter(function(e){return t.has(Number(e.id))}).slice(0,8)},renderedAIHtml:function(){return this.markdownToHtml(this.aiResult||"")},drawerWrapClass:function(){return this.isDark?"backtest-history-drawer-wrap backtest-history-drawer-wrap--dark":"backtest-history-drawer-wrap"},aiModalWrapClass:function(){return this.isDark?"backtest-history-ai-modal backtest-history-ai-modal--dark":"backtest-history-ai-modal"}},watch:{visible:function(t){t&&(this.initColumns(),this.filterSymbol="",this.filterTimeframe=void 0,this.selectedRowKeys=[],this.aiResult="",this.aiMode="",this.lastAnalyzeRunIds=[],this.showAIResult=!1,this.loadRuns())}},methods:{onRowSelectionChange:function(t){this.selectedRowKeys=t||[]},debouncedLoad:function(){var t=this;clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(function(){return t.loadRuns()},400)},fillTimingKind:function(t){var e=t&&t.strategy_config||{},a=(e.execution||{}).signalTiming;if(null==a||""===String(a).trim())return"next";var s=String(a).toLowerCase();return"same_bar_close"===s||"current_bar_close"===s||"bar_close"===s||"close"===s?"same":"next"},initColumns:function(){var t=[{title:"#",dataIndex:"id",key:"id",width:60}].concat((0,k.A)(this.isStrategyHistory?[{title:this.$t("backtest-center.strategy.selectStrategy")||"Strategy",dataIndex:"strategy_name",key:"strategy_name",width:180}]:[]),[{title:this.$t("dashboard.indicator.backtest.historySymbol")||"Symbol",key:"symbol",width:150,scopedSlots:{customRender:"symbol"}},{title:this.$t("dashboard.indicator.backtest.timeframe")||"TF",dataIndex:"timeframe",key:"timeframe",width:70},{title:this.$t("dashboard.indicator.backtest.historyFillTimingCol"),key:"fillTiming",width:96,scopedSlots:{customRender:"fillTiming"}},{title:this.$t("dashboard.indicator.backtest.historyRange"),key:"range",width:180,scopedSlots:{customRender:"range"}},{title:this.$t("dashboard.indicator.backtest.tradeDirection"),dataIndex:"trade_direction",key:"trade_direction",width:80},{title:this.$t("dashboard.indicator.backtest.leverage"),dataIndex:"leverage",key:"leverage",width:60},{title:this.$t("dashboard.indicator.backtest.totalReturn")||"Return",dataIndex:"total_return",key:"total_return",width:100,scopedSlots:{customRender:"returnPct"}},{title:this.$t("dashboard.indicator.backtest.historyStatus"),dataIndex:"status",key:"status",width:80,scopedSlots:{customRender:"status"}},{title:this.$t("dashboard.indicator.backtest.historyCreatedAt"),dataIndex:"created_at",key:"created_at",width:180,scopedSlots:{customRender:"createdAt"}},{title:"",key:"actions",width:180,scopedSlots:{customRender:"actions"}}]);this.columns=t},formatLocalDateTime:function(t){var e=this.parseDateTimeToLocal(t);return e?e.format("YYYY-MM-DD HH:mm:ss"):"-"},parseDateTimeToLocal:function(t){if(!t&&0!==t)return null;if(u().isMoment(t))return t.clone();if("number"===typeof t)return String(t).length<=10?u().unix(t):u()(t);var e=String(t).trim();if(!e)return null;if(/^\d+$/.test(e)){var a=Number(e);return e.length<=10?u().unix(a):u()(a)}if(/[zZ]|[-+]\d{2}:\d{2}$/.test(e)){var s=u()(e);return s.isValid()?s.local():null}if(/^\d{4}-\d{2}-\d{2}[ T]\d{2}:\d{2}(:\d{2})?$/.test(e)){var i=u().utc(e,["YYYY-MM-DD HH:mm:ss","YYYY-MM-DD HH:mm","YYYY-MM-DDTHH:mm:ss",u().ISO_8601],!0);return i.isValid()?i.local():null}var r=u()(e);return r.isValid()?r:null},copyAIResult:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.aiResult){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,navigator.clipboard.writeText(t.aiResult);case 2:t.$message.success(t.$t("dashboard.indicator.backtest.historyAICopySuccess")),e.n=4;break;case 3:e.p=3,e.v,t.$message.warning(t.$t("dashboard.indicator.backtest.historyAICopyFailed"));case 4:return e.a(2)}},e,null,[[1,3]])}))()},escapeHtml:function(t){return String(t||"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},formatInlineMarkdown:function(t){var e=this.escapeHtml(t);return e=e.replace(/`([^`]+)`/g,"$1"),e=e.replace(/\*\*([^*]+)\*\*/g,"$1"),e=e.replace(/__([^_]+)__/g,"$1"),e=e.replace(/\*([^*]+)\*/g,"$1"),e=e.replace(/_([^_]+)_/g,"$1"),e},markdownToHtml:function(t){var e=String(t||"").replace(/\r\n/g,"\n").trim();if(!e)return"";var a,s=e.split("\n"),i=[],r=!1,n=!1,o=!1,c=[],d=function(){r&&(i.push(""),r=!1),n&&(i.push(""),n=!1)},u=(0,l.A)(s);try{for(u.s();!(a=u.n()).done;){var h=a.value,m=h.trimRight(),p=m.trim();p.startsWith("```")?(d(),o?(i.push("
".concat(this.escapeHtml(c.join("\n")),"
")),o=!1,c=[]):(o=!0,c=[])):o?c.push(h):p?/^###\s+/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^###\s+/,"")),"

"))):/^##\s+/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^##\s+/,"")),"

"))):/^#\s+/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^#\s+/,"")),"

"))):/^【.+】$/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^【|】$/g,"")),"

"))):/^>\s+/.test(p)?(d(),i.push("
".concat(this.formatInlineMarkdown(p.replace(/^>\s+/,"")),"
"))):/^[-*]\s+/.test(p)?(n&&(i.push(""),n=!1),r||(i.push(""),r=!1),n||(i.push("
    "),n=!0),i.push("
  1. ".concat(this.formatInlineMarkdown(p.replace(/^\d+\.\s+/,"")),"
  2. "))):(d(),i.push("

    ".concat(this.formatInlineMarkdown(p),"

    "))):d()}}catch(g){u.e(g)}finally{u.f()}return d(),o&&i.push("
    ".concat(this.escapeHtml(c.join("\n")),"
    ")),i.join("")},loadRuns:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a,s;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.userId){e.n=1;break}return e.a(2);case 1:return t.loading=!0,e.p=2,a={userid:t.userId,limit:200,offset:0},t.indicatorId&&(a.indicatorId=t.indicatorId),t.strategyId&&(a.strategyId=t.strategyId),t.runType&&(a.runType=t.runType),t.filterSymbol&&(a.symbol=t.filterSymbol),t.filterTimeframe&&(a.timeframe=t.filterTimeframe),e.n=3,(0,p.Ay)({url:t.isStrategyHistory?"/api/strategies/backtest/history":"/api/indicator/backtest/history",method:"get",params:a});case 3:s=e.v,s&&1===s.code&&Array.isArray(s.data)?t.runs=s.data:t.runs=[];case 4:return e.p=4,t.loading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[2,,4,5]])}))()},viewRun:function(t){var e=this;return(0,c.A)((0,o.A)().m(function a(){var s;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:if(t&&t.id){a.n=1;break}return a.a(2);case 1:return e.detailLoadingId=t.id,a.p=2,a.n=3,(0,p.Ay)({url:e.isStrategyHistory?"/api/strategies/backtest/get":"/api/indicator/backtest/get",method:"get",params:{userid:e.userId,runId:t.id}});case 3:s=a.v,s&&1===s.code&&s.data&&e.$emit("view",s.data);case 4:return a.p=4,e.detailLoadingId=null,a.f(4);case 5:return a.a(2)}},a,null,[[2,,4,5]])}))()},handleAIAnalyze:function(){var t=arguments,e=this;return(0,c.A)((0,o.A)().m(function a(){var s,i,r,n,c,l;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:if(s=t.length>0&&void 0!==t[0]?t[0]:null,i=t.length>1&&void 0!==t[1]?t[1]:null,r=i||(s&&s.id?[s.id]:e.selectedRowKeys),e.userId){a.n=1;break}return a.a(2);case 1:if(r&&r.length){a.n=2;break}return e.$message.warning(e.$t("dashboard.indicator.backtest.historyAISelectPrompt")),a.a(2);case 2:return e.analyzing=!0,e.analyzingRunId=s&&s.id?s.id:null,e.lastAnalyzeRunIds=(0,k.A)(r),e.showAIResult=!0,e.aiResult="",e.aiMode="",a.p=3,n=e.$i18n&&e.$i18n.locale?e.$i18n.locale:"zh-CN",a.n=4,(0,p.Ay)({url:"/api/indicator/backtest/aiAnalyze",method:"post",timeout:p.v0,data:{userid:e.userId,runIds:r,lang:n}});case 4:c=a.v,c&&1===c.code&&c.data&&c.data.analysis?(e.aiResult=c.data.analysis,e.aiMode=c.data.mode||""):e.aiResult=c.msg||e.$t("dashboard.indicator.backtest.historyNoAIResult"),a.n=6;break;case 5:a.p=5,l=a.v,e.aiResult=l&&l.message||e.$t("dashboard.indicator.backtest.historyAIFailed");case 6:return a.p=6,e.analyzing=!1,e.analyzingRunId=null,a.f(6);case 7:return a.a(2)}},a,null,[[3,5,6,7]])}))()}}},S=_,w=a(845),$=(0,w.A)(S,y,v,!1,null,"9c4d8af2",null),I=$.exports,C=function(){var t,e,a,s=this,i=s._self._c;return i("a-modal",{staticClass:"backtest-run-viewer",attrs:{title:s.modalTitle,visible:s.visible,width:1100,maskClosable:!1,wrapClassName:s.modalWrapClass},on:{cancel:function(t){return s.$emit("cancel")}}},[s.run&&s.run.result?i("div",[s.run.id?i("a-alert",{staticStyle:{"margin-bottom":"12px"},attrs:{type:"info","show-icon":"",message:s.$t("dashboard.indicator.backtest.savedRunId",{id:s.run.id})}}):s._e(),i("backtest-execution-assumptions-alert",{attrs:{assumptions:s.result.executionAssumptions,"strategy-config":s.run.strategy_config,timeframe:s.run.timeframe||""}}),i("div",{staticClass:"metrics-cards"},[i("div",{staticClass:"metric-card",class:{positive:s.result.totalReturn>0,negative:s.result.totalReturn<0}},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.totalReturn")))]),i("div",{staticClass:"metric-value"},[s._v(s._s(s.formatPercent(s.result.totalReturn)))]),i("div",{staticClass:"metric-amount"},[s._v(s._s(s.formatMoney(s.result.totalProfit)))])]),i("div",{staticClass:"metric-card",class:{positive:s.result.annualReturn>0,negative:s.result.annualReturn<0}},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.annualReturn")))]),i("div",{staticClass:"metric-value"},[s._v(s._s(s.formatPercent(s.result.annualReturn)))])]),i("div",{staticClass:"metric-card negative"},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.maxDrawdown")))]),i("div",{staticClass:"metric-value"},[s._v(s._s(s.formatPercent(s.result.maxDrawdown)))])]),i("div",{staticClass:"metric-card"},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.sharpeRatio")))]),i("div",{staticClass:"metric-value"},[s._v(s._s((null!==(t=s.result.sharpeRatio)&&void 0!==t?t:0).toFixed(2)))])]),i("div",{staticClass:"metric-card"},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.winRate")))]),i("div",{staticClass:"metric-value"},[s._v(s._s(s.formatPercent(s.result.winRate)))])]),i("div",{staticClass:"metric-card",class:{positive:s.result.profitFactor>=1.5,negative:s.result.profitFactor<1}},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.profitFactor")))]),i("div",{staticClass:"metric-value"},[s._v(s._s((null!==(e=s.result.profitFactor)&&void 0!==e?e:0).toFixed(2)))])]),i("div",{staticClass:"metric-card"},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.totalTrades")))]),i("div",{staticClass:"metric-value"},[s._v(s._s(null!==(a=s.result.totalTrades)&&void 0!==a?a:0))])]),i("div",{staticClass:"metric-card negative"},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.totalCommission")))]),i("div",{staticClass:"metric-value"},[s._v("-$"+s._s(s.result.totalCommission?s.result.totalCommission.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"0.00"))])])]),i("div",{staticClass:"chart-section"},[i("div",{staticClass:"chart-title"},[s._v(s._s(s.$t("dashboard.indicator.backtest.equityCurve")))]),i("div",{ref:"equityChartRef",staticClass:"equity-chart"})]),i("div",{staticClass:"trades-section"},[i("div",{staticClass:"chart-title"},[s._v(s._s(s.$t("dashboard.indicator.backtest.tradeHistory")))]),i("a-table",{attrs:{columns:s.tradeColumns,"data-source":s.normalizedTrades,pagination:{pageSize:10,size:"small"},size:"small",scroll:{x:800},rowKey:s.rowKey},scopedSlots:s._u([{key:"type",fn:function(t){return[i("a-tag",{attrs:{color:s.getTradeTypeColor(t)}},[s._v(" "+s._s(s.getTradeTypeText(t))+" ")])]}},{key:"balance",fn:function(t){return[i("span",{staticStyle:{color:"#1890ff","font-weight":"500"}},[s._v(" $"+s._s(t?t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"--")+" ")])]}},{key:"profit",fn:function(t){return[i("span",{style:{color:t>0?"#52c41a":t<0?"#f5222d":s.isDark?"rgba(255,255,255,0.65)":"#666"}},[s._v(" "+s._s(s.formatMoney(t))+" ")])]}},{key:"time",fn:function(t){return[i("span",{staticClass:"trade-time-text"},[s._v(s._s(s.formatLocalDateTime(t)))])]}},{key:"detail",fn:function(t,e){return[i("span",{staticClass:"trade-detail-text"},[s._v(s._s(s.getTradeDetailText(e.type)))])]}}])})],1)],1):i("div",{staticStyle:{padding:"12px 0"}},[i("a-empty",{attrs:{description:s.$t("dashboard.indicator.backtest.historyNoData")}})],1),i("template",{slot:"footer"},[i("a-button",{on:{click:function(t){return s.$emit("cancel")}}},[s._v(s._s(s.$t("dashboard.indicator.backtest.close")))])],1)],2)},x=[],R=function(){var t=this,e=t._self._c;return t.lines.length||t.showLegacy?e("a-alert",{staticStyle:{"margin-bottom":"12px"},attrs:{type:t.showLegacy?"warning":"info","show-icon":""}},[e("template",{slot:"message"},[t._v(" "+t._s(t.showLegacy?t.$t("dashboard.indicator.backtest.executionAssumptions.legacyTitle"):t.$t("dashboard.indicator.backtest.executionAssumptions.title"))+" ")]),e("template",{slot:"description"},[t.showLegacy?e("div",{staticStyle:{"font-size":"12px","line-height":"1.5"}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.executionAssumptions.legacyBody"))+" ")]):e("div",t._l(t.lines,function(a,s){return e("div",{key:s,staticStyle:{"font-size":"12px","line-height":"1.5"}},[t._v(" "+t._s(a)+" ")])}),0)])],2):t._e()},T=[],A=a(44735),D={name:"BacktestExecutionAssumptionsAlert",props:{assumptions:{type:Object,default:null},strategyConfig:{type:Object,default:null},timeframe:{type:String,default:""}},computed:{resolved:function(){var t=this.assumptions;if(t&&"object"===(0,A.A)(t)&&Object.keys(t).length&&(null!=t.signalTiming||null!=t.defaultFillPrice||null!=t.simulationMode))return t;var e=this.strategyConfig||{},a=(e.execution||{}).signalTiming;if(null!=a&&""!==String(a).trim()){var s=String(a).toLowerCase(),i=["next_bar_open","next_open","nextopen","next"].includes(s);return{signalTiming:i?"next_bar_open":"same_bar_close",defaultFillPrice:i?"open":"close",simulationMode:"standard",mtfRequested:!1,mtfActive:!1}}return null},showLegacy:function(){return!this.resolved},lines:function(){var t=this.resolved;if(!t)return[];var e=[];if("same_bar_close"===t.signalTiming?e.push(this.$t("dashboard.indicator.backtest.executionAssumptions.bodySameBar")):e.push(this.$t("dashboard.indicator.backtest.executionAssumptions.bodyNextBar")),"open"===t.defaultFillPrice?e.push(this.$t("dashboard.indicator.backtest.executionAssumptions.fillOpen")):e.push(this.$t("dashboard.indicator.backtest.executionAssumptions.fillClose")),"mtf"===t.simulationMode&&t.executionTimeframe){var a=t.strategyTimeframe||this.timeframe||"";e.push(this.$t("dashboard.indicator.backtest.executionAssumptions.bodyMtf",{sig:a,exec:t.executionTimeframe}))}return t.mtfRequested&&!t.mtfActive&&e.push(this.$t("dashboard.indicator.backtest.executionAssumptions.mtfFallback")),e}}},M=D,z=(0,w.A)(M,R,T,!1,null,null,null),L=z.exports,P={name:"BacktestRunViewer",components:{BacktestExecutionAssumptionsAlert:L},props:{visible:{type:Boolean,default:!1},run:{type:Object,default:null},isDark:{type:Boolean,default:!1}},data:function(){return{equityChart:null,tradeColumns:[]}},computed:{result:function(){return this.run&&this.run.result?this.run.result:{}},modalTitle:function(){var t=this.run&&this.run.id?"#".concat(this.run.id):"";return"".concat(this.$t("dashboard.indicator.backtest.historyTitle")," ").concat(t).trim()},modalWrapClass:function(){return this.isDark?"backtest-run-viewer-wrap backtest-run-viewer-wrap--dark":"backtest-run-viewer-wrap"},normalizedTrades:function(){return(this.result.trades||[]).map(function(t,e){return(0,n.A)((0,n.A)({},t),{},{_rowKey:"".concat(e,"-").concat(t.time||"","-").concat(t.type||"")})})}},watch:{visible:function(t){var e=this;t?this.$nextTick(function(){e.initColumns(),e.renderEquityChart()}):this.equityChart&&(this.equityChart.dispose(),this.equityChart=null)},isDark:function(){var t=this;this.visible&&this.$nextTick(function(){return t.renderEquityChart()})}},methods:{rowKey:function(t,e){return t._rowKey||e},initColumns:function(){this.tradeColumns=[{title:this.$t("dashboard.indicator.backtest.tradeTime"),dataIndex:"time",key:"time",width:170,scopedSlots:{customRender:"time"}},{title:this.$t("dashboard.indicator.backtest.tradeType"),dataIndex:"type",key:"type",width:150,scopedSlots:{customRender:"type"}},{title:this.$t("dashboard.indicator.backtest.tradeDetail"),dataIndex:"detail",key:"detail",width:180,scopedSlots:{customRender:"detail"}},{title:this.$t("dashboard.indicator.backtest.price"),dataIndex:"price",key:"price",width:110},{title:this.$t("dashboard.indicator.backtest.amount"),dataIndex:"amount",key:"amount",width:100},{title:this.$t("dashboard.indicator.backtest.profit"),dataIndex:"profit",key:"profit",width:110,scopedSlots:{customRender:"profit"}},{title:this.$t("dashboard.indicator.backtest.balance"),dataIndex:"balance",key:"balance",width:120,scopedSlots:{customRender:"balance"}}]},getTradeTypeColor:function(t){var e={buy:"green",sell:"red",liquidation:"orange",open_long:"green",add_long:"cyan",close_long:"orange",close_long_stop:"red",close_long_profit:"lime",close_long_trailing:"gold",reduce_long:"volcano",open_short:"red",add_short:"magenta",close_short:"blue",close_short_stop:"red",close_short_profit:"cyan",close_short_trailing:"gold",reduce_short:"volcano"};return e[t]||"default"},getTradeTypeText:function(t){var e={open_long:this.$t("dashboard.indicator.backtest.openLong"),add_long:this.$t("dashboard.indicator.backtest.addLong"),close_long:this.$t("dashboard.indicator.backtest.closeLong"),close_long_stop:this.$t("dashboard.indicator.backtest.closeLongStop"),close_long_profit:this.$t("dashboard.indicator.backtest.closeLongProfit"),close_long_trailing:this.$t("dashboard.indicator.backtest.closeLongTrailing"),reduce_long:this.$t("dashboard.indicator.backtest.reduceLong"),open_short:this.$t("dashboard.indicator.backtest.openShort"),add_short:this.$t("dashboard.indicator.backtest.addShort"),close_short:this.$t("dashboard.indicator.backtest.closeShort"),close_short_stop:this.$t("dashboard.indicator.backtest.closeShortStop"),close_short_profit:this.$t("dashboard.indicator.backtest.closeShortProfit"),close_short_trailing:this.$t("dashboard.indicator.backtest.closeShortTrailing"),reduce_short:this.$t("dashboard.indicator.backtest.reduceShort"),liquidation:this.$t("dashboard.indicator.backtest.liquidation")};return e[t]||t},getTradeDetailText:function(t){var e={open_long:this.$t("dashboard.indicator.backtest.tradeDetailOpenLong"),add_long:this.$t("dashboard.indicator.backtest.tradeDetailAddLong"),close_long:this.$t("dashboard.indicator.backtest.tradeDetailCloseLong"),close_long_stop:this.$t("dashboard.indicator.backtest.tradeDetailCloseLongStop"),close_long_profit:this.$t("dashboard.indicator.backtest.tradeDetailCloseLongProfit"),close_long_trailing:this.$t("dashboard.indicator.backtest.tradeDetailCloseLongTrailing"),reduce_long:this.$t("dashboard.indicator.backtest.tradeDetailReduceLong"),open_short:this.$t("dashboard.indicator.backtest.tradeDetailOpenShort"),add_short:this.$t("dashboard.indicator.backtest.tradeDetailAddShort"),close_short:this.$t("dashboard.indicator.backtest.tradeDetailCloseShort"),close_short_stop:this.$t("dashboard.indicator.backtest.tradeDetailCloseShortStop"),close_short_profit:this.$t("dashboard.indicator.backtest.tradeDetailCloseShortProfit"),close_short_trailing:this.$t("dashboard.indicator.backtest.tradeDetailCloseShortTrailing"),reduce_short:this.$t("dashboard.indicator.backtest.tradeDetailReduceShort"),liquidation:this.$t("dashboard.indicator.backtest.tradeDetailLiquidation"),buy:this.$t("dashboard.indicator.backtest.tradeDetailBuy"),sell:this.$t("dashboard.indicator.backtest.tradeDetailSell")};return e[t]||t},formatPercent:function(t){if(null===t||void 0===t)return"--";var e=t>=0?"+":"";return"".concat(e).concat(Number(t).toFixed(2),"%")},formatMoney:function(t){if(null===t||void 0===t)return"--";var e=t>=0?"+":"-";return"".concat(e,"$").concat(Math.abs(t).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}))},parseDateTimeToLocal:function(t){if(!t&&0!==t)return null;if(u().isMoment(t))return t.clone();if("number"===typeof t)return String(t).length<=10?u().unix(t):u()(t);var e=String(t).trim();if(!e)return null;if(/^\d+$/.test(e)){var a=Number(e);return e.length<=10?u().unix(a):u()(a)}if(/[zZ]|[-+]\d{2}:\d{2}$/.test(e)){var s=u()(e);return s.isValid()?s.local():null}if(/^\d{4}-\d{2}-\d{2}[ T]\d{2}:\d{2}(:\d{2})?$/.test(e)){var i=u().utc(e,["YYYY-MM-DD HH:mm:ss","YYYY-MM-DD HH:mm","YYYY-MM-DDTHH:mm:ss",u().ISO_8601],!0);return i.isValid()?i.local():null}var r=u()(e);return r.isValid()?r:null},formatLocalDateTime:function(t){var e=this.parseDateTimeToLocal(t);return e?e.format("YYYY-MM-DD HH:mm:ss"):"--"},formatAxisDateTime:function(t){var e=this.parseDateTimeToLocal(t);return e?e.format("MM-DD HH:mm"):String(t||"")},renderEquityChart:function(){var t=this;if(this.$refs.equityChartRef){this.equityChart&&this.equityChart.dispose(),this.equityChart=h.init(this.$refs.equityChartRef);var e=this.result.equityCurve||[],a=e.map(function(e){return t.formatAxisDateTime(e.time||e.date)}),s=e.map(function(t){return void 0!==t.value?t.value:t.equity}),i=s[0]||1e5,r=s[s.length-1]||i,n=r>=i,o=n?"#52c41a":"#f5222d",c=n?[{offset:0,color:"rgba(82, 196, 26, 0.35)"},{offset:1,color:"rgba(82, 196, 26, 0.02)"}]:[{offset:0,color:"rgba(245, 34, 45, 0.35)"},{offset:1,color:"rgba(245, 34, 45, 0.02)"}],l={backgroundColor:"transparent",tooltip:{trigger:"axis",backgroundColor:this.isDark?"#1f1f1f":"#fff",borderColor:this.isDark?"#434343":"#ddd",textStyle:{color:this.isDark?"rgba(255,255,255,0.88)":"#333"}},grid:{left:"3%",right:"4%",bottom:"12%",top:"8%",containLabel:!0},xAxis:{type:"category",data:a,boundaryGap:!1,axisLabel:{color:this.isDark?"rgba(255,255,255,0.45)":"#8c8c8c"},axisLine:{lineStyle:{color:this.isDark?"#303030":"#d9d9d9"}}},yAxis:{type:"value",axisLabel:{color:this.isDark?"rgba(255,255,255,0.45)":"#8c8c8c"},splitLine:{lineStyle:{color:this.isDark?"rgba(255,255,255,0.08)":"#f0f0f0"}}},series:[{name:this.$t("dashboard.indicator.backtest.strategy"),type:"line",data:s,smooth:.4,symbol:"none",sampling:"lttb",lineStyle:{width:2.5,color:o},areaStyle:{color:new h.graphic.LinearGradient(0,0,0,1,c)}}]};this.equityChart.setOption(l),window.addEventListener("resize",function(){return t.equityChart&&t.equityChart.resize()})}}}},H=P,Y=(0,w.A)(H,C,x,!1,null,"1082877a",null),F=Y.exports,q={"1m":30,"5m":180,"15m":365,"30m":365,"1H":730,"4H":1460,"1D":3650,"1W":7300},K=[{key:"1m",label:"1M",days:30},{key:"3m",label:"3M",days:90},{key:"6m",label:"6M",days:180},{key:"1y",label:"1Y",days:365},{key:"2y",label:"2Y",days:730},{key:"5y",label:"5Y",days:1825}],W={name:"ResultView",components:{BacktestExecutionAssumptionsAlert:L},props:{running:Boolean,runTip:String,hasResult:Boolean,result:Object,userId:[Number,String],backtestRunId:[Number,String],symbol:String,market:String,timeframe:String,isDark:Boolean},data:function(){return{chartInstance:null,elapsedSec:0,elapsedTimer:null,aiAnalyzing:!1,showAIResult:!1,aiResult:"",aiMode:""}},mounted:function(){this.running&&this._startElapsed()},computed:{aiModeLabel:function(){return"llm"===this.aiMode?this.$t("dashboard.indicator.backtest.historyAIModeLLM"):"heuristic"===this.aiMode||"heuristic_fallback"===this.aiMode?this.$t("dashboard.indicator.backtest.historyAIModeRule"):this.$t("dashboard.indicator.backtest.historyAIModeUnknown")},renderedAIHtml:function(){return this.markdownToHtml(this.aiResult||"")},pairedTrades:function(){for(var t=this.result&&this.result.trades||[],e=[],a=null,s=1,i=0;i=0?"+":"";return e+Number(t).toFixed(2)+"%"},fmtMoney:function(t){if(null==t||isNaN(t))return"$0.00";var e=Math.abs(t).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2});return(t>=0?"":"-")+"$"+e},fmtPrice:function(t){return null==t||isNaN(t)?"--":Number(t).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:4})},escapeHtml:function(t){return String(t||"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},formatInlineMarkdown:function(t){var e=this.escapeHtml(t);return e=e.replace(/`([^`]+)`/g,"$1"),e=e.replace(/\*\*([^*]+)\*\*/g,"$1"),e=e.replace(/__([^_]+)__/g,"$1"),e=e.replace(/\*([^*]+)\*/g,"$1"),e=e.replace(/_([^_]+)_/g,"$1"),e},markdownToHtml:function(t){var e=String(t||"").replace(/\r\n/g,"\n").trim();if(!e)return"";var a,s=e.split("\n"),i=[],r=!1,n=!1,o=!1,c=[],d=function(){r&&(i.push(""),r=!1),n&&(i.push("
"),n=!1)},u=(0,l.A)(s);try{for(u.s();!(a=u.n()).done;){var h=a.value,m=h.trimRight(),p=m.trim();p.startsWith("```")?(d(),o?(i.push("
".concat(this.escapeHtml(c.join("\n")),"
")),o=!1,c=[]):(o=!0,c=[])):o?c.push(h):p?/^###\s+/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^###\s+/,"")),"

"))):/^##\s+/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^##\s+/,"")),"

"))):/^#\s+/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^#\s+/,"")),"

"))):/^【.+】$/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^【|】$/g,"")),"

"))):/^>\s+/.test(p)?(d(),i.push("
".concat(this.formatInlineMarkdown(p.replace(/^>\s+/,"")),"
"))):/^[-*]\s+/.test(p)?(n&&(i.push(""),n=!1),r||(i.push(""),r=!1),n||(i.push("
    "),n=!0),i.push("
  1. ".concat(this.formatInlineMarkdown(p.replace(/^\d+\.\s+/,"")),"
  2. "))):(d(),i.push("

    ".concat(this.formatInlineMarkdown(p),"

    "))):d()}}catch(g){u.e(g)}finally{u.f()}return d(),o&&i.push("
    ".concat(this.escapeHtml(c.join("\n")),"
    ")),i.join("")},copyAIResult:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.aiResult){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,navigator.clipboard.writeText(t.aiResult);case 2:t.$message.success(t.$t("dashboard.indicator.backtest.historyAICopySuccess")),e.n=4;break;case 3:e.p=3,e.v,t.$message.warning(t.$t("dashboard.indicator.backtest.historyAICopyFailed"));case 4:return e.a(2)}},e,null,[[1,3]])}))()},handleAIAnalyze:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a,s,i,r;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(a=t.backtestRunId,t.userId&&a){e.n=1;break}return t.$message.warning(t.$t("dashboard.indicator.backtest.historyAISelectPrompt")),e.a(2);case 1:return t.aiAnalyzing=!0,t.showAIResult=!0,t.aiResult="",t.aiMode="",e.p=2,s=t.$i18n&&t.$i18n.locale?t.$i18n.locale:"zh-CN",e.n=3,(0,p.Ay)({url:"/api/indicator/backtest/aiAnalyze",method:"post",timeout:p.v0,data:{userid:t.userId,runIds:[a],lang:s}});case 3:i=e.v,i&&1===i.code&&i.data&&i.data.analysis?(t.aiResult=i.data.analysis,t.aiMode=i.data.mode||""):t.aiResult=i&&i.msg||t.$t("dashboard.indicator.backtest.historyNoAIResult"),e.n=5;break;case 4:e.p=4,r=e.v,t.aiResult=r&&r.message||t.$t("dashboard.indicator.backtest.historyAIFailed");case 5:return e.p=5,t.aiAnalyzing=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},getCloseReason:function(t,e,a){if(t.includes("_stop"))return"stopLoss";if(t.includes("_profit"))return"takeProfit";if(t.includes("_trailing"))return"trailingStop";if("liquidation"===t)return"liquidation";if(("close_long"===t||"close_short"===t)&&a){var s=String(a.type||"").toLowerCase(),i=String(a.time||"")===String(e.time||"");if(i&&("open_long"===s||"open_short"===s))return"reverse"}return"signal"},reasonColor:function(t){return{stopLoss:"red",takeProfit:"green",trailingStop:"cyan",reverse:"orange",liquidation:"volcano",signal:"blue"}[t]||"default"},renderChart:function(){var t=this,e=this.result;if(e&&e.equityCurve&&e.equityCurve.length){var a=this.$refs.eqChart;if(a){this.chartInstance&&this.chartInstance.dispose(),this.chartInstance=h.init(a);var s=this.isDark,i=e.equityCurve,r=i.length>1&&(i[i.length-1].value||0)>=(i[0].value||0),n=r?"#52c41a":"#f5222d";this.chartInstance.setOption({backgroundColor:"transparent",tooltip:{trigger:"axis",backgroundColor:s?"#1f1f1f":"#fff",borderColor:s?"#434343":"#ddd",textStyle:{color:s?"rgba(255,255,255,0.85)":"#333",fontSize:12},formatter:function(t){var e=t[0];return'
    ').concat(e.name,'
    $').concat(Number(e.value).toLocaleString("en-US",{minimumFractionDigits:2}),"
    ")}},grid:{left:65,right:20,top:20,bottom:30},xAxis:{type:"category",data:i.map(function(t){return t.time||""}),axisLabel:{color:s?"rgba(255,255,255,0.35)":"#999",fontSize:10,rotate:0,interval:Math.floor(i.length/6)},axisLine:{lineStyle:{color:s?"#303030":"#e0e0e0"}},axisTick:{show:!1}},yAxis:{type:"value",axisLabel:{color:s?"rgba(255,255,255,0.35)":"#999",fontSize:11,formatter:function(t){return"$"+(t/1e3).toFixed(1)+"k"}},splitLine:{lineStyle:{color:s?"rgba(255,255,255,0.06)":"#f0f0f0",type:"dashed"}}},series:[{type:"line",data:i.map(function(t){return t.value||0}),smooth:.3,showSymbol:!1,lineStyle:{width:2,color:n},areaStyle:{color:new h.graphic.LinearGradient(0,0,0,1,[{offset:0,color:r?"rgba(82,196,26,0.2)":"rgba(245,34,45,0.2)"},{offset:1,color:"rgba(0,0,0,0)"}])}}]}),window.addEventListener("resize",function(){t.chartInstance&&t.chartInstance.resize()})}}}},render:function(t){var e=this,a=this.isDark;if(this.running){var s=[{key:"fetch",label:this.$t("backtest-center.tip.fetching"),icon:"cloud-download"},{key:"compute",label:this.$t("backtest-center.tip.computing"),icon:"calculator"},{key:"analyze",label:this.$t("backtest-center.tip.analyzing"),icon:"bar-chart"}],i=this.elapsedSec,r=i<4?0:i<10?1:2;return t("div",{class:"running-overlay"},[t("div",{class:"running-content"},[t("div",{class:"running-spinner"},[t("div",{class:"spinner-track"}),t("div",{class:"spinner-fill"})]),t("div",{class:"running-title"},this.$t("backtest-center.running")),t("div",{class:"running-elapsed"},this.fmtElapsed(i)),t("div",{class:"running-steps"},s.map(function(e,a){return t("div",{class:["step-item",a=0?"positive":"negative",sub:this.fmtMoney(n.totalProfit)},{label:"annualReturn",value:this.fmtPct(n.annualReturn),cls:(n.annualReturn||0)>=0?"positive":"negative"},{label:"maxDrawdown",value:this.fmtPct(n.maxDrawdown),cls:"negative"},{label:"sharpe",value:(n.sharpeRatio||0).toFixed(2),cls:(n.sharpeRatio||0)>=1?"positive":(n.sharpeRatio||0)<0?"negative":""},{label:"winRate",value:this.fmtPct(n.winRate),cls:(n.winRate||0)>=50?"positive":""},{label:"profitFactor",value:(n.profitFactor||0).toFixed(2),cls:(n.profitFactor||0)>=1.5?"positive":(n.profitFactor||0)<1?"negative":""},{label:"trades",value:String(n.totalTrades||0),cls:""},{label:"commission",value:this.fmtMoney(-(n.totalCommission||0)),cls:""}],c=t(L,{props:{assumptions:n.executionAssumptions||null,strategyConfig:null,timeframe:this.timeframe||""}});return t("div",{class:"result-content"},[t("div",{class:"result-header"},[t("div",{class:"result-header-left"},[t("span",{class:"result-tag"},[t("a-tag",{props:{color:"blue"}},this.symbol),t("a-tag",{},this.market),t("a-tag",{},this.timeframe)]),this.backtestRunId?t("span",{class:"run-id"},"Run #"+this.backtestRunId):null]),t("div",{class:"result-header-actions"},[t("a-button",{props:{type:"primary",ghost:!0,size:"small",loading:this.aiAnalyzing,disabled:!this.backtestRunId},on:{click:this.handleAIAnalyze}},[t("a-icon",{props:{type:"bulb"},style:{color:a?"#177ddc":void 0}}),this.$t("dashboard.indicator.backtest.historyAISuggest")])])]),c,t("div",{class:"metrics-cards"},o.map(function(a){return t("div",{class:["metric-card",a.cls]},[t("div",{class:"metric-label"},e.$t("backtest-center.result."+a.label)),t("div",{class:"metric-value"},a.value),a.sub?t("div",{class:"metric-sub"},a.sub):null])})),t("div",{class:"chart-section"},[t("div",{class:"chart-title"},[t("a-icon",{props:{type:"area-chart"},style:{marginRight:"6px",color:a?"rgba(255,255,255,0.72)":"rgba(0,0,0,0.45)"}}),this.$t("backtest-center.result.equityCurve")]),t("div",{ref:"eqChart",class:"equity-chart"})]),t("div",{class:"trades-section"},[t("div",{class:"chart-title"},[t("a-icon",{props:{type:"swap"},style:{marginRight:"6px",color:a?"rgba(255,255,255,0.72)":"rgba(0,0,0,0.45)"}}),this.$t("backtest-center.result.tradeHistory"),t("span",{style:{fontWeight:400,fontSize:"12px",marginLeft:"8px",color:a?"rgba(255,255,255,0.45)":"#999"}},"(".concat(this.pairedTrades.length,")"))]),t("a-table",{props:{columns:this.tradeColumns,dataSource:this.pairedTrades,pagination:{pageSize:10,size:"small",showTotal:function(t){return"".concat(t," trades")}},size:"small",scroll:{x:980},rowKey:"id"},scopedSlots:{type:function(e){return t("a-tag",{props:{color:"long"===e?"green":"red"},style:"margin:0"},"long"===e?"LONG":"SHORT")},openAction:function(a){return t("a-tag",{props:{color:"openLong"===a?"green":"red"},style:"margin:0"},e.$t("backtest-center.result."+a))},closeReason:function(a){return t("a-tag",{props:{color:e.reasonColor(a)},style:"margin:0"},e.$t("backtest-center.result."+a))},price:function(a){return t("span",{style:"font-variant-numeric: tabular-nums"},e.fmtPrice(a))},profit:function(s){return t("span",{style:{color:s>0?"#52c41a":s<0?"#f5222d":a?"rgba(255,255,255,0.65)":"#666",fontWeight:"600",fontVariantNumeric:"tabular-nums"}},e.fmtMoney(s))},money:function(s){return t("span",{style:{color:a?"rgba(255,255,255,0.88)":"#262626",fontWeight:"600",fontVariantNumeric:"tabular-nums"}},e.fmtMoney(s))}}})]),t("a-modal",{props:{title:this.$t("dashboard.indicator.backtest.historyAISuggestTitle"),visible:this.showAIResult,footer:null,width:900,wrapClassName:this.isDark?"bc-modal-wrap bc-modal-wrap--dark":"bc-modal-wrap"},on:{cancel:function(){e.showAIResult=!1}}},[this.aiAnalyzing?t("div",{class:"result-ai-loading"},[t("a-spin",{props:{size:"large"}}),t("div",{class:"result-ai-loading-text"},this.$t("dashboard.indicator.backtest.historyAISuggestLoading"))]):t("div",{class:"result-ai-content"},[t("div",{class:"result-ai-meta-card"},[t("div",{class:"result-ai-meta-top"},[t("div",{class:"result-ai-meta-left"},[t("a-tag",{props:{color:"blue"}},this.$t("dashboard.indicator.backtest.historyAISuggest")),t("a-tag",{},this.aiModeLabel),this.backtestRunId?t("a-tag",{props:{color:"purple"}},"#".concat(this.backtestRunId)):null]),t("div",{class:"result-ai-meta-actions"},[t("a-button",{props:{size:"small"},on:{click:this.copyAIResult}},[t("a-icon",{props:{type:"copy"}}),this.$t("dashboard.indicator.backtest.historyAICopy")]),t("a-button",{props:{size:"small",type:"primary",ghost:!0,disabled:!this.backtestRunId},on:{click:this.handleAIAnalyze}},[t("a-icon",{props:{type:"redo"}}),this.$t("dashboard.indicator.backtest.historyAIRetry")])])]),t("a-alert",{style:{marginTop:"12px"},props:{type:"info",showIcon:!0,message:this.$t("dashboard.indicator.backtest.historyAIHint")}})]),this.aiResult?t("div",{class:"result-ai-markdown-card"},[t("div",{class:"result-ai-markdown-content",domProps:{innerHTML:this.renderedAIHtml}})]):t("div",{class:"result-ai-empty"},this.$t("dashboard.indicator.backtest.historyNoAIResult"))])])])}},N={name:"BacktestCenter",mixins:[m.t],components:{BacktestHistoryDrawer:I,BacktestRunViewer:F,ResultView:W},data:function(){return{activeTab:"indicator",userId:null,watchlist:[],loadingWatchlist:!1,showAddModal:!1,addingStock:!1,addMarketTab:"Crypto",addSearchKeyword:"",addSearchResults:[],addSearching:!1,addSelectedItem:null,addSearched:!1,addSearchTimer:null,addTriggerSource:"",indicators:[],loadingIndicators:!1,selectedIndicatorId:void 0,selectedWatchlistKey:void 0,market:"Crypto",symbol:"",timeframe:"1D",startDate:u()().subtract(6,"months"),endDate:u()(),datePreset:"6m",initialCapital:1e4,leverage:1,commission:.02,slippage:.02,signalTiming:"next_bar_open",tradeDirection:"long",stopLossPct:0,takeProfitPct:0,entryPct:100,trailingEnabled:!1,trailingStopPct:0,trailingActivationPct:0,running:!1,runTip:"",runTimer:null,hasResult:!1,backtestRunId:null,result:{},strategies:[],loadingStrategies:!1,selectedStrategyId:void 0,stSelectedWatchlistKey:void 0,stMarket:"Crypto",stSymbol:"",stTimeframe:"1D",stStartDate:u()().subtract(6,"months"),stEndDate:u()(),stDatePreset:"6m",stInitialCapital:1e4,stLeverage:1,stCommission:.02,stSlippage:0,stRunning:!1,stRunTip:"",stRunTimer:null,stHasResult:!1,stBacktestRunId:null,stResult:{},showHistoryDrawer:!1,historyIndicatorId:null,historyStrategyId:null,historyRunType:"",showRunViewer:!1,selectedRun:null}},computed:{isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},selectedIndicatorObj:function(){var t=this;return this.selectedIndicatorId?this.indicators.find(function(e){return e.id===t.selectedIndicatorId}):null},selectedStrategyObj:function(){var t=this;return this.selectedStrategyId?this.strategies.find(function(e){return e.id===t.selectedStrategyId}):null},canRunIndicator:function(){return this.selectedIndicatorId&&this.symbol&&this.startDate&&this.endDate},canRunStrategy:function(){return this.selectedStrategyId&&this.stSymbol&&this.stStartDate&&this.stEndDate},tfMaxDays:function(){return q[this.timeframe]||3650},stTfMaxDays:function(){return q[this.stTimeframe]||3650},tfLimitHint:function(){var t=this.tfMaxDays;return t<=30?"(≤ 1".concat(this.$t("backtest-center.config.monthUnit"),")"):t<=180?"(≤ 6".concat(this.$t("backtest-center.config.monthUnit"),")"):t<=365?"(≤ 1".concat(this.$t("backtest-center.config.yearUnit"),")"):t<=730?"(≤ 2".concat(this.$t("backtest-center.config.yearUnit"),")"):"(≤ ".concat(Math.round(t/365)).concat(this.$t("backtest-center.config.yearUnit"),")")},stTfLimitHint:function(){var t=this.stTfMaxDays;return t<=30?"(≤ 1".concat(this.$t("backtest-center.config.monthUnit"),")"):t<=180?"(≤ 6".concat(this.$t("backtest-center.config.monthUnit"),")"):t<=365?"(≤ 1".concat(this.$t("backtest-center.config.yearUnit"),")"):t<=730?"(≤ 2".concat(this.$t("backtest-center.config.yearUnit"),")"):"(≤ ".concat(Math.round(t/365)).concat(this.$t("backtest-center.config.yearUnit"),")")},filteredDatePresets:function(){var t=this;return K.filter(function(e){return e.days<=t.tfMaxDays})},stFilteredDatePresets:function(){var t=this;return K.filter(function(e){return e.days<=t.stTfMaxDays})}},created:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){return(0,o.A)().w(function(e){while(1)switch(e.n){case 0:return e.n=1,t.loadUserId();case 1:t.loadIndicators(),t.loadStrategies(),t.loadWatchlistData(),t.parseQuery();case 2:return e.a(2)}},e)}))()},beforeDestroy:function(){clearInterval(this.runTimer),clearInterval(this.stRunTimer),clearTimeout(this.addSearchTimer)},methods:{loadUserId:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,g.ug)();case 1:a=e.v,a&&a.data&&(t.userId=a.data.id||a.data.user_id||1),e.n=3;break;case 2:e.p=2,e.v,t.userId=1;case 3:return e.a(2)}},e,null,[[0,2]])}))()},loadIndicators:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.userId){e.n=1;break}return e.a(2);case 1:return t.loadingIndicators=!0,e.p=2,e.n=3,(0,p.Ay)({url:"/api/indicator/getIndicators",method:"get",params:{userid:t.userId}});case 3:a=e.v,a&&a.data&&Array.isArray(a.data)&&(t.indicators=a.data.map(function(t){return(0,n.A)((0,n.A)({},t),{},{type:"python"})})),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.p=5,t.loadingIndicators=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},loadStrategies:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a,s,i;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.loadingStrategies=!0,e.p=1,e.n=2,(0,f.EM)();case 2:s=e.v,i=Array.isArray(null===s||void 0===s||null===(a=s.data)||void 0===a?void 0:a.strategies)?s.data.strategies:[],t.strategies=i,t.selectedStrategyId&&t.$nextTick(function(){return t.onStrategyChange()}),e.n=4;break;case 3:e.p=3,e.v,t.strategies=[];case 4:return e.p=4,t.loadingStrategies=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},loadWatchlistData:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.userId){e.n=1;break}return e.a(2);case 1:return t.loadingWatchlist=!0,e.p=2,e.n=3,(0,b.Qo)({userid:t.userId});case 3:a=e.v,a&&1===a.code&&a.data&&(t.watchlist=a.data),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.p=5,t.loadingWatchlist=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},parseQuery:function(){var t=this,e=this.$route.query;"strategy"===e.tab&&(this.activeTab="strategy"),e.indicator_id&&(this.selectedIndicatorId=Number(e.indicator_id)||void 0),e.strategy_id&&(this.selectedStrategyId=Number(e.strategy_id)||void 0),"history"===e.view&&this.$nextTick(function(){return t.openHistory(t.activeTab)})},filterWatchlistOption:function(t,e){var a=(e.componentOptions.propsData.value||"").toLowerCase();return"__add__"===a||a.includes(t.toLowerCase())},handleWatchlistChange:function(t){var e=this;if("__add__"===t)return this.addTriggerSource="indicator",this.showAddModal=!0,void this.$nextTick(function(){e.selectedWatchlistKey=void 0});if(t){var a=t.split(":"),s=(0,r.A)(a,2),i=s[0],n=s[1];this.market=i,this.symbol=n}else this.market="",this.symbol=""},handleStWatchlistChange:function(t){var e=this;if("__add__"===t)return this.addTriggerSource="strategy",this.showAddModal=!0,void this.$nextTick(function(){e.stSelectedWatchlistKey=void 0});if(t){var a=t.split(":"),s=(0,r.A)(a,2),i=s[0],n=s[1];this.stMarket=i,this.stSymbol=n}else this.stMarket="",this.stSymbol=""},getMarketColor:function(t){var e={Crypto:"orange",USStock:"blue",HKStock:"red",Forex:"green",Futures:"purple",PredictionMarket:"cyan"};return e[t]||"default"},onAddMarketTabChange:function(){this.addSearchKeyword="",this.addSearchResults=[],this.addSelectedItem=null,this.addSearched=!1},onAddSearchInput:function(){var t=this;clearTimeout(this.addSearchTimer),this.addSearchKeyword?this.addSearchTimer=setTimeout(function(){return t.doAddSearch()},400):this.addSearchResults=[]},doAddSearch:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.addSearchKeyword){e.n=1;break}return e.a(2);case 1:return t.addSearching=!0,e.p=2,e.n=3,(0,b._3)({market:t.addMarketTab,keyword:t.addSearchKeyword,limit:20});case 3:a=e.v,a&&a.data&&Array.isArray(a.data)?t.addSearchResults=a.data:t.addSearchResults=[],t.addSearched=!0,0===t.addSearchResults.length&&(t.addSelectedItem={market:t.addMarketTab,symbol:t.addSearchKeyword.trim().toUpperCase(),name:""}),e.n=5;break;case 4:e.p=4,e.v,t.addSelectedItem={market:t.addMarketTab,symbol:t.addSearchKeyword.trim().toUpperCase(),name:""};case 5:return e.p=5,t.addSearching=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},handleAddStock:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a,s,i,r;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(a=t.addSelectedItem,a&&a.symbol){e.n=1;break}return t.$message.warning(t.$t("backtest-center.config.symbolRequired")),e.a(2);case 1:return t.addingStock=!0,e.p=2,s=a.market||t.addMarketTab,e.n=3,(0,b.dp)({userid:t.userId,market:s,symbol:a.symbol,name:a.name||""});case 3:return t.$message.success(t.$t("backtest-center.config.addSuccess")),e.n=4,t.loadWatchlistData();case 4:i="".concat(s,":").concat(a.symbol),"strategy"===t.addTriggerSource?(t.stSelectedWatchlistKey=i,t.stMarket=s,t.stSymbol=a.symbol):(t.selectedWatchlistKey=i,t.market=s,t.symbol=a.symbol),t.showAddModal=!1,e.n=6;break;case 5:e.p=5,r=e.v,t.$message.error(r.message||"Failed");case 6:return e.p=6,t.addingStock=!1,e.f(6);case 7:return e.a(2)}},e,null,[[2,5,6,7]])}))()},onTimeframeChange:function(){this.clampDateRange("indicator"),this.datePreset=this.matchPreset(this.startDate,this.endDate)},onStTimeframeChange:function(){this.clampDateRange("strategy"),this.stDatePreset=this.matchPreset(this.stStartDate,this.stEndDate)},clampDateRange:function(t){var e="strategy"===t?this.stTfMaxDays:this.tfMaxDays,a="strategy"===t?this.stStartDate:this.startDate,s="strategy"===t?this.stEndDate:this.endDate;if(a&&s){var i=s.diff(a,"days");if(i>e){var r=u()(s).subtract(e,"days");"strategy"===t?this.stStartDate=r:this.startDate=r}}},matchPreset:function(t,e){if(!t||!e)return"";for(var a=e.diff(t,"days"),s=0,i=K;s0?e("div",{staticClass:"qt-balance"},[e("span",{staticClass:"qt-balance-label"},[t._v(t._s(t.$t("quickTrade.available"))+":")]),e("span",{staticClass:"qt-balance-value"},[t._v("$"+t._s(t.formatPrice(t.balance.available)))])]):t._e()],1),e("div",{staticClass:"qt-section"},[e("div",{staticClass:"qt-direction-toggle"},[e("div",{staticClass:"qt-dir-btn qt-dir-long",class:{active:"buy"===t.side},on:{click:function(e){t.side="buy"}}},[e("a-icon",{attrs:{type:"arrow-up"}}),t._v(" "+t._s(t.$t("quickTrade.long"))+" ")],1),e("div",{staticClass:"qt-dir-btn qt-dir-short",class:{active:"sell"===t.side},on:{click:function(e){t.side="sell"}}},[e("a-icon",{attrs:{type:"arrow-down"}}),t._v(" "+t._s(t.$t("quickTrade.short"))+" ")],1)])]),e("div",{staticClass:"qt-section"},[e("a-radio-group",{staticStyle:{width:"100%"},attrs:{"button-style":"solid",size:"small"},model:{value:t.orderType,callback:function(e){t.orderType=e},expression:"orderType"}},[e("a-radio-button",{staticStyle:{width:"50%","text-align":"center"},attrs:{value:"market"}},[t._v(" "+t._s(t.$t("quickTrade.market"))+" ")]),e("a-radio-button",{staticStyle:{width:"50%","text-align":"center"},attrs:{value:"limit"}},[t._v(" "+t._s(t.$t("quickTrade.limit"))+" ")])],1)],1),"limit"===t.orderType?e("div",{staticClass:"qt-section"},[e("div",{staticClass:"qt-label"},[t._v(t._s(t.$t("quickTrade.limitPrice")))]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,step:t.priceStep,precision:t.pricePrecision,placeholder:t.$t("quickTrade.enterPrice")},model:{value:t.limitPrice,callback:function(e){t.limitPrice=e},expression:"limitPrice"}})],1):t._e(),e("div",{staticClass:"qt-section"},[e("div",{staticClass:"qt-label"},[t._v(t._s(t.$t("quickTrade.amount"))+" (USDT)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:1,step:10,precision:2,placeholder:t.$t("quickTrade.enterAmount")},model:{value:t.amount,callback:function(e){t.amount=e},expression:"amount"}}),e("div",{staticClass:"qt-quick-amounts"},t._l(t.quickAmountPcts,function(a){return e("a-button",{key:a,attrs:{size:"small",disabled:t.balance.available<=0},on:{click:function(e){return t.setAmountByPercent(a)}}},[t._v(" "+t._s(a)+"% ")])}),1)],1),"spot"!==t.marketType?e("div",{staticClass:"qt-section"},[e("div",{staticClass:"qt-label"},[t._v(t._s(t.$t("quickTrade.leverage")))]),e("div",{staticClass:"qt-leverage-row"},[e("a-slider",{staticStyle:{flex:"1","margin-right":"12px"},attrs:{min:1,max:125,marks:t.leverageMarks,tipFormatter:function(t){return t+"x"}},model:{value:t.leverage,callback:function(e){t.leverage=e},expression:"leverage"}}),e("a-input-number",{staticStyle:{width:"80px"},attrs:{min:1,max:125,formatter:function(t){return"".concat(t,"x")},parser:function(t){return t.replace("x","")}},model:{value:t.leverage,callback:function(e){t.leverage=e},expression:"leverage"}})],1)]):t._e(),e("a-collapse",{staticStyle:{background:"transparent",margin:"0 16px"},attrs:{bordered:!1}},[e("a-collapse-panel",{key:"tpsl",style:t.collapseStyle,attrs:{header:t.$t("quickTrade.tpsl")}},[e("div",{staticClass:"qt-tpsl-row"},[e("div",{staticClass:"qt-tpsl-item"},[e("span",{staticClass:"qt-label",staticStyle:{color:"#52c41a"}},[t._v(t._s(t.$t("quickTrade.tp")))]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,step:t.priceStep,precision:t.pricePrecision,placeholder:t.$t("quickTrade.tpPlaceholder")},model:{value:t.tpPrice,callback:function(e){t.tpPrice=e},expression:"tpPrice"}})],1),e("div",{staticClass:"qt-tpsl-item"},[e("span",{staticClass:"qt-label",staticStyle:{color:"#f5222d"}},[t._v(t._s(t.$t("quickTrade.sl")))]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,step:t.priceStep,precision:t.pricePrecision,placeholder:t.$t("quickTrade.slPlaceholder")},model:{value:t.slPrice,callback:function(e){t.slPrice=e},expression:"slPrice"}})],1)])])],1),e("div",{staticClass:"qt-submit-section"},[e("a-button",{staticClass:"qt-submit-btn",class:["buy"===t.side?"qt-btn-long":"qt-btn-short"],attrs:{type:"buy"===t.side?"primary":"danger",size:"large",block:"",loading:t.submitting,disabled:!t.canSubmit},on:{click:t.handleSubmit}},[e("a-icon",{attrs:{type:"buy"===t.side?"arrow-up":"arrow-down"}}),t._v(" "+t._s("buy"===t.side?t.$t("quickTrade.buyLong"):t.$t("quickTrade.sellShort"))+" "+t._s(t.symbol)+" ")],1)],1),e("div",{staticClass:"qt-position-section"},[e("div",{staticClass:"qt-section-header"},[e("a-icon",{attrs:{type:"wallet"}}),t._v(" "+t._s(t.$t("quickTrade.currentPosition"))+" ")],1),t.currentPosition?e("div",{staticClass:"qt-position-card",class:t.currentPosition.side},[e("div",{staticClass:"qt-pos-row"},[e("span",[t._v(t._s(t.$t("quickTrade.side")))]),e("a-tag",{attrs:{color:"long"===t.currentPosition.side?"#52c41a":"#f5222d",size:"small"}},[t._v(" "+t._s("long"===t.currentPosition.side?t.$t("quickTrade.long"):t.$t("quickTrade.short"))+" ")])],1),e("div",{staticClass:"qt-pos-row"},[e("span",[t._v(t._s(t.$t("quickTrade.posSize")))]),e("span",[t._v(t._s(t.currentPosition.size))])]),e("div",{staticClass:"qt-pos-row"},[e("span",[t._v(t._s(t.$t("quickTrade.entryPrice")))]),e("span",[t._v("$"+t._s(t.formatPrice(t.currentPosition.entry_price)))])]),t.currentPosition.mark_price?e("div",{staticClass:"qt-pos-row"},[e("span",[t._v(t._s(t.$t("quickTrade.markPrice")))]),e("span",[t._v("$"+t._s(t.formatPrice(t.currentPosition.mark_price)))])]):t._e(),t.currentPosition.leverage&&t.currentPosition.leverage>1?e("div",{staticClass:"qt-pos-row"},[e("span",[t._v(t._s(t.$t("quickTrade.leverage")))]),e("span",[t._v(t._s(t.currentPosition.leverage)+"x")])]):t._e(),e("div",{staticClass:"qt-pos-row"},[e("span",[t._v(t._s(t.$t("quickTrade.unrealizedPnl")))]),e("span",{class:t.currentPosition.unrealized_pnl>=0?"qt-green":"qt-red"},[t._v(" $"+t._s(t.formatPrice(t.currentPosition.unrealized_pnl))+" ")])]),e("a-button",{staticStyle:{"margin-top":"8px"},attrs:{type:"danger",size:"small",block:"",ghost:"",loading:t.closingPosition},on:{click:t.handleClosePosition}},[t._v(" "+t._s(t.$t("quickTrade.closePosition"))+" ")])],1):e("div",{staticClass:"qt-position-empty"},[e("a-empty",{staticStyle:{padding:"20px 0"},attrs:{description:t.$t("quickTrade.noPosition"),image:!1}},[e("template",{slot:"description"},[e("span",{staticStyle:{color:"#999","font-size":"12px"}},[t._v(t._s(t.$t("quickTrade.noPositionHint")))])])],2)],1)]),t.recentTrades.length>0?e("div",{staticClass:"qt-history-section"},[e("a-collapse",{attrs:{bordered:!1,activeKey:t.historyCollapsed?[]:["history"]},on:{change:t.handleHistoryCollapse}},[e("a-collapse-panel",{key:"history",style:t.collapseStyle,attrs:{showArrow:!1}},[e("template",{slot:"header"},[e("div",{staticClass:"qt-section-header",staticStyle:{margin:"0",padding:"0"}},[e("a-icon",{attrs:{type:"history"}}),t._v(" "+t._s(t.$t("quickTrade.recentTrades"))+" "),e("span",{staticClass:"qt-history-count"},[t._v("("+t._s(t.recentTrades.length)+")")])],1)]),e("div",{staticClass:"qt-trade-list"},t._l(t.recentTrades,function(a){return e("div",{key:a.id,staticClass:"qt-trade-item"},[e("div",{staticClass:"qt-trade-main"},[e("a-tag",{attrs:{color:"buy"===a.side?"#52c41a":"#f5222d",size:"small"}},[t._v(" "+t._s("buy"===a.side?"LONG":"SHORT")+" ")]),e("span",{staticClass:"qt-trade-symbol"},[t._v(t._s(a.symbol))]),e("span",{staticClass:"qt-trade-amount"},[t._v("$"+t._s(t.formatPrice(a.amount)))])],1),e("div",{staticClass:"qt-trade-meta"},[e("a-tag",{attrs:{color:"filled"===a.status?"#52c41a":"failed"===a.status?"#f5222d":"#faad14",size:"small"}},[t._v(" "+t._s(a.status)+" ")]),e("span",{staticClass:"qt-trade-time"},[t._v(t._s(t.formatTime(a.created_at)))])],1)])}),0)],2)],1)],1):t._e()],1)},r=[],s=a(81127),n=a(56252),c=a(76338),l=(a(28706),a(2008),a(74423),a(62062),a(2892),a(26099),a(21699),a(68156),a(42762),a(95353)),o=a(42430),u=a(75769);function d(t){return(0,u.Ay)({url:"/api/quick-trade/place-order",method:"post",data:t})}function m(t){return(0,u.Ay)({url:"/api/quick-trade/balance",method:"get",params:t})}function p(t){return(0,u.Ay)({url:"/api/quick-trade/position",method:"get",params:t})}function h(t){return(0,u.Ay)({url:"/api/quick-trade/history",method:"get",params:t})}function v(t){return(0,u.Ay)({url:"/api/quick-trade/close-position",method:"post",data:t})}var b=a(35038),y=a(505),f={name:"QuickTradePanel",props:{visible:{type:Boolean,default:!1},symbol:{type:String,default:""},presetSide:{type:String,default:""},presetPrice:{type:Number,default:0},source:{type:String,default:"manual"},marketType:{type:String,default:"swap"}},data:function(){return{credentials:[],selectedCredentialId:void 0,credLoading:!1,balance:{available:0,total:0},side:"buy",orderType:"market",limitPrice:0,amount:100,leverage:5,tpPrice:null,slPrice:null,submitting:!1,closingPosition:!1,currentPrice:0,currentPosition:null,recentTrades:[],historyCollapsed:!1,currentSymbol:"",symbolSuggestions:[],symbolSearching:!1,symbolSearchTimer:null,userId:null,quickAmountPcts:[10,25,50,75,100],leverageMarks:{1:"1x",5:"5x",10:"10x",25:"25x",50:"50x",100:"100x",125:"125x"},pollTimer:null}},computed:(0,c.A)((0,c.A)({},(0,l.aH)({navTheme:function(t){return t.app.theme}})),{},{isDark:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},priceStep:function(){return this.currentPrice>1e4?1:this.currentPrice>100?.1:this.currentPrice>1?.01:1e-4},pricePrecision:function(){return this.currentPrice>1e4?0:this.currentPrice>100?1:this.currentPrice>1?2:4},canSubmit:function(){return this.selectedCredentialId&&this.currentSymbol&&this.amount>0&&!this.submitting},priceChangeClass:function(){return""},collapseStyle:function(){return{background:"transparent",borderRadius:"4px",border:0,overflow:"hidden"}}}),watch:{visible:function(t){t?this.init():this.stopPolling()},symbol:function(t){t&&(this.currentSymbol=t)},currentSymbol:function(t){t&&(this.loadPrice(),this.selectedCredentialId&&this.loadPosition(),this.$emit("update:symbol",t))},selectedCredentialId:function(t){t&&this.currentSymbol&&this.loadPosition()},presetSide:function(t){t&&(this.side=t)},presetPrice:function(t){t>0&&(this.currentPrice=t,this.limitPrice=t)}},methods:{init:function(){var t=this;return(0,n.A)((0,s.A)().m(function e(){return(0,s.A)().w(function(e){while(1)switch(e.n){case 0:return t.currentSymbol=t.symbol||"",t.presetSide&&(t.side=t.presetSide),t.presetPrice>0&&(t.currentPrice=t.presetPrice,t.limitPrice=t.presetPrice),e.n=1,t.loadCredentials();case 1:return e.n=2,t.loadUserInfo();case 2:return e.n=3,t.loadWatchlistSymbols();case 3:if(!t.currentSymbol){e.n=4;break}return e.n=4,t.loadPrice();case 4:if(!t.selectedCredentialId||!t.currentSymbol){e.n=5;break}return e.n=5,t.loadPosition();case 5:t.loadHistory(),t.startPolling();case 6:return e.a(2)}},e)}))()},loadUserInfo:function(){var t=this;return(0,n.A)((0,s.A)().m(function e(){var a,i,r,n;return(0,s.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(e.p=0,i=t.$store,r=(null===i||void 0===i||null===(a=i.getters)||void 0===a?void 0:a.userInfo)||{},!r||!r.id){e.n=1;break}return t.userId=r.id,e.a(2);case 1:return e.n=2,(0,y.ug)();case 2:n=e.v,n&&1===n.code&&n.data&&(t.userId=n.data.id,i&&i.commit("SET_INFO",n.data)),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[0,3]])}))()},loadWatchlistSymbols:function(){var t=this;return(0,n.A)((0,s.A)().m(function e(){var a,i;return(0,s.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.userId){e.n=2;break}return e.n=1,t.loadUserInfo();case 1:if(t.userId){e.n=2;break}return e.a(2);case 2:return e.p=2,e.n=3,(0,b.Qo)({userid:t.userId});case 3:a=e.v,a&&1===a.code&&a.data&&(i=(a.data||[]).filter(function(t){return"crypto"===(t.market||"").toLowerCase()}).map(function(t){return{value:t.symbol||"",symbol:t.symbol||"",name:t.name||""}}).filter(function(t){return t.value}),t.symbolSuggestions=i),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2)}},e,null,[[2,4]])}))()},handleSymbolSearch:function(t){var e=this;this.symbolSearchTimer&&clearTimeout(this.symbolSearchTimer),t&&""!==t.trim()?this.symbolSearchTimer=setTimeout((0,n.A)((0,s.A)().m(function a(){var i;return(0,s.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return e.symbolSearching=!0,a.p=1,a.n=2,(0,b._3)({market:"Crypto",keyword:t.trim(),limit:20});case 2:i=a.v,i&&1===i.code&&i.data?e.symbolSuggestions=(i.data.items||i.data||[]).map(function(t){return{value:t.symbol||"",symbol:t.symbol||"",name:t.name||""}}).filter(function(t){return t.value}):e.symbolSuggestions=[],a.n=4;break;case 3:a.p=3,a.v,e.symbolSuggestions=[];case 4:return a.p=4,e.symbolSearching=!1,a.f(4);case 5:return a.a(2)}},a,null,[[1,3,4,5]])})),300):this.loadWatchlistSymbols()},handleSymbolChange:function(t){t&&t!==this.currentSymbol&&(this.currentSymbol=t,this.loadPrice(),this.selectedCredentialId&&this.loadPosition(),this.$emit("update:symbol",t))},loadPrice:function(){var t=this;return(0,n.A)((0,s.A)().m(function e(){var a,i;return(0,s.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.currentSymbol){e.n=1;break}return t.currentPrice=0,e.a(2);case 1:return e.p=1,e.n=2,(0,u.Ay)({url:"/api/market/price",method:"get",params:{market:"Crypto",symbol:t.currentSymbol}});case 2:a=e.v,a&&1===a.code&&a.data&&(i=parseFloat(a.data.price||0),i>0&&(t.currentPrice=i,0!==t.limitPrice&&t.limitPrice!==t.presetPrice||(t.limitPrice=i))),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[1,3]])}))()},handleSymbolFocus:function(){0===this.symbolSuggestions.length&&this.loadWatchlistSymbols()},loadCredentials:function(){var t=this;return(0,n.A)((0,s.A)().m(function e(){var a,i,r;return(0,s.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.credLoading=!0,e.p=1,e.n=2,(0,o.IA)();case 2:a=e.v,1===a.code&&a.data&&(i=a.data.items||a.data||[],r=["ibkr","mt5"],t.credentials=i.filter(function(t){var e=(t.exchange_id||t.name||"").toLowerCase();return!r.includes(e)}),!t.selectedCredentialId&&t.credentials.length>0&&(t.selectedCredentialId=t.credentials[0].id,t.onCredentialChange(t.selectedCredentialId))),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.p=4,t.credLoading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},onCredentialChange:function(t){var e=this;return(0,n.A)((0,s.A)().m(function a(){return(0,s.A)().w(function(a){while(1)switch(a.n){case 0:return e.selectedCredentialId=t,a.n=1,e.loadBalance();case 1:return a.n=2,e.loadPosition();case 2:return a.a(2)}},a)}))()},loadBalance:function(){var t=this;return(0,n.A)((0,s.A)().m(function e(){var a;return(0,s.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.selectedCredentialId){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,m({credential_id:t.selectedCredentialId,market_type:t.marketType});case 2:a=e.v,1===a.code&&a.data&&(t.balance=a.data),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[1,3]])}))()},loadPosition:function(){var t=this;return(0,n.A)((0,s.A)().m(function e(){var a;return(0,s.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.selectedCredentialId&&t.currentSymbol){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,p({credential_id:t.selectedCredentialId,symbol:t.currentSymbol,market_type:t.marketType});case 2:if(a=e.v,!(1===a.code&&a.data&&a.data.positions&&a.data.positions.length>0)){e.n=3;break}return t.currentPosition=a.data.positions[0],e.a(2,!0);case 3:return t.currentPosition=null,e.a(2,!1);case 4:e.n=6;break;case 5:return e.p=5,e.v,t.currentPosition=null,e.a(2,!1);case 6:return e.a(2)}},e,null,[[1,5]])}))()},loadPositionWithRetry:function(){var t=arguments,e=this;return(0,n.A)((0,s.A)().m(function a(){var i,r,n,c;return(0,s.A)().w(function(a){while(1)switch(a.n){case 0:return i=t.length>0&&void 0!==t[0]?t[0]:3,r=t.length>1&&void 0!==t[1]?t[1]:2e3,a.n=1,e.loadPosition();case 1:if(n=a.v,!n){a.n=2;break}return a.a(2);case 2:c=0;case 3:if(!(c0&&(this.amount=Math.floor(this.balance.available*t/100*100)/100)},handleSubmit:function(){var t=this;return(0,n.A)((0,s.A)().m(function e(){var a,i,r;return(0,s.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.canSubmit){e.n=1;break}return e.a(2);case 1:return t.submitting=!0,e.p=2,a={credential_id:t.selectedCredentialId,symbol:t.currentSymbol,side:t.side,order_type:t.orderType,amount:t.amount,price:"limit"===t.orderType?t.limitPrice:0,leverage:"spot"!==t.marketType?t.leverage:1,market_type:t.marketType,tp_price:t.tpPrice||0,sl_price:t.slPrice||0,source:t.source},e.n=3,d(a);case 3:if(i=e.v,1!==i.code){e.n=7;break}return t.$emit("order-success",i.data),e.n=4,t.loadBalance();case 4:return e.n=5,t.loadHistory();case 5:return e.n=6,t.loadPositionWithRetry();case 6:e.n=8;break;case 7:t.$message.error(i.msg||t.$t("quickTrade.orderFailed"));case 8:e.n=10;break;case 9:e.p=9,r=e.v,t.$message.error(r.message||t.$t("quickTrade.orderFailed"));case 10:return e.p=10,t.submitting=!1,e.f(10);case 11:return e.a(2)}},e,null,[[2,9,10,11]])}))()},handleClosePosition:function(){var t=this;return(0,n.A)((0,s.A)().m(function e(){var a,i,r;return(0,s.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.currentPosition&&t.selectedCredentialId){e.n=1;break}return e.a(2);case 1:return t.closingPosition=!0,e.p=2,a={credential_id:t.selectedCredentialId,symbol:t.currentSymbol,market_type:t.marketType,size:0,source:"manual"},e.n=3,v(a);case 3:if(i=e.v,1!==i.code){e.n=6;break}return t.$message.success(t.$t("quickTrade.positionClosed")),e.n=4,t.loadBalance();case 4:return e.n=5,t.loadHistory();case 5:t.currentPosition=null,setTimeout((0,n.A)((0,s.A)().m(function e(){return(0,s.A)().w(function(e){while(1)switch(e.n){case 0:return e.n=1,t.loadPosition();case 1:return e.a(2)}},e)})),2e3),e.n=7;break;case 6:t.$message.error(i.msg||t.$t("quickTrade.orderFailed"));case 7:e.n=9;break;case 8:e.p=8,r=e.v,t.$message.error(r.message||t.$t("quickTrade.orderFailed"));case 9:return e.p=9,t.closingPosition=!1,e.f(9);case 10:return e.a(2)}},e,null,[[2,8,9,10]])}))()},startPolling:function(){var t=this;this.stopPolling(),this.pollTimer=setInterval(function(){t.currentSymbol&&t.loadPrice(),t.selectedCredentialId&&t.currentSymbol&&(t.loadBalance(),t.loadPosition())},1e4)},stopPolling:function(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)},handleClose:function(){this.$emit("close"),this.$emit("update:visible",!1)},handleHistoryCollapse:function(t){this.historyCollapsed=!t.includes("history")},formatPrice:function(t){var e=parseFloat(t||0);return Math.abs(e)>=1e4?e.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0}):Math.abs(e)>=100?e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):Math.abs(e)>=1?e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:4}):e.toLocaleString("en-US",{minimumFractionDigits:4,maximumFractionDigits:6})},formatTime:function(t){if(!t)return"";var e=new Date(t),a=function(t){return String(t).padStart(2,"0")};return"".concat(a(e.getMonth()+1),"-").concat(a(e.getDate())," ").concat(a(e.getHours()),":").concat(a(e.getMinutes()))}},beforeDestroy:function(){this.stopPolling()}},g=f,k=a(845),_=(0,k.A)(g,i,r,!1,null,"989be352",null),q=_.exports}}]); \ No newline at end of file diff --git a/frontend/dist/js/230.1c4c46a6.js b/frontend/dist/js/230.1c4c46a6.js new file mode 100644 index 0000000..ae90589 --- /dev/null +++ b/frontend/dist/js/230.1c4c46a6.js @@ -0,0 +1 @@ +"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[230],{90230:function(t,e,a){a.r(e),a.d(e,{default:function(){return Mt}});a(74423);var s=function(){var t,e=this,a=e._self._c;return a("div",{staticClass:"trading-assistant",class:{"theme-dark":e.isDarkTheme}},[e.showAssistantGuide?a("div",{staticClass:"assistant-guide-bar"},[a("div",{staticClass:"assistant-guide-copy"},[a("div",{staticClass:"assistant-guide-eyebrow"},[e._v(e._s(e.$t("trading-assistant.guide.eyebrow")))]),a("div",{staticClass:"assistant-guide-title"},[e._v(e._s(e.$t("trading-assistant.guide.title")))]),a("div",{staticClass:"assistant-guide-desc"},[e._v(e._s(e.$t("trading-assistant.guide.desc")))])]),a("div",{staticClass:"assistant-guide-steps"},[a("div",{staticClass:"assistant-step-card"},[a("div",{staticClass:"assistant-step-index"},[e._v("1")]),a("div",{staticClass:"assistant-step-body"},[a("div",{staticClass:"assistant-step-title"},[e._v(e._s(e.$t("trading-assistant.guide.step1Title")))]),a("div",{staticClass:"assistant-step-desc"},[e._v(e._s(e.$t("trading-assistant.guide.step1Desc")))])])]),a("div",{staticClass:"assistant-step-card"},[a("div",{staticClass:"assistant-step-index"},[e._v("2")]),a("div",{staticClass:"assistant-step-body"},[a("div",{staticClass:"assistant-step-title"},[e._v(e._s(e.$t("trading-assistant.guide.step2Title")))]),a("div",{staticClass:"assistant-step-desc"},[e._v(e._s(e.$t("trading-assistant.guide.step2Desc")))])])]),a("div",{staticClass:"assistant-step-card"},[a("div",{staticClass:"assistant-step-index"},[e._v("3")]),a("div",{staticClass:"assistant-step-body"},[a("div",{staticClass:"assistant-step-title"},[e._v(e._s(e.$t("trading-assistant.guide.step3Title")))]),a("div",{staticClass:"assistant-step-desc"},[e._v(e._s(e.$t("trading-assistant.guide.step3Desc")))])])])]),a("div",{staticClass:"assistant-guide-actions"},[a("a-button",{on:{click:e.goToStrategyTab}},[a("a-icon",{attrs:{type:"appstore"}}),e._v(" "+e._s(e.$t("trading-assistant.guide.secondary"))+" ")],1),a("a-button",{attrs:{type:"primary"},on:{click:e.openCreateStrategyFromGuide}},[a("a-icon",{attrs:{type:"plus"}}),e._v(" "+e._s(e.$t("trading-assistant.guide.primary"))+" ")],1),a("a-button",{staticClass:"assistant-guide-close",on:{click:e.dismissAssistantGuide}},[a("a-icon",{attrs:{type:"close"}})],1)],1)]):e._e(),a("a-tabs",{staticClass:"top-level-tabs",attrs:{animated:!1},model:{value:e.topTab,callback:function(t){e.topTab=t},expression:"topTab"}},[a("a-tab-pane",{key:"overview",attrs:{tab:e.$t("trading-assistant.tabs.overview")}},["overview"===e.topTab?a("dashboard-overview",{attrs:{"hide-setup-guide":!0}}):e._e()],1),a("a-tab-pane",{key:"strategy",attrs:{tab:e.$t("trading-assistant.tabs.strategyManage")}},[a("a-row",{staticClass:"strategy-layout",attrs:{gutter:24}},[a("a-col",{staticClass:"strategy-list-col",attrs:{xs:24,sm:24,md:10,lg:8,xl:8}},[a("a-card",{staticClass:"strategy-list-card",attrs:{bordered:!1}},[a("div",{staticClass:"card-title",attrs:{slot:"title"},slot:"title"},[a("span",[e._v(e._s(e.$t("trading-assistant.strategyList")))]),a("a-button",{attrs:{type:"primary",size:"small"},on:{click:e.handleCreateStrategy}},[a("a-icon",{attrs:{type:"plus"}}),e._v(" "+e._s(e.$t("trading-assistant.createStrategy"))+" ")],1)],1),a("div",{staticClass:"group-mode-switch"},[a("span",{staticClass:"group-mode-label"},[e._v(e._s(e.$t("trading-assistant.groupBy"))+":")]),a("a-radio-group",{attrs:{size:"small","button-style":"solid"},model:{value:e.groupByMode,callback:function(t){e.groupByMode=t},expression:"groupByMode"}},[a("a-radio-button",{attrs:{value:"strategy"}},[a("a-icon",{attrs:{type:"folder"}}),e._v(" "+e._s(e.$t("trading-assistant.groupByStrategy"))+" ")],1),a("a-radio-button",{attrs:{value:"symbol"}},[a("a-icon",{attrs:{type:"stock"}}),e._v(" "+e._s(e.$t("trading-assistant.groupBySymbol"))+" ")],1)],1)],1),a("a-spin",{attrs:{spinning:e.loading}},[e.loading||0!==e.strategies.length?a("div",{staticClass:"strategy-grouped-list"},[e._l(e.groupedStrategies.groups,function(t){return a("div",{key:t.id,staticClass:"strategy-group"},[a("div",{staticClass:"strategy-group-header",on:{click:function(a){return e.toggleGroup(t.id)}}},[a("div",{staticClass:"group-header-left"},[a("a-icon",{staticClass:"collapse-icon",attrs:{type:e.collapsedGroups[t.id]?"right":"down"}}),a("a-icon",{staticClass:"group-icon",attrs:{type:"symbol"===e.groupByMode?"stock":"folder"}}),a("span",{staticClass:"group-name"},[e._v(e._s(t.baseName))]),a("a-tag",{attrs:{size:"small",color:"blue"}},[e._v(e._s(t.strategies.length)+" "+e._s("symbol"===e.groupByMode?e.$t("trading-assistant.strategyCount"):e.$t("trading-assistant.symbolCount")))])],1),a("div",{staticClass:"group-header-right",on:{click:function(t){t.stopPropagation()}}},[t.runningCount>0?a("span",{staticClass:"group-status running"},[e._v(" "+e._s(t.runningCount)+" "+e._s(e.$t("trading-assistant.status.running"))+" ")]):e._e(),t.stoppedCount>0?a("span",{staticClass:"group-status stopped"},[e._v(" "+e._s(t.stoppedCount)+" "+e._s(e.$t("trading-assistant.status.stopped"))+" ")]):e._e(),a("a-dropdown",{attrs:{getPopupContainer:e.getDropdownContainer,trigger:["click"]}},[a("a-menu",{attrs:{slot:"overlay"},on:{click:function(a){var s=a.key;return e.handleGroupMenuClick(s,t)}},slot:"overlay"},[a("a-menu-item",{key:"startAll"},[a("a-icon",{attrs:{type:"play-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.startAll"))+" ")],1),a("a-menu-item",{key:"stopAll"},[a("a-icon",{attrs:{type:"pause-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.stopAll"))+" ")],1),a("a-menu-divider"),a("a-menu-item",{key:"deleteAll",staticClass:"danger-item"},[a("a-icon",{attrs:{type:"delete"}}),e._v(" "+e._s(e.$t("trading-assistant.deleteAll"))+" ")],1)],1),a("a-button",{attrs:{type:"link",icon:"more",size:"small"}})],1)],1)]),a("div",{directives:[{name:"show",rawName:"v-show",value:!e.collapsedGroups[t.id],expression:"!collapsedGroups[group.id]"}],staticClass:"strategy-group-content"},e._l(t.strategies,function(t){return a("div",{key:t.id,class:["strategy-list-item",{active:e.selectedStrategy&&e.selectedStrategy.id===t.id},{"strategy-list-item--strategy-group":"strategy"===e.groupByMode}],on:{click:function(a){return e.handleSelectStrategy(t)}}},[a("div",{staticClass:"strategy-item-content"},[a("div",{staticClass:"strategy-item-header"},[a("div",{class:["strategy-name-wrapper",{"strategy-name-wrapper--grouped":"symbol"===e.groupByMode}]},["strategy"===e.groupByMode?[a("span",{staticClass:"strategy-name"},[e._v(e._s(t.strategy_name))]),"PromptBasedStrategy"===t.strategy_type?a("a-tag",{staticClass:"strategy-type-tag",attrs:{color:"purple",size:"small"}},[a("a-icon",{staticStyle:{"margin-right":"2px"},attrs:{type:"robot"}}),e._v(" AI ")],1):e._e(),"script"===t.strategy_mode?a("a-tag",{staticStyle:{"margin-left":"4px"},attrs:{size:"small",color:"green"}},[a("a-icon",{staticStyle:{"margin-right":"2px"},attrs:{type:"code"}}),e._v(e._s(e.$t("trading-assistant.strategyMode.script"))+" ")],1):e._e()]:[a("span",{staticClass:"info-item strategy-name-text"},[a("a-icon",{attrs:{type:"thunderbolt"}}),e._v(" "+e._s(t.displayInfo?t.displayInfo.strategyName:t.strategy_name)+" ")],1),t.displayInfo&&t.displayInfo.timeframe?a("a-tag",{attrs:{size:"small",color:"cyan"}},[a("a-icon",{staticStyle:{"margin-right":"2px"},attrs:{type:"clock-circle"}}),e._v(" "+e._s(t.displayInfo.timeframe)+" ")],1):e._e(),t.displayInfo&&t.displayInfo.indicatorName&&"-"!==t.displayInfo.indicatorName?a("a-tag",{attrs:{size:"small",color:"purple"}},[a("a-icon",{staticStyle:{"margin-right":"2px"},attrs:{type:"line-chart"}}),e._v(" "+e._s(t.displayInfo.indicatorName)+" ")],1):e._e(),"script"===t.strategy_mode?a("a-tag",{staticStyle:{"margin-left":"4px"},attrs:{size:"small",color:"green"}},[a("a-icon",{staticStyle:{"margin-right":"2px"},attrs:{type:"code"}}),e._v(e._s(e.$t("trading-assistant.strategyMode.script"))+" ")],1):e._e()]],2)]),a("div",{staticClass:"strategy-item-info"},["strategy"===e.groupByMode?[t.trading_config&&t.trading_config.symbol?a("span",{staticClass:"info-item"},[a("a-icon",{attrs:{type:"dollar"}}),e._v(" "+e._s(t.trading_config.symbol)+" ")],1):e._e(),t.exchange_config&&t.exchange_config.exchange_id?a("span",{staticClass:"info-item"},[a("a-icon",{attrs:{type:"bank"}}),e._v(" "+e._s(e.getExchangeDisplayName(t.exchange_config.exchange_id))+" ")],1):e._e(),t.trading_config&&t.trading_config.timeframe?a("span",{staticClass:"info-item"},[a("a-icon",{attrs:{type:"clock-circle"}}),e._v(" "+e._s(t.trading_config.timeframe)+" ")],1):e._e()]:e._e(),a("span",{staticClass:"status-label",class:[t.status?"status-".concat(t.status):"",{"status-stopped":"stopped"===t.status}]},[e._v(" "+e._s(e.getStatusText(t.status))+" ")])],2)]),a("div",{staticClass:"strategy-item-actions",on:{click:function(t){t.stopPropagation()}}},[a("a-dropdown",{attrs:{getPopupContainer:e.getDropdownContainer,trigger:["click"]}},[a("a-menu",{attrs:{slot:"overlay"},on:{click:function(a){var s=a.key;return e.handleMenuClick(s,t)}},slot:"overlay"},["stopped"===t.status?a("a-menu-item",{key:"start"},[a("a-icon",{attrs:{type:"play-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.startStrategy"))+" ")],1):e._e(),"running"===t.status?a("a-menu-item",{key:"stop"},[a("a-icon",{attrs:{type:"pause-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.stopStrategy"))+" ")],1):e._e(),a("a-menu-divider"),a("a-menu-item",{key:"edit"},[a("a-icon",{attrs:{type:"edit"}}),e._v(" "+e._s(e.$t("trading-assistant.editStrategy"))+" ")],1),a("a-menu-item",{key:"backtest"},[a("a-icon",{attrs:{type:"experiment"}}),e._v(" "+e._s(e.$t("dashboard.indicator.action.backtest"))+" ")],1),a("a-menu-divider"),a("a-menu-item",{key:"delete",staticClass:"danger-item"},[a("a-icon",{attrs:{type:"delete"}}),e._v(" "+e._s(e.$t("trading-assistant.deleteStrategy"))+" ")],1)],1),a("a-button",{attrs:{type:"link",icon:"more",size:"small"}})],1)],1)])}),0)])}),e._l(e.groupedStrategies.ungrouped,function(t){return a("div",{key:t.id,class:["strategy-list-item",{active:e.selectedStrategy&&e.selectedStrategy.id===t.id}],on:{click:function(a){return e.handleSelectStrategy(t)}}},[a("div",{staticClass:"strategy-item-content"},[a("div",{staticClass:"strategy-item-header"},[a("div",{staticClass:"strategy-name-wrapper"},[t.exchange_config&&t.exchange_config.exchange_id?a("a-tag",{staticClass:"exchange-tag",attrs:{color:e.getExchangeTagColor(t.exchange_config.exchange_id),size:"small"}},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"bank"}}),e._v(" "+e._s(e.getExchangeDisplayName(t.exchange_config.exchange_id))+" ")],1):e._e(),a("span",{staticClass:"strategy-name"},[e._v(e._s(t.strategy_name))]),"PromptBasedStrategy"===t.strategy_type?a("a-tag",{staticClass:"strategy-type-tag",attrs:{color:"purple",size:"small"}},[a("a-icon",{staticStyle:{"margin-right":"2px"},attrs:{type:"robot"}}),e._v(" AI ")],1):e._e()],1)]),a("div",{staticClass:"strategy-item-info"},[t.trading_config&&t.trading_config.symbol?a("span",{staticClass:"info-item"},[a("a-icon",{attrs:{type:"dollar"}}),e._v(" "+e._s(t.trading_config.symbol)+" ")],1):e._e(),a("span",{staticClass:"status-label",class:[t.status?"status-".concat(t.status):"",{"status-stopped":"stopped"===t.status}]},[e._v(" "+e._s(e.getStatusText(t.status))+" ")])])]),a("div",{staticClass:"strategy-item-actions",on:{click:function(t){t.stopPropagation()}}},[a("a-dropdown",{attrs:{getPopupContainer:e.getDropdownContainer,trigger:["click"]}},[a("a-menu",{attrs:{slot:"overlay"},on:{click:function(a){var s=a.key;return e.handleMenuClick(s,t)}},slot:"overlay"},["stopped"===t.status?a("a-menu-item",{key:"start"},[a("a-icon",{attrs:{type:"play-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.startStrategy"))+" ")],1):e._e(),"running"===t.status?a("a-menu-item",{key:"stop"},[a("a-icon",{attrs:{type:"pause-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.stopStrategy"))+" ")],1):e._e(),a("a-menu-divider"),a("a-menu-item",{key:"edit"},[a("a-icon",{attrs:{type:"edit"}}),e._v(" "+e._s(e.$t("trading-assistant.editStrategy"))+" ")],1),a("a-menu-item",{key:"backtest"},[a("a-icon",{attrs:{type:"experiment"}}),e._v(" "+e._s(e.$t("dashboard.indicator.action.backtest"))+" ")],1),a("a-menu-divider"),a("a-menu-item",{key:"delete",staticClass:"danger-item"},[a("a-icon",{attrs:{type:"delete"}}),e._v(" "+e._s(e.$t("trading-assistant.deleteStrategy"))+" ")],1)],1),a("a-button",{attrs:{type:"link",icon:"more",size:"small"}})],1)],1)])})],2):a("div",{staticClass:"strategy-empty-state"},[a("a-empty",{attrs:{description:e.$t("trading-assistant.empty.title")}}),a("div",{staticClass:"strategy-empty-desc"},[e._v(e._s(e.$t("trading-assistant.empty.desc")))]),a("a-button",{attrs:{type:"primary"},on:{click:e.openCreateStrategyFromGuide}},[a("a-icon",{attrs:{type:"plus"}}),e._v(" "+e._s(e.$t("trading-assistant.empty.primary"))+" ")],1)],1)])],1)],1),a("a-col",{staticClass:"strategy-detail-col",attrs:{xs:24,sm:24,md:14,lg:16,xl:16}},[e.selectedStrategy?a("div",{staticClass:"strategy-detail-panel"},[a("a-card",{staticClass:"strategy-header-card",attrs:{bordered:!1}},[a("div",{staticClass:"strategy-header"},[a("div",{staticClass:"header-left"},[a("div",{staticClass:"strategy-title-row"},[a("h3",{staticClass:"strategy-title"},[e._v(e._s(e.selectedStrategy.strategy_name))]),a("div",{staticClass:"status-badge",class:["status-".concat(e.selectedStrategy.status)]},[a("span",{staticClass:"status-dot"}),e._v(" "+e._s(e.getStatusText(e.selectedStrategy.status))+" ")])]),a("div",{staticClass:"key-stats-grid"},[e.selectedStrategy.initial_capital||e.selectedStrategy.trading_config&&e.selectedStrategy.trading_config.initial_capital?a("div",{staticClass:"stat-card"},[a("div",{staticClass:"stat-icon investment"},[a("a-icon",{attrs:{type:"wallet"}})],1),a("div",{staticClass:"stat-content"},[a("div",{staticClass:"stat-label"},[e._v(e._s(e.$t("trading-assistant.detail.totalInvestment")))]),a("div",{staticClass:"stat-value"},[e._v("$"+e._s(parseFloat(e.selectedStrategy.initial_capital||(null===(t=e.selectedStrategy.trading_config)||void 0===t?void 0:t.initial_capital)||0).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})))])])]):e._e(),null!==e.currentEquity?a("div",{staticClass:"stat-card"},[a("div",{staticClass:"stat-icon equity"},[a("a-icon",{attrs:{type:"fund"}})],1),a("div",{staticClass:"stat-content"},[a("div",{staticClass:"stat-label"},[e._v(e._s(e.$t("trading-assistant.detail.currentEquity")))]),a("div",{staticClass:"stat-value",class:e.getEquityColorClass},[e._v(e._s(e.formatCurrency(e.currentEquity)))])])]):e._e(),null!==e.totalPnl?a("div",{staticClass:"stat-card pnl-card",class:{profit:e.totalPnl>0,loss:e.totalPnl<0}},[a("div",{staticClass:"stat-icon pnl"},[a("a-icon",{attrs:{type:e.totalPnl>=0?"rise":"fall"}})],1),a("div",{staticClass:"stat-content"},[a("div",{staticClass:"stat-label"},[e._v(e._s(e.$t("trading-assistant.detail.totalPnl")))]),a("div",{staticClass:"stat-value",class:e.getPnlColorClass},[e._v(" "+e._s(e.formatPnl(e.totalPnl))+" "),a("span",{staticClass:"pnl-percent"},[e._v("("+e._s(e.formatPnlPercent(e.totalPnlPercent))+")")])])])]):e._e()]),a("div",{staticClass:"strategy-tags"},[e.selectedStrategy.trading_config?a("div",{staticClass:"tag-item"},[a("a-icon",{attrs:{type:"stock"}}),a("span",[e._v(e._s(e.selectedStrategy.trading_config.symbol))])],1):e._e(),e.selectedStrategy.indicator_config&&e.selectedStrategy.indicator_config.indicator_name?a("div",{staticClass:"tag-item"},[a("a-icon",{attrs:{type:"line-chart"}}),a("span",[e._v(e._s(e.selectedStrategy.indicator_config.indicator_name))])],1):e._e(),e.selectedStrategy.trading_config?a("div",{staticClass:"tag-item"},[a("a-icon",{attrs:{type:"thunderbolt"}}),a("span",[e._v(e._s(e.selectedStrategy.trading_config.leverage||1)+"x")])],1):e._e(),e.selectedStrategy.trading_config&&e.selectedStrategy.trading_config.trade_direction?a("div",{staticClass:"tag-item"},[a("a-icon",{attrs:{type:"swap"}}),a("span",[e._v(e._s(e.getTradeDirectionText(e.selectedStrategy.trading_config.trade_direction)))])],1):e._e(),e.selectedStrategy.trading_config&&e.selectedStrategy.trading_config.timeframe?a("div",{staticClass:"tag-item"},[a("a-icon",{attrs:{type:"clock-circle"}}),a("span",[e._v(e._s(e.selectedStrategy.trading_config.timeframe))])],1):e._e()])]),a("div",{staticClass:"header-right"},["stopped"===e.selectedStrategy.status?a("a-button",{staticClass:"action-btn start-btn",attrs:{type:"primary",size:"large"},on:{click:function(t){return e.handleStartStrategy(e.selectedStrategy.id)}}},[a("a-icon",{attrs:{type:"play-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.startStrategy"))+" ")],1):e._e(),"running"===e.selectedStrategy.status?a("a-button",{staticClass:"action-btn stop-btn",attrs:{type:"danger",size:"large"},on:{click:function(t){return e.handleStopStrategy(e.selectedStrategy.id)}}},[a("a-icon",{attrs:{type:"pause-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.stopStrategy"))+" ")],1):e._e()],1)])]),a("a-card",{staticClass:"strategy-content-card",attrs:{bordered:!1}},[a("a-tabs",{attrs:{defaultActiveKey:"positions"}},[a("a-tab-pane",{key:"positions",attrs:{tab:e.$t("trading-assistant.tabs.positions")}},[a("position-records",{attrs:{"strategy-id":e.selectedStrategy.id,"market-type":e.selectedStrategy.trading_config&&e.selectedStrategy.trading_config.market_type||"swap",leverage:e.selectedStrategy.trading_config&&e.selectedStrategy.trading_config.leverage||1,loading:e.loadingRecords,"is-dark":e.isDarkTheme}})],1),a("a-tab-pane",{key:"trades",attrs:{tab:e.$t("trading-assistant.tabs.tradingRecords")}},[a("trading-records",{attrs:{"strategy-id":e.selectedStrategy.id,loading:e.loadingRecords,"is-dark":e.isDarkTheme}})],1),a("a-tab-pane",{key:"performance",attrs:{tab:e.$t("trading-assistant.tabs.performance")}},[a("performance-analysis",{attrs:{"strategy-id":e.selectedStrategy.id,"is-dark":e.isDarkTheme}})],1),a("a-tab-pane",{key:"logs",attrs:{tab:e.$t("trading-assistant.tabs.logs")}},[a("strategy-logs",{attrs:{"strategy-id":e.selectedStrategy.id,"is-dark":e.isDarkTheme}})],1)],1)],1)],1):a("div",{staticClass:"strategy-empty-detail"},[a("div",{staticClass:"strategy-empty-detail-card"},[a("div",{staticClass:"strategy-empty-detail-icon"},[a("a-icon",{attrs:{type:"deployment-unit"}})],1),a("h3",{staticClass:"strategy-empty-detail-title"},[e._v(e._s(e.$t("trading-assistant.emptyDetail.title")))]),a("p",{staticClass:"strategy-empty-detail-hint"},[e._v(e._s(e.$t("trading-assistant.emptyDetail.hint")))]),a("div",{staticClass:"strategy-empty-detail-actions"},[a("a-button",{attrs:{type:"primary"},on:{click:e.handleCreateStrategy}},[a("a-icon",{attrs:{type:"plus"}}),e._v(" "+e._s(e.$t("trading-assistant.createStrategy"))+" ")],1)],1)])])])],1),a("a-modal",{staticClass:"mode-selector-modal",attrs:{visible:e.showModeSelector,title:e.$t("trading-assistant.selectMode"),width:e.isMobile?"95%":700,footer:null,maskClosable:!0,bodyStyle:{padding:"16px 24px"}},on:{cancel:function(t){e.showModeSelector=!1}}},[a("strategy-type-selector",{attrs:{selected:e.strategyMode,"is-dark":e.isDarkTheme},on:{select:e.handleModeSelect,"use-template":e.handleUseTemplate}})],1),a("a-modal",{attrs:{visible:e.showFormModal,title:e.editingStrategy?e.$t("trading-assistant.editStrategy"):e.$t("trading-assistant.createStrategy")+("script"===e.strategyMode?" - "+e.$t("trading-assistant.strategyMode.script"):""),width:e.isMobile?"95%":1120,confirmLoading:e.saving,maskClosable:!1,wrapClassName:e.strategyFormWrapClass,bodyStyle:{maxHeight:"76vh",overflowY:"auto",paddingBottom:"8px"}},on:{ok:e.handleSubmit,cancel:e.handleCloseModal}},[a("a-spin",{attrs:{spinning:e.loadingIndicators}},[e.editingStrategy||"script"===e.strategyMode?e._e():a("div",{staticClass:"creation-mode-toggle"},[a("div",{staticClass:"mode-meta"},[a("div",{staticClass:"mode-title"},[e._v(e._s(e.$t("trading-assistant.selectMode")))]),a("div",{staticClass:"mode-hint"},[e._v(e._s(e.isSimpleMode?e.$t("trading-assistant.form.simpleModeHint"):e.$t("trading-assistant.form.advancedModeHint")))])]),a("a-radio-group",{attrs:{size:"small","button-style":"solid"},model:{value:e.creationMode,callback:function(t){e.creationMode=t},expression:"creationMode"}},[a("a-radio-button",{attrs:{value:"simple"}},[a("a-icon",{attrs:{type:"rocket"}}),e._v(" "+e._s(e.$t("trading-assistant.form.simpleMode"))+" ")],1),a("a-radio-button",{attrs:{value:"advanced"}},[a("a-icon",{attrs:{type:"setting"}}),e._v(" "+e._s(e.$t("trading-assistant.form.advancedMode"))+" ")],1)],1)],1),a("a-steps",{staticClass:"steps-container",attrs:{current:e.displayCurrentStep}},["script"===e.strategyMode?[a("a-step",{attrs:{title:e.$t("trading-assistant.form.simpleStep1")}}),a("a-step",{attrs:{title:e.$t("trading-assistant.editor.title")}}),a("a-step",{attrs:{title:e.$t("trading-assistant.form.step3Signal")}})]:[a("a-step",{attrs:{title:e.isSimpleMode&&!e.editingStrategy?e.$t("trading-assistant.form.simpleStep1"):e.$t("trading-assistant.form.step1")}}),e.isAdvancedMode||e.editingStrategy?a("a-step",{attrs:{title:e.$t("trading-assistant.form.step2Params")}}):e._e(),a("a-step",{attrs:{title:e.isSimpleMode&&!e.editingStrategy?e.$t("trading-assistant.form.simpleStep2"):e.$t("trading-assistant.form.step3Signal")}})]],2),a("div",{staticClass:"form-container"},[a("div",{directives:[{name:"show",rawName:"v-show",value:0===e.currentStep,expression:"currentStep === 0"}],staticClass:"step-content"},["indicator"===e.strategyType&&"script"!==e.strategyMode?a("div",[a("a-form",{attrs:{form:e.form,layout:"vertical"}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.indicator")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["indicator_id",{rules:[{required:!0,message:e.$t("trading-assistant.validation.indicatorRequired")}]}],expression:"['indicator_id', { rules: [{ required: true, message: $t('trading-assistant.validation.indicatorRequired') }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.selectIndicator"),"show-search":"",optionLabelProp:"label","filter-option":e.filterIndicatorOption,loading:e.loadingIndicators,getPopupContainer:function(t){return t.parentNode}},on:{focus:e.handleIndicatorSelectFocus,change:e.handleIndicatorChange}},e._l(e.availableIndicators,function(t){return a("a-select-option",{key:String(t.id),attrs:{value:String(t.id),label:e.getIndicatorOptionLabel(t)}},[a("div",{staticClass:"indicator-option"},[a("div",{staticClass:"indicator-option-main"},[a("span",{staticClass:"indicator-name"},[e._v(e._s(t.name))]),t.description?a("span",{staticClass:"indicator-option-desc"},[e._v(e._s(t.description))]):e._e()]),t.type?a("a-tag",{attrs:{size:"small",color:e.getIndicatorTypeColor(t.type)}},[e._v(" "+e._s(e.getIndicatorTypeName(t.type))+" ")]):e._e()],1)])}),1),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.indicatorHint"))+" ")]),e.loadingIndicators||e.availableIndicators&&0!==e.availableIndicators.length?e._e():a("a-alert",{staticStyle:{"margin-top":"12px"},attrs:{type:"info","show-icon":"",message:e.$t("trading-assistant.indicatorEmpty.title"),description:e.$t("trading-assistant.indicatorEmpty.desc")}},[a("template",{slot:"action"},[a("a-button",{attrs:{type:"primary",size:"small"},on:{click:e.goToIndicatorAnalysisCreate}},[a("a-icon",{attrs:{type:"rocket"}}),e._v(" "+e._s(e.$t("trading-assistant.indicatorEmpty.cta"))+" ")],1)],1)],2)],1),e.selectedIndicator?a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.indicatorDescription")}},[a("div",{staticClass:"selected-indicator-card"},[a("div",{staticClass:"selected-indicator-header"},[a("span",{staticClass:"selected-indicator-name"},[e._v(e._s(e.selectedIndicator.name))]),e.selectedIndicator.type?a("a-tag",{attrs:{size:"small",color:e.getIndicatorTypeColor(e.selectedIndicator.type)}},[e._v(" "+e._s(e.getIndicatorTypeName(e.selectedIndicator.type))+" ")]):e._e()],1),a("div",{staticClass:"indicator-description"},[e._v(" "+e._s(e.selectedIndicator.description||e.$t("trading-assistant.form.noDescription"))+" ")])])]):e._e(),e.indicatorParams.length>0?a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.indicatorParams")}},[a("div",{staticClass:"indicator-params-form"},[a("a-row",{attrs:{gutter:16}},e._l(e.indicatorParams,function(t){return a("a-col",{key:t.name,attrs:{xs:24,sm:12,md:8}},[a("div",{staticClass:"param-item"},[a("label",{staticClass:"param-label"},[e._v(" "+e._s(t.name)+" "),t.description?a("a-tooltip",{attrs:{title:t.description}},[a("a-icon",{staticStyle:{"margin-left":"4px",color:"#999"},attrs:{type:"question-circle"}})],1):e._e()],1),"int"===t.type?a("a-input-number",{staticStyle:{width:"100%"},attrs:{precision:0,size:"small"},model:{value:e.indicatorParamValues[t.name],callback:function(a){e.$set(e.indicatorParamValues,t.name,a)},expression:"indicatorParamValues[param.name]"}}):"float"===t.type?a("a-input-number",{staticStyle:{width:"100%"},attrs:{precision:4,size:"small"},model:{value:e.indicatorParamValues[t.name],callback:function(a){e.$set(e.indicatorParamValues,t.name,a)},expression:"indicatorParamValues[param.name]"}}):"bool"===t.type?a("a-switch",{attrs:{size:"small"},model:{value:e.indicatorParamValues[t.name],callback:function(a){e.$set(e.indicatorParamValues,t.name,a)},expression:"indicatorParamValues[param.name]"}}):a("a-input",{attrs:{size:"small"},model:{value:e.indicatorParamValues[t.name],callback:function(a){e.$set(e.indicatorParamValues,t.name,a)},expression:"indicatorParamValues[param.name]"}})],1)])}),1),a("div",{staticClass:"form-item-hint",staticStyle:{"margin-top":"8px"}},[e._v(" "+e._s(e.$t("trading-assistant.form.indicatorParamsHint"))+" ")])],1)]):e._e(),a("a-divider"),a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.strategyName")}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["strategy_name",{rules:[{required:!0,message:e.$t("trading-assistant.validation.strategyNameRequired")}]}],expression:"['strategy_name', { rules: [{ required: true, message: $t('trading-assistant.validation.strategyNameRequired') }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.inputStrategyName")}}),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.strategyNameHint"))+" ")])],1),e.isSimpleMode&&!e.editingStrategy?a("div",{staticClass:"simple-essentials-card"},[a("div",{staticClass:"simple-mode-hero"},[a("div",{staticClass:"simple-mode-hero-main"},[a("div",{staticClass:"simple-mode-kicker"},[e._v(e._s(e.$t("trading-assistant.form.simpleModePreset")))]),a("div",{staticClass:"simple-mode-hero-desc"},[e._v(e._s(e.$t("trading-assistant.form.simpleModePresetValue")))])]),a("div",{staticClass:"simple-mode-badges"},[a("a-tag",[e._v("15m")]),a("a-tag",{attrs:{color:"blue"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeFutures")))]),a("a-tag",{attrs:{color:"purple"}},[e._v("5x")])],1)]),a("div",{staticClass:"section-block-title"},[a("span",[e._v(e._s(e.$t("trading-assistant.form.simpleModeSectionCore")))]),a("span",{staticClass:"section-block-desc"},[e._v(e._s(e.$t("trading-assistant.form.simpleModeSectionCoreDesc")))])]),a("a-form-item",{staticClass:"compact-form-item"},[a("span",{staticClass:"required-label",attrs:{slot:"label"},slot:"label"},[a("span",{staticClass:"required-star"},[e._v("*")]),e._v(e._s(e.$t("trading-assistant.form.symbol"))+" ")]),a("a-select",{attrs:{value:e.selectedSymbols[0],placeholder:e.$t("trading-assistant.placeholders.selectSymbol"),"show-search":"","filter-option":e.filterWatchlistOptionWithAdd,loading:e.loadingWatchlist,"allow-clear":"",getPopupContainer:function(t){return t.parentNode}},on:{change:e.handleSimpleSymbolChange}},[e._l(e.watchlist,function(t){return a("a-select-option",{key:"".concat(t.market,":").concat(t.symbol),attrs:{value:"".concat(t.market,":").concat(t.symbol)}},[a("div",{staticClass:"symbol-option"},[a("a-tag",{staticStyle:{"margin-right":"8px","margin-bottom":"0"},attrs:{color:e.getMarketColor(t.market)}},[e._v(" "+e._s(t.market)+" ")]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.symbol))]),t.name?a("span",{staticClass:"symbol-name-extra"},[e._v(e._s(t.name))]):e._e()],1)])}),a("a-select-option",{key:"__add_symbol_option__",staticClass:"add-symbol-option",attrs:{value:"__add_symbol_option__"}},[a("div",{staticStyle:{width:"100%","text-align":"center",padding:"4px 0",color:"#1890ff",cursor:"pointer"}},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"plus"}}),a("span",[e._v(e._s(e.$t("trading-assistant.form.addSymbol")))])],1)])],2),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.symbolHintCrypto"))+" ")])],1),a("a-row",{staticClass:"compact-grid-row",attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.initialCapital")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["initial_capital",{rules:[{required:!0,message:e.$t("trading-assistant.validation.initialCapitalRequired")}],initialValue:1e3}],expression:"['initial_capital', { rules: [{ required: true, message: $t('trading-assistant.validation.initialCapitalRequired') }], initialValue: 1000 }]"}],staticStyle:{width:"100%"},attrs:{min:10,step:100,precision:2}})],1)],1),a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.leverage")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["leverage",{initialValue:5,rules:[{required:!0,message:e.$t("trading-assistant.validation.leverageRequired")}]}],expression:"['leverage', { initialValue: 5, rules: [{ required: true, message: $t('trading-assistant.validation.leverageRequired') }] }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:"spot"===e.form.getFieldValue("market_type")?1:125,step:1,disabled:"spot"===e.form.getFieldValue("market_type")}})],1)],1)],1),a("a-row",{staticClass:"compact-grid-row",attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.marketType")}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["market_type",{initialValue:"swap"}],expression:"['market_type', { initialValue: 'swap' }]"}],on:{change:e.handleMarketTypeChange}},[a("a-radio",{attrs:{value:"swap"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeFutures")))]),a("a-radio",{attrs:{value:"spot"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeSpot")))])],1)],1)],1),a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.tradeDirection")}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["trade_direction",{initialValue:"long"}],expression:"['trade_direction', { initialValue: 'long' }]"}],attrs:{disabled:"spot"===e.form.getFieldValue("market_type")}},[a("a-radio",{attrs:{value:"long"}},[e._v(e._s(e.$t("trading-assistant.form.tradeDirectionLong")))]),a("a-radio",{attrs:{value:"short",disabled:"spot"===e.form.getFieldValue("market_type")}},[e._v(" "+e._s(e.$t("trading-assistant.form.tradeDirectionShort"))+" ")]),a("a-radio",{attrs:{value:"both",disabled:"spot"===e.form.getFieldValue("market_type")}},[e._v(" "+e._s(e.$t("trading-assistant.form.tradeDirectionBoth"))+" ")])],1)],1)],1)],1),a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.klinePeriod")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["timeframe",{initialValue:"15m",rules:[{required:!0}]}],expression:"['timeframe', { initialValue: '15m', rules: [{ required: true }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.selectKlinePeriod"),getPopupContainer:function(t){return t.parentNode}}},[a("a-select-option",{attrs:{value:"1m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1m")))]),a("a-select-option",{attrs:{value:"5m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe5m")))]),a("a-select-option",{attrs:{value:"15m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe15m")))]),a("a-select-option",{attrs:{value:"30m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe30m")))]),a("a-select-option",{attrs:{value:"1H"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1H")))]),a("a-select-option",{attrs:{value:"4H"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe4H")))]),a("a-select-option",{attrs:{value:"1D"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1D")))])],1)],1)],1):e._e(),e.isAdvancedMode||e.editingStrategy?a("div",{staticClass:"advanced-settings-shell"},[a("div",{staticClass:"section-block-title"},[a("span",[e._v(e._s(e.$t("trading-assistant.form.advancedMode")))]),a("span",{staticClass:"section-block-desc"},[e._v(e._s(e.$t("trading-assistant.form.advancedModeHint")))])]),a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.strategyType")}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["cs_strategy_type",{initialValue:"single"}],expression:"['cs_strategy_type', { initialValue: 'single' }]"}],on:{change:e.handleStrategyTypeChange}},[a("a-radio",{attrs:{value:"single"}},[e._v(e._s(e.$t("trading-assistant.form.strategyTypeSingle")))]),a("a-radio",{attrs:{value:"cross_sectional"}},[e._v(e._s(e.$t("trading-assistant.form.strategyTypeCrossSectional")))])],1),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.strategyTypeHint"))+" ")])],1)],1):e._e(),(e.isAdvancedMode||e.editingStrategy)&&"cross_sectional"===e.form.getFieldValue("cs_strategy_type")?[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.symbolList")}},[a("a-select",{attrs:{mode:"multiple",placeholder:e.$t("trading-assistant.placeholders.selectSymbols"),"show-search":"","filter-option":e.filterWatchlistOptionWithAdd,loading:e.loadingWatchlist,getPopupContainer:function(t){return t.parentNode},maxTagCount:5},on:{change:e.handleCrossSectionalSymbolChange},model:{value:e.crossSectionalSymbols,callback:function(t){e.crossSectionalSymbols=t},expression:"crossSectionalSymbols"}},[e._l(e.watchlist,function(t){return a("a-select-option",{key:"".concat(t.market,":").concat(t.symbol),attrs:{value:"".concat(t.market,":").concat(t.symbol)}},[a("div",{staticClass:"symbol-option"},[a("a-tag",{staticStyle:{"margin-right":"8px","margin-bottom":"0"},attrs:{color:e.getMarketColor(t.market)}},[e._v(" "+e._s(t.market)+" ")]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.symbol))]),t.name?a("span",{staticClass:"symbol-name-extra"},[e._v(e._s(t.name))]):e._e()],1)])}),a("a-select-option",{key:"__add_symbol_option__",staticClass:"add-symbol-option",attrs:{value:"__add_symbol_option__"}},[a("div",{staticStyle:{width:"100%","text-align":"center",padding:"4px 0",color:"#1890ff",cursor:"pointer"}},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"plus"}}),a("span",[e._v(e._s(e.$t("trading-assistant.form.addSymbol")))])],1)])],2),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.symbolListHint"))+" ")])],1),a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.portfolioSize")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["portfolio_size",{initialValue:10,rules:[{required:!0,message:e.$t("trading-assistant.validation.portfolioSizeRequired")}]}],expression:"['portfolio_size', { initialValue: 10, rules: [{ required: true, message: $t('trading-assistant.validation.portfolioSizeRequired') }] }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:100,step:1}}),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.portfolioSizeHint"))+" ")])],1)],1),a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.longRatio")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["long_ratio",{initialValue:.5,rules:[{required:!0,message:e.$t("trading-assistant.validation.longRatioRequired")}]}],expression:"['long_ratio', { initialValue: 0.5, rules: [{ required: true, message: $t('trading-assistant.validation.longRatioRequired') }] }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:1,step:.1,precision:2}}),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.longRatioHint"))+" ")])],1)],1)],1),a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.rebalanceFrequency")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["rebalance_frequency",{initialValue:"daily"}],expression:"['rebalance_frequency', { initialValue: 'daily' }]"}],staticStyle:{width:"100%"}},[a("a-select-option",{attrs:{value:"daily"}},[e._v(e._s(e.$t("trading-assistant.form.rebalanceDaily")))]),a("a-select-option",{attrs:{value:"weekly"}},[e._v(e._s(e.$t("trading-assistant.form.rebalanceWeekly")))]),a("a-select-option",{attrs:{value:"monthly"}},[e._v(e._s(e.$t("trading-assistant.form.rebalanceMonthly")))])],1),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.rebalanceFrequencyHint"))+" ")])],1)]:e._e(),(e.isAdvancedMode||e.editingStrategy)&&"cross_sectional"!==e.form.getFieldValue("cs_strategy_type")?a("a-form-item",{attrs:{label:e.isEditMode?e.$t("trading-assistant.form.symbol"):e.$t("trading-assistant.form.symbols")}},[e.isEditMode?a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["symbol",{rules:[{required:!0,message:e.$t("trading-assistant.validation.symbolRequired")}]}],expression:"['symbol', { rules: [{ required: true, message: $t('trading-assistant.validation.symbolRequired') }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.selectSymbol"),"show-search":"","filter-option":e.filterWatchlistOption,loading:e.loadingWatchlist,getPopupContainer:function(t){return t.parentNode}},on:{change:e.handleWatchlistSymbolChange}},[e._l(e.watchlist,function(t){return a("a-select-option",{key:"".concat(t.market,":").concat(t.symbol),attrs:{value:"".concat(t.market,":").concat(t.symbol)}},[a("div",{staticClass:"symbol-option"},[a("a-tag",{staticStyle:{"margin-right":"8px","margin-bottom":"0"},attrs:{color:e.getMarketColor(t.market)}},[e._v(" "+e._s(t.market)+" ")]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.symbol))]),t.name?a("span",{staticClass:"symbol-name-extra"},[e._v(e._s(t.name))]):e._e()],1)])}),a("a-select-option",{key:"__add_symbol_option__",staticClass:"add-symbol-option",attrs:{value:"__add_symbol_option__"}},[a("div",{staticStyle:{width:"100%","text-align":"center",padding:"4px 0",color:"#1890ff",cursor:"pointer"}},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"plus"}}),a("span",[e._v(e._s(e.$t("trading-assistant.form.addSymbol")))])],1)])],2):a("a-select",{attrs:{mode:"multiple",placeholder:e.$t("trading-assistant.placeholders.selectSymbols"),"show-search":"","filter-option":e.filterWatchlistOptionWithAdd,loading:e.loadingWatchlist,getPopupContainer:function(t){return t.parentNode},maxTagCount:3},on:{change:e.handleMultiSymbolChangeWithAdd},model:{value:e.selectedSymbols,callback:function(t){e.selectedSymbols=t},expression:"selectedSymbols"}},[e._l(e.watchlist,function(t){return a("a-select-option",{key:"".concat(t.market,":").concat(t.symbol),attrs:{value:"".concat(t.market,":").concat(t.symbol)}},[a("div",{staticClass:"symbol-option"},[a("a-tag",{staticStyle:{"margin-right":"8px","margin-bottom":"0"},attrs:{color:e.getMarketColor(t.market)}},[e._v(" "+e._s(t.market)+" ")]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.symbol))]),t.name?a("span",{staticClass:"symbol-name-extra"},[e._v(e._s(t.name))]):e._e()],1)])}),a("a-select-option",{key:"__add_symbol_option__",staticClass:"add-symbol-option",attrs:{value:"__add_symbol_option__"}},[a("div",{staticStyle:{width:"100%","text-align":"center",padding:"4px 0",color:"#1890ff",cursor:"pointer"}},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"plus"}}),a("span",[e._v(e._s(e.$t("trading-assistant.form.addSymbol")))])],1)])],2),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.isEditMode?e.$t("trading-assistant.form.symbolHintCrypto"):e.$t("trading-assistant.form.symbolsHint"))+" ")])],1):e._e(),e.isAdvancedMode||e.editingStrategy?a("div",[a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:24,md:12,lg:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.initialCapital")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["initial_capital",{rules:[{required:!0,message:e.$t("trading-assistant.validation.initialCapitalRequired")}],initialValue:1e3}],expression:"['initial_capital', { rules: [{ required: true, message: $t('trading-assistant.validation.initialCapitalRequired') }], initialValue: 1000 }]"}],staticStyle:{width:"100%"},attrs:{min:10,step:100,precision:2}})],1)],1),a("a-col",{attrs:{xs:24,sm:24,md:12,lg:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.marketType")}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["market_type",{initialValue:"swap"}],expression:"['market_type', { initialValue: 'swap' }]"}],on:{change:e.handleMarketTypeChange}},[a("a-radio",{attrs:{value:"swap"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeFutures")))]),a("a-radio",{attrs:{value:"spot"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeSpot")))])],1),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.marketTypeHint"))+" ")])],1)],1)],1),a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:24,md:12,lg:12}},[a("a-form-item",{attrs:{label:"".concat(e.$t("trading-assistant.form.leverage")," (x)")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["leverage",{initialValue:5,rules:[{required:!0,message:e.$t("trading-assistant.validation.leverageRequired")}]}],expression:"['leverage', { initialValue: 5, rules: [{ required: true, message: $t('trading-assistant.validation.leverageRequired') }] }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:"spot"===e.form.getFieldValue("market_type")?1:125,step:1,disabled:"spot"===e.form.getFieldValue("market_type")}}),a("div",{staticClass:"form-item-hint"},["spot"===e.form.getFieldValue("market_type")?a("span",[e._v(" "+e._s(e.$t("trading-assistant.form.spotLeverageFixed"))+" ")]):a("span",[e._v(" "+e._s(e.$t("trading-assistant.form.leverageHint"))+" ")])])],1)],1),a("a-col",{attrs:{xs:24,sm:24,md:12,lg:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.tradeDirection")}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["trade_direction",{initialValue:"long"}],expression:"['trade_direction', { initialValue: 'long' }]"}],attrs:{disabled:"spot"===e.form.getFieldValue("market_type")}},[a("a-radio",{attrs:{value:"long"}},[e._v(e._s(e.$t("trading-assistant.form.tradeDirectionLong")))]),a("a-radio",{attrs:{value:"short",disabled:"spot"===e.form.getFieldValue("market_type")}},[e._v(" "+e._s(e.$t("trading-assistant.form.tradeDirectionShort"))+" ")]),a("a-radio",{attrs:{value:"both",disabled:"spot"===e.form.getFieldValue("market_type")}},[e._v(" "+e._s(e.$t("trading-assistant.form.tradeDirectionBoth"))+" ")])],1),"spot"===e.form.getFieldValue("market_type")?a("div",{staticClass:"form-item-hint",staticStyle:{color:"#ff9800"}},[e._v(" "+e._s(e.$t("trading-assistant.form.spotOnlyLongHint"))+" ")]):e._e()],1)],1)],1),a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:24,md:12,lg:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.klinePeriod")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["timeframe",{initialValue:"15m",rules:[{required:!0}]}],expression:"['timeframe', { initialValue: '15m', rules: [{ required: true }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.selectKlinePeriod"),getPopupContainer:function(t){return t.parentNode}}},[a("a-select-option",{attrs:{value:"1m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1m")))]),a("a-select-option",{attrs:{value:"5m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe5m")))]),a("a-select-option",{attrs:{value:"15m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe15m")))]),a("a-select-option",{attrs:{value:"30m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe30m")))]),a("a-select-option",{attrs:{value:"1H"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1H")))]),a("a-select-option",{attrs:{value:"4H"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe4H")))]),a("a-select-option",{attrs:{value:"1D"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1D")))])],1)],1)],1),a("a-col",{attrs:{xs:24,sm:24,md:12,lg:12}})],1)],1):e._e()],2)],1):e._e(),"script"===e.strategyMode?a("div",[a("a-form",{attrs:{form:e.form,layout:"vertical"}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.strategyName")}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["strategy_name",{rules:[{required:!0,message:e.$t("trading-assistant.validation.strategyNameRequired")}]}],expression:"['strategy_name', { rules: [{ required: true, message: $t('trading-assistant.validation.strategyNameRequired') }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.inputStrategyName")}})],1),a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.symbol")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["symbol",{rules:[{required:!0,message:e.$t("trading-assistant.validation.symbolRequired")}]}],expression:"['symbol', { rules: [{ required: true, message: $t('trading-assistant.validation.symbolRequired') }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.selectSymbol"),"show-search":"","filter-option":e.filterWatchlistOption,loading:e.loadingWatchlist,getPopupContainer:function(t){return t.parentNode}},on:{change:e.handleWatchlistSymbolChange}},e._l(e.watchlist,function(t){return a("a-select-option",{key:"".concat(t.market,":").concat(t.symbol),attrs:{value:"".concat(t.market,":").concat(t.symbol)}},[a("div",{staticClass:"symbol-option"},[a("a-tag",{staticStyle:{"margin-right":"8px","margin-bottom":"0"},attrs:{color:e.getMarketColor(t.market)}},[e._v(" "+e._s(t.market)+" ")]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.symbol))]),t.name?a("span",{staticClass:"symbol-name-extra"},[e._v(e._s(t.name))]):e._e()],1)])}),1)],1),a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.initialCapital")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["initial_capital",{initialValue:1e3,rules:[{required:!0}]}],expression:"['initial_capital', { initialValue: 1000, rules: [{ required: true }] }]"}],staticStyle:{width:"100%"},attrs:{min:10,step:100,precision:2}})],1)],1),a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.klinePeriod")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["timeframe",{initialValue:"15m",rules:[{required:!0}]}],expression:"['timeframe', { initialValue: '15m', rules: [{ required: true }] }]"}],attrs:{getPopupContainer:function(t){return t.parentNode}}},[a("a-select-option",{attrs:{value:"1m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1m")))]),a("a-select-option",{attrs:{value:"5m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe5m")))]),a("a-select-option",{attrs:{value:"15m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe15m")))]),a("a-select-option",{attrs:{value:"30m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe30m")))]),a("a-select-option",{attrs:{value:"1H"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1H")))]),a("a-select-option",{attrs:{value:"4H"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe4H")))]),a("a-select-option",{attrs:{value:"1D"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1D")))])],1)],1)],1)],1),a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.marketType")}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["market_type",{initialValue:"swap"}],expression:"['market_type', { initialValue: 'swap' }]"}]},[a("a-radio",{attrs:{value:"swap"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeFutures")))]),a("a-radio",{attrs:{value:"spot"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeSpot")))])],1)],1)],1),a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:"".concat(e.$t("trading-assistant.form.leverage")," (x)")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["leverage",{initialValue:5}],expression:"['leverage', { initialValue: 5 }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:125,step:1}})],1)],1)],1),a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.tradeDirection")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["trade_direction",{initialValue:"both"}],expression:"['trade_direction', { initialValue: 'both' }]"}],attrs:{getPopupContainer:function(t){return t.parentNode}}},[a("a-select-option",{attrs:{value:"long"}},[e._v(e._s(e.$t("trading-assistant.form.tradeDirectionLong")))]),a("a-select-option",{attrs:{value:"short"}},[e._v(e._s(e.$t("trading-assistant.form.tradeDirectionShort")))]),a("a-select-option",{attrs:{value:"both"}},[e._v(e._s(e.$t("trading-assistant.form.tradeDirectionBoth")))])],1)],1)],1),a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.commission")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["commission",{initialValue:.05}],expression:"['commission', { initialValue: 0.05 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:100,step:.01,precision:4}})],1)],1)],1),a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.slippage")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["slippage",{initialValue:0}],expression:"['slippage', { initialValue: 0 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:100,step:.01,precision:4}})],1)],1)],1)],1)],1):e._e()]),"script"===e.strategyMode?a("div",{directives:[{name:"show",rawName:"v-show",value:1===e.currentStep,expression:"currentStep === 1"}],staticClass:"step-content"},[a("strategy-editor",{ref:"strategyEditor",attrs:{"is-dark":e.isDarkTheme,"user-id":1,visible:e.showFormModal&&"script"===e.strategyMode&&1===e.currentStep,"initial-template-key":e.pendingScriptTemplateKey},model:{value:e.strategyCode,callback:function(t){e.strategyCode=t},expression:"strategyCode"}})],1):e._e(),a("div",{directives:[{name:"show",rawName:"v-show",value:"script"!==e.strategyMode&&1===e.currentStep,expression:"strategyMode !== 'script' && currentStep === 1"}],staticClass:"step-content"},["indicator"===e.strategyType?a("div",[a("a-form",{attrs:{form:e.form,layout:"vertical"}},[a("a-collapse",{staticClass:"strategy-params-collapse",attrs:{bordered:!1},model:{value:e.backtestCollapseKeys,callback:function(t){e.backtestCollapseKeys=t},expression:"backtestCollapseKeys"}},[a("a-collapse-panel",{key:"risk",attrs:{header:e.$t("dashboard.indicator.backtest.panel.risk")}},[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.stopLossPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["stop_loss_pct",{initialValue:3}],expression:"['stop_loss_pct', { initialValue: 3 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.01,precision:4}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.takeProfitPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["take_profit_pct",{initialValue:6}],expression:"['take_profit_pct', { initialValue: 6 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trailingEnabled")}},[a("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["trailing_enabled",{valuePropName:"checked",initialValue:!1}],expression:"['trailing_enabled', { valuePropName: 'checked', initialValue: false }]"}],on:{change:e.onTrailingToggle}})],1)],1),a("a-col",{attrs:{span:12}})],1),e.trailingEnabledUi?[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trailingStopPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trailing_stop_pct",{initialValue:0}],expression:"['trailing_stop_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.01,precision:4}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trailingActivationPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trailing_activation_pct",{initialValue:0}],expression:"['trailing_activation_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1)],1)]:e._e()],2),a("a-collapse-panel",{key:"scale",attrs:{header:e.$t("dashboard.indicator.backtest.panel.scale")}},[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendAddEnabled")}},[a("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_add_enabled",{valuePropName:"checked",initialValue:!1}],expression:"['trend_add_enabled', { valuePropName: 'checked', initialValue: false }]"}],on:{change:e.onTrendAddToggle}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.dcaAddEnabled")}},[a("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["dca_add_enabled",{valuePropName:"checked",initialValue:!1}],expression:"['dca_add_enabled', { valuePropName: 'checked', initialValue: false }]"}],on:{change:e.onDcaAddToggle}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendAddStepPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_add_step_pct",{initialValue:0}],expression:"['trend_add_step_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4},on:{change:e.onScaleParamsChange}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.dcaAddStepPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["dca_add_step_pct",{initialValue:0}],expression:"['dca_add_step_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4},on:{change:e.onScaleParamsChange}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendAddSizePct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_add_size_pct",{initialValue:0}],expression:"['trend_add_size_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4},on:{change:e.onScaleParamsChange}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.dcaAddSizePct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["dca_add_size_pct",{initialValue:0}],expression:"['dca_add_size_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4},on:{change:e.onScaleParamsChange}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendAddMaxTimes")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_add_max_times",{initialValue:0}],expression:"['trend_add_max_times', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:50,step:1,precision:0},on:{change:e.onScaleParamsChange}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.dcaAddMaxTimes")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["dca_add_max_times",{initialValue:0}],expression:"['dca_add_max_times', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:50,step:1,precision:0},on:{change:e.onScaleParamsChange}})],1)],1)],1)],1),a("a-collapse-panel",{key:"reduce",attrs:{header:e.$t("dashboard.indicator.backtest.panel.reduce")}},[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendReduceEnabled")}},[a("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_reduce_enabled",{valuePropName:"checked",initialValue:!1}],expression:"['trend_reduce_enabled', { valuePropName: 'checked', initialValue: false }]"}]})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.adverseReduceEnabled")}},[a("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverse_reduce_enabled",{valuePropName:"checked",initialValue:!1}],expression:"['adverse_reduce_enabled', { valuePropName: 'checked', initialValue: false }]"}]})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendReduceStepPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_reduce_step_pct",{initialValue:0}],expression:"['trend_reduce_step_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.adverseReduceStepPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverse_reduce_step_pct",{initialValue:0}],expression:"['adverse_reduce_step_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendReduceSizePct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_reduce_size_pct",{initialValue:0}],expression:"['trend_reduce_size_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.adverseReduceSizePct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverse_reduce_size_pct",{initialValue:0}],expression:"['adverse_reduce_size_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendReduceMaxTimes")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_reduce_max_times",{initialValue:0}],expression:"['trend_reduce_max_times', { initialValue: 0 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:50,step:1,precision:0}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.adverseReduceMaxTimes")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverse_reduce_max_times",{initialValue:0}],expression:"['adverse_reduce_max_times', { initialValue: 0 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:50,step:1,precision:0}})],1)],1)],1)],1),a("a-collapse-panel",{key:"position",attrs:{header:e.$t("dashboard.indicator.backtest.panel.position")}},[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.entryPct"),help:e.$t("dashboard.indicator.backtest.hint.entryPctMax",{maxPct:Number(e.entryPctMaxUi||0).toFixed(0)})}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["entry_pct",{initialValue:100}],expression:"['entry_pct', { initialValue: 100 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:e.entryPctMaxUi,step:.1,precision:4},on:{change:e.onEntryPctChange}})],1)],1),a("a-col",{attrs:{span:12}})],1)],1)],1),a("div",{staticClass:"ai-filter-box"},[a("div",{staticClass:"ai-filter-header"},[a("div",{staticClass:"ai-filter-title"},[a("a-icon",{attrs:{type:"robot"}}),a("span",[e._v(e._s(e.$t("trading-assistant.form.enableAiFilter")))])],1),a("a-switch",{attrs:{checked:e.aiFilterEnabledUi},on:{change:e.onAiFilterToggle}})],1),a("div",{staticClass:"ai-filter-hint"},[e._v(e._s(e.$t("trading-assistant.form.enableAiFilterHint")))])])],1)],1):e._e()]),a("div",{directives:[{name:"show",rawName:"v-show",value:2===e.currentStep,expression:"currentStep === 2"}],staticClass:"step-content"},[a("a-form",{attrs:{form:e.form,layout:"vertical",autocomplete:"off"}},[a("div",{staticClass:"execution-step-layout"},[a("div",{staticClass:"execution-step-hero"},[a("div",{staticClass:"simple-mode-kicker"},[e._v(e._s(e.$t("trading-assistant.form.step2HeroTitle")))]),a("div",{staticClass:"execution-step-hero-desc"},[e._v(e._s(e.$t("trading-assistant.form.step2HeroDesc")))])]),a("div",{staticClass:"execution-section-card"},[a("div",{staticClass:"section-block-title"},[a("span",[e._v(e._s(e.$t("trading-assistant.form.executionSectionTitle")))]),a("span",{staticClass:"section-block-desc"},[e._v(e._s(e.$t("trading-assistant.form.executionSectionDesc")))])]),a("a-form-item",{staticClass:"compact-form-item",attrs:{label:e.$t("trading-assistant.form.executionMode")}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["execution_mode",{initialValue:"signal"}],expression:"['execution_mode', { initialValue: 'signal' }]"}],staticStyle:{display:"none"}}),a("div",{staticClass:"execution-mode-cards"},[a("div",{class:["execution-mode-card",{active:"signal"===e.executionModeUi}],on:{click:function(t){return e.setExecutionModeUi("signal")}}},[a("div",{staticClass:"execution-mode-card-icon signal"},[a("a-icon",{attrs:{type:"notification"}})],1),a("div",{staticClass:"execution-mode-card-body"},[a("div",{staticClass:"execution-mode-card-title"},[e._v(e._s(e.$t("trading-assistant.form.executionModeSignal")))]),a("div",{staticClass:"execution-mode-card-desc"},[e._v(e._s(e.$t("trading-assistant.form.executionModeSignalDesc")))])]),"signal"===e.executionModeUi?a("a-icon",{staticClass:"execution-mode-card-check",attrs:{type:"check-circle",theme:"filled"}}):e._e()],1),a("div",{class:["execution-mode-card","live-card",{active:"live"===e.executionModeUi,disabled:!e.canUseLiveTrading}],on:{click:function(t){e.canUseLiveTrading&&e.setExecutionModeUi("live")}}},[a("div",{staticClass:"execution-mode-card-icon live"},[a("a-icon",{attrs:{type:"thunderbolt"}})],1),a("div",{staticClass:"execution-mode-card-body"},[a("div",{staticClass:"execution-mode-card-title"},[e._v(e._s(e.$t("trading-assistant.form.executionModeLive")))]),a("div",{staticClass:"execution-mode-card-desc"},[e._v(" "+e._s(e.canUseLiveTrading?e.$t("trading-assistant.form.executionModeLiveDesc"):e.$t("trading-assistant.form.liveTradingNotSupportedHint"))+" ")])]),"live"===e.executionModeUi&&e.canUseLiveTrading?a("a-icon",{staticClass:"execution-mode-card-check",attrs:{type:"check-circle",theme:"filled"}}):e._e()],1)]),e.canUseLiveTrading?e._e():a("div",{staticClass:"form-item-hint execution-warn-text"},[e._v(" "+e._s(e.$t("trading-assistant.form.liveTradingNotSupportedHint"))+" ")])],1),"live"===e.executionModeUi&&e.canUseLiveTrading?a("a-alert",{staticClass:"section-inline-alert",attrs:{type:"warning",showIcon:"",message:e.$t("trading-assistant.liveDisclaimer.title"),description:e.$t("trading-assistant.liveDisclaimer.content")}}):e._e()],1),a("div",{staticClass:"execution-section-card"},[a("div",{staticClass:"section-block-title"},[a("span",[e._v(e._s(e.$t("trading-assistant.form.notificationSectionTitle")))]),a("span",{staticClass:"section-block-desc"},[e._v(e._s(e.$t("trading-assistant.form.notificationSectionDesc")))])]),a("a-form-item",{staticClass:"compact-form-item",attrs:{label:e.$t("trading-assistant.form.notifyChannels")}},[a("a-checkbox-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["notify_channels",{initialValue:["browser"]}],expression:"['notify_channels', { initialValue: ['browser'] }]"}],staticClass:"notify-channel-grid",on:{change:e.onNotifyChannelsChange}},[a("a-checkbox",{attrs:{value:"browser"}},[e._v(e._s(e.$t("trading-assistant.notify.browser")))]),a("a-checkbox",{attrs:{value:"email"}},[e._v(e._s(e.$t("trading-assistant.notify.email")))]),a("a-checkbox",{attrs:{value:"telegram"}},[e._v(e._s(e.$t("trading-assistant.notify.telegram")))]),a("a-checkbox",{attrs:{value:"discord"}},[e._v(e._s(e.$t("trading-assistant.notify.discord")))]),a("a-checkbox",{attrs:{value:"webhook"}},[e._v(e._s(e.$t("trading-assistant.notify.webhook")))]),a("a-checkbox",{attrs:{value:"phone"}},[e._v(e._s(e.$t("trading-assistant.notify.phone")))])],1),a("div",{staticClass:"form-item-hint"},[e._v(e._s(e.$t("trading-assistant.form.notifyChannelsHint")))])],1),e.unconfiguredChannels.length>0?a("a-alert",{staticClass:"section-inline-alert",attrs:{type:"warning",showIcon:""},scopedSlots:e._u([{key:"message",fn:function(){return[a("span",[e._v(" "+e._s(e.$t("trading-assistant.form.notificationConfigMissing",{channels:e.unconfiguredChannels.join(", ")}))+" "),a("router-link",{staticStyle:{"margin-left":"8px"},attrs:{to:"/profile"}},[a("a-icon",{attrs:{type:"setting"}}),e._v(" "+e._s(e.$t("trading-assistant.form.goToProfile"))+" ")],1)],1)]},proxy:!0}],null,!1,2930252607)}):e.notifyChannelsUi.length>0&&!e.notifyChannelsUi.includes("browser")||e.notifyChannelsUi.length>1?a("a-alert",{staticClass:"section-inline-alert",attrs:{type:"info",showIcon:""},scopedSlots:e._u([{key:"message",fn:function(){return[a("span",[e._v(" "+e._s(e.$t("trading-assistant.form.notificationFromProfile"))+" "),a("router-link",{staticStyle:{"margin-left":"8px"},attrs:{to:"/profile"}},[a("a-icon",{attrs:{type:"setting"}}),e._v(" "+e._s(e.$t("trading-assistant.form.goToProfile"))+" ")],1)],1)]},proxy:!0}])}):e._e()],1),"live"===e.executionModeUi&&e.canUseLiveTrading?a("div",{staticClass:"execution-section-card"},[a("div",{staticClass:"section-block-title"},[a("span",[e._v(e._s(e.$t("trading-assistant.form.liveConnectionSectionTitle")))]),a("span",{staticClass:"section-block-desc"},[e._v(e._s(e.$t("trading-assistant.form.liveConnectionSectionDesc")))])]),a("a-alert",{staticClass:"section-inline-alert",staticStyle:{"margin-bottom":"16px"},attrs:{type:"warning","show-icon":"",message:e.$t("trading-assistant.form.liveTradingConfigTitle"),description:e.$t("trading-assistant.form.liveTradingConfigHint")}}),a("a-form-item",{staticClass:"compact-form-item",attrs:{label:e.$t("trading-assistant.form.savedCredential")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["credential_id",{rules:[{required:!0,message:e.$t("profile.exchange.noCredentialHint")}],getValueFromEvent:function(t){return t||void 0}}],expression:"['credential_id', {\n rules: [{ required: true, message: $t('profile.exchange.noCredentialHint') }],\n getValueFromEvent: (val) => val || undefined\n }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.selectSavedCredential"),"allow-clear":"","show-search":"","option-filter-prop":"children",loading:e.loadingExchangeCredentials},on:{change:e.handleCredentialSelectChange}},e._l(e.filteredExchangeCredentials,function(t){return a("a-select-option",{key:t.id,attrs:{value:t.id}},[e._v(" "+e._s(e.formatCredentialLabel(t))+" ")])}),1),a("div",{staticClass:"form-item-hint ta-credential-actions",staticStyle:{"margin-top":"6px"}},[a("a-button",{staticClass:"ta-add-cred-btn",attrs:{type:"link",size:"small"},on:{click:function(t){e.showExchangeAccountModal=!0}}},[a("a-icon",{attrs:{type:"plus-circle"}}),e._v(" "+e._s(e.$t("quickTrade.addAccountInline"))+" ")],1),a("span",{staticClass:"ta-credential-actions-sep"},[e._v("·")]),a("router-link",{attrs:{to:"/profile?tab=exchange"}},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"setting"}}),e._v(e._s(e.$t("profile.exchange.goToManage"))+" ")],1)],1),"live"===e.executionModeUi&&e.canUseLiveTrading&&!e.loadingExchangeCredentials&&0===e.filteredExchangeCredentials.length?a("a-alert",{staticStyle:{"margin-top":"10px"},attrs:{type:"warning","show-icon":"",message:e.$t("trading-assistant.noCredentialForLive.title")}},[a("template",{slot:"description"},[a("span",[e._v(e._s(e.$t("trading-assistant.noCredentialForLive.desc")))]),a("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary",size:"small"},on:{click:function(t){e.showExchangeAccountModal=!0}}},[e._v(" "+e._s(e.$t("quickTrade.addAccountInline"))+" ")])],1)],2):e._e()],1)],1):e._e()])])],1)])],1),a("template",{slot:"footer"},[a("a-button",{on:{click:e.handleCloseModal}},[e._v(e._s(e.$t("trading-assistant.form.cancel")))]),a("a-button",{directives:[{name:"show",rawName:"v-show",value:e.currentStep>0,expression:"currentStep > 0"}],on:{click:e.handlePrev}},[e._v(" "+e._s(e.$t("trading-assistant.form.prev"))+" ")]),a("a-button",{directives:[{name:"show",rawName:"v-show",value:e.currentStep<2,expression:"currentStep < 2"}],attrs:{type:"primary",loading:e.saving},on:{click:e.handleNext}},[e._v(" "+e._s(e.$t("trading-assistant.form.next"))+" ")]),a("a-button",{directives:[{name:"show",rawName:"v-show",value:2===e.currentStep,expression:"currentStep === 2"}],attrs:{type:"primary",loading:e.saving},on:{click:e.handleSubmit}},[e._v(" "+e._s(e.editingStrategy?e.$t("trading-assistant.form.confirmEdit"):e.$t("trading-assistant.form.confirmCreate"))+" ")])],1)],2),a("a-modal",{attrs:{title:e.$t("trading-assistant.form.addSymbolTitle"),visible:e.showAddSymbolModal,confirmLoading:e.addingSymbol,width:"600px",okText:e.$t("trading-assistant.form.confirmAdd"),cancelText:e.$t("trading-assistant.form.cancel"),maskClosable:!1,keyboard:!1},on:{ok:e.handleConfirmAddSymbol,cancel:e.handleCloseAddSymbolModal}},[a("div",{staticClass:"add-symbol-modal-content"},[a("a-tabs",{staticClass:"market-tabs",on:{change:e.handleAddSymbolMarketChange},model:{value:e.addSymbolMarket,callback:function(t){e.addSymbolMarket=t},expression:"addSymbolMarket"}},e._l(e.addSymbolMarketTypes,function(t){return a("a-tab-pane",{key:t.value,attrs:{tab:e.$t(t.i18nKey||"dashboard.analysis.market.".concat(t.value))}})}),1),a("div",{staticClass:"symbol-search-section"},[a("a-input-search",{attrs:{placeholder:e.$t("dashboard.analysis.modal.addStock.searchOrInputPlaceholder"),loading:e.searchingSymbol,size:"large","allow-clear":""},on:{search:e.handleSearchSymbol,change:e.handleSymbolSearchInputChange},model:{value:e.addSymbolKeyword,callback:function(t){e.addSymbolKeyword=t},expression:"addSymbolKeyword"}},[a("a-button",{attrs:{slot:"enterButton",type:"primary",icon:"search"},slot:"enterButton"},[e._v(" "+e._s(e.$t("dashboard.analysis.modal.addStock.search"))+" ")])],1)],1),e.symbolSearchResults.length>0?a("div",{staticClass:"search-results-section"},[a("div",{staticClass:"section-title"},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"search"}}),e._v(" "+e._s(e.$t("dashboard.analysis.modal.addStock.searchResults"))+" ")],1),a("a-list",{staticClass:"symbol-list",attrs:{"data-source":e.symbolSearchResults,loading:e.searchingSymbol,size:"small"},scopedSlots:e._u([{key:"renderItem",fn:function(t){return a("a-list-item",{staticClass:"symbol-list-item",on:{click:function(a){return e.handleSelectAddSymbol(t)}}},[a("a-list-item-meta",[a("template",{slot:"title"},[a("div",{staticClass:"symbol-item-content"},[a("span",{staticClass:"symbol-code"},[e._v(e._s(t.symbol))]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.name))]),t.exchange?a("a-tag",{staticStyle:{"margin-left":"8px"},attrs:{size:"small",color:"blue"}},[e._v(" "+e._s(t.exchange)+" ")]):e._e()],1)])],2)],1)}}],null,!1,2801225082)})],1):e._e(),a("div",{staticClass:"hot-symbols-section"},[a("div",{staticClass:"section-title"},[a("a-icon",{staticStyle:{color:"#ff4d4f","margin-right":"4px"},attrs:{type:"fire"}}),e._v(" "+e._s(e.$t("dashboard.analysis.modal.addStock.hotSymbols"))+" ")],1),a("a-spin",{attrs:{spinning:e.loadingHotSymbols}},[e.hotSymbols.length>0?a("a-list",{staticClass:"symbol-list",attrs:{"data-source":e.hotSymbols,size:"small"},scopedSlots:e._u([{key:"renderItem",fn:function(t){return a("a-list-item",{staticClass:"symbol-list-item",on:{click:function(a){return e.handleSelectAddSymbol(t)}}},[a("a-list-item-meta",[a("template",{slot:"title"},[a("div",{staticClass:"symbol-item-content"},[a("span",{staticClass:"symbol-code"},[e._v(e._s(t.symbol))]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.name))]),t.exchange?a("a-tag",{staticStyle:{"margin-left":"8px"},attrs:{size:"small",color:"orange"}},[e._v(" "+e._s(t.exchange)+" ")]):e._e()],1)])],2)],1)}}],null,!1,3959834868)}):a("a-empty",{attrs:{description:e.$t("dashboard.analysis.modal.addStock.noHotSymbols"),image:!1}})],1)],1),e.selectedAddSymbol?a("div",{staticClass:"selected-symbol-section"},[a("div",{staticClass:"section-title"},[a("a-icon",{staticStyle:{color:"#52c41a","margin-right":"4px"},attrs:{type:"check-circle"}}),e._v(" "+e._s(e.$t("dashboard.analysis.modal.addStock.selectedSymbol"))+" ")],1),a("div",{staticClass:"selected-symbol-info"},[a("a-tag",{staticStyle:{"margin-right":"8px"},attrs:{color:e.getMarketColor(e.addSymbolMarket)}},[e._v(e._s(e.addSymbolMarket))]),a("span",{staticClass:"symbol-code"},[e._v(e._s(e.selectedAddSymbol.symbol))]),e.selectedAddSymbol.name?a("span",{staticClass:"symbol-name"},[e._v(e._s(e.selectedAddSymbol.name))]):e._e()],1)]):e._e()],1)])],1)],1),a("exchange-account-modal",{attrs:{visible:e.showExchangeAccountModal},on:{"update:visible":function(t){e.showExchangeAccountModal=t},success:e.handleExchangeAccountCreated}})],1)},i=[],r=a(15863),n=a(44735),o=a(81127),l=a(56252),c=a(2403),d=a(57532),u=a(76338),p=a(36911),m=a(35038),g=a(42430),h=a(84841),_=a(55434),y=a(75769),f=function(){var t=this,e=t._self._c;return e("div",{staticClass:"trading-records strategy-tab-pane-inner",class:{"theme-dark":t.isDark}},[0!==t.records.length||t.loading?e("a-table",{attrs:{columns:t.columns,"data-source":t.records,loading:t.loading,pagination:{pageSize:10},size:"small",rowKey:"id",scroll:{x:800}},scopedSlots:t._u([{key:"type",fn:function(a){return[e("a-tag",{attrs:{color:t.getTradeTypeColor(a)}},[t._v(" "+t._s(t.getTradeTypeText(a))+" ")])]}},{key:"price",fn:function(e){return[t._v(" $"+t._s(parseFloat(e).toFixed(4))+" ")]}},{key:"amount",fn:function(e){return[t._v(" "+t._s(parseFloat(e).toFixed(4))+" ")]}},{key:"value",fn:function(e){return[t._v(" $"+t._s(parseFloat(e).toFixed(2))+" ")]}},{key:"profit",fn:function(a,s){return[e("span",{style:{color:a>0?"#52c41a":a<0?"#f5222d":"#666"}},[t._v(" "+t._s(t.formatProfit(a,s))+" ")])]}},{key:"commission",fn:function(e){return[t._v(" "+t._s(t.formatCommission(e))+" ")]}},{key:"time",fn:function(e,a){return[t._v(" "+t._s(t.formatTime(a.created_at||e))+" ")]}}])}):e("div",{staticClass:"empty-state strategy-tab-empty"},[e("a-empty",{attrs:{description:t.$t("trading-assistant.table.noPositions")}})],1)],1)},v=[],b={name:"TradingRecords",props:{strategyId:{type:Number,required:!0},loading:{type:Boolean,default:!1},isDark:{type:Boolean,default:!1}},computed:{columns:function(){return[{title:this.$t("trading-assistant.table.time"),dataIndex:"created_at",key:"created_at",width:180,scopedSlots:{customRender:"time"}},{title:this.$t("dashboard.indicator.backtest.tradeType"),dataIndex:"type",key:"type",width:140,scopedSlots:{customRender:"type"}},{title:this.$t("trading-assistant.table.price"),dataIndex:"price",key:"price",width:120,scopedSlots:{customRender:"price"}},{title:this.$t("trading-assistant.table.amount"),dataIndex:"amount",key:"amount",width:120,scopedSlots:{customRender:"amount"}},{title:this.$t("trading-assistant.table.value"),dataIndex:"value",key:"value",width:120,scopedSlots:{customRender:"value"}},{title:this.$t("dashboard.indicator.backtest.profit"),dataIndex:"profit",key:"profit",width:120,scopedSlots:{customRender:"profit"}},{title:this.$t("trading-assistant.table.commission"),dataIndex:"commission",key:"commission",width:100,scopedSlots:{customRender:"commission"}}]}},data:function(){return{records:[]}},watch:{strategyId:{handler:function(t){t&&this.loadRecords()},immediate:!0}},methods:{loadRecords:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.strategyId){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,(0,p.tq)(t.strategyId);case 2:a=e.v,1===a.code?t.records=(a.data.trades||[]).map(function(t){return(0,u.A)((0,u.A)({},t),{},{time:t.created_at||t.time})}):t.$message.error(a.msg||t.$t("trading-assistant.messages.loadTradesFailed")),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[1,3]])}))()},formatTime:function(t){if(!t)return"--";try{var e;if("number"===typeof t){var a=t<1e12?1e3*t:t;e=new Date(a)}else{if("string"!==typeof t)return"--";if(/^\d+$/.test(t)){var s=parseInt(t,10),i=s<1e12?1e3*s:s;e=new Date(i)}else e=new Date(t)}if(isNaN(e.getTime()))return"--";var r=this.$i18n.locale||"zh-CN",n={"zh-CN":"zh-CN","zh-TW":"zh-TW","en-US":"en-US"};return e.toLocaleString(n[r]||"zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}catch(o){return"--"}},getTradeTypeColor:function(t){var e={buy:"green",sell:"red",liquidation:"orange",open_long:"green",add_long:"cyan",close_long:"orange",close_long_stop:"red",close_long_profit:"lime",open_short:"red",add_short:"magenta",close_short:"blue",close_short_stop:"red",close_short_profit:"cyan"};return e[t]||"default"},getTradeTypeText:function(t){var e={buy:this.$t("dashboard.indicator.backtest.buy"),sell:this.$t("dashboard.indicator.backtest.sell"),liquidation:this.$t("dashboard.indicator.backtest.liquidation"),open_long:this.$t("dashboard.indicator.backtest.openLong"),add_long:this.$t("dashboard.indicator.backtest.addLong"),close_long:this.$t("dashboard.indicator.backtest.closeLong"),close_long_stop:this.$t("dashboard.indicator.backtest.closeLongStop"),close_long_profit:this.$t("dashboard.indicator.backtest.closeLongProfit"),open_short:this.$t("dashboard.indicator.backtest.openShort"),add_short:this.$t("dashboard.indicator.backtest.addShort"),close_short:this.$t("dashboard.indicator.backtest.closeShort"),close_short_stop:this.$t("dashboard.indicator.backtest.closeShortStop"),close_short_profit:this.$t("dashboard.indicator.backtest.closeShortProfit")};return e[t]||t},formatMoney:function(t){if(null===t||void 0===t)return"--";var e=t>=0?"+":"-";return"".concat(e,"$").concat(Math.abs(t).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}))},formatProfit:function(t,e){if(null===t||void 0===t)return"--";var a=parseFloat(t),s=["open_long","open_short","add_long","add_short"];return 0===a&&e&&s.includes(e.type)?"--":Math.abs(a)<1e-6?e&&s.includes(e.type)?"--":"$0.00":this.formatMoney(a)},formatCommission:function(t){if(null===t||void 0===t)return"--";var e=parseFloat(t);return isNaN(e)||Math.abs(e)<1e-6?"--":"$".concat(e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:6}))}}},x=b,C=a(845),k=(0,C.A)(x,f,v,!1,null,"bdf54cd6",null),S=k.exports,w=function(){var t=this,e=t._self._c;return e("div",{staticClass:"position-records strategy-tab-pane-inner",class:{"theme-dark":t.isDark}},[0!==t.positions.length||t.loading?e("a-table",{attrs:{columns:t.columns,"data-source":t.positions,loading:t.loading,pagination:!1,size:"small",rowKey:"id",scroll:{x:800}},scopedSlots:t._u([{key:"symbol",fn:function(a,s){return[e("strong",[t._v(t._s(s.symbol||a))])]}},{key:"side",fn:function(a,s){return[e("a-tag",{attrs:{color:"long"===(s.side||a)?"green":"red"}},[t._v(" "+t._s("long"===(s.side||a)?t.$t("trading-assistant.table.long"):t.$t("trading-assistant.table.short"))+" ")])]}},{key:"entryPrice",fn:function(a,s){return[t.hasValidPrice(s.entry_price||a)?e("span",[t._v(" $"+t._s(parseFloat(s.entry_price||a).toFixed(4))+" ")]):e("span",[t._v("--")])]}},{key:"currentPrice",fn:function(e,a){return[t._v(" $"+t._s(parseFloat(a.current_price||e||0).toFixed(4))+" ")]}},{key:"size",fn:function(e,a){return[t._v(" "+t._s(parseFloat(a.size||e||0).toFixed(4))+" ")]}},{key:"unrealizedPnl",fn:function(a,s){return[e("span",{class:{profit:parseFloat(s.unrealized_pnl||a||0)>0,loss:parseFloat(s.unrealized_pnl||a||0)<0}},[t._v(" $"+t._s(parseFloat(s.unrealized_pnl||a||0).toFixed(2))+" ")])]}},{key:"pnlPercent",fn:function(a,s){return[e("span",{class:{profit:parseFloat(s.pnl_percent||a||0)>0,loss:parseFloat(s.pnl_percent||a||0)<0}},[t._v(" "+t._s(parseFloat(s.pnl_percent||a||0).toFixed(2))+"% ")])]}}])}):e("div",{staticClass:"empty-state strategy-tab-empty"},[e("a-empty",{attrs:{description:t.$t("trading-assistant.table.noPositions")}})],1)],1)},$=[],A={name:"PositionRecords",props:{strategyId:{type:Number,required:!0},marketType:{type:String,default:"swap"},leverage:{type:[Number,String],default:1},loading:{type:Boolean,default:!1},isDark:{type:Boolean,default:!1}},data:function(){return{positions:[]}},computed:{columns:function(){return[{title:this.$t("trading-assistant.table.symbol"),dataIndex:"symbol",key:"symbol",width:120,scopedSlots:{customRender:"symbol"}},{title:this.$t("trading-assistant.table.side"),dataIndex:"side",key:"side",width:80,scopedSlots:{customRender:"side"}},{title:this.$t("trading-assistant.table.size"),dataIndex:"size",key:"size",width:120,scopedSlots:{customRender:"size"}},{title:this.$t("trading-assistant.table.entryPrice"),dataIndex:"entry_price",key:"entry_price",width:120,scopedSlots:{customRender:"entryPrice"}},{title:this.$t("trading-assistant.table.currentPrice"),dataIndex:"current_price",key:"current_price",width:120,scopedSlots:{customRender:"currentPrice"}},{title:this.$t("trading-assistant.table.unrealizedPnl"),dataIndex:"unrealized_pnl",key:"unrealized_pnl",width:120,scopedSlots:{customRender:"unrealizedPnl"}},{title:this.$t("trading-assistant.table.pnlPercent"),dataIndex:"pnl_percent",key:"pnl_percent",width:100,scopedSlots:{customRender:"pnlPercent"}}]}},watch:{strategyId:{handler:function(t){t?(this.loadPositions(),this.startPolling()):this.stopPolling()},immediate:!0}},beforeDestroy:function(){this.stopPolling()},methods:{loadPositions:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.strategyId){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,(0,p.oK)(t.strategyId);case 2:a=e.v,1===a.code?(s=a.data.positions||[],t.positions=s.map(function(e,a){var s=String(t.marketType||"swap").toLowerCase(),i=parseFloat(t.leverage);(!isFinite(i)||i<=0)&&(i=1),"spot"===s&&(i=1);var r=parseFloat(e.entry_price||e.entryPrice||0),n=parseFloat(e.size||"0")||0,o=parseFloat(e.unrealized_pnl||e.unrealizedPnl||"0")||0,l=parseFloat(e.pnl_percent||e.pnlPercent||"0")||0;r>0&&n>0?l=o/(r*n)*100*i:"spot"!==s&&(l*=i);var c={id:e.id||a,symbol:e.symbol||"",side:e.side||"long",size:n>0?n.toString():"0",entry_price:r>0?r.toString():"0",current_price:e.current_price||e.currentPrice||"0",unrealized_pnl:e.unrealized_pnl||e.unrealizedPnl||"0",pnl_percent:l,updated_at:e.updated_at||e.updatedAt||""};return c})):t.positions=[],e.n=4;break;case 3:e.p=3,e.v,t.positions=[];case 4:return e.a(2)}},e,null,[[1,3]])}))()},hasValidPrice:function(t){var e=parseFloat(t);return Number.isFinite(e)&&e>0},startPolling:function(){var t=this;this.stopPolling(),this.pollingTimer=setInterval(function(){t.loadPositions()},5e3)},stopPolling:function(){this.pollingTimer&&(clearInterval(this.pollingTimer),this.pollingTimer=null)}}},T=A,P=(0,C.A)(T,w,$,!1,null,"6ba7d922",null),M=P.exports,I=function(){var t=this,e=t._self._c;return e("div",{staticClass:"strategy-type-selector",class:{"theme-dark":t.isDark}},[e("div",{staticClass:"selector-header"},[e("h3",[t._v(t._s(t.$t("trading-assistant.selectMode")))]),e("p",{staticClass:"selector-hint"},[t._v(t._s(t.$t("trading-assistant.selectModeHint")))])]),e("div",{staticClass:"mode-cards"},[e("div",{staticClass:"mode-card",class:{selected:"signal"===t.selected},on:{click:function(e){return t.$emit("select","signal")}}},[e("div",{staticClass:"card-icon signal-icon"},[e("a-icon",{attrs:{type:"line-chart"}})],1),e("div",{staticClass:"card-body"},[e("div",{staticClass:"card-badge-row"},[e("span",{staticClass:"card-badge"},[t._v(t._s(t.$t("trading-assistant.strategyMode.signalBadge")))])]),e("h4",[t._v(t._s(t.$t("trading-assistant.strategyMode.signal")))]),e("p",{staticClass:"card-desc"},[t._v(t._s(t.$t("trading-assistant.strategyMode.signalDesc")))]),e("ul",{staticClass:"card-features"},[e("li",[e("a-icon",{attrs:{type:"check"}}),t._v(" "+t._s(t.$t("trading-assistant.strategyMode.signalFeature1")))],1),e("li",[e("a-icon",{attrs:{type:"check"}}),t._v(" "+t._s(t.$t("trading-assistant.strategyMode.signalFeature2")))],1),e("li",[e("a-icon",{attrs:{type:"check"}}),t._v(" "+t._s(t.$t("trading-assistant.strategyMode.signalFeature3")))],1)])]),e("a-button",{staticClass:"card-btn",attrs:{type:"primary",ghost:""},on:{click:function(e){return e.stopPropagation(),t.$emit("select","signal")}}},[t._v(" "+t._s(t.$t("trading-assistant.useThisMode"))+" ")])],1),e("div",{staticClass:"mode-card",class:{selected:"script"===t.selected},on:{click:function(e){return t.$emit("select","script")}}},[e("div",{staticClass:"card-icon script-icon"},[e("a-icon",{attrs:{type:"code"}})],1),e("div",{staticClass:"card-body"},[e("div",{staticClass:"card-badge-row"},[e("span",{staticClass:"card-badge card-badge--script"},[t._v(t._s(t.$t("trading-assistant.strategyMode.scriptBadge")))])]),e("h4",[t._v(t._s(t.$t("trading-assistant.strategyMode.script")))]),e("p",{staticClass:"card-desc"},[t._v(t._s(t.$t("trading-assistant.strategyMode.scriptDesc")))]),e("ul",{staticClass:"card-features"},[e("li",[e("a-icon",{attrs:{type:"check"}}),t._v(" "+t._s(t.$t("trading-assistant.strategyMode.scriptFeature1")))],1),e("li",[e("a-icon",{attrs:{type:"check"}}),t._v(" "+t._s(t.$t("trading-assistant.strategyMode.scriptFeature2")))],1),e("li",[e("a-icon",{attrs:{type:"check"}}),t._v(" "+t._s(t.$t("trading-assistant.strategyMode.scriptFeature3")))],1)])]),e("a-button",{staticClass:"card-btn",attrs:{type:"primary",ghost:""},on:{click:function(e){return e.stopPropagation(),t.$emit("select","script")}}},[t._v(" "+t._s(t.$t("trading-assistant.useThisMode"))+" ")])],1)]),e("div",{staticClass:"template-quick-start"},[e("a-divider",[e("span",{staticClass:"divider-text"},[t._v(t._s(t.$t("trading-assistant.fromTemplate")))])]),e("div",{staticClass:"template-tags"},t._l(t.templates,function(a){return e("a-tag",{key:a.key,staticClass:"template-tag",on:{click:function(e){return t.$emit("use-template",a.key)}}},[e("span",{staticClass:"tpl-icon"},[t._v(t._s(a.icon))]),t._v(" "+t._s(t.$t("trading-assistant.template.".concat(a.key)))+" ")])}),1)],1)])},F=[],N=[{key:"trendFollowing",icon:"📈",code:"\"\"\"\nTrend Following Strategy\nUses EMA crossover with dynamic stop-loss / take-profit.\n\"\"\"\n\ndef on_init(ctx):\n ctx.fast_period = ctx.param('fast_period', 12)\n ctx.slow_period = ctx.param('slow_period', 26)\n ctx.position_pct = ctx.param('position_pct', 0.95)\n ctx.stop_pct = ctx.param('stop_pct', 0.03)\n ctx.take_profit_pct = ctx.param('take_profit_pct', 0.08)\n\ndef on_bar(ctx, bar):\n bars = ctx.bars(ctx.slow_period + 5)\n if len(bars) < ctx.slow_period:\n return\n\n closes = [b['close'] for b in bars]\n fast_ema = _ema(closes, ctx.fast_period)\n slow_ema = _ema(closes, ctx.slow_period)\n price = bar['close']\n\n if fast_ema > slow_ema and not ctx.position:\n qty = (ctx.equity * ctx.position_pct) / price\n ctx.buy(price, qty)\n ctx.log(f\"BUY at {price:.2f}\")\n\n elif fast_ema < slow_ema and ctx.position and ctx.position['side'] == 'long':\n ctx.close_position()\n ctx.log(f\"SELL at {price:.2f}\")\n\n if ctx.position and ctx.position['side'] == 'long':\n entry = ctx.position['entry_price']\n pnl_pct = (price - entry) / entry\n if pnl_pct <= -ctx.stop_pct:\n ctx.close_position()\n ctx.log(f\"STOP LOSS at {price:.2f}\")\n elif pnl_pct >= ctx.take_profit_pct:\n ctx.close_position()\n ctx.log(f\"TAKE PROFIT at {price:.2f}\")\n\ndef _ema(data, period):\n k = 2 / (period + 1)\n ema = data[0]\n for price in data[1:]:\n ema = price * k + ema * (1 - k)\n return ema\n",params:[{name:"fast_period",type:"integer",default:12,min:2,max:120,step:1},{name:"slow_period",type:"integer",default:26,min:5,max:240,step:1},{name:"position_pct",type:"percent",default:.95,min:.05,max:1,step:.01},{name:"stop_pct",type:"percent",default:.03,min:.001,max:.5,step:.001},{name:"take_profit_pct",type:"percent",default:.08,min:.001,max:1,step:.001}]},{key:"martingale",icon:"🔥",code:"\"\"\"\nMartingale Strategy\nDouble position on each loss, with max layer control.\n\"\"\"\n\ndef on_init(ctx):\n ctx.base_amount = ctx.param('base_amount', 100)\n ctx.max_layers = ctx.param('max_layers', 5)\n ctx.multiplier = ctx.param('multiplier', 2.0)\n ctx.take_profit_pct = ctx.param('take_profit_pct', 0.02)\n ctx.stop_loss_pct = ctx.param('stop_loss_pct', 0.04)\n ctx.cooldown_bars = ctx.param('cooldown_bars', 1)\n ctx.current_layer = 0\n ctx.cooldown = 0\n\ndef on_bar(ctx, bar):\n if ctx.cooldown > 0:\n ctx.cooldown -= 1\n return\n\n price = bar['close']\n if not ctx.position:\n amount = ctx.base_amount * (ctx.multiplier ** ctx.current_layer)\n if amount <= ctx.balance:\n qty = amount / price\n ctx.buy(price, qty)\n ctx.log(f\"Layer {ctx.current_layer}: BUY {qty:.4f} at {price:.2f}\")\n else:\n entry = ctx.position['entry_price']\n pnl_pct = (price - entry) / entry\n\n if pnl_pct >= ctx.take_profit_pct:\n ctx.close_position()\n ctx.current_layer = 0\n ctx.cooldown = ctx.cooldown_bars\n ctx.log(f\"TAKE PROFIT at {price:.2f}, reset layers\")\n\n elif pnl_pct <= -ctx.stop_loss_pct:\n ctx.close_position()\n ctx.cooldown = ctx.cooldown_bars\n if ctx.current_layer < ctx.max_layers:\n ctx.current_layer += 1\n ctx.log(f\"LOSS, escalate to layer {ctx.current_layer}\")\n else:\n ctx.current_layer = 0\n ctx.log(\"Max layers reached, reset\")\n",params:[{name:"base_amount",type:"number",default:100,min:10,max:1e6,step:10},{name:"max_layers",type:"integer",default:5,min:1,max:20,step:1},{name:"multiplier",type:"number",default:2,min:1,max:5,step:.1},{name:"take_profit_pct",type:"percent",default:.02,min:.001,max:1,step:.001},{name:"stop_loss_pct",type:"percent",default:.04,min:.001,max:1,step:.001},{name:"cooldown_bars",type:"integer",default:1,min:0,max:500,step:1}]},{key:"grid",icon:"📐",code:"\"\"\"\nGrid Trading Strategy\nPlaces buy/sell orders at equal intervals within a price range.\n\"\"\"\n\ndef on_init(ctx):\n ctx.grid_upper = ctx.param('grid_upper', 70000)\n ctx.grid_lower = ctx.param('grid_lower', 60000)\n ctx.grid_levels = ctx.param('grid_levels', 10)\n ctx.order_amount = ctx.param('order_amount', 100)\n ctx.take_profit_pct = ctx.param('take_profit_pct', 0.05)\n ctx.stop_loss_pct = ctx.param('stop_loss_pct', 0.03)\n ctx.filled_grids = set()\n\n spacing = (ctx.grid_upper - ctx.grid_lower) / ctx.grid_levels\n ctx.grid_prices = [ctx.grid_lower + i * spacing for i in range(ctx.grid_levels + 1)]\n\ndef on_bar(ctx, bar):\n price = bar['close']\n if price < ctx.grid_lower or price > ctx.grid_upper:\n return\n\n if ctx.position and ctx.position['side'] == 'long':\n entry = ctx.position['entry_price']\n pnl_pct = (price - entry) / entry\n if pnl_pct >= ctx.take_profit_pct or pnl_pct <= -ctx.stop_loss_pct:\n ctx.close_position()\n ctx.filled_grids.clear()\n ctx.log(f\"Grid risk exit at {price:.2f}, pnl={pnl_pct:.2%}\")\n return\n\n for i, gp in enumerate(ctx.grid_prices[:-1]):\n upper_gp = ctx.grid_prices[i + 1]\n grid_id = f\"grid_{i}\"\n\n if price <= gp and grid_id not in ctx.filled_grids:\n qty = ctx.order_amount / price\n ctx.buy(price, qty)\n ctx.filled_grids.add(grid_id)\n ctx.log(f\"Grid BUY at {price:.2f} (level {i})\")\n\n elif price >= upper_gp and grid_id in ctx.filled_grids:\n qty = ctx.order_amount / price\n ctx.sell(price, qty)\n ctx.filled_grids.discard(grid_id)\n ctx.log(f\"Grid SELL at {price:.2f} (level {i})\")\n",params:[{name:"grid_upper",type:"number",default:7e4,min:1,max:1e8,step:10},{name:"grid_lower",type:"number",default:6e4,min:1,max:1e8,step:10},{name:"grid_levels",type:"integer",default:10,min:2,max:200,step:1},{name:"order_amount",type:"number",default:100,min:1,max:1e6,step:1},{name:"take_profit_pct",type:"percent",default:.05,min:.001,max:1,step:.001},{name:"stop_loss_pct",type:"percent",default:.03,min:.001,max:1,step:.001}]},{key:"dca",icon:"💰",code:"\"\"\"\nDCA (Dollar Cost Averaging) Strategy\nPeriodic purchases with optional dip-buying.\n\"\"\"\n\ndef on_init(ctx):\n ctx.buy_amount = ctx.param('buy_amount', 100)\n ctx.dip_threshold = ctx.param('dip_threshold', 0.05)\n ctx.dip_multiplier = ctx.param('dip_multiplier', 2.0)\n ctx.buy_interval = ctx.param('buy_interval', 24)\n ctx.max_orders = ctx.param('max_orders', 999)\n ctx.bar_count = 0\n ctx.order_count = 0\n ctx.last_buy_price = None\n\ndef on_bar(ctx, bar):\n ctx.bar_count += 1\n price = bar['close']\n\n if ctx.order_count >= ctx.max_orders:\n return\n\n is_dip = False\n if ctx.last_buy_price and price < ctx.last_buy_price * (1 - ctx.dip_threshold):\n is_dip = True\n\n if ctx.bar_count % ctx.buy_interval == 0 or is_dip:\n amount = ctx.buy_amount * (ctx.dip_multiplier if is_dip else 1.0)\n if amount <= ctx.balance:\n qty = amount / price\n ctx.buy(price, qty)\n ctx.last_buy_price = price\n ctx.order_count += 1\n tag = \" (DIP BUY)\" if is_dip else \"\"\n ctx.log(f\"DCA BUY {qty:.6f} at {price:.2f}{tag}\")\n",params:[{name:"buy_amount",type:"number",default:100,min:1,max:1e6,step:1},{name:"buy_interval",type:"integer",default:24,min:1,max:1e3,step:1},{name:"dip_threshold",type:"percent",default:.05,min:.001,max:1,step:.001},{name:"dip_multiplier",type:"number",default:2,min:1,max:10,step:.1},{name:"max_orders",type:"integer",default:999,min:1,max:9999,step:1}]},{key:"meanReversion",icon:"🔄",code:"\"\"\"\nMean Reversion Strategy\nBollinger Bands based: buy at lower band, sell at upper band.\n\"\"\"\n\ndef on_init(ctx):\n ctx.period = ctx.param('period', 20)\n ctx.std_mult = ctx.param('std_mult', 2.0)\n ctx.position_pct = ctx.param('position_pct', 0.5)\n ctx.take_profit_pct = ctx.param('take_profit_pct', 0.03)\n ctx.stop_loss_pct = ctx.param('stop_loss_pct', 0.02)\n\ndef on_bar(ctx, bar):\n bars = ctx.bars(ctx.period + 5)\n if len(bars) < ctx.period:\n return\n\n closes = [b['close'] for b in bars[-ctx.period:]]\n mean = sum(closes) / len(closes)\n std = (sum((c - mean) ** 2 for c in closes) / len(closes)) ** 0.5\n\n upper = mean + ctx.std_mult * std\n lower = mean - ctx.std_mult * std\n price = bar['close']\n\n if price <= lower and not ctx.position:\n qty = (ctx.equity * ctx.position_pct) / price\n ctx.buy(price, qty)\n ctx.log(f\"BUY at {price:.2f} (below lower band {lower:.2f})\")\n\n elif price >= upper and ctx.position and ctx.position['side'] == 'long':\n ctx.close_position()\n ctx.log(f\"SELL at {price:.2f} (above upper band {upper:.2f})\")\n\n elif ctx.position and ctx.position['side'] == 'long':\n entry = ctx.position['entry_price']\n pnl_pct = (price - entry) / entry\n if pnl_pct >= ctx.take_profit_pct or pnl_pct <= -ctx.stop_loss_pct:\n ctx.close_position()\n ctx.log(f\"Risk exit at {price:.2f}, pnl={pnl_pct:.2%}\")\n",params:[{name:"period",type:"integer",default:20,min:2,max:300,step:1},{name:"std_mult",type:"number",default:2,min:.5,max:6,step:.1},{name:"position_pct",type:"percent",default:.5,min:.05,max:1,step:.01},{name:"take_profit_pct",type:"percent",default:.03,min:.001,max:1,step:.001},{name:"stop_loss_pct",type:"percent",default:.02,min:.001,max:1,step:.001}]},{key:"breakout",icon:"⚡",code:"\"\"\"\nBreakout Strategy\nEnter when price breaks key resistance/support with volume confirmation.\n\"\"\"\n\ndef on_init(ctx):\n ctx.lookback = ctx.param('lookback', 20)\n ctx.volume_mult = ctx.param('volume_mult', 1.5)\n ctx.position_pct = ctx.param('position_pct', 0.9)\n ctx.stop_pct = ctx.param('stop_pct', 0.02)\n ctx.take_profit_pct = ctx.param('take_profit_pct', 0.05)\n\ndef on_bar(ctx, bar):\n bars = ctx.bars(ctx.lookback + 5)\n if len(bars) < ctx.lookback:\n return\n\n recent = bars[-ctx.lookback:]\n high = max(b['high'] for b in recent[:-1])\n low = min(b['low'] for b in recent[:-1])\n avg_vol = sum(b['volume'] for b in recent[:-1]) / (len(recent) - 1)\n price = bar['close']\n vol = bar['volume']\n\n if price > high and vol > avg_vol * ctx.volume_mult and not ctx.position:\n qty = (ctx.equity * ctx.position_pct) / price\n ctx.buy(price, qty)\n ctx.log(f\"BREAKOUT BUY at {price:.2f} (prev high: {high:.2f})\")\n\n elif price < low and ctx.position and ctx.position['side'] == 'long':\n ctx.close_position()\n ctx.log(f\"BREAK DOWN, close at {price:.2f}\")\n\n if ctx.position and ctx.position['side'] == 'long':\n entry = ctx.position['entry_price']\n pnl_pct = (price - entry) / entry\n if pnl_pct <= -ctx.stop_pct:\n ctx.close_position()\n ctx.log(f\"STOP LOSS at {price:.2f}\")\n elif pnl_pct >= ctx.take_profit_pct:\n ctx.close_position()\n ctx.log(f\"TAKE PROFIT at {price:.2f}\")\n",params:[{name:"lookback",type:"integer",default:20,min:2,max:300,step:1},{name:"volume_mult",type:"number",default:1.5,min:.5,max:10,step:.1},{name:"position_pct",type:"percent",default:.9,min:.05,max:1,step:.01},{name:"stop_pct",type:"percent",default:.02,min:.001,max:1,step:.001},{name:"take_profit_pct",type:"percent",default:.05,min:.001,max:1,step:.001}]},{key:"rsiMeanReversion",icon:"📉",code:"\"\"\"\nRSI mean reversion (long-focused)\nBuys when RSI is oversold; exits long when RSI is overbought.\n\"\"\"\n\ndef on_init(ctx):\n ctx.rsi_period = ctx.param('rsi_period', 14)\n ctx.oversold = ctx.param('oversold', 30)\n ctx.overbought = ctx.param('overbought', 70)\n ctx.position_pct = ctx.param('position_pct', 0.5)\n\ndef _rsi_simple(closes, period):\n n = len(closes)\n if n < period + 1:\n return None\n gains = 0.0\n losses = 0.0\n for i in range(n - period, n):\n diff = closes[i] - closes[i - 1]\n if diff > 0:\n gains += diff\n else:\n losses -= diff\n if losses == 0:\n return 100.0 if gains > 0 else 50.0\n rs = gains / losses\n return 100.0 - (100.0 / (1.0 + rs))\n\ndef on_bar(ctx, bar):\n need = ctx.rsi_period + 3\n bars = ctx.bars(need)\n if len(bars) < need:\n return\n closes = [b['close'] for b in bars]\n r = _rsi_simple(closes, ctx.rsi_period)\n if r is None:\n return\n price = bar['close']\n if r <= ctx.oversold and not ctx.position:\n qty = (ctx.equity * ctx.position_pct) / price\n ctx.buy(price, qty)\n ctx.log(f\"RSI BUY r={r:.1f} at {price:.2f}\")\n elif r >= ctx.overbought and ctx.position and ctx.position['side'] == 'long':\n ctx.close_position()\n ctx.log(f\"RSI SELL r={r:.1f} at {price:.2f}\")\n",params:[{name:"rsi_period",type:"integer",default:14,min:2,max:100,step:1},{name:"oversold",type:"number",default:30,min:1,max:50,step:1},{name:"overbought",type:"number",default:70,min:50,max:99,step:1},{name:"position_pct",type:"percent",default:.5,min:.05,max:1,step:.01}]},{key:"macdCross",icon:"📊",code:"\"\"\"\nMACD histogram crossover\nEnters long when MACD histogram crosses above zero; exits when it crosses below.\n\"\"\"\n\ndef on_init(ctx):\n ctx.macd_fast = ctx.param('macd_fast', 12)\n ctx.macd_slow = ctx.param('macd_slow', 26)\n ctx.macd_signal = ctx.param('macd_signal', 9)\n ctx.position_pct = ctx.param('position_pct', 0.6)\n\ndef _ema_series(vals, period):\n k = 2.0 / (period + 1)\n out = []\n e = float(vals[0])\n out.append(e)\n for v in vals[1:]:\n v = float(v)\n e = v * k + e * (1 - k)\n out.append(e)\n return out\n\ndef _macd_hist_last_two(closes, fast, slow, sig):\n n = len(closes)\n if n < slow + sig + 2:\n return None, None\n ef = _ema_series(closes, fast)\n es = _ema_series(closes, slow)\n macd = [ef[i] - es[i] for i in range(n)]\n sg = _ema_series(macd, sig)\n hist = [macd[i] - sg[i] for i in range(n)]\n return hist[-2], hist[-1]\n\ndef on_bar(ctx, bar):\n need = ctx.macd_slow + ctx.macd_signal + 30\n bars = ctx.bars(need)\n if len(bars) < need:\n return\n closes = [b['close'] for b in bars]\n h0, h1 = _macd_hist_last_two(closes, ctx.macd_fast, ctx.macd_slow, ctx.macd_signal)\n if h0 is None:\n return\n price = bar['close']\n if h0 <= 0 and h1 > 0 and not ctx.position:\n qty = (ctx.equity * ctx.position_pct) / price\n ctx.buy(price, qty)\n ctx.log(f\"MACD cross up at {price:.2f}\")\n elif h0 >= 0 and h1 < 0 and ctx.position and ctx.position['side'] == 'long':\n ctx.close_position()\n ctx.log(f\"MACD cross down at {price:.2f}\")\n",params:[{name:"macd_fast",type:"integer",default:12,min:2,max:50,step:1},{name:"macd_slow",type:"integer",default:26,min:5,max:120,step:1},{name:"macd_signal",type:"integer",default:9,min:2,max:50,step:1},{name:"position_pct",type:"percent",default:.6,min:.05,max:1,step:.01}]}];function D(t){return String(t).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function V(t){return"boolean"===typeof t?t?"True":"False":"number"===typeof t?Number.isFinite(t)?String(t):"0":null===t||void 0===t?"None":"'".concat(String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\'"),"'")}var E=N;function R(t){return N.find(function(e){return e.key===t})||null}function z(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a="string"===typeof t?R(t):t;return a?a.params.reduce(function(t,a){return t[a.name]=Object.prototype.hasOwnProperty.call(e,a.name)?e[a.name]:a.default,t},{}):{}}function L(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a="string"===typeof t?R(t):t;if(!a)return"";var s=z(a,e);return a.params.reduce(function(t,e){var a=V(s[e.name]),i=new RegExp("(ctx\\.param\\(['\"]".concat(D(e.name),"['\"],\\s*)([^\\)]+)(\\))"));return t.replace(i,"$1".concat(a,"$3"))},a.code)}var q={name:"StrategyTypeSelector",props:{selected:{type:String,default:""},isDark:{type:Boolean,default:!1}},data:function(){return{templates:E.map(function(t){return{key:t.key,icon:t.icon}})}}},U=q,K=(0,C.A)(U,I,F,!1,null,"8ec7ab14",null),O=K.exports,B=function(){var t=this,e=t._self._c;return e("div",{staticClass:"strategy-editor",class:{"theme-dark":t.isDark}},[e("a-row",{staticClass:"editor-layout",attrs:{gutter:16}},[e("a-col",{staticClass:"code-col",attrs:{xs:24,md:16}},[e("div",{staticClass:"code-section"},[e("div",{staticClass:"section-header"},[e("div",{staticClass:"section-title-wrap"},[e("span",{staticClass:"section-title"},[e("a-icon",{attrs:{type:"code"}}),t._v(" "+t._s(t.$t("trading-assistant.editor.title"))+" ")],1),t.selectedTemplate?e("a-tag",{staticClass:"current-template-tag",attrs:{color:"blue"}},[t._v(" "+t._s(t.$t("trading-assistant.template.".concat(t.selectedTemplate.key)))+" ")]):t._e()],1),e("div",{staticClass:"section-actions"},[e("a-button",{staticClass:"verify-btn",attrs:{type:"link",size:"small",loading:t.verifying},on:{click:t.handleVerify}},[e("a-icon",{attrs:{type:"check-circle"}}),t._v(" "+t._s(t.$t("trading-assistant.editor.verify"))+" ")],1)],1)]),e("div",{ref:"editorContainer",staticClass:"code-editor-container"})])]),e("a-col",{staticClass:"side-col",attrs:{xs:24,md:8}},[e("a-tabs",{staticClass:"side-tabs",attrs:{size:"small",animated:!1},model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[e("a-tab-pane",{key:"templates",attrs:{tab:t.$t("trading-assistant.editor.templateTab"),"force-render":!0}},[e("div",{staticClass:"panel-intro"},[e("div",{staticClass:"panel-intro__title"},[t._v(t._s(t.$t("trading-assistant.editor.templateIntroTitle")))]),e("div",{staticClass:"panel-intro__desc"},[t._v(t._s(t.$t("trading-assistant.editor.templateIntroDesc")))])]),e("div",{staticClass:"template-list"},t._l(t.templates,function(a){return e("div",{key:a.key,staticClass:"template-item",class:{active:t.selectedTemplateKey===a.key},on:{click:function(e){return t.loadTemplate(a.key,{focusParams:!0,resetParams:!0})}}},[e("div",{staticClass:"tpl-header"},[e("span",{staticClass:"tpl-icon"},[t._v(t._s(a.icon))]),e("span",{staticClass:"tpl-name"},[t._v(t._s(t.$t("trading-assistant.template.".concat(a.key))))])]),e("p",{staticClass:"tpl-desc"},[t._v(t._s(t.$t("trading-assistant.template.".concat(a.key,"Desc"))))]),e("a-button",{staticClass:"tpl-use-btn",attrs:{type:"link",size:"small"}},[t._v(" "+t._s(t.$t("trading-assistant.template.useTemplate"))+" "),e("a-icon",{attrs:{type:"arrow-right"}})],1)],1)}),0)]),e("a-tab-pane",{key:"params",attrs:{tab:t.$t("trading-assistant.editor.paramsTab"),"force-render":!0}},[t.selectedTemplate?e("div",{staticClass:"params-panel"},[e("div",{staticClass:"panel-intro"},[e("div",{staticClass:"panel-intro__title"},[t._v(" "+t._s(t.$t("trading-assistant.template.".concat(t.selectedTemplate.key)))+" ")]),e("div",{staticClass:"panel-intro__desc"},[t._v(" "+t._s(t.$t("trading-assistant.template.".concat(t.selectedTemplate.key,"Desc")))+" ")])]),e("a-alert",{staticClass:"params-tip",attrs:{type:"info","show-icon":"",message:t.$t("trading-assistant.editor.paramsHint")}}),e("div",{staticClass:"param-list"},t._l(t.selectedTemplate.params,function(a){return e("div",{key:a.name,staticClass:"param-item"},[e("div",{staticClass:"param-item__label-row"},[e("span",{staticClass:"param-item__label"},[t._v(t._s(t.getParamLabel(a)))]),e("span",{staticClass:"param-item__type"},[t._v(t._s(t.getParamTypeLabel(a.type)))])]),t.getParamDescription(a)?e("div",{staticClass:"param-item__desc"},[t._v(t._s(t.getParamDescription(a)))]):t._e(),"number"===a.type||"integer"===a.type||"percent"===a.type?e("a-input-number",{staticStyle:{width:"100%"},attrs:{value:t.templateParamValues[a.name],min:a.min,max:a.max,step:a.step||1,precision:"integer"===a.type?0:t.getParamPrecision(a)},on:{change:function(e){return t.handleNumericParamChange(a,e)}}}):"select"===a.type?e("a-select",{staticStyle:{width:"100%"},attrs:{value:t.templateParamValues[a.name]},on:{change:function(e){return t.handleSelectParamChange(a,e)}}},t._l(a.options||[],function(a){return e("a-select-option",{key:a.value,attrs:{value:a.value}},[t._v(" "+t._s(t.getOptionLabel(a))+" ")])}),1):"boolean"===a.type?e("div",{staticClass:"param-item__switch"},[e("a-switch",{attrs:{checked:!!t.templateParamValues[a.name]},on:{change:function(e){return t.handleBooleanParamChange(a,e)}}}),e("span",[t._v(t._s(t.templateParamValues[a.name]?t.$t("common.yes"):t.$t("common.no")))])],1):e("a-input",{attrs:{value:t.templateParamValues[a.name]},on:{input:function(e){return t.handleTextParamChange(a,e.target.value)}}})],1)}),0),e("div",{staticClass:"params-actions"},[e("a-button",{on:{click:t.resetTemplateParams}},[t._v(" "+t._s(t.$t("trading-assistant.editor.resetTemplateParams"))+" ")]),e("a-button",{attrs:{type:"primary",disabled:!t.templateDirty},on:{click:t.applySelectedTemplateToCode}},[t._v(" "+t._s(t.$t("trading-assistant.editor.applyTemplateParams"))+" ")])],1)],1):e("div",{staticClass:"params-empty-guide"},[e("a-empty",{attrs:{description:t.$t("trading-assistant.editor.paramsEmpty")}},[e("a-button",{attrs:{type:"primary",size:"small",ghost:""},on:{click:function(e){t.activeTab="templates"}}},[e("a-icon",{attrs:{type:"appstore"}}),t._v(" "+t._s(t.$t("trading-assistant.editor.templateTab"))+" ")],1)],1)],1)]),e("a-tab-pane",{key:"ai",attrs:{tab:t.$t("trading-assistant.editor.aiTab"),"force-render":!0}},[e("div",{staticClass:"ai-panel"},[e("div",{staticClass:"panel-intro"},[e("div",{staticClass:"panel-intro__title"},[e("a-icon",{attrs:{type:"robot"}}),e("span",[t._v(t._s(t.$t("trading-assistant.editor.aiGenerate")))])],1),e("div",{staticClass:"panel-intro__desc"},[t._v(t._s(t.$t("trading-assistant.editor.aiHint")))])]),e("div",{staticClass:"ai-suggestions"},t._l(t.aiPromptSuggestions,function(a){return e("a-tag",{key:a.id,staticClass:"prompt-tag",on:{click:function(e){return t.applyPromptSuggestion(a.value)}}},[t._v(" "+t._s(a.label)+" ")])}),1),e("a-textarea",{attrs:{placeholder:t.$t("trading-assistant.editor.aiPromptPlaceholder"),rows:10,"auto-size":{minRows:8,maxRows:16}},model:{value:t.aiPrompt,callback:function(e){t.aiPrompt=e},expression:"aiPrompt"}}),e("div",{staticClass:"ai-actions"},[e("a-button",{attrs:{type:"primary",block:"",loading:t.aiAdjustingParams,disabled:t.aiGenerating,size:"large"},on:{click:t.handleAIAdjustParams}},[e("a-icon",{attrs:{type:"setting"}}),t._v(" "+t._s(t.$t("trading-assistant.editor.aiAdjustParamsBtn"))+" ")],1),e("a-button",{staticStyle:{"margin-top":"8px"},attrs:{block:"",loading:t.aiGenerating,disabled:t.aiAdjustingParams,size:"large"},on:{click:t.handleAIGenerate}},[e("a-icon",{attrs:{type:"code"}}),t._v(" "+t._s(t.$t("trading-assistant.editor.aiGenerateFullCodeBtn"))+" ")],1)],1),t.aiGenerating||t.aiAdjustingParams?e("div",{staticClass:"ai-status"},[e("a-icon",{attrs:{type:"loading",spin:""}}),t._v(" "+t._s(t.aiAdjustingParams?t.$t("trading-assistant.editor.aiAdjustingParams"):t.$t("trading-assistant.editor.generating"))+" ")],1):t._e()],1)])],1)],1)],1)],1)},G=[],H=(a(6011),a(18787)),W=a(15237),j=a.n(W),Y=(a(74806),a(55218),a(97923),a(50436),{name:"StrategyEditor",props:{value:{type:String,default:""},isDark:{type:Boolean,default:!1},userId:{type:[Number,String],default:1},visible:{type:Boolean,default:!1},initialTemplateKey:{type:String,default:""}},data:function(){return{activeTab:"templates",aiPrompt:"",aiGenerating:!1,aiAdjustingParams:!1,verifying:!1,editor:null,templates:E,selectedTemplateKey:"",templateParamValues:{},templateDirty:!1,refreshTimer:null}},computed:{selectedTemplate:function(){return R(this.selectedTemplateKey)},aiPromptSuggestions:function(){return[{id:"improve",label:this.$t("trading-assistant.editor.aiSuggestionImprove"),value:this.$t("trading-assistant.editor.aiSuggestionImprovePrompt")},{id:"risk",label:this.$t("trading-assistant.editor.aiSuggestionRisk"),value:this.$t("trading-assistant.editor.aiSuggestionRiskPrompt")},{id:"explain",label:this.$t("trading-assistant.editor.aiSuggestionExplain"),value:this.$t("trading-assistant.editor.aiSuggestionExplainPrompt")}]}},mounted:function(){var t=this;this.$nextTick(function(){t.initEditor(),t.initialTemplateKey?t.loadTemplate(t.initialTemplateKey,{focusParams:!0,resetParams:!0}):t.value||t.$emit("input",t._getDefaultCode())}),window.addEventListener("resize",this.scheduleEditorRefresh)},beforeDestroy:function(){window.removeEventListener("resize",this.scheduleEditorRefresh),this.refreshTimer&&(clearTimeout(this.refreshTimer),this.refreshTimer=null),this.editor&&("function"===typeof this.editor.toTextArea&&this.editor.toTextArea(),this.editor=null)},watch:{value:function(t){this.editor&&this.editor.getValue()!==t&&(this.editor.setValue(t||""),this.scheduleEditorRefresh())},isDark:function(){this.editor&&this.editor.setOption("theme",this.isDark?"monokai":"eclipse"),this.scheduleEditorRefresh()},visible:function(t){var e=this;t&&this.$nextTick(function(){e.scheduleEditorRefresh();try{window.dispatchEvent(new Event("resize"))}catch(t){}})},initialTemplateKey:function(t){t&&t!==this.selectedTemplateKey&&this.loadTemplate(t,{focusParams:!0,resetParams:!0})}},methods:{initEditor:function(){var t=this;this.$refs.editorContainer&&(this.editor=j()(this.$refs.editorContainer,{value:this.value||this._getDefaultCode(),mode:"python",theme:this.isDark?"monokai":"eclipse",lineNumbers:!0,autoCloseBrackets:!0,matchBrackets:!0,styleActiveLine:!0,tabSize:4,indentUnit:4,indentWithTabs:!1,lineWrapping:!1,viewportMargin:1/0,gutters:["CodeMirror-linenumbers"]}),this.editor.on("change",function(){t.$emit("input",t.editor.getValue())}),this.scheduleEditorRefresh())},scheduleEditorRefresh:function(){var t=this;this.refreshTimer&&clearTimeout(this.refreshTimer),this.refreshTimer=setTimeout(function(){t.editor&&t.editor.refresh()},60)},_getDefaultCode:function(){return'"""\nMy Custom Strategy\n"""\n\ndef on_init(ctx):\n # Initialize strategy parameters\n pass\n\ndef on_bar(ctx, bar):\n # Core trading logic, called on each K-line bar\n # bar: { open, high, low, close, volume, timestamp }\n price = bar[\'close\']\n\n bars = ctx.bars(20)\n if len(bars) < 20:\n return\n\n avg = sum(b[\'close\'] for b in bars) / len(bars)\n\n if price > avg and not ctx.position:\n ctx.buy(price, ctx.equity * 0.9 / price)\n ctx.log(f"BUY at {price}")\n\n elif price < avg and ctx.position:\n ctx.close_position()\n ctx.log(f"SELL at {price}")\n'},loadTemplate:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=e.focusParams,s=void 0!==a&&a,i=e.resetParams,r=void 0===i||i,n=R(t);n&&(this.selectedTemplateKey=t,!r&&this.templateParamValues&&0!==Object.keys(this.templateParamValues).length||(this.templateParamValues=z(n)),this.templateDirty=!0,this.applySelectedTemplateToCode({silent:!0}),s&&(this.activeTab="params"),this.aiPrompt.trim()||(this.aiPrompt=this.$t("trading-assistant.editor.aiPromptTemplateHint")+" "+this.$t("trading-assistant.template.".concat(n.key))),this.scheduleEditorRefresh())},getCode:function(){return this.editor?this.editor.getValue():this.value},setCode:function(t){this.editor&&this.editor.getValue()!==t?this.editor.setValue(t):this.$emit("input",t),this.scheduleEditorRefresh()},applySelectedTemplateToCode:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.silent,a=void 0!==e&&e;if(this.selectedTemplate){var s=L(this.selectedTemplate,this.templateParamValues);this.setCode(s),this.templateDirty=!1,this.$emit("template-change",{key:this.selectedTemplateKey,params:(0,u.A)({},this.templateParamValues)}),a||H.A.success(this.$t("trading-assistant.editor.templateApplied"))}},resetTemplateParams:function(){this.selectedTemplate&&(this.templateParamValues=z(this.selectedTemplate),this.templateDirty=!0,this.applySelectedTemplateToCode({silent:!1}))},getParamLabel:function(t){var e="trading-assistant.templateParam.".concat(t.name,".label"),a=this.$t(e);return a===e?t.name:a},getParamDescription:function(t){var e="trading-assistant.templateParam.".concat(t.name,".desc"),a=this.$t(e);return a===e?"":a},getParamTypeLabel:function(t){return this.$t("trading-assistant.editor.paramType.".concat(t))},getOptionLabel:function(t){if(!t)return"";if(t.labelKey){var e=this.$t(t.labelKey);if(e!==t.labelKey)return e}return t.label||t.value},getParamPrecision:function(t){if("integer"===t.type)return 0;var e=t.step;if(!e||Number.isInteger(e))return 0;var a=String(e),s=a.split(".");return s[1]?s[1].length:0},handleNumericParamChange:function(t,e){var a=""===e||null===e||void 0===e?t.default:"integer"===t.type?parseInt(e,10):Number(e);this.$set(this.templateParamValues,t.name,a),this.templateDirty=!0},handleSelectParamChange:function(t,e){this.$set(this.templateParamValues,t.name,e),this.templateDirty=!0},handleBooleanParamChange:function(t,e){this.$set(this.templateParamValues,t.name,!!e),this.templateDirty=!0},handleTextParamChange:function(t,e){this.$set(this.templateParamValues,t.name,e),this.templateDirty=!0},applyPromptSuggestion:function(t){this.aiPrompt=t},handleVerify:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.verifying=!0,e.p=1,a=t.getCode(),e.n=2,(0,y.Ay)({url:"/api/strategies/verify-code",method:"post",data:{code:a,user_id:t.userId}});case 2:s=e.v,s&&s.success?H.A.success(t.$t("trading-assistant.editor.verifySuccess")):H.A.error(s&&(s.msg||s.message)||t.$t("trading-assistant.editor.verifyFailed")),e.n=4;break;case 3:e.p=3,i=e.v,H.A.error(t.$t("trading-assistant.editor.verifyFailed")+": "+(i.message||""));case 4:return e.p=4,t.verifying=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},_coerceParamValue:function(t,e){if(null!==e&&void 0!==e){var a=t.type;if("boolean"===a)return"boolean"===typeof e?e:"true"===e||1===e||"1"===e||"false"!==e&&0!==e&&"0"!==e&&void 0;if("integer"===a){var s=parseInt(String(e),10);if(!Number.isFinite(s))return;var i=s;return null!=t.min&&(i=Math.max(t.min,i)),null!=t.max&&(i=Math.min(t.max,i)),i}if("number"===a||"percent"===a){var r=Number(e);if(!Number.isFinite(r))return;var n=r;return null!=t.min&&(n=Math.max(t.min,n)),null!=t.max&&(n=Math.min(t.max,n)),n}if("select"===a){var o=t.options||[],l=new Set(o.map(function(t){return t.value}));if(l.has(e))return e;var c=String(e);return l.has(c)?c:void 0}return String(e)}},applyAIParamUpdates:function(t){var e=this;if(!this.selectedTemplate||!t||"object"!==(0,n.A)(t))return!1;var a=new Set(this.selectedTemplate.params.map(function(t){return t.name})),s=!1;return Object.keys(t).forEach(function(i){if(a.has(i)){var r=e.selectedTemplate.params.find(function(t){return t.name===i}),n=e._coerceParamValue(r,t[i]);void 0!==n&&(e.$set(e.templateParamValues,i,n),s=!0)}}),s},handleAIAdjustParams:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.aiPrompt.trim()){e.n=1;break}return H.A.warning(t.$t("trading-assistant.editor.aiPromptRequired")),e.a(2);case 1:if(t.selectedTemplate){e.n=2;break}return H.A.warning(t.$t("trading-assistant.editor.aiAdjustParamsNeedTemplate")),e.a(2);case 2:return t.aiAdjustingParams=!0,e.p=3,e.n=4,(0,y.Ay)({url:"/api/strategies/ai-generate",method:"post",data:{prompt:t.aiPrompt,user_id:t.userId,intent:"adjust_params",template_key:t.selectedTemplateKey,params:(0,u.A)({},t.templateParamValues),code:t.getCode()}});case 4:a=e.v,a&&a.params&&"object"===(0,n.A)(a.params)?(s=t.applyAIParamUpdates(a.params),s?(t.templateDirty=!0,t.applySelectedTemplateToCode({silent:!0}),H.A.success(t.$t("trading-assistant.editor.aiAdjustParamsSuccess"))):H.A.warning(t.$t("trading-assistant.editor.aiAdjustParamsNoChanges"))):H.A.error(a&&(a.msg||a.message)||t.$t("trading-assistant.editor.aiAdjustParamsFailed")),e.n=6;break;case 5:e.p=5,i=e.v,H.A.error(i&&i.message||t.$t("trading-assistant.editor.aiAdjustParamsFailed"));case 6:return e.p=6,t.aiAdjustingParams=!1,e.f(6);case 7:return e.a(2)}},e,null,[[3,5,6,7]])}))()},handleAIGenerate:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.aiPrompt.trim()){e.n=1;break}return H.A.warning(t.$t("trading-assistant.editor.aiPromptRequired")),e.a(2);case 1:return t.aiGenerating=!0,e.p=2,e.n=3,(0,y.Ay)({url:"/api/strategies/ai-generate",method:"post",data:{prompt:t.aiPrompt,user_id:t.userId,intent:"generate_code",template_key:t.selectedTemplateKey||void 0,params:t.selectedTemplate?(0,u.A)({},t.templateParamValues):void 0,code:t.getCode()}});case 3:a=e.v,s=a&&"string"===typeof a.code?a.code:"",s?(t.setCode(s),H.A.success(t.$t("trading-assistant.editor.aiGenerateSuccess"))):H.A.error(a&&(a.msg||a.message)||t.$t("trading-assistant.editor.aiGenerateFailed")),e.n=5;break;case 4:e.p=4,i=e.v,H.A.error(i&&i.message||t.$t("trading-assistant.editor.aiGenerateFailed"));case 5:return e.p=5,t.aiGenerating=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()}}}),J=Y,X=(0,C.A)(J,B,G,!1,null,"35a0a386",null),Q=X.exports,Z=function(){var t=this,e=t._self._c;return e("div",{staticClass:"performance-analysis strategy-tab-pane-inner",class:{"theme-dark":t.isDark}},[e("a-spin",{attrs:{spinning:t.loading}},[t.hasData?e("div",[e("div",{staticClass:"metrics-grid"},[e("div",{staticClass:"metric-card",class:t.getMetricClass(t.metrics.totalReturn)},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.totalReturn")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.metrics.totalReturn)))])]),e("div",{staticClass:"metric-card",class:t.getMetricClass(t.metrics.annualReturn)},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.annualReturn")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.metrics.annualReturn)))])]),e("div",{staticClass:"metric-card negative"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.maxDrawdown")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.metrics.maxDrawdown)))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.sharpe")))]),e("div",{staticClass:"metric-value"},[t._v(t._s((t.metrics.sharpe||0).toFixed(2)))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.winRate")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.metrics.winRate)))])]),e("div",{staticClass:"metric-card",class:t.getMetricClass((t.metrics.profitFactor||0)-1)},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.profitFactor")))]),e("div",{staticClass:"metric-value"},[t._v(t._s((t.metrics.profitFactor||0).toFixed(2)))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.totalTrades")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.metrics.totalTrades||0))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.runningDays")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.metrics.runningDays||0))])])]),e("div",{staticClass:"chart-section"},[e("div",{staticClass:"chart-title"},[t._v(t._s(t.$t("trading-assistant.performance.equityCurve")))]),e("div",{ref:"equityChart",staticClass:"chart-container"})]),e("div",{staticClass:"chart-section"},[e("div",{staticClass:"chart-title"},[t._v(t._s(t.$t("trading-assistant.performance.dailyReturns")))]),e("div",{ref:"dailyChart",staticClass:"chart-container",staticStyle:{height:"250px"}})])]):t.loading?t._e():e("a-empty",{staticClass:"strategy-tab-empty",attrs:{description:t.$t("trading-assistant.performance.noData")}})],1)],1)},tt=[],et={name:"PerformanceAnalysis",props:{strategyId:{type:[Number,String],default:null},isDark:{type:Boolean,default:!1}},data:function(){return{loading:!1,metrics:{},equityData:[],dailyReturns:[],equityChartInstance:null,dailyChartInstance:null}},computed:{hasData:function(){return this.equityData.length>0}},watch:{strategyId:{handler:function(t){t&&this.loadData()},immediate:!0},isDark:function(){var t=this;this.disposeCharts(),this.$nextTick(function(){return t.renderCharts()})}},beforeDestroy:function(){this.disposeCharts()},methods:{loadData:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.strategyId){e.n=1;break}return e.a(2);case 1:return t.loading=!0,e.p=2,e.n=3,(0,p.Yx)(t.strategyId);case 3:a=e.v,a&&a.data&&(t.equityData=a.data.equity_curve||a.data||[],t.computeMetrics(),t.$nextTick(function(){return t.renderCharts()})),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.p=5,t.loading=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},computeMetrics:function(){var t=this.equityData;if(t.length){for(var e=t.map(function(t){return t.equity||t.value||t.y||0}),a=e[0]||1,s=e[e.length-1]||a,i=(s-a)/a,r=e[0],n=0,o=[],l=1;lr&&(r=e[l]);var c=(e[l]-r)/r;c1?Math.sqrt(o.reduce(function(t,e){return t+Math.pow(e-p,2)},0)/(o.length-1)):0,g=t.filter(function(t){return t.trade_count}).reduce(function(t,e){return t+e.trade_count},0)||0,h=t.filter(function(t){return t.win_count}).reduce(function(t,e){return t+e.win_count},0)||0,_=t.filter(function(t){return t.gross_profit}).reduce(function(t,e){return t+e.gross_profit},0),y=Math.abs(t.filter(function(t){return t.gross_loss}).reduce(function(t,e){return t+e.gross_loss},0));this.metrics={totalReturn:i,annualReturn:Math.pow(1+i,u)-1,maxDrawdown:n,sharpe:m>0?p/m*Math.sqrt(252):0,winRate:g>0?h/g:0,profitFactor:y>0?_/y:_>0?999:0,totalTrades:g,runningDays:d}}else this.metrics={}},renderCharts:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.n){case 0:return e.n=1,t.getEcharts();case 1:if(a=e.v,a){e.n=2;break}return e.a(2);case 2:t.renderEquityChart(a),t.renderDailyChart(a);case 3:return e.a(2)}},e)}))()},getEcharts:function(){return(0,l.A)((0,o.A)().m(function t(){var e;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(!window.echarts){t.n=1;break}return t.a(2,window.echarts);case 1:return t.p=1,t.n=2,Promise.resolve().then(a.bind(a,29362));case 2:return e=t.v,window.echarts=e.default||e,t.a(2,window.echarts);case 3:return t.p=3,t.v,t.a(2,null)}},t,null,[[1,3]])}))()},renderEquityChart:function(t){if(this.$refs.equityChart){this.equityChartInstance=t.init(this.$refs.equityChart,this.isDark?"dark":null);var e=this.equityData.map(function(t){return t.date||t.timestamp||t.x||""}),a=this.equityData.map(function(t){return t.equity||t.value||t.y||0});this.equityChartInstance.setOption({tooltip:{trigger:"axis"},grid:{left:60,right:20,top:20,bottom:30},xAxis:{type:"category",data:e,axisLabel:{fontSize:10}},yAxis:{type:"value",axisLabel:{fontSize:10}},series:[{type:"line",data:a,smooth:!0,lineStyle:{width:2,color:"#1890ff"},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(24,144,255,0.3)"},{offset:1,color:"rgba(24,144,255,0.02)"}]}},itemStyle:{color:"#1890ff"},showSymbol:!1}]})}},renderDailyChart:function(t){this.$refs.dailyChart&&this.dailyReturns.length&&(this.dailyChartInstance=t.init(this.$refs.dailyChart,this.isDark?"dark":null),this.dailyChartInstance.setOption({tooltip:{trigger:"axis",formatter:function(t){return"".concat((100*t[0].value).toFixed(2),"%")}},grid:{left:60,right:20,top:10,bottom:30},xAxis:{type:"category",data:this.dailyReturns.map(function(t,e){return e+1}),show:!1},yAxis:{type:"value",axisLabel:{formatter:function(t){return(100*t).toFixed(1)+"%"},fontSize:10}},series:[{type:"bar",data:this.dailyReturns.map(function(t){return{value:t,itemStyle:{color:t>=0?"#52c41a":"#ff4d4f"}}}),barMaxWidth:6}]}))},disposeCharts:function(){this.equityChartInstance&&(this.equityChartInstance.dispose(),this.equityChartInstance=null),this.dailyChartInstance&&(this.dailyChartInstance.dispose(),this.dailyChartInstance=null)},formatPercent:function(t){return void 0===t||null===t?"--":(t>=0?"+":"")+(100*t).toFixed(2)+"%"},getMetricClass:function(t){return t?t>0?"positive":t<0?"negative":"":""}}},at=et,st=(0,C.A)(at,Z,tt,!1,null,"01ff5f5a",null),it=st.exports,rt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"strategy-logs strategy-tab-pane-inner",class:{"theme-dark":t.isDark}},[e("div",{staticClass:"logs-toolbar"},[e("div",{staticClass:"toolbar-left"},[e("a-radio-group",{attrs:{size:"small","button-style":"solid"},model:{value:t.filterLevel,callback:function(e){t.filterLevel=e},expression:"filterLevel"}},[e("a-radio-button",{attrs:{value:"all"}},[t._v("All")]),e("a-radio-button",{attrs:{value:"trade"}},[e("a-badge",{attrs:{count:t.countByLevel("trade"),"overflow-count":99,offset:[6,-2]}},[t._v(" "+t._s(t.$t("trading-assistant.logs.level.trade"))+" ")])],1),e("a-radio-button",{attrs:{value:"signal"}},[t._v(t._s(t.$t("trading-assistant.logs.level.signal")))]),e("a-radio-button",{attrs:{value:"error"}},[t._v(t._s(t.$t("trading-assistant.logs.level.error")))])],1)],1),e("div",{staticClass:"toolbar-right"},[e("a-switch",{attrs:{checked:t.autoRefresh,size:"small"},on:{change:t.toggleAutoRefresh}}),e("span",{staticClass:"auto-refresh-label"},[t._v(t._s(t.$t("trading-assistant.logs.autoRefresh")))])],1)]),e("div",{ref:"logsContainer",staticClass:"logs-container custom-scrollbar"},[0===t.filteredLogs.length?e("div",{staticClass:"logs-empty"},[e("a-icon",{staticStyle:{"font-size":"32px",color:"#ccc"},attrs:{type:"file-text"}}),e("p",[t._v(t._s(t.$t("trading-assistant.logs.noLogs")))])],1):t._e(),t._l(t.filteredLogs,function(a,s){return e("div",{key:s,staticClass:"log-entry",class:"level-"+a.level},[e("span",{staticClass:"log-time"},[t._v(t._s(t.formatTime(a.timestamp)))]),e("a-tag",{staticClass:"log-level",attrs:{color:t.getLevelColor(a.level),size:"small"}},[t._v(" "+t._s(t.getLevelText(a.level))+" ")]),e("span",{staticClass:"log-message"},[t._v(t._s(a.message))])],1)})],2)])},nt=[],ot={name:"StrategyLogs",props:{strategyId:{type:[Number,String],default:null},isDark:{type:Boolean,default:!1}},data:function(){return{logs:[],filterLevel:"all",autoRefresh:!1,refreshTimer:null,loading:!1}},computed:{filteredLogs:function(){var t=this;return"all"===this.filterLevel?this.logs:this.logs.filter(function(e){return e.level===t.filterLevel})}},watch:{strategyId:{handler:function(t){t&&this.loadLogs()},immediate:!0}},beforeDestroy:function(){this.stopAutoRefresh()},methods:{loadLogs:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.strategyId){e.n=1;break}return e.a(2);case 1:return t.loading=!0,e.p=2,e.n=3,(0,y.Ay)({url:"/api/strategies/logs",method:"get",params:{id:t.strategyId,limit:200}});case 3:a=e.v,a&&a.data&&(t.logs=a.data,t.$nextTick(function(){return t.scrollToBottom()})),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.p=5,t.loading=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},toggleAutoRefresh:function(t){var e=this;this.autoRefresh=t,t?this.refreshTimer=setInterval(function(){return e.loadLogs()},5e3):this.stopAutoRefresh()},stopAutoRefresh:function(){this.refreshTimer&&(clearInterval(this.refreshTimer),this.refreshTimer=null)},scrollToBottom:function(){var t=this.$refs.logsContainer;t&&(t.scrollTop=t.scrollHeight)},countByLevel:function(t){return this.logs.filter(function(e){return e.level===t}).length},formatTime:function(t){if(!t)return"";try{var e=new Date(t);return e.toLocaleTimeString("en-GB",{hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch(a){return t}},getLevelColor:function(t){var e={info:"blue",warn:"orange",error:"red",trade:"green",signal:"purple"};return e[t]||"default"},getLevelText:function(t){var e="trading-assistant.logs.level.".concat(t),a=this.$t(e);return a!==e?a:t}}},lt=ot,ct=(0,C.A)(lt,rt,nt,!1,null,"73589ce4",null),dt=ct.exports,ut=function(){var t=this,e=t._self._c;return e("div",{staticClass:"dashboard-pro",class:{"theme-dark":t.isDarkTheme}},[e("div",{staticClass:"kpi-grid"},[e("div",{staticClass:"kpi-card kpi-primary"},[e("div",{staticClass:"kpi-glow"}),e("div",{staticClass:"kpi-content"},[e("div",{staticClass:"kpi-header"},[e("span",{staticClass:"kpi-icon"},[e("a-icon",{attrs:{type:"wallet"}})],1),e("span",{staticClass:"kpi-label"},[t._v(t._s(t.$t("dashboard.totalEquity")))])]),e("div",{staticClass:"kpi-value"},[e("span",{staticClass:"currency"},[t._v("$")]),e("span",{staticClass:"amount"},[t._v(t._s(t.formatNumber(t.summary.total_equity)))])]),e("div",{staticClass:"kpi-sub"},[e("span",{class:t.summary.total_pnl>=0?"positive":"negative"},[t._v(" "+t._s(t.summary.total_pnl>=0?"+":"")+t._s(t.formatNumber(t.summary.total_pnl))+" ")]),e("span",{staticClass:"label"},[t._v(t._s(t.$t("dashboard.label.totalPnl")))])])])]),e("div",{staticClass:"kpi-card kpi-win-rate"},[e("div",{staticClass:"kpi-content"},[e("div",{staticClass:"kpi-header"},[e("span",{staticClass:"kpi-icon"},[e("a-icon",{attrs:{type:"trophy"}})],1),e("span",{staticClass:"kpi-label"},[t._v(t._s(t.$t("dashboard.winRate")||"胜率"))])]),e("div",{staticClass:"kpi-value"},[e("span",{staticClass:"amount"},[t._v(t._s(t.formatNumber(t.performance.win_rate,1)))]),e("span",{staticClass:"unit"},[t._v("%")])]),e("div",{staticClass:"kpi-sub"},[e("span",{staticClass:"positive"},[t._v(t._s(t.performance.winning_trades))]),e("span",{staticClass:"label"},[t._v(t._s(t.$t("dashboard.label.win")))]),e("span",{staticClass:"divider"},[t._v("/")]),e("span",{staticClass:"negative"},[t._v(t._s(t.performance.losing_trades))]),e("span",{staticClass:"label"},[t._v(t._s(t.$t("dashboard.label.lose")))])])]),e("div",{staticClass:"kpi-ring"},[e("svg",{attrs:{viewBox:"0 0 36 36"}},[e("path",{staticClass:"ring-bg",attrs:{d:"M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831"}}),e("path",{staticClass:"ring-progress",attrs:{"stroke-dasharray":"".concat(t.performance.win_rate||0,", 100"),d:"M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831"}})])])]),e("div",{staticClass:"kpi-card kpi-profit-factor"},[e("div",{staticClass:"kpi-content"},[e("div",{staticClass:"kpi-header"},[e("span",{staticClass:"kpi-icon"},[e("a-icon",{attrs:{type:"rise"}})],1),e("span",{staticClass:"kpi-label"},[t._v(t._s(t.$t("dashboard.profitFactor")||"盈亏比"))])]),e("div",{staticClass:"kpi-value"},[e("span",{staticClass:"amount"},[t._v(t._s(t.formatNumber(t.performance.profit_factor,2)))]),e("span",{staticClass:"unit"},[t._v(":1")])]),e("div",{staticClass:"kpi-sub"},[e("span",[t._v(t._s(t.$t("dashboard.label.avgProfit"))+" ")]),e("span",{staticClass:"positive"},[t._v("$"+t._s(t.formatNumber(t.performance.avg_win)))])])])]),e("div",{staticClass:"kpi-card kpi-drawdown"},[e("div",{staticClass:"kpi-content"},[e("div",{staticClass:"kpi-header"},[e("span",{staticClass:"kpi-icon"},[e("a-icon",{attrs:{type:"fall"}})],1),e("span",{staticClass:"kpi-label"},[t._v(t._s(t.$t("dashboard.maxDrawdown")||"最大回撤"))])]),e("div",{staticClass:"kpi-value"},[e("span",{staticClass:"amount negative"},[t._v(t._s(t.formatNumber(t.performance.max_drawdown_pct,1)))]),e("span",{staticClass:"unit"},[t._v("%")])]),e("div",{staticClass:"kpi-sub"},[e("span",[t._v("$"+t._s(t.formatNumber(t.performance.max_drawdown)))])])])]),e("div",{staticClass:"kpi-card kpi-trades"},[e("div",{staticClass:"kpi-content"},[e("div",{staticClass:"kpi-header"},[e("span",{staticClass:"kpi-icon"},[e("a-icon",{attrs:{type:"swap"}})],1),e("span",{staticClass:"kpi-label"},[t._v(t._s(t.$t("dashboard.totalTrades")||"总交易"))])]),e("div",{staticClass:"kpi-value"},[e("span",{staticClass:"amount"},[t._v(t._s(t.performance.total_trades))]),e("span",{staticClass:"unit"},[t._v(t._s(t.$t("dashboard.unit.trades")))])]),e("div",{staticClass:"kpi-sub"},[e("span",[t._v(t._s(t.$t("dashboard.label.avgDaily"))+" ")]),e("span",[t._v(t._s(t.avgTradesPerDay))]),e("span",{staticClass:"label"},[t._v(" "+t._s(t.$t("dashboard.unit.trades")))])])])]),e("div",{staticClass:"kpi-card kpi-strategies clickable",on:{click:t.goToStrategyManagement}},[e("div",{staticClass:"kpi-content"},[e("div",{staticClass:"kpi-header"},[e("span",{staticClass:"kpi-icon"},[e("a-icon",{attrs:{type:"thunderbolt",theme:"filled"}})],1),e("span",{staticClass:"kpi-label"},[t._v(t._s(t.$t("dashboard.runningStrategies")||"运行中策略"))])]),e("div",{staticClass:"kpi-value"},[e("span",{staticClass:"amount"},[t._v(t._s(t.summary.indicator_strategy_count))]),e("span",{staticClass:"unit"},[t._v(t._s(t.$t("dashboard.unit.strategies")))])]),e("div",{staticClass:"kpi-sub"},[e("span",{staticClass:"highlight"},[t._v(t._s(t.summary.indicator_strategy_count))]),e("span",{staticClass:"label"},[t._v(" "+t._s(t.$t("dashboard.label.indicator")))])])]),e("div",{staticClass:"card-arrow"},[e("a-icon",{attrs:{type:"right"}})],1)])]),t.showSetupGuide&&!t.hideSetupGuide?e("div",{staticClass:"setup-guide-card"},[e("div",{staticClass:"setup-guide-copy"},[e("div",{staticClass:"setup-guide-title"},[t._v(t._s(t.$t("dashboard.setupGuide.title")))]),e("div",{staticClass:"setup-guide-desc"},[t._v(t._s(t.$t("dashboard.setupGuide.desc")))]),e("div",{staticClass:"setup-guide-path"},[t._v(t._s(t.$t("dashboard.setupGuide.path")))])]),e("div",{staticClass:"setup-guide-actions"},[e("a-button",{on:{click:t.goToStrategyManagement}},[e("a-icon",{attrs:{type:"appstore"}}),t._v(" "+t._s(t.$t("dashboard.setupGuide.secondary"))+" ")],1),e("a-button",{attrs:{type:"primary"},on:{click:t.goToStrategyCreate}},[e("a-icon",{attrs:{type:"plus"}}),t._v(" "+t._s(t.$t("dashboard.setupGuide.primary"))+" ")],1)],1)]):t._e(),e("div",{staticClass:"chart-row"},[e("div",{staticClass:"chart-panel chart-main"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"calendar"}}),e("span",[t._v(t._s(t.$t("dashboard.profitCalendar")||"收益日曆"))])],1),e("div",{staticClass:"calendar-nav"},[e("a-button",{attrs:{type:"link",size:"small",disabled:t.currentCalendarIndex>=t.calendarMonths.length-1},on:{click:t.prevMonth}},[e("a-icon",{attrs:{type:"left"}})],1),e("span",{staticClass:"current-month"},[t._v(t._s(t.currentMonthLabel))]),e("a-button",{attrs:{type:"link",size:"small",disabled:t.currentCalendarIndex<=0},on:{click:t.nextMonth}},[e("a-icon",{attrs:{type:"right"}})],1)],1)]),e("div",{staticClass:"profit-calendar"},[t.currentCalendarMonth?[e("div",{staticClass:"month-summary"},[e("div",{staticClass:"summary-item"},[e("span",{staticClass:"summary-label"},[t._v(t._s(t.$t("dashboard.ranking.totalProfit")))]),e("span",{staticClass:"summary-value",class:t.currentCalendarMonth.total>=0?"positive":"negative"},[t._v(" "+t._s(t.currentCalendarMonth.total>=0?"+":"")+"$"+t._s(t.formatNumber(t.currentCalendarMonth.total))+" ")])]),e("div",{staticClass:"summary-item"},[e("span",{staticClass:"summary-label"},[t._v(t._s(t.$t("dashboard.label.win")))]),e("span",{staticClass:"summary-value positive"},[t._v(t._s(t.currentCalendarMonth.win_days))])]),e("div",{staticClass:"summary-item"},[e("span",{staticClass:"summary-label"},[t._v(t._s(t.$t("dashboard.label.lose")))]),e("span",{staticClass:"summary-value negative"},[t._v(t._s(t.currentCalendarMonth.lose_days))])])]),e("div",{staticClass:"calendar-weekdays"},t._l(t.weekdays,function(a){return e("div",{key:a,staticClass:"weekday"},[t._v(t._s(a))])}),0),e("div",{staticClass:"calendar-grid"},[t._l(t.calendarFirstDayOffset,function(t){return e("div",{key:"empty-"+t,staticClass:"calendar-cell empty"})}),t._l(t.currentCalendarMonth.days_in_month,function(a){return e("div",{key:a,staticClass:"calendar-cell",class:t.getDayClass(a)},[e("span",{staticClass:"day-number"},[t._v(t._s(a))]),null!==t.getDayProfit(a)?e("span",{staticClass:"day-profit",class:t.getDayProfit(a)>=0?"positive":"negative"},[t._v(" "+t._s(t.getDayProfit(a)>=0?"+":"")+t._s(t.formatCompactNumber(t.getDayProfit(a)))+" ")]):t._e()])})],2)]:e("div",{staticClass:"calendar-empty"},[e("a-icon",{attrs:{type:"inbox"}}),e("span",[t._v(t._s(t.$t("dashboard.noData")))])],1)],2)]),e("div",{staticClass:"chart-panel chart-side"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"pie-chart"}}),e("span",[t._v(t._s(t.$t("dashboard.strategyAllocation")||"策略分布"))])],1)]),e("div",{ref:"pieChart",staticClass:"chart-body"})])]),e("div",{staticClass:"chart-row"},[e("div",{staticClass:"chart-panel chart-half"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"area-chart"}}),e("span",[t._v(t._s(t.$t("dashboard.drawdownCurve")||"回撤曲线"))])],1)]),e("div",{ref:"drawdownChart",staticClass:"chart-body chart-sm"})]),e("div",{staticClass:"chart-panel chart-half"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"clock-circle"}}),e("span",[t._v(t._s(t.$t("dashboard.hourlyDistribution")||"交易时段"))])],1)]),e("div",{ref:"hourlyChart",staticClass:"chart-body chart-sm"})])]),e("div",{staticClass:"chart-panel"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"ordered-list"}}),e("span",[t._v(t._s(t.$t("dashboard.strategyRanking")||"策略排行榜"))])],1)]),e("div",{staticClass:"strategy-ranking"},[0===t.strategyStats.length?e("div",{staticClass:"empty-state"},[e("a-icon",{attrs:{type:"inbox"}}),e("span",[t._v(t._s(t.$t("dashboard.noStrategyData")))])],1):e("div",{staticClass:"ranking-grid"},t._l(t.strategyStats.slice(0,6),function(a,s){return e("div",{key:a.strategy_id,staticClass:"ranking-card",class:{"rank-top":s<3}},[e("div",{staticClass:"rank-badge",class:"rank-".concat(s+1)},[t._v(t._s(s+1))]),e("div",{staticClass:"rank-info"},[e("div",{staticClass:"rank-name"},[t._v(t._s(a.strategy_name))]),e("div",{staticClass:"rank-stats"},[e("span",{staticClass:"stat"},[e("label",[t._v(t._s(t.$t("dashboard.ranking.totalProfit")))]),e("span",{class:a.total_pnl>=0?"positive":"negative"},[t._v(" "+t._s(a.total_pnl>=0?"+":"")+"$"+t._s(t.formatNumber(a.total_pnl))+" ")])]),e("span",{staticClass:"stat"},[e("label",[t._v(t._s(t.$t("dashboard.winRate")))]),e("span",[t._v(t._s(t.formatNumber(a.win_rate,1))+"%")])]),e("span",{staticClass:"stat"},[e("label",[t._v(t._s(t.$t("dashboard.profitFactor")))]),e("span",[t._v(t._s(t.formatNumber(a.profit_factor,2)))])]),e("span",{staticClass:"stat"},[e("label",[t._v(t._s(t.$t("dashboard.ranking.trades")))]),e("span",[t._v(t._s(a.total_trades))])])])]),e("div",{staticClass:"rank-pnl-bar"},[e("div",{staticClass:"bar-fill",class:a.total_pnl>=0?"positive":"negative",style:{width:"".concat(Math.min(100,Math.abs(a.total_pnl)/t.maxStrategyPnl*100),"%")}})])])}),0)])]),e("div",{staticClass:"table-row"},[e("div",{staticClass:"table-panel"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"stock"}}),e("span",[t._v(t._s(t.$t("dashboard.currentPositions")))])],1),e("div",{staticClass:"panel-badge"},[t._v(t._s((t.summary.current_positions||[]).length))])]),e("a-table",{staticClass:"pro-table",attrs:{columns:t.positionColumns,"data-source":t.summary.current_positions,rowKey:"id",pagination:!1,size:"small",scroll:{x:"max-content"}},scopedSlots:t._u([{key:"symbol",fn:function(a,s){return[e("div",{staticClass:"symbol-cell"},[e("span",{staticClass:"symbol-name"},[t._v(t._s(a))]),e("span",{staticClass:"symbol-strategy"},[t._v(t._s(s.strategy_name))])])]}},{key:"side",fn:function(a){return[e("span",{staticClass:"side-tag",class:"long"===a?"long":"short"},[t._v(" "+t._s("long"===a?"LONG":"SHORT")+" ")])]}},{key:"unrealized_pnl",fn:function(a,s){return[e("div",{staticClass:"pnl-cell"},[e("span",{class:a>=0?"positive":"negative"},[t._v(" "+t._s(a>=0?"+":"")+"$"+t._s(t.formatNumber(a))+" ")]),e("span",{staticClass:"pnl-percent",class:s.pnl_percent>=0?"positive":"negative"},[t._v(" "+t._s(s.pnl_percent>=0?"+":"")+t._s(t.formatNumber(s.pnl_percent))+"% ")])])]}}])})],1),e("div",{staticClass:"table-panel"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"history"}}),e("span",[t._v(t._s(t.$t("dashboard.recentTrades")))])],1)]),e("a-table",{staticClass:"pro-table",attrs:{columns:t.columns,"data-source":t.summary.recent_trades,rowKey:"id",pagination:{pageSize:8,size:"small"},size:"small",scroll:{x:"max-content"}},scopedSlots:t._u([{key:"type",fn:function(a){return[e("span",{staticClass:"type-tag",class:t.getTypeClass(a)},[t._v(" "+t._s(t.getSignalTypeText(a))+" ")])]}},{key:"profit",fn:function(a,s){return[e("span",{class:"--"!==t.formatProfitValue(a,s)?a>=0?"positive":"negative":""},[t._v(" "+t._s(t.formatProfitValue(a,s))+" ")])]}},{key:"time",fn:function(a){return[e("span",{staticClass:"time-cell"},[t._v(t._s(t.formatTime(a)))])]}}])})],1)]),e("div",{staticClass:"chart-panel orders-panel"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"unordered-list"}}),e("span",[t._v(t._s(t.$t("dashboard.pendingOrders")))]),e("a-tooltip",{attrs:{title:t.soundEnabled?t.$t("dashboard.clickToMute"):t.$t("dashboard.clickToUnmute")}},[e("a-icon",{staticClass:"sound-toggle",class:{"sound-off":!t.soundEnabled},attrs:{type:t.soundEnabled?"sound":"audio-muted"},on:{click:t.toggleSound}})],1)],1),e("div",{staticClass:"panel-badge"},[t._v(t._s(t.ordersPagination.total))])]),e("a-table",{staticClass:"pro-table",attrs:{columns:t.orderColumns,"data-source":t.pendingOrders,rowKey:"id",pagination:{current:t.ordersPagination.current,pageSize:t.ordersPagination.pageSize,total:t.ordersPagination.total,showSizeChanger:!0,size:"small",showTotal:function(e){return t.$t("dashboard.totalOrders",{total:e})}},size:"small",loading:t.ordersLoading,scroll:{x:1200}},on:{change:t.handleOrdersTableChange},scopedSlots:t._u([{key:"strategy_name",fn:function(a,s){return[e("div",{staticClass:"symbol-cell"},[e("span",{staticClass:"symbol-name"},[t._v(t._s(a||"-"))]),e("span",{staticClass:"symbol-strategy"},[t._v("ID: "+t._s(s.strategy_id))])])]}},{key:"symbol",fn:function(a){return[e("span",{staticClass:"symbol-tag"},[t._v(t._s(a))])]}},{key:"signal_type",fn:function(a){return[e("span",{staticClass:"type-tag",class:t.getTypeClass(a)},[t._v(" "+t._s(t.getSignalTypeText(a))+" ")])]}},{key:"exchange",fn:function(a,s){return[s&&(s.exchange_display||s.exchange_id||a)?e("span",{staticClass:"exchange-tag",class:(s.exchange_display||s.exchange_id||a).toLowerCase()},[t._v(" "+t._s(String(s.exchange_display||s.exchange_id||a).toUpperCase())+" ")]):e("span",{staticClass:"text-muted"},[t._v("-")]),s&&s.market_type?e("div",{staticClass:"market-type"},[t._v(" "+t._s(String(s.market_type).toUpperCase())+" ")]):t._e()]}},{key:"notify",fn:function(a,s){return[e("div",{staticClass:"notify-icons"},[t._l(s&&s.notify_channels?s.notify_channels:[],function(a){return e("a-tooltip",{key:"".concat(s.id,"-").concat(a),attrs:{title:String(a)}},[e("a-icon",{staticClass:"notify-icon",attrs:{type:t.getNotifyIconType(a)}})],1)}),s&&s.notify_channels&&0!==s.notify_channels.length?t._e():e("span",{staticClass:"text-muted"},[t._v("-")])],2)]}},{key:"status",fn:function(a,s){return[e("span",{staticClass:"status-tag",class:a},[t._v(" "+t._s(t.getStatusText(a))+" ")]),"failed"===a&&s.error_message?e("div",{staticClass:"error-hint"},[e("a-tooltip",{attrs:{title:s.error_message}},[e("a-icon",{attrs:{type:"exclamation-circle"}}),e("span",[t._v(t._s(t.$t("dashboard.viewError")))])],1)],1):t._e()]}},{key:"amount",fn:function(a,s){return[e("div",[t._v(t._s(t.formatNumber(a,8)))]),s.filled_amount?e("div",{staticClass:"sub-text"},[t._v(" "+t._s(t.$t("dashboard.filled"))+": "+t._s(t.formatNumber(s.filled_amount,8))+" ")]):t._e()]}},{key:"price",fn:function(a,s){return[s.filled_price?e("div",[t._v(t._s(t.formatNumber(s.filled_price)))]):e("div",{staticClass:"text-muted"},[t._v("-")])]}},{key:"time_info",fn:function(a,s){return[e("div",{staticClass:"time-cell"},[t._v(t._s(t.formatTime(s.created_at)))]),s.executed_at?e("div",{staticClass:"sub-text"},[t._v(" "+t._s(t.formatTime(s.executed_at))+" ")]):t._e()]}}])})],1)])},pt=[],mt=a(29362),gt={summary:"/api/dashboard/summary",pendingOrders:"/api/dashboard/pendingOrders"};function ht(){return(0,y.Ay)({url:gt.summary,method:"get"})}function _t(t){return(0,y.Ay)({url:gt.pendingOrders,method:"get",params:t})}var yt=a(95353),ft={name:"Dashboard",props:{hideSetupGuide:{type:Boolean,default:!1}},data:function(){return{summary:{ai_strategy_count:0,indicator_strategy_count:0,total_equity:0,total_pnl:0,total_realized_pnl:0,total_unrealized_pnl:0,performance:{},strategy_stats:[],daily_pnl_chart:[],strategy_pnl_chart:[],monthly_returns:[],hourly_distribution:[],calendar_months:[],recent_trades:[],current_positions:[]},currentCalendarIndex:0,pieChart:null,drawdownChart:null,hourlyChart:null,pendingOrders:[],ordersLoading:!1,ordersPagination:{current:1,pageSize:20,total:0},orderPollTimer:null,lastOrderId:0,orderPollIntervalMs:5e3,soundEnabled:!0,beepCtx:null}},computed:(0,u.A)((0,u.A)({},(0,yt.aH)({navTheme:function(t){return t.app.theme}})),{},{isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},performance:function(){return this.summary.performance||{}},strategyStats:function(){return this.summary.strategy_stats||[]},showSetupGuide:function(){var t=Number(this.summary.indicator_strategy_count||0),e=Array.isArray(this.summary.current_positions)&&this.summary.current_positions.length>0,a=Array.isArray(this.summary.recent_trades)&&this.summary.recent_trades.length>0;return 0===t||!e&&!a},maxStrategyPnl:function(){var t=this.strategyStats;return t.length?Math.max.apply(Math,(0,c.A)(t.map(function(t){return Math.abs(t.total_pnl||0)})).concat([1])):1},avgTradesPerDay:function(){var t=this.summary.daily_pnl_chart||[],e=t.length||1,a=this.performance.total_trades||0;return(a/e).toFixed(1)},calendarMonths:function(){return this.summary.calendar_months||[]},currentCalendarMonth:function(){var t=this.calendarMonths;return t.length&&t[this.currentCalendarIndex]||null},currentMonthLabel:function(){var t=this.currentCalendarMonth;if(!t)return"-";var e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];return"".concat(e[t.month-1]," ").concat(t.year)},weekdays:function(){return["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},calendarFirstDayOffset:function(){var t=this.currentCalendarMonth;return t?t.first_weekday:0},orderStrategyFilters:function(){var t,e=Array.isArray(this.pendingOrders)?this.pendingOrders:[],a=new Map,s=(0,d.A)(e);try{for(s.s();!(t=s.n()).done;){var i=t.value,r=i&&i.strategy_id;if(void 0!==r&&null!==r&&!a.has(String(r))){var n=i&&i.strategy_name?String(i.strategy_name):"",o=n?"".concat(n," (ID: ").concat(r,")"):"ID: ".concat(r);a.set(String(r),{text:o,value:String(r)})}}}catch(l){s.e(l)}finally{s.f()}return Array.from(a.values()).sort(function(t,e){return String(t.text).localeCompare(String(e.text))})},columns:function(){var t=this;return[{title:this.$t("dashboard.table.time"),dataIndex:"created_at",scopedSlots:{customRender:"time"},width:150},{title:this.$t("dashboard.table.symbol"),dataIndex:"symbol",width:100},{title:this.$t("dashboard.table.type"),dataIndex:"type",scopedSlots:{customRender:"type"},width:90},{title:this.$t("dashboard.table.price"),dataIndex:"price",customRender:function(e){return t.formatNumber(e)},width:100},{title:this.$t("dashboard.table.profit"),dataIndex:"profit",scopedSlots:{customRender:"profit"},align:"right",width:100}]},positionColumns:function(){var t=this;return[{title:this.$t("dashboard.table.symbol"),dataIndex:"symbol",scopedSlots:{customRender:"symbol"}},{title:this.$t("dashboard.table.side"),dataIndex:"side",scopedSlots:{customRender:"side"}},{title:this.$t("dashboard.table.size"),dataIndex:"size",customRender:function(e){return t.formatNumber(e,4)}},{title:this.$t("dashboard.table.entryPrice"),dataIndex:"entry_price",customRender:function(e){return t.formatNumber(e)}},{title:this.$t("dashboard.table.pnl"),dataIndex:"unrealized_pnl",scopedSlots:{customRender:"unrealized_pnl"},align:"right"}]},orderColumns:function(){return[{title:this.$t("dashboard.orderTable.strategy"),dataIndex:"strategy_name",scopedSlots:{customRender:"strategy_name"},filters:this.orderStrategyFilters,filterMultiple:!0,onFilter:function(t,e){return String(e&&e.strategy_id)===String(t)},width:150},{title:this.$t("dashboard.orderTable.exchange"),dataIndex:"exchange_id",scopedSlots:{customRender:"exchange"},width:120},{title:this.$t("dashboard.orderTable.notify"),dataIndex:"notify_channels",scopedSlots:{customRender:"notify"},width:100},{title:this.$t("dashboard.orderTable.symbol"),dataIndex:"symbol",scopedSlots:{customRender:"symbol"},width:110},{title:this.$t("dashboard.orderTable.signalType"),dataIndex:"signal_type",scopedSlots:{customRender:"signal_type"},width:100},{title:this.$t("dashboard.orderTable.amount"),dataIndex:"amount",scopedSlots:{customRender:"amount"},width:130},{title:this.$t("dashboard.orderTable.price"),dataIndex:"filled_price",scopedSlots:{customRender:"price"},width:100},{title:this.$t("dashboard.orderTable.status"),dataIndex:"status",scopedSlots:{customRender:"status"},width:130},{title:this.$t("dashboard.orderTable.timeInfo"),dataIndex:"created_at",scopedSlots:{customRender:"time_info"},width:160}]}}),mounted:function(){this.fetchData(),this.fetchPendingOrders(),this.startOrderPolling(),window.addEventListener("resize",this.handleResize)},beforeDestroy:function(){this.stopOrderPolling(),window.removeEventListener("resize",this.handleResize),this.pieChart&&this.pieChart.dispose(),this.drawdownChart&&this.drawdownChart.dispose(),this.hourlyChart&&this.hourlyChart.dispose()},methods:{goToStrategyManagement:function(){this.$router.push("/trading-assistant?tab=strategy")},goToStrategyCreate:function(){this.$router.push("/trading-assistant?tab=strategy&mode=create")},fetchData:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,ht();case 1:a=e.v,1===a.code&&(t.summary=(0,u.A)((0,u.A)({},t.summary),a.data),t.$nextTick(function(){t.initCharts()})),e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}))()},fetchPendingOrders:function(t,e){var a=this;return(0,l.A)((0,o.A)().m(function s(){var i,r,n,l;return(0,o.A)().w(function(s){while(1)switch(s.p=s.n){case 0:return a.ordersLoading=!0,s.p=1,i=t||a.ordersPagination.current||1,r=e||a.ordersPagination.pageSize||20,s.n=2,_t({page:i,pageSize:r});case 2:n=s.v,1===n.code&&(l=n.data||{},a.pendingOrders=l.list||[],a.ordersPagination.current=Number(l.page||i||1),a.ordersPagination.pageSize=Number(l.pageSize||r||20),a.ordersPagination.total=Number(l.total||0)),s.n=4;break;case 3:s.p=3,s.v;case 4:return s.p=4,a.ordersLoading=!1,s.f(4);case 5:return s.a(2)}},s,null,[[1,3,4,5]])}))()},playOrderBeep:function(){if(this.soundEnabled)try{var t=window.AudioContext||window.webkitAudioContext;if(!t)return;this.beepCtx||(this.beepCtx=new t);var e=this.beepCtx;"suspended"===e.state&&"function"===typeof e.resume&&e.resume().catch(function(){});var a=function(t,a){var s=e.createOscillator(),i=e.createGain();s.type="sine",s.frequency.value=a,i.gain.value=.08,s.connect(i),i.connect(e.destination),s.start(t),s.stop(t+.12)},s=e.currentTime;a(s,880),a(s+.18,1100)}catch(i){}},startOrderPolling:function(){var t=this;this.stopOrderPolling(),this.initLastOrderId(),this.orderPollTimer=setInterval(function(){t.pollNewOrders()},this.orderPollIntervalMs)},stopOrderPolling:function(){this.orderPollTimer&&(clearInterval(this.orderPollTimer),this.orderPollTimer=null)},initLastOrderId:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,_t({page:1,pageSize:1});case 1:a=e.v,1===a.code&&a.data&&a.data.list&&a.data.list.length>0&&(t.lastOrderId=a.data.list[0].id||0),e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}))()},pollNewOrders:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i,r,n,l,c,u;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,_t({page:1,pageSize:10});case 1:if(a=e.v,1===a.code&&a.data&&a.data.list){e.n=2;break}return e.a(2);case 2:if(s=a.data.list||[],0!==s.length){e.n=3;break}return e.a(2);case 3:i=!1,r=t.lastOrderId,n=(0,d.A)(s);try{for(n.s();!(l=n.n()).done;)c=l.value,u=c.id||0,u>t.lastOrderId&&(i=!0,u>r&&(r=u))}catch(o){n.e(o)}finally{n.f()}i&&(t.lastOrderId=r,t.playOrderBeep(),t.fetchPendingOrders(),t.$notification.info({message:t.$t("dashboard.newOrderNotify"),description:t.$t("dashboard.newOrderDesc"),duration:4})),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2)}},e,null,[[0,4]])}))()},toggleSound:function(){this.soundEnabled=!this.soundEnabled,this.soundEnabled?this.$message.success(this.$t("dashboard.soundEnabled")):this.$message.info(this.$t("dashboard.soundDisabled"))},handleOrdersTableChange:function(t){var e=t&&t.current?t.current:1,a=t&&t.pageSize?t.pageSize:this.ordersPagination.pageSize||20;this.ordersPagination.current=e,this.ordersPagination.pageSize=a,this.fetchPendingOrders(e,a)},getTypeClass:function(t){if(!t)return"";var e=t.toLowerCase();return e.includes("open_long")||e.includes("add_long")?"long":e.includes("open_short")||e.includes("add_short")?"short":e.includes("close_long")?"close-long":e.includes("close_short")?"close-short":""},getSignalTypeColor:function(t){return t?(t=t.toLowerCase(),t.includes("open_long")||t.includes("add_long")?"green":t.includes("open_short")||t.includes("add_short")?"red":t.includes("close_long")?"orange":t.includes("close_short")?"purple":"blue"):"default"},getSignalTypeText:function(t){if(!t)return"-";var e={open_long:this.$t("dashboard.signalType.openLong"),open_short:this.$t("dashboard.signalType.openShort"),close_long:this.$t("dashboard.signalType.closeLong"),close_short:this.$t("dashboard.signalType.closeShort"),add_long:this.$t("dashboard.signalType.addLong"),add_short:this.$t("dashboard.signalType.addShort")};return e[t.toLowerCase()]||t.toUpperCase()},getStatusColor:function(t){var e={pending:"orange",processing:"blue",completed:"green",failed:"red",cancelled:"default"};return e[t]||"default"},getStatusText:function(t){if(!t)return"-";var e={pending:this.$t("dashboard.status.pending"),processing:this.$t("dashboard.status.processing"),completed:this.$t("dashboard.status.completed"),failed:this.$t("dashboard.status.failed"),cancelled:this.$t("dashboard.status.cancelled")};return e[t.toLowerCase()]||t.toUpperCase()},getNotifyIconType:function(t){var e=String(t||"").trim().toLowerCase(),a={browser:"bell",webhook:"link",discord:"comment",telegram:"message",tg:"message",tele:"message",email:"mail",phone:"phone"};return a[e]||"notification"},getExchangeTagColor:function(t){var e=String(t||"").trim().toLowerCase(),a={binance:"gold",okx:"purple",bitget:"cyan",signal:"geekblue"};return a[e]||"blue"},formatNumber:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return void 0===t||null===t?"0.00":Number(t).toLocaleString("en-US",{minimumFractionDigits:e,maximumFractionDigits:e})},formatProfitValue:function(t,e){if(null===t||void 0===t)return"--";var a=parseFloat(t),s=["open_long","open_short","add_long","add_short"];if(0===a&&e&&s.includes(e.type))return"--";if(Math.abs(a)<1e-6)return e&&s.includes(e.type)?"--":"$0.00";var i=a>=0?"+":"";return"".concat(i,"$").concat(this.formatNumber(a))},formatCompactNumber:function(t){if(void 0===t||null===t)return"0";var e=Math.abs(t);return e>=1e6?(t/1e6).toFixed(1)+"M":e>=1e3?(t/1e3).toFixed(1)+"k":e>=100?Math.round(t):t.toFixed(0)},prevMonth:function(){this.currentCalendarIndex0&&this.currentCalendarIndex--},getDayProfit:function(t){var e=this.currentCalendarMonth;if(!e||!e.days)return null;var a=String(t).padStart(2,"0");return void 0!==e.days[a]?e.days[a]:null},getDayClass:function(t){var e=this.getDayProfit(t);return null===e?"no-data":e>0?"profit":e<0?"loss":"zero"},formatTime:function(t){if(!t)return"-";try{var e;if("string"===typeof t&&t.includes("-")&&t.includes(":"))e=new Date(t);else{if(!("number"===typeof t||"string"===typeof t&&/^\d+$/.test(t)))return"-";var a="string"===typeof t?parseInt(t,10):t,s=a<1e12?1e3*a:a;e=new Date(s)}return isNaN(e.getTime())?"-":e.toLocaleString()}catch(i){return"-"}},initCharts:function(){this.initPieChart(),this.initDrawdownChart(),this.initHourlyChart()},initPieChart:function(){var t=this,e=this.$refs.pieChart;if(e){this.pieChart=mt.init(e);var a=Array.isArray(this.summary.strategy_stats)?this.summary.strategy_stats:[],s=Array.isArray(this.summary.strategy_pnl_chart)?this.summary.strategy_pnl_chart:[],i=[];i=a.length>0?a.map(function(t){var e=t&&t.strategy_name?String(t.strategy_name):"-",a=Number(t&&t.total_pnl?t.total_pnl:0),s=Number(t&&t.total_trades?t.total_trades:0),i=0!==a?Math.abs(a):s;return{name:e,value:i,signedValue:a,trades:s}}).filter(function(t){return t.value>0}):s.map(function(t){var e=t&&t.name?String(t.name):"-",a=Number(t&&t.value?t.value:0);return{name:e,value:Math.abs(a),signedValue:a}}).filter(function(t){return t.value>0});var r=this.isDarkTheme,n=r?"#9ca3af":"#6b7280",o=[new mt.graphic.LinearGradient(0,0,1,1,[{offset:0,color:"#3b82f6"},{offset:1,color:"#1d4ed8"}]),new mt.graphic.LinearGradient(0,0,1,1,[{offset:0,color:"#8b5cf6"},{offset:1,color:"#6d28d9"}]),new mt.graphic.LinearGradient(0,0,1,1,[{offset:0,color:"#10b981"},{offset:1,color:"#059669"}]),new mt.graphic.LinearGradient(0,0,1,1,[{offset:0,color:"#f59e0b"},{offset:1,color:"#d97706"}]),new mt.graphic.LinearGradient(0,0,1,1,[{offset:0,color:"#ec4899"},{offset:1,color:"#be185d"}]),new mt.graphic.LinearGradient(0,0,1,1,[{offset:0,color:"#06b6d4"},{offset:1,color:"#0891b2"}])],l={backgroundColor:"transparent",tooltip:{trigger:"item",backgroundColor:r?"rgba(17, 24, 39, 0.95)":"rgba(255, 255, 255, 0.95)",borderColor:r?"#374151":"#e5e7eb",textStyle:{color:r?"#f3f4f6":"#1f2937"},formatter:function(e){var a=e&&e.data&&"number"===typeof e.data.signedValue?e.data.signedValue:0,s=(a>=0?"+":"")+t.formatNumber(a,2),i=a>=0?"#10b981":"#ef4444";return'\n
    \n
    '.concat(e.name,'
    \n
    占比 ').concat(e.percent,'%
    \n
    PNL $').concat(s,"
    \n
    \n ")}},legend:{bottom:10,left:"center",itemWidth:12,itemHeight:12,itemGap:16,textStyle:{color:n,fontSize:11}},color:o,series:[{name:"策略分布",type:"pie",radius:["50%","75%"],center:["50%","45%"],avoidLabelOverlap:!1,itemStyle:{borderRadius:6,borderColor:r?"#1f2937":"#ffffff",borderWidth:3},label:{show:!1},emphasis:{label:{show:!0,fontSize:14,fontWeight:"bold",color:r?"#f3f4f6":"#1f2937"},scaleSize:8},labelLine:{show:!1},data:i.length>0?i:[{value:1,name:this.$t("dashboard.noData"),signedValue:0}]}]};this.pieChart.setOption(l)}},initDrawdownChart:function(){var t=this,e=this.$refs.drawdownChart;if(e){this.drawdownChart=mt.init(e);var a,s=(this.summary.daily_pnl_chart||[]).map(function(t){return t.date}),i=(this.summary.daily_pnl_chart||[]).map(function(t){return Number(t.profit||0)}),r=[],n=0,o=(0,d.A)(i);try{for(o.s();!(a=o.n()).done;){var l=a.value;n+=Number(l||0),r.push(n)}}catch(f){o.e(f)}finally{o.f()}var c=-1/0,u=0,p=0,m=r.map(function(t,e){c=Math.max(c,t);var a=Number((t-c).toFixed(2));return a\n
    ').concat(s,'
    \n
    \n \n \n ').concat(t.$t("dashboard.drawdown")||"Drawdown",'\n \n -$').concat(r,'\n
    \n
    \n
    \n
    \n \n ')}},grid:{left:55,right:20,bottom:35,top:20,containLabel:!1},xAxis:{type:"category",data:s,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:h,fontSize:10,formatter:function(t){return t.slice(5)}}},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:h,fontSize:10,formatter:function(t){return Math.abs(t)>=1e3?"-$"+(Math.abs(t)/1e3).toFixed(1)+"k":0===t?"0":"-$"+Math.abs(t)}},splitLine:{lineStyle:{color:_,type:[4,4]}},max:0},series:[{name:this.$t("dashboard.drawdown")||"Drawdown",type:"line",data:m,smooth:.3,showSymbol:!1,lineStyle:{width:2.5,color:new mt.graphic.LinearGradient(0,0,1,0,[{offset:0,color:"#ef4444"},{offset:.5,color:"#f87171"},{offset:1,color:"#fca5a5"}]),shadowColor:"rgba(239, 68, 68, 0.4)",shadowBlur:8,shadowOffsetY:4},areaStyle:{color:new mt.graphic.LinearGradient(0,0,0,1,[{offset:0,color:g?"rgba(239, 68, 68, 0.4)":"rgba(239, 68, 68, 0.25)"},{offset:.5,color:g?"rgba(248, 113, 113, 0.15)":"rgba(248, 113, 113, 0.1)"},{offset:1,color:"transparent"}])},markPoint:u<0?{symbol:"pin",symbolSize:45,itemStyle:{color:new mt.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"#f87171"},{offset:1,color:"#dc2626"}]),shadowColor:"rgba(239, 68, 68, 0.5)",shadowBlur:10},label:{show:!0,color:"#fff",fontSize:10,fontWeight:"bold",formatter:function(){return t.$t("dashboard.label.maxDrawdownPoint")||"MAX"}},data:[{name:this.$t("dashboard.maxDrawdown")||"Max Drawdown",coord:[p,u]}]}:void 0,markLine:{silent:!0,symbol:"none",lineStyle:{color:g?"#52525b":"#a1a1aa",type:"dashed",width:1},data:[{yAxis:0}],label:{show:!1}}}]};this.drawdownChart.setOption(y)}},initHourlyChart:function(){var t=this,e=this.$refs.hourlyChart;if(e){this.hourlyChart=mt.init(e);var a=this.summary.hourly_distribution||[],s=a.map(function(t){return"".concat(String(t.hour).padStart(2,"0"),":00")}),i=a.map(function(t){return t.count||0}),r=a.map(function(t){return t.profit||0}),n=this.isDarkTheme,o=n?"#9ca3af":"#6b7280",l=n?"rgba(75, 85, 99, 0.3)":"rgba(229, 231, 235, 0.8)",c={backgroundColor:"transparent",tooltip:{trigger:"axis",backgroundColor:n?"rgba(17, 24, 39, 0.95)":"rgba(255, 255, 255, 0.95)",borderColor:n?"#374151":"#e5e7eb",textStyle:{color:n?"#f3f4f6":"#1f2937"},formatter:function(e){var a,s=Array.isArray(e)?e:[],i=s[0]&&s[0].axisValue?s[0].axisValue:"",r=0,l=0,c=t.$t("dashboard.tradeCount")||"Trade Count",u=t.$t("dashboard.profit")||"Profit",p=t.$t("dashboard.unit.trades")||"",m=(0,d.A)(s);try{for(m.s();!(a=m.n()).done;){var g=a.value;g.seriesName===c&&(r=g.data||0),g.seriesName===u&&(l=g.data||0)}}catch(y){m.e(y)}finally{m.f()}var h=l>=0?"#10b981":"#ef4444",_=(l>=0?"+":"")+t.formatNumber(l,2);return'\n
    \n
    '.concat(i,'
    \n
    ').concat(c,' ').concat(r," ").concat(p,'
    \n
    ').concat(u,' $').concat(_,"
    \n
    \n ")}},grid:{left:50,right:20,bottom:30,top:10,containLabel:!1},xAxis:{type:"category",data:s,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:o,fontSize:10,interval:3}},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:o,fontSize:10},splitLine:{lineStyle:{color:l,type:"dashed"}}},series:[{name:this.$t("dashboard.tradeCount")||"Trade Count",type:"bar",data:i,barMaxWidth:16,itemStyle:{borderRadius:[3,3,0,0],color:new mt.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"#60a5fa"},{offset:1,color:"#3b82f6"}])}},{name:this.$t("dashboard.profit")||"Profit",type:"line",data:r,smooth:!0,showSymbol:!1,lineStyle:{width:2,color:"#a855f7"}}]};this.hourlyChart.setOption(c)}},handleResize:function(){this.pieChart&&this.pieChart.resize(),this.drawdownChart&&this.drawdownChart.resize(),this.hourlyChart&&this.hourlyChart.resize()}}},vt=ft,bt=(0,C.A)(vt,ut,pt,!1,null,"80b7f8d0",null),xt=bt.exports,Ct=a(40011),kt=["BTC/USDT","ETH/USDT","BNB/USDT","SOL/USDT","ADA/USDT","XRP/USDT","DOGE/USDT","DOT/USDT","MATIC/USDT","AVAX/USDT","LINK/USDT","UNI/USDT","LTC/USDT","ATOM/USDT","ETC/USDT"],St=[{value:"binance",labelKey:"binance"},{value:"okx",labelKey:"okx"},{value:"bitget",labelKey:"bitget"},{value:"bybit",labelKey:"bybit"},{value:"coinbaseexchange",labelKey:"coinbaseexchange"},{value:"kraken",labelKey:"kraken"},{value:"kucoin",labelKey:"kucoin"},{value:"gate",labelKey:"gate"},{value:"bitfinex",labelKey:"bitfinex"},{value:"deepcoin",labelKey:"deepcoin"}],wt=[{value:"ibkr",labelKey:"ibkr",name:"Interactive Brokers"}],$t=[{value:"mt5",labelKey:"mt5",name:"MetaTrader 5"}],At={name:"TradingAssistant",mixins:[_.t],components:{TradingRecords:S,PositionRecords:M,StrategyTypeSelector:O,StrategyEditor:Q,PerformanceAnalysis:it,StrategyLogs:dt,DashboardOverview:xt,ExchangeAccountModal:Ct.A},computed:{showAssistantGuide:function(){return!this.assistantGuideDismissed},assistantGuideStorageKey:function(){var t,e=(null===(t=this.$store.getters.userInfo)||void 0===t?void 0:t.id)||"guest";return"trading-assistant-guide-dismissed:".concat(e)},isAdvancedMode:function(){return"advanced"===this.creationMode},isSimpleMode:function(){return"simple"===this.creationMode},isSimpleCreateMode:function(){return this.isSimpleMode&&!this.editingStrategy},strategyFormWrapClass:function(){var t=["strategy-form-modal"];return this.isMobile&&t.push("mobile-modal"),this.isDarkTheme&&t.push("strategy-form-modal-dark"),t.join(" ")},displayCurrentStep:function(){return"script"===this.strategyMode?this.currentStep:this.isSimpleMode&&!this.editingStrategy?0===this.currentStep?0:1:this.currentStep},isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},needsPassphrase:function(){return["okx","okex","coinbaseexchange","kucoin","bitget","deepcoin"].includes(this.currentExchangeId)},isIBKRMarket:function(){return"USStock"===this.selectedMarketCategory},isMT5Market:function(){return"Forex"===this.selectedMarketCategory},isBrokerMarket:function(){return this.isIBKRMarket||this.isMT5Market},filteredExchangeCredentials:function(){var t=this;return this.exchangeCredentials&&Array.isArray(this.exchangeCredentials)?this.exchangeCredentials.filter(function(e){return t.isCredentialCompatible(e)}):[]},formattedExchangeOptions:function(){var t=this;return St.map(function(e){var a="";try{if(e.labelKey){var s="trading-assistant.exchangeNames.".concat(e.labelKey),i=t.$t(s);i!==s&&(a=i)}}catch(r){}return a||(a=e.value.charAt(0).toUpperCase()+e.value.slice(1)),(0,u.A)((0,u.A)({},e),{},{displayName:a})})},totalPnl:function(){return null!==this.currentEquity&&this.selectedStrategy&&this.selectedStrategy.initial_capital?this.currentEquity-(this.selectedStrategy.initial_capital||0):null},totalPnlPercent:function(){return null!==this.totalPnl&&this.selectedStrategy&&this.selectedStrategy.initial_capital?0===this.selectedStrategy.initial_capital?0:this.totalPnl/this.selectedStrategy.initial_capital*100:null},getEquityColorClass:function(){return null===this.totalPnl?"":this.totalPnl>=0?"text-success":"text-danger"},getPnlColorClass:function(){return null===this.totalPnl?"":this.totalPnl>=0?"text-success":"text-danger"},isCryptoMarket:function(){var t=this.selectedMarketCategory||"Crypto";return"crypto"===String(t).toLowerCase()},canUseLiveTrading:function(){var t=this.selectedMarketCategory||"Crypto";return"crypto"===String(t).toLowerCase()||("USStock"===t||"Forex"===t)},isLiveTradingAvailable:function(){var t=this.selectedMarketCategory||"Crypto",e=this.currentExchangeId||"";return"crypto"===String(t).toLowerCase()?["binance","okx","bitget","bybit","coinbaseexchange","kraken","kucoin","gate","bitfinex"].includes(e):"USStock"===t?"ibkr"===this.currentBrokerId:"Forex"===t&&"mt5"===this.currentBrokerId},showDemoTradingSwitch:function(){return this.currentExchangeId&&"binance"===this.currentExchangeId.toLowerCase()},brokerOptions:function(){var t=this;return wt.map(function(e){var a="";try{var s="trading-assistant.brokerNames.".concat(e.labelKey),i=t.$t(s);i!==s&&(a=i)}catch(r){}return a||(a=e.name||e.value.toUpperCase()),(0,u.A)((0,u.A)({},e),{},{displayName:a})})},forexBrokerOptions:function(){var t=this;return $t.map(function(e){var a="";try{var s="trading-assistant.brokerNames.".concat(e.labelKey),i=t.$t(s);i!==s&&(a=i)}catch(r){}return a||(a=e.name||e.value.toUpperCase()),(0,u.A)((0,u.A)({},e),{},{displayName:a})})},cryptoExchangeOptions:function(){var t=this;return St.map(function(e){var a="";try{if(e.labelKey){var s="trading-assistant.exchangeNames.".concat(e.labelKey),i=t.$t(s);i!==s&&(a=i)}}catch(r){}return a||(a=e.value.charAt(0).toUpperCase()+e.value.slice(1)),(0,u.A)((0,u.A)({},e),{},{displayName:a})})},groupedStrategies:function(){return"symbol"===this.groupByMode?this.groupedBySymbol:this.groupedByStrategy},groupedByStrategy:function(){var t,e={},a=[],s=(0,d.A)(this.strategies);try{for(s.s();!(t=s.n()).done;){var i=t.value,r=i.strategy_group_id;r&&r.trim()?(e[r]||(e[r]={id:r,baseName:i.group_base_name||i.strategy_name.split("-")[0],strategies:[],runningCount:0,stoppedCount:0}),e[r].strategies.push(i),"running"===i.status?e[r].runningCount++:e[r].stoppedCount++):a.push(i)}}catch(o){s.e(o)}finally{s.f()}var n=Object.values(e).sort(function(t,e){var a=Math.max.apply(Math,(0,c.A)(t.strategies.map(function(t){return t.created_at||0}))),s=Math.max.apply(Math,(0,c.A)(e.strategies.map(function(t){return t.created_at||0})));return s-a});return{groups:n,ungrouped:a}},groupedBySymbol:function(){var t,e={},a=[],s=(0,d.A)(this.strategies);try{for(s.s();!(t=s.n()).done;){var i=t.value,r=i.trading_config||{},n=r.symbol;if(n&&n.trim()){e[n]||(e[n]={id:"symbol_".concat(n),baseName:n,strategies:[],runningCount:0,stoppedCount:0});var o=(0,u.A)((0,u.A)({},i),{},{displayInfo:{strategyName:i.strategy_name||i.group_base_name||"Unnamed",timeframe:r.timeframe||"-",indicatorName:i.indicator_name||i.indicator_config&&i.indicator_config.name||"-"}});e[n].strategies.push(o),"running"===i.status?e[n].runningCount++:e[n].stoppedCount++}else a.push(i)}}catch(c){s.e(c)}finally{s.f()}var l=Object.values(e).sort(function(t,e){return t.baseName.localeCompare(e.baseName)});return{groups:l,ungrouped:a}},unconfiguredChannels:function(){var t=[];return this.notifyChannelsUi.includes("telegram")&&(this.userNotificationSettings.telegram_bot_token||this.userNotificationSettings.telegram_chat_id||t.push("Telegram")),this.notifyChannelsUi.includes("email")&&(this.userNotificationSettings.email||t.push("Email")),this.notifyChannelsUi.includes("discord")&&(this.userNotificationSettings.discord_webhook||t.push("Discord")),this.notifyChannelsUi.includes("webhook")&&(this.userNotificationSettings.webhook_url||t.push("Webhook")),t}},data:function(){return{topTab:"overview",loading:!1,loadingRecords:!1,strategies:[],selectedStrategy:null,showFormModal:!1,creationMode:"simple",showAdvancedSettings:!1,pendingRouteIndicatorId:"",lastAutoStrategyName:"",strategyMode:"",strategyCode:"",pendingScriptTemplateKey:"",showModeSelector:!1,strategyType:"indicator",selectedMarketCategory:"Crypto",currentStep:0,saving:!1,loadingIndicators:!1,availableIndicators:[],selectedIndicator:null,indicatorParams:[],indicatorParamValues:{},cryptoSymbols:kt,loadingWatchlist:!1,watchlist:[],exchangeOptions:St,currentExchangeId:"",currentBrokerId:"ibkr",connectionTestResult:null,indicatorsLoaded:!1,editingStrategy:null,currentEquity:null,equityPollingTimer:null,backtestCollapseKeys:["risk"],trailingEnabledUi:!1,entryPctMaxUi:100,aiFilterEnabledUi:!1,isEditMode:!1,supportedIPs:[],executionModeUi:"signal",liveDisclaimerAckUi:!1,notifyChannelsUi:["browser"],userNotificationSettings:{default_channels:["browser"],telegram_bot_token:"",telegram_chat_id:"",email:"",phone:"",discord_webhook:"",webhook_url:"",webhook_token:""},loadingExchangeCredentials:!1,exchangeCredentials:[],showExchangeAccountModal:!1,saveCredentialUi:!1,suppressApiClearOnce:!1,selectedSymbols:[],crossSectionalSymbols:[],collapsedGroups:{},groupByMode:"strategy",showAddSymbolModal:!1,addSymbolMarket:"Crypto",addSymbolMarketTypes:[{value:"Crypto",i18nKey:"dashboard.analysis.market.Crypto"},{value:"USStock",i18nKey:"dashboard.analysis.market.USStock"},{value:"Forex",i18nKey:"dashboard.analysis.market.Forex"},{value:"Futures",i18nKey:"dashboard.analysis.market.Futures"}],addSymbolKeyword:"",searchingSymbol:!1,symbolSearchResults:[],selectedAddSymbol:null,hasSearchedSymbol:!1,addingSymbol:!1,hotSymbols:[],loadingHotSymbols:!1,searchTimer:null,assistantGuideDismissed:!1}},beforeCreate:function(){this.form=this.$form.createForm(this)},mounted:function(){var t=this;this.restoreAssistantGuidePreference(),"strategy"!==this.$route.query.tab&&"create"!==this.$route.query.mode||(this.topTab="strategy"),this.loadStrategies(),this.loadUserNotificationSettings(),"create"===this.$route.query.mode&&this.$nextTick(function(){var e=t.$route.query.indicator_id;e?(t.strategyMode="signal",t.creationMode="simple",t.pendingRouteIndicatorId=String(e),t._openCreateModal()):t.handleCreateStrategy()})},beforeDestroy:function(){this.stopEquityPolling()},methods:{restoreAssistantGuidePreference:function(){try{this.assistantGuideDismissed="1"===window.localStorage.getItem(this.assistantGuideStorageKey)}catch(t){this.assistantGuideDismissed=!1}},dismissAssistantGuide:function(){this.assistantGuideDismissed=!0;try{window.localStorage.setItem(this.assistantGuideStorageKey,"1")}catch(t){}},goToStrategyTab:function(){this.topTab="strategy"},openCreateStrategyFromGuide:function(){var t=this;this.topTab="strategy",this.$nextTick(function(){t.handleCreateStrategy()})},loadUserNotificationSettings:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,h.vF)();case 1:a=e.v,1===a.code&&a.data&&(t.userNotificationSettings={default_channels:a.data.default_channels||["browser"],telegram_bot_token:a.data.telegram_bot_token||"",telegram_chat_id:a.data.telegram_chat_id||"",email:a.data.email||"",phone:a.data.phone||"",discord_webhook:a.data.discord_webhook||"",webhook_url:a.data.webhook_url||"",webhook_token:a.data.webhook_token||""}),e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}))()},loadWatchlist:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.loadingWatchlist=!0,e.p=1,e.n=2,(0,m.Qo)({userid:1});case 2:a=e.v,a&&1===a.code?t.watchlist=Array.isArray(a.data)?a.data:[]:t.watchlist=[],e.n=4;break;case 3:e.p=3,e.v,t.watchlist=[];case 4:return e.p=4,t.loadingWatchlist=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},handleCloseAddSymbolModal:function(){this.showAddSymbolModal=!1,this.addSymbolKeyword="",this.symbolSearchResults=[],this.selectedAddSymbol=null,this.hasSearchedSymbol=!1},handleAddSymbolMarketChange:function(t){this.addSymbolMarket=t,this.addSymbolKeyword="",this.symbolSearchResults=[],this.selectedAddSymbol=null,this.hasSearchedSymbol=!1,this.loadHotSymbols(t)},handleSymbolSearchInputChange:function(t){var e=this,a=t.target.value;if(this.addSymbolKeyword=a,this.searchTimer&&clearTimeout(this.searchTimer),!a||""===a.trim())return this.symbolSearchResults=[],this.hasSearchedSymbol=!1,void(this.selectedAddSymbol=null);this.searchTimer=setTimeout(function(){e.searchSymbolsInModal(a)},500)},handleSearchSymbol:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){return(0,o.A)().w(function(a){while(1)switch(a.n){case 0:if(t&&t.trim()){a.n=1;break}return a.a(2);case 1:if(e.addSymbolMarket){a.n=2;break}return e.$message.warning(e.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")),a.a(2);case 2:if(!(e.symbolSearchResults.length>0)){a.n=3;break}return a.a(2);case 3:e.hasSearchedSymbol&&0===e.symbolSearchResults.length?e.handleDirectAdd():e.searchSymbolsInModal(t);case 4:return a.a(2)}},a)}))()},searchSymbolsInModal:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:if(t&&""!==t.trim()){a.n=1;break}return e.symbolSearchResults=[],e.hasSearchedSymbol=!1,a.a(2);case 1:if(e.addSymbolMarket){a.n=2;break}return a.a(2);case 2:return e.searchingSymbol=!0,e.hasSearchedSymbol=!0,a.p=3,a.n=4,(0,m._3)({market:e.addSymbolMarket,keyword:t.trim()});case 4:s=a.v,s&&1===s.code&&Array.isArray(s.data)?e.symbolSearchResults=s.data:e.symbolSearchResults=[],a.n=6;break;case 5:a.p=5,a.v,e.symbolSearchResults=[];case 6:return a.p=6,e.searchingSymbol=!1,a.f(6);case 7:return a.a(2)}},a,null,[[3,5,6,7]])}))()},handleDirectAdd:function(){this.addSymbolKeyword&&this.addSymbolKeyword.trim()?this.addSymbolMarket?this.selectedAddSymbol={market:this.addSymbolMarket,symbol:this.addSymbolKeyword.trim().toUpperCase(),name:""}:this.$message.warning(this.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")):this.$message.warning(this.$t("dashboard.analysis.modal.addStock.pleaseEnterSymbol"))},handleSelectAddSymbol:function(t){this.selectedAddSymbol={market:this.addSymbolMarket,symbol:t.symbol,name:t.name||""}},loadHotSymbols:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:if(t||(t=e.addSymbolMarket||"Crypto"),t){a.n=1;break}return a.a(2);case 1:return e.loadingHotSymbols=!0,a.p=2,a.n=3,(0,m.z6)({market:t,limit:10});case 3:s=a.v,s&&1===s.code&&s.data?e.hotSymbols=s.data:e.hotSymbols=[],a.n=5;break;case 4:a.p=4,a.v,e.hotSymbols=[];case 5:return a.p=5,e.loadingHotSymbols=!1,a.f(5);case 6:return a.a(2)}},a,null,[[2,4,5,6]])}))()},handleConfirmAddSymbol:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i,r,n,l,d;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(a="",s="",!t.selectedAddSymbol){e.n=1;break}a=t.selectedAddSymbol.market,s=t.selectedAddSymbol.symbol.toUpperCase(),e.n=4;break;case 1:if(!t.addSymbolKeyword||!t.addSymbolKeyword.trim()){e.n=3;break}if(t.addSymbolMarket){e.n=2;break}return t.$message.warning(t.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")),e.a(2);case 2:a=t.addSymbolMarket,s=t.addSymbolKeyword.trim().toUpperCase(),e.n=4;break;case 3:return t.$message.warning(t.$t("dashboard.analysis.modal.addStock.pleaseSelectOrEnterSymbol")),e.a(2);case 4:return t.addingSymbol=!0,e.p=5,e.n=6,(0,m.dp)({userid:1,market:a,symbol:s});case 6:if(i=e.v,!i||1!==i.code){e.n=8;break}return t.$message.success(t.$t("dashboard.analysis.message.addStockSuccess")),e.n=7,t.loadWatchlist();case 7:r="".concat(a,":").concat(s),t.isEditMode?(t.form.setFieldsValue({symbol:r}),t.handleWatchlistSymbolChange(r)):(t.selectedSymbols.includes(r)||(t.selectedSymbols=[].concat((0,c.A)(t.selectedSymbols),[r])),t.handleMultiSymbolChange(t.selectedSymbols)),t.handleCloseAddSymbolModal(),e.n=9;break;case 8:t.$message.error((null===i||void 0===i?void 0:i.msg)||t.$t("dashboard.analysis.message.addStockFailed"));case 9:e.n=11;break;case 10:e.p=10,d=e.v,l=(null===d||void 0===d||null===(n=d.response)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.msg)||(null===d||void 0===d?void 0:d.message)||t.$t("dashboard.analysis.message.addStockFailed"),t.$message.error(l);case 11:return e.p=11,t.addingSymbol=!1,e.f(11);case 12:return e.a(2)}},e,null,[[5,10,11,12]])}))()},filterWatchlistOption:function(t,e){var a,s=(null===(a=e.componentOptions)||void 0===a||null===(a=a.propsData)||void 0===a?void 0:a.value)||"";return"__add_symbol_option__"===s||String(s).toLowerCase().includes(String(t||"").toLowerCase())},filterWatchlistOptionWithAdd:function(t,e){var a,s=(null===(a=e.componentOptions)||void 0===a||null===(a=a.propsData)||void 0===a?void 0:a.value)||"";return"__add_symbol_option__"===s||String(s).toLowerCase().includes(String(t||"").toLowerCase())},handleMultiSymbolChangeWithAdd:function(t){if(t&&t.includes("__add_symbol_option__"))return this.selectedSymbols=t.filter(function(t){return"__add_symbol_option__"!==t}),this.showAddSymbolModal=!0,void this.loadHotSymbols(this.addSymbolMarket);this.handleMultiSymbolChange(t)},handleStrategyTypeChange:function(t){var e=t.target.value;"single"===e&&(this.crossSectionalSymbols=[])},handleCrossSectionalSymbolChange:function(t){if(t&&t.includes("__add_symbol_option__"))return this.crossSectionalSymbols=t.filter(function(t){return"__add_symbol_option__"!==t}),this.showAddSymbolModal=!0,void this.loadHotSymbols(this.addSymbolMarket);if(this.crossSectionalSymbols=t||[],t&&t.length>0){var e=t[0];if("string"===typeof e&&e.includes(":")){var a=e.indexOf(":"),s=e.slice(0,a);this.selectedMarketCategory=s||"Crypto"}}},getMarketColor:function(t){var e={USStock:"green",Crypto:"purple",Forex:"gold",Futures:"cyan"};return e[t]||"default"},handleWatchlistSymbolChange:function(t){var e=this;if("__add_symbol_option__"===t)return this.$nextTick(function(){e.form.setFieldsValue({symbol:void 0})}),this.showAddSymbolModal=!0,void this.loadHotSymbols(this.addSymbolMarket);if(t&&"string"===typeof t&&t.includes(":")){var a=t.indexOf(":"),s=t.slice(0,a);if(this.selectedMarketCategory=s||"Crypto","Forex"===this.selectedMarketCategory){this.currentBrokerId="mt5";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({forex_broker_id:"mt5"})}catch(r){}}else if("USStock"===this.selectedMarketCategory){this.currentBrokerId="ibkr";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({broker_id:"ibkr"})}catch(r){}}var i=["Crypto","USStock","Forex"].includes(this.selectedMarketCategory);if(!i){this.executionModeUi="signal";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({execution_mode:"signal"})}catch(r){}}this.currentExchangeId="";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({exchange_id:void 0})}catch(r){}}},handleSimpleSymbolChange:function(t){if("__add_symbol_option__"===t)return this.showAddSymbolModal=!0,void this.loadHotSymbols(this.addSymbolMarket);var e=t?[t]:[];this.handleMultiSymbolChange(e)},handleMultiSymbolChange:function(t){if(this.selectedSymbols=t||[],t&&t.length>0){var e=t[0];if("string"===typeof e&&e.includes(":")){var a=e.indexOf(":"),s=e.slice(0,a);this.selectedMarketCategory=s||"Crypto"}}if("Forex"===this.selectedMarketCategory){this.currentBrokerId="mt5";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({forex_broker_id:"mt5"})}catch(r){}}else if("USStock"===this.selectedMarketCategory){this.currentBrokerId="ibkr";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({broker_id:"ibkr"})}catch(r){}}var i=["Crypto","USStock","Forex"].includes(this.selectedMarketCategory);if(!i){this.executionModeUi="signal";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({execution_mode:"signal"})}catch(r){}}this.currentExchangeId="";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({exchange_id:void 0})}catch(r){}},loadExchangeCredentials:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.loadingExchangeCredentials=!0,e.p=1,e.n=2,(0,g.IA)({user_id:1});case 2:a=e.v,a&&1===a.code?t.exchangeCredentials=a.data&&a.data.items||[]:(t.exchangeCredentials=[],t.$message.warning((null===a||void 0===a?void 0:a.msg)||t.$t("trading-assistant.messages.loadFailed"))),e.n=4;break;case 3:e.p=3,e.v,t.exchangeCredentials=[],t.$message.warning(t.$t("trading-assistant.exchange.testFailed"));case 4:return e.p=4,t.loadingExchangeCredentials=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},goToIndicatorAnalysisCreate:function(){this.$router.push("/indicator-analysis")},handleExchangeAccountCreated:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s,i;return(0,o.A)().w(function(a){while(1)switch(a.n){case 0:return a.n=1,e.loadExchangeCredentials();case 1:if(s=t&&(t.id||t.credential_id),!s){a.n=3;break}try{e.form&&e.form.setFieldsValue&&e.form.setFieldsValue({credential_id:s})}catch(r){}return a.n=2,e.handleCredentialSelectChange(s);case 2:a.n=4;break;case 3:if(1!==e.exchangeCredentials.length){a.n=4;break}i=e.exchangeCredentials[0].id;try{e.form&&e.form.setFieldsValue&&e.form.setFieldsValue({credential_id:i})}catch(r){}return a.n=4,e.handleCredentialSelectChange(i);case 4:return a.a(2)}},a)}))()},formatCredentialLabel:function(t){if(!t)return"";var e=(t.name||"").trim(),a=t.exchange_id||"",s=t.api_key_hint||"";return e?"".concat(a.toUpperCase()," - ").concat(e," (").concat(s,")"):"".concat(a.toUpperCase()," (").concat(s,")")},isCredentialCompatible:function(t){if(!t||!t.exchange_id)return!0;var e=(t.exchange_id||"").toLowerCase(),a=this.selectedMarketCategory||"Crypto";if("mt5"===e)return"Forex"===a;if("ibkr"===e)return"USStock"===a;var s=["binance","okx","bitget","bybit","coinbaseexchange","kraken","kucoin","gate","bitfinex","deepcoin"];return!s.includes(e)||"Crypto"===a},handleCredentialSelectChange:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s,i,r;return(0,o.A)().w(function(a){while(1)switch(a.n){case 0:if(t){a.n=1;break}return e.currentExchangeId="",e.connectionTestResult=null,a.a(2);case 1:if(s=e.exchangeCredentials.find(function(e){return String(e.id)===String(t)}),!s){a.n=5;break}if(i=(s.exchange_id||"").toLowerCase(),"mt5"!==i||"Forex"===e.selectedMarketCategory){a.n=2;break}e.$message.error(e.$t("trading-assistant.validation.mt5OnlyForForex"));try{e.form&&e.form.setFieldsValue&&e.form.setFieldsValue({credential_id:void 0})}catch(n){}return e.currentExchangeId="",e.connectionTestResult=null,a.a(2);case 2:if("ibkr"!==i||"USStock"===e.selectedMarketCategory){a.n=3;break}e.$message.error(e.$t("trading-assistant.validation.ibkrOnlyForUSStock"));try{e.form&&e.form.setFieldsValue&&e.form.setFieldsValue({credential_id:void 0})}catch(n){}return e.currentExchangeId="",e.connectionTestResult=null,a.a(2);case 3:if(r=["binance","okx","bitget","bybit","coinbaseexchange","kraken","kucoin","gate","bitfinex"],!r.includes(i)||"Crypto"===e.selectedMarketCategory){a.n=4;break}e.$message.error(e.$t("trading-assistant.validation.cryptoExchangeOnlyForCrypto"));try{e.form&&e.form.setFieldsValue&&e.form.setFieldsValue({credential_id:void 0})}catch(n){}return e.currentExchangeId="",e.connectionTestResult=null,a.a(2);case 4:e.currentExchangeId=s.exchange_id||"";case 5:e.connectionTestResult=null;case 6:return a.a(2)}},a)}))()},onSaveCredentialChange:function(t){var e=!!(t&&t.target&&t.target.checked);this.saveCredentialUi=e;try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({save_credential:e})}catch(a){}},onExecutionModeChange:function(t){var e=t&&t.target?t.target.value:t;if(this.executionModeUi=e||"signal",!this.canUseLiveTrading&&"signal"!==this.executionModeUi){this.executionModeUi="signal";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({execution_mode:"signal"})}catch(a){}}},setExecutionModeUi:function(t){var e=t||"signal";this.onExecutionModeChange(e);try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({execution_mode:e})}catch(a){}},onLiveDisclaimerAckChange:function(t){var e=!!(t&&t.target&&t.target.checked);this.liveDisclaimerAckUi=e;try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({live_disclaimer_ack:e})}catch(a){}},onNotifyChannelsChange:function(t){this.notifyChannelsUi=Array.isArray(t)?t:[]},formatCurrency:function(t){return null===t||void 0===t?"-":"$"+t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},formatPnl:function(t){if(null===t||void 0===t)return"-";var e=t>=0?"+":"";return e+"$"+Math.abs(t).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},formatPnlPercent:function(t){if(null===t||void 0===t)return"-";var e=t>=0?"+":"";return e+Math.abs(t).toFixed(2)+"%"},loadStrategies:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.loading=!0,e.p=1,e.n=2,(0,p.EM)();case 2:a=e.v,1===a.code?(s=a.data.strategies||[],t.strategies=s,t.selectedStrategy&&(i=t.strategies.find(function(e){return e.id===t.selectedStrategy.id}),t.selectedStrategy=i||null)):t.$message.error(a.msg||t.$t("trading-assistant.messages.loadFailed")),e.n=4;break;case 3:e.p=3,e.v,t.$message.error(t.$t("trading-assistant.messages.loadFailed"));case 4:return e.p=4,t.loading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},handleCreateStrategy:function(){this.isEditMode=!1,this.editingStrategy=null,this.creationMode="simple",this.strategyMode="",this.strategyCode="",this.pendingScriptTemplateKey="",this.showModeSelector=!0,this.showFormModal=!1},handleModeSelect:function(t){this.strategyMode=t,this.pendingScriptTemplateKey="",this.showModeSelector=!1,this._openCreateModal()},handleUseTemplate:function(t){this.strategyMode="script",this.pendingScriptTemplateKey=t,this.showModeSelector=!1,this._openCreateModal()},_openCreateModal:function(){var t=this;this.strategyType="indicator",this.creationMode=this.editingStrategy?"advanced":"simple",this.currentStep=0,this.currentExchangeId="",this.currentBrokerId="ibkr",this.selectedIndicator=null,this.connectionTestResult=null,this.executionModeUi="signal",this.notifyChannelsUi=["browser"],this.saveCredentialUi=!1,this.backtestCollapseKeys=["risk"],this.trailingEnabledUi=!1,this.entryPctMaxUi=100,this.aiFilterEnabledUi=!1,this.selectedMarketCategory="Crypto",this.selectedSymbols=[],this.showAdvancedSettings=!1;var e=this.buildStrategyDefaultName();this.lastAutoStrategyName=e,this.form.resetFields(),this.form.setFieldsValue({strategy_name:e,execution_mode:"signal",notify_channels:["browser"],save_credential:!1,live_disclaimer_ack:!1,initial_capital:1e3,market_type:"swap",leverage:5,trade_direction:"long",timeframe:"15m",cs_strategy_type:"single"}),this.liveDisclaimerAckUi=!1,this.showFormModal=!0,this.$nextTick((0,l.A)((0,o.A)().m(function e(){return(0,o.A)().w(function(e){while(1)switch(e.n){case 0:return e.n=1,t.loadWatchlist();case 1:return e.n=2,t.loadIndicators();case 2:t.applyPendingRouteIndicatorSelection(),t.loadExchangeCredentials();case 3:return e.a(2)}},e)})))},handleEditStrategy:function(t){var e=this;"running"!==t.status?(this.strategyType="indicator",this.strategyMode=t.strategy_mode||"signal",this.creationMode="advanced",this.strategyCode=t.strategy_code||"",this.pendingScriptTemplateKey="",this.isEditMode=!0,this.editingStrategy=t,this.currentStep=0,this.currentExchangeId="",this.selectedIndicator=null,this.connectionTestResult=null,this.form.resetFields(),this.backtestCollapseKeys=["risk"],this.trailingEnabledUi=!1,this.entryPctMaxUi=100,this.aiFilterEnabledUi=!1,this.showFormModal=!0,this.$nextTick((0,l.A)((0,o.A)().m(function a(){return(0,o.A)().w(function(a){while(1)switch(a.n){case 0:return e.loadWatchlist(),e.loadIndicators(),e.loadExchangeCredentials(),a.n=1,e.loadStrategyDataToForm(t);case 1:return a.a(2)}},a)})))):this.$message.warning(this.$t("trading-assistant.messages.runningWarning"))},loadStrategyDataToForm:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s,i,r,l,c,d,u,p,m,g,h,_,y,f,v,b,x,C,k,S,w,$,A,T,P,M,I,F,N,D,V,E,R,z,L,q,U,K,O,B,G,H;return(0,o.A)().w(function(a){while(1)switch(a.n){case 0:if(e.indicatorsLoaded){a.n=1;break}return a.n=1,e.loadIndicators();case 1:return a.n=2,e.$nextTick();case 2:return e.selectedMarketCategory=t.market_category||"Crypto",d=t.execution_mode||"signal",e.executionModeUi=d,e.liveDisclaimerAckUi="live"===d,u=t.notification_config&&t.notification_config.channels||["browser"],e.notifyChannelsUi=Array.isArray(u)?u:["browser"],p=!1,m=!1,t.trading_config&&(f=t.trading_config||{},v=f.trailing&&"object"===(0,n.A)(f.trailing)?f.trailing:null,p=void 0!==f.trailing_enabled?!!f.trailing_enabled:!(!v||!v.enabled),b=f.enable_ai_filter,m=!0===b||"true"===b||1===b||"1"===b,x=f.scale&&"object"===(0,n.A)(f.scale)?f.scale:null,C=f.position&&"object"===(0,n.A)(f.position)?f.position:null,k=new Set(["risk"]),(f.trend_add_enabled||f.dca_add_enabled||x&&(null!==(g=x.trendAdd)&&void 0!==g&&g.enabled||null!==(h=x.dcaAdd)&&void 0!==h&&h.enabled))&&k.add("scale"),(f.trend_reduce_enabled||f.adverse_reduce_enabled||x&&(null!==(_=x.trendReduce)&&void 0!==_&&_.enabled||null!==(y=x.adverseReduce)&&void 0!==y&&y.enabled))&&k.add("reduce"),(void 0!==f.entry_pct||C&&void 0!==C.entryPct)&&k.add("position"),e.backtestCollapseKeys=Array.from(k)),e.trailingEnabledUi=p,e.aiFilterEnabledUi=m,a.n=3,e.$nextTick();case 3:return e.form.setFieldsValue({enable_ai_filter:m}),a.n=4,e.$nextTick();case 4:if(e.form.setFieldsValue({execution_mode:e.executionModeUi,live_disclaimer_ack:e.liveDisclaimerAckUi,notify_channels:e.notifyChannelsUi,notify_email:(null===(s=t.notification_config)||void 0===s||null===(s=s.targets)||void 0===s?void 0:s.email)||"",notify_phone:(null===(i=t.notification_config)||void 0===i||null===(i=i.targets)||void 0===i?void 0:i.phone)||"",notify_telegram:(null===(r=t.notification_config)||void 0===r||null===(r=r.targets)||void 0===r?void 0:r.telegram)||"",notify_discord:(null===(l=t.notification_config)||void 0===l||null===(l=l.targets)||void 0===l?void 0:l.discord)||"",notify_webhook:(null===(c=t.notification_config)||void 0===c||null===(c=c.targets)||void 0===c?void 0:c.webhook)||""}),!t.indicator_config||!t.indicator_config.indicator_id){a.n=7;break}if(S=t.indicator_config.indicator_id,w=e.availableIndicators.find(function(t){return String(t.id)===String(S)}),!w){a.n=6;break}return A=String(w.id),e.form.setFieldsValue({indicator_id:A}),a.n=5,e.handleIndicatorChange(A);case 5:T=null===($=t.trading_config)||void 0===$?void 0:$.indicator_params,T&&"object"===(0,n.A)(T)&&Object.keys(T).forEach(function(t){t in e.indicatorParamValues&&e.$set(e.indicatorParamValues,t,T[t])}),a.n=7;break;case 6:e.form.setFieldsValue({indicator_id:String(S)});case 7:if(!t.exchange_config){a.n=11;break}if(P=t.exchange_config.exchange_id||"",M="live"===e.executionModeUi,I=["Crypto","USStock","Forex"].includes(e.selectedMarketCategory),F="USStock"===e.selectedMarketCategory,N="Forex"===e.selectedMarketCategory,!M||!I){a.n=10;break}if(!F){a.n=8;break}e.currentBrokerId=P||"ibkr",e.form.setFieldsValue({broker_id:P||"ibkr",ibkr_host:t.exchange_config.ibkr_host||"127.0.0.1",ibkr_port:t.exchange_config.ibkr_port||7497,ibkr_client_id:t.exchange_config.ibkr_client_id||1,ibkr_account:t.exchange_config.ibkr_account||""}),a.n=10;break;case 8:if(!N){a.n=9;break}e.currentBrokerId=P||"mt5",e.form.setFieldsValue({forex_broker_id:P||"mt5",mt5_server:t.exchange_config.mt5_server||"",mt5_login:t.exchange_config.mt5_login||"",mt5_password:t.exchange_config.mt5_password||"",mt5_terminal_path:t.exchange_config.mt5_terminal_path||""}),a.n=10;break;case 9:if(e.currentExchangeId=P||t.exchange_config.exchange_id||"",D=t.exchange_config.credential_id,!D){a.n=10;break}return e.form.setFieldsValue({credential_id:D}),a.n=10,e.handleCredentialSelectChange(D);case 10:F||N?e.currentBrokerId=P||(N?"mt5":"ibkr"):e.currentExchangeId=P;case 11:if(t.trading_config){if(V=t.trading_config||{},E=V.trailing&&"object"===(0,n.A)(V.trailing)?V.trailing:null,R=V.scale&&"object"===(0,n.A)(V.scale)?V.scale:null,z=V.position&&"object"===(0,n.A)(V.position)?V.position:null,L=V.strategy_type||t.strategy_type||"single","cross_sectional"===L)if(e.form.setFieldsValue({cs_strategy_type:"cross_sectional",portfolio_size:V.portfolio_size||10,long_ratio:V.long_ratio||.5,rebalance_frequency:V.rebalance_frequency||"daily"}),V.symbol_list&&Array.isArray(V.symbol_list))e.crossSectionalSymbols=V.symbol_list;else if(t.symbol_list)try{q="string"===typeof t.symbol_list?JSON.parse(t.symbol_list):t.symbol_list,Array.isArray(q)&&(e.crossSectionalSymbols=q)}catch(o){e.crossSectionalSymbols=[]}else e.crossSectionalSymbols=[];else e.form.setFieldsValue({cs_strategy_type:"single"}),e.crossSectionalSymbols=[];U=R&&R.trendAdd?R.trendAdd:null,K=R&&R.dcaAdd?R.dcaAdd:null,O=R&&R.trendReduce?R.trendReduce:null,B=R&&R.adverseReduce?R.adverseReduce:null,G=V.symbol,H="string"===typeof G&&G.includes(":")?G:"".concat(e.selectedMarketCategory,":").concat(G),e.form.setFieldsValue({strategy_name:t.strategy_name,symbol:H,initial_capital:V.initial_capital,leverage:V.leverage,trade_direction:V.trade_direction||"long",timeframe:V.timeframe||"1H",market_type:"futures"===V.market_type?"swap":V.market_type||"swap",take_profit_pct:V.take_profit_pct||0,stop_loss_pct:V.stop_loss_pct||0,trailing_enabled:p,trailing_stop_pct:void 0!==V.trailing_stop_pct?V.trailing_stop_pct||0:E&&E.pct||0,trailing_activation_pct:void 0!==V.trailing_activation_pct?V.trailing_activation_pct||0:E&&E.activationPct||0,trend_add_enabled:void 0!==V.trend_add_enabled?!!V.trend_add_enabled:!(!U||!U.enabled),trend_add_step_pct:void 0!==V.trend_add_step_pct?V.trend_add_step_pct||0:U&&U.stepPct||0,trend_add_size_pct:void 0!==V.trend_add_size_pct?V.trend_add_size_pct||0:U&&U.sizePct||0,trend_add_max_times:void 0!==V.trend_add_max_times?V.trend_add_max_times||0:U&&U.maxTimes||0,dca_add_enabled:void 0!==V.dca_add_enabled?!!V.dca_add_enabled:!(!K||!K.enabled),dca_add_step_pct:void 0!==V.dca_add_step_pct?V.dca_add_step_pct||0:K&&K.stepPct||0,dca_add_size_pct:void 0!==V.dca_add_size_pct?V.dca_add_size_pct||0:K&&K.sizePct||0,dca_add_max_times:void 0!==V.dca_add_max_times?V.dca_add_max_times||0:K&&K.maxTimes||0,trend_reduce_enabled:void 0!==V.trend_reduce_enabled?!!V.trend_reduce_enabled:!(!O||!O.enabled),trend_reduce_step_pct:void 0!==V.trend_reduce_step_pct?V.trend_reduce_step_pct||0:O&&O.stepPct||0,trend_reduce_size_pct:void 0!==V.trend_reduce_size_pct?V.trend_reduce_size_pct||0:O&&O.sizePct||0,trend_reduce_max_times:void 0!==V.trend_reduce_max_times?V.trend_reduce_max_times||0:O&&O.maxTimes||0,adverse_reduce_enabled:void 0!==V.adverse_reduce_enabled?!!V.adverse_reduce_enabled:!(!B||!B.enabled),adverse_reduce_step_pct:void 0!==V.adverse_reduce_step_pct?V.adverse_reduce_step_pct||0:B&&B.stepPct||0,adverse_reduce_size_pct:void 0!==V.adverse_reduce_size_pct?V.adverse_reduce_size_pct||0:B&&B.sizePct||0,adverse_reduce_max_times:void 0!==V.adverse_reduce_max_times?V.adverse_reduce_max_times||0:B&&B.maxTimes||0,entry_pct:0===V.entry_pct||V.entry_pct?V.entry_pct:z&&z.entryPct?z.entryPct:100,enable_ai_filter:m}),e.$nextTick(function(){e.recalcEntryPctMaxUi(),e.normalizeEntryPct()})}case 12:return a.a(2)}},a)}))()},handleSelectStrategy:function(t){this.selectedStrategy=t,this.currentEquity=null,this.loadStrategyDetails(),this.startEquityPolling()},loadStrategyDetails:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i,n,l,c,u,m,g,h,_,y,f;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.selectedStrategy){e.n=1;break}return e.a(2,Promise.resolve());case 1:return e.p=1,e.n=2,Promise.all([(0,p.Yx)(t.selectedStrategy.id),(0,p.oK)(t.selectedStrategy.id)]);case 2:if(a=e.v,s=(0,r.A)(a,2),i=s[0],n=s[1],l=null,1===i.code&&i.data&&(Array.isArray(i.data)&&i.data.length>0?(c=i.data[i.data.length-1],l=c.equity):(m=(null===(u=t.selectedStrategy.trading_config)||void 0===u?void 0:u.initial_capital)||t.selectedStrategy.initial_capital,l=m||null)),g=0,1===n.code&&n.data){h=n.data.positions||n.data.items||[],_=(0,d.A)(h);try{for(_.s();!(y=_.n()).done;)f=y.value,g+=parseFloat(f.unrealized_pnl||f.unrealizedPnl||0)}catch(o){_.e(o)}finally{_.f()}}t.currentEquity=null!==l?l+g:null,e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[1,3]])}))()},startEquityPolling:function(){var t=this;this.stopEquityPolling(),this.selectedStrategy&&(this.loadStrategyDetails(),this.equityPollingTimer=setInterval(function(){t.loadStrategyDetails()},1e4))},stopEquityPolling:function(){this.equityPollingTimer&&(clearInterval(this.equityPollingTimer),this.equityPollingTimer=null)},handleCloseModal:function(){this.showFormModal=!1,this.editingStrategy=null,this.isEditMode=!1,this.strategyType="indicator",this.strategyMode="",this.strategyCode="",this.pendingScriptTemplateKey="",this.currentStep=0,this.currentExchangeId="",this.selectedIndicator=null,this.connectionTestResult=null,this.indicatorsLoaded=!1,this.availableIndicators=[],this.pendingRouteIndicatorId="",this.lastAutoStrategyName="",this.backtestCollapseKeys=["risk"],this.trailingEnabledUi=!1,this.entryPctMaxUi=100,this.aiFilterEnabledUi=!1,this.showAdvancedSettings=!1,this.executionModeUi="signal",this.liveDisclaimerAckUi=!1,this.form.resetFields()},handleRefresh:function(){this.loadStrategies(),this.showFormModal=!1},handleMenuClick:function(t,e){switch(t){case"start":this.handleStartStrategy(e.id);break;case"stop":this.handleStopStrategy(e.id);break;case"edit":this.handleEditStrategy(e);break;case"backtest":this.handleBacktestStrategy(e);break;case"delete":this.handleDeleteStrategy(e);break}},toggleGroup:function(t){this.$set(this.collapsedGroups,t,!this.collapsedGroups[t])},handleBacktestStrategy:function(t){t&&t.id&&this.$router.push({path:"/backtest-center",query:{tab:"strategy",strategy_id:String(t.id)}})},handleGroupMenuClick:function(t,e){var a=this;return(0,l.A)((0,o.A)().m(function s(){var i,r;return(0,o.A)().w(function(s){while(1)switch(s.n){case 0:i=e.strategies.map(function(t){return t.id}),r=t,s.n="startAll"===r?1:"stopAll"===r?3:"deleteAll"===r?5:7;break;case 1:return s.n=2,a.handleBatchStartStrategies(i,e.baseName);case 2:return s.a(3,7);case 3:return s.n=4,a.handleBatchStopStrategies(i,e.baseName);case 4:return s.a(3,7);case 5:return s.n=6,a.handleBatchDeleteStrategies(i,e.baseName);case 6:return s.a(3,7);case 7:return s.a(2)}},s)}))()},handleBatchStartStrategies:function(t,e){var a=this;return(0,l.A)((0,o.A)().m(function e(){var s,i,r;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,p.UH)({strategy_ids:t});case 1:s=e.v,1===s.code?(r=(null===(i=s.data)||void 0===i||null===(i=i.success_ids)||void 0===i?void 0:i.length)||t.length,a.$message.success(a.$t("trading-assistant.messages.batchStartSuccess",{count:r})),a.loadStrategies()):a.$message.error(s.msg||a.$t("trading-assistant.messages.batchStartFailed")),e.n=3;break;case 2:e.p=2,e.v,a.$message.error(a.$t("trading-assistant.messages.batchStartFailed"));case 3:return e.a(2)}},e,null,[[0,2]])}))()},handleBatchStopStrategies:function(t,e){var a=this;return(0,l.A)((0,o.A)().m(function e(){var s,i,r;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,p.GF)({strategy_ids:t});case 1:s=e.v,1===s.code?(r=(null===(i=s.data)||void 0===i||null===(i=i.success_ids)||void 0===i?void 0:i.length)||t.length,a.$message.success(a.$t("trading-assistant.messages.batchStopSuccess",{count:r})),a.loadStrategies()):a.$message.error(s.msg||a.$t("trading-assistant.messages.batchStopFailed")),e.n=3;break;case 2:e.p=2,e.v,a.$message.error(a.$t("trading-assistant.messages.batchStopFailed"));case 3:return e.a(2)}},e,null,[[0,2]])}))()},handleBatchDeleteStrategies:function(t,e){var a=this;return(0,l.A)((0,o.A)().m(function s(){var i;return(0,o.A)().w(function(s){while(1)switch(s.n){case 0:i=a.$t("trading-assistant.messages.batchDeleteConfirm",{count:t.length,name:e}),a.$confirm({class:a.isDarkTheme?"ta-strategy-confirm-modal":"",title:a.$t("trading-assistant.deleteAll"),content:i,okText:a.$t("trading-assistant.deleteAll"),okType:"danger",cancelText:a.$t("trading-assistant.form.cancel"),onOk:function(){var e=(0,l.A)((0,o.A)().m(function e(){var s,i,r;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,p.xQ)({strategy_ids:t});case 1:s=e.v,1===s.code?(r=(null===(i=s.data)||void 0===i||null===(i=i.success_ids)||void 0===i?void 0:i.length)||t.length,a.$message.success(a.$t("trading-assistant.messages.batchDeleteSuccess",{count:r})),a.selectedStrategy&&t.includes(a.selectedStrategy.id)&&(a.selectedStrategy=null,a.stopEquityPolling()),a.loadStrategies()):a.$message.error(s.msg||a.$t("trading-assistant.messages.batchDeleteFailed")),e.n=3;break;case 2:e.p=2,e.v,a.$message.error(a.$t("trading-assistant.messages.batchDeleteFailed"));case 3:return e.a(2)}},e,null,[[0,2]])}));function s(){return e.apply(this,arguments)}return s}()});case 1:return s.a(2)}},s)}))()},handleStartStrategy:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return a.p=0,a.n=1,(0,p.mV)(t);case 1:s=a.v,1===s.code?(e.$message.success(e.$t("trading-assistant.messages.startSuccess")),e.loadStrategies(),e.selectedStrategy&&e.selectedStrategy.id===t&&(e.selectedStrategy.status="running")):e.$message.error(s.msg||e.$t("trading-assistant.messages.startFailed")),a.n=3;break;case 2:a.p=2,a.v,e.$message.error(e.$t("trading-assistant.messages.startFailed"));case 3:return a.a(2)}},a,null,[[0,2]])}))()},handleStopStrategy:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return a.p=0,a.n=1,(0,p.Ke)(t);case 1:s=a.v,1===s.code?(e.$message.success(e.$t("trading-assistant.messages.stopSuccess")),e.loadStrategies(),e.selectedStrategy&&e.selectedStrategy.id===t&&(e.selectedStrategy.status="stopped")):e.$message.error(s.msg||e.$t("trading-assistant.messages.stopFailed")),a.n=3;break;case 2:a.p=2,a.v,e.$message.error(e.$t("trading-assistant.messages.stopFailed"));case 3:return a.a(2)}},a,null,[[0,2]])}))()},handleDeleteStrategy:function(t){var e=this,a=this.$t("trading-assistant.messages.deleteConfirmWithName",{name:t.strategy_name});this.$confirm({class:this.isDarkTheme?"ta-strategy-confirm-modal":"",title:this.$t("trading-assistant.deleteStrategy"),content:a,okText:this.$t("trading-assistant.deleteStrategy"),okType:"danger",cancelText:this.$t("trading-assistant.form.cancel"),onOk:function(){var a=(0,l.A)((0,o.A)().m(function a(){var s;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return a.p=0,a.n=1,(0,p.v_)(t.id);case 1:s=a.v,1===s.code?(e.$message.success(e.$t("trading-assistant.messages.deleteSuccess")),e.selectedStrategy&&e.selectedStrategy.id===t.id&&(e.selectedStrategy=null,e.stopEquityPolling()),e.loadStrategies()):e.$message.error(s.msg||e.$t("trading-assistant.messages.deleteFailed")),a.n=3;break;case 2:a.p=2,a.v,e.$message.error(e.$t("trading-assistant.messages.deleteFailed"));case 3:return a.a(2)}},a,null,[[0,2]])}));function s(){return a.apply(this,arguments)}return s}()})},getStatusColor:function(t){var e={running:"green",stopped:"default",error:"red"};return e[t]||"default"},getStatusText:function(t){return this.$t("trading-assistant.status.".concat(t))||t},getStrategyTypeText:function(t){return this.$t("trading-assistant.strategyType.".concat(t))||t},getTradeDirectionText:function(t){if(!t)return"";var e={long:this.$t("trading-assistant.form.tradeDirectionLong")||"做多",short:this.$t("trading-assistant.form.tradeDirectionShort")||"做空",both:this.$t("trading-assistant.form.tradeDirectionBoth")||"双向"};return e[t]||t},handleIndicatorSelectFocus:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){return(0,o.A)().w(function(e){while(1)switch(e.n){case 0:if(t.indicatorsLoaded||t.loadingIndicators){e.n=1;break}return e.n=1,t.loadIndicators();case 1:return e.a(2)}},e)}))()},loadIndicators:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i,r;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!t.loadingIndicators){e.n=1;break}return e.a(2,new Promise(function(e){var a=setInterval(function(){t.loadingIndicators||(clearInterval(a),e())},100)}));case 1:if(!t.indicatorsLoaded){e.n=2;break}return e.a(2,Promise.resolve());case 2:return a=t.$store.getters.userInfo||{},s=a.id||1,t.loadingIndicators=!0,e.p=3,e.n=4,(0,y.Ay)({url:"/api/indicator/getIndicators",method:"get",params:{userid:s}});case 4:i=e.v,1===i.code&&i.data?(r=i.data.map(function(t){return{id:t.id,name:t.name,description:t.description,type:t.indicator_type||t.indicatorType||"python",code:t.code,is_buy:t.is_buy,source:1===t.is_buy?"bought":"custom"}}),t.availableIndicators=r,t.indicatorsLoaded=!0,t.applyPendingRouteIndicatorSelection()):(t.availableIndicators=[],t.$message.warning(i.msg||t.$t("trading-assistant.messages.loadIndicatorsFailed"))),e.n=6;break;case 5:e.p=5,e.v,t.availableIndicators=[],t.$message.warning(t.$t("trading-assistant.messages.loadIndicatorsFailed"));case 6:return e.p=6,t.loadingIndicators=!1,e.f(6);case 7:return e.a(2)}},e,null,[[3,5,6,7]])}))()},handleIndicatorChange:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s,i,r;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:if(s=String(t),e.selectedIndicator=e.availableIndicators.find(function(t){return String(t.id)===s}),e.applyAutoStrategyName(e.selectedIndicator),e.indicatorParams=[],e.indicatorParamValues={},!t){a.n=4;break}return a.p=1,a.n=2,e.$http.get("/api/indicator/getIndicatorParams",{params:{indicator_id:t}});case 2:i=a.v,i&&1===i.code&&Array.isArray(i.data)&&(e.indicatorParams=i.data,r={},i.data.forEach(function(t){r[t.name]=t.default}),e.indicatorParamValues=r),a.n=4;break;case 3:a.p=3,a.v;case 4:return a.a(2)}},a,null,[[1,3]])}))()},handleMarketTypeChange:function(t){var e=t.target.value;"spot"===e&&this.form.setFieldsValue({trade_direction:"long",leverage:1})},recalcEntryPctMaxUi:function(){if(this.form){var t=!!this.form.getFieldValue("trend_add_enabled"),e=!!this.form.getFieldValue("dca_add_enabled"),a=Number(this.form.getFieldValue("trend_add_max_times")||0),s=Number(this.form.getFieldValue("dca_add_max_times")||0),i=Number(this.form.getFieldValue("trend_add_size_pct")||0),r=Number(this.form.getFieldValue("dca_add_size_pct")||0),n=(t?a*i:0)+(e?s*r:0),o=Math.max(0,Math.min(100,100-n));this.entryPctMaxUi=o}else this.entryPctMaxUi=100},normalizeEntryPct:function(){if(this.form){var t=Number(this.form.getFieldValue("entry_pct")||0),e=Number(this.entryPctMaxUi||100);t>e&&this.form.setFieldsValue({entry_pct:e})}},onTrendAddToggle:function(t){var e=this;this.form&&(t&&this.form.setFieldsValue({dca_add_enabled:!1}),this.$nextTick(function(){e.recalcEntryPctMaxUi(),e.normalizeEntryPct()}))},onDcaAddToggle:function(t){var e=this;this.form&&(t&&this.form.setFieldsValue({trend_add_enabled:!1}),this.$nextTick(function(){e.recalcEntryPctMaxUi(),e.normalizeEntryPct()}))},onScaleParamsChange:function(){var t=this;this.$nextTick(function(){t.recalcEntryPctMaxUi(),t.normalizeEntryPct()})},onEntryPctChange:function(){var t=this;this.$nextTick(function(){return t.normalizeEntryPct()})},onTrailingToggle:function(t){this.form&&(this.trailingEnabledUi=!!t,t||this.form.setFieldsValue({trailing_stop_pct:0,trailing_activation_pct:0}))},onAiFilterToggle:function(t){this.aiFilterEnabledUi=!!t;try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({enable_ai_filter:!!t})}catch(e){}},filterIndicatorOption:function(t,e){var a,s=(null===(a=e.componentOptions)||void 0===a||null===(a=a.propsData)||void 0===a?void 0:a.label)||"";return s.toLowerCase().indexOf(t.toLowerCase())>=0},getIndicatorOptionLabel:function(t){return t?t.description?"".concat(t.name," - ").concat(t.description):t.name:""},buildStrategyDefaultName:function(t){var e=t&&t.name?t.name:this.$t("trading-assistant.form.defaultStrategyName"),a=this.$t("trading-assistant.form.defaultStrategySuffix");return"".concat(e).concat(a)},applyAutoStrategyName:function(t){if(!this.editingStrategy&&this.form&&"script"!==this.strategyMode){var e=this.buildStrategyDefaultName(t),a=this.form.getFieldValue("strategy_name");a&&a!==this.lastAutoStrategyName||(this.form.setFieldsValue({strategy_name:e}),this.lastAutoStrategyName=e)}},applyPendingRouteIndicatorSelection:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s;return(0,o.A)().w(function(e){while(1)switch(e.n){case 0:if(t.pendingRouteIndicatorId&&t.form&&!t.loadingIndicators){e.n=1;break}return e.a(2);case 1:if(a=String(t.pendingRouteIndicatorId),s=t.availableIndicators.find(function(t){return String(t.id)===a}),s){e.n=2;break}return e.a(2);case 2:return t.form.setFieldsValue({indicator_id:a}),e.n=3,t.handleIndicatorChange(a);case 3:t.pendingRouteIndicatorId="";case 4:return e.a(2)}},e)}))()},filterSymbolOption:function(t,e){return e.componentOptions.children[0].text.toLowerCase().indexOf(t.toLowerCase())>=0},getIndicatorTypeColor:function(t){var e={trend:"blue",momentum:"green",volatility:"orange",volume:"purple",custom:"cyan",python:"geekblue",pine:"magenta"};return e[t]||"cyan"},getIndicatorTypeName:function(t){var e="trading-assistant.indicatorType.".concat(t),a=this.$t(e);return a!==e?a:t},getExchangeName:function(t){if(t.labelKey){var e="trading-assistant.exchangeNames.".concat(t.labelKey),a=this.$t(e);return a===e?t.value.charAt(0).toUpperCase()+t.value.slice(1):a}return t.label||t.value},getExchangeDisplayName:function(t){if(!t)return"";var e=this.exchangeOptions.find(function(e){return e.value===t});return e?this.getExchangeName(e):t.charAt(0).toUpperCase()+t.slice(1)},getExchangeTagColor:function(t){var e={binance:"gold",okx:"blue",coinbaseexchange:"cyan",kraken:"purple",bitfinex:"geekblue",huobi:"orange",gate:"green",mexc:"lime",kucoin:"volcano",bybit:"red",bitget:"magenta",bitmex:"red",deribit:"blue",phemex:"cyan",bitmart:"geekblue",bitstamp:"purple",bittrex:"orange",poloniex:"green",gemini:"lime",cryptocom:"volcano",blockchaincom:"magenta",bitflyer:"red",upbit:"blue",bithumb:"cyan",coinone:"purple",zb:"geekblue",lbank:"orange",bibox:"green",bigone:"lime",bitrue:"volcano",coinex:"magenta",ftx:"red",ftxus:"blue",binanceus:"gold",binancecoinm:"gold",binanceusdm:"gold",ibkr:"green"};return e[t]||"default"},handleApiConfigChange:function(){this.connectionTestResult=null},getModalPopupContainer:function(){return window.document.body},handleBrokerSelectChange:function(t){this.currentBrokerId=t||"ibkr",this.connectionTestResult=null},handleForexBrokerSelectChange:function(t){this.currentBrokerId=t||"mt5",this.connectionTestResult=null},handleExchangeSelectChange:function(t){var e=this;this.currentExchangeId=t||"",this.connectionTestResult=null,this.suppressApiClearOnce?this.suppressApiClearOnce=!1:this.$nextTick(function(){var t={api_key:void 0,secret_key:void 0,passphrase:void 0,enable_demo_trading:!1};setTimeout(function(){e.form.setFieldsValue(t)},100)})},getPlaceholder:function(t){var e={okx:{api_key:"请输入API Key",secret_key:"请输入Secret Key",passphrase:"请输入Passphrase(创建API时设置)"},okex:{api_key:"请输入API Key",secret_key:"请输入Secret Key",passphrase:"请输入Passphrase(创建API时设置)"},binance:{api_key:"请输入API Key",secret_key:"请输入Secret Key"},coinbaseexchange:{api_key:"请输入API Key(或Key Name)",secret_key:"请输入API Secret(或Private Key)",passphrase:"请输入Passphrase(Legacy Pro API需要)"},kucoin:{api_key:"请输入API Key",secret_key:"请输入Secret Key",passphrase:"请输入Passphrase"},gate:{api_key:"请输入API Key",secret_key:"请输入Secret Key"},mexc:{api_key:"请输入Access Key",secret_key:"请输入Secret Key"},kraken:{api_key:"请输入API Key",secret_key:"请输入Secret Key"},bitfinex:{api_key:"请输入API Key",secret_key:"请输入Secret Key"},bybit:{api_key:"请输入API Key",secret_key:"请输入Secret Key"},bitget:{api_key:"请输入API Key",secret_key:"请输入Secret Key",passphrase:"请输入Passphrase(Legacy Pro API需要)"}},a=e[this.currentExchangeId]||{};if(a[t])return a[t];var s={api_key:this.$t("trading-assistant.placeholders.inputApiKey"),secret_key:this.$t("trading-assistant.placeholders.inputSecretKey"),passphrase:this.$t("trading-assistant.placeholders.inputPassphrase")};return s[t]||this.$t("trading-assistant.placeholders.inputApiKey")},handleNext:function(){var t=this;if("script"!==this.strategyMode){if(0===this.currentStep){var e=["indicator_id","strategy_name"];e.push("initial_capital","market_type","leverage","trade_direction","timeframe"),this.isEditMode&&e.push("symbol"),this.form.validateFields(e,function(e,a){if(!e){if(!t.isEditMode){var s=t.form.getFieldValue("cs_strategy_type")||"single";if("cross_sectional"===s){if(!t.crossSectionalSymbols||0===t.crossSectionalSymbols.length)return void t.$message.warning(t.$t("trading-assistant.validation.symbolsRequired"))}else if(!t.selectedSymbols||0===t.selectedSymbols.length)return void t.$message.warning(t.$t("trading-assistant.validation.symbolsRequired"))}try{var i=a&&a.market_type||t.form.getFieldValue("market_type");"spot"===i&&t.form.setFieldsValue({leverage:1,trade_direction:"long"})}catch(r){}t.backtestCollapseKeys=["risk"];try{t.trailingEnabledUi=!!t.form.getFieldValue("trailing_enabled")}catch(r){t.trailingEnabledUi=!1}t.$nextTick(function(){t.recalcEntryPctMaxUi(),t.normalizeEntryPct()}),t.isSimpleMode&&!t.editingStrategy?t.currentStep=2:t.currentStep++}})}else if(1===this.currentStep){try{var a=this.form.getFieldValue("execution_mode")||"signal";this.executionModeUi=a;var s=this.form.getFieldValue("notify_channels")||["browser"];this.notifyChannelsUi=Array.isArray(s)?s:["browser"]}catch(o){}this.currentStep++}}else if(0===this.currentStep){var i=["strategy_name","symbol","initial_capital","timeframe"];this.form.validateFields(i,function(e){e||(t.currentStep=1)})}else if(1===this.currentStep){if(!this.strategyCode||this.strategyCode.trim().length<20)return void this.$message.warning(this.$t("trading-assistant.editor.codeHint"));try{var r=this.form.getFieldValue("execution_mode")||"signal";this.executionModeUi=r;var n=this.form.getFieldValue("notify_channels")||["browser"];this.notifyChannelsUi=Array.isArray(n)?n:["browser"]}catch(o){}this.currentStep=2}},handlePrev:function(){if(this.currentStep>0){if("script"===this.strategyMode)return void this.currentStep--;this.isSimpleMode&&!this.editingStrategy&&2===this.currentStep?this.currentStep=0:this.currentStep--}},handleSubmit:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){return(0,o.A)().w(function(e){while(1)switch(e.n){case 0:t.form.validateFields(function(){var e=(0,l.A)((0,o.A)().m(function e(a,s){var i,r,n,l,c,d,u,m,g,h,_,y,f,v,b,x,C,k,S,w,$,A,T,P,M,I;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(a){e.n=15;break}if(e.p=1,t.saving=!0,"script"!==t.strategyMode||t.editingStrategy){e.n=3;break}return i={channels:s.notify_channels||["browser"],targets:{email:t.userNotificationSettings.email||"",phone:t.userNotificationSettings.phone||"",telegram:t.userNotificationSettings.telegram_chat_id||"",telegram_bot_token:t.userNotificationSettings.telegram_bot_token||"",discord:t.userNotificationSettings.discord_webhook||"",webhook:t.userNotificationSettings.webhook_url||"",webhook_token:t.userNotificationSettings.webhook_token||""}},r=s.symbol||"",n="Crypto","string"===typeof r&&r.includes(":")&&(l=r.indexOf(":"),n=r.slice(0,l)||"Crypto",r=r.slice(l+1)),c="futures"===s.market_type?"swap":s.market_type||"swap",d=null!=s.leverage?s.leverage:5,u=s.trade_direction||"both","spot"===c?(d=1,u="long"):(d<1&&(d=1),d>125&&(d=125)),m={user_id:1,strategy_name:s.strategy_name,strategy_type:"ScriptStrategy",strategy_mode:"script",strategy_code:t.strategyCode,market_category:n,execution_mode:s.execution_mode||"signal",notification_config:i,trading_config:{initial_capital:s.initial_capital||1e3,leverage:d,trade_direction:u,timeframe:s.timeframe||"15m",market_type:c,symbol:r,commission:null!=s.commission?s.commission:0,slippage:null!=s.slippage?s.slippage:0}},e.n=2,(0,p.WM)(m);case 2:return g=e.v,1===g.code?(t.$message.success(t.$t("trading-assistant.messages.createSuccess")),t.handleRefresh()):t.$message.error(g.msg||t.$t("trading-assistant.messages.createFailed")),t.saving=!1,t.showFormModal=!1,e.a(2);case 3:if(h=t.canUseLiveTrading&&"live"===s.execution_mode,!h){e.n=4;break}if(_=s.credential_id,_){e.n=4;break}return t.$message.warning(t.$t("trading-assistant.validation.credentialRequired")),t.saving=!1,e.a(2);case 4:if(y={channels:s.notify_channels||[],targets:{email:t.userNotificationSettings.email||"",phone:t.userNotificationSettings.phone||"",telegram:t.userNotificationSettings.telegram_chat_id||"",telegram_bot_token:t.userNotificationSettings.telegram_bot_token||"",discord:t.userNotificationSettings.discord_webhook||"",webhook:t.userNotificationSettings.webhook_url||"",webhook_token:t.userNotificationSettings.webhook_token||""}},y.channels&&0!==y.channels.length){e.n=5;break}return t.$message.warning(t.$t("trading-assistant.validation.notifyChannelRequired")),t.saving=!1,e.a(2);case 5:if(f=String(s.indicator_id),v=t.availableIndicators.find(function(t){return String(t.id)===f}),v){e.n=6;break}return t.$message.error(t.$t("trading-assistant.validation.indicatorRequired")),t.saving=!1,e.a(2);case 6:if(b=!!t.aiFilterEnabledUi,x="futures"===s.market_type?"swap":s.market_type||"swap",C=s.leverage||1,k=s.trade_direction||"long","spot"===x?(C=1,k="long",t.$message.info(t.$t("trading-assistant.messages.spotLimitations"))):(C<1&&(C=1),C>125&&(C=125)),S={strategy_name:s.strategy_name,market_category:t.selectedMarketCategory||"Crypto",execution_mode:s.execution_mode||"signal",notification_config:y,indicator_config:{indicator_id:v.id,indicator_name:v.name,indicator_code:v.code||""},exchange_config:h?t.isIBKRMarket?{exchange_id:s.broker_id||t.currentBrokerId||"ibkr",ibkr_host:s.ibkr_host||"127.0.0.1",ibkr_port:s.ibkr_port||7497,ibkr_client_id:s.ibkr_client_id||1,ibkr_account:s.ibkr_account||""}:t.isMT5Market?{exchange_id:s.forex_broker_id||t.currentBrokerId||"mt5",mt5_server:s.mt5_server||"",mt5_login:s.mt5_login||"",mt5_password:s.mt5_password||"",mt5_terminal_path:s.mt5_terminal_path||""}:{credential_id:s.credential_id,exchange_id:t.currentExchangeId||void 0}:void 0,trading_config:{initial_capital:s.initial_capital,leverage:C,trade_direction:k,timeframe:s.timeframe,market_type:x,margin_mode:"cross",signal_mode:"confirmed",take_profit_pct:s.take_profit_pct||0,stop_loss_pct:s.stop_loss_pct||0,trailing_enabled:!!s.trailing_enabled,trailing_stop_pct:s.trailing_stop_pct||0,trailing_activation_pct:s.trailing_activation_pct||0,trend_add_enabled:!!s.trend_add_enabled,trend_add_step_pct:s.trend_add_step_pct||0,trend_add_size_pct:s.trend_add_size_pct||0,trend_add_max_times:s.trend_add_max_times||0,dca_add_enabled:!!s.dca_add_enabled,dca_add_step_pct:s.dca_add_step_pct||0,dca_add_size_pct:s.dca_add_size_pct||0,dca_add_max_times:s.dca_add_max_times||0,trend_reduce_enabled:!!s.trend_reduce_enabled,trend_reduce_step_pct:s.trend_reduce_step_pct||0,trend_reduce_size_pct:s.trend_reduce_size_pct||0,trend_reduce_max_times:s.trend_reduce_max_times||0,adverse_reduce_enabled:!!s.adverse_reduce_enabled,adverse_reduce_step_pct:s.adverse_reduce_step_pct||0,adverse_reduce_size_pct:s.adverse_reduce_size_pct||0,adverse_reduce_max_times:s.adverse_reduce_max_times||0,entry_pct:0===s.entry_pct||s.entry_pct?s.entry_pct:100,commission:s.commission||0,slippage:s.slippage||0,enable_ai_filter:b,indicator_params:t.indicatorParamValues,strategy_type:s.cs_strategy_type||"single",symbol_list:"cross_sectional"===s.cs_strategy_type?t.crossSectionalSymbols:void 0,portfolio_size:"cross_sectional"===s.cs_strategy_type?s.portfolio_size||10:void 0,long_ratio:"cross_sectional"===s.cs_strategy_type?s.long_ratio||.5:void 0,rebalance_frequency:"cross_sectional"===s.cs_strategy_type?s.rebalance_frequency||"daily":void 0}},!t.editingStrategy){e.n=8;break}return $=s.symbol,"string"===typeof $&&$.includes(":")&&(A=$.indexOf(":"),S.market_category=$.slice(0,A)||S.market_category,$=$.slice(A+1)),S.trading_config.symbol=$,e.n=7,(0,p.P7)(t.editingStrategy.id,S);case 7:w=e.v,e.n=12;break;case 8:if(S.user_id=1,S.strategy_type="IndicatorStrategy","cross_sectional"!==s.cs_strategy_type){e.n=10;break}return S.strategy_type="IndicatorStrategy",S.trading_config.symbol=null,e.n=9,(0,p.WM)(S);case 9:w=e.v,e.n=12;break;case 10:return S.symbols=t.selectedSymbols,e.n=11,(0,p.Ox)(S);case 11:w=e.v;case 12:1===w.code?(t.isEditMode?t.$message.success(t.$t("trading-assistant.messages.updateSuccess")):(P=s.cs_strategy_type||"single",M="cross_sectional"===P?t.crossSectionalSymbols.length:t.selectedSymbols.length,I=(null===(T=w.data)||void 0===T?void 0:T.total_created)||M,t.$message.success(t.$t("trading-assistant.messages.batchCreateSuccess",{count:I}))),t.handleRefresh()):t.$message.error(w.msg||(t.isEditMode?t.$t("trading-assistant.messages.updateFailed"):t.$t("trading-assistant.messages.createFailed"))),e.n=14;break;case 13:e.p=13,e.v,t.$message.error(t.isEditMode?t.$t("trading-assistant.messages.updateFailed"):t.$t("trading-assistant.messages.createFailed"));case 14:return e.p=14,t.saving=!1,e.f(14);case 15:return e.a(2)}},e,null,[[1,13,14,15]])}));return function(t,a){return e.apply(this,arguments)}}());case 1:return e.a(2)}},e)}))()},getFormValues:function(){var t=this;return new Promise(function(e,a){t.form.validateFields(function(t,s){t?a(t):e(s)})})},getDropdownContainer:function(t){return document.body}}},Tt=At,Pt=(0,C.A)(Tt,s,i,!1,null,"533cb131",null),Mt=Pt.exports},84841:function(t,e,a){a.d(e,{DK:function(){return v},E$:function(){return d},Gl:function(){return m},O0:function(){return c},TK:function(){return n},aU:function(){return i},cw:function(){return l},d$:function(){return x},hG:function(){return o},hl:function(){return g},kg:function(){return r},nY:function(){return f},r7:function(){return u},rx:function(){return _},v9:function(){return h},vF:function(){return p},vi:function(){return b},wq:function(){return y}});var s=a(75769);function i(t){return(0,s.Ay)({url:"/api/users/list",method:"get",params:t})}function r(t){return(0,s.Ay)({url:"/api/users/create",method:"post",data:t})}function n(t,e){return(0,s.Ay)({url:"/api/users/update",method:"put",params:{id:t},data:e})}function o(t){return(0,s.Ay)({url:"/api/users/delete",method:"delete",params:{id:t}})}function l(t){return(0,s.Ay)({url:"/api/users/reset-password",method:"post",data:t})}function c(){return(0,s.Ay)({url:"/api/users/roles",method:"get"})}function d(){return(0,s.Ay)({url:"/api/users/profile",method:"get"})}function u(t){return(0,s.Ay)({url:"/api/users/profile/update",method:"put",data:t})}function p(){return(0,s.Ay)({url:"/api/users/notification-settings",method:"get"})}function m(t){return(0,s.Ay)({url:"/api/users/notification-settings",method:"put",data:t})}function g(){return(0,s.Ay)({url:"/api/users/notification-settings/test",method:"post",data:{}})}function h(t){return(0,s.Ay)({url:"/api/users/my-credits-log",method:"get",params:t})}function _(t){return(0,s.Ay)({url:"/api/users/my-referrals",method:"get",params:t})}function y(t){return(0,s.Ay)({url:"/api/users/set-credits",method:"post",data:t})}function f(t){return(0,s.Ay)({url:"/api/users/set-vip",method:"post",data:t})}function v(t){return(0,s.Ay)({url:"/api/users/system-strategies",method:"get",params:t})}function b(t){return(0,s.Ay)({url:"/api/users/admin-orders",method:"get",params:t})}function x(t){return(0,s.Ay)({url:"/api/users/admin-ai-stats",method:"get",params:t})}}}]); \ No newline at end of file diff --git a/frontend/dist/js/254-legacy.f0b6cf6d.js b/frontend/dist/js/254-legacy.f0b6cf6d.js new file mode 100644 index 0000000..4265a1e --- /dev/null +++ b/frontend/dist/js/254-legacy.f0b6cf6d.js @@ -0,0 +1 @@ +"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[254],{12254:function(t,e,a){a.r(e),a.d(e,{default:function(){return Mt}});a(52675),a(89463),a(28706),a(74423),a(48598),a(62010),a(2892),a(9868),a(21699);var s=function(){var t,e=this,a=e._self._c;return a("div",{staticClass:"trading-assistant",class:{"theme-dark":e.isDarkTheme}},[e.showAssistantGuide?a("div",{staticClass:"assistant-guide-bar"},[a("div",{staticClass:"assistant-guide-copy"},[a("div",{staticClass:"assistant-guide-eyebrow"},[e._v(e._s(e.$t("trading-assistant.guide.eyebrow")))]),a("div",{staticClass:"assistant-guide-title"},[e._v(e._s(e.$t("trading-assistant.guide.title")))]),a("div",{staticClass:"assistant-guide-desc"},[e._v(e._s(e.$t("trading-assistant.guide.desc")))])]),a("div",{staticClass:"assistant-guide-steps"},[a("div",{staticClass:"assistant-step-card"},[a("div",{staticClass:"assistant-step-index"},[e._v("1")]),a("div",{staticClass:"assistant-step-body"},[a("div",{staticClass:"assistant-step-title"},[e._v(e._s(e.$t("trading-assistant.guide.step1Title")))]),a("div",{staticClass:"assistant-step-desc"},[e._v(e._s(e.$t("trading-assistant.guide.step1Desc")))])])]),a("div",{staticClass:"assistant-step-card"},[a("div",{staticClass:"assistant-step-index"},[e._v("2")]),a("div",{staticClass:"assistant-step-body"},[a("div",{staticClass:"assistant-step-title"},[e._v(e._s(e.$t("trading-assistant.guide.step2Title")))]),a("div",{staticClass:"assistant-step-desc"},[e._v(e._s(e.$t("trading-assistant.guide.step2Desc")))])])]),a("div",{staticClass:"assistant-step-card"},[a("div",{staticClass:"assistant-step-index"},[e._v("3")]),a("div",{staticClass:"assistant-step-body"},[a("div",{staticClass:"assistant-step-title"},[e._v(e._s(e.$t("trading-assistant.guide.step3Title")))]),a("div",{staticClass:"assistant-step-desc"},[e._v(e._s(e.$t("trading-assistant.guide.step3Desc")))])])])]),a("div",{staticClass:"assistant-guide-actions"},[a("a-button",{on:{click:e.goToStrategyTab}},[a("a-icon",{attrs:{type:"appstore"}}),e._v(" "+e._s(e.$t("trading-assistant.guide.secondary"))+" ")],1),a("a-button",{attrs:{type:"primary"},on:{click:e.openCreateStrategyFromGuide}},[a("a-icon",{attrs:{type:"plus"}}),e._v(" "+e._s(e.$t("trading-assistant.guide.primary"))+" ")],1),a("a-button",{staticClass:"assistant-guide-close",on:{click:e.dismissAssistantGuide}},[a("a-icon",{attrs:{type:"close"}})],1)],1)]):e._e(),a("a-tabs",{staticClass:"top-level-tabs",attrs:{animated:!1},model:{value:e.topTab,callback:function(t){e.topTab=t},expression:"topTab"}},[a("a-tab-pane",{key:"overview",attrs:{tab:e.$t("trading-assistant.tabs.overview")}},["overview"===e.topTab?a("dashboard-overview",{attrs:{"hide-setup-guide":!0}}):e._e()],1),a("a-tab-pane",{key:"strategy",attrs:{tab:e.$t("trading-assistant.tabs.strategyManage")}},[a("a-row",{staticClass:"strategy-layout",attrs:{gutter:24}},[a("a-col",{staticClass:"strategy-list-col",attrs:{xs:24,sm:24,md:10,lg:8,xl:8}},[a("a-card",{staticClass:"strategy-list-card",attrs:{bordered:!1}},[a("div",{staticClass:"card-title",attrs:{slot:"title"},slot:"title"},[a("span",[e._v(e._s(e.$t("trading-assistant.strategyList")))]),a("a-button",{attrs:{type:"primary",size:"small"},on:{click:e.handleCreateStrategy}},[a("a-icon",{attrs:{type:"plus"}}),e._v(" "+e._s(e.$t("trading-assistant.createStrategy"))+" ")],1)],1),a("div",{staticClass:"group-mode-switch"},[a("span",{staticClass:"group-mode-label"},[e._v(e._s(e.$t("trading-assistant.groupBy"))+":")]),a("a-radio-group",{attrs:{size:"small","button-style":"solid"},model:{value:e.groupByMode,callback:function(t){e.groupByMode=t},expression:"groupByMode"}},[a("a-radio-button",{attrs:{value:"strategy"}},[a("a-icon",{attrs:{type:"folder"}}),e._v(" "+e._s(e.$t("trading-assistant.groupByStrategy"))+" ")],1),a("a-radio-button",{attrs:{value:"symbol"}},[a("a-icon",{attrs:{type:"stock"}}),e._v(" "+e._s(e.$t("trading-assistant.groupBySymbol"))+" ")],1)],1)],1),a("a-spin",{attrs:{spinning:e.loading}},[e.loading||0!==e.strategies.length?a("div",{staticClass:"strategy-grouped-list"},[e._l(e.groupedStrategies.groups,function(t){return a("div",{key:t.id,staticClass:"strategy-group"},[a("div",{staticClass:"strategy-group-header",on:{click:function(a){return e.toggleGroup(t.id)}}},[a("div",{staticClass:"group-header-left"},[a("a-icon",{staticClass:"collapse-icon",attrs:{type:e.collapsedGroups[t.id]?"right":"down"}}),a("a-icon",{staticClass:"group-icon",attrs:{type:"symbol"===e.groupByMode?"stock":"folder"}}),a("span",{staticClass:"group-name"},[e._v(e._s(t.baseName))]),a("a-tag",{attrs:{size:"small",color:"blue"}},[e._v(e._s(t.strategies.length)+" "+e._s("symbol"===e.groupByMode?e.$t("trading-assistant.strategyCount"):e.$t("trading-assistant.symbolCount")))])],1),a("div",{staticClass:"group-header-right",on:{click:function(t){t.stopPropagation()}}},[t.runningCount>0?a("span",{staticClass:"group-status running"},[e._v(" "+e._s(t.runningCount)+" "+e._s(e.$t("trading-assistant.status.running"))+" ")]):e._e(),t.stoppedCount>0?a("span",{staticClass:"group-status stopped"},[e._v(" "+e._s(t.stoppedCount)+" "+e._s(e.$t("trading-assistant.status.stopped"))+" ")]):e._e(),a("a-dropdown",{attrs:{getPopupContainer:e.getDropdownContainer,trigger:["click"]}},[a("a-menu",{attrs:{slot:"overlay"},on:{click:function(a){var s=a.key;return e.handleGroupMenuClick(s,t)}},slot:"overlay"},[a("a-menu-item",{key:"startAll"},[a("a-icon",{attrs:{type:"play-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.startAll"))+" ")],1),a("a-menu-item",{key:"stopAll"},[a("a-icon",{attrs:{type:"pause-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.stopAll"))+" ")],1),a("a-menu-divider"),a("a-menu-item",{key:"deleteAll",staticClass:"danger-item"},[a("a-icon",{attrs:{type:"delete"}}),e._v(" "+e._s(e.$t("trading-assistant.deleteAll"))+" ")],1)],1),a("a-button",{attrs:{type:"link",icon:"more",size:"small"}})],1)],1)]),a("div",{directives:[{name:"show",rawName:"v-show",value:!e.collapsedGroups[t.id],expression:"!collapsedGroups[group.id]"}],staticClass:"strategy-group-content"},e._l(t.strategies,function(t){return a("div",{key:t.id,class:["strategy-list-item",{active:e.selectedStrategy&&e.selectedStrategy.id===t.id},{"strategy-list-item--strategy-group":"strategy"===e.groupByMode}],on:{click:function(a){return e.handleSelectStrategy(t)}}},[a("div",{staticClass:"strategy-item-content"},[a("div",{staticClass:"strategy-item-header"},[a("div",{class:["strategy-name-wrapper",{"strategy-name-wrapper--grouped":"symbol"===e.groupByMode}]},["strategy"===e.groupByMode?[a("span",{staticClass:"strategy-name"},[e._v(e._s(t.strategy_name))]),"PromptBasedStrategy"===t.strategy_type?a("a-tag",{staticClass:"strategy-type-tag",attrs:{color:"purple",size:"small"}},[a("a-icon",{staticStyle:{"margin-right":"2px"},attrs:{type:"robot"}}),e._v(" AI ")],1):e._e(),"script"===t.strategy_mode?a("a-tag",{staticStyle:{"margin-left":"4px"},attrs:{size:"small",color:"green"}},[a("a-icon",{staticStyle:{"margin-right":"2px"},attrs:{type:"code"}}),e._v(e._s(e.$t("trading-assistant.strategyMode.script"))+" ")],1):e._e()]:[a("span",{staticClass:"info-item strategy-name-text"},[a("a-icon",{attrs:{type:"thunderbolt"}}),e._v(" "+e._s(t.displayInfo?t.displayInfo.strategyName:t.strategy_name)+" ")],1),t.displayInfo&&t.displayInfo.timeframe?a("a-tag",{attrs:{size:"small",color:"cyan"}},[a("a-icon",{staticStyle:{"margin-right":"2px"},attrs:{type:"clock-circle"}}),e._v(" "+e._s(t.displayInfo.timeframe)+" ")],1):e._e(),t.displayInfo&&t.displayInfo.indicatorName&&"-"!==t.displayInfo.indicatorName?a("a-tag",{attrs:{size:"small",color:"purple"}},[a("a-icon",{staticStyle:{"margin-right":"2px"},attrs:{type:"line-chart"}}),e._v(" "+e._s(t.displayInfo.indicatorName)+" ")],1):e._e(),"script"===t.strategy_mode?a("a-tag",{staticStyle:{"margin-left":"4px"},attrs:{size:"small",color:"green"}},[a("a-icon",{staticStyle:{"margin-right":"2px"},attrs:{type:"code"}}),e._v(e._s(e.$t("trading-assistant.strategyMode.script"))+" ")],1):e._e()]],2)]),a("div",{staticClass:"strategy-item-info"},["strategy"===e.groupByMode?[t.trading_config&&t.trading_config.symbol?a("span",{staticClass:"info-item"},[a("a-icon",{attrs:{type:"dollar"}}),e._v(" "+e._s(t.trading_config.symbol)+" ")],1):e._e(),t.exchange_config&&t.exchange_config.exchange_id?a("span",{staticClass:"info-item"},[a("a-icon",{attrs:{type:"bank"}}),e._v(" "+e._s(e.getExchangeDisplayName(t.exchange_config.exchange_id))+" ")],1):e._e(),t.trading_config&&t.trading_config.timeframe?a("span",{staticClass:"info-item"},[a("a-icon",{attrs:{type:"clock-circle"}}),e._v(" "+e._s(t.trading_config.timeframe)+" ")],1):e._e()]:e._e(),a("span",{staticClass:"status-label",class:[t.status?"status-".concat(t.status):"",{"status-stopped":"stopped"===t.status}]},[e._v(" "+e._s(e.getStatusText(t.status))+" ")])],2)]),a("div",{staticClass:"strategy-item-actions",on:{click:function(t){t.stopPropagation()}}},[a("a-dropdown",{attrs:{getPopupContainer:e.getDropdownContainer,trigger:["click"]}},[a("a-menu",{attrs:{slot:"overlay"},on:{click:function(a){var s=a.key;return e.handleMenuClick(s,t)}},slot:"overlay"},["stopped"===t.status?a("a-menu-item",{key:"start"},[a("a-icon",{attrs:{type:"play-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.startStrategy"))+" ")],1):e._e(),"running"===t.status?a("a-menu-item",{key:"stop"},[a("a-icon",{attrs:{type:"pause-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.stopStrategy"))+" ")],1):e._e(),a("a-menu-divider"),a("a-menu-item",{key:"edit"},[a("a-icon",{attrs:{type:"edit"}}),e._v(" "+e._s(e.$t("trading-assistant.editStrategy"))+" ")],1),a("a-menu-item",{key:"backtest"},[a("a-icon",{attrs:{type:"experiment"}}),e._v(" "+e._s(e.$t("dashboard.indicator.action.backtest"))+" ")],1),a("a-menu-divider"),a("a-menu-item",{key:"delete",staticClass:"danger-item"},[a("a-icon",{attrs:{type:"delete"}}),e._v(" "+e._s(e.$t("trading-assistant.deleteStrategy"))+" ")],1)],1),a("a-button",{attrs:{type:"link",icon:"more",size:"small"}})],1)],1)])}),0)])}),e._l(e.groupedStrategies.ungrouped,function(t){return a("div",{key:t.id,class:["strategy-list-item",{active:e.selectedStrategy&&e.selectedStrategy.id===t.id}],on:{click:function(a){return e.handleSelectStrategy(t)}}},[a("div",{staticClass:"strategy-item-content"},[a("div",{staticClass:"strategy-item-header"},[a("div",{staticClass:"strategy-name-wrapper"},[t.exchange_config&&t.exchange_config.exchange_id?a("a-tag",{staticClass:"exchange-tag",attrs:{color:e.getExchangeTagColor(t.exchange_config.exchange_id),size:"small"}},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"bank"}}),e._v(" "+e._s(e.getExchangeDisplayName(t.exchange_config.exchange_id))+" ")],1):e._e(),a("span",{staticClass:"strategy-name"},[e._v(e._s(t.strategy_name))]),"PromptBasedStrategy"===t.strategy_type?a("a-tag",{staticClass:"strategy-type-tag",attrs:{color:"purple",size:"small"}},[a("a-icon",{staticStyle:{"margin-right":"2px"},attrs:{type:"robot"}}),e._v(" AI ")],1):e._e()],1)]),a("div",{staticClass:"strategy-item-info"},[t.trading_config&&t.trading_config.symbol?a("span",{staticClass:"info-item"},[a("a-icon",{attrs:{type:"dollar"}}),e._v(" "+e._s(t.trading_config.symbol)+" ")],1):e._e(),a("span",{staticClass:"status-label",class:[t.status?"status-".concat(t.status):"",{"status-stopped":"stopped"===t.status}]},[e._v(" "+e._s(e.getStatusText(t.status))+" ")])])]),a("div",{staticClass:"strategy-item-actions",on:{click:function(t){t.stopPropagation()}}},[a("a-dropdown",{attrs:{getPopupContainer:e.getDropdownContainer,trigger:["click"]}},[a("a-menu",{attrs:{slot:"overlay"},on:{click:function(a){var s=a.key;return e.handleMenuClick(s,t)}},slot:"overlay"},["stopped"===t.status?a("a-menu-item",{key:"start"},[a("a-icon",{attrs:{type:"play-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.startStrategy"))+" ")],1):e._e(),"running"===t.status?a("a-menu-item",{key:"stop"},[a("a-icon",{attrs:{type:"pause-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.stopStrategy"))+" ")],1):e._e(),a("a-menu-divider"),a("a-menu-item",{key:"edit"},[a("a-icon",{attrs:{type:"edit"}}),e._v(" "+e._s(e.$t("trading-assistant.editStrategy"))+" ")],1),a("a-menu-item",{key:"backtest"},[a("a-icon",{attrs:{type:"experiment"}}),e._v(" "+e._s(e.$t("dashboard.indicator.action.backtest"))+" ")],1),a("a-menu-divider"),a("a-menu-item",{key:"delete",staticClass:"danger-item"},[a("a-icon",{attrs:{type:"delete"}}),e._v(" "+e._s(e.$t("trading-assistant.deleteStrategy"))+" ")],1)],1),a("a-button",{attrs:{type:"link",icon:"more",size:"small"}})],1)],1)])})],2):a("div",{staticClass:"strategy-empty-state"},[a("a-empty",{attrs:{description:e.$t("trading-assistant.empty.title")}}),a("div",{staticClass:"strategy-empty-desc"},[e._v(e._s(e.$t("trading-assistant.empty.desc")))]),a("a-button",{attrs:{type:"primary"},on:{click:e.openCreateStrategyFromGuide}},[a("a-icon",{attrs:{type:"plus"}}),e._v(" "+e._s(e.$t("trading-assistant.empty.primary"))+" ")],1)],1)])],1)],1),a("a-col",{staticClass:"strategy-detail-col",attrs:{xs:24,sm:24,md:14,lg:16,xl:16}},[e.selectedStrategy?a("div",{staticClass:"strategy-detail-panel"},[a("a-card",{staticClass:"strategy-header-card",attrs:{bordered:!1}},[a("div",{staticClass:"strategy-header"},[a("div",{staticClass:"header-left"},[a("div",{staticClass:"strategy-title-row"},[a("h3",{staticClass:"strategy-title"},[e._v(e._s(e.selectedStrategy.strategy_name))]),a("div",{staticClass:"status-badge",class:["status-".concat(e.selectedStrategy.status)]},[a("span",{staticClass:"status-dot"}),e._v(" "+e._s(e.getStatusText(e.selectedStrategy.status))+" ")])]),a("div",{staticClass:"key-stats-grid"},[e.selectedStrategy.initial_capital||e.selectedStrategy.trading_config&&e.selectedStrategy.trading_config.initial_capital?a("div",{staticClass:"stat-card"},[a("div",{staticClass:"stat-icon investment"},[a("a-icon",{attrs:{type:"wallet"}})],1),a("div",{staticClass:"stat-content"},[a("div",{staticClass:"stat-label"},[e._v(e._s(e.$t("trading-assistant.detail.totalInvestment")))]),a("div",{staticClass:"stat-value"},[e._v("$"+e._s(parseFloat(e.selectedStrategy.initial_capital||(null===(t=e.selectedStrategy.trading_config)||void 0===t?void 0:t.initial_capital)||0).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})))])])]):e._e(),null!==e.currentEquity?a("div",{staticClass:"stat-card"},[a("div",{staticClass:"stat-icon equity"},[a("a-icon",{attrs:{type:"fund"}})],1),a("div",{staticClass:"stat-content"},[a("div",{staticClass:"stat-label"},[e._v(e._s(e.$t("trading-assistant.detail.currentEquity")))]),a("div",{staticClass:"stat-value",class:e.getEquityColorClass},[e._v(e._s(e.formatCurrency(e.currentEquity)))])])]):e._e(),null!==e.totalPnl?a("div",{staticClass:"stat-card pnl-card",class:{profit:e.totalPnl>0,loss:e.totalPnl<0}},[a("div",{staticClass:"stat-icon pnl"},[a("a-icon",{attrs:{type:e.totalPnl>=0?"rise":"fall"}})],1),a("div",{staticClass:"stat-content"},[a("div",{staticClass:"stat-label"},[e._v(e._s(e.$t("trading-assistant.detail.totalPnl")))]),a("div",{staticClass:"stat-value",class:e.getPnlColorClass},[e._v(" "+e._s(e.formatPnl(e.totalPnl))+" "),a("span",{staticClass:"pnl-percent"},[e._v("("+e._s(e.formatPnlPercent(e.totalPnlPercent))+")")])])])]):e._e()]),a("div",{staticClass:"strategy-tags"},[e.selectedStrategy.trading_config?a("div",{staticClass:"tag-item"},[a("a-icon",{attrs:{type:"stock"}}),a("span",[e._v(e._s(e.selectedStrategy.trading_config.symbol))])],1):e._e(),e.selectedStrategy.indicator_config&&e.selectedStrategy.indicator_config.indicator_name?a("div",{staticClass:"tag-item"},[a("a-icon",{attrs:{type:"line-chart"}}),a("span",[e._v(e._s(e.selectedStrategy.indicator_config.indicator_name))])],1):e._e(),e.selectedStrategy.trading_config?a("div",{staticClass:"tag-item"},[a("a-icon",{attrs:{type:"thunderbolt"}}),a("span",[e._v(e._s(e.selectedStrategy.trading_config.leverage||1)+"x")])],1):e._e(),e.selectedStrategy.trading_config&&e.selectedStrategy.trading_config.trade_direction?a("div",{staticClass:"tag-item"},[a("a-icon",{attrs:{type:"swap"}}),a("span",[e._v(e._s(e.getTradeDirectionText(e.selectedStrategy.trading_config.trade_direction)))])],1):e._e(),e.selectedStrategy.trading_config&&e.selectedStrategy.trading_config.timeframe?a("div",{staticClass:"tag-item"},[a("a-icon",{attrs:{type:"clock-circle"}}),a("span",[e._v(e._s(e.selectedStrategy.trading_config.timeframe))])],1):e._e()])]),a("div",{staticClass:"header-right"},["stopped"===e.selectedStrategy.status?a("a-button",{staticClass:"action-btn start-btn",attrs:{type:"primary",size:"large"},on:{click:function(t){return e.handleStartStrategy(e.selectedStrategy.id)}}},[a("a-icon",{attrs:{type:"play-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.startStrategy"))+" ")],1):e._e(),"running"===e.selectedStrategy.status?a("a-button",{staticClass:"action-btn stop-btn",attrs:{type:"danger",size:"large"},on:{click:function(t){return e.handleStopStrategy(e.selectedStrategy.id)}}},[a("a-icon",{attrs:{type:"pause-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.stopStrategy"))+" ")],1):e._e()],1)])]),a("a-card",{staticClass:"strategy-content-card",attrs:{bordered:!1}},[a("a-tabs",{attrs:{defaultActiveKey:"positions"}},[a("a-tab-pane",{key:"positions",attrs:{tab:e.$t("trading-assistant.tabs.positions")}},[a("position-records",{attrs:{"strategy-id":e.selectedStrategy.id,"market-type":e.selectedStrategy.trading_config&&e.selectedStrategy.trading_config.market_type||"swap",leverage:e.selectedStrategy.trading_config&&e.selectedStrategy.trading_config.leverage||1,loading:e.loadingRecords,"is-dark":e.isDarkTheme}})],1),a("a-tab-pane",{key:"trades",attrs:{tab:e.$t("trading-assistant.tabs.tradingRecords")}},[a("trading-records",{attrs:{"strategy-id":e.selectedStrategy.id,loading:e.loadingRecords,"is-dark":e.isDarkTheme}})],1),a("a-tab-pane",{key:"performance",attrs:{tab:e.$t("trading-assistant.tabs.performance")}},[a("performance-analysis",{attrs:{"strategy-id":e.selectedStrategy.id,"is-dark":e.isDarkTheme}})],1),a("a-tab-pane",{key:"logs",attrs:{tab:e.$t("trading-assistant.tabs.logs")}},[a("strategy-logs",{attrs:{"strategy-id":e.selectedStrategy.id,"is-dark":e.isDarkTheme}})],1)],1)],1)],1):a("div",{staticClass:"strategy-empty-detail"},[a("div",{staticClass:"strategy-empty-detail-card"},[a("div",{staticClass:"strategy-empty-detail-icon"},[a("a-icon",{attrs:{type:"deployment-unit"}})],1),a("h3",{staticClass:"strategy-empty-detail-title"},[e._v(e._s(e.$t("trading-assistant.emptyDetail.title")))]),a("p",{staticClass:"strategy-empty-detail-hint"},[e._v(e._s(e.$t("trading-assistant.emptyDetail.hint")))]),a("div",{staticClass:"strategy-empty-detail-actions"},[a("a-button",{attrs:{type:"primary"},on:{click:e.handleCreateStrategy}},[a("a-icon",{attrs:{type:"plus"}}),e._v(" "+e._s(e.$t("trading-assistant.createStrategy"))+" ")],1)],1)])])])],1),a("a-modal",{staticClass:"mode-selector-modal",attrs:{visible:e.showModeSelector,title:e.$t("trading-assistant.selectMode"),width:e.isMobile?"95%":700,footer:null,maskClosable:!0,bodyStyle:{padding:"16px 24px"}},on:{cancel:function(t){e.showModeSelector=!1}}},[a("strategy-type-selector",{attrs:{selected:e.strategyMode,"is-dark":e.isDarkTheme},on:{select:e.handleModeSelect,"use-template":e.handleUseTemplate}})],1),a("a-modal",{attrs:{visible:e.showFormModal,title:e.editingStrategy?e.$t("trading-assistant.editStrategy"):e.$t("trading-assistant.createStrategy")+("script"===e.strategyMode?" - "+e.$t("trading-assistant.strategyMode.script"):""),width:e.isMobile?"95%":1120,confirmLoading:e.saving,maskClosable:!1,wrapClassName:e.strategyFormWrapClass,bodyStyle:{maxHeight:"76vh",overflowY:"auto",paddingBottom:"8px"}},on:{ok:e.handleSubmit,cancel:e.handleCloseModal}},[a("a-spin",{attrs:{spinning:e.loadingIndicators}},[e.editingStrategy||"script"===e.strategyMode?e._e():a("div",{staticClass:"creation-mode-toggle"},[a("div",{staticClass:"mode-meta"},[a("div",{staticClass:"mode-title"},[e._v(e._s(e.$t("trading-assistant.selectMode")))]),a("div",{staticClass:"mode-hint"},[e._v(e._s(e.isSimpleMode?e.$t("trading-assistant.form.simpleModeHint"):e.$t("trading-assistant.form.advancedModeHint")))])]),a("a-radio-group",{attrs:{size:"small","button-style":"solid"},model:{value:e.creationMode,callback:function(t){e.creationMode=t},expression:"creationMode"}},[a("a-radio-button",{attrs:{value:"simple"}},[a("a-icon",{attrs:{type:"rocket"}}),e._v(" "+e._s(e.$t("trading-assistant.form.simpleMode"))+" ")],1),a("a-radio-button",{attrs:{value:"advanced"}},[a("a-icon",{attrs:{type:"setting"}}),e._v(" "+e._s(e.$t("trading-assistant.form.advancedMode"))+" ")],1)],1)],1),a("a-steps",{staticClass:"steps-container",attrs:{current:e.displayCurrentStep}},["script"===e.strategyMode?[a("a-step",{attrs:{title:e.$t("trading-assistant.form.simpleStep1")}}),a("a-step",{attrs:{title:e.$t("trading-assistant.editor.title")}}),a("a-step",{attrs:{title:e.$t("trading-assistant.form.step3Signal")}})]:[a("a-step",{attrs:{title:e.isSimpleMode&&!e.editingStrategy?e.$t("trading-assistant.form.simpleStep1"):e.$t("trading-assistant.form.step1")}}),e.isAdvancedMode||e.editingStrategy?a("a-step",{attrs:{title:e.$t("trading-assistant.form.step2Params")}}):e._e(),a("a-step",{attrs:{title:e.isSimpleMode&&!e.editingStrategy?e.$t("trading-assistant.form.simpleStep2"):e.$t("trading-assistant.form.step3Signal")}})]],2),a("div",{staticClass:"form-container"},[a("div",{directives:[{name:"show",rawName:"v-show",value:0===e.currentStep,expression:"currentStep === 0"}],staticClass:"step-content"},["indicator"===e.strategyType&&"script"!==e.strategyMode?a("div",[a("a-form",{attrs:{form:e.form,layout:"vertical"}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.indicator")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["indicator_id",{rules:[{required:!0,message:e.$t("trading-assistant.validation.indicatorRequired")}]}],expression:"['indicator_id', { rules: [{ required: true, message: $t('trading-assistant.validation.indicatorRequired') }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.selectIndicator"),"show-search":"",optionLabelProp:"label","filter-option":e.filterIndicatorOption,loading:e.loadingIndicators,getPopupContainer:function(t){return t.parentNode}},on:{focus:e.handleIndicatorSelectFocus,change:e.handleIndicatorChange}},e._l(e.availableIndicators,function(t){return a("a-select-option",{key:String(t.id),attrs:{value:String(t.id),label:e.getIndicatorOptionLabel(t)}},[a("div",{staticClass:"indicator-option"},[a("div",{staticClass:"indicator-option-main"},[a("span",{staticClass:"indicator-name"},[e._v(e._s(t.name))]),t.description?a("span",{staticClass:"indicator-option-desc"},[e._v(e._s(t.description))]):e._e()]),t.type?a("a-tag",{attrs:{size:"small",color:e.getIndicatorTypeColor(t.type)}},[e._v(" "+e._s(e.getIndicatorTypeName(t.type))+" ")]):e._e()],1)])}),1),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.indicatorHint"))+" ")]),e.loadingIndicators||e.availableIndicators&&0!==e.availableIndicators.length?e._e():a("a-alert",{staticStyle:{"margin-top":"12px"},attrs:{type:"info","show-icon":"",message:e.$t("trading-assistant.indicatorEmpty.title"),description:e.$t("trading-assistant.indicatorEmpty.desc")}},[a("template",{slot:"action"},[a("a-button",{attrs:{type:"primary",size:"small"},on:{click:e.goToIndicatorAnalysisCreate}},[a("a-icon",{attrs:{type:"rocket"}}),e._v(" "+e._s(e.$t("trading-assistant.indicatorEmpty.cta"))+" ")],1)],1)],2)],1),e.selectedIndicator?a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.indicatorDescription")}},[a("div",{staticClass:"selected-indicator-card"},[a("div",{staticClass:"selected-indicator-header"},[a("span",{staticClass:"selected-indicator-name"},[e._v(e._s(e.selectedIndicator.name))]),e.selectedIndicator.type?a("a-tag",{attrs:{size:"small",color:e.getIndicatorTypeColor(e.selectedIndicator.type)}},[e._v(" "+e._s(e.getIndicatorTypeName(e.selectedIndicator.type))+" ")]):e._e()],1),a("div",{staticClass:"indicator-description"},[e._v(" "+e._s(e.selectedIndicator.description||e.$t("trading-assistant.form.noDescription"))+" ")])])]):e._e(),e.indicatorParams.length>0?a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.indicatorParams")}},[a("div",{staticClass:"indicator-params-form"},[a("a-row",{attrs:{gutter:16}},e._l(e.indicatorParams,function(t){return a("a-col",{key:t.name,attrs:{xs:24,sm:12,md:8}},[a("div",{staticClass:"param-item"},[a("label",{staticClass:"param-label"},[e._v(" "+e._s(t.name)+" "),t.description?a("a-tooltip",{attrs:{title:t.description}},[a("a-icon",{staticStyle:{"margin-left":"4px",color:"#999"},attrs:{type:"question-circle"}})],1):e._e()],1),"int"===t.type?a("a-input-number",{staticStyle:{width:"100%"},attrs:{precision:0,size:"small"},model:{value:e.indicatorParamValues[t.name],callback:function(a){e.$set(e.indicatorParamValues,t.name,a)},expression:"indicatorParamValues[param.name]"}}):"float"===t.type?a("a-input-number",{staticStyle:{width:"100%"},attrs:{precision:4,size:"small"},model:{value:e.indicatorParamValues[t.name],callback:function(a){e.$set(e.indicatorParamValues,t.name,a)},expression:"indicatorParamValues[param.name]"}}):"bool"===t.type?a("a-switch",{attrs:{size:"small"},model:{value:e.indicatorParamValues[t.name],callback:function(a){e.$set(e.indicatorParamValues,t.name,a)},expression:"indicatorParamValues[param.name]"}}):a("a-input",{attrs:{size:"small"},model:{value:e.indicatorParamValues[t.name],callback:function(a){e.$set(e.indicatorParamValues,t.name,a)},expression:"indicatorParamValues[param.name]"}})],1)])}),1),a("div",{staticClass:"form-item-hint",staticStyle:{"margin-top":"8px"}},[e._v(" "+e._s(e.$t("trading-assistant.form.indicatorParamsHint"))+" ")])],1)]):e._e(),a("a-divider"),a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.strategyName")}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["strategy_name",{rules:[{required:!0,message:e.$t("trading-assistant.validation.strategyNameRequired")}]}],expression:"['strategy_name', { rules: [{ required: true, message: $t('trading-assistant.validation.strategyNameRequired') }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.inputStrategyName")}}),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.strategyNameHint"))+" ")])],1),e.isSimpleMode&&!e.editingStrategy?a("div",{staticClass:"simple-essentials-card"},[a("div",{staticClass:"simple-mode-hero"},[a("div",{staticClass:"simple-mode-hero-main"},[a("div",{staticClass:"simple-mode-kicker"},[e._v(e._s(e.$t("trading-assistant.form.simpleModePreset")))]),a("div",{staticClass:"simple-mode-hero-desc"},[e._v(e._s(e.$t("trading-assistant.form.simpleModePresetValue")))])]),a("div",{staticClass:"simple-mode-badges"},[a("a-tag",[e._v("15m")]),a("a-tag",{attrs:{color:"blue"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeFutures")))]),a("a-tag",{attrs:{color:"purple"}},[e._v("5x")])],1)]),a("div",{staticClass:"section-block-title"},[a("span",[e._v(e._s(e.$t("trading-assistant.form.simpleModeSectionCore")))]),a("span",{staticClass:"section-block-desc"},[e._v(e._s(e.$t("trading-assistant.form.simpleModeSectionCoreDesc")))])]),a("a-form-item",{staticClass:"compact-form-item"},[a("span",{staticClass:"required-label",attrs:{slot:"label"},slot:"label"},[a("span",{staticClass:"required-star"},[e._v("*")]),e._v(e._s(e.$t("trading-assistant.form.symbol"))+" ")]),a("a-select",{attrs:{value:e.selectedSymbols[0],placeholder:e.$t("trading-assistant.placeholders.selectSymbol"),"show-search":"","filter-option":e.filterWatchlistOptionWithAdd,loading:e.loadingWatchlist,"allow-clear":"",getPopupContainer:function(t){return t.parentNode}},on:{change:e.handleSimpleSymbolChange}},[e._l(e.watchlist,function(t){return a("a-select-option",{key:"".concat(t.market,":").concat(t.symbol),attrs:{value:"".concat(t.market,":").concat(t.symbol)}},[a("div",{staticClass:"symbol-option"},[a("a-tag",{staticStyle:{"margin-right":"8px","margin-bottom":"0"},attrs:{color:e.getMarketColor(t.market)}},[e._v(" "+e._s(t.market)+" ")]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.symbol))]),t.name?a("span",{staticClass:"symbol-name-extra"},[e._v(e._s(t.name))]):e._e()],1)])}),a("a-select-option",{key:"__add_symbol_option__",staticClass:"add-symbol-option",attrs:{value:"__add_symbol_option__"}},[a("div",{staticStyle:{width:"100%","text-align":"center",padding:"4px 0",color:"#1890ff",cursor:"pointer"}},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"plus"}}),a("span",[e._v(e._s(e.$t("trading-assistant.form.addSymbol")))])],1)])],2),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.symbolHintCrypto"))+" ")])],1),a("a-row",{staticClass:"compact-grid-row",attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.initialCapital")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["initial_capital",{rules:[{required:!0,message:e.$t("trading-assistant.validation.initialCapitalRequired")}],initialValue:1e3}],expression:"['initial_capital', { rules: [{ required: true, message: $t('trading-assistant.validation.initialCapitalRequired') }], initialValue: 1000 }]"}],staticStyle:{width:"100%"},attrs:{min:10,step:100,precision:2}})],1)],1),a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.leverage")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["leverage",{initialValue:5,rules:[{required:!0,message:e.$t("trading-assistant.validation.leverageRequired")}]}],expression:"['leverage', { initialValue: 5, rules: [{ required: true, message: $t('trading-assistant.validation.leverageRequired') }] }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:"spot"===e.form.getFieldValue("market_type")?1:125,step:1,disabled:"spot"===e.form.getFieldValue("market_type")}})],1)],1)],1),a("a-row",{staticClass:"compact-grid-row",attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.marketType")}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["market_type",{initialValue:"swap"}],expression:"['market_type', { initialValue: 'swap' }]"}],on:{change:e.handleMarketTypeChange}},[a("a-radio",{attrs:{value:"swap"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeFutures")))]),a("a-radio",{attrs:{value:"spot"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeSpot")))])],1)],1)],1),a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.tradeDirection")}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["trade_direction",{initialValue:"long"}],expression:"['trade_direction', { initialValue: 'long' }]"}],attrs:{disabled:"spot"===e.form.getFieldValue("market_type")}},[a("a-radio",{attrs:{value:"long"}},[e._v(e._s(e.$t("trading-assistant.form.tradeDirectionLong")))]),a("a-radio",{attrs:{value:"short",disabled:"spot"===e.form.getFieldValue("market_type")}},[e._v(" "+e._s(e.$t("trading-assistant.form.tradeDirectionShort"))+" ")]),a("a-radio",{attrs:{value:"both",disabled:"spot"===e.form.getFieldValue("market_type")}},[e._v(" "+e._s(e.$t("trading-assistant.form.tradeDirectionBoth"))+" ")])],1)],1)],1)],1),a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.klinePeriod")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["timeframe",{initialValue:"15m",rules:[{required:!0}]}],expression:"['timeframe', { initialValue: '15m', rules: [{ required: true }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.selectKlinePeriod"),getPopupContainer:function(t){return t.parentNode}}},[a("a-select-option",{attrs:{value:"1m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1m")))]),a("a-select-option",{attrs:{value:"5m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe5m")))]),a("a-select-option",{attrs:{value:"15m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe15m")))]),a("a-select-option",{attrs:{value:"30m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe30m")))]),a("a-select-option",{attrs:{value:"1H"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1H")))]),a("a-select-option",{attrs:{value:"4H"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe4H")))]),a("a-select-option",{attrs:{value:"1D"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1D")))])],1)],1)],1):e._e(),e.isAdvancedMode||e.editingStrategy?a("div",{staticClass:"advanced-settings-shell"},[a("div",{staticClass:"section-block-title"},[a("span",[e._v(e._s(e.$t("trading-assistant.form.advancedMode")))]),a("span",{staticClass:"section-block-desc"},[e._v(e._s(e.$t("trading-assistant.form.advancedModeHint")))])]),a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.strategyType")}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["cs_strategy_type",{initialValue:"single"}],expression:"['cs_strategy_type', { initialValue: 'single' }]"}],on:{change:e.handleStrategyTypeChange}},[a("a-radio",{attrs:{value:"single"}},[e._v(e._s(e.$t("trading-assistant.form.strategyTypeSingle")))]),a("a-radio",{attrs:{value:"cross_sectional"}},[e._v(e._s(e.$t("trading-assistant.form.strategyTypeCrossSectional")))])],1),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.strategyTypeHint"))+" ")])],1)],1):e._e(),(e.isAdvancedMode||e.editingStrategy)&&"cross_sectional"===e.form.getFieldValue("cs_strategy_type")?[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.symbolList")}},[a("a-select",{attrs:{mode:"multiple",placeholder:e.$t("trading-assistant.placeholders.selectSymbols"),"show-search":"","filter-option":e.filterWatchlistOptionWithAdd,loading:e.loadingWatchlist,getPopupContainer:function(t){return t.parentNode},maxTagCount:5},on:{change:e.handleCrossSectionalSymbolChange},model:{value:e.crossSectionalSymbols,callback:function(t){e.crossSectionalSymbols=t},expression:"crossSectionalSymbols"}},[e._l(e.watchlist,function(t){return a("a-select-option",{key:"".concat(t.market,":").concat(t.symbol),attrs:{value:"".concat(t.market,":").concat(t.symbol)}},[a("div",{staticClass:"symbol-option"},[a("a-tag",{staticStyle:{"margin-right":"8px","margin-bottom":"0"},attrs:{color:e.getMarketColor(t.market)}},[e._v(" "+e._s(t.market)+" ")]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.symbol))]),t.name?a("span",{staticClass:"symbol-name-extra"},[e._v(e._s(t.name))]):e._e()],1)])}),a("a-select-option",{key:"__add_symbol_option__",staticClass:"add-symbol-option",attrs:{value:"__add_symbol_option__"}},[a("div",{staticStyle:{width:"100%","text-align":"center",padding:"4px 0",color:"#1890ff",cursor:"pointer"}},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"plus"}}),a("span",[e._v(e._s(e.$t("trading-assistant.form.addSymbol")))])],1)])],2),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.symbolListHint"))+" ")])],1),a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.portfolioSize")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["portfolio_size",{initialValue:10,rules:[{required:!0,message:e.$t("trading-assistant.validation.portfolioSizeRequired")}]}],expression:"['portfolio_size', { initialValue: 10, rules: [{ required: true, message: $t('trading-assistant.validation.portfolioSizeRequired') }] }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:100,step:1}}),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.portfolioSizeHint"))+" ")])],1)],1),a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.longRatio")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["long_ratio",{initialValue:.5,rules:[{required:!0,message:e.$t("trading-assistant.validation.longRatioRequired")}]}],expression:"['long_ratio', { initialValue: 0.5, rules: [{ required: true, message: $t('trading-assistant.validation.longRatioRequired') }] }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:1,step:.1,precision:2}}),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.longRatioHint"))+" ")])],1)],1)],1),a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.rebalanceFrequency")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["rebalance_frequency",{initialValue:"daily"}],expression:"['rebalance_frequency', { initialValue: 'daily' }]"}],staticStyle:{width:"100%"}},[a("a-select-option",{attrs:{value:"daily"}},[e._v(e._s(e.$t("trading-assistant.form.rebalanceDaily")))]),a("a-select-option",{attrs:{value:"weekly"}},[e._v(e._s(e.$t("trading-assistant.form.rebalanceWeekly")))]),a("a-select-option",{attrs:{value:"monthly"}},[e._v(e._s(e.$t("trading-assistant.form.rebalanceMonthly")))])],1),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.rebalanceFrequencyHint"))+" ")])],1)]:e._e(),(e.isAdvancedMode||e.editingStrategy)&&"cross_sectional"!==e.form.getFieldValue("cs_strategy_type")?a("a-form-item",{attrs:{label:e.isEditMode?e.$t("trading-assistant.form.symbol"):e.$t("trading-assistant.form.symbols")}},[e.isEditMode?a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["symbol",{rules:[{required:!0,message:e.$t("trading-assistant.validation.symbolRequired")}]}],expression:"['symbol', { rules: [{ required: true, message: $t('trading-assistant.validation.symbolRequired') }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.selectSymbol"),"show-search":"","filter-option":e.filterWatchlistOption,loading:e.loadingWatchlist,getPopupContainer:function(t){return t.parentNode}},on:{change:e.handleWatchlistSymbolChange}},[e._l(e.watchlist,function(t){return a("a-select-option",{key:"".concat(t.market,":").concat(t.symbol),attrs:{value:"".concat(t.market,":").concat(t.symbol)}},[a("div",{staticClass:"symbol-option"},[a("a-tag",{staticStyle:{"margin-right":"8px","margin-bottom":"0"},attrs:{color:e.getMarketColor(t.market)}},[e._v(" "+e._s(t.market)+" ")]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.symbol))]),t.name?a("span",{staticClass:"symbol-name-extra"},[e._v(e._s(t.name))]):e._e()],1)])}),a("a-select-option",{key:"__add_symbol_option__",staticClass:"add-symbol-option",attrs:{value:"__add_symbol_option__"}},[a("div",{staticStyle:{width:"100%","text-align":"center",padding:"4px 0",color:"#1890ff",cursor:"pointer"}},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"plus"}}),a("span",[e._v(e._s(e.$t("trading-assistant.form.addSymbol")))])],1)])],2):a("a-select",{attrs:{mode:"multiple",placeholder:e.$t("trading-assistant.placeholders.selectSymbols"),"show-search":"","filter-option":e.filterWatchlistOptionWithAdd,loading:e.loadingWatchlist,getPopupContainer:function(t){return t.parentNode},maxTagCount:3},on:{change:e.handleMultiSymbolChangeWithAdd},model:{value:e.selectedSymbols,callback:function(t){e.selectedSymbols=t},expression:"selectedSymbols"}},[e._l(e.watchlist,function(t){return a("a-select-option",{key:"".concat(t.market,":").concat(t.symbol),attrs:{value:"".concat(t.market,":").concat(t.symbol)}},[a("div",{staticClass:"symbol-option"},[a("a-tag",{staticStyle:{"margin-right":"8px","margin-bottom":"0"},attrs:{color:e.getMarketColor(t.market)}},[e._v(" "+e._s(t.market)+" ")]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.symbol))]),t.name?a("span",{staticClass:"symbol-name-extra"},[e._v(e._s(t.name))]):e._e()],1)])}),a("a-select-option",{key:"__add_symbol_option__",staticClass:"add-symbol-option",attrs:{value:"__add_symbol_option__"}},[a("div",{staticStyle:{width:"100%","text-align":"center",padding:"4px 0",color:"#1890ff",cursor:"pointer"}},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"plus"}}),a("span",[e._v(e._s(e.$t("trading-assistant.form.addSymbol")))])],1)])],2),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.isEditMode?e.$t("trading-assistant.form.symbolHintCrypto"):e.$t("trading-assistant.form.symbolsHint"))+" ")])],1):e._e(),e.isAdvancedMode||e.editingStrategy?a("div",[a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:24,md:12,lg:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.initialCapital")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["initial_capital",{rules:[{required:!0,message:e.$t("trading-assistant.validation.initialCapitalRequired")}],initialValue:1e3}],expression:"['initial_capital', { rules: [{ required: true, message: $t('trading-assistant.validation.initialCapitalRequired') }], initialValue: 1000 }]"}],staticStyle:{width:"100%"},attrs:{min:10,step:100,precision:2}})],1)],1),a("a-col",{attrs:{xs:24,sm:24,md:12,lg:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.marketType")}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["market_type",{initialValue:"swap"}],expression:"['market_type', { initialValue: 'swap' }]"}],on:{change:e.handleMarketTypeChange}},[a("a-radio",{attrs:{value:"swap"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeFutures")))]),a("a-radio",{attrs:{value:"spot"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeSpot")))])],1),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.marketTypeHint"))+" ")])],1)],1)],1),a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:24,md:12,lg:12}},[a("a-form-item",{attrs:{label:"".concat(e.$t("trading-assistant.form.leverage")," (x)")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["leverage",{initialValue:5,rules:[{required:!0,message:e.$t("trading-assistant.validation.leverageRequired")}]}],expression:"['leverage', { initialValue: 5, rules: [{ required: true, message: $t('trading-assistant.validation.leverageRequired') }] }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:"spot"===e.form.getFieldValue("market_type")?1:125,step:1,disabled:"spot"===e.form.getFieldValue("market_type")}}),a("div",{staticClass:"form-item-hint"},["spot"===e.form.getFieldValue("market_type")?a("span",[e._v(" "+e._s(e.$t("trading-assistant.form.spotLeverageFixed"))+" ")]):a("span",[e._v(" "+e._s(e.$t("trading-assistant.form.leverageHint"))+" ")])])],1)],1),a("a-col",{attrs:{xs:24,sm:24,md:12,lg:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.tradeDirection")}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["trade_direction",{initialValue:"long"}],expression:"['trade_direction', { initialValue: 'long' }]"}],attrs:{disabled:"spot"===e.form.getFieldValue("market_type")}},[a("a-radio",{attrs:{value:"long"}},[e._v(e._s(e.$t("trading-assistant.form.tradeDirectionLong")))]),a("a-radio",{attrs:{value:"short",disabled:"spot"===e.form.getFieldValue("market_type")}},[e._v(" "+e._s(e.$t("trading-assistant.form.tradeDirectionShort"))+" ")]),a("a-radio",{attrs:{value:"both",disabled:"spot"===e.form.getFieldValue("market_type")}},[e._v(" "+e._s(e.$t("trading-assistant.form.tradeDirectionBoth"))+" ")])],1),"spot"===e.form.getFieldValue("market_type")?a("div",{staticClass:"form-item-hint",staticStyle:{color:"#ff9800"}},[e._v(" "+e._s(e.$t("trading-assistant.form.spotOnlyLongHint"))+" ")]):e._e()],1)],1)],1),a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:24,md:12,lg:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.klinePeriod")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["timeframe",{initialValue:"15m",rules:[{required:!0}]}],expression:"['timeframe', { initialValue: '15m', rules: [{ required: true }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.selectKlinePeriod"),getPopupContainer:function(t){return t.parentNode}}},[a("a-select-option",{attrs:{value:"1m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1m")))]),a("a-select-option",{attrs:{value:"5m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe5m")))]),a("a-select-option",{attrs:{value:"15m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe15m")))]),a("a-select-option",{attrs:{value:"30m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe30m")))]),a("a-select-option",{attrs:{value:"1H"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1H")))]),a("a-select-option",{attrs:{value:"4H"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe4H")))]),a("a-select-option",{attrs:{value:"1D"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1D")))])],1)],1)],1),a("a-col",{attrs:{xs:24,sm:24,md:12,lg:12}})],1)],1):e._e()],2)],1):e._e(),"script"===e.strategyMode?a("div",[a("a-form",{attrs:{form:e.form,layout:"vertical"}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.strategyName")}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["strategy_name",{rules:[{required:!0,message:e.$t("trading-assistant.validation.strategyNameRequired")}]}],expression:"['strategy_name', { rules: [{ required: true, message: $t('trading-assistant.validation.strategyNameRequired') }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.inputStrategyName")}})],1),a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.symbol")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["symbol",{rules:[{required:!0,message:e.$t("trading-assistant.validation.symbolRequired")}]}],expression:"['symbol', { rules: [{ required: true, message: $t('trading-assistant.validation.symbolRequired') }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.selectSymbol"),"show-search":"","filter-option":e.filterWatchlistOption,loading:e.loadingWatchlist,getPopupContainer:function(t){return t.parentNode}},on:{change:e.handleWatchlistSymbolChange}},e._l(e.watchlist,function(t){return a("a-select-option",{key:"".concat(t.market,":").concat(t.symbol),attrs:{value:"".concat(t.market,":").concat(t.symbol)}},[a("div",{staticClass:"symbol-option"},[a("a-tag",{staticStyle:{"margin-right":"8px","margin-bottom":"0"},attrs:{color:e.getMarketColor(t.market)}},[e._v(" "+e._s(t.market)+" ")]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.symbol))]),t.name?a("span",{staticClass:"symbol-name-extra"},[e._v(e._s(t.name))]):e._e()],1)])}),1)],1),a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.initialCapital")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["initial_capital",{initialValue:1e3,rules:[{required:!0}]}],expression:"['initial_capital', { initialValue: 1000, rules: [{ required: true }] }]"}],staticStyle:{width:"100%"},attrs:{min:10,step:100,precision:2}})],1)],1),a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.klinePeriod")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["timeframe",{initialValue:"15m",rules:[{required:!0}]}],expression:"['timeframe', { initialValue: '15m', rules: [{ required: true }] }]"}],attrs:{getPopupContainer:function(t){return t.parentNode}}},[a("a-select-option",{attrs:{value:"1m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1m")))]),a("a-select-option",{attrs:{value:"5m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe5m")))]),a("a-select-option",{attrs:{value:"15m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe15m")))]),a("a-select-option",{attrs:{value:"30m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe30m")))]),a("a-select-option",{attrs:{value:"1H"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1H")))]),a("a-select-option",{attrs:{value:"4H"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe4H")))]),a("a-select-option",{attrs:{value:"1D"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1D")))])],1)],1)],1)],1),a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.marketType")}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["market_type",{initialValue:"swap"}],expression:"['market_type', { initialValue: 'swap' }]"}]},[a("a-radio",{attrs:{value:"swap"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeFutures")))]),a("a-radio",{attrs:{value:"spot"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeSpot")))])],1)],1)],1),a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:"".concat(e.$t("trading-assistant.form.leverage")," (x)")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["leverage",{initialValue:5}],expression:"['leverage', { initialValue: 5 }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:125,step:1}})],1)],1)],1),a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.tradeDirection")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["trade_direction",{initialValue:"both"}],expression:"['trade_direction', { initialValue: 'both' }]"}],attrs:{getPopupContainer:function(t){return t.parentNode}}},[a("a-select-option",{attrs:{value:"long"}},[e._v(e._s(e.$t("trading-assistant.form.tradeDirectionLong")))]),a("a-select-option",{attrs:{value:"short"}},[e._v(e._s(e.$t("trading-assistant.form.tradeDirectionShort")))]),a("a-select-option",{attrs:{value:"both"}},[e._v(e._s(e.$t("trading-assistant.form.tradeDirectionBoth")))])],1)],1)],1),a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.commission")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["commission",{initialValue:.05}],expression:"['commission', { initialValue: 0.05 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:100,step:.01,precision:4}})],1)],1)],1),a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.slippage")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["slippage",{initialValue:0}],expression:"['slippage', { initialValue: 0 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:100,step:.01,precision:4}})],1)],1)],1)],1)],1):e._e()]),"script"===e.strategyMode?a("div",{directives:[{name:"show",rawName:"v-show",value:1===e.currentStep,expression:"currentStep === 1"}],staticClass:"step-content"},[a("strategy-editor",{ref:"strategyEditor",attrs:{"is-dark":e.isDarkTheme,"user-id":1,visible:e.showFormModal&&"script"===e.strategyMode&&1===e.currentStep,"initial-template-key":e.pendingScriptTemplateKey},model:{value:e.strategyCode,callback:function(t){e.strategyCode=t},expression:"strategyCode"}})],1):e._e(),a("div",{directives:[{name:"show",rawName:"v-show",value:"script"!==e.strategyMode&&1===e.currentStep,expression:"strategyMode !== 'script' && currentStep === 1"}],staticClass:"step-content"},["indicator"===e.strategyType?a("div",[a("a-form",{attrs:{form:e.form,layout:"vertical"}},[a("a-collapse",{staticClass:"strategy-params-collapse",attrs:{bordered:!1},model:{value:e.backtestCollapseKeys,callback:function(t){e.backtestCollapseKeys=t},expression:"backtestCollapseKeys"}},[a("a-collapse-panel",{key:"risk",attrs:{header:e.$t("dashboard.indicator.backtest.panel.risk")}},[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.stopLossPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["stop_loss_pct",{initialValue:3}],expression:"['stop_loss_pct', { initialValue: 3 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.01,precision:4}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.takeProfitPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["take_profit_pct",{initialValue:6}],expression:"['take_profit_pct', { initialValue: 6 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trailingEnabled")}},[a("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["trailing_enabled",{valuePropName:"checked",initialValue:!1}],expression:"['trailing_enabled', { valuePropName: 'checked', initialValue: false }]"}],on:{change:e.onTrailingToggle}})],1)],1),a("a-col",{attrs:{span:12}})],1),e.trailingEnabledUi?[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trailingStopPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trailing_stop_pct",{initialValue:0}],expression:"['trailing_stop_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.01,precision:4}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trailingActivationPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trailing_activation_pct",{initialValue:0}],expression:"['trailing_activation_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1)],1)]:e._e()],2),a("a-collapse-panel",{key:"scale",attrs:{header:e.$t("dashboard.indicator.backtest.panel.scale")}},[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendAddEnabled")}},[a("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_add_enabled",{valuePropName:"checked",initialValue:!1}],expression:"['trend_add_enabled', { valuePropName: 'checked', initialValue: false }]"}],on:{change:e.onTrendAddToggle}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.dcaAddEnabled")}},[a("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["dca_add_enabled",{valuePropName:"checked",initialValue:!1}],expression:"['dca_add_enabled', { valuePropName: 'checked', initialValue: false }]"}],on:{change:e.onDcaAddToggle}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendAddStepPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_add_step_pct",{initialValue:0}],expression:"['trend_add_step_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4},on:{change:e.onScaleParamsChange}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.dcaAddStepPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["dca_add_step_pct",{initialValue:0}],expression:"['dca_add_step_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4},on:{change:e.onScaleParamsChange}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendAddSizePct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_add_size_pct",{initialValue:0}],expression:"['trend_add_size_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4},on:{change:e.onScaleParamsChange}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.dcaAddSizePct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["dca_add_size_pct",{initialValue:0}],expression:"['dca_add_size_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4},on:{change:e.onScaleParamsChange}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendAddMaxTimes")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_add_max_times",{initialValue:0}],expression:"['trend_add_max_times', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:50,step:1,precision:0},on:{change:e.onScaleParamsChange}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.dcaAddMaxTimes")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["dca_add_max_times",{initialValue:0}],expression:"['dca_add_max_times', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:50,step:1,precision:0},on:{change:e.onScaleParamsChange}})],1)],1)],1)],1),a("a-collapse-panel",{key:"reduce",attrs:{header:e.$t("dashboard.indicator.backtest.panel.reduce")}},[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendReduceEnabled")}},[a("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_reduce_enabled",{valuePropName:"checked",initialValue:!1}],expression:"['trend_reduce_enabled', { valuePropName: 'checked', initialValue: false }]"}]})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.adverseReduceEnabled")}},[a("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverse_reduce_enabled",{valuePropName:"checked",initialValue:!1}],expression:"['adverse_reduce_enabled', { valuePropName: 'checked', initialValue: false }]"}]})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendReduceStepPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_reduce_step_pct",{initialValue:0}],expression:"['trend_reduce_step_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.adverseReduceStepPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverse_reduce_step_pct",{initialValue:0}],expression:"['adverse_reduce_step_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendReduceSizePct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_reduce_size_pct",{initialValue:0}],expression:"['trend_reduce_size_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.adverseReduceSizePct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverse_reduce_size_pct",{initialValue:0}],expression:"['adverse_reduce_size_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendReduceMaxTimes")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_reduce_max_times",{initialValue:0}],expression:"['trend_reduce_max_times', { initialValue: 0 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:50,step:1,precision:0}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.adverseReduceMaxTimes")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverse_reduce_max_times",{initialValue:0}],expression:"['adverse_reduce_max_times', { initialValue: 0 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:50,step:1,precision:0}})],1)],1)],1)],1),a("a-collapse-panel",{key:"position",attrs:{header:e.$t("dashboard.indicator.backtest.panel.position")}},[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.entryPct"),help:e.$t("dashboard.indicator.backtest.hint.entryPctMax",{maxPct:Number(e.entryPctMaxUi||0).toFixed(0)})}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["entry_pct",{initialValue:100}],expression:"['entry_pct', { initialValue: 100 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:e.entryPctMaxUi,step:.1,precision:4},on:{change:e.onEntryPctChange}})],1)],1),a("a-col",{attrs:{span:12}})],1)],1)],1),a("div",{staticClass:"ai-filter-box"},[a("div",{staticClass:"ai-filter-header"},[a("div",{staticClass:"ai-filter-title"},[a("a-icon",{attrs:{type:"robot"}}),a("span",[e._v(e._s(e.$t("trading-assistant.form.enableAiFilter")))])],1),a("a-switch",{attrs:{checked:e.aiFilterEnabledUi},on:{change:e.onAiFilterToggle}})],1),a("div",{staticClass:"ai-filter-hint"},[e._v(e._s(e.$t("trading-assistant.form.enableAiFilterHint")))])])],1)],1):e._e()]),a("div",{directives:[{name:"show",rawName:"v-show",value:2===e.currentStep,expression:"currentStep === 2"}],staticClass:"step-content"},[a("a-form",{attrs:{form:e.form,layout:"vertical",autocomplete:"off"}},[a("div",{staticClass:"execution-step-layout"},[a("div",{staticClass:"execution-step-hero"},[a("div",{staticClass:"simple-mode-kicker"},[e._v(e._s(e.$t("trading-assistant.form.step2HeroTitle")))]),a("div",{staticClass:"execution-step-hero-desc"},[e._v(e._s(e.$t("trading-assistant.form.step2HeroDesc")))])]),a("div",{staticClass:"execution-section-card"},[a("div",{staticClass:"section-block-title"},[a("span",[e._v(e._s(e.$t("trading-assistant.form.executionSectionTitle")))]),a("span",{staticClass:"section-block-desc"},[e._v(e._s(e.$t("trading-assistant.form.executionSectionDesc")))])]),a("a-form-item",{staticClass:"compact-form-item",attrs:{label:e.$t("trading-assistant.form.executionMode")}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["execution_mode",{initialValue:"signal"}],expression:"['execution_mode', { initialValue: 'signal' }]"}],staticStyle:{display:"none"}}),a("div",{staticClass:"execution-mode-cards"},[a("div",{class:["execution-mode-card",{active:"signal"===e.executionModeUi}],on:{click:function(t){return e.setExecutionModeUi("signal")}}},[a("div",{staticClass:"execution-mode-card-icon signal"},[a("a-icon",{attrs:{type:"notification"}})],1),a("div",{staticClass:"execution-mode-card-body"},[a("div",{staticClass:"execution-mode-card-title"},[e._v(e._s(e.$t("trading-assistant.form.executionModeSignal")))]),a("div",{staticClass:"execution-mode-card-desc"},[e._v(e._s(e.$t("trading-assistant.form.executionModeSignalDesc")))])]),"signal"===e.executionModeUi?a("a-icon",{staticClass:"execution-mode-card-check",attrs:{type:"check-circle",theme:"filled"}}):e._e()],1),a("div",{class:["execution-mode-card","live-card",{active:"live"===e.executionModeUi,disabled:!e.canUseLiveTrading}],on:{click:function(t){e.canUseLiveTrading&&e.setExecutionModeUi("live")}}},[a("div",{staticClass:"execution-mode-card-icon live"},[a("a-icon",{attrs:{type:"thunderbolt"}})],1),a("div",{staticClass:"execution-mode-card-body"},[a("div",{staticClass:"execution-mode-card-title"},[e._v(e._s(e.$t("trading-assistant.form.executionModeLive")))]),a("div",{staticClass:"execution-mode-card-desc"},[e._v(" "+e._s(e.canUseLiveTrading?e.$t("trading-assistant.form.executionModeLiveDesc"):e.$t("trading-assistant.form.liveTradingNotSupportedHint"))+" ")])]),"live"===e.executionModeUi&&e.canUseLiveTrading?a("a-icon",{staticClass:"execution-mode-card-check",attrs:{type:"check-circle",theme:"filled"}}):e._e()],1)]),e.canUseLiveTrading?e._e():a("div",{staticClass:"form-item-hint execution-warn-text"},[e._v(" "+e._s(e.$t("trading-assistant.form.liveTradingNotSupportedHint"))+" ")])],1),"live"===e.executionModeUi&&e.canUseLiveTrading?a("a-alert",{staticClass:"section-inline-alert",attrs:{type:"warning",showIcon:"",message:e.$t("trading-assistant.liveDisclaimer.title"),description:e.$t("trading-assistant.liveDisclaimer.content")}}):e._e()],1),a("div",{staticClass:"execution-section-card"},[a("div",{staticClass:"section-block-title"},[a("span",[e._v(e._s(e.$t("trading-assistant.form.notificationSectionTitle")))]),a("span",{staticClass:"section-block-desc"},[e._v(e._s(e.$t("trading-assistant.form.notificationSectionDesc")))])]),a("a-form-item",{staticClass:"compact-form-item",attrs:{label:e.$t("trading-assistant.form.notifyChannels")}},[a("a-checkbox-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["notify_channels",{initialValue:["browser"]}],expression:"['notify_channels', { initialValue: ['browser'] }]"}],staticClass:"notify-channel-grid",on:{change:e.onNotifyChannelsChange}},[a("a-checkbox",{attrs:{value:"browser"}},[e._v(e._s(e.$t("trading-assistant.notify.browser")))]),a("a-checkbox",{attrs:{value:"email"}},[e._v(e._s(e.$t("trading-assistant.notify.email")))]),a("a-checkbox",{attrs:{value:"telegram"}},[e._v(e._s(e.$t("trading-assistant.notify.telegram")))]),a("a-checkbox",{attrs:{value:"discord"}},[e._v(e._s(e.$t("trading-assistant.notify.discord")))]),a("a-checkbox",{attrs:{value:"webhook"}},[e._v(e._s(e.$t("trading-assistant.notify.webhook")))]),a("a-checkbox",{attrs:{value:"phone"}},[e._v(e._s(e.$t("trading-assistant.notify.phone")))])],1),a("div",{staticClass:"form-item-hint"},[e._v(e._s(e.$t("trading-assistant.form.notifyChannelsHint")))])],1),e.unconfiguredChannels.length>0?a("a-alert",{staticClass:"section-inline-alert",attrs:{type:"warning",showIcon:""},scopedSlots:e._u([{key:"message",fn:function(){return[a("span",[e._v(" "+e._s(e.$t("trading-assistant.form.notificationConfigMissing",{channels:e.unconfiguredChannels.join(", ")}))+" "),a("router-link",{staticStyle:{"margin-left":"8px"},attrs:{to:"/profile"}},[a("a-icon",{attrs:{type:"setting"}}),e._v(" "+e._s(e.$t("trading-assistant.form.goToProfile"))+" ")],1)],1)]},proxy:!0}],null,!1,2930252607)}):e.notifyChannelsUi.length>0&&!e.notifyChannelsUi.includes("browser")||e.notifyChannelsUi.length>1?a("a-alert",{staticClass:"section-inline-alert",attrs:{type:"info",showIcon:""},scopedSlots:e._u([{key:"message",fn:function(){return[a("span",[e._v(" "+e._s(e.$t("trading-assistant.form.notificationFromProfile"))+" "),a("router-link",{staticStyle:{"margin-left":"8px"},attrs:{to:"/profile"}},[a("a-icon",{attrs:{type:"setting"}}),e._v(" "+e._s(e.$t("trading-assistant.form.goToProfile"))+" ")],1)],1)]},proxy:!0}])}):e._e()],1),"live"===e.executionModeUi&&e.canUseLiveTrading?a("div",{staticClass:"execution-section-card"},[a("div",{staticClass:"section-block-title"},[a("span",[e._v(e._s(e.$t("trading-assistant.form.liveConnectionSectionTitle")))]),a("span",{staticClass:"section-block-desc"},[e._v(e._s(e.$t("trading-assistant.form.liveConnectionSectionDesc")))])]),a("a-alert",{staticClass:"section-inline-alert",staticStyle:{"margin-bottom":"16px"},attrs:{type:"warning","show-icon":"",message:e.$t("trading-assistant.form.liveTradingConfigTitle"),description:e.$t("trading-assistant.form.liveTradingConfigHint")}}),a("a-form-item",{staticClass:"compact-form-item",attrs:{label:e.$t("trading-assistant.form.savedCredential")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["credential_id",{rules:[{required:!0,message:e.$t("profile.exchange.noCredentialHint")}],getValueFromEvent:function(t){return t||void 0}}],expression:"['credential_id', {\n rules: [{ required: true, message: $t('profile.exchange.noCredentialHint') }],\n getValueFromEvent: (val) => val || undefined\n }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.selectSavedCredential"),"allow-clear":"","show-search":"","option-filter-prop":"children",loading:e.loadingExchangeCredentials},on:{change:e.handleCredentialSelectChange}},e._l(e.filteredExchangeCredentials,function(t){return a("a-select-option",{key:t.id,attrs:{value:t.id}},[e._v(" "+e._s(e.formatCredentialLabel(t))+" ")])}),1),a("div",{staticClass:"form-item-hint ta-credential-actions",staticStyle:{"margin-top":"6px"}},[a("a-button",{staticClass:"ta-add-cred-btn",attrs:{type:"link",size:"small"},on:{click:function(t){e.showExchangeAccountModal=!0}}},[a("a-icon",{attrs:{type:"plus-circle"}}),e._v(" "+e._s(e.$t("quickTrade.addAccountInline"))+" ")],1),a("span",{staticClass:"ta-credential-actions-sep"},[e._v("·")]),a("router-link",{attrs:{to:"/profile?tab=exchange"}},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"setting"}}),e._v(e._s(e.$t("profile.exchange.goToManage"))+" ")],1)],1),"live"===e.executionModeUi&&e.canUseLiveTrading&&!e.loadingExchangeCredentials&&0===e.filteredExchangeCredentials.length?a("a-alert",{staticStyle:{"margin-top":"10px"},attrs:{type:"warning","show-icon":"",message:e.$t("trading-assistant.noCredentialForLive.title")}},[a("template",{slot:"description"},[a("span",[e._v(e._s(e.$t("trading-assistant.noCredentialForLive.desc")))]),a("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary",size:"small"},on:{click:function(t){e.showExchangeAccountModal=!0}}},[e._v(" "+e._s(e.$t("quickTrade.addAccountInline"))+" ")])],1)],2):e._e()],1)],1):e._e()])])],1)])],1),a("template",{slot:"footer"},[a("a-button",{on:{click:e.handleCloseModal}},[e._v(e._s(e.$t("trading-assistant.form.cancel")))]),a("a-button",{directives:[{name:"show",rawName:"v-show",value:e.currentStep>0,expression:"currentStep > 0"}],on:{click:e.handlePrev}},[e._v(" "+e._s(e.$t("trading-assistant.form.prev"))+" ")]),a("a-button",{directives:[{name:"show",rawName:"v-show",value:e.currentStep<2,expression:"currentStep < 2"}],attrs:{type:"primary",loading:e.saving},on:{click:e.handleNext}},[e._v(" "+e._s(e.$t("trading-assistant.form.next"))+" ")]),a("a-button",{directives:[{name:"show",rawName:"v-show",value:2===e.currentStep,expression:"currentStep === 2"}],attrs:{type:"primary",loading:e.saving},on:{click:e.handleSubmit}},[e._v(" "+e._s(e.editingStrategy?e.$t("trading-assistant.form.confirmEdit"):e.$t("trading-assistant.form.confirmCreate"))+" ")])],1)],2),a("a-modal",{attrs:{title:e.$t("trading-assistant.form.addSymbolTitle"),visible:e.showAddSymbolModal,confirmLoading:e.addingSymbol,width:"600px",okText:e.$t("trading-assistant.form.confirmAdd"),cancelText:e.$t("trading-assistant.form.cancel"),maskClosable:!1,keyboard:!1},on:{ok:e.handleConfirmAddSymbol,cancel:e.handleCloseAddSymbolModal}},[a("div",{staticClass:"add-symbol-modal-content"},[a("a-tabs",{staticClass:"market-tabs",on:{change:e.handleAddSymbolMarketChange},model:{value:e.addSymbolMarket,callback:function(t){e.addSymbolMarket=t},expression:"addSymbolMarket"}},e._l(e.addSymbolMarketTypes,function(t){return a("a-tab-pane",{key:t.value,attrs:{tab:e.$t(t.i18nKey||"dashboard.analysis.market.".concat(t.value))}})}),1),a("div",{staticClass:"symbol-search-section"},[a("a-input-search",{attrs:{placeholder:e.$t("dashboard.analysis.modal.addStock.searchOrInputPlaceholder"),loading:e.searchingSymbol,size:"large","allow-clear":""},on:{search:e.handleSearchSymbol,change:e.handleSymbolSearchInputChange},model:{value:e.addSymbolKeyword,callback:function(t){e.addSymbolKeyword=t},expression:"addSymbolKeyword"}},[a("a-button",{attrs:{slot:"enterButton",type:"primary",icon:"search"},slot:"enterButton"},[e._v(" "+e._s(e.$t("dashboard.analysis.modal.addStock.search"))+" ")])],1)],1),e.symbolSearchResults.length>0?a("div",{staticClass:"search-results-section"},[a("div",{staticClass:"section-title"},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"search"}}),e._v(" "+e._s(e.$t("dashboard.analysis.modal.addStock.searchResults"))+" ")],1),a("a-list",{staticClass:"symbol-list",attrs:{"data-source":e.symbolSearchResults,loading:e.searchingSymbol,size:"small"},scopedSlots:e._u([{key:"renderItem",fn:function(t){return a("a-list-item",{staticClass:"symbol-list-item",on:{click:function(a){return e.handleSelectAddSymbol(t)}}},[a("a-list-item-meta",[a("template",{slot:"title"},[a("div",{staticClass:"symbol-item-content"},[a("span",{staticClass:"symbol-code"},[e._v(e._s(t.symbol))]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.name))]),t.exchange?a("a-tag",{staticStyle:{"margin-left":"8px"},attrs:{size:"small",color:"blue"}},[e._v(" "+e._s(t.exchange)+" ")]):e._e()],1)])],2)],1)}}],null,!1,2801225082)})],1):e._e(),a("div",{staticClass:"hot-symbols-section"},[a("div",{staticClass:"section-title"},[a("a-icon",{staticStyle:{color:"#ff4d4f","margin-right":"4px"},attrs:{type:"fire"}}),e._v(" "+e._s(e.$t("dashboard.analysis.modal.addStock.hotSymbols"))+" ")],1),a("a-spin",{attrs:{spinning:e.loadingHotSymbols}},[e.hotSymbols.length>0?a("a-list",{staticClass:"symbol-list",attrs:{"data-source":e.hotSymbols,size:"small"},scopedSlots:e._u([{key:"renderItem",fn:function(t){return a("a-list-item",{staticClass:"symbol-list-item",on:{click:function(a){return e.handleSelectAddSymbol(t)}}},[a("a-list-item-meta",[a("template",{slot:"title"},[a("div",{staticClass:"symbol-item-content"},[a("span",{staticClass:"symbol-code"},[e._v(e._s(t.symbol))]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.name))]),t.exchange?a("a-tag",{staticStyle:{"margin-left":"8px"},attrs:{size:"small",color:"orange"}},[e._v(" "+e._s(t.exchange)+" ")]):e._e()],1)])],2)],1)}}],null,!1,3959834868)}):a("a-empty",{attrs:{description:e.$t("dashboard.analysis.modal.addStock.noHotSymbols"),image:!1}})],1)],1),e.selectedAddSymbol?a("div",{staticClass:"selected-symbol-section"},[a("div",{staticClass:"section-title"},[a("a-icon",{staticStyle:{color:"#52c41a","margin-right":"4px"},attrs:{type:"check-circle"}}),e._v(" "+e._s(e.$t("dashboard.analysis.modal.addStock.selectedSymbol"))+" ")],1),a("div",{staticClass:"selected-symbol-info"},[a("a-tag",{staticStyle:{"margin-right":"8px"},attrs:{color:e.getMarketColor(e.addSymbolMarket)}},[e._v(e._s(e.addSymbolMarket))]),a("span",{staticClass:"symbol-code"},[e._v(e._s(e.selectedAddSymbol.symbol))]),e.selectedAddSymbol.name?a("span",{staticClass:"symbol-name"},[e._v(e._s(e.selectedAddSymbol.name))]):e._e()],1)]):e._e()],1)])],1)],1),a("exchange-account-modal",{attrs:{visible:e.showExchangeAccountModal},on:{"update:visible":function(t){e.showExchangeAccountModal=t},success:e.handleExchangeAccountCreated}})],1)},i=[],r=a(15863),n=a(44735),o=a(81127),l=a(56252),c=a(2403),d=a(57532),u=a(76338),p=(a(2008),a(50113),a(23418),a(62062),a(34782),a(26910),a(79432),a(26099),a(16034),a(31415),a(47764),a(42762),a(23500),a(62953),a(36911)),m=a(35038),g=a(42430),h=a(84841),_=a(55434),y=a(75769),f=function(){var t=this,e=t._self._c;return e("div",{staticClass:"trading-records strategy-tab-pane-inner",class:{"theme-dark":t.isDark}},[0!==t.records.length||t.loading?e("a-table",{attrs:{columns:t.columns,"data-source":t.records,loading:t.loading,pagination:{pageSize:10},size:"small",rowKey:"id",scroll:{x:800}},scopedSlots:t._u([{key:"type",fn:function(a){return[e("a-tag",{attrs:{color:t.getTradeTypeColor(a)}},[t._v(" "+t._s(t.getTradeTypeText(a))+" ")])]}},{key:"price",fn:function(e){return[t._v(" $"+t._s(parseFloat(e).toFixed(4))+" ")]}},{key:"amount",fn:function(e){return[t._v(" "+t._s(parseFloat(e).toFixed(4))+" ")]}},{key:"value",fn:function(e){return[t._v(" $"+t._s(parseFloat(e).toFixed(2))+" ")]}},{key:"profit",fn:function(a,s){return[e("span",{style:{color:a>0?"#52c41a":a<0?"#f5222d":"#666"}},[t._v(" "+t._s(t.formatProfit(a,s))+" ")])]}},{key:"commission",fn:function(e){return[t._v(" "+t._s(t.formatCommission(e))+" ")]}},{key:"time",fn:function(e,a){return[t._v(" "+t._s(t.formatTime(a.created_at||e))+" ")]}}])}):e("div",{staticClass:"empty-state strategy-tab-empty"},[e("a-empty",{attrs:{description:t.$t("trading-assistant.table.noPositions")}})],1)],1)},v=[],b=(a(27495),{name:"TradingRecords",props:{strategyId:{type:Number,required:!0},loading:{type:Boolean,default:!1},isDark:{type:Boolean,default:!1}},computed:{columns:function(){return[{title:this.$t("trading-assistant.table.time"),dataIndex:"created_at",key:"created_at",width:180,scopedSlots:{customRender:"time"}},{title:this.$t("dashboard.indicator.backtest.tradeType"),dataIndex:"type",key:"type",width:140,scopedSlots:{customRender:"type"}},{title:this.$t("trading-assistant.table.price"),dataIndex:"price",key:"price",width:120,scopedSlots:{customRender:"price"}},{title:this.$t("trading-assistant.table.amount"),dataIndex:"amount",key:"amount",width:120,scopedSlots:{customRender:"amount"}},{title:this.$t("trading-assistant.table.value"),dataIndex:"value",key:"value",width:120,scopedSlots:{customRender:"value"}},{title:this.$t("dashboard.indicator.backtest.profit"),dataIndex:"profit",key:"profit",width:120,scopedSlots:{customRender:"profit"}},{title:this.$t("trading-assistant.table.commission"),dataIndex:"commission",key:"commission",width:100,scopedSlots:{customRender:"commission"}}]}},data:function(){return{records:[]}},watch:{strategyId:{handler:function(t){t&&this.loadRecords()},immediate:!0}},methods:{loadRecords:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.strategyId){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,(0,p.tq)(t.strategyId);case 2:a=e.v,1===a.code?t.records=(a.data.trades||[]).map(function(t){return(0,u.A)((0,u.A)({},t),{},{time:t.created_at||t.time})}):t.$message.error(a.msg||t.$t("trading-assistant.messages.loadTradesFailed")),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[1,3]])}))()},formatTime:function(t){if(!t)return"--";try{var e;if("number"===typeof t){var a=t<1e12?1e3*t:t;e=new Date(a)}else{if("string"!==typeof t)return"--";if(/^\d+$/.test(t)){var s=parseInt(t,10),i=s<1e12?1e3*s:s;e=new Date(i)}else e=new Date(t)}if(isNaN(e.getTime()))return"--";var r=this.$i18n.locale||"zh-CN",n={"zh-CN":"zh-CN","zh-TW":"zh-TW","en-US":"en-US"};return e.toLocaleString(n[r]||"zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}catch(o){return"--"}},getTradeTypeColor:function(t){var e={buy:"green",sell:"red",liquidation:"orange",open_long:"green",add_long:"cyan",close_long:"orange",close_long_stop:"red",close_long_profit:"lime",open_short:"red",add_short:"magenta",close_short:"blue",close_short_stop:"red",close_short_profit:"cyan"};return e[t]||"default"},getTradeTypeText:function(t){var e={buy:this.$t("dashboard.indicator.backtest.buy"),sell:this.$t("dashboard.indicator.backtest.sell"),liquidation:this.$t("dashboard.indicator.backtest.liquidation"),open_long:this.$t("dashboard.indicator.backtest.openLong"),add_long:this.$t("dashboard.indicator.backtest.addLong"),close_long:this.$t("dashboard.indicator.backtest.closeLong"),close_long_stop:this.$t("dashboard.indicator.backtest.closeLongStop"),close_long_profit:this.$t("dashboard.indicator.backtest.closeLongProfit"),open_short:this.$t("dashboard.indicator.backtest.openShort"),add_short:this.$t("dashboard.indicator.backtest.addShort"),close_short:this.$t("dashboard.indicator.backtest.closeShort"),close_short_stop:this.$t("dashboard.indicator.backtest.closeShortStop"),close_short_profit:this.$t("dashboard.indicator.backtest.closeShortProfit")};return e[t]||t},formatMoney:function(t){if(null===t||void 0===t)return"--";var e=t>=0?"+":"-";return"".concat(e,"$").concat(Math.abs(t).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}))},formatProfit:function(t,e){if(null===t||void 0===t)return"--";var a=parseFloat(t),s=["open_long","open_short","add_long","add_short"];return 0===a&&e&&s.includes(e.type)?"--":Math.abs(a)<1e-6?e&&s.includes(e.type)?"--":"$0.00":this.formatMoney(a)},formatCommission:function(t){if(null===t||void 0===t)return"--";var e=parseFloat(t);return isNaN(e)||Math.abs(e)<1e-6?"--":"$".concat(e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:6}))}}}),x=b,C=a(845),k=(0,C.A)(x,f,v,!1,null,"bdf54cd6",null),S=k.exports,w=function(){var t=this,e=t._self._c;return e("div",{staticClass:"position-records strategy-tab-pane-inner",class:{"theme-dark":t.isDark}},[0!==t.positions.length||t.loading?e("a-table",{attrs:{columns:t.columns,"data-source":t.positions,loading:t.loading,pagination:!1,size:"small",rowKey:"id",scroll:{x:800}},scopedSlots:t._u([{key:"symbol",fn:function(a,s){return[e("strong",[t._v(t._s(s.symbol||a))])]}},{key:"side",fn:function(a,s){return[e("a-tag",{attrs:{color:"long"===(s.side||a)?"green":"red"}},[t._v(" "+t._s("long"===(s.side||a)?t.$t("trading-assistant.table.long"):t.$t("trading-assistant.table.short"))+" ")])]}},{key:"entryPrice",fn:function(a,s){return[t.hasValidPrice(s.entry_price||a)?e("span",[t._v(" $"+t._s(parseFloat(s.entry_price||a).toFixed(4))+" ")]):e("span",[t._v("--")])]}},{key:"currentPrice",fn:function(e,a){return[t._v(" $"+t._s(parseFloat(a.current_price||e||0).toFixed(4))+" ")]}},{key:"size",fn:function(e,a){return[t._v(" "+t._s(parseFloat(a.size||e||0).toFixed(4))+" ")]}},{key:"unrealizedPnl",fn:function(a,s){return[e("span",{class:{profit:parseFloat(s.unrealized_pnl||a||0)>0,loss:parseFloat(s.unrealized_pnl||a||0)<0}},[t._v(" $"+t._s(parseFloat(s.unrealized_pnl||a||0).toFixed(2))+" ")])]}},{key:"pnlPercent",fn:function(a,s){return[e("span",{class:{profit:parseFloat(s.pnl_percent||a||0)>0,loss:parseFloat(s.pnl_percent||a||0)<0}},[t._v(" "+t._s(parseFloat(s.pnl_percent||a||0).toFixed(2))+"% ")])]}}])}):e("div",{staticClass:"empty-state strategy-tab-empty"},[e("a-empty",{attrs:{description:t.$t("trading-assistant.table.noPositions")}})],1)],1)},$=[],A=(a(25428),a(38781),{name:"PositionRecords",props:{strategyId:{type:Number,required:!0},marketType:{type:String,default:"swap"},leverage:{type:[Number,String],default:1},loading:{type:Boolean,default:!1},isDark:{type:Boolean,default:!1}},data:function(){return{positions:[]}},computed:{columns:function(){return[{title:this.$t("trading-assistant.table.symbol"),dataIndex:"symbol",key:"symbol",width:120,scopedSlots:{customRender:"symbol"}},{title:this.$t("trading-assistant.table.side"),dataIndex:"side",key:"side",width:80,scopedSlots:{customRender:"side"}},{title:this.$t("trading-assistant.table.size"),dataIndex:"size",key:"size",width:120,scopedSlots:{customRender:"size"}},{title:this.$t("trading-assistant.table.entryPrice"),dataIndex:"entry_price",key:"entry_price",width:120,scopedSlots:{customRender:"entryPrice"}},{title:this.$t("trading-assistant.table.currentPrice"),dataIndex:"current_price",key:"current_price",width:120,scopedSlots:{customRender:"currentPrice"}},{title:this.$t("trading-assistant.table.unrealizedPnl"),dataIndex:"unrealized_pnl",key:"unrealized_pnl",width:120,scopedSlots:{customRender:"unrealizedPnl"}},{title:this.$t("trading-assistant.table.pnlPercent"),dataIndex:"pnl_percent",key:"pnl_percent",width:100,scopedSlots:{customRender:"pnlPercent"}}]}},watch:{strategyId:{handler:function(t){t?(this.loadPositions(),this.startPolling()):this.stopPolling()},immediate:!0}},beforeDestroy:function(){this.stopPolling()},methods:{loadPositions:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.strategyId){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,(0,p.oK)(t.strategyId);case 2:a=e.v,1===a.code?(s=a.data.positions||[],t.positions=s.map(function(e,a){var s=String(t.marketType||"swap").toLowerCase(),i=parseFloat(t.leverage);(!isFinite(i)||i<=0)&&(i=1),"spot"===s&&(i=1);var r=parseFloat(e.entry_price||e.entryPrice||0),n=parseFloat(e.size||"0")||0,o=parseFloat(e.unrealized_pnl||e.unrealizedPnl||"0")||0,l=parseFloat(e.pnl_percent||e.pnlPercent||"0")||0;r>0&&n>0?l=o/(r*n)*100*i:"spot"!==s&&(l*=i);var c={id:e.id||a,symbol:e.symbol||"",side:e.side||"long",size:n>0?n.toString():"0",entry_price:r>0?r.toString():"0",current_price:e.current_price||e.currentPrice||"0",unrealized_pnl:e.unrealized_pnl||e.unrealizedPnl||"0",pnl_percent:l,updated_at:e.updated_at||e.updatedAt||""};return c})):t.positions=[],e.n=4;break;case 3:e.p=3,e.v,t.positions=[];case 4:return e.a(2)}},e,null,[[1,3]])}))()},hasValidPrice:function(t){var e=parseFloat(t);return Number.isFinite(e)&&e>0},startPolling:function(){var t=this;this.stopPolling(),this.pollingTimer=setInterval(function(){t.loadPositions()},5e3)},stopPolling:function(){this.pollingTimer&&(clearInterval(this.pollingTimer),this.pollingTimer=null)}}}),T=A,P=(0,C.A)(T,w,$,!1,null,"6ba7d922",null),M=P.exports,I=function(){var t=this,e=t._self._c;return e("div",{staticClass:"strategy-type-selector",class:{"theme-dark":t.isDark}},[e("div",{staticClass:"selector-header"},[e("h3",[t._v(t._s(t.$t("trading-assistant.selectMode")))]),e("p",{staticClass:"selector-hint"},[t._v(t._s(t.$t("trading-assistant.selectModeHint")))])]),e("div",{staticClass:"mode-cards"},[e("div",{staticClass:"mode-card",class:{selected:"signal"===t.selected},on:{click:function(e){return t.$emit("select","signal")}}},[e("div",{staticClass:"card-icon signal-icon"},[e("a-icon",{attrs:{type:"line-chart"}})],1),e("div",{staticClass:"card-body"},[e("div",{staticClass:"card-badge-row"},[e("span",{staticClass:"card-badge"},[t._v(t._s(t.$t("trading-assistant.strategyMode.signalBadge")))])]),e("h4",[t._v(t._s(t.$t("trading-assistant.strategyMode.signal")))]),e("p",{staticClass:"card-desc"},[t._v(t._s(t.$t("trading-assistant.strategyMode.signalDesc")))]),e("ul",{staticClass:"card-features"},[e("li",[e("a-icon",{attrs:{type:"check"}}),t._v(" "+t._s(t.$t("trading-assistant.strategyMode.signalFeature1")))],1),e("li",[e("a-icon",{attrs:{type:"check"}}),t._v(" "+t._s(t.$t("trading-assistant.strategyMode.signalFeature2")))],1),e("li",[e("a-icon",{attrs:{type:"check"}}),t._v(" "+t._s(t.$t("trading-assistant.strategyMode.signalFeature3")))],1)])]),e("a-button",{staticClass:"card-btn",attrs:{type:"primary",ghost:""},on:{click:function(e){return e.stopPropagation(),t.$emit("select","signal")}}},[t._v(" "+t._s(t.$t("trading-assistant.useThisMode"))+" ")])],1),e("div",{staticClass:"mode-card",class:{selected:"script"===t.selected},on:{click:function(e){return t.$emit("select","script")}}},[e("div",{staticClass:"card-icon script-icon"},[e("a-icon",{attrs:{type:"code"}})],1),e("div",{staticClass:"card-body"},[e("div",{staticClass:"card-badge-row"},[e("span",{staticClass:"card-badge card-badge--script"},[t._v(t._s(t.$t("trading-assistant.strategyMode.scriptBadge")))])]),e("h4",[t._v(t._s(t.$t("trading-assistant.strategyMode.script")))]),e("p",{staticClass:"card-desc"},[t._v(t._s(t.$t("trading-assistant.strategyMode.scriptDesc")))]),e("ul",{staticClass:"card-features"},[e("li",[e("a-icon",{attrs:{type:"check"}}),t._v(" "+t._s(t.$t("trading-assistant.strategyMode.scriptFeature1")))],1),e("li",[e("a-icon",{attrs:{type:"check"}}),t._v(" "+t._s(t.$t("trading-assistant.strategyMode.scriptFeature2")))],1),e("li",[e("a-icon",{attrs:{type:"check"}}),t._v(" "+t._s(t.$t("trading-assistant.strategyMode.scriptFeature3")))],1)])]),e("a-button",{staticClass:"card-btn",attrs:{type:"primary",ghost:""},on:{click:function(e){return e.stopPropagation(),t.$emit("select","script")}}},[t._v(" "+t._s(t.$t("trading-assistant.useThisMode"))+" ")])],1)]),e("div",{staticClass:"template-quick-start"},[e("a-divider",[e("span",{staticClass:"divider-text"},[t._v(t._s(t.$t("trading-assistant.fromTemplate")))])]),e("div",{staticClass:"template-tags"},t._l(t.templates,function(a){return e("a-tag",{key:a.key,staticClass:"template-tag",on:{click:function(e){return t.$emit("use-template",a.key)}}},[e("span",{staticClass:"tpl-icon"},[t._v(t._s(a.icon))]),t._v(" "+t._s(t.$t("trading-assistant.template.".concat(a.key)))+" ")])}),1)],1)])},F=[],N=(a(84864),a(25440),[{key:"trendFollowing",icon:"📈",code:"\"\"\"\nTrend Following Strategy\nUses EMA crossover with dynamic stop-loss / take-profit.\n\"\"\"\n\ndef on_init(ctx):\n ctx.fast_period = ctx.param('fast_period', 12)\n ctx.slow_period = ctx.param('slow_period', 26)\n ctx.position_pct = ctx.param('position_pct', 0.95)\n ctx.stop_pct = ctx.param('stop_pct', 0.03)\n ctx.take_profit_pct = ctx.param('take_profit_pct', 0.08)\n\ndef on_bar(ctx, bar):\n bars = ctx.bars(ctx.slow_period + 5)\n if len(bars) < ctx.slow_period:\n return\n\n closes = [b['close'] for b in bars]\n fast_ema = _ema(closes, ctx.fast_period)\n slow_ema = _ema(closes, ctx.slow_period)\n price = bar['close']\n\n if fast_ema > slow_ema and not ctx.position:\n qty = (ctx.equity * ctx.position_pct) / price\n ctx.buy(price, qty)\n ctx.log(f\"BUY at {price:.2f}\")\n\n elif fast_ema < slow_ema and ctx.position and ctx.position['side'] == 'long':\n ctx.close_position()\n ctx.log(f\"SELL at {price:.2f}\")\n\n if ctx.position and ctx.position['side'] == 'long':\n entry = ctx.position['entry_price']\n pnl_pct = (price - entry) / entry\n if pnl_pct <= -ctx.stop_pct:\n ctx.close_position()\n ctx.log(f\"STOP LOSS at {price:.2f}\")\n elif pnl_pct >= ctx.take_profit_pct:\n ctx.close_position()\n ctx.log(f\"TAKE PROFIT at {price:.2f}\")\n\ndef _ema(data, period):\n k = 2 / (period + 1)\n ema = data[0]\n for price in data[1:]:\n ema = price * k + ema * (1 - k)\n return ema\n",params:[{name:"fast_period",type:"integer",default:12,min:2,max:120,step:1},{name:"slow_period",type:"integer",default:26,min:5,max:240,step:1},{name:"position_pct",type:"percent",default:.95,min:.05,max:1,step:.01},{name:"stop_pct",type:"percent",default:.03,min:.001,max:.5,step:.001},{name:"take_profit_pct",type:"percent",default:.08,min:.001,max:1,step:.001}]},{key:"martingale",icon:"🔥",code:"\"\"\"\nMartingale Strategy\nDouble position on each loss, with max layer control.\n\"\"\"\n\ndef on_init(ctx):\n ctx.base_amount = ctx.param('base_amount', 100)\n ctx.max_layers = ctx.param('max_layers', 5)\n ctx.multiplier = ctx.param('multiplier', 2.0)\n ctx.take_profit_pct = ctx.param('take_profit_pct', 0.02)\n ctx.stop_loss_pct = ctx.param('stop_loss_pct', 0.04)\n ctx.cooldown_bars = ctx.param('cooldown_bars', 1)\n ctx.current_layer = 0\n ctx.cooldown = 0\n\ndef on_bar(ctx, bar):\n if ctx.cooldown > 0:\n ctx.cooldown -= 1\n return\n\n price = bar['close']\n if not ctx.position:\n amount = ctx.base_amount * (ctx.multiplier ** ctx.current_layer)\n if amount <= ctx.balance:\n qty = amount / price\n ctx.buy(price, qty)\n ctx.log(f\"Layer {ctx.current_layer}: BUY {qty:.4f} at {price:.2f}\")\n else:\n entry = ctx.position['entry_price']\n pnl_pct = (price - entry) / entry\n\n if pnl_pct >= ctx.take_profit_pct:\n ctx.close_position()\n ctx.current_layer = 0\n ctx.cooldown = ctx.cooldown_bars\n ctx.log(f\"TAKE PROFIT at {price:.2f}, reset layers\")\n\n elif pnl_pct <= -ctx.stop_loss_pct:\n ctx.close_position()\n ctx.cooldown = ctx.cooldown_bars\n if ctx.current_layer < ctx.max_layers:\n ctx.current_layer += 1\n ctx.log(f\"LOSS, escalate to layer {ctx.current_layer}\")\n else:\n ctx.current_layer = 0\n ctx.log(\"Max layers reached, reset\")\n",params:[{name:"base_amount",type:"number",default:100,min:10,max:1e6,step:10},{name:"max_layers",type:"integer",default:5,min:1,max:20,step:1},{name:"multiplier",type:"number",default:2,min:1,max:5,step:.1},{name:"take_profit_pct",type:"percent",default:.02,min:.001,max:1,step:.001},{name:"stop_loss_pct",type:"percent",default:.04,min:.001,max:1,step:.001},{name:"cooldown_bars",type:"integer",default:1,min:0,max:500,step:1}]},{key:"grid",icon:"📐",code:"\"\"\"\nGrid Trading Strategy\nPlaces buy/sell orders at equal intervals within a price range.\n\"\"\"\n\ndef on_init(ctx):\n ctx.grid_upper = ctx.param('grid_upper', 70000)\n ctx.grid_lower = ctx.param('grid_lower', 60000)\n ctx.grid_levels = ctx.param('grid_levels', 10)\n ctx.order_amount = ctx.param('order_amount', 100)\n ctx.take_profit_pct = ctx.param('take_profit_pct', 0.05)\n ctx.stop_loss_pct = ctx.param('stop_loss_pct', 0.03)\n ctx.filled_grids = set()\n\n spacing = (ctx.grid_upper - ctx.grid_lower) / ctx.grid_levels\n ctx.grid_prices = [ctx.grid_lower + i * spacing for i in range(ctx.grid_levels + 1)]\n\ndef on_bar(ctx, bar):\n price = bar['close']\n if price < ctx.grid_lower or price > ctx.grid_upper:\n return\n\n if ctx.position and ctx.position['side'] == 'long':\n entry = ctx.position['entry_price']\n pnl_pct = (price - entry) / entry\n if pnl_pct >= ctx.take_profit_pct or pnl_pct <= -ctx.stop_loss_pct:\n ctx.close_position()\n ctx.filled_grids.clear()\n ctx.log(f\"Grid risk exit at {price:.2f}, pnl={pnl_pct:.2%}\")\n return\n\n for i, gp in enumerate(ctx.grid_prices[:-1]):\n upper_gp = ctx.grid_prices[i + 1]\n grid_id = f\"grid_{i}\"\n\n if price <= gp and grid_id not in ctx.filled_grids:\n qty = ctx.order_amount / price\n ctx.buy(price, qty)\n ctx.filled_grids.add(grid_id)\n ctx.log(f\"Grid BUY at {price:.2f} (level {i})\")\n\n elif price >= upper_gp and grid_id in ctx.filled_grids:\n qty = ctx.order_amount / price\n ctx.sell(price, qty)\n ctx.filled_grids.discard(grid_id)\n ctx.log(f\"Grid SELL at {price:.2f} (level {i})\")\n",params:[{name:"grid_upper",type:"number",default:7e4,min:1,max:1e8,step:10},{name:"grid_lower",type:"number",default:6e4,min:1,max:1e8,step:10},{name:"grid_levels",type:"integer",default:10,min:2,max:200,step:1},{name:"order_amount",type:"number",default:100,min:1,max:1e6,step:1},{name:"take_profit_pct",type:"percent",default:.05,min:.001,max:1,step:.001},{name:"stop_loss_pct",type:"percent",default:.03,min:.001,max:1,step:.001}]},{key:"dca",icon:"💰",code:"\"\"\"\nDCA (Dollar Cost Averaging) Strategy\nPeriodic purchases with optional dip-buying.\n\"\"\"\n\ndef on_init(ctx):\n ctx.buy_amount = ctx.param('buy_amount', 100)\n ctx.dip_threshold = ctx.param('dip_threshold', 0.05)\n ctx.dip_multiplier = ctx.param('dip_multiplier', 2.0)\n ctx.buy_interval = ctx.param('buy_interval', 24)\n ctx.max_orders = ctx.param('max_orders', 999)\n ctx.bar_count = 0\n ctx.order_count = 0\n ctx.last_buy_price = None\n\ndef on_bar(ctx, bar):\n ctx.bar_count += 1\n price = bar['close']\n\n if ctx.order_count >= ctx.max_orders:\n return\n\n is_dip = False\n if ctx.last_buy_price and price < ctx.last_buy_price * (1 - ctx.dip_threshold):\n is_dip = True\n\n if ctx.bar_count % ctx.buy_interval == 0 or is_dip:\n amount = ctx.buy_amount * (ctx.dip_multiplier if is_dip else 1.0)\n if amount <= ctx.balance:\n qty = amount / price\n ctx.buy(price, qty)\n ctx.last_buy_price = price\n ctx.order_count += 1\n tag = \" (DIP BUY)\" if is_dip else \"\"\n ctx.log(f\"DCA BUY {qty:.6f} at {price:.2f}{tag}\")\n",params:[{name:"buy_amount",type:"number",default:100,min:1,max:1e6,step:1},{name:"buy_interval",type:"integer",default:24,min:1,max:1e3,step:1},{name:"dip_threshold",type:"percent",default:.05,min:.001,max:1,step:.001},{name:"dip_multiplier",type:"number",default:2,min:1,max:10,step:.1},{name:"max_orders",type:"integer",default:999,min:1,max:9999,step:1}]},{key:"meanReversion",icon:"🔄",code:"\"\"\"\nMean Reversion Strategy\nBollinger Bands based: buy at lower band, sell at upper band.\n\"\"\"\n\ndef on_init(ctx):\n ctx.period = ctx.param('period', 20)\n ctx.std_mult = ctx.param('std_mult', 2.0)\n ctx.position_pct = ctx.param('position_pct', 0.5)\n ctx.take_profit_pct = ctx.param('take_profit_pct', 0.03)\n ctx.stop_loss_pct = ctx.param('stop_loss_pct', 0.02)\n\ndef on_bar(ctx, bar):\n bars = ctx.bars(ctx.period + 5)\n if len(bars) < ctx.period:\n return\n\n closes = [b['close'] for b in bars[-ctx.period:]]\n mean = sum(closes) / len(closes)\n std = (sum((c - mean) ** 2 for c in closes) / len(closes)) ** 0.5\n\n upper = mean + ctx.std_mult * std\n lower = mean - ctx.std_mult * std\n price = bar['close']\n\n if price <= lower and not ctx.position:\n qty = (ctx.equity * ctx.position_pct) / price\n ctx.buy(price, qty)\n ctx.log(f\"BUY at {price:.2f} (below lower band {lower:.2f})\")\n\n elif price >= upper and ctx.position and ctx.position['side'] == 'long':\n ctx.close_position()\n ctx.log(f\"SELL at {price:.2f} (above upper band {upper:.2f})\")\n\n elif ctx.position and ctx.position['side'] == 'long':\n entry = ctx.position['entry_price']\n pnl_pct = (price - entry) / entry\n if pnl_pct >= ctx.take_profit_pct or pnl_pct <= -ctx.stop_loss_pct:\n ctx.close_position()\n ctx.log(f\"Risk exit at {price:.2f}, pnl={pnl_pct:.2%}\")\n",params:[{name:"period",type:"integer",default:20,min:2,max:300,step:1},{name:"std_mult",type:"number",default:2,min:.5,max:6,step:.1},{name:"position_pct",type:"percent",default:.5,min:.05,max:1,step:.01},{name:"take_profit_pct",type:"percent",default:.03,min:.001,max:1,step:.001},{name:"stop_loss_pct",type:"percent",default:.02,min:.001,max:1,step:.001}]},{key:"breakout",icon:"⚡",code:"\"\"\"\nBreakout Strategy\nEnter when price breaks key resistance/support with volume confirmation.\n\"\"\"\n\ndef on_init(ctx):\n ctx.lookback = ctx.param('lookback', 20)\n ctx.volume_mult = ctx.param('volume_mult', 1.5)\n ctx.position_pct = ctx.param('position_pct', 0.9)\n ctx.stop_pct = ctx.param('stop_pct', 0.02)\n ctx.take_profit_pct = ctx.param('take_profit_pct', 0.05)\n\ndef on_bar(ctx, bar):\n bars = ctx.bars(ctx.lookback + 5)\n if len(bars) < ctx.lookback:\n return\n\n recent = bars[-ctx.lookback:]\n high = max(b['high'] for b in recent[:-1])\n low = min(b['low'] for b in recent[:-1])\n avg_vol = sum(b['volume'] for b in recent[:-1]) / (len(recent) - 1)\n price = bar['close']\n vol = bar['volume']\n\n if price > high and vol > avg_vol * ctx.volume_mult and not ctx.position:\n qty = (ctx.equity * ctx.position_pct) / price\n ctx.buy(price, qty)\n ctx.log(f\"BREAKOUT BUY at {price:.2f} (prev high: {high:.2f})\")\n\n elif price < low and ctx.position and ctx.position['side'] == 'long':\n ctx.close_position()\n ctx.log(f\"BREAK DOWN, close at {price:.2f}\")\n\n if ctx.position and ctx.position['side'] == 'long':\n entry = ctx.position['entry_price']\n pnl_pct = (price - entry) / entry\n if pnl_pct <= -ctx.stop_pct:\n ctx.close_position()\n ctx.log(f\"STOP LOSS at {price:.2f}\")\n elif pnl_pct >= ctx.take_profit_pct:\n ctx.close_position()\n ctx.log(f\"TAKE PROFIT at {price:.2f}\")\n",params:[{name:"lookback",type:"integer",default:20,min:2,max:300,step:1},{name:"volume_mult",type:"number",default:1.5,min:.5,max:10,step:.1},{name:"position_pct",type:"percent",default:.9,min:.05,max:1,step:.01},{name:"stop_pct",type:"percent",default:.02,min:.001,max:1,step:.001},{name:"take_profit_pct",type:"percent",default:.05,min:.001,max:1,step:.001}]},{key:"rsiMeanReversion",icon:"📉",code:"\"\"\"\nRSI mean reversion (long-focused)\nBuys when RSI is oversold; exits long when RSI is overbought.\n\"\"\"\n\ndef on_init(ctx):\n ctx.rsi_period = ctx.param('rsi_period', 14)\n ctx.oversold = ctx.param('oversold', 30)\n ctx.overbought = ctx.param('overbought', 70)\n ctx.position_pct = ctx.param('position_pct', 0.5)\n\ndef _rsi_simple(closes, period):\n n = len(closes)\n if n < period + 1:\n return None\n gains = 0.0\n losses = 0.0\n for i in range(n - period, n):\n diff = closes[i] - closes[i - 1]\n if diff > 0:\n gains += diff\n else:\n losses -= diff\n if losses == 0:\n return 100.0 if gains > 0 else 50.0\n rs = gains / losses\n return 100.0 - (100.0 / (1.0 + rs))\n\ndef on_bar(ctx, bar):\n need = ctx.rsi_period + 3\n bars = ctx.bars(need)\n if len(bars) < need:\n return\n closes = [b['close'] for b in bars]\n r = _rsi_simple(closes, ctx.rsi_period)\n if r is None:\n return\n price = bar['close']\n if r <= ctx.oversold and not ctx.position:\n qty = (ctx.equity * ctx.position_pct) / price\n ctx.buy(price, qty)\n ctx.log(f\"RSI BUY r={r:.1f} at {price:.2f}\")\n elif r >= ctx.overbought and ctx.position and ctx.position['side'] == 'long':\n ctx.close_position()\n ctx.log(f\"RSI SELL r={r:.1f} at {price:.2f}\")\n",params:[{name:"rsi_period",type:"integer",default:14,min:2,max:100,step:1},{name:"oversold",type:"number",default:30,min:1,max:50,step:1},{name:"overbought",type:"number",default:70,min:50,max:99,step:1},{name:"position_pct",type:"percent",default:.5,min:.05,max:1,step:.01}]},{key:"macdCross",icon:"📊",code:"\"\"\"\nMACD histogram crossover\nEnters long when MACD histogram crosses above zero; exits when it crosses below.\n\"\"\"\n\ndef on_init(ctx):\n ctx.macd_fast = ctx.param('macd_fast', 12)\n ctx.macd_slow = ctx.param('macd_slow', 26)\n ctx.macd_signal = ctx.param('macd_signal', 9)\n ctx.position_pct = ctx.param('position_pct', 0.6)\n\ndef _ema_series(vals, period):\n k = 2.0 / (period + 1)\n out = []\n e = float(vals[0])\n out.append(e)\n for v in vals[1:]:\n v = float(v)\n e = v * k + e * (1 - k)\n out.append(e)\n return out\n\ndef _macd_hist_last_two(closes, fast, slow, sig):\n n = len(closes)\n if n < slow + sig + 2:\n return None, None\n ef = _ema_series(closes, fast)\n es = _ema_series(closes, slow)\n macd = [ef[i] - es[i] for i in range(n)]\n sg = _ema_series(macd, sig)\n hist = [macd[i] - sg[i] for i in range(n)]\n return hist[-2], hist[-1]\n\ndef on_bar(ctx, bar):\n need = ctx.macd_slow + ctx.macd_signal + 30\n bars = ctx.bars(need)\n if len(bars) < need:\n return\n closes = [b['close'] for b in bars]\n h0, h1 = _macd_hist_last_two(closes, ctx.macd_fast, ctx.macd_slow, ctx.macd_signal)\n if h0 is None:\n return\n price = bar['close']\n if h0 <= 0 and h1 > 0 and not ctx.position:\n qty = (ctx.equity * ctx.position_pct) / price\n ctx.buy(price, qty)\n ctx.log(f\"MACD cross up at {price:.2f}\")\n elif h0 >= 0 and h1 < 0 and ctx.position and ctx.position['side'] == 'long':\n ctx.close_position()\n ctx.log(f\"MACD cross down at {price:.2f}\")\n",params:[{name:"macd_fast",type:"integer",default:12,min:2,max:50,step:1},{name:"macd_slow",type:"integer",default:26,min:5,max:120,step:1},{name:"macd_signal",type:"integer",default:9,min:2,max:50,step:1},{name:"position_pct",type:"percent",default:.6,min:.05,max:1,step:.01}]}]);function D(t){return String(t).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function V(t){return"boolean"===typeof t?t?"True":"False":"number"===typeof t?Number.isFinite(t)?String(t):"0":null===t||void 0===t?"None":"'".concat(String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\'"),"'")}var E=N;function R(t){return N.find(function(e){return e.key===t})||null}function z(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a="string"===typeof t?R(t):t;return a?a.params.reduce(function(t,a){return t[a.name]=Object.prototype.hasOwnProperty.call(e,a.name)?e[a.name]:a.default,t},{}):{}}function L(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a="string"===typeof t?R(t):t;if(!a)return"";var s=z(a,e);return a.params.reduce(function(t,e){var a=V(s[e.name]),i=new RegExp("(ctx\\.param\\(['\"]".concat(D(e.name),"['\"],\\s*)([^\\)]+)(\\))"));return t.replace(i,"$1".concat(a,"$3"))},a.code)}var q={name:"StrategyTypeSelector",props:{selected:{type:String,default:""},isDark:{type:Boolean,default:!1}},data:function(){return{templates:E.map(function(t){return{key:t.key,icon:t.icon}})}}},U=q,K=(0,C.A)(U,I,F,!1,null,"8ec7ab14",null),O=K.exports,B=function(){var t=this,e=t._self._c;return e("div",{staticClass:"strategy-editor",class:{"theme-dark":t.isDark}},[e("a-row",{staticClass:"editor-layout",attrs:{gutter:16}},[e("a-col",{staticClass:"code-col",attrs:{xs:24,md:16}},[e("div",{staticClass:"code-section"},[e("div",{staticClass:"section-header"},[e("div",{staticClass:"section-title-wrap"},[e("span",{staticClass:"section-title"},[e("a-icon",{attrs:{type:"code"}}),t._v(" "+t._s(t.$t("trading-assistant.editor.title"))+" ")],1),t.selectedTemplate?e("a-tag",{staticClass:"current-template-tag",attrs:{color:"blue"}},[t._v(" "+t._s(t.$t("trading-assistant.template.".concat(t.selectedTemplate.key)))+" ")]):t._e()],1),e("div",{staticClass:"section-actions"},[e("a-button",{staticClass:"verify-btn",attrs:{type:"link",size:"small",loading:t.verifying},on:{click:t.handleVerify}},[e("a-icon",{attrs:{type:"check-circle"}}),t._v(" "+t._s(t.$t("trading-assistant.editor.verify"))+" ")],1)],1)]),e("div",{ref:"editorContainer",staticClass:"code-editor-container"})])]),e("a-col",{staticClass:"side-col",attrs:{xs:24,md:8}},[e("a-tabs",{staticClass:"side-tabs",attrs:{size:"small",animated:!1},model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[e("a-tab-pane",{key:"templates",attrs:{tab:t.$t("trading-assistant.editor.templateTab"),"force-render":!0}},[e("div",{staticClass:"panel-intro"},[e("div",{staticClass:"panel-intro__title"},[t._v(t._s(t.$t("trading-assistant.editor.templateIntroTitle")))]),e("div",{staticClass:"panel-intro__desc"},[t._v(t._s(t.$t("trading-assistant.editor.templateIntroDesc")))])]),e("div",{staticClass:"template-list"},t._l(t.templates,function(a){return e("div",{key:a.key,staticClass:"template-item",class:{active:t.selectedTemplateKey===a.key},on:{click:function(e){return t.loadTemplate(a.key,{focusParams:!0,resetParams:!0})}}},[e("div",{staticClass:"tpl-header"},[e("span",{staticClass:"tpl-icon"},[t._v(t._s(a.icon))]),e("span",{staticClass:"tpl-name"},[t._v(t._s(t.$t("trading-assistant.template.".concat(a.key))))])]),e("p",{staticClass:"tpl-desc"},[t._v(t._s(t.$t("trading-assistant.template.".concat(a.key,"Desc"))))]),e("a-button",{staticClass:"tpl-use-btn",attrs:{type:"link",size:"small"}},[t._v(" "+t._s(t.$t("trading-assistant.template.useTemplate"))+" "),e("a-icon",{attrs:{type:"arrow-right"}})],1)],1)}),0)]),e("a-tab-pane",{key:"params",attrs:{tab:t.$t("trading-assistant.editor.paramsTab"),"force-render":!0}},[t.selectedTemplate?e("div",{staticClass:"params-panel"},[e("div",{staticClass:"panel-intro"},[e("div",{staticClass:"panel-intro__title"},[t._v(" "+t._s(t.$t("trading-assistant.template.".concat(t.selectedTemplate.key)))+" ")]),e("div",{staticClass:"panel-intro__desc"},[t._v(" "+t._s(t.$t("trading-assistant.template.".concat(t.selectedTemplate.key,"Desc")))+" ")])]),e("a-alert",{staticClass:"params-tip",attrs:{type:"info","show-icon":"",message:t.$t("trading-assistant.editor.paramsHint")}}),e("div",{staticClass:"param-list"},t._l(t.selectedTemplate.params,function(a){return e("div",{key:a.name,staticClass:"param-item"},[e("div",{staticClass:"param-item__label-row"},[e("span",{staticClass:"param-item__label"},[t._v(t._s(t.getParamLabel(a)))]),e("span",{staticClass:"param-item__type"},[t._v(t._s(t.getParamTypeLabel(a.type)))])]),t.getParamDescription(a)?e("div",{staticClass:"param-item__desc"},[t._v(t._s(t.getParamDescription(a)))]):t._e(),"number"===a.type||"integer"===a.type||"percent"===a.type?e("a-input-number",{staticStyle:{width:"100%"},attrs:{value:t.templateParamValues[a.name],min:a.min,max:a.max,step:a.step||1,precision:"integer"===a.type?0:t.getParamPrecision(a)},on:{change:function(e){return t.handleNumericParamChange(a,e)}}}):"select"===a.type?e("a-select",{staticStyle:{width:"100%"},attrs:{value:t.templateParamValues[a.name]},on:{change:function(e){return t.handleSelectParamChange(a,e)}}},t._l(a.options||[],function(a){return e("a-select-option",{key:a.value,attrs:{value:a.value}},[t._v(" "+t._s(t.getOptionLabel(a))+" ")])}),1):"boolean"===a.type?e("div",{staticClass:"param-item__switch"},[e("a-switch",{attrs:{checked:!!t.templateParamValues[a.name]},on:{change:function(e){return t.handleBooleanParamChange(a,e)}}}),e("span",[t._v(t._s(t.templateParamValues[a.name]?t.$t("common.yes"):t.$t("common.no")))])],1):e("a-input",{attrs:{value:t.templateParamValues[a.name]},on:{input:function(e){return t.handleTextParamChange(a,e.target.value)}}})],1)}),0),e("div",{staticClass:"params-actions"},[e("a-button",{on:{click:t.resetTemplateParams}},[t._v(" "+t._s(t.$t("trading-assistant.editor.resetTemplateParams"))+" ")]),e("a-button",{attrs:{type:"primary",disabled:!t.templateDirty},on:{click:t.applySelectedTemplateToCode}},[t._v(" "+t._s(t.$t("trading-assistant.editor.applyTemplateParams"))+" ")])],1)],1):e("div",{staticClass:"params-empty-guide"},[e("a-empty",{attrs:{description:t.$t("trading-assistant.editor.paramsEmpty")}},[e("a-button",{attrs:{type:"primary",size:"small",ghost:""},on:{click:function(e){t.activeTab="templates"}}},[e("a-icon",{attrs:{type:"appstore"}}),t._v(" "+t._s(t.$t("trading-assistant.editor.templateTab"))+" ")],1)],1)],1)]),e("a-tab-pane",{key:"ai",attrs:{tab:t.$t("trading-assistant.editor.aiTab"),"force-render":!0}},[e("div",{staticClass:"ai-panel"},[e("div",{staticClass:"panel-intro"},[e("div",{staticClass:"panel-intro__title"},[e("a-icon",{attrs:{type:"robot"}}),e("span",[t._v(t._s(t.$t("trading-assistant.editor.aiGenerate")))])],1),e("div",{staticClass:"panel-intro__desc"},[t._v(t._s(t.$t("trading-assistant.editor.aiHint")))])]),e("div",{staticClass:"ai-suggestions"},t._l(t.aiPromptSuggestions,function(a){return e("a-tag",{key:a.id,staticClass:"prompt-tag",on:{click:function(e){return t.applyPromptSuggestion(a.value)}}},[t._v(" "+t._s(a.label)+" ")])}),1),e("a-textarea",{attrs:{placeholder:t.$t("trading-assistant.editor.aiPromptPlaceholder"),rows:10,"auto-size":{minRows:8,maxRows:16}},model:{value:t.aiPrompt,callback:function(e){t.aiPrompt=e},expression:"aiPrompt"}}),e("div",{staticClass:"ai-actions"},[e("a-button",{attrs:{type:"primary",block:"",loading:t.aiAdjustingParams,disabled:t.aiGenerating,size:"large"},on:{click:t.handleAIAdjustParams}},[e("a-icon",{attrs:{type:"setting"}}),t._v(" "+t._s(t.$t("trading-assistant.editor.aiAdjustParamsBtn"))+" ")],1),e("a-button",{staticStyle:{"margin-top":"8px"},attrs:{block:"",loading:t.aiGenerating,disabled:t.aiAdjustingParams,size:"large"},on:{click:t.handleAIGenerate}},[e("a-icon",{attrs:{type:"code"}}),t._v(" "+t._s(t.$t("trading-assistant.editor.aiGenerateFullCodeBtn"))+" ")],1)],1),t.aiGenerating||t.aiAdjustingParams?e("div",{staticClass:"ai-status"},[e("a-icon",{attrs:{type:"loading",spin:""}}),t._v(" "+t._s(t.aiAdjustingParams?t.$t("trading-assistant.editor.aiAdjustingParams"):t.$t("trading-assistant.editor.generating"))+" ")],1):t._e()],1)])],1)],1)],1)],1)},G=[],H=(a(6011),a(18787)),W=(a(32637),a(15237)),j=a.n(W),Y=(a(74806),a(55218),a(97923),a(50436),{name:"StrategyEditor",props:{value:{type:String,default:""},isDark:{type:Boolean,default:!1},userId:{type:[Number,String],default:1},visible:{type:Boolean,default:!1},initialTemplateKey:{type:String,default:""}},data:function(){return{activeTab:"templates",aiPrompt:"",aiGenerating:!1,aiAdjustingParams:!1,verifying:!1,editor:null,templates:E,selectedTemplateKey:"",templateParamValues:{},templateDirty:!1,refreshTimer:null}},computed:{selectedTemplate:function(){return R(this.selectedTemplateKey)},aiPromptSuggestions:function(){return[{id:"improve",label:this.$t("trading-assistant.editor.aiSuggestionImprove"),value:this.$t("trading-assistant.editor.aiSuggestionImprovePrompt")},{id:"risk",label:this.$t("trading-assistant.editor.aiSuggestionRisk"),value:this.$t("trading-assistant.editor.aiSuggestionRiskPrompt")},{id:"explain",label:this.$t("trading-assistant.editor.aiSuggestionExplain"),value:this.$t("trading-assistant.editor.aiSuggestionExplainPrompt")}]}},mounted:function(){var t=this;this.$nextTick(function(){t.initEditor(),t.initialTemplateKey?t.loadTemplate(t.initialTemplateKey,{focusParams:!0,resetParams:!0}):t.value||t.$emit("input",t._getDefaultCode())}),window.addEventListener("resize",this.scheduleEditorRefresh)},beforeDestroy:function(){window.removeEventListener("resize",this.scheduleEditorRefresh),this.refreshTimer&&(clearTimeout(this.refreshTimer),this.refreshTimer=null),this.editor&&("function"===typeof this.editor.toTextArea&&this.editor.toTextArea(),this.editor=null)},watch:{value:function(t){this.editor&&this.editor.getValue()!==t&&(this.editor.setValue(t||""),this.scheduleEditorRefresh())},isDark:function(){this.editor&&this.editor.setOption("theme",this.isDark?"monokai":"eclipse"),this.scheduleEditorRefresh()},visible:function(t){var e=this;t&&this.$nextTick(function(){e.scheduleEditorRefresh();try{window.dispatchEvent(new Event("resize"))}catch(t){}})},initialTemplateKey:function(t){t&&t!==this.selectedTemplateKey&&this.loadTemplate(t,{focusParams:!0,resetParams:!0})}},methods:{initEditor:function(){var t=this;this.$refs.editorContainer&&(this.editor=j()(this.$refs.editorContainer,{value:this.value||this._getDefaultCode(),mode:"python",theme:this.isDark?"monokai":"eclipse",lineNumbers:!0,autoCloseBrackets:!0,matchBrackets:!0,styleActiveLine:!0,tabSize:4,indentUnit:4,indentWithTabs:!1,lineWrapping:!1,viewportMargin:1/0,gutters:["CodeMirror-linenumbers"]}),this.editor.on("change",function(){t.$emit("input",t.editor.getValue())}),this.scheduleEditorRefresh())},scheduleEditorRefresh:function(){var t=this;this.refreshTimer&&clearTimeout(this.refreshTimer),this.refreshTimer=setTimeout(function(){t.editor&&t.editor.refresh()},60)},_getDefaultCode:function(){return'"""\nMy Custom Strategy\n"""\n\ndef on_init(ctx):\n # Initialize strategy parameters\n pass\n\ndef on_bar(ctx, bar):\n # Core trading logic, called on each K-line bar\n # bar: { open, high, low, close, volume, timestamp }\n price = bar[\'close\']\n\n bars = ctx.bars(20)\n if len(bars) < 20:\n return\n\n avg = sum(b[\'close\'] for b in bars) / len(bars)\n\n if price > avg and not ctx.position:\n ctx.buy(price, ctx.equity * 0.9 / price)\n ctx.log(f"BUY at {price}")\n\n elif price < avg and ctx.position:\n ctx.close_position()\n ctx.log(f"SELL at {price}")\n'},loadTemplate:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=e.focusParams,s=void 0!==a&&a,i=e.resetParams,r=void 0===i||i,n=R(t);n&&(this.selectedTemplateKey=t,!r&&this.templateParamValues&&0!==Object.keys(this.templateParamValues).length||(this.templateParamValues=z(n)),this.templateDirty=!0,this.applySelectedTemplateToCode({silent:!0}),s&&(this.activeTab="params"),this.aiPrompt.trim()||(this.aiPrompt=this.$t("trading-assistant.editor.aiPromptTemplateHint")+" "+this.$t("trading-assistant.template.".concat(n.key))),this.scheduleEditorRefresh())},getCode:function(){return this.editor?this.editor.getValue():this.value},setCode:function(t){this.editor&&this.editor.getValue()!==t?this.editor.setValue(t):this.$emit("input",t),this.scheduleEditorRefresh()},applySelectedTemplateToCode:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.silent,a=void 0!==e&&e;if(this.selectedTemplate){var s=L(this.selectedTemplate,this.templateParamValues);this.setCode(s),this.templateDirty=!1,this.$emit("template-change",{key:this.selectedTemplateKey,params:(0,u.A)({},this.templateParamValues)}),a||H.A.success(this.$t("trading-assistant.editor.templateApplied"))}},resetTemplateParams:function(){this.selectedTemplate&&(this.templateParamValues=z(this.selectedTemplate),this.templateDirty=!0,this.applySelectedTemplateToCode({silent:!1}))},getParamLabel:function(t){var e="trading-assistant.templateParam.".concat(t.name,".label"),a=this.$t(e);return a===e?t.name:a},getParamDescription:function(t){var e="trading-assistant.templateParam.".concat(t.name,".desc"),a=this.$t(e);return a===e?"":a},getParamTypeLabel:function(t){return this.$t("trading-assistant.editor.paramType.".concat(t))},getOptionLabel:function(t){if(!t)return"";if(t.labelKey){var e=this.$t(t.labelKey);if(e!==t.labelKey)return e}return t.label||t.value},getParamPrecision:function(t){if("integer"===t.type)return 0;var e=t.step;if(!e||Number.isInteger(e))return 0;var a=String(e),s=a.split(".");return s[1]?s[1].length:0},handleNumericParamChange:function(t,e){var a=""===e||null===e||void 0===e?t.default:"integer"===t.type?parseInt(e,10):Number(e);this.$set(this.templateParamValues,t.name,a),this.templateDirty=!0},handleSelectParamChange:function(t,e){this.$set(this.templateParamValues,t.name,e),this.templateDirty=!0},handleBooleanParamChange:function(t,e){this.$set(this.templateParamValues,t.name,!!e),this.templateDirty=!0},handleTextParamChange:function(t,e){this.$set(this.templateParamValues,t.name,e),this.templateDirty=!0},applyPromptSuggestion:function(t){this.aiPrompt=t},handleVerify:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.verifying=!0,e.p=1,a=t.getCode(),e.n=2,(0,y.Ay)({url:"/api/strategies/verify-code",method:"post",data:{code:a,user_id:t.userId}});case 2:s=e.v,s&&s.success?H.A.success(t.$t("trading-assistant.editor.verifySuccess")):H.A.error(s&&(s.msg||s.message)||t.$t("trading-assistant.editor.verifyFailed")),e.n=4;break;case 3:e.p=3,i=e.v,H.A.error(t.$t("trading-assistant.editor.verifyFailed")+": "+(i.message||""));case 4:return e.p=4,t.verifying=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},_coerceParamValue:function(t,e){if(null!==e&&void 0!==e){var a=t.type;if("boolean"===a)return"boolean"===typeof e?e:"true"===e||1===e||"1"===e||"false"!==e&&0!==e&&"0"!==e&&void 0;if("integer"===a){var s=parseInt(String(e),10);if(!Number.isFinite(s))return;var i=s;return null!=t.min&&(i=Math.max(t.min,i)),null!=t.max&&(i=Math.min(t.max,i)),i}if("number"===a||"percent"===a){var r=Number(e);if(!Number.isFinite(r))return;var n=r;return null!=t.min&&(n=Math.max(t.min,n)),null!=t.max&&(n=Math.min(t.max,n)),n}if("select"===a){var o=t.options||[],l=new Set(o.map(function(t){return t.value}));if(l.has(e))return e;var c=String(e);return l.has(c)?c:void 0}return String(e)}},applyAIParamUpdates:function(t){var e=this;if(!this.selectedTemplate||!t||"object"!==(0,n.A)(t))return!1;var a=new Set(this.selectedTemplate.params.map(function(t){return t.name})),s=!1;return Object.keys(t).forEach(function(i){if(a.has(i)){var r=e.selectedTemplate.params.find(function(t){return t.name===i}),n=e._coerceParamValue(r,t[i]);void 0!==n&&(e.$set(e.templateParamValues,i,n),s=!0)}}),s},handleAIAdjustParams:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.aiPrompt.trim()){e.n=1;break}return H.A.warning(t.$t("trading-assistant.editor.aiPromptRequired")),e.a(2);case 1:if(t.selectedTemplate){e.n=2;break}return H.A.warning(t.$t("trading-assistant.editor.aiAdjustParamsNeedTemplate")),e.a(2);case 2:return t.aiAdjustingParams=!0,e.p=3,e.n=4,(0,y.Ay)({url:"/api/strategies/ai-generate",method:"post",data:{prompt:t.aiPrompt,user_id:t.userId,intent:"adjust_params",template_key:t.selectedTemplateKey,params:(0,u.A)({},t.templateParamValues),code:t.getCode()}});case 4:a=e.v,a&&a.params&&"object"===(0,n.A)(a.params)?(s=t.applyAIParamUpdates(a.params),s?(t.templateDirty=!0,t.applySelectedTemplateToCode({silent:!0}),H.A.success(t.$t("trading-assistant.editor.aiAdjustParamsSuccess"))):H.A.warning(t.$t("trading-assistant.editor.aiAdjustParamsNoChanges"))):H.A.error(a&&(a.msg||a.message)||t.$t("trading-assistant.editor.aiAdjustParamsFailed")),e.n=6;break;case 5:e.p=5,i=e.v,H.A.error(i&&i.message||t.$t("trading-assistant.editor.aiAdjustParamsFailed"));case 6:return e.p=6,t.aiAdjustingParams=!1,e.f(6);case 7:return e.a(2)}},e,null,[[3,5,6,7]])}))()},handleAIGenerate:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.aiPrompt.trim()){e.n=1;break}return H.A.warning(t.$t("trading-assistant.editor.aiPromptRequired")),e.a(2);case 1:return t.aiGenerating=!0,e.p=2,e.n=3,(0,y.Ay)({url:"/api/strategies/ai-generate",method:"post",data:{prompt:t.aiPrompt,user_id:t.userId,intent:"generate_code",template_key:t.selectedTemplateKey||void 0,params:t.selectedTemplate?(0,u.A)({},t.templateParamValues):void 0,code:t.getCode()}});case 3:a=e.v,s=a&&"string"===typeof a.code?a.code:"",s?(t.setCode(s),H.A.success(t.$t("trading-assistant.editor.aiGenerateSuccess"))):H.A.error(a&&(a.msg||a.message)||t.$t("trading-assistant.editor.aiGenerateFailed")),e.n=5;break;case 4:e.p=4,i=e.v,H.A.error(i&&i.message||t.$t("trading-assistant.editor.aiGenerateFailed"));case 5:return e.p=5,t.aiGenerating=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()}}}),J=Y,X=(0,C.A)(J,B,G,!1,null,"35a0a386",null),Q=X.exports,Z=function(){var t=this,e=t._self._c;return e("div",{staticClass:"performance-analysis strategy-tab-pane-inner",class:{"theme-dark":t.isDark}},[e("a-spin",{attrs:{spinning:t.loading}},[t.hasData?e("div",[e("div",{staticClass:"metrics-grid"},[e("div",{staticClass:"metric-card",class:t.getMetricClass(t.metrics.totalReturn)},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.totalReturn")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.metrics.totalReturn)))])]),e("div",{staticClass:"metric-card",class:t.getMetricClass(t.metrics.annualReturn)},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.annualReturn")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.metrics.annualReturn)))])]),e("div",{staticClass:"metric-card negative"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.maxDrawdown")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.metrics.maxDrawdown)))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.sharpe")))]),e("div",{staticClass:"metric-value"},[t._v(t._s((t.metrics.sharpe||0).toFixed(2)))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.winRate")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.metrics.winRate)))])]),e("div",{staticClass:"metric-card",class:t.getMetricClass((t.metrics.profitFactor||0)-1)},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.profitFactor")))]),e("div",{staticClass:"metric-value"},[t._v(t._s((t.metrics.profitFactor||0).toFixed(2)))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.totalTrades")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.metrics.totalTrades||0))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.runningDays")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.metrics.runningDays||0))])])]),e("div",{staticClass:"chart-section"},[e("div",{staticClass:"chart-title"},[t._v(t._s(t.$t("trading-assistant.performance.equityCurve")))]),e("div",{ref:"equityChart",staticClass:"chart-container"})]),e("div",{staticClass:"chart-section"},[e("div",{staticClass:"chart-title"},[t._v(t._s(t.$t("trading-assistant.performance.dailyReturns")))]),e("div",{ref:"dailyChart",staticClass:"chart-container",staticStyle:{height:"250px"}})])]):t.loading?t._e():e("a-empty",{staticClass:"strategy-tab-empty",attrs:{description:t.$t("trading-assistant.performance.noData")}})],1)],1)},tt=[],et={name:"PerformanceAnalysis",props:{strategyId:{type:[Number,String],default:null},isDark:{type:Boolean,default:!1}},data:function(){return{loading:!1,metrics:{},equityData:[],dailyReturns:[],equityChartInstance:null,dailyChartInstance:null}},computed:{hasData:function(){return this.equityData.length>0}},watch:{strategyId:{handler:function(t){t&&this.loadData()},immediate:!0},isDark:function(){var t=this;this.disposeCharts(),this.$nextTick(function(){return t.renderCharts()})}},beforeDestroy:function(){this.disposeCharts()},methods:{loadData:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.strategyId){e.n=1;break}return e.a(2);case 1:return t.loading=!0,e.p=2,e.n=3,(0,p.Yx)(t.strategyId);case 3:a=e.v,a&&a.data&&(t.equityData=a.data.equity_curve||a.data||[],t.computeMetrics(),t.$nextTick(function(){return t.renderCharts()})),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.p=5,t.loading=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},computeMetrics:function(){var t=this.equityData;if(t.length){for(var e=t.map(function(t){return t.equity||t.value||t.y||0}),a=e[0]||1,s=e[e.length-1]||a,i=(s-a)/a,r=e[0],n=0,o=[],l=1;lr&&(r=e[l]);var c=(e[l]-r)/r;c1?Math.sqrt(o.reduce(function(t,e){return t+Math.pow(e-p,2)},0)/(o.length-1)):0,g=t.filter(function(t){return t.trade_count}).reduce(function(t,e){return t+e.trade_count},0)||0,h=t.filter(function(t){return t.win_count}).reduce(function(t,e){return t+e.win_count},0)||0,_=t.filter(function(t){return t.gross_profit}).reduce(function(t,e){return t+e.gross_profit},0),y=Math.abs(t.filter(function(t){return t.gross_loss}).reduce(function(t,e){return t+e.gross_loss},0));this.metrics={totalReturn:i,annualReturn:Math.pow(1+i,u)-1,maxDrawdown:n,sharpe:m>0?p/m*Math.sqrt(252):0,winRate:g>0?h/g:0,profitFactor:y>0?_/y:_>0?999:0,totalTrades:g,runningDays:d}}else this.metrics={}},renderCharts:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.n){case 0:return e.n=1,t.getEcharts();case 1:if(a=e.v,a){e.n=2;break}return e.a(2);case 2:t.renderEquityChart(a),t.renderDailyChart(a);case 3:return e.a(2)}},e)}))()},getEcharts:function(){return(0,l.A)((0,o.A)().m(function t(){var e;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(!window.echarts){t.n=1;break}return t.a(2,window.echarts);case 1:return t.p=1,t.n=2,Promise.resolve().then(a.bind(a,29362));case 2:return e=t.v,window.echarts=e.default||e,t.a(2,window.echarts);case 3:return t.p=3,t.v,t.a(2,null)}},t,null,[[1,3]])}))()},renderEquityChart:function(t){if(this.$refs.equityChart){this.equityChartInstance=t.init(this.$refs.equityChart,this.isDark?"dark":null);var e=this.equityData.map(function(t){return t.date||t.timestamp||t.x||""}),a=this.equityData.map(function(t){return t.equity||t.value||t.y||0});this.equityChartInstance.setOption({tooltip:{trigger:"axis"},grid:{left:60,right:20,top:20,bottom:30},xAxis:{type:"category",data:e,axisLabel:{fontSize:10}},yAxis:{type:"value",axisLabel:{fontSize:10}},series:[{type:"line",data:a,smooth:!0,lineStyle:{width:2,color:"#1890ff"},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(24,144,255,0.3)"},{offset:1,color:"rgba(24,144,255,0.02)"}]}},itemStyle:{color:"#1890ff"},showSymbol:!1}]})}},renderDailyChart:function(t){this.$refs.dailyChart&&this.dailyReturns.length&&(this.dailyChartInstance=t.init(this.$refs.dailyChart,this.isDark?"dark":null),this.dailyChartInstance.setOption({tooltip:{trigger:"axis",formatter:function(t){return"".concat((100*t[0].value).toFixed(2),"%")}},grid:{left:60,right:20,top:10,bottom:30},xAxis:{type:"category",data:this.dailyReturns.map(function(t,e){return e+1}),show:!1},yAxis:{type:"value",axisLabel:{formatter:function(t){return(100*t).toFixed(1)+"%"},fontSize:10}},series:[{type:"bar",data:this.dailyReturns.map(function(t){return{value:t,itemStyle:{color:t>=0?"#52c41a":"#ff4d4f"}}}),barMaxWidth:6}]}))},disposeCharts:function(){this.equityChartInstance&&(this.equityChartInstance.dispose(),this.equityChartInstance=null),this.dailyChartInstance&&(this.dailyChartInstance.dispose(),this.dailyChartInstance=null)},formatPercent:function(t){return void 0===t||null===t?"--":(t>=0?"+":"")+(100*t).toFixed(2)+"%"},getMetricClass:function(t){return t?t>0?"positive":t<0?"negative":"":""}}},at=et,st=(0,C.A)(at,Z,tt,!1,null,"01ff5f5a",null),it=st.exports,rt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"strategy-logs strategy-tab-pane-inner",class:{"theme-dark":t.isDark}},[e("div",{staticClass:"logs-toolbar"},[e("div",{staticClass:"toolbar-left"},[e("a-radio-group",{attrs:{size:"small","button-style":"solid"},model:{value:t.filterLevel,callback:function(e){t.filterLevel=e},expression:"filterLevel"}},[e("a-radio-button",{attrs:{value:"all"}},[t._v("All")]),e("a-radio-button",{attrs:{value:"trade"}},[e("a-badge",{attrs:{count:t.countByLevel("trade"),"overflow-count":99,offset:[6,-2]}},[t._v(" "+t._s(t.$t("trading-assistant.logs.level.trade"))+" ")])],1),e("a-radio-button",{attrs:{value:"signal"}},[t._v(t._s(t.$t("trading-assistant.logs.level.signal")))]),e("a-radio-button",{attrs:{value:"error"}},[t._v(t._s(t.$t("trading-assistant.logs.level.error")))])],1)],1),e("div",{staticClass:"toolbar-right"},[e("a-switch",{attrs:{checked:t.autoRefresh,size:"small"},on:{change:t.toggleAutoRefresh}}),e("span",{staticClass:"auto-refresh-label"},[t._v(t._s(t.$t("trading-assistant.logs.autoRefresh")))])],1)]),e("div",{ref:"logsContainer",staticClass:"logs-container custom-scrollbar"},[0===t.filteredLogs.length?e("div",{staticClass:"logs-empty"},[e("a-icon",{staticStyle:{"font-size":"32px",color:"#ccc"},attrs:{type:"file-text"}}),e("p",[t._v(t._s(t.$t("trading-assistant.logs.noLogs")))])],1):t._e(),t._l(t.filteredLogs,function(a,s){return e("div",{key:s,staticClass:"log-entry",class:"level-"+a.level},[e("span",{staticClass:"log-time"},[t._v(t._s(t.formatTime(a.timestamp)))]),e("a-tag",{staticClass:"log-level",attrs:{color:t.getLevelColor(a.level),size:"small"}},[t._v(" "+t._s(t.getLevelText(a.level))+" ")]),e("span",{staticClass:"log-message"},[t._v(t._s(a.message))])],1)})],2)])},nt=[],ot={name:"StrategyLogs",props:{strategyId:{type:[Number,String],default:null},isDark:{type:Boolean,default:!1}},data:function(){return{logs:[],filterLevel:"all",autoRefresh:!1,refreshTimer:null,loading:!1}},computed:{filteredLogs:function(){var t=this;return"all"===this.filterLevel?this.logs:this.logs.filter(function(e){return e.level===t.filterLevel})}},watch:{strategyId:{handler:function(t){t&&this.loadLogs()},immediate:!0}},beforeDestroy:function(){this.stopAutoRefresh()},methods:{loadLogs:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.strategyId){e.n=1;break}return e.a(2);case 1:return t.loading=!0,e.p=2,e.n=3,(0,y.Ay)({url:"/api/strategies/logs",method:"get",params:{id:t.strategyId,limit:200}});case 3:a=e.v,a&&a.data&&(t.logs=a.data,t.$nextTick(function(){return t.scrollToBottom()})),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.p=5,t.loading=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},toggleAutoRefresh:function(t){var e=this;this.autoRefresh=t,t?this.refreshTimer=setInterval(function(){return e.loadLogs()},5e3):this.stopAutoRefresh()},stopAutoRefresh:function(){this.refreshTimer&&(clearInterval(this.refreshTimer),this.refreshTimer=null)},scrollToBottom:function(){var t=this.$refs.logsContainer;t&&(t.scrollTop=t.scrollHeight)},countByLevel:function(t){return this.logs.filter(function(e){return e.level===t}).length},formatTime:function(t){if(!t)return"";try{var e=new Date(t);return e.toLocaleTimeString("en-GB",{hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch(a){return t}},getLevelColor:function(t){var e={info:"blue",warn:"orange",error:"red",trade:"green",signal:"purple"};return e[t]||"default"},getLevelText:function(t){var e="trading-assistant.logs.level.".concat(t),a=this.$t(e);return a!==e?a:t}}},lt=ot,ct=(0,C.A)(lt,rt,nt,!1,null,"73589ce4",null),dt=ct.exports,ut=function(){var t=this,e=t._self._c;return e("div",{staticClass:"dashboard-pro",class:{"theme-dark":t.isDarkTheme}},[e("div",{staticClass:"kpi-grid"},[e("div",{staticClass:"kpi-card kpi-primary"},[e("div",{staticClass:"kpi-glow"}),e("div",{staticClass:"kpi-content"},[e("div",{staticClass:"kpi-header"},[e("span",{staticClass:"kpi-icon"},[e("a-icon",{attrs:{type:"wallet"}})],1),e("span",{staticClass:"kpi-label"},[t._v(t._s(t.$t("dashboard.totalEquity")))])]),e("div",{staticClass:"kpi-value"},[e("span",{staticClass:"currency"},[t._v("$")]),e("span",{staticClass:"amount"},[t._v(t._s(t.formatNumber(t.summary.total_equity)))])]),e("div",{staticClass:"kpi-sub"},[e("span",{class:t.summary.total_pnl>=0?"positive":"negative"},[t._v(" "+t._s(t.summary.total_pnl>=0?"+":"")+t._s(t.formatNumber(t.summary.total_pnl))+" ")]),e("span",{staticClass:"label"},[t._v(t._s(t.$t("dashboard.label.totalPnl")))])])])]),e("div",{staticClass:"kpi-card kpi-win-rate"},[e("div",{staticClass:"kpi-content"},[e("div",{staticClass:"kpi-header"},[e("span",{staticClass:"kpi-icon"},[e("a-icon",{attrs:{type:"trophy"}})],1),e("span",{staticClass:"kpi-label"},[t._v(t._s(t.$t("dashboard.winRate")||"胜率"))])]),e("div",{staticClass:"kpi-value"},[e("span",{staticClass:"amount"},[t._v(t._s(t.formatNumber(t.performance.win_rate,1)))]),e("span",{staticClass:"unit"},[t._v("%")])]),e("div",{staticClass:"kpi-sub"},[e("span",{staticClass:"positive"},[t._v(t._s(t.performance.winning_trades))]),e("span",{staticClass:"label"},[t._v(t._s(t.$t("dashboard.label.win")))]),e("span",{staticClass:"divider"},[t._v("/")]),e("span",{staticClass:"negative"},[t._v(t._s(t.performance.losing_trades))]),e("span",{staticClass:"label"},[t._v(t._s(t.$t("dashboard.label.lose")))])])]),e("div",{staticClass:"kpi-ring"},[e("svg",{attrs:{viewBox:"0 0 36 36"}},[e("path",{staticClass:"ring-bg",attrs:{d:"M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831"}}),e("path",{staticClass:"ring-progress",attrs:{"stroke-dasharray":"".concat(t.performance.win_rate||0,", 100"),d:"M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831"}})])])]),e("div",{staticClass:"kpi-card kpi-profit-factor"},[e("div",{staticClass:"kpi-content"},[e("div",{staticClass:"kpi-header"},[e("span",{staticClass:"kpi-icon"},[e("a-icon",{attrs:{type:"rise"}})],1),e("span",{staticClass:"kpi-label"},[t._v(t._s(t.$t("dashboard.profitFactor")||"盈亏比"))])]),e("div",{staticClass:"kpi-value"},[e("span",{staticClass:"amount"},[t._v(t._s(t.formatNumber(t.performance.profit_factor,2)))]),e("span",{staticClass:"unit"},[t._v(":1")])]),e("div",{staticClass:"kpi-sub"},[e("span",[t._v(t._s(t.$t("dashboard.label.avgProfit"))+" ")]),e("span",{staticClass:"positive"},[t._v("$"+t._s(t.formatNumber(t.performance.avg_win)))])])])]),e("div",{staticClass:"kpi-card kpi-drawdown"},[e("div",{staticClass:"kpi-content"},[e("div",{staticClass:"kpi-header"},[e("span",{staticClass:"kpi-icon"},[e("a-icon",{attrs:{type:"fall"}})],1),e("span",{staticClass:"kpi-label"},[t._v(t._s(t.$t("dashboard.maxDrawdown")||"最大回撤"))])]),e("div",{staticClass:"kpi-value"},[e("span",{staticClass:"amount negative"},[t._v(t._s(t.formatNumber(t.performance.max_drawdown_pct,1)))]),e("span",{staticClass:"unit"},[t._v("%")])]),e("div",{staticClass:"kpi-sub"},[e("span",[t._v("$"+t._s(t.formatNumber(t.performance.max_drawdown)))])])])]),e("div",{staticClass:"kpi-card kpi-trades"},[e("div",{staticClass:"kpi-content"},[e("div",{staticClass:"kpi-header"},[e("span",{staticClass:"kpi-icon"},[e("a-icon",{attrs:{type:"swap"}})],1),e("span",{staticClass:"kpi-label"},[t._v(t._s(t.$t("dashboard.totalTrades")||"总交易"))])]),e("div",{staticClass:"kpi-value"},[e("span",{staticClass:"amount"},[t._v(t._s(t.performance.total_trades))]),e("span",{staticClass:"unit"},[t._v(t._s(t.$t("dashboard.unit.trades")))])]),e("div",{staticClass:"kpi-sub"},[e("span",[t._v(t._s(t.$t("dashboard.label.avgDaily"))+" ")]),e("span",[t._v(t._s(t.avgTradesPerDay))]),e("span",{staticClass:"label"},[t._v(" "+t._s(t.$t("dashboard.unit.trades")))])])])]),e("div",{staticClass:"kpi-card kpi-strategies clickable",on:{click:t.goToStrategyManagement}},[e("div",{staticClass:"kpi-content"},[e("div",{staticClass:"kpi-header"},[e("span",{staticClass:"kpi-icon"},[e("a-icon",{attrs:{type:"thunderbolt",theme:"filled"}})],1),e("span",{staticClass:"kpi-label"},[t._v(t._s(t.$t("dashboard.runningStrategies")||"运行中策略"))])]),e("div",{staticClass:"kpi-value"},[e("span",{staticClass:"amount"},[t._v(t._s(t.summary.indicator_strategy_count))]),e("span",{staticClass:"unit"},[t._v(t._s(t.$t("dashboard.unit.strategies")))])]),e("div",{staticClass:"kpi-sub"},[e("span",{staticClass:"highlight"},[t._v(t._s(t.summary.indicator_strategy_count))]),e("span",{staticClass:"label"},[t._v(" "+t._s(t.$t("dashboard.label.indicator")))])])]),e("div",{staticClass:"card-arrow"},[e("a-icon",{attrs:{type:"right"}})],1)])]),t.showSetupGuide&&!t.hideSetupGuide?e("div",{staticClass:"setup-guide-card"},[e("div",{staticClass:"setup-guide-copy"},[e("div",{staticClass:"setup-guide-title"},[t._v(t._s(t.$t("dashboard.setupGuide.title")))]),e("div",{staticClass:"setup-guide-desc"},[t._v(t._s(t.$t("dashboard.setupGuide.desc")))]),e("div",{staticClass:"setup-guide-path"},[t._v(t._s(t.$t("dashboard.setupGuide.path")))])]),e("div",{staticClass:"setup-guide-actions"},[e("a-button",{on:{click:t.goToStrategyManagement}},[e("a-icon",{attrs:{type:"appstore"}}),t._v(" "+t._s(t.$t("dashboard.setupGuide.secondary"))+" ")],1),e("a-button",{attrs:{type:"primary"},on:{click:t.goToStrategyCreate}},[e("a-icon",{attrs:{type:"plus"}}),t._v(" "+t._s(t.$t("dashboard.setupGuide.primary"))+" ")],1)],1)]):t._e(),e("div",{staticClass:"chart-row"},[e("div",{staticClass:"chart-panel chart-main"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"calendar"}}),e("span",[t._v(t._s(t.$t("dashboard.profitCalendar")||"收益日曆"))])],1),e("div",{staticClass:"calendar-nav"},[e("a-button",{attrs:{type:"link",size:"small",disabled:t.currentCalendarIndex>=t.calendarMonths.length-1},on:{click:t.prevMonth}},[e("a-icon",{attrs:{type:"left"}})],1),e("span",{staticClass:"current-month"},[t._v(t._s(t.currentMonthLabel))]),e("a-button",{attrs:{type:"link",size:"small",disabled:t.currentCalendarIndex<=0},on:{click:t.nextMonth}},[e("a-icon",{attrs:{type:"right"}})],1)],1)]),e("div",{staticClass:"profit-calendar"},[t.currentCalendarMonth?[e("div",{staticClass:"month-summary"},[e("div",{staticClass:"summary-item"},[e("span",{staticClass:"summary-label"},[t._v(t._s(t.$t("dashboard.ranking.totalProfit")))]),e("span",{staticClass:"summary-value",class:t.currentCalendarMonth.total>=0?"positive":"negative"},[t._v(" "+t._s(t.currentCalendarMonth.total>=0?"+":"")+"$"+t._s(t.formatNumber(t.currentCalendarMonth.total))+" ")])]),e("div",{staticClass:"summary-item"},[e("span",{staticClass:"summary-label"},[t._v(t._s(t.$t("dashboard.label.win")))]),e("span",{staticClass:"summary-value positive"},[t._v(t._s(t.currentCalendarMonth.win_days))])]),e("div",{staticClass:"summary-item"},[e("span",{staticClass:"summary-label"},[t._v(t._s(t.$t("dashboard.label.lose")))]),e("span",{staticClass:"summary-value negative"},[t._v(t._s(t.currentCalendarMonth.lose_days))])])]),e("div",{staticClass:"calendar-weekdays"},t._l(t.weekdays,function(a){return e("div",{key:a,staticClass:"weekday"},[t._v(t._s(a))])}),0),e("div",{staticClass:"calendar-grid"},[t._l(t.calendarFirstDayOffset,function(t){return e("div",{key:"empty-"+t,staticClass:"calendar-cell empty"})}),t._l(t.currentCalendarMonth.days_in_month,function(a){return e("div",{key:a,staticClass:"calendar-cell",class:t.getDayClass(a)},[e("span",{staticClass:"day-number"},[t._v(t._s(a))]),null!==t.getDayProfit(a)?e("span",{staticClass:"day-profit",class:t.getDayProfit(a)>=0?"positive":"negative"},[t._v(" "+t._s(t.getDayProfit(a)>=0?"+":"")+t._s(t.formatCompactNumber(t.getDayProfit(a)))+" ")]):t._e()])})],2)]:e("div",{staticClass:"calendar-empty"},[e("a-icon",{attrs:{type:"inbox"}}),e("span",[t._v(t._s(t.$t("dashboard.noData")))])],1)],2)]),e("div",{staticClass:"chart-panel chart-side"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"pie-chart"}}),e("span",[t._v(t._s(t.$t("dashboard.strategyAllocation")||"策略分布"))])],1)]),e("div",{ref:"pieChart",staticClass:"chart-body"})])]),e("div",{staticClass:"chart-row"},[e("div",{staticClass:"chart-panel chart-half"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"area-chart"}}),e("span",[t._v(t._s(t.$t("dashboard.drawdownCurve")||"回撤曲线"))])],1)]),e("div",{ref:"drawdownChart",staticClass:"chart-body chart-sm"})]),e("div",{staticClass:"chart-panel chart-half"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"clock-circle"}}),e("span",[t._v(t._s(t.$t("dashboard.hourlyDistribution")||"交易时段"))])],1)]),e("div",{ref:"hourlyChart",staticClass:"chart-body chart-sm"})])]),e("div",{staticClass:"chart-panel"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"ordered-list"}}),e("span",[t._v(t._s(t.$t("dashboard.strategyRanking")||"策略排行榜"))])],1)]),e("div",{staticClass:"strategy-ranking"},[0===t.strategyStats.length?e("div",{staticClass:"empty-state"},[e("a-icon",{attrs:{type:"inbox"}}),e("span",[t._v(t._s(t.$t("dashboard.noStrategyData")))])],1):e("div",{staticClass:"ranking-grid"},t._l(t.strategyStats.slice(0,6),function(a,s){return e("div",{key:a.strategy_id,staticClass:"ranking-card",class:{"rank-top":s<3}},[e("div",{staticClass:"rank-badge",class:"rank-".concat(s+1)},[t._v(t._s(s+1))]),e("div",{staticClass:"rank-info"},[e("div",{staticClass:"rank-name"},[t._v(t._s(a.strategy_name))]),e("div",{staticClass:"rank-stats"},[e("span",{staticClass:"stat"},[e("label",[t._v(t._s(t.$t("dashboard.ranking.totalProfit")))]),e("span",{class:a.total_pnl>=0?"positive":"negative"},[t._v(" "+t._s(a.total_pnl>=0?"+":"")+"$"+t._s(t.formatNumber(a.total_pnl))+" ")])]),e("span",{staticClass:"stat"},[e("label",[t._v(t._s(t.$t("dashboard.winRate")))]),e("span",[t._v(t._s(t.formatNumber(a.win_rate,1))+"%")])]),e("span",{staticClass:"stat"},[e("label",[t._v(t._s(t.$t("dashboard.profitFactor")))]),e("span",[t._v(t._s(t.formatNumber(a.profit_factor,2)))])]),e("span",{staticClass:"stat"},[e("label",[t._v(t._s(t.$t("dashboard.ranking.trades")))]),e("span",[t._v(t._s(a.total_trades))])])])]),e("div",{staticClass:"rank-pnl-bar"},[e("div",{staticClass:"bar-fill",class:a.total_pnl>=0?"positive":"negative",style:{width:"".concat(Math.min(100,Math.abs(a.total_pnl)/t.maxStrategyPnl*100),"%")}})])])}),0)])]),e("div",{staticClass:"table-row"},[e("div",{staticClass:"table-panel"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"stock"}}),e("span",[t._v(t._s(t.$t("dashboard.currentPositions")))])],1),e("div",{staticClass:"panel-badge"},[t._v(t._s((t.summary.current_positions||[]).length))])]),e("a-table",{staticClass:"pro-table",attrs:{columns:t.positionColumns,"data-source":t.summary.current_positions,rowKey:"id",pagination:!1,size:"small",scroll:{x:"max-content"}},scopedSlots:t._u([{key:"symbol",fn:function(a,s){return[e("div",{staticClass:"symbol-cell"},[e("span",{staticClass:"symbol-name"},[t._v(t._s(a))]),e("span",{staticClass:"symbol-strategy"},[t._v(t._s(s.strategy_name))])])]}},{key:"side",fn:function(a){return[e("span",{staticClass:"side-tag",class:"long"===a?"long":"short"},[t._v(" "+t._s("long"===a?"LONG":"SHORT")+" ")])]}},{key:"unrealized_pnl",fn:function(a,s){return[e("div",{staticClass:"pnl-cell"},[e("span",{class:a>=0?"positive":"negative"},[t._v(" "+t._s(a>=0?"+":"")+"$"+t._s(t.formatNumber(a))+" ")]),e("span",{staticClass:"pnl-percent",class:s.pnl_percent>=0?"positive":"negative"},[t._v(" "+t._s(s.pnl_percent>=0?"+":"")+t._s(t.formatNumber(s.pnl_percent))+"% ")])])]}}])})],1),e("div",{staticClass:"table-panel"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"history"}}),e("span",[t._v(t._s(t.$t("dashboard.recentTrades")))])],1)]),e("a-table",{staticClass:"pro-table",attrs:{columns:t.columns,"data-source":t.summary.recent_trades,rowKey:"id",pagination:{pageSize:8,size:"small"},size:"small",scroll:{x:"max-content"}},scopedSlots:t._u([{key:"type",fn:function(a){return[e("span",{staticClass:"type-tag",class:t.getTypeClass(a)},[t._v(" "+t._s(t.getSignalTypeText(a))+" ")])]}},{key:"profit",fn:function(a,s){return[e("span",{class:"--"!==t.formatProfitValue(a,s)?a>=0?"positive":"negative":""},[t._v(" "+t._s(t.formatProfitValue(a,s))+" ")])]}},{key:"time",fn:function(a){return[e("span",{staticClass:"time-cell"},[t._v(t._s(t.formatTime(a)))])]}}])})],1)]),e("div",{staticClass:"chart-panel orders-panel"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"unordered-list"}}),e("span",[t._v(t._s(t.$t("dashboard.pendingOrders")))]),e("a-tooltip",{attrs:{title:t.soundEnabled?t.$t("dashboard.clickToMute"):t.$t("dashboard.clickToUnmute")}},[e("a-icon",{staticClass:"sound-toggle",class:{"sound-off":!t.soundEnabled},attrs:{type:t.soundEnabled?"sound":"audio-muted"},on:{click:t.toggleSound}})],1)],1),e("div",{staticClass:"panel-badge"},[t._v(t._s(t.ordersPagination.total))])]),e("a-table",{staticClass:"pro-table",attrs:{columns:t.orderColumns,"data-source":t.pendingOrders,rowKey:"id",pagination:{current:t.ordersPagination.current,pageSize:t.ordersPagination.pageSize,total:t.ordersPagination.total,showSizeChanger:!0,size:"small",showTotal:function(e){return t.$t("dashboard.totalOrders",{total:e})}},size:"small",loading:t.ordersLoading,scroll:{x:1200}},on:{change:t.handleOrdersTableChange},scopedSlots:t._u([{key:"strategy_name",fn:function(a,s){return[e("div",{staticClass:"symbol-cell"},[e("span",{staticClass:"symbol-name"},[t._v(t._s(a||"-"))]),e("span",{staticClass:"symbol-strategy"},[t._v("ID: "+t._s(s.strategy_id))])])]}},{key:"symbol",fn:function(a){return[e("span",{staticClass:"symbol-tag"},[t._v(t._s(a))])]}},{key:"signal_type",fn:function(a){return[e("span",{staticClass:"type-tag",class:t.getTypeClass(a)},[t._v(" "+t._s(t.getSignalTypeText(a))+" ")])]}},{key:"exchange",fn:function(a,s){return[s&&(s.exchange_display||s.exchange_id||a)?e("span",{staticClass:"exchange-tag",class:(s.exchange_display||s.exchange_id||a).toLowerCase()},[t._v(" "+t._s(String(s.exchange_display||s.exchange_id||a).toUpperCase())+" ")]):e("span",{staticClass:"text-muted"},[t._v("-")]),s&&s.market_type?e("div",{staticClass:"market-type"},[t._v(" "+t._s(String(s.market_type).toUpperCase())+" ")]):t._e()]}},{key:"notify",fn:function(a,s){return[e("div",{staticClass:"notify-icons"},[t._l(s&&s.notify_channels?s.notify_channels:[],function(a){return e("a-tooltip",{key:"".concat(s.id,"-").concat(a),attrs:{title:String(a)}},[e("a-icon",{staticClass:"notify-icon",attrs:{type:t.getNotifyIconType(a)}})],1)}),s&&s.notify_channels&&0!==s.notify_channels.length?t._e():e("span",{staticClass:"text-muted"},[t._v("-")])],2)]}},{key:"status",fn:function(a,s){return[e("span",{staticClass:"status-tag",class:a},[t._v(" "+t._s(t.getStatusText(a))+" ")]),"failed"===a&&s.error_message?e("div",{staticClass:"error-hint"},[e("a-tooltip",{attrs:{title:s.error_message}},[e("a-icon",{attrs:{type:"exclamation-circle"}}),e("span",[t._v(t._s(t.$t("dashboard.viewError")))])],1)],1):t._e()]}},{key:"amount",fn:function(a,s){return[e("div",[t._v(t._s(t.formatNumber(a,8)))]),s.filled_amount?e("div",{staticClass:"sub-text"},[t._v(" "+t._s(t.$t("dashboard.filled"))+": "+t._s(t.formatNumber(s.filled_amount,8))+" ")]):t._e()]}},{key:"price",fn:function(a,s){return[s.filled_price?e("div",[t._v(t._s(t.formatNumber(s.filled_price)))]):e("div",{staticClass:"text-muted"},[t._v("-")])]}},{key:"time_info",fn:function(a,s){return[e("div",{staticClass:"time-cell"},[t._v(t._s(t.formatTime(s.created_at)))]),s.executed_at?e("div",{staticClass:"sub-text"},[t._v(" "+t._s(t.formatTime(s.executed_at))+" ")]):t._e()]}}])})],1)])},pt=[],mt=(a(36033),a(68156),a(29362)),gt={summary:"/api/dashboard/summary",pendingOrders:"/api/dashboard/pendingOrders"};function ht(){return(0,y.Ay)({url:gt.summary,method:"get"})}function _t(t){return(0,y.Ay)({url:gt.pendingOrders,method:"get",params:t})}var yt=a(95353),ft={name:"Dashboard",props:{hideSetupGuide:{type:Boolean,default:!1}},data:function(){return{summary:{ai_strategy_count:0,indicator_strategy_count:0,total_equity:0,total_pnl:0,total_realized_pnl:0,total_unrealized_pnl:0,performance:{},strategy_stats:[],daily_pnl_chart:[],strategy_pnl_chart:[],monthly_returns:[],hourly_distribution:[],calendar_months:[],recent_trades:[],current_positions:[]},currentCalendarIndex:0,pieChart:null,drawdownChart:null,hourlyChart:null,pendingOrders:[],ordersLoading:!1,ordersPagination:{current:1,pageSize:20,total:0},orderPollTimer:null,lastOrderId:0,orderPollIntervalMs:5e3,soundEnabled:!0,beepCtx:null}},computed:(0,u.A)((0,u.A)({},(0,yt.aH)({navTheme:function(t){return t.app.theme}})),{},{isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},performance:function(){return this.summary.performance||{}},strategyStats:function(){return this.summary.strategy_stats||[]},showSetupGuide:function(){var t=Number(this.summary.indicator_strategy_count||0),e=Array.isArray(this.summary.current_positions)&&this.summary.current_positions.length>0,a=Array.isArray(this.summary.recent_trades)&&this.summary.recent_trades.length>0;return 0===t||!e&&!a},maxStrategyPnl:function(){var t=this.strategyStats;return t.length?Math.max.apply(Math,(0,c.A)(t.map(function(t){return Math.abs(t.total_pnl||0)})).concat([1])):1},avgTradesPerDay:function(){var t=this.summary.daily_pnl_chart||[],e=t.length||1,a=this.performance.total_trades||0;return(a/e).toFixed(1)},calendarMonths:function(){return this.summary.calendar_months||[]},currentCalendarMonth:function(){var t=this.calendarMonths;return t.length&&t[this.currentCalendarIndex]||null},currentMonthLabel:function(){var t=this.currentCalendarMonth;if(!t)return"-";var e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];return"".concat(e[t.month-1]," ").concat(t.year)},weekdays:function(){return["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},calendarFirstDayOffset:function(){var t=this.currentCalendarMonth;return t?t.first_weekday:0},orderStrategyFilters:function(){var t,e=Array.isArray(this.pendingOrders)?this.pendingOrders:[],a=new Map,s=(0,d.A)(e);try{for(s.s();!(t=s.n()).done;){var i=t.value,r=i&&i.strategy_id;if(void 0!==r&&null!==r&&!a.has(String(r))){var n=i&&i.strategy_name?String(i.strategy_name):"",o=n?"".concat(n," (ID: ").concat(r,")"):"ID: ".concat(r);a.set(String(r),{text:o,value:String(r)})}}}catch(l){s.e(l)}finally{s.f()}return Array.from(a.values()).sort(function(t,e){return String(t.text).localeCompare(String(e.text))})},columns:function(){var t=this;return[{title:this.$t("dashboard.table.time"),dataIndex:"created_at",scopedSlots:{customRender:"time"},width:150},{title:this.$t("dashboard.table.symbol"),dataIndex:"symbol",width:100},{title:this.$t("dashboard.table.type"),dataIndex:"type",scopedSlots:{customRender:"type"},width:90},{title:this.$t("dashboard.table.price"),dataIndex:"price",customRender:function(e){return t.formatNumber(e)},width:100},{title:this.$t("dashboard.table.profit"),dataIndex:"profit",scopedSlots:{customRender:"profit"},align:"right",width:100}]},positionColumns:function(){var t=this;return[{title:this.$t("dashboard.table.symbol"),dataIndex:"symbol",scopedSlots:{customRender:"symbol"}},{title:this.$t("dashboard.table.side"),dataIndex:"side",scopedSlots:{customRender:"side"}},{title:this.$t("dashboard.table.size"),dataIndex:"size",customRender:function(e){return t.formatNumber(e,4)}},{title:this.$t("dashboard.table.entryPrice"),dataIndex:"entry_price",customRender:function(e){return t.formatNumber(e)}},{title:this.$t("dashboard.table.pnl"),dataIndex:"unrealized_pnl",scopedSlots:{customRender:"unrealized_pnl"},align:"right"}]},orderColumns:function(){return[{title:this.$t("dashboard.orderTable.strategy"),dataIndex:"strategy_name",scopedSlots:{customRender:"strategy_name"},filters:this.orderStrategyFilters,filterMultiple:!0,onFilter:function(t,e){return String(e&&e.strategy_id)===String(t)},width:150},{title:this.$t("dashboard.orderTable.exchange"),dataIndex:"exchange_id",scopedSlots:{customRender:"exchange"},width:120},{title:this.$t("dashboard.orderTable.notify"),dataIndex:"notify_channels",scopedSlots:{customRender:"notify"},width:100},{title:this.$t("dashboard.orderTable.symbol"),dataIndex:"symbol",scopedSlots:{customRender:"symbol"},width:110},{title:this.$t("dashboard.orderTable.signalType"),dataIndex:"signal_type",scopedSlots:{customRender:"signal_type"},width:100},{title:this.$t("dashboard.orderTable.amount"),dataIndex:"amount",scopedSlots:{customRender:"amount"},width:130},{title:this.$t("dashboard.orderTable.price"),dataIndex:"filled_price",scopedSlots:{customRender:"price"},width:100},{title:this.$t("dashboard.orderTable.status"),dataIndex:"status",scopedSlots:{customRender:"status"},width:130},{title:this.$t("dashboard.orderTable.timeInfo"),dataIndex:"created_at",scopedSlots:{customRender:"time_info"},width:160}]}}),mounted:function(){this.fetchData(),this.fetchPendingOrders(),this.startOrderPolling(),window.addEventListener("resize",this.handleResize)},beforeDestroy:function(){this.stopOrderPolling(),window.removeEventListener("resize",this.handleResize),this.pieChart&&this.pieChart.dispose(),this.drawdownChart&&this.drawdownChart.dispose(),this.hourlyChart&&this.hourlyChart.dispose()},methods:{goToStrategyManagement:function(){this.$router.push("/trading-assistant?tab=strategy")},goToStrategyCreate:function(){this.$router.push("/trading-assistant?tab=strategy&mode=create")},fetchData:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,ht();case 1:a=e.v,1===a.code&&(t.summary=(0,u.A)((0,u.A)({},t.summary),a.data),t.$nextTick(function(){t.initCharts()})),e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}))()},fetchPendingOrders:function(t,e){var a=this;return(0,l.A)((0,o.A)().m(function s(){var i,r,n,l;return(0,o.A)().w(function(s){while(1)switch(s.p=s.n){case 0:return a.ordersLoading=!0,s.p=1,i=t||a.ordersPagination.current||1,r=e||a.ordersPagination.pageSize||20,s.n=2,_t({page:i,pageSize:r});case 2:n=s.v,1===n.code&&(l=n.data||{},a.pendingOrders=l.list||[],a.ordersPagination.current=Number(l.page||i||1),a.ordersPagination.pageSize=Number(l.pageSize||r||20),a.ordersPagination.total=Number(l.total||0)),s.n=4;break;case 3:s.p=3,s.v;case 4:return s.p=4,a.ordersLoading=!1,s.f(4);case 5:return s.a(2)}},s,null,[[1,3,4,5]])}))()},playOrderBeep:function(){if(this.soundEnabled)try{var t=window.AudioContext||window.webkitAudioContext;if(!t)return;this.beepCtx||(this.beepCtx=new t);var e=this.beepCtx;"suspended"===e.state&&"function"===typeof e.resume&&e.resume().catch(function(){});var a=function(t,a){var s=e.createOscillator(),i=e.createGain();s.type="sine",s.frequency.value=a,i.gain.value=.08,s.connect(i),i.connect(e.destination),s.start(t),s.stop(t+.12)},s=e.currentTime;a(s,880),a(s+.18,1100)}catch(i){}},startOrderPolling:function(){var t=this;this.stopOrderPolling(),this.initLastOrderId(),this.orderPollTimer=setInterval(function(){t.pollNewOrders()},this.orderPollIntervalMs)},stopOrderPolling:function(){this.orderPollTimer&&(clearInterval(this.orderPollTimer),this.orderPollTimer=null)},initLastOrderId:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,_t({page:1,pageSize:1});case 1:a=e.v,1===a.code&&a.data&&a.data.list&&a.data.list.length>0&&(t.lastOrderId=a.data.list[0].id||0),e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}))()},pollNewOrders:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i,r,n,l,c,u;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,_t({page:1,pageSize:10});case 1:if(a=e.v,1===a.code&&a.data&&a.data.list){e.n=2;break}return e.a(2);case 2:if(s=a.data.list||[],0!==s.length){e.n=3;break}return e.a(2);case 3:i=!1,r=t.lastOrderId,n=(0,d.A)(s);try{for(n.s();!(l=n.n()).done;)c=l.value,u=c.id||0,u>t.lastOrderId&&(i=!0,u>r&&(r=u))}catch(o){n.e(o)}finally{n.f()}i&&(t.lastOrderId=r,t.playOrderBeep(),t.fetchPendingOrders(),t.$notification.info({message:t.$t("dashboard.newOrderNotify"),description:t.$t("dashboard.newOrderDesc"),duration:4})),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2)}},e,null,[[0,4]])}))()},toggleSound:function(){this.soundEnabled=!this.soundEnabled,this.soundEnabled?this.$message.success(this.$t("dashboard.soundEnabled")):this.$message.info(this.$t("dashboard.soundDisabled"))},handleOrdersTableChange:function(t){var e=t&&t.current?t.current:1,a=t&&t.pageSize?t.pageSize:this.ordersPagination.pageSize||20;this.ordersPagination.current=e,this.ordersPagination.pageSize=a,this.fetchPendingOrders(e,a)},getTypeClass:function(t){if(!t)return"";var e=t.toLowerCase();return e.includes("open_long")||e.includes("add_long")?"long":e.includes("open_short")||e.includes("add_short")?"short":e.includes("close_long")?"close-long":e.includes("close_short")?"close-short":""},getSignalTypeColor:function(t){return t?(t=t.toLowerCase(),t.includes("open_long")||t.includes("add_long")?"green":t.includes("open_short")||t.includes("add_short")?"red":t.includes("close_long")?"orange":t.includes("close_short")?"purple":"blue"):"default"},getSignalTypeText:function(t){if(!t)return"-";var e={open_long:this.$t("dashboard.signalType.openLong"),open_short:this.$t("dashboard.signalType.openShort"),close_long:this.$t("dashboard.signalType.closeLong"),close_short:this.$t("dashboard.signalType.closeShort"),add_long:this.$t("dashboard.signalType.addLong"),add_short:this.$t("dashboard.signalType.addShort")};return e[t.toLowerCase()]||t.toUpperCase()},getStatusColor:function(t){var e={pending:"orange",processing:"blue",completed:"green",failed:"red",cancelled:"default"};return e[t]||"default"},getStatusText:function(t){if(!t)return"-";var e={pending:this.$t("dashboard.status.pending"),processing:this.$t("dashboard.status.processing"),completed:this.$t("dashboard.status.completed"),failed:this.$t("dashboard.status.failed"),cancelled:this.$t("dashboard.status.cancelled")};return e[t.toLowerCase()]||t.toUpperCase()},getNotifyIconType:function(t){var e=String(t||"").trim().toLowerCase(),a={browser:"bell",webhook:"link",discord:"comment",telegram:"message",tg:"message",tele:"message",email:"mail",phone:"phone"};return a[e]||"notification"},getExchangeTagColor:function(t){var e=String(t||"").trim().toLowerCase(),a={binance:"gold",okx:"purple",bitget:"cyan",signal:"geekblue"};return a[e]||"blue"},formatNumber:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return void 0===t||null===t?"0.00":Number(t).toLocaleString("en-US",{minimumFractionDigits:e,maximumFractionDigits:e})},formatProfitValue:function(t,e){if(null===t||void 0===t)return"--";var a=parseFloat(t),s=["open_long","open_short","add_long","add_short"];if(0===a&&e&&s.includes(e.type))return"--";if(Math.abs(a)<1e-6)return e&&s.includes(e.type)?"--":"$0.00";var i=a>=0?"+":"";return"".concat(i,"$").concat(this.formatNumber(a))},formatCompactNumber:function(t){if(void 0===t||null===t)return"0";var e=Math.abs(t);return e>=1e6?(t/1e6).toFixed(1)+"M":e>=1e3?(t/1e3).toFixed(1)+"k":e>=100?Math.round(t):t.toFixed(0)},prevMonth:function(){this.currentCalendarIndex0&&this.currentCalendarIndex--},getDayProfit:function(t){var e=this.currentCalendarMonth;if(!e||!e.days)return null;var a=String(t).padStart(2,"0");return void 0!==e.days[a]?e.days[a]:null},getDayClass:function(t){var e=this.getDayProfit(t);return null===e?"no-data":e>0?"profit":e<0?"loss":"zero"},formatTime:function(t){if(!t)return"-";try{var e;if("string"===typeof t&&t.includes("-")&&t.includes(":"))e=new Date(t);else{if(!("number"===typeof t||"string"===typeof t&&/^\d+$/.test(t)))return"-";var a="string"===typeof t?parseInt(t,10):t,s=a<1e12?1e3*a:a;e=new Date(s)}return isNaN(e.getTime())?"-":e.toLocaleString()}catch(i){return"-"}},initCharts:function(){this.initPieChart(),this.initDrawdownChart(),this.initHourlyChart()},initPieChart:function(){var t=this,e=this.$refs.pieChart;if(e){this.pieChart=mt.init(e);var a=Array.isArray(this.summary.strategy_stats)?this.summary.strategy_stats:[],s=Array.isArray(this.summary.strategy_pnl_chart)?this.summary.strategy_pnl_chart:[],i=[];i=a.length>0?a.map(function(t){var e=t&&t.strategy_name?String(t.strategy_name):"-",a=Number(t&&t.total_pnl?t.total_pnl:0),s=Number(t&&t.total_trades?t.total_trades:0),i=0!==a?Math.abs(a):s;return{name:e,value:i,signedValue:a,trades:s}}).filter(function(t){return t.value>0}):s.map(function(t){var e=t&&t.name?String(t.name):"-",a=Number(t&&t.value?t.value:0);return{name:e,value:Math.abs(a),signedValue:a}}).filter(function(t){return t.value>0});var r=this.isDarkTheme,n=r?"#9ca3af":"#6b7280",o=[new mt.graphic.LinearGradient(0,0,1,1,[{offset:0,color:"#3b82f6"},{offset:1,color:"#1d4ed8"}]),new mt.graphic.LinearGradient(0,0,1,1,[{offset:0,color:"#8b5cf6"},{offset:1,color:"#6d28d9"}]),new mt.graphic.LinearGradient(0,0,1,1,[{offset:0,color:"#10b981"},{offset:1,color:"#059669"}]),new mt.graphic.LinearGradient(0,0,1,1,[{offset:0,color:"#f59e0b"},{offset:1,color:"#d97706"}]),new mt.graphic.LinearGradient(0,0,1,1,[{offset:0,color:"#ec4899"},{offset:1,color:"#be185d"}]),new mt.graphic.LinearGradient(0,0,1,1,[{offset:0,color:"#06b6d4"},{offset:1,color:"#0891b2"}])],l={backgroundColor:"transparent",tooltip:{trigger:"item",backgroundColor:r?"rgba(17, 24, 39, 0.95)":"rgba(255, 255, 255, 0.95)",borderColor:r?"#374151":"#e5e7eb",textStyle:{color:r?"#f3f4f6":"#1f2937"},formatter:function(e){var a=e&&e.data&&"number"===typeof e.data.signedValue?e.data.signedValue:0,s=(a>=0?"+":"")+t.formatNumber(a,2),i=a>=0?"#10b981":"#ef4444";return'\n
    \n
    '.concat(e.name,'
    \n
    占比 ').concat(e.percent,'%
    \n
    PNL $').concat(s,"
    \n
    \n ")}},legend:{bottom:10,left:"center",itemWidth:12,itemHeight:12,itemGap:16,textStyle:{color:n,fontSize:11}},color:o,series:[{name:"策略分布",type:"pie",radius:["50%","75%"],center:["50%","45%"],avoidLabelOverlap:!1,itemStyle:{borderRadius:6,borderColor:r?"#1f2937":"#ffffff",borderWidth:3},label:{show:!1},emphasis:{label:{show:!0,fontSize:14,fontWeight:"bold",color:r?"#f3f4f6":"#1f2937"},scaleSize:8},labelLine:{show:!1},data:i.length>0?i:[{value:1,name:this.$t("dashboard.noData"),signedValue:0}]}]};this.pieChart.setOption(l)}},initDrawdownChart:function(){var t=this,e=this.$refs.drawdownChart;if(e){this.drawdownChart=mt.init(e);var a,s=(this.summary.daily_pnl_chart||[]).map(function(t){return t.date}),i=(this.summary.daily_pnl_chart||[]).map(function(t){return Number(t.profit||0)}),r=[],n=0,o=(0,d.A)(i);try{for(o.s();!(a=o.n()).done;){var l=a.value;n+=Number(l||0),r.push(n)}}catch(f){o.e(f)}finally{o.f()}var c=-1/0,u=0,p=0,m=r.map(function(t,e){c=Math.max(c,t);var a=Number((t-c).toFixed(2));return a\n
    ').concat(s,'
    \n
    \n \n \n ').concat(t.$t("dashboard.drawdown")||"Drawdown",'\n \n -$').concat(r,'\n
    \n
    \n
    \n
    \n \n ')}},grid:{left:55,right:20,bottom:35,top:20,containLabel:!1},xAxis:{type:"category",data:s,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:h,fontSize:10,formatter:function(t){return t.slice(5)}}},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:h,fontSize:10,formatter:function(t){return Math.abs(t)>=1e3?"-$"+(Math.abs(t)/1e3).toFixed(1)+"k":0===t?"0":"-$"+Math.abs(t)}},splitLine:{lineStyle:{color:_,type:[4,4]}},max:0},series:[{name:this.$t("dashboard.drawdown")||"Drawdown",type:"line",data:m,smooth:.3,showSymbol:!1,lineStyle:{width:2.5,color:new mt.graphic.LinearGradient(0,0,1,0,[{offset:0,color:"#ef4444"},{offset:.5,color:"#f87171"},{offset:1,color:"#fca5a5"}]),shadowColor:"rgba(239, 68, 68, 0.4)",shadowBlur:8,shadowOffsetY:4},areaStyle:{color:new mt.graphic.LinearGradient(0,0,0,1,[{offset:0,color:g?"rgba(239, 68, 68, 0.4)":"rgba(239, 68, 68, 0.25)"},{offset:.5,color:g?"rgba(248, 113, 113, 0.15)":"rgba(248, 113, 113, 0.1)"},{offset:1,color:"transparent"}])},markPoint:u<0?{symbol:"pin",symbolSize:45,itemStyle:{color:new mt.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"#f87171"},{offset:1,color:"#dc2626"}]),shadowColor:"rgba(239, 68, 68, 0.5)",shadowBlur:10},label:{show:!0,color:"#fff",fontSize:10,fontWeight:"bold",formatter:function(){return t.$t("dashboard.label.maxDrawdownPoint")||"MAX"}},data:[{name:this.$t("dashboard.maxDrawdown")||"Max Drawdown",coord:[p,u]}]}:void 0,markLine:{silent:!0,symbol:"none",lineStyle:{color:g?"#52525b":"#a1a1aa",type:"dashed",width:1},data:[{yAxis:0}],label:{show:!1}}}]};this.drawdownChart.setOption(y)}},initHourlyChart:function(){var t=this,e=this.$refs.hourlyChart;if(e){this.hourlyChart=mt.init(e);var a=this.summary.hourly_distribution||[],s=a.map(function(t){return"".concat(String(t.hour).padStart(2,"0"),":00")}),i=a.map(function(t){return t.count||0}),r=a.map(function(t){return t.profit||0}),n=this.isDarkTheme,o=n?"#9ca3af":"#6b7280",l=n?"rgba(75, 85, 99, 0.3)":"rgba(229, 231, 235, 0.8)",c={backgroundColor:"transparent",tooltip:{trigger:"axis",backgroundColor:n?"rgba(17, 24, 39, 0.95)":"rgba(255, 255, 255, 0.95)",borderColor:n?"#374151":"#e5e7eb",textStyle:{color:n?"#f3f4f6":"#1f2937"},formatter:function(e){var a,s=Array.isArray(e)?e:[],i=s[0]&&s[0].axisValue?s[0].axisValue:"",r=0,l=0,c=t.$t("dashboard.tradeCount")||"Trade Count",u=t.$t("dashboard.profit")||"Profit",p=t.$t("dashboard.unit.trades")||"",m=(0,d.A)(s);try{for(m.s();!(a=m.n()).done;){var g=a.value;g.seriesName===c&&(r=g.data||0),g.seriesName===u&&(l=g.data||0)}}catch(y){m.e(y)}finally{m.f()}var h=l>=0?"#10b981":"#ef4444",_=(l>=0?"+":"")+t.formatNumber(l,2);return'\n
    \n
    '.concat(i,'
    \n
    ').concat(c,' ').concat(r," ").concat(p,'
    \n
    ').concat(u,' $').concat(_,"
    \n
    \n ")}},grid:{left:50,right:20,bottom:30,top:10,containLabel:!1},xAxis:{type:"category",data:s,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:o,fontSize:10,interval:3}},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:o,fontSize:10},splitLine:{lineStyle:{color:l,type:"dashed"}}},series:[{name:this.$t("dashboard.tradeCount")||"Trade Count",type:"bar",data:i,barMaxWidth:16,itemStyle:{borderRadius:[3,3,0,0],color:new mt.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"#60a5fa"},{offset:1,color:"#3b82f6"}])}},{name:this.$t("dashboard.profit")||"Profit",type:"line",data:r,smooth:!0,showSymbol:!1,lineStyle:{width:2,color:"#a855f7"}}]};this.hourlyChart.setOption(c)}},handleResize:function(){this.pieChart&&this.pieChart.resize(),this.drawdownChart&&this.drawdownChart.resize(),this.hourlyChart&&this.hourlyChart.resize()}}},vt=ft,bt=(0,C.A)(vt,ut,pt,!1,null,"80b7f8d0",null),xt=bt.exports,Ct=a(75402),kt=["BTC/USDT","ETH/USDT","BNB/USDT","SOL/USDT","ADA/USDT","XRP/USDT","DOGE/USDT","DOT/USDT","MATIC/USDT","AVAX/USDT","LINK/USDT","UNI/USDT","LTC/USDT","ATOM/USDT","ETC/USDT"],St=[{value:"binance",labelKey:"binance"},{value:"okx",labelKey:"okx"},{value:"bitget",labelKey:"bitget"},{value:"bybit",labelKey:"bybit"},{value:"coinbaseexchange",labelKey:"coinbaseexchange"},{value:"kraken",labelKey:"kraken"},{value:"kucoin",labelKey:"kucoin"},{value:"gate",labelKey:"gate"},{value:"bitfinex",labelKey:"bitfinex"},{value:"deepcoin",labelKey:"deepcoin"}],wt=[{value:"ibkr",labelKey:"ibkr",name:"Interactive Brokers"}],$t=[{value:"mt5",labelKey:"mt5",name:"MetaTrader 5"}],At={name:"TradingAssistant",mixins:[_.t],components:{TradingRecords:S,PositionRecords:M,StrategyTypeSelector:O,StrategyEditor:Q,PerformanceAnalysis:it,StrategyLogs:dt,DashboardOverview:xt,ExchangeAccountModal:Ct.A},computed:{showAssistantGuide:function(){return!this.assistantGuideDismissed},assistantGuideStorageKey:function(){var t,e=(null===(t=this.$store.getters.userInfo)||void 0===t?void 0:t.id)||"guest";return"trading-assistant-guide-dismissed:".concat(e)},isAdvancedMode:function(){return"advanced"===this.creationMode},isSimpleMode:function(){return"simple"===this.creationMode},isSimpleCreateMode:function(){return this.isSimpleMode&&!this.editingStrategy},strategyFormWrapClass:function(){var t=["strategy-form-modal"];return this.isMobile&&t.push("mobile-modal"),this.isDarkTheme&&t.push("strategy-form-modal-dark"),t.join(" ")},displayCurrentStep:function(){return"script"===this.strategyMode?this.currentStep:this.isSimpleMode&&!this.editingStrategy?0===this.currentStep?0:1:this.currentStep},isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},needsPassphrase:function(){return["okx","okex","coinbaseexchange","kucoin","bitget","deepcoin"].includes(this.currentExchangeId)},isIBKRMarket:function(){return"USStock"===this.selectedMarketCategory},isMT5Market:function(){return"Forex"===this.selectedMarketCategory},isBrokerMarket:function(){return this.isIBKRMarket||this.isMT5Market},filteredExchangeCredentials:function(){var t=this;return this.exchangeCredentials&&Array.isArray(this.exchangeCredentials)?this.exchangeCredentials.filter(function(e){return t.isCredentialCompatible(e)}):[]},formattedExchangeOptions:function(){var t=this;return St.map(function(e){var a="";try{if(e.labelKey){var s="trading-assistant.exchangeNames.".concat(e.labelKey),i=t.$t(s);i!==s&&(a=i)}}catch(r){}return a||(a=e.value.charAt(0).toUpperCase()+e.value.slice(1)),(0,u.A)((0,u.A)({},e),{},{displayName:a})})},totalPnl:function(){return null!==this.currentEquity&&this.selectedStrategy&&this.selectedStrategy.initial_capital?this.currentEquity-(this.selectedStrategy.initial_capital||0):null},totalPnlPercent:function(){return null!==this.totalPnl&&this.selectedStrategy&&this.selectedStrategy.initial_capital?0===this.selectedStrategy.initial_capital?0:this.totalPnl/this.selectedStrategy.initial_capital*100:null},getEquityColorClass:function(){return null===this.totalPnl?"":this.totalPnl>=0?"text-success":"text-danger"},getPnlColorClass:function(){return null===this.totalPnl?"":this.totalPnl>=0?"text-success":"text-danger"},isCryptoMarket:function(){var t=this.selectedMarketCategory||"Crypto";return"crypto"===String(t).toLowerCase()},canUseLiveTrading:function(){var t=this.selectedMarketCategory||"Crypto";return"crypto"===String(t).toLowerCase()||("USStock"===t||"Forex"===t)},isLiveTradingAvailable:function(){var t=this.selectedMarketCategory||"Crypto",e=this.currentExchangeId||"";return"crypto"===String(t).toLowerCase()?["binance","okx","bitget","bybit","coinbaseexchange","kraken","kucoin","gate","bitfinex"].includes(e):"USStock"===t?"ibkr"===this.currentBrokerId:"Forex"===t&&"mt5"===this.currentBrokerId},showDemoTradingSwitch:function(){return this.currentExchangeId&&"binance"===this.currentExchangeId.toLowerCase()},brokerOptions:function(){var t=this;return wt.map(function(e){var a="";try{var s="trading-assistant.brokerNames.".concat(e.labelKey),i=t.$t(s);i!==s&&(a=i)}catch(r){}return a||(a=e.name||e.value.toUpperCase()),(0,u.A)((0,u.A)({},e),{},{displayName:a})})},forexBrokerOptions:function(){var t=this;return $t.map(function(e){var a="";try{var s="trading-assistant.brokerNames.".concat(e.labelKey),i=t.$t(s);i!==s&&(a=i)}catch(r){}return a||(a=e.name||e.value.toUpperCase()),(0,u.A)((0,u.A)({},e),{},{displayName:a})})},cryptoExchangeOptions:function(){var t=this;return St.map(function(e){var a="";try{if(e.labelKey){var s="trading-assistant.exchangeNames.".concat(e.labelKey),i=t.$t(s);i!==s&&(a=i)}}catch(r){}return a||(a=e.value.charAt(0).toUpperCase()+e.value.slice(1)),(0,u.A)((0,u.A)({},e),{},{displayName:a})})},groupedStrategies:function(){return"symbol"===this.groupByMode?this.groupedBySymbol:this.groupedByStrategy},groupedByStrategy:function(){var t,e={},a=[],s=(0,d.A)(this.strategies);try{for(s.s();!(t=s.n()).done;){var i=t.value,r=i.strategy_group_id;r&&r.trim()?(e[r]||(e[r]={id:r,baseName:i.group_base_name||i.strategy_name.split("-")[0],strategies:[],runningCount:0,stoppedCount:0}),e[r].strategies.push(i),"running"===i.status?e[r].runningCount++:e[r].stoppedCount++):a.push(i)}}catch(o){s.e(o)}finally{s.f()}var n=Object.values(e).sort(function(t,e){var a=Math.max.apply(Math,(0,c.A)(t.strategies.map(function(t){return t.created_at||0}))),s=Math.max.apply(Math,(0,c.A)(e.strategies.map(function(t){return t.created_at||0})));return s-a});return{groups:n,ungrouped:a}},groupedBySymbol:function(){var t,e={},a=[],s=(0,d.A)(this.strategies);try{for(s.s();!(t=s.n()).done;){var i=t.value,r=i.trading_config||{},n=r.symbol;if(n&&n.trim()){e[n]||(e[n]={id:"symbol_".concat(n),baseName:n,strategies:[],runningCount:0,stoppedCount:0});var o=(0,u.A)((0,u.A)({},i),{},{displayInfo:{strategyName:i.strategy_name||i.group_base_name||"Unnamed",timeframe:r.timeframe||"-",indicatorName:i.indicator_name||i.indicator_config&&i.indicator_config.name||"-"}});e[n].strategies.push(o),"running"===i.status?e[n].runningCount++:e[n].stoppedCount++}else a.push(i)}}catch(c){s.e(c)}finally{s.f()}var l=Object.values(e).sort(function(t,e){return t.baseName.localeCompare(e.baseName)});return{groups:l,ungrouped:a}},unconfiguredChannels:function(){var t=[];return this.notifyChannelsUi.includes("telegram")&&(this.userNotificationSettings.telegram_bot_token||this.userNotificationSettings.telegram_chat_id||t.push("Telegram")),this.notifyChannelsUi.includes("email")&&(this.userNotificationSettings.email||t.push("Email")),this.notifyChannelsUi.includes("discord")&&(this.userNotificationSettings.discord_webhook||t.push("Discord")),this.notifyChannelsUi.includes("webhook")&&(this.userNotificationSettings.webhook_url||t.push("Webhook")),t}},data:function(){return{topTab:"overview",loading:!1,loadingRecords:!1,strategies:[],selectedStrategy:null,showFormModal:!1,creationMode:"simple",showAdvancedSettings:!1,pendingRouteIndicatorId:"",lastAutoStrategyName:"",strategyMode:"",strategyCode:"",pendingScriptTemplateKey:"",showModeSelector:!1,strategyType:"indicator",selectedMarketCategory:"Crypto",currentStep:0,saving:!1,loadingIndicators:!1,availableIndicators:[],selectedIndicator:null,indicatorParams:[],indicatorParamValues:{},cryptoSymbols:kt,loadingWatchlist:!1,watchlist:[],exchangeOptions:St,currentExchangeId:"",currentBrokerId:"ibkr",connectionTestResult:null,indicatorsLoaded:!1,editingStrategy:null,currentEquity:null,equityPollingTimer:null,backtestCollapseKeys:["risk"],trailingEnabledUi:!1,entryPctMaxUi:100,aiFilterEnabledUi:!1,isEditMode:!1,supportedIPs:[],executionModeUi:"signal",liveDisclaimerAckUi:!1,notifyChannelsUi:["browser"],userNotificationSettings:{default_channels:["browser"],telegram_bot_token:"",telegram_chat_id:"",email:"",phone:"",discord_webhook:"",webhook_url:"",webhook_token:""},loadingExchangeCredentials:!1,exchangeCredentials:[],showExchangeAccountModal:!1,saveCredentialUi:!1,suppressApiClearOnce:!1,selectedSymbols:[],crossSectionalSymbols:[],collapsedGroups:{},groupByMode:"strategy",showAddSymbolModal:!1,addSymbolMarket:"Crypto",addSymbolMarketTypes:[{value:"Crypto",i18nKey:"dashboard.analysis.market.Crypto"},{value:"USStock",i18nKey:"dashboard.analysis.market.USStock"},{value:"Forex",i18nKey:"dashboard.analysis.market.Forex"},{value:"Futures",i18nKey:"dashboard.analysis.market.Futures"}],addSymbolKeyword:"",searchingSymbol:!1,symbolSearchResults:[],selectedAddSymbol:null,hasSearchedSymbol:!1,addingSymbol:!1,hotSymbols:[],loadingHotSymbols:!1,searchTimer:null,assistantGuideDismissed:!1}},beforeCreate:function(){this.form=this.$form.createForm(this)},mounted:function(){var t=this;this.restoreAssistantGuidePreference(),"strategy"!==this.$route.query.tab&&"create"!==this.$route.query.mode||(this.topTab="strategy"),this.loadStrategies(),this.loadUserNotificationSettings(),"create"===this.$route.query.mode&&this.$nextTick(function(){var e=t.$route.query.indicator_id;e?(t.strategyMode="signal",t.creationMode="simple",t.pendingRouteIndicatorId=String(e),t._openCreateModal()):t.handleCreateStrategy()})},beforeDestroy:function(){this.stopEquityPolling()},methods:{restoreAssistantGuidePreference:function(){try{this.assistantGuideDismissed="1"===window.localStorage.getItem(this.assistantGuideStorageKey)}catch(t){this.assistantGuideDismissed=!1}},dismissAssistantGuide:function(){this.assistantGuideDismissed=!0;try{window.localStorage.setItem(this.assistantGuideStorageKey,"1")}catch(t){}},goToStrategyTab:function(){this.topTab="strategy"},openCreateStrategyFromGuide:function(){var t=this;this.topTab="strategy",this.$nextTick(function(){t.handleCreateStrategy()})},loadUserNotificationSettings:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,h.vF)();case 1:a=e.v,1===a.code&&a.data&&(t.userNotificationSettings={default_channels:a.data.default_channels||["browser"],telegram_bot_token:a.data.telegram_bot_token||"",telegram_chat_id:a.data.telegram_chat_id||"",email:a.data.email||"",phone:a.data.phone||"",discord_webhook:a.data.discord_webhook||"",webhook_url:a.data.webhook_url||"",webhook_token:a.data.webhook_token||""}),e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}))()},loadWatchlist:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.loadingWatchlist=!0,e.p=1,e.n=2,(0,m.Qo)({userid:1});case 2:a=e.v,a&&1===a.code?t.watchlist=Array.isArray(a.data)?a.data:[]:t.watchlist=[],e.n=4;break;case 3:e.p=3,e.v,t.watchlist=[];case 4:return e.p=4,t.loadingWatchlist=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},handleCloseAddSymbolModal:function(){this.showAddSymbolModal=!1,this.addSymbolKeyword="",this.symbolSearchResults=[],this.selectedAddSymbol=null,this.hasSearchedSymbol=!1},handleAddSymbolMarketChange:function(t){this.addSymbolMarket=t,this.addSymbolKeyword="",this.symbolSearchResults=[],this.selectedAddSymbol=null,this.hasSearchedSymbol=!1,this.loadHotSymbols(t)},handleSymbolSearchInputChange:function(t){var e=this,a=t.target.value;if(this.addSymbolKeyword=a,this.searchTimer&&clearTimeout(this.searchTimer),!a||""===a.trim())return this.symbolSearchResults=[],this.hasSearchedSymbol=!1,void(this.selectedAddSymbol=null);this.searchTimer=setTimeout(function(){e.searchSymbolsInModal(a)},500)},handleSearchSymbol:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){return(0,o.A)().w(function(a){while(1)switch(a.n){case 0:if(t&&t.trim()){a.n=1;break}return a.a(2);case 1:if(e.addSymbolMarket){a.n=2;break}return e.$message.warning(e.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")),a.a(2);case 2:if(!(e.symbolSearchResults.length>0)){a.n=3;break}return a.a(2);case 3:e.hasSearchedSymbol&&0===e.symbolSearchResults.length?e.handleDirectAdd():e.searchSymbolsInModal(t);case 4:return a.a(2)}},a)}))()},searchSymbolsInModal:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:if(t&&""!==t.trim()){a.n=1;break}return e.symbolSearchResults=[],e.hasSearchedSymbol=!1,a.a(2);case 1:if(e.addSymbolMarket){a.n=2;break}return a.a(2);case 2:return e.searchingSymbol=!0,e.hasSearchedSymbol=!0,a.p=3,a.n=4,(0,m._3)({market:e.addSymbolMarket,keyword:t.trim()});case 4:s=a.v,s&&1===s.code&&Array.isArray(s.data)?e.symbolSearchResults=s.data:e.symbolSearchResults=[],a.n=6;break;case 5:a.p=5,a.v,e.symbolSearchResults=[];case 6:return a.p=6,e.searchingSymbol=!1,a.f(6);case 7:return a.a(2)}},a,null,[[3,5,6,7]])}))()},handleDirectAdd:function(){this.addSymbolKeyword&&this.addSymbolKeyword.trim()?this.addSymbolMarket?this.selectedAddSymbol={market:this.addSymbolMarket,symbol:this.addSymbolKeyword.trim().toUpperCase(),name:""}:this.$message.warning(this.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")):this.$message.warning(this.$t("dashboard.analysis.modal.addStock.pleaseEnterSymbol"))},handleSelectAddSymbol:function(t){this.selectedAddSymbol={market:this.addSymbolMarket,symbol:t.symbol,name:t.name||""}},loadHotSymbols:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:if(t||(t=e.addSymbolMarket||"Crypto"),t){a.n=1;break}return a.a(2);case 1:return e.loadingHotSymbols=!0,a.p=2,a.n=3,(0,m.z6)({market:t,limit:10});case 3:s=a.v,s&&1===s.code&&s.data?e.hotSymbols=s.data:e.hotSymbols=[],a.n=5;break;case 4:a.p=4,a.v,e.hotSymbols=[];case 5:return a.p=5,e.loadingHotSymbols=!1,a.f(5);case 6:return a.a(2)}},a,null,[[2,4,5,6]])}))()},handleConfirmAddSymbol:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i,r,n,l,d;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(a="",s="",!t.selectedAddSymbol){e.n=1;break}a=t.selectedAddSymbol.market,s=t.selectedAddSymbol.symbol.toUpperCase(),e.n=4;break;case 1:if(!t.addSymbolKeyword||!t.addSymbolKeyword.trim()){e.n=3;break}if(t.addSymbolMarket){e.n=2;break}return t.$message.warning(t.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")),e.a(2);case 2:a=t.addSymbolMarket,s=t.addSymbolKeyword.trim().toUpperCase(),e.n=4;break;case 3:return t.$message.warning(t.$t("dashboard.analysis.modal.addStock.pleaseSelectOrEnterSymbol")),e.a(2);case 4:return t.addingSymbol=!0,e.p=5,e.n=6,(0,m.dp)({userid:1,market:a,symbol:s});case 6:if(i=e.v,!i||1!==i.code){e.n=8;break}return t.$message.success(t.$t("dashboard.analysis.message.addStockSuccess")),e.n=7,t.loadWatchlist();case 7:r="".concat(a,":").concat(s),t.isEditMode?(t.form.setFieldsValue({symbol:r}),t.handleWatchlistSymbolChange(r)):(t.selectedSymbols.includes(r)||(t.selectedSymbols=[].concat((0,c.A)(t.selectedSymbols),[r])),t.handleMultiSymbolChange(t.selectedSymbols)),t.handleCloseAddSymbolModal(),e.n=9;break;case 8:t.$message.error((null===i||void 0===i?void 0:i.msg)||t.$t("dashboard.analysis.message.addStockFailed"));case 9:e.n=11;break;case 10:e.p=10,d=e.v,l=(null===d||void 0===d||null===(n=d.response)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.msg)||(null===d||void 0===d?void 0:d.message)||t.$t("dashboard.analysis.message.addStockFailed"),t.$message.error(l);case 11:return e.p=11,t.addingSymbol=!1,e.f(11);case 12:return e.a(2)}},e,null,[[5,10,11,12]])}))()},filterWatchlistOption:function(t,e){var a,s=(null===(a=e.componentOptions)||void 0===a||null===(a=a.propsData)||void 0===a?void 0:a.value)||"";return"__add_symbol_option__"===s||String(s).toLowerCase().includes(String(t||"").toLowerCase())},filterWatchlistOptionWithAdd:function(t,e){var a,s=(null===(a=e.componentOptions)||void 0===a||null===(a=a.propsData)||void 0===a?void 0:a.value)||"";return"__add_symbol_option__"===s||String(s).toLowerCase().includes(String(t||"").toLowerCase())},handleMultiSymbolChangeWithAdd:function(t){if(t&&t.includes("__add_symbol_option__"))return this.selectedSymbols=t.filter(function(t){return"__add_symbol_option__"!==t}),this.showAddSymbolModal=!0,void this.loadHotSymbols(this.addSymbolMarket);this.handleMultiSymbolChange(t)},handleStrategyTypeChange:function(t){var e=t.target.value;"single"===e&&(this.crossSectionalSymbols=[])},handleCrossSectionalSymbolChange:function(t){if(t&&t.includes("__add_symbol_option__"))return this.crossSectionalSymbols=t.filter(function(t){return"__add_symbol_option__"!==t}),this.showAddSymbolModal=!0,void this.loadHotSymbols(this.addSymbolMarket);if(this.crossSectionalSymbols=t||[],t&&t.length>0){var e=t[0];if("string"===typeof e&&e.includes(":")){var a=e.indexOf(":"),s=e.slice(0,a);this.selectedMarketCategory=s||"Crypto"}}},getMarketColor:function(t){var e={USStock:"green",Crypto:"purple",Forex:"gold",Futures:"cyan"};return e[t]||"default"},handleWatchlistSymbolChange:function(t){var e=this;if("__add_symbol_option__"===t)return this.$nextTick(function(){e.form.setFieldsValue({symbol:void 0})}),this.showAddSymbolModal=!0,void this.loadHotSymbols(this.addSymbolMarket);if(t&&"string"===typeof t&&t.includes(":")){var a=t.indexOf(":"),s=t.slice(0,a);if(this.selectedMarketCategory=s||"Crypto","Forex"===this.selectedMarketCategory){this.currentBrokerId="mt5";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({forex_broker_id:"mt5"})}catch(r){}}else if("USStock"===this.selectedMarketCategory){this.currentBrokerId="ibkr";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({broker_id:"ibkr"})}catch(r){}}var i=["Crypto","USStock","Forex"].includes(this.selectedMarketCategory);if(!i){this.executionModeUi="signal";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({execution_mode:"signal"})}catch(r){}}this.currentExchangeId="";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({exchange_id:void 0})}catch(r){}}},handleSimpleSymbolChange:function(t){if("__add_symbol_option__"===t)return this.showAddSymbolModal=!0,void this.loadHotSymbols(this.addSymbolMarket);var e=t?[t]:[];this.handleMultiSymbolChange(e)},handleMultiSymbolChange:function(t){if(this.selectedSymbols=t||[],t&&t.length>0){var e=t[0];if("string"===typeof e&&e.includes(":")){var a=e.indexOf(":"),s=e.slice(0,a);this.selectedMarketCategory=s||"Crypto"}}if("Forex"===this.selectedMarketCategory){this.currentBrokerId="mt5";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({forex_broker_id:"mt5"})}catch(r){}}else if("USStock"===this.selectedMarketCategory){this.currentBrokerId="ibkr";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({broker_id:"ibkr"})}catch(r){}}var i=["Crypto","USStock","Forex"].includes(this.selectedMarketCategory);if(!i){this.executionModeUi="signal";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({execution_mode:"signal"})}catch(r){}}this.currentExchangeId="";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({exchange_id:void 0})}catch(r){}},loadExchangeCredentials:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.loadingExchangeCredentials=!0,e.p=1,e.n=2,(0,g.IA)({user_id:1});case 2:a=e.v,a&&1===a.code?t.exchangeCredentials=a.data&&a.data.items||[]:(t.exchangeCredentials=[],t.$message.warning((null===a||void 0===a?void 0:a.msg)||t.$t("trading-assistant.messages.loadFailed"))),e.n=4;break;case 3:e.p=3,e.v,t.exchangeCredentials=[],t.$message.warning(t.$t("trading-assistant.exchange.testFailed"));case 4:return e.p=4,t.loadingExchangeCredentials=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},goToIndicatorAnalysisCreate:function(){this.$router.push("/indicator-analysis")},handleExchangeAccountCreated:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s,i;return(0,o.A)().w(function(a){while(1)switch(a.n){case 0:return a.n=1,e.loadExchangeCredentials();case 1:if(s=t&&(t.id||t.credential_id),!s){a.n=3;break}try{e.form&&e.form.setFieldsValue&&e.form.setFieldsValue({credential_id:s})}catch(r){}return a.n=2,e.handleCredentialSelectChange(s);case 2:a.n=4;break;case 3:if(1!==e.exchangeCredentials.length){a.n=4;break}i=e.exchangeCredentials[0].id;try{e.form&&e.form.setFieldsValue&&e.form.setFieldsValue({credential_id:i})}catch(r){}return a.n=4,e.handleCredentialSelectChange(i);case 4:return a.a(2)}},a)}))()},formatCredentialLabel:function(t){if(!t)return"";var e=(t.name||"").trim(),a=t.exchange_id||"",s=t.api_key_hint||"";return e?"".concat(a.toUpperCase()," - ").concat(e," (").concat(s,")"):"".concat(a.toUpperCase()," (").concat(s,")")},isCredentialCompatible:function(t){if(!t||!t.exchange_id)return!0;var e=(t.exchange_id||"").toLowerCase(),a=this.selectedMarketCategory||"Crypto";if("mt5"===e)return"Forex"===a;if("ibkr"===e)return"USStock"===a;var s=["binance","okx","bitget","bybit","coinbaseexchange","kraken","kucoin","gate","bitfinex","deepcoin"];return!s.includes(e)||"Crypto"===a},handleCredentialSelectChange:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s,i,r;return(0,o.A)().w(function(a){while(1)switch(a.n){case 0:if(t){a.n=1;break}return e.currentExchangeId="",e.connectionTestResult=null,a.a(2);case 1:if(s=e.exchangeCredentials.find(function(e){return String(e.id)===String(t)}),!s){a.n=5;break}if(i=(s.exchange_id||"").toLowerCase(),"mt5"!==i||"Forex"===e.selectedMarketCategory){a.n=2;break}e.$message.error(e.$t("trading-assistant.validation.mt5OnlyForForex"));try{e.form&&e.form.setFieldsValue&&e.form.setFieldsValue({credential_id:void 0})}catch(n){}return e.currentExchangeId="",e.connectionTestResult=null,a.a(2);case 2:if("ibkr"!==i||"USStock"===e.selectedMarketCategory){a.n=3;break}e.$message.error(e.$t("trading-assistant.validation.ibkrOnlyForUSStock"));try{e.form&&e.form.setFieldsValue&&e.form.setFieldsValue({credential_id:void 0})}catch(n){}return e.currentExchangeId="",e.connectionTestResult=null,a.a(2);case 3:if(r=["binance","okx","bitget","bybit","coinbaseexchange","kraken","kucoin","gate","bitfinex"],!r.includes(i)||"Crypto"===e.selectedMarketCategory){a.n=4;break}e.$message.error(e.$t("trading-assistant.validation.cryptoExchangeOnlyForCrypto"));try{e.form&&e.form.setFieldsValue&&e.form.setFieldsValue({credential_id:void 0})}catch(n){}return e.currentExchangeId="",e.connectionTestResult=null,a.a(2);case 4:e.currentExchangeId=s.exchange_id||"";case 5:e.connectionTestResult=null;case 6:return a.a(2)}},a)}))()},onSaveCredentialChange:function(t){var e=!!(t&&t.target&&t.target.checked);this.saveCredentialUi=e;try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({save_credential:e})}catch(a){}},onExecutionModeChange:function(t){var e=t&&t.target?t.target.value:t;if(this.executionModeUi=e||"signal",!this.canUseLiveTrading&&"signal"!==this.executionModeUi){this.executionModeUi="signal";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({execution_mode:"signal"})}catch(a){}}},setExecutionModeUi:function(t){var e=t||"signal";this.onExecutionModeChange(e);try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({execution_mode:e})}catch(a){}},onLiveDisclaimerAckChange:function(t){var e=!!(t&&t.target&&t.target.checked);this.liveDisclaimerAckUi=e;try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({live_disclaimer_ack:e})}catch(a){}},onNotifyChannelsChange:function(t){this.notifyChannelsUi=Array.isArray(t)?t:[]},formatCurrency:function(t){return null===t||void 0===t?"-":"$"+t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},formatPnl:function(t){if(null===t||void 0===t)return"-";var e=t>=0?"+":"";return e+"$"+Math.abs(t).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},formatPnlPercent:function(t){if(null===t||void 0===t)return"-";var e=t>=0?"+":"";return e+Math.abs(t).toFixed(2)+"%"},loadStrategies:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.loading=!0,e.p=1,e.n=2,(0,p.EM)();case 2:a=e.v,1===a.code?(s=a.data.strategies||[],t.strategies=s,t.selectedStrategy&&(i=t.strategies.find(function(e){return e.id===t.selectedStrategy.id}),t.selectedStrategy=i||null)):t.$message.error(a.msg||t.$t("trading-assistant.messages.loadFailed")),e.n=4;break;case 3:e.p=3,e.v,t.$message.error(t.$t("trading-assistant.messages.loadFailed"));case 4:return e.p=4,t.loading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},handleCreateStrategy:function(){this.isEditMode=!1,this.editingStrategy=null,this.creationMode="simple",this.strategyMode="",this.strategyCode="",this.pendingScriptTemplateKey="",this.showModeSelector=!0,this.showFormModal=!1},handleModeSelect:function(t){this.strategyMode=t,this.pendingScriptTemplateKey="",this.showModeSelector=!1,this._openCreateModal()},handleUseTemplate:function(t){this.strategyMode="script",this.pendingScriptTemplateKey=t,this.showModeSelector=!1,this._openCreateModal()},_openCreateModal:function(){var t=this;this.strategyType="indicator",this.creationMode=this.editingStrategy?"advanced":"simple",this.currentStep=0,this.currentExchangeId="",this.currentBrokerId="ibkr",this.selectedIndicator=null,this.connectionTestResult=null,this.executionModeUi="signal",this.notifyChannelsUi=["browser"],this.saveCredentialUi=!1,this.backtestCollapseKeys=["risk"],this.trailingEnabledUi=!1,this.entryPctMaxUi=100,this.aiFilterEnabledUi=!1,this.selectedMarketCategory="Crypto",this.selectedSymbols=[],this.showAdvancedSettings=!1;var e=this.buildStrategyDefaultName();this.lastAutoStrategyName=e,this.form.resetFields(),this.form.setFieldsValue({strategy_name:e,execution_mode:"signal",notify_channels:["browser"],save_credential:!1,live_disclaimer_ack:!1,initial_capital:1e3,market_type:"swap",leverage:5,trade_direction:"long",timeframe:"15m",cs_strategy_type:"single"}),this.liveDisclaimerAckUi=!1,this.showFormModal=!0,this.$nextTick((0,l.A)((0,o.A)().m(function e(){return(0,o.A)().w(function(e){while(1)switch(e.n){case 0:return e.n=1,t.loadWatchlist();case 1:return e.n=2,t.loadIndicators();case 2:t.applyPendingRouteIndicatorSelection(),t.loadExchangeCredentials();case 3:return e.a(2)}},e)})))},handleEditStrategy:function(t){var e=this;"running"!==t.status?(this.strategyType="indicator",this.strategyMode=t.strategy_mode||"signal",this.creationMode="advanced",this.strategyCode=t.strategy_code||"",this.pendingScriptTemplateKey="",this.isEditMode=!0,this.editingStrategy=t,this.currentStep=0,this.currentExchangeId="",this.selectedIndicator=null,this.connectionTestResult=null,this.form.resetFields(),this.backtestCollapseKeys=["risk"],this.trailingEnabledUi=!1,this.entryPctMaxUi=100,this.aiFilterEnabledUi=!1,this.showFormModal=!0,this.$nextTick((0,l.A)((0,o.A)().m(function a(){return(0,o.A)().w(function(a){while(1)switch(a.n){case 0:return e.loadWatchlist(),e.loadIndicators(),e.loadExchangeCredentials(),a.n=1,e.loadStrategyDataToForm(t);case 1:return a.a(2)}},a)})))):this.$message.warning(this.$t("trading-assistant.messages.runningWarning"))},loadStrategyDataToForm:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s,i,r,l,c,d,u,p,m,g,h,_,y,f,v,b,x,C,k,S,w,$,A,T,P,M,I,F,N,D,V,E,R,z,L,q,U,K,O,B,G,H;return(0,o.A)().w(function(a){while(1)switch(a.n){case 0:if(e.indicatorsLoaded){a.n=1;break}return a.n=1,e.loadIndicators();case 1:return a.n=2,e.$nextTick();case 2:return e.selectedMarketCategory=t.market_category||"Crypto",d=t.execution_mode||"signal",e.executionModeUi=d,e.liveDisclaimerAckUi="live"===d,u=t.notification_config&&t.notification_config.channels||["browser"],e.notifyChannelsUi=Array.isArray(u)?u:["browser"],p=!1,m=!1,t.trading_config&&(f=t.trading_config||{},v=f.trailing&&"object"===(0,n.A)(f.trailing)?f.trailing:null,p=void 0!==f.trailing_enabled?!!f.trailing_enabled:!(!v||!v.enabled),b=f.enable_ai_filter,m=!0===b||"true"===b||1===b||"1"===b,x=f.scale&&"object"===(0,n.A)(f.scale)?f.scale:null,C=f.position&&"object"===(0,n.A)(f.position)?f.position:null,k=new Set(["risk"]),(f.trend_add_enabled||f.dca_add_enabled||x&&(null!==(g=x.trendAdd)&&void 0!==g&&g.enabled||null!==(h=x.dcaAdd)&&void 0!==h&&h.enabled))&&k.add("scale"),(f.trend_reduce_enabled||f.adverse_reduce_enabled||x&&(null!==(_=x.trendReduce)&&void 0!==_&&_.enabled||null!==(y=x.adverseReduce)&&void 0!==y&&y.enabled))&&k.add("reduce"),(void 0!==f.entry_pct||C&&void 0!==C.entryPct)&&k.add("position"),e.backtestCollapseKeys=Array.from(k)),e.trailingEnabledUi=p,e.aiFilterEnabledUi=m,a.n=3,e.$nextTick();case 3:return e.form.setFieldsValue({enable_ai_filter:m}),a.n=4,e.$nextTick();case 4:if(e.form.setFieldsValue({execution_mode:e.executionModeUi,live_disclaimer_ack:e.liveDisclaimerAckUi,notify_channels:e.notifyChannelsUi,notify_email:(null===(s=t.notification_config)||void 0===s||null===(s=s.targets)||void 0===s?void 0:s.email)||"",notify_phone:(null===(i=t.notification_config)||void 0===i||null===(i=i.targets)||void 0===i?void 0:i.phone)||"",notify_telegram:(null===(r=t.notification_config)||void 0===r||null===(r=r.targets)||void 0===r?void 0:r.telegram)||"",notify_discord:(null===(l=t.notification_config)||void 0===l||null===(l=l.targets)||void 0===l?void 0:l.discord)||"",notify_webhook:(null===(c=t.notification_config)||void 0===c||null===(c=c.targets)||void 0===c?void 0:c.webhook)||""}),!t.indicator_config||!t.indicator_config.indicator_id){a.n=7;break}if(S=t.indicator_config.indicator_id,w=e.availableIndicators.find(function(t){return String(t.id)===String(S)}),!w){a.n=6;break}return A=String(w.id),e.form.setFieldsValue({indicator_id:A}),a.n=5,e.handleIndicatorChange(A);case 5:T=null===($=t.trading_config)||void 0===$?void 0:$.indicator_params,T&&"object"===(0,n.A)(T)&&Object.keys(T).forEach(function(t){t in e.indicatorParamValues&&e.$set(e.indicatorParamValues,t,T[t])}),a.n=7;break;case 6:e.form.setFieldsValue({indicator_id:String(S)});case 7:if(!t.exchange_config){a.n=11;break}if(P=t.exchange_config.exchange_id||"",M="live"===e.executionModeUi,I=["Crypto","USStock","Forex"].includes(e.selectedMarketCategory),F="USStock"===e.selectedMarketCategory,N="Forex"===e.selectedMarketCategory,!M||!I){a.n=10;break}if(!F){a.n=8;break}e.currentBrokerId=P||"ibkr",e.form.setFieldsValue({broker_id:P||"ibkr",ibkr_host:t.exchange_config.ibkr_host||"127.0.0.1",ibkr_port:t.exchange_config.ibkr_port||7497,ibkr_client_id:t.exchange_config.ibkr_client_id||1,ibkr_account:t.exchange_config.ibkr_account||""}),a.n=10;break;case 8:if(!N){a.n=9;break}e.currentBrokerId=P||"mt5",e.form.setFieldsValue({forex_broker_id:P||"mt5",mt5_server:t.exchange_config.mt5_server||"",mt5_login:t.exchange_config.mt5_login||"",mt5_password:t.exchange_config.mt5_password||"",mt5_terminal_path:t.exchange_config.mt5_terminal_path||""}),a.n=10;break;case 9:if(e.currentExchangeId=P||t.exchange_config.exchange_id||"",D=t.exchange_config.credential_id,!D){a.n=10;break}return e.form.setFieldsValue({credential_id:D}),a.n=10,e.handleCredentialSelectChange(D);case 10:F||N?e.currentBrokerId=P||(N?"mt5":"ibkr"):e.currentExchangeId=P;case 11:if(t.trading_config){if(V=t.trading_config||{},E=V.trailing&&"object"===(0,n.A)(V.trailing)?V.trailing:null,R=V.scale&&"object"===(0,n.A)(V.scale)?V.scale:null,z=V.position&&"object"===(0,n.A)(V.position)?V.position:null,L=V.strategy_type||t.strategy_type||"single","cross_sectional"===L)if(e.form.setFieldsValue({cs_strategy_type:"cross_sectional",portfolio_size:V.portfolio_size||10,long_ratio:V.long_ratio||.5,rebalance_frequency:V.rebalance_frequency||"daily"}),V.symbol_list&&Array.isArray(V.symbol_list))e.crossSectionalSymbols=V.symbol_list;else if(t.symbol_list)try{q="string"===typeof t.symbol_list?JSON.parse(t.symbol_list):t.symbol_list,Array.isArray(q)&&(e.crossSectionalSymbols=q)}catch(o){e.crossSectionalSymbols=[]}else e.crossSectionalSymbols=[];else e.form.setFieldsValue({cs_strategy_type:"single"}),e.crossSectionalSymbols=[];U=R&&R.trendAdd?R.trendAdd:null,K=R&&R.dcaAdd?R.dcaAdd:null,O=R&&R.trendReduce?R.trendReduce:null,B=R&&R.adverseReduce?R.adverseReduce:null,G=V.symbol,H="string"===typeof G&&G.includes(":")?G:"".concat(e.selectedMarketCategory,":").concat(G),e.form.setFieldsValue({strategy_name:t.strategy_name,symbol:H,initial_capital:V.initial_capital,leverage:V.leverage,trade_direction:V.trade_direction||"long",timeframe:V.timeframe||"1H",market_type:"futures"===V.market_type?"swap":V.market_type||"swap",take_profit_pct:V.take_profit_pct||0,stop_loss_pct:V.stop_loss_pct||0,trailing_enabled:p,trailing_stop_pct:void 0!==V.trailing_stop_pct?V.trailing_stop_pct||0:E&&E.pct||0,trailing_activation_pct:void 0!==V.trailing_activation_pct?V.trailing_activation_pct||0:E&&E.activationPct||0,trend_add_enabled:void 0!==V.trend_add_enabled?!!V.trend_add_enabled:!(!U||!U.enabled),trend_add_step_pct:void 0!==V.trend_add_step_pct?V.trend_add_step_pct||0:U&&U.stepPct||0,trend_add_size_pct:void 0!==V.trend_add_size_pct?V.trend_add_size_pct||0:U&&U.sizePct||0,trend_add_max_times:void 0!==V.trend_add_max_times?V.trend_add_max_times||0:U&&U.maxTimes||0,dca_add_enabled:void 0!==V.dca_add_enabled?!!V.dca_add_enabled:!(!K||!K.enabled),dca_add_step_pct:void 0!==V.dca_add_step_pct?V.dca_add_step_pct||0:K&&K.stepPct||0,dca_add_size_pct:void 0!==V.dca_add_size_pct?V.dca_add_size_pct||0:K&&K.sizePct||0,dca_add_max_times:void 0!==V.dca_add_max_times?V.dca_add_max_times||0:K&&K.maxTimes||0,trend_reduce_enabled:void 0!==V.trend_reduce_enabled?!!V.trend_reduce_enabled:!(!O||!O.enabled),trend_reduce_step_pct:void 0!==V.trend_reduce_step_pct?V.trend_reduce_step_pct||0:O&&O.stepPct||0,trend_reduce_size_pct:void 0!==V.trend_reduce_size_pct?V.trend_reduce_size_pct||0:O&&O.sizePct||0,trend_reduce_max_times:void 0!==V.trend_reduce_max_times?V.trend_reduce_max_times||0:O&&O.maxTimes||0,adverse_reduce_enabled:void 0!==V.adverse_reduce_enabled?!!V.adverse_reduce_enabled:!(!B||!B.enabled),adverse_reduce_step_pct:void 0!==V.adverse_reduce_step_pct?V.adverse_reduce_step_pct||0:B&&B.stepPct||0,adverse_reduce_size_pct:void 0!==V.adverse_reduce_size_pct?V.adverse_reduce_size_pct||0:B&&B.sizePct||0,adverse_reduce_max_times:void 0!==V.adverse_reduce_max_times?V.adverse_reduce_max_times||0:B&&B.maxTimes||0,entry_pct:0===V.entry_pct||V.entry_pct?V.entry_pct:z&&z.entryPct?z.entryPct:100,enable_ai_filter:m}),e.$nextTick(function(){e.recalcEntryPctMaxUi(),e.normalizeEntryPct()})}case 12:return a.a(2)}},a)}))()},handleSelectStrategy:function(t){this.selectedStrategy=t,this.currentEquity=null,this.loadStrategyDetails(),this.startEquityPolling()},loadStrategyDetails:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i,n,l,c,u,m,g,h,_,y,f;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.selectedStrategy){e.n=1;break}return e.a(2,Promise.resolve());case 1:return e.p=1,e.n=2,Promise.all([(0,p.Yx)(t.selectedStrategy.id),(0,p.oK)(t.selectedStrategy.id)]);case 2:if(a=e.v,s=(0,r.A)(a,2),i=s[0],n=s[1],l=null,1===i.code&&i.data&&(Array.isArray(i.data)&&i.data.length>0?(c=i.data[i.data.length-1],l=c.equity):(m=(null===(u=t.selectedStrategy.trading_config)||void 0===u?void 0:u.initial_capital)||t.selectedStrategy.initial_capital,l=m||null)),g=0,1===n.code&&n.data){h=n.data.positions||n.data.items||[],_=(0,d.A)(h);try{for(_.s();!(y=_.n()).done;)f=y.value,g+=parseFloat(f.unrealized_pnl||f.unrealizedPnl||0)}catch(o){_.e(o)}finally{_.f()}}t.currentEquity=null!==l?l+g:null,e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[1,3]])}))()},startEquityPolling:function(){var t=this;this.stopEquityPolling(),this.selectedStrategy&&(this.loadStrategyDetails(),this.equityPollingTimer=setInterval(function(){t.loadStrategyDetails()},1e4))},stopEquityPolling:function(){this.equityPollingTimer&&(clearInterval(this.equityPollingTimer),this.equityPollingTimer=null)},handleCloseModal:function(){this.showFormModal=!1,this.editingStrategy=null,this.isEditMode=!1,this.strategyType="indicator",this.strategyMode="",this.strategyCode="",this.pendingScriptTemplateKey="",this.currentStep=0,this.currentExchangeId="",this.selectedIndicator=null,this.connectionTestResult=null,this.indicatorsLoaded=!1,this.availableIndicators=[],this.pendingRouteIndicatorId="",this.lastAutoStrategyName="",this.backtestCollapseKeys=["risk"],this.trailingEnabledUi=!1,this.entryPctMaxUi=100,this.aiFilterEnabledUi=!1,this.showAdvancedSettings=!1,this.executionModeUi="signal",this.liveDisclaimerAckUi=!1,this.form.resetFields()},handleRefresh:function(){this.loadStrategies(),this.showFormModal=!1},handleMenuClick:function(t,e){switch(t){case"start":this.handleStartStrategy(e.id);break;case"stop":this.handleStopStrategy(e.id);break;case"edit":this.handleEditStrategy(e);break;case"backtest":this.handleBacktestStrategy(e);break;case"delete":this.handleDeleteStrategy(e);break}},toggleGroup:function(t){this.$set(this.collapsedGroups,t,!this.collapsedGroups[t])},handleBacktestStrategy:function(t){t&&t.id&&this.$router.push({path:"/backtest-center",query:{tab:"strategy",strategy_id:String(t.id)}})},handleGroupMenuClick:function(t,e){var a=this;return(0,l.A)((0,o.A)().m(function s(){var i,r;return(0,o.A)().w(function(s){while(1)switch(s.n){case 0:i=e.strategies.map(function(t){return t.id}),r=t,s.n="startAll"===r?1:"stopAll"===r?3:"deleteAll"===r?5:7;break;case 1:return s.n=2,a.handleBatchStartStrategies(i,e.baseName);case 2:return s.a(3,7);case 3:return s.n=4,a.handleBatchStopStrategies(i,e.baseName);case 4:return s.a(3,7);case 5:return s.n=6,a.handleBatchDeleteStrategies(i,e.baseName);case 6:return s.a(3,7);case 7:return s.a(2)}},s)}))()},handleBatchStartStrategies:function(t,e){var a=this;return(0,l.A)((0,o.A)().m(function e(){var s,i,r;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,p.UH)({strategy_ids:t});case 1:s=e.v,1===s.code?(r=(null===(i=s.data)||void 0===i||null===(i=i.success_ids)||void 0===i?void 0:i.length)||t.length,a.$message.success(a.$t("trading-assistant.messages.batchStartSuccess",{count:r})),a.loadStrategies()):a.$message.error(s.msg||a.$t("trading-assistant.messages.batchStartFailed")),e.n=3;break;case 2:e.p=2,e.v,a.$message.error(a.$t("trading-assistant.messages.batchStartFailed"));case 3:return e.a(2)}},e,null,[[0,2]])}))()},handleBatchStopStrategies:function(t,e){var a=this;return(0,l.A)((0,o.A)().m(function e(){var s,i,r;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,p.GF)({strategy_ids:t});case 1:s=e.v,1===s.code?(r=(null===(i=s.data)||void 0===i||null===(i=i.success_ids)||void 0===i?void 0:i.length)||t.length,a.$message.success(a.$t("trading-assistant.messages.batchStopSuccess",{count:r})),a.loadStrategies()):a.$message.error(s.msg||a.$t("trading-assistant.messages.batchStopFailed")),e.n=3;break;case 2:e.p=2,e.v,a.$message.error(a.$t("trading-assistant.messages.batchStopFailed"));case 3:return e.a(2)}},e,null,[[0,2]])}))()},handleBatchDeleteStrategies:function(t,e){var a=this;return(0,l.A)((0,o.A)().m(function s(){var i;return(0,o.A)().w(function(s){while(1)switch(s.n){case 0:i=a.$t("trading-assistant.messages.batchDeleteConfirm",{count:t.length,name:e}),a.$confirm({class:a.isDarkTheme?"ta-strategy-confirm-modal":"",title:a.$t("trading-assistant.deleteAll"),content:i,okText:a.$t("trading-assistant.deleteAll"),okType:"danger",cancelText:a.$t("trading-assistant.form.cancel"),onOk:function(){var e=(0,l.A)((0,o.A)().m(function e(){var s,i,r;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,p.xQ)({strategy_ids:t});case 1:s=e.v,1===s.code?(r=(null===(i=s.data)||void 0===i||null===(i=i.success_ids)||void 0===i?void 0:i.length)||t.length,a.$message.success(a.$t("trading-assistant.messages.batchDeleteSuccess",{count:r})),a.selectedStrategy&&t.includes(a.selectedStrategy.id)&&(a.selectedStrategy=null,a.stopEquityPolling()),a.loadStrategies()):a.$message.error(s.msg||a.$t("trading-assistant.messages.batchDeleteFailed")),e.n=3;break;case 2:e.p=2,e.v,a.$message.error(a.$t("trading-assistant.messages.batchDeleteFailed"));case 3:return e.a(2)}},e,null,[[0,2]])}));function s(){return e.apply(this,arguments)}return s}()});case 1:return s.a(2)}},s)}))()},handleStartStrategy:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return a.p=0,a.n=1,(0,p.mV)(t);case 1:s=a.v,1===s.code?(e.$message.success(e.$t("trading-assistant.messages.startSuccess")),e.loadStrategies(),e.selectedStrategy&&e.selectedStrategy.id===t&&(e.selectedStrategy.status="running")):e.$message.error(s.msg||e.$t("trading-assistant.messages.startFailed")),a.n=3;break;case 2:a.p=2,a.v,e.$message.error(e.$t("trading-assistant.messages.startFailed"));case 3:return a.a(2)}},a,null,[[0,2]])}))()},handleStopStrategy:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return a.p=0,a.n=1,(0,p.Ke)(t);case 1:s=a.v,1===s.code?(e.$message.success(e.$t("trading-assistant.messages.stopSuccess")),e.loadStrategies(),e.selectedStrategy&&e.selectedStrategy.id===t&&(e.selectedStrategy.status="stopped")):e.$message.error(s.msg||e.$t("trading-assistant.messages.stopFailed")),a.n=3;break;case 2:a.p=2,a.v,e.$message.error(e.$t("trading-assistant.messages.stopFailed"));case 3:return a.a(2)}},a,null,[[0,2]])}))()},handleDeleteStrategy:function(t){var e=this,a=this.$t("trading-assistant.messages.deleteConfirmWithName",{name:t.strategy_name});this.$confirm({class:this.isDarkTheme?"ta-strategy-confirm-modal":"",title:this.$t("trading-assistant.deleteStrategy"),content:a,okText:this.$t("trading-assistant.deleteStrategy"),okType:"danger",cancelText:this.$t("trading-assistant.form.cancel"),onOk:function(){var a=(0,l.A)((0,o.A)().m(function a(){var s;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return a.p=0,a.n=1,(0,p.v_)(t.id);case 1:s=a.v,1===s.code?(e.$message.success(e.$t("trading-assistant.messages.deleteSuccess")),e.selectedStrategy&&e.selectedStrategy.id===t.id&&(e.selectedStrategy=null,e.stopEquityPolling()),e.loadStrategies()):e.$message.error(s.msg||e.$t("trading-assistant.messages.deleteFailed")),a.n=3;break;case 2:a.p=2,a.v,e.$message.error(e.$t("trading-assistant.messages.deleteFailed"));case 3:return a.a(2)}},a,null,[[0,2]])}));function s(){return a.apply(this,arguments)}return s}()})},getStatusColor:function(t){var e={running:"green",stopped:"default",error:"red"};return e[t]||"default"},getStatusText:function(t){return this.$t("trading-assistant.status.".concat(t))||t},getStrategyTypeText:function(t){return this.$t("trading-assistant.strategyType.".concat(t))||t},getTradeDirectionText:function(t){if(!t)return"";var e={long:this.$t("trading-assistant.form.tradeDirectionLong")||"做多",short:this.$t("trading-assistant.form.tradeDirectionShort")||"做空",both:this.$t("trading-assistant.form.tradeDirectionBoth")||"双向"};return e[t]||t},handleIndicatorSelectFocus:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){return(0,o.A)().w(function(e){while(1)switch(e.n){case 0:if(t.indicatorsLoaded||t.loadingIndicators){e.n=1;break}return e.n=1,t.loadIndicators();case 1:return e.a(2)}},e)}))()},loadIndicators:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i,r;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!t.loadingIndicators){e.n=1;break}return e.a(2,new Promise(function(e){var a=setInterval(function(){t.loadingIndicators||(clearInterval(a),e())},100)}));case 1:if(!t.indicatorsLoaded){e.n=2;break}return e.a(2,Promise.resolve());case 2:return a=t.$store.getters.userInfo||{},s=a.id||1,t.loadingIndicators=!0,e.p=3,e.n=4,(0,y.Ay)({url:"/api/indicator/getIndicators",method:"get",params:{userid:s}});case 4:i=e.v,1===i.code&&i.data?(r=i.data.map(function(t){return{id:t.id,name:t.name,description:t.description,type:t.indicator_type||t.indicatorType||"python",code:t.code,is_buy:t.is_buy,source:1===t.is_buy?"bought":"custom"}}),t.availableIndicators=r,t.indicatorsLoaded=!0,t.applyPendingRouteIndicatorSelection()):(t.availableIndicators=[],t.$message.warning(i.msg||t.$t("trading-assistant.messages.loadIndicatorsFailed"))),e.n=6;break;case 5:e.p=5,e.v,t.availableIndicators=[],t.$message.warning(t.$t("trading-assistant.messages.loadIndicatorsFailed"));case 6:return e.p=6,t.loadingIndicators=!1,e.f(6);case 7:return e.a(2)}},e,null,[[3,5,6,7]])}))()},handleIndicatorChange:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s,i,r;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:if(s=String(t),e.selectedIndicator=e.availableIndicators.find(function(t){return String(t.id)===s}),e.applyAutoStrategyName(e.selectedIndicator),e.indicatorParams=[],e.indicatorParamValues={},!t){a.n=4;break}return a.p=1,a.n=2,e.$http.get("/api/indicator/getIndicatorParams",{params:{indicator_id:t}});case 2:i=a.v,i&&1===i.code&&Array.isArray(i.data)&&(e.indicatorParams=i.data,r={},i.data.forEach(function(t){r[t.name]=t.default}),e.indicatorParamValues=r),a.n=4;break;case 3:a.p=3,a.v;case 4:return a.a(2)}},a,null,[[1,3]])}))()},handleMarketTypeChange:function(t){var e=t.target.value;"spot"===e&&this.form.setFieldsValue({trade_direction:"long",leverage:1})},recalcEntryPctMaxUi:function(){if(this.form){var t=!!this.form.getFieldValue("trend_add_enabled"),e=!!this.form.getFieldValue("dca_add_enabled"),a=Number(this.form.getFieldValue("trend_add_max_times")||0),s=Number(this.form.getFieldValue("dca_add_max_times")||0),i=Number(this.form.getFieldValue("trend_add_size_pct")||0),r=Number(this.form.getFieldValue("dca_add_size_pct")||0),n=(t?a*i:0)+(e?s*r:0),o=Math.max(0,Math.min(100,100-n));this.entryPctMaxUi=o}else this.entryPctMaxUi=100},normalizeEntryPct:function(){if(this.form){var t=Number(this.form.getFieldValue("entry_pct")||0),e=Number(this.entryPctMaxUi||100);t>e&&this.form.setFieldsValue({entry_pct:e})}},onTrendAddToggle:function(t){var e=this;this.form&&(t&&this.form.setFieldsValue({dca_add_enabled:!1}),this.$nextTick(function(){e.recalcEntryPctMaxUi(),e.normalizeEntryPct()}))},onDcaAddToggle:function(t){var e=this;this.form&&(t&&this.form.setFieldsValue({trend_add_enabled:!1}),this.$nextTick(function(){e.recalcEntryPctMaxUi(),e.normalizeEntryPct()}))},onScaleParamsChange:function(){var t=this;this.$nextTick(function(){t.recalcEntryPctMaxUi(),t.normalizeEntryPct()})},onEntryPctChange:function(){var t=this;this.$nextTick(function(){return t.normalizeEntryPct()})},onTrailingToggle:function(t){this.form&&(this.trailingEnabledUi=!!t,t||this.form.setFieldsValue({trailing_stop_pct:0,trailing_activation_pct:0}))},onAiFilterToggle:function(t){this.aiFilterEnabledUi=!!t;try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({enable_ai_filter:!!t})}catch(e){}},filterIndicatorOption:function(t,e){var a,s=(null===(a=e.componentOptions)||void 0===a||null===(a=a.propsData)||void 0===a?void 0:a.label)||"";return s.toLowerCase().indexOf(t.toLowerCase())>=0},getIndicatorOptionLabel:function(t){return t?t.description?"".concat(t.name," - ").concat(t.description):t.name:""},buildStrategyDefaultName:function(t){var e=t&&t.name?t.name:this.$t("trading-assistant.form.defaultStrategyName"),a=this.$t("trading-assistant.form.defaultStrategySuffix");return"".concat(e).concat(a)},applyAutoStrategyName:function(t){if(!this.editingStrategy&&this.form&&"script"!==this.strategyMode){var e=this.buildStrategyDefaultName(t),a=this.form.getFieldValue("strategy_name");a&&a!==this.lastAutoStrategyName||(this.form.setFieldsValue({strategy_name:e}),this.lastAutoStrategyName=e)}},applyPendingRouteIndicatorSelection:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s;return(0,o.A)().w(function(e){while(1)switch(e.n){case 0:if(t.pendingRouteIndicatorId&&t.form&&!t.loadingIndicators){e.n=1;break}return e.a(2);case 1:if(a=String(t.pendingRouteIndicatorId),s=t.availableIndicators.find(function(t){return String(t.id)===a}),s){e.n=2;break}return e.a(2);case 2:return t.form.setFieldsValue({indicator_id:a}),e.n=3,t.handleIndicatorChange(a);case 3:t.pendingRouteIndicatorId="";case 4:return e.a(2)}},e)}))()},filterSymbolOption:function(t,e){return e.componentOptions.children[0].text.toLowerCase().indexOf(t.toLowerCase())>=0},getIndicatorTypeColor:function(t){var e={trend:"blue",momentum:"green",volatility:"orange",volume:"purple",custom:"cyan",python:"geekblue",pine:"magenta"};return e[t]||"cyan"},getIndicatorTypeName:function(t){var e="trading-assistant.indicatorType.".concat(t),a=this.$t(e);return a!==e?a:t},getExchangeName:function(t){if(t.labelKey){var e="trading-assistant.exchangeNames.".concat(t.labelKey),a=this.$t(e);return a===e?t.value.charAt(0).toUpperCase()+t.value.slice(1):a}return t.label||t.value},getExchangeDisplayName:function(t){if(!t)return"";var e=this.exchangeOptions.find(function(e){return e.value===t});return e?this.getExchangeName(e):t.charAt(0).toUpperCase()+t.slice(1)},getExchangeTagColor:function(t){var e={binance:"gold",okx:"blue",coinbaseexchange:"cyan",kraken:"purple",bitfinex:"geekblue",huobi:"orange",gate:"green",mexc:"lime",kucoin:"volcano",bybit:"red",bitget:"magenta",bitmex:"red",deribit:"blue",phemex:"cyan",bitmart:"geekblue",bitstamp:"purple",bittrex:"orange",poloniex:"green",gemini:"lime",cryptocom:"volcano",blockchaincom:"magenta",bitflyer:"red",upbit:"blue",bithumb:"cyan",coinone:"purple",zb:"geekblue",lbank:"orange",bibox:"green",bigone:"lime",bitrue:"volcano",coinex:"magenta",ftx:"red",ftxus:"blue",binanceus:"gold",binancecoinm:"gold",binanceusdm:"gold",ibkr:"green"};return e[t]||"default"},handleApiConfigChange:function(){this.connectionTestResult=null},getModalPopupContainer:function(){return window.document.body},handleBrokerSelectChange:function(t){this.currentBrokerId=t||"ibkr",this.connectionTestResult=null},handleForexBrokerSelectChange:function(t){this.currentBrokerId=t||"mt5",this.connectionTestResult=null},handleExchangeSelectChange:function(t){var e=this;this.currentExchangeId=t||"",this.connectionTestResult=null,this.suppressApiClearOnce?this.suppressApiClearOnce=!1:this.$nextTick(function(){var t={api_key:void 0,secret_key:void 0,passphrase:void 0,enable_demo_trading:!1};setTimeout(function(){e.form.setFieldsValue(t)},100)})},getPlaceholder:function(t){var e={okx:{api_key:"请输入API Key",secret_key:"请输入Secret Key",passphrase:"请输入Passphrase(创建API时设置)"},okex:{api_key:"请输入API Key",secret_key:"请输入Secret Key",passphrase:"请输入Passphrase(创建API时设置)"},binance:{api_key:"请输入API Key",secret_key:"请输入Secret Key"},coinbaseexchange:{api_key:"请输入API Key(或Key Name)",secret_key:"请输入API Secret(或Private Key)",passphrase:"请输入Passphrase(Legacy Pro API需要)"},kucoin:{api_key:"请输入API Key",secret_key:"请输入Secret Key",passphrase:"请输入Passphrase"},gate:{api_key:"请输入API Key",secret_key:"请输入Secret Key"},mexc:{api_key:"请输入Access Key",secret_key:"请输入Secret Key"},kraken:{api_key:"请输入API Key",secret_key:"请输入Secret Key"},bitfinex:{api_key:"请输入API Key",secret_key:"请输入Secret Key"},bybit:{api_key:"请输入API Key",secret_key:"请输入Secret Key"},bitget:{api_key:"请输入API Key",secret_key:"请输入Secret Key",passphrase:"请输入Passphrase(Legacy Pro API需要)"}},a=e[this.currentExchangeId]||{};if(a[t])return a[t];var s={api_key:this.$t("trading-assistant.placeholders.inputApiKey"),secret_key:this.$t("trading-assistant.placeholders.inputSecretKey"),passphrase:this.$t("trading-assistant.placeholders.inputPassphrase")};return s[t]||this.$t("trading-assistant.placeholders.inputApiKey")},handleNext:function(){var t=this;if("script"!==this.strategyMode){if(0===this.currentStep){var e=["indicator_id","strategy_name"];e.push("initial_capital","market_type","leverage","trade_direction","timeframe"),this.isEditMode&&e.push("symbol"),this.form.validateFields(e,function(e,a){if(!e){if(!t.isEditMode){var s=t.form.getFieldValue("cs_strategy_type")||"single";if("cross_sectional"===s){if(!t.crossSectionalSymbols||0===t.crossSectionalSymbols.length)return void t.$message.warning(t.$t("trading-assistant.validation.symbolsRequired"))}else if(!t.selectedSymbols||0===t.selectedSymbols.length)return void t.$message.warning(t.$t("trading-assistant.validation.symbolsRequired"))}try{var i=a&&a.market_type||t.form.getFieldValue("market_type");"spot"===i&&t.form.setFieldsValue({leverage:1,trade_direction:"long"})}catch(r){}t.backtestCollapseKeys=["risk"];try{t.trailingEnabledUi=!!t.form.getFieldValue("trailing_enabled")}catch(r){t.trailingEnabledUi=!1}t.$nextTick(function(){t.recalcEntryPctMaxUi(),t.normalizeEntryPct()}),t.isSimpleMode&&!t.editingStrategy?t.currentStep=2:t.currentStep++}})}else if(1===this.currentStep){try{var a=this.form.getFieldValue("execution_mode")||"signal";this.executionModeUi=a;var s=this.form.getFieldValue("notify_channels")||["browser"];this.notifyChannelsUi=Array.isArray(s)?s:["browser"]}catch(o){}this.currentStep++}}else if(0===this.currentStep){var i=["strategy_name","symbol","initial_capital","timeframe"];this.form.validateFields(i,function(e){e||(t.currentStep=1)})}else if(1===this.currentStep){if(!this.strategyCode||this.strategyCode.trim().length<20)return void this.$message.warning(this.$t("trading-assistant.editor.codeHint"));try{var r=this.form.getFieldValue("execution_mode")||"signal";this.executionModeUi=r;var n=this.form.getFieldValue("notify_channels")||["browser"];this.notifyChannelsUi=Array.isArray(n)?n:["browser"]}catch(o){}this.currentStep=2}},handlePrev:function(){if(this.currentStep>0){if("script"===this.strategyMode)return void this.currentStep--;this.isSimpleMode&&!this.editingStrategy&&2===this.currentStep?this.currentStep=0:this.currentStep--}},handleSubmit:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){return(0,o.A)().w(function(e){while(1)switch(e.n){case 0:t.form.validateFields(function(){var e=(0,l.A)((0,o.A)().m(function e(a,s){var i,r,n,l,c,d,u,m,g,h,_,y,f,v,b,x,C,k,S,w,$,A,T,P,M,I;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(a){e.n=15;break}if(e.p=1,t.saving=!0,"script"!==t.strategyMode||t.editingStrategy){e.n=3;break}return i={channels:s.notify_channels||["browser"],targets:{email:t.userNotificationSettings.email||"",phone:t.userNotificationSettings.phone||"",telegram:t.userNotificationSettings.telegram_chat_id||"",telegram_bot_token:t.userNotificationSettings.telegram_bot_token||"",discord:t.userNotificationSettings.discord_webhook||"",webhook:t.userNotificationSettings.webhook_url||"",webhook_token:t.userNotificationSettings.webhook_token||""}},r=s.symbol||"",n="Crypto","string"===typeof r&&r.includes(":")&&(l=r.indexOf(":"),n=r.slice(0,l)||"Crypto",r=r.slice(l+1)),c="futures"===s.market_type?"swap":s.market_type||"swap",d=null!=s.leverage?s.leverage:5,u=s.trade_direction||"both","spot"===c?(d=1,u="long"):(d<1&&(d=1),d>125&&(d=125)),m={user_id:1,strategy_name:s.strategy_name,strategy_type:"ScriptStrategy",strategy_mode:"script",strategy_code:t.strategyCode,market_category:n,execution_mode:s.execution_mode||"signal",notification_config:i,trading_config:{initial_capital:s.initial_capital||1e3,leverage:d,trade_direction:u,timeframe:s.timeframe||"15m",market_type:c,symbol:r,commission:null!=s.commission?s.commission:0,slippage:null!=s.slippage?s.slippage:0}},e.n=2,(0,p.WM)(m);case 2:return g=e.v,1===g.code?(t.$message.success(t.$t("trading-assistant.messages.createSuccess")),t.handleRefresh()):t.$message.error(g.msg||t.$t("trading-assistant.messages.createFailed")),t.saving=!1,t.showFormModal=!1,e.a(2);case 3:if(h=t.canUseLiveTrading&&"live"===s.execution_mode,!h){e.n=4;break}if(_=s.credential_id,_){e.n=4;break}return t.$message.warning(t.$t("trading-assistant.validation.credentialRequired")),t.saving=!1,e.a(2);case 4:if(y={channels:s.notify_channels||[],targets:{email:t.userNotificationSettings.email||"",phone:t.userNotificationSettings.phone||"",telegram:t.userNotificationSettings.telegram_chat_id||"",telegram_bot_token:t.userNotificationSettings.telegram_bot_token||"",discord:t.userNotificationSettings.discord_webhook||"",webhook:t.userNotificationSettings.webhook_url||"",webhook_token:t.userNotificationSettings.webhook_token||""}},y.channels&&0!==y.channels.length){e.n=5;break}return t.$message.warning(t.$t("trading-assistant.validation.notifyChannelRequired")),t.saving=!1,e.a(2);case 5:if(f=String(s.indicator_id),v=t.availableIndicators.find(function(t){return String(t.id)===f}),v){e.n=6;break}return t.$message.error(t.$t("trading-assistant.validation.indicatorRequired")),t.saving=!1,e.a(2);case 6:if(b=!!t.aiFilterEnabledUi,x="futures"===s.market_type?"swap":s.market_type||"swap",C=s.leverage||1,k=s.trade_direction||"long","spot"===x?(C=1,k="long",t.$message.info(t.$t("trading-assistant.messages.spotLimitations"))):(C<1&&(C=1),C>125&&(C=125)),S={strategy_name:s.strategy_name,market_category:t.selectedMarketCategory||"Crypto",execution_mode:s.execution_mode||"signal",notification_config:y,indicator_config:{indicator_id:v.id,indicator_name:v.name,indicator_code:v.code||""},exchange_config:h?t.isIBKRMarket?{exchange_id:s.broker_id||t.currentBrokerId||"ibkr",ibkr_host:s.ibkr_host||"127.0.0.1",ibkr_port:s.ibkr_port||7497,ibkr_client_id:s.ibkr_client_id||1,ibkr_account:s.ibkr_account||""}:t.isMT5Market?{exchange_id:s.forex_broker_id||t.currentBrokerId||"mt5",mt5_server:s.mt5_server||"",mt5_login:s.mt5_login||"",mt5_password:s.mt5_password||"",mt5_terminal_path:s.mt5_terminal_path||""}:{credential_id:s.credential_id,exchange_id:t.currentExchangeId||void 0}:void 0,trading_config:{initial_capital:s.initial_capital,leverage:C,trade_direction:k,timeframe:s.timeframe,market_type:x,margin_mode:"cross",signal_mode:"confirmed",take_profit_pct:s.take_profit_pct||0,stop_loss_pct:s.stop_loss_pct||0,trailing_enabled:!!s.trailing_enabled,trailing_stop_pct:s.trailing_stop_pct||0,trailing_activation_pct:s.trailing_activation_pct||0,trend_add_enabled:!!s.trend_add_enabled,trend_add_step_pct:s.trend_add_step_pct||0,trend_add_size_pct:s.trend_add_size_pct||0,trend_add_max_times:s.trend_add_max_times||0,dca_add_enabled:!!s.dca_add_enabled,dca_add_step_pct:s.dca_add_step_pct||0,dca_add_size_pct:s.dca_add_size_pct||0,dca_add_max_times:s.dca_add_max_times||0,trend_reduce_enabled:!!s.trend_reduce_enabled,trend_reduce_step_pct:s.trend_reduce_step_pct||0,trend_reduce_size_pct:s.trend_reduce_size_pct||0,trend_reduce_max_times:s.trend_reduce_max_times||0,adverse_reduce_enabled:!!s.adverse_reduce_enabled,adverse_reduce_step_pct:s.adverse_reduce_step_pct||0,adverse_reduce_size_pct:s.adverse_reduce_size_pct||0,adverse_reduce_max_times:s.adverse_reduce_max_times||0,entry_pct:0===s.entry_pct||s.entry_pct?s.entry_pct:100,commission:s.commission||0,slippage:s.slippage||0,enable_ai_filter:b,indicator_params:t.indicatorParamValues,strategy_type:s.cs_strategy_type||"single",symbol_list:"cross_sectional"===s.cs_strategy_type?t.crossSectionalSymbols:void 0,portfolio_size:"cross_sectional"===s.cs_strategy_type?s.portfolio_size||10:void 0,long_ratio:"cross_sectional"===s.cs_strategy_type?s.long_ratio||.5:void 0,rebalance_frequency:"cross_sectional"===s.cs_strategy_type?s.rebalance_frequency||"daily":void 0}},!t.editingStrategy){e.n=8;break}return $=s.symbol,"string"===typeof $&&$.includes(":")&&(A=$.indexOf(":"),S.market_category=$.slice(0,A)||S.market_category,$=$.slice(A+1)),S.trading_config.symbol=$,e.n=7,(0,p.P7)(t.editingStrategy.id,S);case 7:w=e.v,e.n=12;break;case 8:if(S.user_id=1,S.strategy_type="IndicatorStrategy","cross_sectional"!==s.cs_strategy_type){e.n=10;break}return S.strategy_type="IndicatorStrategy",S.trading_config.symbol=null,e.n=9,(0,p.WM)(S);case 9:w=e.v,e.n=12;break;case 10:return S.symbols=t.selectedSymbols,e.n=11,(0,p.Ox)(S);case 11:w=e.v;case 12:1===w.code?(t.isEditMode?t.$message.success(t.$t("trading-assistant.messages.updateSuccess")):(P=s.cs_strategy_type||"single",M="cross_sectional"===P?t.crossSectionalSymbols.length:t.selectedSymbols.length,I=(null===(T=w.data)||void 0===T?void 0:T.total_created)||M,t.$message.success(t.$t("trading-assistant.messages.batchCreateSuccess",{count:I}))),t.handleRefresh()):t.$message.error(w.msg||(t.isEditMode?t.$t("trading-assistant.messages.updateFailed"):t.$t("trading-assistant.messages.createFailed"))),e.n=14;break;case 13:e.p=13,e.v,t.$message.error(t.isEditMode?t.$t("trading-assistant.messages.updateFailed"):t.$t("trading-assistant.messages.createFailed"));case 14:return e.p=14,t.saving=!1,e.f(14);case 15:return e.a(2)}},e,null,[[1,13,14,15]])}));return function(t,a){return e.apply(this,arguments)}}());case 1:return e.a(2)}},e)}))()},getFormValues:function(){var t=this;return new Promise(function(e,a){t.form.validateFields(function(t,s){t?a(t):e(s)})})},getDropdownContainer:function(t){return document.body}}},Tt=At,Pt=(0,C.A)(Tt,s,i,!1,null,"533cb131",null),Mt=Pt.exports},84841:function(t,e,a){a.d(e,{DK:function(){return v},E$:function(){return d},Gl:function(){return m},O0:function(){return c},TK:function(){return n},aU:function(){return i},cw:function(){return l},d$:function(){return x},hG:function(){return o},hl:function(){return g},kg:function(){return r},nY:function(){return f},r7:function(){return u},rx:function(){return _},v9:function(){return h},vF:function(){return p},vi:function(){return b},wq:function(){return y}});var s=a(75769);function i(t){return(0,s.Ay)({url:"/api/users/list",method:"get",params:t})}function r(t){return(0,s.Ay)({url:"/api/users/create",method:"post",data:t})}function n(t,e){return(0,s.Ay)({url:"/api/users/update",method:"put",params:{id:t},data:e})}function o(t){return(0,s.Ay)({url:"/api/users/delete",method:"delete",params:{id:t}})}function l(t){return(0,s.Ay)({url:"/api/users/reset-password",method:"post",data:t})}function c(){return(0,s.Ay)({url:"/api/users/roles",method:"get"})}function d(){return(0,s.Ay)({url:"/api/users/profile",method:"get"})}function u(t){return(0,s.Ay)({url:"/api/users/profile/update",method:"put",data:t})}function p(){return(0,s.Ay)({url:"/api/users/notification-settings",method:"get"})}function m(t){return(0,s.Ay)({url:"/api/users/notification-settings",method:"put",data:t})}function g(){return(0,s.Ay)({url:"/api/users/notification-settings/test",method:"post",data:{}})}function h(t){return(0,s.Ay)({url:"/api/users/my-credits-log",method:"get",params:t})}function _(t){return(0,s.Ay)({url:"/api/users/my-referrals",method:"get",params:t})}function y(t){return(0,s.Ay)({url:"/api/users/set-credits",method:"post",data:t})}function f(t){return(0,s.Ay)({url:"/api/users/set-vip",method:"post",data:t})}function v(t){return(0,s.Ay)({url:"/api/users/system-strategies",method:"get",params:t})}function b(t){return(0,s.Ay)({url:"/api/users/admin-orders",method:"get",params:t})}function x(t){return(0,s.Ay)({url:"/api/users/admin-ai-stats",method:"get",params:t})}}}]); \ No newline at end of file diff --git a/frontend/dist/js/328-legacy.4f412768.js b/frontend/dist/js/328-legacy.4f412768.js deleted file mode 100644 index 580ffb1..0000000 --- a/frontend/dist/js/328-legacy.4f412768.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[328],{9328:function(t,e,a){a.r(e),a.d(e,{default:function(){return q}});a(28706),a(62010),a(27495),a(25440);var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"backtest-center",class:{"theme-dark":t.isDarkTheme}},[e("div",{staticClass:"page-header"},[e("h2",{staticClass:"page-title"},[e("a-icon",{staticClass:"title-icon",attrs:{type:"experiment"}}),t._v(" "+t._s(t.$t("backtest-center.title"))+" ")],1),e("p",{staticClass:"page-subtitle"},[t._v(t._s(t.$t("backtest-center.subtitle")))])]),e("a-tabs",{staticClass:"main-tabs",model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[e("a-tab-pane",{key:"indicator",attrs:{tab:t.$t("backtest-center.tabs.indicator")}},[e("a-row",{staticClass:"workspace",attrs:{gutter:20}},[e("a-col",{staticClass:"config-col",attrs:{xs:24,md:9,lg:8}},[e("div",{staticClass:"config-panel"},[e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.indicator.selectIndicator")))]),e("a-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("backtest-center.indicator.selectIndicatorPlaceholder"),loading:t.loadingIndicators,"allow-clear":"","show-search":"","option-filter-prop":"children"},on:{change:t.onIndicatorChange},model:{value:t.selectedIndicatorId,callback:function(e){t.selectedIndicatorId=e},expression:"selectedIndicatorId"}},t._l(t.indicators,function(a){return e("a-select-option",{key:a.id,attrs:{value:a.id}},[t._v(t._s(a.name||"Indicator #"+a.id))])}),1)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.config.symbol")))]),e("a-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("backtest-center.config.watchlistPlaceholder"),"show-search":"","allow-clear":"","filter-option":t.filterWatchlistOption},on:{change:t.handleWatchlistChange},model:{value:t.selectedWatchlistKey,callback:function(e){t.selectedWatchlistKey=e},expression:"selectedWatchlistKey"}},[t._l(t.watchlist,function(a){return e("a-select-option",{key:"".concat(a.market,":").concat(a.symbol),attrs:{value:"".concat(a.market,":").concat(a.symbol)}},[e("a-tag",{attrs:{color:t.getMarketColor(a.market),size:"small"}},[t._v(t._s(a.market))]),e("strong",{staticStyle:{"margin-left":"4px"}},[t._v(t._s(a.symbol))]),a.name?e("span",{staticStyle:{color:"#999","margin-left":"4px","font-size":"12px"}},[t._v(t._s(a.name))]):t._e()],1)}),e("a-select-option",{key:"__add__",staticClass:"add-option",attrs:{value:"__add__"}},[e("div",{staticStyle:{"text-align":"center",color:"#1890ff"}},[e("a-icon",{attrs:{type:"plus"}}),t._v(" "+t._s(t.$t("backtest-center.config.addSymbol"))+" ")],1)])],2)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(" "+t._s(t.$t("backtest-center.config.timeframe"))+" "),e("span",{staticClass:"hint"},[t._v(t._s(t.tfLimitHint))])]),e("a-radio-group",{staticClass:"tf-group",attrs:{"button-style":"solid",size:"small"},on:{change:t.onTimeframeChange},model:{value:t.timeframe,callback:function(e){t.timeframe=e},expression:"timeframe"}},[e("a-radio-button",{attrs:{value:"1m"}},[t._v("1m")]),e("a-radio-button",{attrs:{value:"5m"}},[t._v("5m")]),e("a-radio-button",{attrs:{value:"15m"}},[t._v("15m")]),e("a-radio-button",{attrs:{value:"1H"}},[t._v("1H")]),e("a-radio-button",{attrs:{value:"4H"}},[t._v("4H")]),e("a-radio-button",{attrs:{value:"1D"}},[t._v("1D")]),e("a-radio-button",{attrs:{value:"1W"}},[t._v("1W")])],1)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.config.dateRange")))]),e("div",{staticClass:"date-presets"},t._l(t.filteredDatePresets,function(a){return e("a-button",{key:a.key,attrs:{size:"small",type:t.datePreset===a.key?"primary":"default"},on:{click:function(e){return t.applyDatePreset(a)}}},[t._v(t._s(a.label))])}),1),e("a-row",{staticStyle:{"margin-top":"8px"},attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("a-date-picker",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("backtest-center.config.startDate"),size:"small"},model:{value:t.startDate,callback:function(e){t.startDate=e},expression:"startDate"}})],1),e("a-col",{attrs:{span:12}},[e("a-date-picker",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("backtest-center.config.endDate"),size:"small"},model:{value:t.endDate,callback:function(e){t.endDate=e},expression:"endDate"}})],1)],1)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.config.capital")))]),e("a-row",{attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.initialCapital")))]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:1e3,step:1e4,precision:2,size:"small",formatter:function(t){return"$ ".concat(t).replace(/\B(?=(\d{3})+(?!\d))/g,",")},parser:function(t){return t.replace(/\$\s?|(,*)/g,"")}},model:{value:t.initialCapital,callback:function(e){t.initialCapital=e},expression:"initialCapital"}})],1),e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.leverage")))]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:1,max:125,step:1,precision:0,size:"small",formatter:function(t){return"".concat(t,"x")},parser:function(t){return t.replace("x","")}},model:{value:t.leverage,callback:function(e){t.leverage=e},expression:"leverage"}})],1)],1),e("a-row",{staticStyle:{"margin-top":"8px"},attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.commission"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:10,step:.01,precision:4,size:"small"},model:{value:t.commission,callback:function(e){t.commission=e},expression:"commission"}})],1),e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.slippage"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:10,step:.01,precision:4,size:"small"},model:{value:t.slippage,callback:function(e){t.slippage=e},expression:"slippage"}})],1)],1)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.config.direction")))]),e("a-radio-group",{attrs:{size:"small","button-style":"solid"},model:{value:t.tradeDirection,callback:function(e){t.tradeDirection=e},expression:"tradeDirection"}},[e("a-radio-button",{attrs:{value:"long"}},[t._v(t._s(t.$t("backtest-center.config.long")))]),e("a-radio-button",{attrs:{value:"short"}},[t._v(t._s(t.$t("backtest-center.config.short")))]),e("a-radio-button",{attrs:{value:"both"}},[t._v(t._s(t.$t("backtest-center.config.both")))])],1)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.config.riskPanel")))]),e("a-row",{attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.stopLoss"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:100,step:.5,precision:2,size:"small"},model:{value:t.stopLossPct,callback:function(e){t.stopLossPct=e},expression:"stopLossPct"}})],1),e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.takeProfit"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:1e3,step:.5,precision:2,size:"small"},model:{value:t.takeProfitPct,callback:function(e){t.takeProfitPct=e},expression:"takeProfitPct"}})],1)],1),e("a-row",{staticStyle:{"margin-top":"8px"},attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.entryPct"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:100,step:5,precision:2,size:"small"},model:{value:t.entryPct,callback:function(e){t.entryPct=e},expression:"entryPct"}})],1),e("a-col",{attrs:{span:12}},[e("a-checkbox",{staticStyle:{"margin-top":"18px"},model:{value:t.trailingEnabled,callback:function(e){t.trailingEnabled=e},expression:"trailingEnabled"}},[t._v(t._s(t.$t("backtest-center.config.trailing")))])],1)],1),t.trailingEnabled?[e("a-row",{staticStyle:{"margin-top":"8px"},attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.trailingPct"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:100,step:.5,precision:2,size:"small"},model:{value:t.trailingStopPct,callback:function(e){t.trailingStopPct=e},expression:"trailingStopPct"}})],1),e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.trailingActivation"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:1e3,step:.5,precision:2,size:"small"},model:{value:t.trailingActivationPct,callback:function(e){t.trailingActivationPct=e},expression:"trailingActivationPct"}})],1)],1)]:t._e()],2),e("div",{staticClass:"run-section"},[e("a-button",{attrs:{type:"primary",block:"",size:"large",loading:t.running,disabled:!t.canRunIndicator},on:{click:t.runIndicatorBacktest}},[t.running?t._e():e("a-icon",{attrs:{type:"thunderbolt"}}),t._v(" "+t._s(t.running?t.$t("backtest-center.running"):t.$t("backtest-center.indicator.runBacktest"))+" ")],1),e("a-button",{staticStyle:{"margin-top":"8px"},attrs:{block:"",disabled:!t.selectedIndicatorId},on:{click:function(e){return t.openHistory("indicator")}}},[e("a-icon",{attrs:{type:"history"}}),t._v(" "+t._s(t.$t("backtest-center.indicator.history"))+" ")],1)],1)])]),e("a-col",{staticClass:"result-col",attrs:{xs:24,md:15,lg:16}},[e("div",{staticClass:"result-panel"},[e("result-view",{attrs:{running:t.running,"run-tip":t.runTip,"has-result":t.hasResult,result:t.result,"user-id":t.userId,backtestRunId:t.backtestRunId,symbol:t.symbol,market:t.market,timeframe:t.timeframe,"is-dark":t.isDarkTheme}})],1)])],1)],1),e("a-tab-pane",{key:"strategy",attrs:{tab:t.$t("backtest-center.tabs.strategy")}},[e("a-row",{staticClass:"workspace",attrs:{gutter:20}},[e("a-col",{staticClass:"config-col",attrs:{xs:24,md:9,lg:8}},[e("div",{staticClass:"config-panel"},[e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.strategy.selectStrategy")))]),e("a-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("backtest-center.strategy.selectStrategyPlaceholder"),loading:t.loadingStrategies,"allow-clear":"","show-search":"","option-filter-prop":"children"},on:{change:t.onStrategyChange},model:{value:t.selectedStrategyId,callback:function(e){t.selectedStrategyId=e},expression:"selectedStrategyId"}},t._l(t.strategies,function(a){return e("a-select-option",{key:a.id,attrs:{value:a.id}},[t._v(t._s(a.strategy_name||"Strategy #"+a.id))])}),1),t.selectedStrategyObj?e("div",{staticClass:"strategy-summary-card"},[e("div",{staticClass:"strategy-summary-head"},[e("div",{staticClass:"strategy-summary-title"},[t._v(t._s(t.selectedStrategyObj.strategy_name||"Strategy #"+t.selectedStrategyObj.id))]),e("a-tag",{attrs:{size:"small",color:t.strategyTypeColor(t.selectedStrategyObj)}},[t._v(t._s(t.strategyTypeLabel(t.selectedStrategyObj)))])],1),e("div",{staticClass:"strategy-summary-meta"},[t.selectedStrategyObj.market_category?e("a-tag",{attrs:{size:"small"}},[t._v(t._s(t.selectedStrategyObj.market_category))]):t._e(),t.selectedStrategyObj.symbol?e("a-tag",{attrs:{size:"small"}},[t._v(t._s(t.selectedStrategyObj.symbol))]):t._e(),t.selectedStrategyObj.timeframe?e("a-tag",{attrs:{size:"small"}},[t._v(t._s(t.selectedStrategyObj.timeframe))]):t._e()],1),e("div",{staticClass:"strategy-summary-text"},[t._v(t._s(t.strategySummaryText(t.selectedStrategyObj)))]),e("a-button",{staticStyle:{"padding-left":"0"},attrs:{type:"link",size:"small"},on:{click:function(e){return t.goToStrategyEditor(t.selectedStrategyObj)}}},[t._v(" "+t._s(t.$t("backtest-center.strategy.goToAssistant"))+" ")])],1):t._e()],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.config.symbol")))]),e("a-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("backtest-center.config.watchlistPlaceholder"),"show-search":"","allow-clear":"","filter-option":t.filterWatchlistOption},on:{change:t.handleStWatchlistChange},model:{value:t.stSelectedWatchlistKey,callback:function(e){t.stSelectedWatchlistKey=e},expression:"stSelectedWatchlistKey"}},[t._l(t.watchlist,function(a){return e("a-select-option",{key:"".concat(a.market,":").concat(a.symbol),attrs:{value:"".concat(a.market,":").concat(a.symbol)}},[e("a-tag",{attrs:{color:t.getMarketColor(a.market),size:"small"}},[t._v(t._s(a.market))]),e("strong",{staticStyle:{"margin-left":"4px"}},[t._v(t._s(a.symbol))]),a.name?e("span",{staticStyle:{color:"#999","margin-left":"4px","font-size":"12px"}},[t._v(t._s(a.name))]):t._e()],1)}),e("a-select-option",{key:"__add__",staticClass:"add-option",attrs:{value:"__add__"}},[e("div",{staticStyle:{"text-align":"center",color:"#1890ff"}},[e("a-icon",{attrs:{type:"plus"}}),t._v(" "+t._s(t.$t("backtest-center.config.addSymbol"))+" ")],1)])],2)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(" "+t._s(t.$t("backtest-center.config.timeframe"))+" "),e("span",{staticClass:"hint"},[t._v(t._s(t.stTfLimitHint))])]),e("a-radio-group",{staticClass:"tf-group",attrs:{"button-style":"solid",size:"small"},on:{change:t.onStTimeframeChange},model:{value:t.stTimeframe,callback:function(e){t.stTimeframe=e},expression:"stTimeframe"}},[e("a-radio-button",{attrs:{value:"1m"}},[t._v("1m")]),e("a-radio-button",{attrs:{value:"5m"}},[t._v("5m")]),e("a-radio-button",{attrs:{value:"15m"}},[t._v("15m")]),e("a-radio-button",{attrs:{value:"1H"}},[t._v("1H")]),e("a-radio-button",{attrs:{value:"4H"}},[t._v("4H")]),e("a-radio-button",{attrs:{value:"1D"}},[t._v("1D")]),e("a-radio-button",{attrs:{value:"1W"}},[t._v("1W")])],1)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.config.dateRange")))]),e("div",{staticClass:"date-presets"},t._l(t.stFilteredDatePresets,function(a){return e("a-button",{key:"st-"+a.key,attrs:{size:"small",type:t.stDatePreset===a.key?"primary":"default"},on:{click:function(e){return t.applyStDatePreset(a)}}},[t._v(t._s(a.label))])}),1),e("a-row",{staticStyle:{"margin-top":"8px"},attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("a-date-picker",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("backtest-center.config.startDate"),size:"small"},model:{value:t.stStartDate,callback:function(e){t.stStartDate=e},expression:"stStartDate"}})],1),e("a-col",{attrs:{span:12}},[e("a-date-picker",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("backtest-center.config.endDate"),size:"small"},model:{value:t.stEndDate,callback:function(e){t.stEndDate=e},expression:"stEndDate"}})],1)],1)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.config.capital")))]),e("a-row",{attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.initialCapital")))]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:1e3,step:1e4,precision:2,size:"small",formatter:function(t){return"$ ".concat(t).replace(/\B(?=(\d{3})+(?!\d))/g,",")},parser:function(t){return t.replace(/\$\s?|(,*)/g,"")}},model:{value:t.stInitialCapital,callback:function(e){t.stInitialCapital=e},expression:"stInitialCapital"}})],1),e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.leverage")))]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:1,max:125,step:1,precision:0,size:"small",formatter:function(t){return"".concat(t,"x")},parser:function(t){return t.replace("x","")}},model:{value:t.stLeverage,callback:function(e){t.stLeverage=e},expression:"stLeverage"}})],1)],1),e("a-row",{staticStyle:{"margin-top":"8px"},attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.commission"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:10,step:.01,precision:4,size:"small"},model:{value:t.stCommission,callback:function(e){t.stCommission=e},expression:"stCommission"}})],1),e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.slippage"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:10,step:.01,precision:4,size:"small"},model:{value:t.stSlippage,callback:function(e){t.stSlippage=e},expression:"stSlippage"}})],1)],1)],1),e("div",{staticClass:"run-section"},[e("a-button",{attrs:{type:"primary",block:"",size:"large",loading:t.stRunning,disabled:!t.canRunStrategy},on:{click:t.runStrategyBacktest}},[t.stRunning?t._e():e("a-icon",{attrs:{type:"thunderbolt"}}),t._v(" "+t._s(t.stRunning?t.$t("backtest-center.strategy.running"):t.$t("backtest-center.strategy.runBacktest"))+" ")],1),e("a-button",{staticStyle:{"margin-top":"8px"},attrs:{block:"",disabled:!t.selectedStrategyId},on:{click:function(e){return t.openHistory("strategy")}}},[e("a-icon",{attrs:{type:"history"}}),t._v(" "+t._s(t.$t("backtest-center.strategy.history"))+" ")],1)],1)])]),e("a-col",{staticClass:"result-col",attrs:{xs:24,md:15,lg:16}},[e("div",{staticClass:"result-panel"},[e("result-view",{attrs:{running:t.stRunning,"run-tip":t.stRunTip,"has-result":t.stHasResult,result:t.stResult,"user-id":t.userId,backtestRunId:t.stBacktestRunId,symbol:t.stSymbol,market:t.stMarket,timeframe:t.stTimeframe,"is-dark":t.isDarkTheme}})],1)])],1)],1)],1),e("a-modal",{attrs:{title:t.$t("dashboard.analysis.modal.addStock.title"),visible:t.showAddModal,confirmLoading:t.addingStock,width:"560px","wrap-class-name":t.isDarkTheme?"bc-modal-wrap bc-modal-wrap--dark":"bc-modal-wrap"},on:{ok:t.handleAddStock,cancel:function(e){t.showAddModal=!1}}},[e("a-tabs",{attrs:{size:"small"},on:{change:t.onAddMarketTabChange},model:{value:t.addMarketTab,callback:function(e){t.addMarketTab=e},expression:"addMarketTab"}},[e("a-tab-pane",{key:"Crypto",attrs:{tab:"Crypto"}}),e("a-tab-pane",{key:"USStock",attrs:{tab:"US Stock"}}),e("a-tab-pane",{key:"HKStock",attrs:{tab:"HK Stock"}}),e("a-tab-pane",{key:"Forex",attrs:{tab:"Forex"}}),e("a-tab-pane",{key:"Futures",attrs:{tab:"Futures"}})],1),e("a-input-search",{staticStyle:{margin:"12px 0"},attrs:{placeholder:t.$t("backtest-center.config.symbolPlaceholder"),loading:t.addSearching,size:"large","allow-clear":""},on:{search:t.doAddSearch,change:t.onAddSearchInput},model:{value:t.addSearchKeyword,callback:function(e){t.addSearchKeyword=e},expression:"addSearchKeyword"}}),t.addSearchResults.length>0?e("a-list",{staticStyle:{"max-height":"240px","overflow-y":"auto"},attrs:{size:"small","data-source":t.addSearchResults},scopedSlots:t._u([{key:"renderItem",fn:function(a){return e("a-list-item",{class:{"add-item-active":t.addSelectedItem&&t.addSelectedItem.symbol===a.symbol},staticStyle:{cursor:"pointer"},on:{click:function(e){t.addSelectedItem=a}}},[e("strong",[t._v(t._s(a.symbol))]),a.name?e("span",{staticStyle:{color:"#999","margin-left":"8px"}},[t._v(t._s(a.name))]):t._e(),t.addSelectedItem&&t.addSelectedItem.symbol===a.symbol?e("a-icon",{staticStyle:{color:"#52c41a","margin-left":"auto"},attrs:{type:"check-circle",theme:"filled"}}):t._e()],1)}}],null,!1,2355352582)}):t._e(),0===t.addSearchResults.length&&t.addSearchKeyword&&t.addSearched?e("div",{staticStyle:{padding:"16px 0","text-align":"center",color:"#999"}},[t._v(" "+t._s(t.$t("backtest-center.config.noSearchResult"))+" ")]):t._e()],1),e("backtest-history-drawer",{attrs:{visible:t.showHistoryDrawer,userId:t.userId,indicatorId:t.historyIndicatorId,strategyId:t.historyStrategyId,runType:t.historyRunType,isMobile:!1},on:{cancel:function(e){t.showHistoryDrawer=!1},view:t.handleViewRun}}),e("backtest-run-viewer",{attrs:{visible:t.showRunViewer,run:t.selectedRun},on:{cancel:function(e){t.showRunViewer=!1,t.selectedRun=null}}})],1)},i=[],r=a(15863),n=a(76338),o=a(81127),c=a(56252),l=a(57532),d=(a(2008),a(50113),a(74423),a(48598),a(62062),a(2892),a(9868),a(26099),a(21699),a(11392),a(42762),a(39202),a(48718),a(95093)),u=a.n(d),h=a(29362),m=a(55434),p=a(75769),g=a(505),b=a(35038),y=a(36911),f=(a(34782),function(){var t=this,e=t._self._c;return e("a-drawer",{staticClass:"backtest-history-drawer",attrs:{title:t.$t("dashboard.indicator.backtest.historyTitle"),visible:t.visible,width:t.isMobile?"100%":1060,maskClosable:!0},on:{close:function(e){return t.$emit("cancel")}}},[e("div",{staticClass:"drawer-toolbar"},[e("div",{staticClass:"toolbar-left"},[e("a-button",{attrs:{type:"primary",loading:t.loading,icon:"reload",size:"small"},on:{click:t.loadRuns}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyRefresh"))+" ")]),e("a-button",{attrs:{type:"primary",ghost:"",size:"small",disabled:0===t.selectedRowKeys.length,loading:t.analyzing},on:{click:t.handleAIAnalyze}},[e("a-icon",{attrs:{type:"bulb"}}),t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyAISuggest"))+" ")],1),t.selectedRowKeys.length?e("span",{staticClass:"selected-tip"},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historySelectedCount",{count:t.selectedRowKeys.length}))+" ")]):t._e()],1),e("div",{staticClass:"toolbar-right"},[e("a-input",{staticStyle:{width:"160px"},attrs:{size:"small","allow-clear":"",placeholder:t.$t("dashboard.indicator.backtest.historyFilterSymbol")},on:{change:t.debouncedLoad},model:{value:t.filterSymbol,callback:function(e){t.filterSymbol=e},expression:"filterSymbol"}}),e("a-select",{staticStyle:{width:"100px"},attrs:{size:"small",placeholder:t.$t("dashboard.indicator.backtest.historyFilterTimeframe"),"allow-clear":""},on:{change:t.loadRuns},model:{value:t.filterTimeframe,callback:function(e){t.filterTimeframe=e},expression:"filterTimeframe"}},t._l(t.timeframes,function(a){return e("a-select-option",{key:a,attrs:{value:a}},[t._v(t._s(a))])}),1)],1)]),e("a-table",{attrs:{columns:t.columns,"data-source":t.runs,loading:t.loading,size:"small",pagination:{pageSize:15,size:"small"},rowKey:"id",scroll:{x:1e3},rowSelection:{selectedRowKeys:t.selectedRowKeys,onChange:t.onRowSelectionChange}},scopedSlots:t._u([{key:"symbol",fn:function(a,s){return[e("span",{staticStyle:{"font-weight":"600"}},[t._v(t._s(s.symbol||"-"))]),s.market?e("a-tag",{staticStyle:{"margin-left":"4px"},attrs:{size:"small"}},[t._v(t._s(s.market))]):t._e()]}},{key:"range",fn:function(a,s){return[e("span",[t._v(t._s((s.start_date||"").slice(0,10))+" ~ "+t._s((s.end_date||"").slice(0,10)))])]}},{key:"returnPct",fn:function(a){return[null!==a&&void 0!==a?e("span",{style:{color:a>=0?"#52c41a":"#f5222d",fontWeight:600}},[t._v(" "+t._s(a>=0?"+":"")+t._s(Number(a).toFixed(2))+"% ")]):e("span",[t._v("-")])]}},{key:"createdAt",fn:function(a){return[e("span",[t._v(t._s(t.formatLocalDateTime(a)))])]}},{key:"status",fn:function(a){return[e("a-tag",{attrs:{color:"success"===a?"green":"failed"===a?"red":"blue"}},[t._v(" "+t._s("success"===a?t.$t("dashboard.indicator.backtest.historyStatusSuccess"):"failed"===a?t.$t("dashboard.indicator.backtest.historyStatusFailed"):a)+" ")])]}},{key:"actions",fn:function(a,s){return[e("a-button",{attrs:{type:"link",size:"small",loading:t.detailLoadingId===s.id},on:{click:function(e){return t.viewRun(s)}}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyView"))+" ")]),e("a-button",{attrs:{type:"link",size:"small",loading:t.analyzingRunId===s.id},on:{click:function(e){return t.handleAIAnalyze(s)}}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyAISuggestShort"))+" ")])]}}])}),t.loading||0!==t.runs.length?t._e():e("a-empty",{attrs:{description:t.$t("dashboard.indicator.backtest.historyNoData")}}),e("a-modal",{attrs:{title:t.$t("dashboard.indicator.backtest.historyAISuggestTitle"),visible:t.showAIResult,footer:null,width:t.isMobile?"100%":900},on:{cancel:function(e){t.showAIResult=!1}}},[t.analyzing?e("div",{staticStyle:{padding:"24px 0","text-align":"center"}},[e("a-spin",{attrs:{size:"large"}}),e("div",{staticStyle:{"margin-top":"12px",color:"#999"}},[t._v(t._s(t.$t("dashboard.indicator.backtest.historyAISuggestLoading")))])],1):e("div",{staticClass:"ai-modal-content"},[e("div",{staticClass:"ai-meta-card"},[e("div",{staticClass:"ai-meta-top"},[e("div",{staticClass:"ai-meta-left"},[e("a-tag",{attrs:{color:"blue"}},[t._v(t._s(t.$t("dashboard.indicator.backtest.historyAISuggest")))]),e("a-tag",[t._v(t._s(t.aiModeLabel))]),t.lastAnalyzeRunIds.length?e("a-tag",[t._v(t._s(t.$t("dashboard.indicator.backtest.historySelectedCount",{count:t.lastAnalyzeRunIds.length})))]):t._e()],1),e("div",{staticClass:"ai-meta-actions"},[e("a-button",{attrs:{size:"small"},on:{click:t.copyAIResult}},[e("a-icon",{attrs:{type:"copy"}}),t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyAICopy"))+" ")],1),e("a-button",{attrs:{size:"small",type:"primary",ghost:"",disabled:!t.lastAnalyzeRunIds.length},on:{click:function(e){return t.handleAIAnalyze(null,t.lastAnalyzeRunIds)}}},[e("a-icon",{attrs:{type:"redo"}}),t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyAIRetry"))+" ")],1)],1)]),t.analyzeRunSummaries.length?e("div",{staticClass:"ai-run-tags"},t._l(t.analyzeRunSummaries,function(a){return e("a-tag",{key:a.id,attrs:{color:"purple"}},[t._v(" #"+t._s(a.id)+" "+t._s(a.symbol||"-")+" / "+t._s(a.timeframe||"-")+" ")])}),1):t._e(),e("a-alert",{staticStyle:{"margin-top":"12px"},attrs:{type:"info","show-icon":"",message:t.$t("dashboard.indicator.backtest.historyAIHint")}})],1),t.aiResult?e("div",{staticClass:"ai-markdown-card"},[e("div",{staticClass:"ai-markdown-content",domProps:{innerHTML:t._s(t.renderedAIHtml)}})]):e("div",{staticClass:"ai-result-content"},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyNoAIResult"))+" ")])])])],1)}),v=[],k=a(2403),_=(a(40150),a(31415),a(47764),a(62953),{name:"BacktestHistoryDrawer",props:{visible:{type:Boolean,default:!1},userId:{type:[Number,String],default:1},indicatorId:{type:[Number,String],default:null},strategyId:{type:[Number,String],default:null},runType:{type:String,default:""},symbol:{type:String,default:""},market:{type:String,default:""},timeframe:{type:String,default:""},isMobile:{type:Boolean,default:!1}},data:function(){return{loading:!1,detailLoadingId:null,analyzing:!1,showAIResult:!1,aiResult:"",filterSymbol:"",filterTimeframe:void 0,timeframes:["1m","5m","15m","30m","1H","4H","1D","1W"],runs:[],columns:[],selectedRowKeys:[],debounceTimer:null,analyzingRunId:null,lastAnalyzeRunIds:[],aiMode:""}},computed:{isStrategyHistory:function(){return!!this.strategyId||0===String(this.runType||"").indexOf("strategy_")},aiModeLabel:function(){return"llm"===this.aiMode?this.$t("dashboard.indicator.backtest.historyAIModeLLM"):"heuristic"===this.aiMode||"heuristic_fallback"===this.aiMode?this.$t("dashboard.indicator.backtest.historyAIModeRule"):this.$t("dashboard.indicator.backtest.historyAIModeUnknown")},analyzeRunSummaries:function(){var t=new Set((this.lastAnalyzeRunIds||[]).map(function(t){return Number(t)}));return(this.runs||[]).filter(function(e){return t.has(Number(e.id))}).slice(0,8)},renderedAIHtml:function(){return this.markdownToHtml(this.aiResult||"")}},watch:{visible:function(t){t&&(this.initColumns(),this.filterSymbol="",this.filterTimeframe=void 0,this.selectedRowKeys=[],this.aiResult="",this.aiMode="",this.lastAnalyzeRunIds=[],this.showAIResult=!1,this.loadRuns())}},methods:{onRowSelectionChange:function(t){this.selectedRowKeys=t||[]},debouncedLoad:function(){var t=this;clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(function(){return t.loadRuns()},400)},initColumns:function(){var t=[{title:"#",dataIndex:"id",key:"id",width:60}].concat((0,k.A)(this.isStrategyHistory?[{title:this.$t("backtest-center.strategy.selectStrategy")||"Strategy",dataIndex:"strategy_name",key:"strategy_name",width:180}]:[]),[{title:this.$t("dashboard.indicator.backtest.historySymbol")||"Symbol",key:"symbol",width:150,scopedSlots:{customRender:"symbol"}},{title:this.$t("dashboard.indicator.backtest.timeframe")||"TF",dataIndex:"timeframe",key:"timeframe",width:70},{title:this.$t("dashboard.indicator.backtest.historyRange"),key:"range",width:180,scopedSlots:{customRender:"range"}},{title:this.$t("dashboard.indicator.backtest.tradeDirection"),dataIndex:"trade_direction",key:"trade_direction",width:80},{title:this.$t("dashboard.indicator.backtest.leverage"),dataIndex:"leverage",key:"leverage",width:60},{title:this.$t("dashboard.indicator.backtest.totalReturn")||"Return",dataIndex:"total_return",key:"total_return",width:100,scopedSlots:{customRender:"returnPct"}},{title:this.$t("dashboard.indicator.backtest.historyStatus"),dataIndex:"status",key:"status",width:80,scopedSlots:{customRender:"status"}},{title:this.$t("dashboard.indicator.backtest.historyCreatedAt"),dataIndex:"created_at",key:"created_at",width:180,scopedSlots:{customRender:"createdAt"}},{title:"",key:"actions",width:180,scopedSlots:{customRender:"actions"}}]);this.columns=t},formatLocalDateTime:function(t){if(!t)return"-";var e=new Date(t);return Number.isNaN(e.getTime())?String(t):e.toLocaleString()},copyAIResult:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.aiResult){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,navigator.clipboard.writeText(t.aiResult);case 2:t.$message.success(t.$t("dashboard.indicator.backtest.historyAICopySuccess")),e.n=4;break;case 3:e.p=3,e.v,t.$message.warning(t.$t("dashboard.indicator.backtest.historyAICopyFailed"));case 4:return e.a(2)}},e,null,[[1,3]])}))()},escapeHtml:function(t){return String(t||"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},formatInlineMarkdown:function(t){var e=this.escapeHtml(t);return e=e.replace(/`([^`]+)`/g,"$1"),e=e.replace(/\*\*([^*]+)\*\*/g,"$1"),e=e.replace(/__([^_]+)__/g,"$1"),e=e.replace(/\*([^*]+)\*/g,"$1"),e=e.replace(/_([^_]+)_/g,"$1"),e},markdownToHtml:function(t){var e=String(t||"").replace(/\r\n/g,"\n").trim();if(!e)return"";var a,s=e.split("\n"),i=[],r=!1,n=!1,o=!1,c=[],d=function(){r&&(i.push(""),r=!1),n&&(i.push("
"),n=!1)},u=(0,l.A)(s);try{for(u.s();!(a=u.n()).done;){var h=a.value,m=h.trimRight(),p=m.trim();p.startsWith("```")?(d(),o?(i.push("
".concat(this.escapeHtml(c.join("\n")),"
")),o=!1,c=[]):(o=!0,c=[])):o?c.push(h):p?/^###\s+/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^###\s+/,"")),"

"))):/^##\s+/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^##\s+/,"")),"

"))):/^#\s+/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^#\s+/,"")),"

"))):/^【.+】$/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^【|】$/g,"")),"

"))):/^>\s+/.test(p)?(d(),i.push("
".concat(this.formatInlineMarkdown(p.replace(/^>\s+/,"")),"
"))):/^[-*]\s+/.test(p)?(n&&(i.push(""),n=!1),r||(i.push(""),r=!1),n||(i.push("
    "),n=!0),i.push("
  1. ".concat(this.formatInlineMarkdown(p.replace(/^\d+\.\s+/,"")),"
  2. "))):(d(),i.push("

    ".concat(this.formatInlineMarkdown(p),"

    "))):d()}}catch(g){u.e(g)}finally{u.f()}return d(),o&&i.push("
    ".concat(this.escapeHtml(c.join("\n")),"
    ")),i.join("")},loadRuns:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a,s;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.userId){e.n=1;break}return e.a(2);case 1:return t.loading=!0,e.p=2,a={userid:t.userId,limit:200,offset:0},t.indicatorId&&(a.indicatorId=t.indicatorId),t.strategyId&&(a.strategyId=t.strategyId),t.runType&&(a.runType=t.runType),t.filterSymbol&&(a.symbol=t.filterSymbol),t.filterTimeframe&&(a.timeframe=t.filterTimeframe),e.n=3,(0,p.Ay)({url:t.isStrategyHistory?"/api/strategies/backtest/history":"/api/indicator/backtest/history",method:"get",params:a});case 3:s=e.v,s&&1===s.code&&Array.isArray(s.data)?t.runs=s.data:t.runs=[];case 4:return e.p=4,t.loading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[2,,4,5]])}))()},viewRun:function(t){var e=this;return(0,c.A)((0,o.A)().m(function a(){var s;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:if(t&&t.id){a.n=1;break}return a.a(2);case 1:return e.detailLoadingId=t.id,a.p=2,a.n=3,(0,p.Ay)({url:e.isStrategyHistory?"/api/strategies/backtest/get":"/api/indicator/backtest/get",method:"get",params:{userid:e.userId,runId:t.id}});case 3:s=a.v,s&&1===s.code&&s.data&&e.$emit("view",s.data);case 4:return a.p=4,e.detailLoadingId=null,a.f(4);case 5:return a.a(2)}},a,null,[[2,,4,5]])}))()},handleAIAnalyze:function(){var t=arguments,e=this;return(0,c.A)((0,o.A)().m(function a(){var s,i,r,n,c,l;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:if(s=t.length>0&&void 0!==t[0]?t[0]:null,i=t.length>1&&void 0!==t[1]?t[1]:null,r=i||(s&&s.id?[s.id]:e.selectedRowKeys),e.userId){a.n=1;break}return a.a(2);case 1:if(r&&r.length){a.n=2;break}return e.$message.warning(e.$t("dashboard.indicator.backtest.historyAISelectPrompt")),a.a(2);case 2:return e.analyzing=!0,e.analyzingRunId=s&&s.id?s.id:null,e.lastAnalyzeRunIds=(0,k.A)(r),e.showAIResult=!0,e.aiResult="",e.aiMode="",a.p=3,n=e.$i18n&&e.$i18n.locale?e.$i18n.locale:"zh-CN",a.n=4,(0,p.Ay)({url:"/api/indicator/backtest/aiAnalyze",method:"post",timeout:p.v0,data:{userid:e.userId,runIds:r,lang:n}});case 4:c=a.v,c&&1===c.code&&c.data&&c.data.analysis?(e.aiResult=c.data.analysis,e.aiMode=c.data.mode||""):e.aiResult=c.msg||e.$t("dashboard.indicator.backtest.historyNoAIResult"),a.n=6;break;case 5:a.p=5,l=a.v,e.aiResult=l&&l.message||e.$t("dashboard.indicator.backtest.historyAIFailed");case 6:return a.p=6,e.analyzing=!1,e.analyzingRunId=null,a.f(6);case 7:return a.a(2)}},a,null,[[3,5,6,7]])}))()}}}),S=_,w=a(845),I=(0,w.A)(S,f,v,!1,null,"2a402d06",null),$=I.exports,C=function(){var t,e,a,s=this,i=s._self._c;return i("a-modal",{staticClass:"backtest-run-viewer",attrs:{title:s.modalTitle,visible:s.visible,width:1100,maskClosable:!1},on:{cancel:function(t){return s.$emit("cancel")}}},[s.run&&s.run.result?i("div",[s.run.id?i("a-alert",{staticStyle:{"margin-bottom":"12px"},attrs:{type:"info","show-icon":"",message:s.$t("dashboard.indicator.backtest.savedRunId",{id:s.run.id})}}):s._e(),i("div",{staticClass:"metrics-cards"},[i("div",{staticClass:"metric-card",class:{positive:s.result.totalReturn>0,negative:s.result.totalReturn<0}},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.totalReturn")))]),i("div",{staticClass:"metric-value"},[s._v(s._s(s.formatPercent(s.result.totalReturn)))]),i("div",{staticClass:"metric-amount"},[s._v(s._s(s.formatMoney(s.result.totalProfit)))])]),i("div",{staticClass:"metric-card",class:{positive:s.result.annualReturn>0,negative:s.result.annualReturn<0}},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.annualReturn")))]),i("div",{staticClass:"metric-value"},[s._v(s._s(s.formatPercent(s.result.annualReturn)))])]),i("div",{staticClass:"metric-card negative"},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.maxDrawdown")))]),i("div",{staticClass:"metric-value"},[s._v(s._s(s.formatPercent(s.result.maxDrawdown)))])]),i("div",{staticClass:"metric-card"},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.sharpeRatio")))]),i("div",{staticClass:"metric-value"},[s._v(s._s((null!==(t=s.result.sharpeRatio)&&void 0!==t?t:0).toFixed(2)))])]),i("div",{staticClass:"metric-card"},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.winRate")))]),i("div",{staticClass:"metric-value"},[s._v(s._s(s.formatPercent(s.result.winRate)))])]),i("div",{staticClass:"metric-card",class:{positive:s.result.profitFactor>=1.5,negative:s.result.profitFactor<1}},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.profitFactor")))]),i("div",{staticClass:"metric-value"},[s._v(s._s((null!==(e=s.result.profitFactor)&&void 0!==e?e:0).toFixed(2)))])]),i("div",{staticClass:"metric-card"},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.totalTrades")))]),i("div",{staticClass:"metric-value"},[s._v(s._s(null!==(a=s.result.totalTrades)&&void 0!==a?a:0))])]),i("div",{staticClass:"metric-card negative"},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.totalCommission")))]),i("div",{staticClass:"metric-value"},[s._v("-$"+s._s(s.result.totalCommission?s.result.totalCommission.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"0.00"))])])]),i("div",{staticClass:"chart-section"},[i("div",{staticClass:"chart-title"},[s._v(s._s(s.$t("dashboard.indicator.backtest.equityCurve")))]),i("div",{ref:"equityChartRef",staticClass:"equity-chart"})]),i("div",{staticClass:"trades-section"},[i("div",{staticClass:"chart-title"},[s._v(s._s(s.$t("dashboard.indicator.backtest.tradeHistory")))]),i("a-table",{attrs:{columns:s.tradeColumns,"data-source":s.result.trades||[],pagination:{pageSize:10,size:"small"},size:"small",scroll:{x:800},rowKey:s.rowKey},scopedSlots:s._u([{key:"type",fn:function(t){return[i("a-tag",{attrs:{color:s.getTradeTypeColor(t)}},[s._v(" "+s._s(s.getTradeTypeText(t))+" ")])]}},{key:"balance",fn:function(t){return[i("span",{staticStyle:{color:"#1890ff","font-weight":"500"}},[s._v(" $"+s._s(t?t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"--")+" ")])]}},{key:"profit",fn:function(t){return[i("span",{style:{color:t>0?"#52c41a":t<0?"#f5222d":"#666"}},[s._v(" "+s._s(s.formatMoney(t))+" ")])]}}])})],1)],1):i("div",{staticStyle:{padding:"12px 0"}},[i("a-empty",{attrs:{description:s.$t("dashboard.indicator.backtest.historyNoData")}})],1),i("template",{slot:"footer"},[i("a-button",{on:{click:function(t){return s.$emit("cancel")}}},[s._v(s._s(s.$t("dashboard.indicator.backtest.close")))])],1)],2)},R=[],x={name:"BacktestRunViewer",props:{visible:{type:Boolean,default:!1},run:{type:Object,default:null}},data:function(){return{equityChart:null,tradeColumns:[]}},computed:{result:function(){return this.run&&this.run.result?this.run.result:{}},modalTitle:function(){var t=this.run&&this.run.id?"#".concat(this.run.id):"";return"".concat(this.$t("dashboard.indicator.backtest.historyTitle")," ").concat(t).trim()}},watch:{visible:function(t){var e=this;t?this.$nextTick(function(){e.initColumns(),e.renderEquityChart()}):this.equityChart&&(this.equityChart.dispose(),this.equityChart=null)}},methods:{rowKey:function(t,e){return e},initColumns:function(){this.tradeColumns.length||(this.tradeColumns=[{title:this.$t("dashboard.indicator.backtest.tradeTime"),dataIndex:"time",key:"time",width:160},{title:this.$t("dashboard.indicator.backtest.tradeType"),dataIndex:"type",key:"type",width:150,scopedSlots:{customRender:"type"}},{title:this.$t("dashboard.indicator.backtest.price"),dataIndex:"price",key:"price",width:110},{title:this.$t("dashboard.indicator.backtest.amount"),dataIndex:"amount",key:"amount",width:100},{title:this.$t("dashboard.indicator.backtest.profit"),dataIndex:"profit",key:"profit",width:110,scopedSlots:{customRender:"profit"}},{title:this.$t("dashboard.indicator.backtest.balance"),dataIndex:"balance",key:"balance",width:120,scopedSlots:{customRender:"balance"}}])},getTradeTypeColor:function(t){var e={buy:"green",sell:"red",liquidation:"orange",open_long:"green",add_long:"cyan",close_long:"orange",close_long_stop:"red",close_long_profit:"lime",close_long_trailing:"gold",reduce_long:"volcano",open_short:"red",add_short:"magenta",close_short:"blue",close_short_stop:"red",close_short_profit:"cyan",close_short_trailing:"gold",reduce_short:"volcano"};return e[t]||"default"},getTradeTypeText:function(t){var e={open_long:this.$t("dashboard.indicator.backtest.openLong"),add_long:this.$t("dashboard.indicator.backtest.addLong"),close_long:this.$t("dashboard.indicator.backtest.closeLong"),close_long_stop:this.$t("dashboard.indicator.backtest.closeLongStop"),close_long_profit:this.$t("dashboard.indicator.backtest.closeLongProfit"),close_long_trailing:this.$t("dashboard.indicator.backtest.closeLongTrailing"),reduce_long:this.$t("dashboard.indicator.backtest.reduceLong"),open_short:this.$t("dashboard.indicator.backtest.openShort"),add_short:this.$t("dashboard.indicator.backtest.addShort"),close_short:this.$t("dashboard.indicator.backtest.closeShort"),close_short_stop:this.$t("dashboard.indicator.backtest.closeShortStop"),close_short_profit:this.$t("dashboard.indicator.backtest.closeShortProfit"),close_short_trailing:this.$t("dashboard.indicator.backtest.closeShortTrailing"),reduce_short:this.$t("dashboard.indicator.backtest.reduceShort"),liquidation:this.$t("dashboard.indicator.backtest.liquidation")};return e[t]||t},formatPercent:function(t){if(null===t||void 0===t)return"--";var e=t>=0?"+":"";return"".concat(e).concat(Number(t).toFixed(2),"%")},formatMoney:function(t){if(null===t||void 0===t)return"--";var e=t>=0?"+":"-";return"".concat(e,"$").concat(Math.abs(t).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}))},renderEquityChart:function(){var t=this;if(this.$refs.equityChartRef){this.equityChart&&this.equityChart.dispose(),this.equityChart=h.init(this.$refs.equityChartRef);var e=this.result.equityCurve||[],a=e.map(function(t){return t.time||t.date}),s=e.map(function(t){return void 0!==t.value?t.value:t.equity}),i=s[0]||1e5,r=s[s.length-1]||i,n=r>=i,o=n?"#52c41a":"#f5222d",c=n?[{offset:0,color:"rgba(82, 196, 26, 0.35)"},{offset:1,color:"rgba(82, 196, 26, 0.02)"}]:[{offset:0,color:"rgba(245, 34, 45, 0.35)"},{offset:1,color:"rgba(245, 34, 45, 0.02)"}],l={tooltip:{trigger:"axis"},grid:{left:"3%",right:"4%",bottom:"12%",top:"8%",containLabel:!0},xAxis:{type:"category",data:a,boundaryGap:!1},yAxis:{type:"value"},series:[{name:this.$t("dashboard.indicator.backtest.strategy"),type:"line",data:s,smooth:.4,symbol:"none",sampling:"lttb",lineStyle:{width:2.5,color:o},areaStyle:{color:new h.graphic.LinearGradient(0,0,0,1,c)}}]};this.equityChart.setOption(l),window.addEventListener("resize",function(){return t.equityChart&&t.equityChart.resize()})}}}},A=x,T=(0,w.A)(A,C,R,!1,null,"a484239a",null),D=T.exports,M={"1m":30,"5m":180,"15m":365,"30m":365,"1H":730,"4H":1460,"1D":3650,"1W":7300},z=[{key:"1m",label:"1M",days:30},{key:"3m",label:"3M",days:90},{key:"6m",label:"6M",days:180},{key:"1y",label:"1Y",days:365},{key:"2y",label:"2Y",days:730},{key:"5y",label:"5Y",days:1825}],P={name:"ResultView",props:{running:Boolean,runTip:String,hasResult:Boolean,result:Object,userId:[Number,String],backtestRunId:[Number,String],symbol:String,market:String,timeframe:String,isDark:Boolean},data:function(){return{chartInstance:null,elapsedSec:0,elapsedTimer:null,aiAnalyzing:!1,showAIResult:!1,aiResult:"",aiMode:""}},mounted:function(){this.running&&this._startElapsed()},computed:{aiModeLabel:function(){return"llm"===this.aiMode?this.$t("dashboard.indicator.backtest.historyAIModeLLM"):"heuristic"===this.aiMode||"heuristic_fallback"===this.aiMode?this.$t("dashboard.indicator.backtest.historyAIModeRule"):this.$t("dashboard.indicator.backtest.historyAIModeUnknown")},renderedAIHtml:function(){return this.markdownToHtml(this.aiResult||"")},pairedTrades:function(){for(var t=this.result&&this.result.trades||[],e=[],a=null,s=1,i=0;i=0?"+":"";return e+Number(t).toFixed(2)+"%"},fmtMoney:function(t){if(null==t||isNaN(t))return"$0.00";var e=Math.abs(t).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2});return(t>=0?"":"-")+"$"+e},fmtPrice:function(t){return null==t||isNaN(t)?"--":Number(t).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:4})},escapeHtml:function(t){return String(t||"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},formatInlineMarkdown:function(t){var e=this.escapeHtml(t);return e=e.replace(/`([^`]+)`/g,"$1"),e=e.replace(/\*\*([^*]+)\*\*/g,"$1"),e=e.replace(/__([^_]+)__/g,"$1"),e=e.replace(/\*([^*]+)\*/g,"$1"),e=e.replace(/_([^_]+)_/g,"$1"),e},markdownToHtml:function(t){var e=String(t||"").replace(/\r\n/g,"\n").trim();if(!e)return"";var a,s=e.split("\n"),i=[],r=!1,n=!1,o=!1,c=[],d=function(){r&&(i.push(""),r=!1),n&&(i.push("
"),n=!1)},u=(0,l.A)(s);try{for(u.s();!(a=u.n()).done;){var h=a.value,m=h.trimRight(),p=m.trim();p.startsWith("```")?(d(),o?(i.push("
".concat(this.escapeHtml(c.join("\n")),"
")),o=!1,c=[]):(o=!0,c=[])):o?c.push(h):p?/^###\s+/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^###\s+/,"")),"

"))):/^##\s+/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^##\s+/,"")),"

"))):/^#\s+/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^#\s+/,"")),"

"))):/^【.+】$/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^【|】$/g,"")),"

"))):/^>\s+/.test(p)?(d(),i.push("
".concat(this.formatInlineMarkdown(p.replace(/^>\s+/,"")),"
"))):/^[-*]\s+/.test(p)?(n&&(i.push(""),n=!1),r||(i.push(""),r=!1),n||(i.push("
    "),n=!0),i.push("
  1. ".concat(this.formatInlineMarkdown(p.replace(/^\d+\.\s+/,"")),"
  2. "))):(d(),i.push("

    ".concat(this.formatInlineMarkdown(p),"

    "))):d()}}catch(g){u.e(g)}finally{u.f()}return d(),o&&i.push("
    ".concat(this.escapeHtml(c.join("\n")),"
    ")),i.join("")},copyAIResult:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.aiResult){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,navigator.clipboard.writeText(t.aiResult);case 2:t.$message.success(t.$t("dashboard.indicator.backtest.historyAICopySuccess")),e.n=4;break;case 3:e.p=3,e.v,t.$message.warning(t.$t("dashboard.indicator.backtest.historyAICopyFailed"));case 4:return e.a(2)}},e,null,[[1,3]])}))()},handleAIAnalyze:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a,s,i,r;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(a=t.backtestRunId,t.userId&&a){e.n=1;break}return t.$message.warning(t.$t("dashboard.indicator.backtest.historyAISelectPrompt")),e.a(2);case 1:return t.aiAnalyzing=!0,t.showAIResult=!0,t.aiResult="",t.aiMode="",e.p=2,s=t.$i18n&&t.$i18n.locale?t.$i18n.locale:"zh-CN",e.n=3,(0,p.Ay)({url:"/api/indicator/backtest/aiAnalyze",method:"post",timeout:p.v0,data:{userid:t.userId,runIds:[a],lang:s}});case 3:i=e.v,i&&1===i.code&&i.data&&i.data.analysis?(t.aiResult=i.data.analysis,t.aiMode=i.data.mode||""):t.aiResult=i&&i.msg||t.$t("dashboard.indicator.backtest.historyNoAIResult"),e.n=5;break;case 4:e.p=4,r=e.v,t.aiResult=r&&r.message||t.$t("dashboard.indicator.backtest.historyAIFailed");case 5:return e.p=5,t.aiAnalyzing=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},getCloseReason:function(t,e,a){if(t.includes("_stop"))return"stopLoss";if(t.includes("_profit"))return"takeProfit";if(t.includes("_trailing"))return"trailingStop";if("liquidation"===t)return"liquidation";if(("close_long"===t||"close_short"===t)&&a){var s=String(a.type||"").toLowerCase(),i=String(a.time||"")===String(e.time||"");if(i&&("open_long"===s||"open_short"===s))return"reverse"}return"signal"},reasonColor:function(t){return{stopLoss:"red",takeProfit:"green",trailingStop:"cyan",reverse:"orange",liquidation:"volcano",signal:"blue"}[t]||"default"},renderChart:function(){var t=this,e=this.result;if(e&&e.equityCurve&&e.equityCurve.length){var a=this.$refs.eqChart;if(a){this.chartInstance&&this.chartInstance.dispose(),this.chartInstance=h.init(a);var s=this.isDark,i=e.equityCurve,r=i.length>1&&(i[i.length-1].value||0)>=(i[0].value||0),n=r?"#52c41a":"#f5222d";this.chartInstance.setOption({backgroundColor:"transparent",tooltip:{trigger:"axis",backgroundColor:s?"#1f1f1f":"#fff",borderColor:s?"#434343":"#ddd",textStyle:{color:s?"rgba(255,255,255,0.85)":"#333",fontSize:12},formatter:function(t){var e=t[0];return'
    ').concat(e.name,'
    $').concat(Number(e.value).toLocaleString("en-US",{minimumFractionDigits:2}),"
    ")}},grid:{left:65,right:20,top:20,bottom:30},xAxis:{type:"category",data:i.map(function(t){return t.time||""}),axisLabel:{color:s?"rgba(255,255,255,0.35)":"#999",fontSize:10,rotate:0,interval:Math.floor(i.length/6)},axisLine:{lineStyle:{color:s?"#303030":"#e0e0e0"}},axisTick:{show:!1}},yAxis:{type:"value",axisLabel:{color:s?"rgba(255,255,255,0.35)":"#999",fontSize:11,formatter:function(t){return"$"+(t/1e3).toFixed(1)+"k"}},splitLine:{lineStyle:{color:s?"rgba(255,255,255,0.06)":"#f0f0f0",type:"dashed"}}},series:[{type:"line",data:i.map(function(t){return t.value||0}),smooth:.3,showSymbol:!1,lineStyle:{width:2,color:n},areaStyle:{color:new h.graphic.LinearGradient(0,0,0,1,[{offset:0,color:r?"rgba(82,196,26,0.2)":"rgba(245,34,45,0.2)"},{offset:1,color:"rgba(0,0,0,0)"}])}}]}),window.addEventListener("resize",function(){t.chartInstance&&t.chartInstance.resize()})}}}},render:function(t){var e=this,a=this.isDark;if(this.running){var s=[{key:"fetch",label:this.$t("backtest-center.tip.fetching"),icon:"cloud-download"},{key:"compute",label:this.$t("backtest-center.tip.computing"),icon:"calculator"},{key:"analyze",label:this.$t("backtest-center.tip.analyzing"),icon:"bar-chart"}],i=this.elapsedSec,r=i<4?0:i<10?1:2;return t("div",{class:"running-overlay"},[t("div",{class:"running-content"},[t("div",{class:"running-spinner"},[t("div",{class:"spinner-track"}),t("div",{class:"spinner-fill"})]),t("div",{class:"running-title"},this.$t("backtest-center.running")),t("div",{class:"running-elapsed"},this.fmtElapsed(i)),t("div",{class:"running-steps"},s.map(function(e,a){return t("div",{class:["step-item",a=0?"positive":"negative",sub:this.fmtMoney(n.totalProfit)},{label:"annualReturn",value:this.fmtPct(n.annualReturn),cls:(n.annualReturn||0)>=0?"positive":"negative"},{label:"maxDrawdown",value:this.fmtPct(n.maxDrawdown),cls:"negative"},{label:"sharpe",value:(n.sharpeRatio||0).toFixed(2),cls:(n.sharpeRatio||0)>=1?"positive":(n.sharpeRatio||0)<0?"negative":""},{label:"winRate",value:this.fmtPct(n.winRate),cls:(n.winRate||0)>=50?"positive":""},{label:"profitFactor",value:(n.profitFactor||0).toFixed(2),cls:(n.profitFactor||0)>=1.5?"positive":(n.profitFactor||0)<1?"negative":""},{label:"trades",value:String(n.totalTrades||0),cls:""},{label:"commission",value:this.fmtMoney(-(n.totalCommission||0)),cls:""}];return t("div",{class:"result-content"},[t("div",{class:"result-header"},[t("div",{class:"result-header-left"},[t("span",{class:"result-tag"},[t("a-tag",{props:{color:"blue"}},this.symbol),t("a-tag",{},this.market),t("a-tag",{},this.timeframe)]),this.backtestRunId?t("span",{class:"run-id"},"Run #"+this.backtestRunId):null]),t("div",{class:"result-header-actions"},[t("a-button",{props:{type:"primary",ghost:!0,size:"small",loading:this.aiAnalyzing,disabled:!this.backtestRunId},on:{click:this.handleAIAnalyze}},[t("a-icon",{props:{type:"bulb"},style:{color:a?"#177ddc":void 0}}),this.$t("dashboard.indicator.backtest.historyAISuggest")])])]),t("div",{class:"metrics-cards"},o.map(function(a){return t("div",{class:["metric-card",a.cls]},[t("div",{class:"metric-label"},e.$t("backtest-center.result."+a.label)),t("div",{class:"metric-value"},a.value),a.sub?t("div",{class:"metric-sub"},a.sub):null])})),t("div",{class:"chart-section"},[t("div",{class:"chart-title"},[t("a-icon",{props:{type:"area-chart"},style:{marginRight:"6px",color:a?"rgba(255,255,255,0.72)":"rgba(0,0,0,0.45)"}}),this.$t("backtest-center.result.equityCurve")]),t("div",{ref:"eqChart",class:"equity-chart"})]),t("div",{class:"trades-section"},[t("div",{class:"chart-title"},[t("a-icon",{props:{type:"swap"},style:{marginRight:"6px",color:a?"rgba(255,255,255,0.72)":"rgba(0,0,0,0.45)"}}),this.$t("backtest-center.result.tradeHistory"),t("span",{style:{fontWeight:400,fontSize:"12px",marginLeft:"8px",color:a?"rgba(255,255,255,0.45)":"#999"}},"(".concat(this.pairedTrades.length,")"))]),t("a-table",{props:{columns:this.tradeColumns,dataSource:this.pairedTrades,pagination:{pageSize:10,size:"small",showTotal:function(t){return"".concat(t," trades")}},size:"small",scroll:{x:980},rowKey:"id"},scopedSlots:{type:function(e){return t("a-tag",{props:{color:"long"===e?"green":"red"},style:"margin:0"},"long"===e?"LONG":"SHORT")},openAction:function(a){return t("a-tag",{props:{color:"openLong"===a?"green":"red"},style:"margin:0"},e.$t("backtest-center.result."+a))},closeReason:function(a){return t("a-tag",{props:{color:e.reasonColor(a)},style:"margin:0"},e.$t("backtest-center.result."+a))},price:function(a){return t("span",{style:"font-variant-numeric: tabular-nums"},e.fmtPrice(a))},profit:function(s){return t("span",{style:{color:s>0?"#52c41a":s<0?"#f5222d":a?"rgba(255,255,255,0.65)":"#666",fontWeight:"600",fontVariantNumeric:"tabular-nums"}},e.fmtMoney(s))},money:function(s){return t("span",{style:{color:a?"rgba(255,255,255,0.88)":"#262626",fontWeight:"600",fontVariantNumeric:"tabular-nums"}},e.fmtMoney(s))}}})]),t("a-modal",{props:{title:this.$t("dashboard.indicator.backtest.historyAISuggestTitle"),visible:this.showAIResult,footer:null,width:900,wrapClassName:this.isDark?"bc-modal-wrap bc-modal-wrap--dark":"bc-modal-wrap"},on:{cancel:function(){e.showAIResult=!1}}},[this.aiAnalyzing?t("div",{class:"result-ai-loading"},[t("a-spin",{props:{size:"large"}}),t("div",{class:"result-ai-loading-text"},this.$t("dashboard.indicator.backtest.historyAISuggestLoading"))]):t("div",{class:"result-ai-content"},[t("div",{class:"result-ai-meta-card"},[t("div",{class:"result-ai-meta-top"},[t("div",{class:"result-ai-meta-left"},[t("a-tag",{props:{color:"blue"}},this.$t("dashboard.indicator.backtest.historyAISuggest")),t("a-tag",{},this.aiModeLabel),this.backtestRunId?t("a-tag",{props:{color:"purple"}},"#".concat(this.backtestRunId)):null]),t("div",{class:"result-ai-meta-actions"},[t("a-button",{props:{size:"small"},on:{click:this.copyAIResult}},[t("a-icon",{props:{type:"copy"}}),this.$t("dashboard.indicator.backtest.historyAICopy")]),t("a-button",{props:{size:"small",type:"primary",ghost:!0,disabled:!this.backtestRunId},on:{click:this.handleAIAnalyze}},[t("a-icon",{props:{type:"redo"}}),this.$t("dashboard.indicator.backtest.historyAIRetry")])])]),t("a-alert",{style:{marginTop:"12px"},props:{type:"info",showIcon:!0,message:this.$t("dashboard.indicator.backtest.historyAIHint")}})]),this.aiResult?t("div",{class:"result-ai-markdown-card"},[t("div",{class:"result-ai-markdown-content",domProps:{innerHTML:this.renderedAIHtml}})]):t("div",{class:"result-ai-empty"},this.$t("dashboard.indicator.backtest.historyNoAIResult"))])])])}},L={name:"BacktestCenter",mixins:[m.t],components:{BacktestHistoryDrawer:$,BacktestRunViewer:D,ResultView:P},data:function(){return{activeTab:"indicator",userId:null,watchlist:[],loadingWatchlist:!1,showAddModal:!1,addingStock:!1,addMarketTab:"Crypto",addSearchKeyword:"",addSearchResults:[],addSearching:!1,addSelectedItem:null,addSearched:!1,addSearchTimer:null,addTriggerSource:"",indicators:[],loadingIndicators:!1,selectedIndicatorId:void 0,selectedWatchlistKey:void 0,market:"Crypto",symbol:"",timeframe:"1D",startDate:u()().subtract(6,"months"),endDate:u()(),datePreset:"6m",initialCapital:1e4,leverage:1,commission:.02,slippage:0,tradeDirection:"long",stopLossPct:0,takeProfitPct:0,entryPct:100,trailingEnabled:!1,trailingStopPct:0,trailingActivationPct:0,running:!1,runTip:"",runTimer:null,hasResult:!1,backtestRunId:null,result:{},strategies:[],loadingStrategies:!1,selectedStrategyId:void 0,stSelectedWatchlistKey:void 0,stMarket:"Crypto",stSymbol:"",stTimeframe:"1D",stStartDate:u()().subtract(6,"months"),stEndDate:u()(),stDatePreset:"6m",stInitialCapital:1e4,stLeverage:1,stCommission:.02,stSlippage:0,stRunning:!1,stRunTip:"",stRunTimer:null,stHasResult:!1,stBacktestRunId:null,stResult:{},showHistoryDrawer:!1,historyIndicatorId:null,historyStrategyId:null,historyRunType:"",showRunViewer:!1,selectedRun:null}},computed:{isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},selectedIndicatorObj:function(){var t=this;return this.selectedIndicatorId?this.indicators.find(function(e){return e.id===t.selectedIndicatorId}):null},selectedStrategyObj:function(){var t=this;return this.selectedStrategyId?this.strategies.find(function(e){return e.id===t.selectedStrategyId}):null},canRunIndicator:function(){return this.selectedIndicatorId&&this.symbol&&this.startDate&&this.endDate},canRunStrategy:function(){return this.selectedStrategyId&&this.stSymbol&&this.stStartDate&&this.stEndDate},tfMaxDays:function(){return M[this.timeframe]||3650},stTfMaxDays:function(){return M[this.stTimeframe]||3650},tfLimitHint:function(){var t=this.tfMaxDays;return t<=30?"(≤ 1".concat(this.$t("backtest-center.config.monthUnit"),")"):t<=180?"(≤ 6".concat(this.$t("backtest-center.config.monthUnit"),")"):t<=365?"(≤ 1".concat(this.$t("backtest-center.config.yearUnit"),")"):t<=730?"(≤ 2".concat(this.$t("backtest-center.config.yearUnit"),")"):"(≤ ".concat(Math.round(t/365)).concat(this.$t("backtest-center.config.yearUnit"),")")},stTfLimitHint:function(){var t=this.stTfMaxDays;return t<=30?"(≤ 1".concat(this.$t("backtest-center.config.monthUnit"),")"):t<=180?"(≤ 6".concat(this.$t("backtest-center.config.monthUnit"),")"):t<=365?"(≤ 1".concat(this.$t("backtest-center.config.yearUnit"),")"):t<=730?"(≤ 2".concat(this.$t("backtest-center.config.yearUnit"),")"):"(≤ ".concat(Math.round(t/365)).concat(this.$t("backtest-center.config.yearUnit"),")")},filteredDatePresets:function(){var t=this;return z.filter(function(e){return e.days<=t.tfMaxDays})},stFilteredDatePresets:function(){var t=this;return z.filter(function(e){return e.days<=t.stTfMaxDays})}},created:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){return(0,o.A)().w(function(e){while(1)switch(e.n){case 0:return e.n=1,t.loadUserId();case 1:t.loadIndicators(),t.loadStrategies(),t.loadWatchlistData(),t.parseQuery();case 2:return e.a(2)}},e)}))()},beforeDestroy:function(){clearInterval(this.runTimer),clearInterval(this.stRunTimer),clearTimeout(this.addSearchTimer)},methods:{loadUserId:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,g.ug)();case 1:a=e.v,a&&a.data&&(t.userId=a.data.id||a.data.user_id||1),e.n=3;break;case 2:e.p=2,e.v,t.userId=1;case 3:return e.a(2)}},e,null,[[0,2]])}))()},loadIndicators:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.userId){e.n=1;break}return e.a(2);case 1:return t.loadingIndicators=!0,e.p=2,e.n=3,(0,p.Ay)({url:"/api/indicator/getIndicators",method:"get",params:{userid:t.userId}});case 3:a=e.v,a&&a.data&&Array.isArray(a.data)&&(t.indicators=a.data.map(function(t){return(0,n.A)((0,n.A)({},t),{},{type:"python"})})),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.p=5,t.loadingIndicators=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},loadStrategies:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a,s,i;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.loadingStrategies=!0,e.p=1,e.n=2,(0,y.EM)();case 2:s=e.v,i=Array.isArray(null===s||void 0===s||null===(a=s.data)||void 0===a?void 0:a.strategies)?s.data.strategies:[],t.strategies=i,t.selectedStrategyId&&t.$nextTick(function(){return t.onStrategyChange()}),e.n=4;break;case 3:e.p=3,e.v,t.strategies=[];case 4:return e.p=4,t.loadingStrategies=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},loadWatchlistData:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.userId){e.n=1;break}return e.a(2);case 1:return t.loadingWatchlist=!0,e.p=2,e.n=3,(0,b.Qo)({userid:t.userId});case 3:a=e.v,a&&1===a.code&&a.data&&(t.watchlist=a.data),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.p=5,t.loadingWatchlist=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},parseQuery:function(){var t=this,e=this.$route.query;"strategy"===e.tab&&(this.activeTab="strategy"),e.indicator_id&&(this.selectedIndicatorId=Number(e.indicator_id)||void 0),e.strategy_id&&(this.selectedStrategyId=Number(e.strategy_id)||void 0),"history"===e.view&&this.$nextTick(function(){return t.openHistory(t.activeTab)})},filterWatchlistOption:function(t,e){var a=(e.componentOptions.propsData.value||"").toLowerCase();return"__add__"===a||a.includes(t.toLowerCase())},handleWatchlistChange:function(t){var e=this;if("__add__"===t)return this.addTriggerSource="indicator",this.showAddModal=!0,void this.$nextTick(function(){e.selectedWatchlistKey=void 0});if(t){var a=t.split(":"),s=(0,r.A)(a,2),i=s[0],n=s[1];this.market=i,this.symbol=n}else this.market="",this.symbol=""},handleStWatchlistChange:function(t){var e=this;if("__add__"===t)return this.addTriggerSource="strategy",this.showAddModal=!0,void this.$nextTick(function(){e.stSelectedWatchlistKey=void 0});if(t){var a=t.split(":"),s=(0,r.A)(a,2),i=s[0],n=s[1];this.stMarket=i,this.stSymbol=n}else this.stMarket="",this.stSymbol=""},getMarketColor:function(t){var e={Crypto:"orange",USStock:"blue",HKStock:"red",Forex:"green",Futures:"purple",PredictionMarket:"cyan"};return e[t]||"default"},onAddMarketTabChange:function(){this.addSearchKeyword="",this.addSearchResults=[],this.addSelectedItem=null,this.addSearched=!1},onAddSearchInput:function(){var t=this;clearTimeout(this.addSearchTimer),this.addSearchKeyword?this.addSearchTimer=setTimeout(function(){return t.doAddSearch()},400):this.addSearchResults=[]},doAddSearch:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.addSearchKeyword){e.n=1;break}return e.a(2);case 1:return t.addSearching=!0,e.p=2,e.n=3,(0,b._3)({market:t.addMarketTab,keyword:t.addSearchKeyword,limit:20});case 3:a=e.v,a&&a.data&&Array.isArray(a.data)?t.addSearchResults=a.data:t.addSearchResults=[],t.addSearched=!0,0===t.addSearchResults.length&&(t.addSelectedItem={market:t.addMarketTab,symbol:t.addSearchKeyword.trim().toUpperCase(),name:""}),e.n=5;break;case 4:e.p=4,e.v,t.addSelectedItem={market:t.addMarketTab,symbol:t.addSearchKeyword.trim().toUpperCase(),name:""};case 5:return e.p=5,t.addSearching=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},handleAddStock:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a,s,i,r;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(a=t.addSelectedItem,a&&a.symbol){e.n=1;break}return t.$message.warning(t.$t("backtest-center.config.symbolRequired")),e.a(2);case 1:return t.addingStock=!0,e.p=2,s=a.market||t.addMarketTab,e.n=3,(0,b.dp)({userid:t.userId,market:s,symbol:a.symbol,name:a.name||""});case 3:return t.$message.success(t.$t("backtest-center.config.addSuccess")),e.n=4,t.loadWatchlistData();case 4:i="".concat(s,":").concat(a.symbol),"strategy"===t.addTriggerSource?(t.stSelectedWatchlistKey=i,t.stMarket=s,t.stSymbol=a.symbol):(t.selectedWatchlistKey=i,t.market=s,t.symbol=a.symbol),t.showAddModal=!1,e.n=6;break;case 5:e.p=5,r=e.v,t.$message.error(r.message||"Failed");case 6:return e.p=6,t.addingStock=!1,e.f(6);case 7:return e.a(2)}},e,null,[[2,5,6,7]])}))()},onTimeframeChange:function(){this.clampDateRange("indicator"),this.datePreset=this.matchPreset(this.startDate,this.endDate)},onStTimeframeChange:function(){this.clampDateRange("strategy"),this.stDatePreset=this.matchPreset(this.stStartDate,this.stEndDate)},clampDateRange:function(t){var e="strategy"===t?this.stTfMaxDays:this.tfMaxDays,a="strategy"===t?this.stStartDate:this.startDate,s="strategy"===t?this.stEndDate:this.endDate;if(a&&s){var i=s.diff(a,"days");if(i>e){var r=u()(s).subtract(e,"days");"strategy"===t?this.stStartDate=r:this.startDate=r}}},matchPreset:function(t,e){if(!t||!e)return"";for(var a=e.diff(t,"days"),s=0,i=z;s0?e("a-list",{staticStyle:{"max-height":"240px","overflow-y":"auto"},attrs:{size:"small","data-source":t.addSearchResults},scopedSlots:t._u([{key:"renderItem",fn:function(a){return e("a-list-item",{class:{"add-item-active":t.addSelectedItem&&t.addSelectedItem.symbol===a.symbol},staticStyle:{cursor:"pointer"},on:{click:function(e){t.addSelectedItem=a}}},[e("strong",[t._v(t._s(a.symbol))]),a.name?e("span",{staticStyle:{color:"#999","margin-left":"8px"}},[t._v(t._s(a.name))]):t._e(),t.addSelectedItem&&t.addSelectedItem.symbol===a.symbol?e("a-icon",{staticStyle:{color:"#52c41a","margin-left":"auto"},attrs:{type:"check-circle",theme:"filled"}}):t._e()],1)}}],null,!1,2355352582)}):t._e(),0===t.addSearchResults.length&&t.addSearchKeyword&&t.addSearched?e("div",{staticStyle:{padding:"16px 0","text-align":"center",color:"#999"}},[t._v(" "+t._s(t.$t("backtest-center.config.noSearchResult"))+" ")]):t._e()],1),e("backtest-history-drawer",{attrs:{visible:t.showHistoryDrawer,userId:t.userId,indicatorId:t.historyIndicatorId,strategyId:t.historyStrategyId,runType:t.historyRunType,isMobile:!1,isDark:t.isDarkTheme},on:{cancel:function(e){t.showHistoryDrawer=!1},view:t.handleViewRun}}),e("backtest-run-viewer",{attrs:{visible:t.showRunViewer,run:t.selectedRun,isDark:t.isDarkTheme},on:{cancel:function(e){t.showRunViewer=!1,t.selectedRun=null}}})],1)},i=[],r=a(15863),n=a(76338),o=a(81127),c=a(56252),l=a(57532),d=(a(2008),a(50113),a(74423),a(48598),a(62062),a(2892),a(9868),a(26099),a(21699),a(11392),a(42762),a(39202),a(48718),a(95093)),u=a.n(d),h=a(29362),m=a(55434),p=a(75769),g=a(505),b=a(35038),f=a(36911),y=(a(34782),function(){var t=this,e=t._self._c;return e("a-drawer",{staticClass:"backtest-history-drawer",attrs:{title:t.$t("dashboard.indicator.backtest.historyTitle"),visible:t.visible,width:t.isMobile?"100%":1060,maskClosable:!0,wrapClassName:t.drawerWrapClass},on:{close:function(e){return t.$emit("cancel")}}},[e("div",{staticClass:"drawer-toolbar"},[e("div",{staticClass:"toolbar-left"},[e("a-button",{attrs:{type:"primary",loading:t.loading,icon:"reload",size:"small"},on:{click:t.loadRuns}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyRefresh"))+" ")]),e("a-button",{attrs:{type:"primary",ghost:"",size:"small",disabled:0===t.selectedRowKeys.length,loading:t.analyzing},on:{click:t.handleAIAnalyze}},[e("a-icon",{attrs:{type:"bulb"}}),t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyAISuggest"))+" ")],1),t.selectedRowKeys.length?e("span",{staticClass:"selected-tip"},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historySelectedCount",{count:t.selectedRowKeys.length}))+" ")]):t._e()],1),e("div",{staticClass:"toolbar-right"},[e("a-input",{staticStyle:{width:"160px"},attrs:{size:"small","allow-clear":"",placeholder:t.$t("dashboard.indicator.backtest.historyFilterSymbol")},on:{change:t.debouncedLoad},model:{value:t.filterSymbol,callback:function(e){t.filterSymbol=e},expression:"filterSymbol"}}),e("a-select",{staticStyle:{width:"100px"},attrs:{size:"small",placeholder:t.$t("dashboard.indicator.backtest.historyFilterTimeframe"),"allow-clear":""},on:{change:t.loadRuns},model:{value:t.filterTimeframe,callback:function(e){t.filterTimeframe=e},expression:"filterTimeframe"}},t._l(t.timeframes,function(a){return e("a-select-option",{key:a,attrs:{value:a}},[t._v(t._s(a))])}),1)],1)]),e("a-table",{attrs:{columns:t.columns,"data-source":t.runs,loading:t.loading,size:"small",pagination:{pageSize:15,size:"small"},rowKey:"id",scroll:{x:1120},rowSelection:{selectedRowKeys:t.selectedRowKeys,onChange:t.onRowSelectionChange}},scopedSlots:t._u([{key:"symbol",fn:function(a,s){return[e("span",{staticStyle:{"font-weight":"600"}},[t._v(t._s(s.symbol||"-"))]),s.market?e("a-tag",{staticStyle:{"margin-left":"4px"},attrs:{size:"small"}},[t._v(t._s(s.market))]):t._e()]}},{key:"range",fn:function(a,s){return[e("span",[t._v(t._s((s.start_date||"").slice(0,10))+" ~ "+t._s((s.end_date||"").slice(0,10)))])]}},{key:"returnPct",fn:function(a){return[null!==a&&void 0!==a?e("span",{style:{color:a>=0?"#52c41a":"#f5222d",fontWeight:600}},[t._v(" "+t._s(a>=0?"+":"")+t._s(Number(a).toFixed(2))+"% ")]):e("span",[t._v("-")])]}},{key:"fillTiming",fn:function(a,s){return["same"===t.fillTimingKind(s)?e("a-tag",{attrs:{size:"small",color:"orange"}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyFillTimingSame"))+" ")]):e("a-tag",{attrs:{size:"small",color:"blue"}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyFillTimingNext"))+" ")])]}},{key:"createdAt",fn:function(a){return[e("span",[t._v(t._s(t.formatLocalDateTime(a)))])]}},{key:"status",fn:function(a){return[e("a-tag",{attrs:{color:"success"===a?"green":"failed"===a?"red":"blue"}},[t._v(" "+t._s("success"===a?t.$t("dashboard.indicator.backtest.historyStatusSuccess"):"failed"===a?t.$t("dashboard.indicator.backtest.historyStatusFailed"):a)+" ")])]}},{key:"actions",fn:function(a,s){return[e("a-button",{attrs:{type:"link",size:"small",loading:t.detailLoadingId===s.id},on:{click:function(e){return t.viewRun(s)}}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyView"))+" ")]),e("a-button",{attrs:{type:"link",size:"small",loading:t.analyzingRunId===s.id},on:{click:function(e){return t.handleAIAnalyze(s)}}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyAISuggestShort"))+" ")])]}}])}),t.loading||0!==t.runs.length?t._e():e("a-empty",{attrs:{description:t.$t("dashboard.indicator.backtest.historyNoData")}}),e("a-modal",{attrs:{title:t.$t("dashboard.indicator.backtest.historyAISuggestTitle"),visible:t.showAIResult,footer:null,width:t.isMobile?"100%":900,wrapClassName:t.aiModalWrapClass},on:{cancel:function(e){t.showAIResult=!1}}},[t.analyzing?e("div",{staticStyle:{padding:"24px 0","text-align":"center"}},[e("a-spin",{attrs:{size:"large"}}),e("div",{staticStyle:{"margin-top":"12px",color:"#999"}},[t._v(t._s(t.$t("dashboard.indicator.backtest.historyAISuggestLoading")))])],1):e("div",{staticClass:"ai-modal-content"},[e("div",{staticClass:"ai-meta-card"},[e("div",{staticClass:"ai-meta-top"},[e("div",{staticClass:"ai-meta-left"},[e("a-tag",{attrs:{color:"blue"}},[t._v(t._s(t.$t("dashboard.indicator.backtest.historyAISuggest")))]),e("a-tag",[t._v(t._s(t.aiModeLabel))]),t.lastAnalyzeRunIds.length?e("a-tag",[t._v(t._s(t.$t("dashboard.indicator.backtest.historySelectedCount",{count:t.lastAnalyzeRunIds.length})))]):t._e()],1),e("div",{staticClass:"ai-meta-actions"},[e("a-button",{attrs:{size:"small"},on:{click:t.copyAIResult}},[e("a-icon",{attrs:{type:"copy"}}),t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyAICopy"))+" ")],1),e("a-button",{attrs:{size:"small",type:"primary",ghost:"",disabled:!t.lastAnalyzeRunIds.length},on:{click:function(e){return t.handleAIAnalyze(null,t.lastAnalyzeRunIds)}}},[e("a-icon",{attrs:{type:"redo"}}),t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyAIRetry"))+" ")],1)],1)]),t.analyzeRunSummaries.length?e("div",{staticClass:"ai-run-tags"},t._l(t.analyzeRunSummaries,function(a){return e("a-tag",{key:a.id,attrs:{color:"purple"}},[t._v(" #"+t._s(a.id)+" "+t._s(a.symbol||"-")+" / "+t._s(a.timeframe||"-")+" ")])}),1):t._e(),e("a-alert",{staticStyle:{"margin-top":"12px"},attrs:{type:"info","show-icon":"",message:t.$t("dashboard.indicator.backtest.historyAIHint")}})],1),t.aiResult?e("div",{staticClass:"ai-markdown-card"},[e("div",{staticClass:"ai-markdown-content",domProps:{innerHTML:t._s(t.renderedAIHtml)}})]):e("div",{staticClass:"ai-result-content"},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyNoAIResult"))+" ")])])])],1)}),v=[],k=a(2403),_=(a(31415),a(47764),a(62953),{name:"BacktestHistoryDrawer",props:{visible:{type:Boolean,default:!1},userId:{type:[Number,String],default:1},indicatorId:{type:[Number,String],default:null},strategyId:{type:[Number,String],default:null},runType:{type:String,default:""},symbol:{type:String,default:""},market:{type:String,default:""},timeframe:{type:String,default:""},isMobile:{type:Boolean,default:!1},isDark:{type:Boolean,default:!1}},data:function(){return{loading:!1,detailLoadingId:null,analyzing:!1,showAIResult:!1,aiResult:"",filterSymbol:"",filterTimeframe:void 0,timeframes:["1m","5m","15m","30m","1H","4H","1D","1W"],runs:[],columns:[],selectedRowKeys:[],debounceTimer:null,analyzingRunId:null,lastAnalyzeRunIds:[],aiMode:""}},computed:{isStrategyHistory:function(){return!!this.strategyId||0===String(this.runType||"").indexOf("strategy_")},aiModeLabel:function(){return"llm"===this.aiMode?this.$t("dashboard.indicator.backtest.historyAIModeLLM"):"heuristic"===this.aiMode||"heuristic_fallback"===this.aiMode?this.$t("dashboard.indicator.backtest.historyAIModeRule"):this.$t("dashboard.indicator.backtest.historyAIModeUnknown")},analyzeRunSummaries:function(){var t=new Set((this.lastAnalyzeRunIds||[]).map(function(t){return Number(t)}));return(this.runs||[]).filter(function(e){return t.has(Number(e.id))}).slice(0,8)},renderedAIHtml:function(){return this.markdownToHtml(this.aiResult||"")},drawerWrapClass:function(){return this.isDark?"backtest-history-drawer-wrap backtest-history-drawer-wrap--dark":"backtest-history-drawer-wrap"},aiModalWrapClass:function(){return this.isDark?"backtest-history-ai-modal backtest-history-ai-modal--dark":"backtest-history-ai-modal"}},watch:{visible:function(t){t&&(this.initColumns(),this.filterSymbol="",this.filterTimeframe=void 0,this.selectedRowKeys=[],this.aiResult="",this.aiMode="",this.lastAnalyzeRunIds=[],this.showAIResult=!1,this.loadRuns())}},methods:{onRowSelectionChange:function(t){this.selectedRowKeys=t||[]},debouncedLoad:function(){var t=this;clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(function(){return t.loadRuns()},400)},fillTimingKind:function(t){var e=t&&t.strategy_config||{},a=(e.execution||{}).signalTiming;if(null==a||""===String(a).trim())return"next";var s=String(a).toLowerCase();return"same_bar_close"===s||"current_bar_close"===s||"bar_close"===s||"close"===s?"same":"next"},initColumns:function(){var t=[{title:"#",dataIndex:"id",key:"id",width:60}].concat((0,k.A)(this.isStrategyHistory?[{title:this.$t("backtest-center.strategy.selectStrategy")||"Strategy",dataIndex:"strategy_name",key:"strategy_name",width:180}]:[]),[{title:this.$t("dashboard.indicator.backtest.historySymbol")||"Symbol",key:"symbol",width:150,scopedSlots:{customRender:"symbol"}},{title:this.$t("dashboard.indicator.backtest.timeframe")||"TF",dataIndex:"timeframe",key:"timeframe",width:70},{title:this.$t("dashboard.indicator.backtest.historyFillTimingCol"),key:"fillTiming",width:96,scopedSlots:{customRender:"fillTiming"}},{title:this.$t("dashboard.indicator.backtest.historyRange"),key:"range",width:180,scopedSlots:{customRender:"range"}},{title:this.$t("dashboard.indicator.backtest.tradeDirection"),dataIndex:"trade_direction",key:"trade_direction",width:80},{title:this.$t("dashboard.indicator.backtest.leverage"),dataIndex:"leverage",key:"leverage",width:60},{title:this.$t("dashboard.indicator.backtest.totalReturn")||"Return",dataIndex:"total_return",key:"total_return",width:100,scopedSlots:{customRender:"returnPct"}},{title:this.$t("dashboard.indicator.backtest.historyStatus"),dataIndex:"status",key:"status",width:80,scopedSlots:{customRender:"status"}},{title:this.$t("dashboard.indicator.backtest.historyCreatedAt"),dataIndex:"created_at",key:"created_at",width:180,scopedSlots:{customRender:"createdAt"}},{title:"",key:"actions",width:180,scopedSlots:{customRender:"actions"}}]);this.columns=t},formatLocalDateTime:function(t){var e=this.parseDateTimeToLocal(t);return e?e.format("YYYY-MM-DD HH:mm:ss"):"-"},parseDateTimeToLocal:function(t){if(!t&&0!==t)return null;if(u().isMoment(t))return t.clone();if("number"===typeof t)return String(t).length<=10?u().unix(t):u()(t);var e=String(t).trim();if(!e)return null;if(/^\d+$/.test(e)){var a=Number(e);return e.length<=10?u().unix(a):u()(a)}if(/[zZ]|[-+]\d{2}:\d{2}$/.test(e)){var s=u()(e);return s.isValid()?s.local():null}if(/^\d{4}-\d{2}-\d{2}[ T]\d{2}:\d{2}(:\d{2})?$/.test(e)){var i=u().utc(e,["YYYY-MM-DD HH:mm:ss","YYYY-MM-DD HH:mm","YYYY-MM-DDTHH:mm:ss",u().ISO_8601],!0);return i.isValid()?i.local():null}var r=u()(e);return r.isValid()?r:null},copyAIResult:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.aiResult){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,navigator.clipboard.writeText(t.aiResult);case 2:t.$message.success(t.$t("dashboard.indicator.backtest.historyAICopySuccess")),e.n=4;break;case 3:e.p=3,e.v,t.$message.warning(t.$t("dashboard.indicator.backtest.historyAICopyFailed"));case 4:return e.a(2)}},e,null,[[1,3]])}))()},escapeHtml:function(t){return String(t||"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},formatInlineMarkdown:function(t){var e=this.escapeHtml(t);return e=e.replace(/`([^`]+)`/g,"$1"),e=e.replace(/\*\*([^*]+)\*\*/g,"$1"),e=e.replace(/__([^_]+)__/g,"$1"),e=e.replace(/\*([^*]+)\*/g,"$1"),e=e.replace(/_([^_]+)_/g,"$1"),e},markdownToHtml:function(t){var e=String(t||"").replace(/\r\n/g,"\n").trim();if(!e)return"";var a,s=e.split("\n"),i=[],r=!1,n=!1,o=!1,c=[],d=function(){r&&(i.push(""),r=!1),n&&(i.push("
"),n=!1)},u=(0,l.A)(s);try{for(u.s();!(a=u.n()).done;){var h=a.value,m=h.trimRight(),p=m.trim();p.startsWith("```")?(d(),o?(i.push("
".concat(this.escapeHtml(c.join("\n")),"
")),o=!1,c=[]):(o=!0,c=[])):o?c.push(h):p?/^###\s+/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^###\s+/,"")),"

"))):/^##\s+/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^##\s+/,"")),"

"))):/^#\s+/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^#\s+/,"")),"

"))):/^【.+】$/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^【|】$/g,"")),"

"))):/^>\s+/.test(p)?(d(),i.push("
".concat(this.formatInlineMarkdown(p.replace(/^>\s+/,"")),"
"))):/^[-*]\s+/.test(p)?(n&&(i.push(""),n=!1),r||(i.push(""),r=!1),n||(i.push("
    "),n=!0),i.push("
  1. ".concat(this.formatInlineMarkdown(p.replace(/^\d+\.\s+/,"")),"
  2. "))):(d(),i.push("

    ".concat(this.formatInlineMarkdown(p),"

    "))):d()}}catch(g){u.e(g)}finally{u.f()}return d(),o&&i.push("
    ".concat(this.escapeHtml(c.join("\n")),"
    ")),i.join("")},loadRuns:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a,s;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.userId){e.n=1;break}return e.a(2);case 1:return t.loading=!0,e.p=2,a={userid:t.userId,limit:200,offset:0},t.indicatorId&&(a.indicatorId=t.indicatorId),t.strategyId&&(a.strategyId=t.strategyId),t.runType&&(a.runType=t.runType),t.filterSymbol&&(a.symbol=t.filterSymbol),t.filterTimeframe&&(a.timeframe=t.filterTimeframe),e.n=3,(0,p.Ay)({url:t.isStrategyHistory?"/api/strategies/backtest/history":"/api/indicator/backtest/history",method:"get",params:a});case 3:s=e.v,s&&1===s.code&&Array.isArray(s.data)?t.runs=s.data:t.runs=[];case 4:return e.p=4,t.loading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[2,,4,5]])}))()},viewRun:function(t){var e=this;return(0,c.A)((0,o.A)().m(function a(){var s;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:if(t&&t.id){a.n=1;break}return a.a(2);case 1:return e.detailLoadingId=t.id,a.p=2,a.n=3,(0,p.Ay)({url:e.isStrategyHistory?"/api/strategies/backtest/get":"/api/indicator/backtest/get",method:"get",params:{userid:e.userId,runId:t.id}});case 3:s=a.v,s&&1===s.code&&s.data&&e.$emit("view",s.data);case 4:return a.p=4,e.detailLoadingId=null,a.f(4);case 5:return a.a(2)}},a,null,[[2,,4,5]])}))()},handleAIAnalyze:function(){var t=arguments,e=this;return(0,c.A)((0,o.A)().m(function a(){var s,i,r,n,c,l;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:if(s=t.length>0&&void 0!==t[0]?t[0]:null,i=t.length>1&&void 0!==t[1]?t[1]:null,r=i||(s&&s.id?[s.id]:e.selectedRowKeys),e.userId){a.n=1;break}return a.a(2);case 1:if(r&&r.length){a.n=2;break}return e.$message.warning(e.$t("dashboard.indicator.backtest.historyAISelectPrompt")),a.a(2);case 2:return e.analyzing=!0,e.analyzingRunId=s&&s.id?s.id:null,e.lastAnalyzeRunIds=(0,k.A)(r),e.showAIResult=!0,e.aiResult="",e.aiMode="",a.p=3,n=e.$i18n&&e.$i18n.locale?e.$i18n.locale:"zh-CN",a.n=4,(0,p.Ay)({url:"/api/indicator/backtest/aiAnalyze",method:"post",timeout:p.v0,data:{userid:e.userId,runIds:r,lang:n}});case 4:c=a.v,c&&1===c.code&&c.data&&c.data.analysis?(e.aiResult=c.data.analysis,e.aiMode=c.data.mode||""):e.aiResult=c.msg||e.$t("dashboard.indicator.backtest.historyNoAIResult"),a.n=6;break;case 5:a.p=5,l=a.v,e.aiResult=l&&l.message||e.$t("dashboard.indicator.backtest.historyAIFailed");case 6:return a.p=6,e.analyzing=!1,e.analyzingRunId=null,a.f(6);case 7:return a.a(2)}},a,null,[[3,5,6,7]])}))()}}}),S=_,w=a(845),$=(0,w.A)(S,y,v,!1,null,"9c4d8af2",null),I=$.exports,C=function(){var t,e,a,s=this,i=s._self._c;return i("a-modal",{staticClass:"backtest-run-viewer",attrs:{title:s.modalTitle,visible:s.visible,width:1100,maskClosable:!1,wrapClassName:s.modalWrapClass},on:{cancel:function(t){return s.$emit("cancel")}}},[s.run&&s.run.result?i("div",[s.run.id?i("a-alert",{staticStyle:{"margin-bottom":"12px"},attrs:{type:"info","show-icon":"",message:s.$t("dashboard.indicator.backtest.savedRunId",{id:s.run.id})}}):s._e(),i("backtest-execution-assumptions-alert",{attrs:{assumptions:s.result.executionAssumptions,"strategy-config":s.run.strategy_config,timeframe:s.run.timeframe||""}}),i("div",{staticClass:"metrics-cards"},[i("div",{staticClass:"metric-card",class:{positive:s.result.totalReturn>0,negative:s.result.totalReturn<0}},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.totalReturn")))]),i("div",{staticClass:"metric-value"},[s._v(s._s(s.formatPercent(s.result.totalReturn)))]),i("div",{staticClass:"metric-amount"},[s._v(s._s(s.formatMoney(s.result.totalProfit)))])]),i("div",{staticClass:"metric-card",class:{positive:s.result.annualReturn>0,negative:s.result.annualReturn<0}},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.annualReturn")))]),i("div",{staticClass:"metric-value"},[s._v(s._s(s.formatPercent(s.result.annualReturn)))])]),i("div",{staticClass:"metric-card negative"},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.maxDrawdown")))]),i("div",{staticClass:"metric-value"},[s._v(s._s(s.formatPercent(s.result.maxDrawdown)))])]),i("div",{staticClass:"metric-card"},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.sharpeRatio")))]),i("div",{staticClass:"metric-value"},[s._v(s._s((null!==(t=s.result.sharpeRatio)&&void 0!==t?t:0).toFixed(2)))])]),i("div",{staticClass:"metric-card"},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.winRate")))]),i("div",{staticClass:"metric-value"},[s._v(s._s(s.formatPercent(s.result.winRate)))])]),i("div",{staticClass:"metric-card",class:{positive:s.result.profitFactor>=1.5,negative:s.result.profitFactor<1}},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.profitFactor")))]),i("div",{staticClass:"metric-value"},[s._v(s._s((null!==(e=s.result.profitFactor)&&void 0!==e?e:0).toFixed(2)))])]),i("div",{staticClass:"metric-card"},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.totalTrades")))]),i("div",{staticClass:"metric-value"},[s._v(s._s(null!==(a=s.result.totalTrades)&&void 0!==a?a:0))])]),i("div",{staticClass:"metric-card negative"},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.totalCommission")))]),i("div",{staticClass:"metric-value"},[s._v("-$"+s._s(s.result.totalCommission?s.result.totalCommission.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"0.00"))])])]),i("div",{staticClass:"chart-section"},[i("div",{staticClass:"chart-title"},[s._v(s._s(s.$t("dashboard.indicator.backtest.equityCurve")))]),i("div",{ref:"equityChartRef",staticClass:"equity-chart"})]),i("div",{staticClass:"trades-section"},[i("div",{staticClass:"chart-title"},[s._v(s._s(s.$t("dashboard.indicator.backtest.tradeHistory")))]),i("a-table",{attrs:{columns:s.tradeColumns,"data-source":s.normalizedTrades,pagination:{pageSize:10,size:"small"},size:"small",scroll:{x:800},rowKey:s.rowKey},scopedSlots:s._u([{key:"type",fn:function(t){return[i("a-tag",{attrs:{color:s.getTradeTypeColor(t)}},[s._v(" "+s._s(s.getTradeTypeText(t))+" ")])]}},{key:"balance",fn:function(t){return[i("span",{staticStyle:{color:"#1890ff","font-weight":"500"}},[s._v(" $"+s._s(t?t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"--")+" ")])]}},{key:"profit",fn:function(t){return[i("span",{style:{color:t>0?"#52c41a":t<0?"#f5222d":s.isDark?"rgba(255,255,255,0.65)":"#666"}},[s._v(" "+s._s(s.formatMoney(t))+" ")])]}},{key:"time",fn:function(t){return[i("span",{staticClass:"trade-time-text"},[s._v(s._s(s.formatLocalDateTime(t)))])]}},{key:"detail",fn:function(t,e){return[i("span",{staticClass:"trade-detail-text"},[s._v(s._s(s.getTradeDetailText(e.type)))])]}}])})],1)],1):i("div",{staticStyle:{padding:"12px 0"}},[i("a-empty",{attrs:{description:s.$t("dashboard.indicator.backtest.historyNoData")}})],1),i("template",{slot:"footer"},[i("a-button",{on:{click:function(t){return s.$emit("cancel")}}},[s._v(s._s(s.$t("dashboard.indicator.backtest.close")))])],1)],2)},x=[],R=function(){var t=this,e=t._self._c;return t.lines.length||t.showLegacy?e("a-alert",{staticStyle:{"margin-bottom":"12px"},attrs:{type:t.showLegacy?"warning":"info","show-icon":""}},[e("template",{slot:"message"},[t._v(" "+t._s(t.showLegacy?t.$t("dashboard.indicator.backtest.executionAssumptions.legacyTitle"):t.$t("dashboard.indicator.backtest.executionAssumptions.title"))+" ")]),e("template",{slot:"description"},[t.showLegacy?e("div",{staticStyle:{"font-size":"12px","line-height":"1.5"}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.executionAssumptions.legacyBody"))+" ")]):e("div",t._l(t.lines,function(a,s){return e("div",{key:s,staticStyle:{"font-size":"12px","line-height":"1.5"}},[t._v(" "+t._s(a)+" ")])}),0)])],2):t._e()},T=[],A=a(44735),D=(a(79432),{name:"BacktestExecutionAssumptionsAlert",props:{assumptions:{type:Object,default:null},strategyConfig:{type:Object,default:null},timeframe:{type:String,default:""}},computed:{resolved:function(){var t=this.assumptions;if(t&&"object"===(0,A.A)(t)&&Object.keys(t).length&&(null!=t.signalTiming||null!=t.defaultFillPrice||null!=t.simulationMode))return t;var e=this.strategyConfig||{},a=(e.execution||{}).signalTiming;if(null!=a&&""!==String(a).trim()){var s=String(a).toLowerCase(),i=["next_bar_open","next_open","nextopen","next"].includes(s);return{signalTiming:i?"next_bar_open":"same_bar_close",defaultFillPrice:i?"open":"close",simulationMode:"standard",mtfRequested:!1,mtfActive:!1}}return null},showLegacy:function(){return!this.resolved},lines:function(){var t=this.resolved;if(!t)return[];var e=[];if("same_bar_close"===t.signalTiming?e.push(this.$t("dashboard.indicator.backtest.executionAssumptions.bodySameBar")):e.push(this.$t("dashboard.indicator.backtest.executionAssumptions.bodyNextBar")),"open"===t.defaultFillPrice?e.push(this.$t("dashboard.indicator.backtest.executionAssumptions.fillOpen")):e.push(this.$t("dashboard.indicator.backtest.executionAssumptions.fillClose")),"mtf"===t.simulationMode&&t.executionTimeframe){var a=t.strategyTimeframe||this.timeframe||"";e.push(this.$t("dashboard.indicator.backtest.executionAssumptions.bodyMtf",{sig:a,exec:t.executionTimeframe}))}return t.mtfRequested&&!t.mtfActive&&e.push(this.$t("dashboard.indicator.backtest.executionAssumptions.mtfFallback")),e}}}),M=D,z=(0,w.A)(M,R,T,!1,null,null,null),L=z.exports,P={name:"BacktestRunViewer",components:{BacktestExecutionAssumptionsAlert:L},props:{visible:{type:Boolean,default:!1},run:{type:Object,default:null},isDark:{type:Boolean,default:!1}},data:function(){return{equityChart:null,tradeColumns:[]}},computed:{result:function(){return this.run&&this.run.result?this.run.result:{}},modalTitle:function(){var t=this.run&&this.run.id?"#".concat(this.run.id):"";return"".concat(this.$t("dashboard.indicator.backtest.historyTitle")," ").concat(t).trim()},modalWrapClass:function(){return this.isDark?"backtest-run-viewer-wrap backtest-run-viewer-wrap--dark":"backtest-run-viewer-wrap"},normalizedTrades:function(){return(this.result.trades||[]).map(function(t,e){return(0,n.A)((0,n.A)({},t),{},{_rowKey:"".concat(e,"-").concat(t.time||"","-").concat(t.type||"")})})}},watch:{visible:function(t){var e=this;t?this.$nextTick(function(){e.initColumns(),e.renderEquityChart()}):this.equityChart&&(this.equityChart.dispose(),this.equityChart=null)},isDark:function(){var t=this;this.visible&&this.$nextTick(function(){return t.renderEquityChart()})}},methods:{rowKey:function(t,e){return t._rowKey||e},initColumns:function(){this.tradeColumns=[{title:this.$t("dashboard.indicator.backtest.tradeTime"),dataIndex:"time",key:"time",width:170,scopedSlots:{customRender:"time"}},{title:this.$t("dashboard.indicator.backtest.tradeType"),dataIndex:"type",key:"type",width:150,scopedSlots:{customRender:"type"}},{title:this.$t("dashboard.indicator.backtest.tradeDetail"),dataIndex:"detail",key:"detail",width:180,scopedSlots:{customRender:"detail"}},{title:this.$t("dashboard.indicator.backtest.price"),dataIndex:"price",key:"price",width:110},{title:this.$t("dashboard.indicator.backtest.amount"),dataIndex:"amount",key:"amount",width:100},{title:this.$t("dashboard.indicator.backtest.profit"),dataIndex:"profit",key:"profit",width:110,scopedSlots:{customRender:"profit"}},{title:this.$t("dashboard.indicator.backtest.balance"),dataIndex:"balance",key:"balance",width:120,scopedSlots:{customRender:"balance"}}]},getTradeTypeColor:function(t){var e={buy:"green",sell:"red",liquidation:"orange",open_long:"green",add_long:"cyan",close_long:"orange",close_long_stop:"red",close_long_profit:"lime",close_long_trailing:"gold",reduce_long:"volcano",open_short:"red",add_short:"magenta",close_short:"blue",close_short_stop:"red",close_short_profit:"cyan",close_short_trailing:"gold",reduce_short:"volcano"};return e[t]||"default"},getTradeTypeText:function(t){var e={open_long:this.$t("dashboard.indicator.backtest.openLong"),add_long:this.$t("dashboard.indicator.backtest.addLong"),close_long:this.$t("dashboard.indicator.backtest.closeLong"),close_long_stop:this.$t("dashboard.indicator.backtest.closeLongStop"),close_long_profit:this.$t("dashboard.indicator.backtest.closeLongProfit"),close_long_trailing:this.$t("dashboard.indicator.backtest.closeLongTrailing"),reduce_long:this.$t("dashboard.indicator.backtest.reduceLong"),open_short:this.$t("dashboard.indicator.backtest.openShort"),add_short:this.$t("dashboard.indicator.backtest.addShort"),close_short:this.$t("dashboard.indicator.backtest.closeShort"),close_short_stop:this.$t("dashboard.indicator.backtest.closeShortStop"),close_short_profit:this.$t("dashboard.indicator.backtest.closeShortProfit"),close_short_trailing:this.$t("dashboard.indicator.backtest.closeShortTrailing"),reduce_short:this.$t("dashboard.indicator.backtest.reduceShort"),liquidation:this.$t("dashboard.indicator.backtest.liquidation")};return e[t]||t},getTradeDetailText:function(t){var e={open_long:this.$t("dashboard.indicator.backtest.tradeDetailOpenLong"),add_long:this.$t("dashboard.indicator.backtest.tradeDetailAddLong"),close_long:this.$t("dashboard.indicator.backtest.tradeDetailCloseLong"),close_long_stop:this.$t("dashboard.indicator.backtest.tradeDetailCloseLongStop"),close_long_profit:this.$t("dashboard.indicator.backtest.tradeDetailCloseLongProfit"),close_long_trailing:this.$t("dashboard.indicator.backtest.tradeDetailCloseLongTrailing"),reduce_long:this.$t("dashboard.indicator.backtest.tradeDetailReduceLong"),open_short:this.$t("dashboard.indicator.backtest.tradeDetailOpenShort"),add_short:this.$t("dashboard.indicator.backtest.tradeDetailAddShort"),close_short:this.$t("dashboard.indicator.backtest.tradeDetailCloseShort"),close_short_stop:this.$t("dashboard.indicator.backtest.tradeDetailCloseShortStop"),close_short_profit:this.$t("dashboard.indicator.backtest.tradeDetailCloseShortProfit"),close_short_trailing:this.$t("dashboard.indicator.backtest.tradeDetailCloseShortTrailing"),reduce_short:this.$t("dashboard.indicator.backtest.tradeDetailReduceShort"),liquidation:this.$t("dashboard.indicator.backtest.tradeDetailLiquidation"),buy:this.$t("dashboard.indicator.backtest.tradeDetailBuy"),sell:this.$t("dashboard.indicator.backtest.tradeDetailSell")};return e[t]||t},formatPercent:function(t){if(null===t||void 0===t)return"--";var e=t>=0?"+":"";return"".concat(e).concat(Number(t).toFixed(2),"%")},formatMoney:function(t){if(null===t||void 0===t)return"--";var e=t>=0?"+":"-";return"".concat(e,"$").concat(Math.abs(t).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}))},parseDateTimeToLocal:function(t){if(!t&&0!==t)return null;if(u().isMoment(t))return t.clone();if("number"===typeof t)return String(t).length<=10?u().unix(t):u()(t);var e=String(t).trim();if(!e)return null;if(/^\d+$/.test(e)){var a=Number(e);return e.length<=10?u().unix(a):u()(a)}if(/[zZ]|[-+]\d{2}:\d{2}$/.test(e)){var s=u()(e);return s.isValid()?s.local():null}if(/^\d{4}-\d{2}-\d{2}[ T]\d{2}:\d{2}(:\d{2})?$/.test(e)){var i=u().utc(e,["YYYY-MM-DD HH:mm:ss","YYYY-MM-DD HH:mm","YYYY-MM-DDTHH:mm:ss",u().ISO_8601],!0);return i.isValid()?i.local():null}var r=u()(e);return r.isValid()?r:null},formatLocalDateTime:function(t){var e=this.parseDateTimeToLocal(t);return e?e.format("YYYY-MM-DD HH:mm:ss"):"--"},formatAxisDateTime:function(t){var e=this.parseDateTimeToLocal(t);return e?e.format("MM-DD HH:mm"):String(t||"")},renderEquityChart:function(){var t=this;if(this.$refs.equityChartRef){this.equityChart&&this.equityChart.dispose(),this.equityChart=h.init(this.$refs.equityChartRef);var e=this.result.equityCurve||[],a=e.map(function(e){return t.formatAxisDateTime(e.time||e.date)}),s=e.map(function(t){return void 0!==t.value?t.value:t.equity}),i=s[0]||1e5,r=s[s.length-1]||i,n=r>=i,o=n?"#52c41a":"#f5222d",c=n?[{offset:0,color:"rgba(82, 196, 26, 0.35)"},{offset:1,color:"rgba(82, 196, 26, 0.02)"}]:[{offset:0,color:"rgba(245, 34, 45, 0.35)"},{offset:1,color:"rgba(245, 34, 45, 0.02)"}],l={backgroundColor:"transparent",tooltip:{trigger:"axis",backgroundColor:this.isDark?"#1f1f1f":"#fff",borderColor:this.isDark?"#434343":"#ddd",textStyle:{color:this.isDark?"rgba(255,255,255,0.88)":"#333"}},grid:{left:"3%",right:"4%",bottom:"12%",top:"8%",containLabel:!0},xAxis:{type:"category",data:a,boundaryGap:!1,axisLabel:{color:this.isDark?"rgba(255,255,255,0.45)":"#8c8c8c"},axisLine:{lineStyle:{color:this.isDark?"#303030":"#d9d9d9"}}},yAxis:{type:"value",axisLabel:{color:this.isDark?"rgba(255,255,255,0.45)":"#8c8c8c"},splitLine:{lineStyle:{color:this.isDark?"rgba(255,255,255,0.08)":"#f0f0f0"}}},series:[{name:this.$t("dashboard.indicator.backtest.strategy"),type:"line",data:s,smooth:.4,symbol:"none",sampling:"lttb",lineStyle:{width:2.5,color:o},areaStyle:{color:new h.graphic.LinearGradient(0,0,0,1,c)}}]};this.equityChart.setOption(l),window.addEventListener("resize",function(){return t.equityChart&&t.equityChart.resize()})}}}},H=P,Y=(0,w.A)(H,C,x,!1,null,"1082877a",null),F=Y.exports,q={"1m":30,"5m":180,"15m":365,"30m":365,"1H":730,"4H":1460,"1D":3650,"1W":7300},K=[{key:"1m",label:"1M",days:30},{key:"3m",label:"3M",days:90},{key:"6m",label:"6M",days:180},{key:"1y",label:"1Y",days:365},{key:"2y",label:"2Y",days:730},{key:"5y",label:"5Y",days:1825}],W={name:"ResultView",components:{BacktestExecutionAssumptionsAlert:L},props:{running:Boolean,runTip:String,hasResult:Boolean,result:Object,userId:[Number,String],backtestRunId:[Number,String],symbol:String,market:String,timeframe:String,isDark:Boolean},data:function(){return{chartInstance:null,elapsedSec:0,elapsedTimer:null,aiAnalyzing:!1,showAIResult:!1,aiResult:"",aiMode:""}},mounted:function(){this.running&&this._startElapsed()},computed:{aiModeLabel:function(){return"llm"===this.aiMode?this.$t("dashboard.indicator.backtest.historyAIModeLLM"):"heuristic"===this.aiMode||"heuristic_fallback"===this.aiMode?this.$t("dashboard.indicator.backtest.historyAIModeRule"):this.$t("dashboard.indicator.backtest.historyAIModeUnknown")},renderedAIHtml:function(){return this.markdownToHtml(this.aiResult||"")},pairedTrades:function(){for(var t=this.result&&this.result.trades||[],e=[],a=null,s=1,i=0;i=0?"+":"";return e+Number(t).toFixed(2)+"%"},fmtMoney:function(t){if(null==t||isNaN(t))return"$0.00";var e=Math.abs(t).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2});return(t>=0?"":"-")+"$"+e},fmtPrice:function(t){return null==t||isNaN(t)?"--":Number(t).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:4})},escapeHtml:function(t){return String(t||"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},formatInlineMarkdown:function(t){var e=this.escapeHtml(t);return e=e.replace(/`([^`]+)`/g,"$1"),e=e.replace(/\*\*([^*]+)\*\*/g,"$1"),e=e.replace(/__([^_]+)__/g,"$1"),e=e.replace(/\*([^*]+)\*/g,"$1"),e=e.replace(/_([^_]+)_/g,"$1"),e},markdownToHtml:function(t){var e=String(t||"").replace(/\r\n/g,"\n").trim();if(!e)return"";var a,s=e.split("\n"),i=[],r=!1,n=!1,o=!1,c=[],d=function(){r&&(i.push(""),r=!1),n&&(i.push("
"),n=!1)},u=(0,l.A)(s);try{for(u.s();!(a=u.n()).done;){var h=a.value,m=h.trimRight(),p=m.trim();p.startsWith("```")?(d(),o?(i.push("
".concat(this.escapeHtml(c.join("\n")),"
")),o=!1,c=[]):(o=!0,c=[])):o?c.push(h):p?/^###\s+/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^###\s+/,"")),"

"))):/^##\s+/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^##\s+/,"")),"

"))):/^#\s+/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^#\s+/,"")),"

"))):/^【.+】$/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^【|】$/g,"")),"

"))):/^>\s+/.test(p)?(d(),i.push("
".concat(this.formatInlineMarkdown(p.replace(/^>\s+/,"")),"
"))):/^[-*]\s+/.test(p)?(n&&(i.push(""),n=!1),r||(i.push(""),r=!1),n||(i.push("
    "),n=!0),i.push("
  1. ".concat(this.formatInlineMarkdown(p.replace(/^\d+\.\s+/,"")),"
  2. "))):(d(),i.push("

    ".concat(this.formatInlineMarkdown(p),"

    "))):d()}}catch(g){u.e(g)}finally{u.f()}return d(),o&&i.push("
    ".concat(this.escapeHtml(c.join("\n")),"
    ")),i.join("")},copyAIResult:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.aiResult){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,navigator.clipboard.writeText(t.aiResult);case 2:t.$message.success(t.$t("dashboard.indicator.backtest.historyAICopySuccess")),e.n=4;break;case 3:e.p=3,e.v,t.$message.warning(t.$t("dashboard.indicator.backtest.historyAICopyFailed"));case 4:return e.a(2)}},e,null,[[1,3]])}))()},handleAIAnalyze:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a,s,i,r;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(a=t.backtestRunId,t.userId&&a){e.n=1;break}return t.$message.warning(t.$t("dashboard.indicator.backtest.historyAISelectPrompt")),e.a(2);case 1:return t.aiAnalyzing=!0,t.showAIResult=!0,t.aiResult="",t.aiMode="",e.p=2,s=t.$i18n&&t.$i18n.locale?t.$i18n.locale:"zh-CN",e.n=3,(0,p.Ay)({url:"/api/indicator/backtest/aiAnalyze",method:"post",timeout:p.v0,data:{userid:t.userId,runIds:[a],lang:s}});case 3:i=e.v,i&&1===i.code&&i.data&&i.data.analysis?(t.aiResult=i.data.analysis,t.aiMode=i.data.mode||""):t.aiResult=i&&i.msg||t.$t("dashboard.indicator.backtest.historyNoAIResult"),e.n=5;break;case 4:e.p=4,r=e.v,t.aiResult=r&&r.message||t.$t("dashboard.indicator.backtest.historyAIFailed");case 5:return e.p=5,t.aiAnalyzing=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},getCloseReason:function(t,e,a){if(t.includes("_stop"))return"stopLoss";if(t.includes("_profit"))return"takeProfit";if(t.includes("_trailing"))return"trailingStop";if("liquidation"===t)return"liquidation";if(("close_long"===t||"close_short"===t)&&a){var s=String(a.type||"").toLowerCase(),i=String(a.time||"")===String(e.time||"");if(i&&("open_long"===s||"open_short"===s))return"reverse"}return"signal"},reasonColor:function(t){return{stopLoss:"red",takeProfit:"green",trailingStop:"cyan",reverse:"orange",liquidation:"volcano",signal:"blue"}[t]||"default"},renderChart:function(){var t=this,e=this.result;if(e&&e.equityCurve&&e.equityCurve.length){var a=this.$refs.eqChart;if(a){this.chartInstance&&this.chartInstance.dispose(),this.chartInstance=h.init(a);var s=this.isDark,i=e.equityCurve,r=i.length>1&&(i[i.length-1].value||0)>=(i[0].value||0),n=r?"#52c41a":"#f5222d";this.chartInstance.setOption({backgroundColor:"transparent",tooltip:{trigger:"axis",backgroundColor:s?"#1f1f1f":"#fff",borderColor:s?"#434343":"#ddd",textStyle:{color:s?"rgba(255,255,255,0.85)":"#333",fontSize:12},formatter:function(t){var e=t[0];return'
    ').concat(e.name,'
    $').concat(Number(e.value).toLocaleString("en-US",{minimumFractionDigits:2}),"
    ")}},grid:{left:65,right:20,top:20,bottom:30},xAxis:{type:"category",data:i.map(function(t){return t.time||""}),axisLabel:{color:s?"rgba(255,255,255,0.35)":"#999",fontSize:10,rotate:0,interval:Math.floor(i.length/6)},axisLine:{lineStyle:{color:s?"#303030":"#e0e0e0"}},axisTick:{show:!1}},yAxis:{type:"value",axisLabel:{color:s?"rgba(255,255,255,0.35)":"#999",fontSize:11,formatter:function(t){return"$"+(t/1e3).toFixed(1)+"k"}},splitLine:{lineStyle:{color:s?"rgba(255,255,255,0.06)":"#f0f0f0",type:"dashed"}}},series:[{type:"line",data:i.map(function(t){return t.value||0}),smooth:.3,showSymbol:!1,lineStyle:{width:2,color:n},areaStyle:{color:new h.graphic.LinearGradient(0,0,0,1,[{offset:0,color:r?"rgba(82,196,26,0.2)":"rgba(245,34,45,0.2)"},{offset:1,color:"rgba(0,0,0,0)"}])}}]}),window.addEventListener("resize",function(){t.chartInstance&&t.chartInstance.resize()})}}}},render:function(t){var e=this,a=this.isDark;if(this.running){var s=[{key:"fetch",label:this.$t("backtest-center.tip.fetching"),icon:"cloud-download"},{key:"compute",label:this.$t("backtest-center.tip.computing"),icon:"calculator"},{key:"analyze",label:this.$t("backtest-center.tip.analyzing"),icon:"bar-chart"}],i=this.elapsedSec,r=i<4?0:i<10?1:2;return t("div",{class:"running-overlay"},[t("div",{class:"running-content"},[t("div",{class:"running-spinner"},[t("div",{class:"spinner-track"}),t("div",{class:"spinner-fill"})]),t("div",{class:"running-title"},this.$t("backtest-center.running")),t("div",{class:"running-elapsed"},this.fmtElapsed(i)),t("div",{class:"running-steps"},s.map(function(e,a){return t("div",{class:["step-item",a=0?"positive":"negative",sub:this.fmtMoney(n.totalProfit)},{label:"annualReturn",value:this.fmtPct(n.annualReturn),cls:(n.annualReturn||0)>=0?"positive":"negative"},{label:"maxDrawdown",value:this.fmtPct(n.maxDrawdown),cls:"negative"},{label:"sharpe",value:(n.sharpeRatio||0).toFixed(2),cls:(n.sharpeRatio||0)>=1?"positive":(n.sharpeRatio||0)<0?"negative":""},{label:"winRate",value:this.fmtPct(n.winRate),cls:(n.winRate||0)>=50?"positive":""},{label:"profitFactor",value:(n.profitFactor||0).toFixed(2),cls:(n.profitFactor||0)>=1.5?"positive":(n.profitFactor||0)<1?"negative":""},{label:"trades",value:String(n.totalTrades||0),cls:""},{label:"commission",value:this.fmtMoney(-(n.totalCommission||0)),cls:""}],c=t(L,{props:{assumptions:n.executionAssumptions||null,strategyConfig:null,timeframe:this.timeframe||""}});return t("div",{class:"result-content"},[t("div",{class:"result-header"},[t("div",{class:"result-header-left"},[t("span",{class:"result-tag"},[t("a-tag",{props:{color:"blue"}},this.symbol),t("a-tag",{},this.market),t("a-tag",{},this.timeframe)]),this.backtestRunId?t("span",{class:"run-id"},"Run #"+this.backtestRunId):null]),t("div",{class:"result-header-actions"},[t("a-button",{props:{type:"primary",ghost:!0,size:"small",loading:this.aiAnalyzing,disabled:!this.backtestRunId},on:{click:this.handleAIAnalyze}},[t("a-icon",{props:{type:"bulb"},style:{color:a?"#177ddc":void 0}}),this.$t("dashboard.indicator.backtest.historyAISuggest")])])]),c,t("div",{class:"metrics-cards"},o.map(function(a){return t("div",{class:["metric-card",a.cls]},[t("div",{class:"metric-label"},e.$t("backtest-center.result."+a.label)),t("div",{class:"metric-value"},a.value),a.sub?t("div",{class:"metric-sub"},a.sub):null])})),t("div",{class:"chart-section"},[t("div",{class:"chart-title"},[t("a-icon",{props:{type:"area-chart"},style:{marginRight:"6px",color:a?"rgba(255,255,255,0.72)":"rgba(0,0,0,0.45)"}}),this.$t("backtest-center.result.equityCurve")]),t("div",{ref:"eqChart",class:"equity-chart"})]),t("div",{class:"trades-section"},[t("div",{class:"chart-title"},[t("a-icon",{props:{type:"swap"},style:{marginRight:"6px",color:a?"rgba(255,255,255,0.72)":"rgba(0,0,0,0.45)"}}),this.$t("backtest-center.result.tradeHistory"),t("span",{style:{fontWeight:400,fontSize:"12px",marginLeft:"8px",color:a?"rgba(255,255,255,0.45)":"#999"}},"(".concat(this.pairedTrades.length,")"))]),t("a-table",{props:{columns:this.tradeColumns,dataSource:this.pairedTrades,pagination:{pageSize:10,size:"small",showTotal:function(t){return"".concat(t," trades")}},size:"small",scroll:{x:980},rowKey:"id"},scopedSlots:{type:function(e){return t("a-tag",{props:{color:"long"===e?"green":"red"},style:"margin:0"},"long"===e?"LONG":"SHORT")},openAction:function(a){return t("a-tag",{props:{color:"openLong"===a?"green":"red"},style:"margin:0"},e.$t("backtest-center.result."+a))},closeReason:function(a){return t("a-tag",{props:{color:e.reasonColor(a)},style:"margin:0"},e.$t("backtest-center.result."+a))},price:function(a){return t("span",{style:"font-variant-numeric: tabular-nums"},e.fmtPrice(a))},profit:function(s){return t("span",{style:{color:s>0?"#52c41a":s<0?"#f5222d":a?"rgba(255,255,255,0.65)":"#666",fontWeight:"600",fontVariantNumeric:"tabular-nums"}},e.fmtMoney(s))},money:function(s){return t("span",{style:{color:a?"rgba(255,255,255,0.88)":"#262626",fontWeight:"600",fontVariantNumeric:"tabular-nums"}},e.fmtMoney(s))}}})]),t("a-modal",{props:{title:this.$t("dashboard.indicator.backtest.historyAISuggestTitle"),visible:this.showAIResult,footer:null,width:900,wrapClassName:this.isDark?"bc-modal-wrap bc-modal-wrap--dark":"bc-modal-wrap"},on:{cancel:function(){e.showAIResult=!1}}},[this.aiAnalyzing?t("div",{class:"result-ai-loading"},[t("a-spin",{props:{size:"large"}}),t("div",{class:"result-ai-loading-text"},this.$t("dashboard.indicator.backtest.historyAISuggestLoading"))]):t("div",{class:"result-ai-content"},[t("div",{class:"result-ai-meta-card"},[t("div",{class:"result-ai-meta-top"},[t("div",{class:"result-ai-meta-left"},[t("a-tag",{props:{color:"blue"}},this.$t("dashboard.indicator.backtest.historyAISuggest")),t("a-tag",{},this.aiModeLabel),this.backtestRunId?t("a-tag",{props:{color:"purple"}},"#".concat(this.backtestRunId)):null]),t("div",{class:"result-ai-meta-actions"},[t("a-button",{props:{size:"small"},on:{click:this.copyAIResult}},[t("a-icon",{props:{type:"copy"}}),this.$t("dashboard.indicator.backtest.historyAICopy")]),t("a-button",{props:{size:"small",type:"primary",ghost:!0,disabled:!this.backtestRunId},on:{click:this.handleAIAnalyze}},[t("a-icon",{props:{type:"redo"}}),this.$t("dashboard.indicator.backtest.historyAIRetry")])])]),t("a-alert",{style:{marginTop:"12px"},props:{type:"info",showIcon:!0,message:this.$t("dashboard.indicator.backtest.historyAIHint")}})]),this.aiResult?t("div",{class:"result-ai-markdown-card"},[t("div",{class:"result-ai-markdown-content",domProps:{innerHTML:this.renderedAIHtml}})]):t("div",{class:"result-ai-empty"},this.$t("dashboard.indicator.backtest.historyNoAIResult"))])])])}},N={name:"BacktestCenter",mixins:[m.t],components:{BacktestHistoryDrawer:I,BacktestRunViewer:F,ResultView:W},data:function(){return{activeTab:"indicator",userId:null,watchlist:[],loadingWatchlist:!1,showAddModal:!1,addingStock:!1,addMarketTab:"Crypto",addSearchKeyword:"",addSearchResults:[],addSearching:!1,addSelectedItem:null,addSearched:!1,addSearchTimer:null,addTriggerSource:"",indicators:[],loadingIndicators:!1,selectedIndicatorId:void 0,selectedWatchlistKey:void 0,market:"Crypto",symbol:"",timeframe:"1D",startDate:u()().subtract(6,"months"),endDate:u()(),datePreset:"6m",initialCapital:1e4,leverage:1,commission:.02,slippage:.02,signalTiming:"next_bar_open",tradeDirection:"long",stopLossPct:0,takeProfitPct:0,entryPct:100,trailingEnabled:!1,trailingStopPct:0,trailingActivationPct:0,running:!1,runTip:"",runTimer:null,hasResult:!1,backtestRunId:null,result:{},strategies:[],loadingStrategies:!1,selectedStrategyId:void 0,stSelectedWatchlistKey:void 0,stMarket:"Crypto",stSymbol:"",stTimeframe:"1D",stStartDate:u()().subtract(6,"months"),stEndDate:u()(),stDatePreset:"6m",stInitialCapital:1e4,stLeverage:1,stCommission:.02,stSlippage:0,stRunning:!1,stRunTip:"",stRunTimer:null,stHasResult:!1,stBacktestRunId:null,stResult:{},showHistoryDrawer:!1,historyIndicatorId:null,historyStrategyId:null,historyRunType:"",showRunViewer:!1,selectedRun:null}},computed:{isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},selectedIndicatorObj:function(){var t=this;return this.selectedIndicatorId?this.indicators.find(function(e){return e.id===t.selectedIndicatorId}):null},selectedStrategyObj:function(){var t=this;return this.selectedStrategyId?this.strategies.find(function(e){return e.id===t.selectedStrategyId}):null},canRunIndicator:function(){return this.selectedIndicatorId&&this.symbol&&this.startDate&&this.endDate},canRunStrategy:function(){return this.selectedStrategyId&&this.stSymbol&&this.stStartDate&&this.stEndDate},tfMaxDays:function(){return q[this.timeframe]||3650},stTfMaxDays:function(){return q[this.stTimeframe]||3650},tfLimitHint:function(){var t=this.tfMaxDays;return t<=30?"(≤ 1".concat(this.$t("backtest-center.config.monthUnit"),")"):t<=180?"(≤ 6".concat(this.$t("backtest-center.config.monthUnit"),")"):t<=365?"(≤ 1".concat(this.$t("backtest-center.config.yearUnit"),")"):t<=730?"(≤ 2".concat(this.$t("backtest-center.config.yearUnit"),")"):"(≤ ".concat(Math.round(t/365)).concat(this.$t("backtest-center.config.yearUnit"),")")},stTfLimitHint:function(){var t=this.stTfMaxDays;return t<=30?"(≤ 1".concat(this.$t("backtest-center.config.monthUnit"),")"):t<=180?"(≤ 6".concat(this.$t("backtest-center.config.monthUnit"),")"):t<=365?"(≤ 1".concat(this.$t("backtest-center.config.yearUnit"),")"):t<=730?"(≤ 2".concat(this.$t("backtest-center.config.yearUnit"),")"):"(≤ ".concat(Math.round(t/365)).concat(this.$t("backtest-center.config.yearUnit"),")")},filteredDatePresets:function(){var t=this;return K.filter(function(e){return e.days<=t.tfMaxDays})},stFilteredDatePresets:function(){var t=this;return K.filter(function(e){return e.days<=t.stTfMaxDays})}},created:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){return(0,o.A)().w(function(e){while(1)switch(e.n){case 0:return e.n=1,t.loadUserId();case 1:t.loadIndicators(),t.loadStrategies(),t.loadWatchlistData(),t.parseQuery();case 2:return e.a(2)}},e)}))()},beforeDestroy:function(){clearInterval(this.runTimer),clearInterval(this.stRunTimer),clearTimeout(this.addSearchTimer)},methods:{loadUserId:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,g.ug)();case 1:a=e.v,a&&a.data&&(t.userId=a.data.id||a.data.user_id||1),e.n=3;break;case 2:e.p=2,e.v,t.userId=1;case 3:return e.a(2)}},e,null,[[0,2]])}))()},loadIndicators:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.userId){e.n=1;break}return e.a(2);case 1:return t.loadingIndicators=!0,e.p=2,e.n=3,(0,p.Ay)({url:"/api/indicator/getIndicators",method:"get",params:{userid:t.userId}});case 3:a=e.v,a&&a.data&&Array.isArray(a.data)&&(t.indicators=a.data.map(function(t){return(0,n.A)((0,n.A)({},t),{},{type:"python"})})),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.p=5,t.loadingIndicators=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},loadStrategies:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a,s,i;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.loadingStrategies=!0,e.p=1,e.n=2,(0,f.EM)();case 2:s=e.v,i=Array.isArray(null===s||void 0===s||null===(a=s.data)||void 0===a?void 0:a.strategies)?s.data.strategies:[],t.strategies=i,t.selectedStrategyId&&t.$nextTick(function(){return t.onStrategyChange()}),e.n=4;break;case 3:e.p=3,e.v,t.strategies=[];case 4:return e.p=4,t.loadingStrategies=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},loadWatchlistData:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.userId){e.n=1;break}return e.a(2);case 1:return t.loadingWatchlist=!0,e.p=2,e.n=3,(0,b.Qo)({userid:t.userId});case 3:a=e.v,a&&1===a.code&&a.data&&(t.watchlist=a.data),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.p=5,t.loadingWatchlist=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},parseQuery:function(){var t=this,e=this.$route.query;"strategy"===e.tab&&(this.activeTab="strategy"),e.indicator_id&&(this.selectedIndicatorId=Number(e.indicator_id)||void 0),e.strategy_id&&(this.selectedStrategyId=Number(e.strategy_id)||void 0),"history"===e.view&&this.$nextTick(function(){return t.openHistory(t.activeTab)})},filterWatchlistOption:function(t,e){var a=(e.componentOptions.propsData.value||"").toLowerCase();return"__add__"===a||a.includes(t.toLowerCase())},handleWatchlistChange:function(t){var e=this;if("__add__"===t)return this.addTriggerSource="indicator",this.showAddModal=!0,void this.$nextTick(function(){e.selectedWatchlistKey=void 0});if(t){var a=t.split(":"),s=(0,r.A)(a,2),i=s[0],n=s[1];this.market=i,this.symbol=n}else this.market="",this.symbol=""},handleStWatchlistChange:function(t){var e=this;if("__add__"===t)return this.addTriggerSource="strategy",this.showAddModal=!0,void this.$nextTick(function(){e.stSelectedWatchlistKey=void 0});if(t){var a=t.split(":"),s=(0,r.A)(a,2),i=s[0],n=s[1];this.stMarket=i,this.stSymbol=n}else this.stMarket="",this.stSymbol=""},getMarketColor:function(t){var e={Crypto:"orange",USStock:"blue",HKStock:"red",Forex:"green",Futures:"purple",PredictionMarket:"cyan"};return e[t]||"default"},onAddMarketTabChange:function(){this.addSearchKeyword="",this.addSearchResults=[],this.addSelectedItem=null,this.addSearched=!1},onAddSearchInput:function(){var t=this;clearTimeout(this.addSearchTimer),this.addSearchKeyword?this.addSearchTimer=setTimeout(function(){return t.doAddSearch()},400):this.addSearchResults=[]},doAddSearch:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.addSearchKeyword){e.n=1;break}return e.a(2);case 1:return t.addSearching=!0,e.p=2,e.n=3,(0,b._3)({market:t.addMarketTab,keyword:t.addSearchKeyword,limit:20});case 3:a=e.v,a&&a.data&&Array.isArray(a.data)?t.addSearchResults=a.data:t.addSearchResults=[],t.addSearched=!0,0===t.addSearchResults.length&&(t.addSelectedItem={market:t.addMarketTab,symbol:t.addSearchKeyword.trim().toUpperCase(),name:""}),e.n=5;break;case 4:e.p=4,e.v,t.addSelectedItem={market:t.addMarketTab,symbol:t.addSearchKeyword.trim().toUpperCase(),name:""};case 5:return e.p=5,t.addSearching=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},handleAddStock:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a,s,i,r;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(a=t.addSelectedItem,a&&a.symbol){e.n=1;break}return t.$message.warning(t.$t("backtest-center.config.symbolRequired")),e.a(2);case 1:return t.addingStock=!0,e.p=2,s=a.market||t.addMarketTab,e.n=3,(0,b.dp)({userid:t.userId,market:s,symbol:a.symbol,name:a.name||""});case 3:return t.$message.success(t.$t("backtest-center.config.addSuccess")),e.n=4,t.loadWatchlistData();case 4:i="".concat(s,":").concat(a.symbol),"strategy"===t.addTriggerSource?(t.stSelectedWatchlistKey=i,t.stMarket=s,t.stSymbol=a.symbol):(t.selectedWatchlistKey=i,t.market=s,t.symbol=a.symbol),t.showAddModal=!1,e.n=6;break;case 5:e.p=5,r=e.v,t.$message.error(r.message||"Failed");case 6:return e.p=6,t.addingStock=!1,e.f(6);case 7:return e.a(2)}},e,null,[[2,5,6,7]])}))()},onTimeframeChange:function(){this.clampDateRange("indicator"),this.datePreset=this.matchPreset(this.startDate,this.endDate)},onStTimeframeChange:function(){this.clampDateRange("strategy"),this.stDatePreset=this.matchPreset(this.stStartDate,this.stEndDate)},clampDateRange:function(t){var e="strategy"===t?this.stTfMaxDays:this.tfMaxDays,a="strategy"===t?this.stStartDate:this.startDate,s="strategy"===t?this.stEndDate:this.endDate;if(a&&s){var i=s.diff(a,"days");if(i>e){var r=u()(s).subtract(e,"days");"strategy"===t?this.stStartDate=r:this.startDate=r}}},matchPreset:function(t,e){if(!t||!e)return"";for(var a=e.diff(t,"days"),s=0,i=K;s0?e("div",{staticClass:"qt-balance"},[e("span",{staticClass:"qt-balance-label"},[t._v(t._s(t.$t("quickTrade.available"))+":")]),e("span",{staticClass:"qt-balance-value"},[t._v("$"+t._s(t.formatPrice(t.balance.available)))])]):t._e()],1),e("div",{staticClass:"qt-section"},[e("div",{staticClass:"qt-direction-toggle"},[e("div",{staticClass:"qt-dir-btn qt-dir-long",class:{active:"buy"===t.side},on:{click:function(e){t.side="buy"}}},[e("a-icon",{attrs:{type:"arrow-up"}}),t._v(" "+t._s(t.$t("quickTrade.long"))+" ")],1),e("div",{staticClass:"qt-dir-btn qt-dir-short",class:{active:"sell"===t.side},on:{click:function(e){t.side="sell"}}},[e("a-icon",{attrs:{type:"arrow-down"}}),t._v(" "+t._s(t.$t("quickTrade.short"))+" ")],1)])]),e("div",{staticClass:"qt-section"},[e("a-radio-group",{staticStyle:{width:"100%"},attrs:{"button-style":"solid",size:"small"},model:{value:t.orderType,callback:function(e){t.orderType=e},expression:"orderType"}},[e("a-radio-button",{staticStyle:{width:"50%","text-align":"center"},attrs:{value:"market"}},[t._v(" "+t._s(t.$t("quickTrade.market"))+" ")]),e("a-radio-button",{staticStyle:{width:"50%","text-align":"center"},attrs:{value:"limit"}},[t._v(" "+t._s(t.$t("quickTrade.limit"))+" ")])],1)],1),"limit"===t.orderType?e("div",{staticClass:"qt-section"},[e("div",{staticClass:"qt-label"},[t._v(t._s(t.$t("quickTrade.limitPrice")))]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,step:t.priceStep,precision:t.pricePrecision,placeholder:t.$t("quickTrade.enterPrice")},model:{value:t.limitPrice,callback:function(e){t.limitPrice=e},expression:"limitPrice"}})],1):t._e(),e("div",{staticClass:"qt-section"},[e("div",{staticClass:"qt-label"},[t._v(t._s(t.$t("quickTrade.amount"))+" (USDT)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:1,step:10,precision:2,placeholder:t.$t("quickTrade.enterAmount")},model:{value:t.amount,callback:function(e){t.amount=e},expression:"amount"}}),e("div",{staticClass:"qt-quick-amounts"},t._l(t.quickAmountPcts,function(a){return e("a-button",{key:a,attrs:{size:"small",disabled:t.balance.available<=0},on:{click:function(e){return t.setAmountByPercent(a)}}},[t._v(" "+t._s(a)+"% ")])}),1)],1),"spot"!==t.marketType?e("div",{staticClass:"qt-section"},[e("div",{staticClass:"qt-label"},[t._v(t._s(t.$t("quickTrade.leverage")))]),e("div",{staticClass:"qt-leverage-row"},[e("a-slider",{staticStyle:{flex:"1","margin-right":"12px"},attrs:{min:1,max:125,marks:t.leverageMarks,tipFormatter:function(t){return t+"x"}},model:{value:t.leverage,callback:function(e){t.leverage=e},expression:"leverage"}}),e("a-input-number",{staticStyle:{width:"80px"},attrs:{min:1,max:125,formatter:function(t){return"".concat(t,"x")},parser:function(t){return t.replace("x","")}},model:{value:t.leverage,callback:function(e){t.leverage=e},expression:"leverage"}})],1)]):t._e(),e("a-collapse",{staticStyle:{background:"transparent",margin:"0 16px"},attrs:{bordered:!1}},[e("a-collapse-panel",{key:"tpsl",style:t.collapseStyle,attrs:{header:t.$t("quickTrade.tpsl")}},[e("div",{staticClass:"qt-tpsl-row"},[e("div",{staticClass:"qt-tpsl-item"},[e("span",{staticClass:"qt-label",staticStyle:{color:"#52c41a"}},[t._v(t._s(t.$t("quickTrade.tp")))]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,step:t.priceStep,precision:t.pricePrecision,placeholder:t.$t("quickTrade.tpPlaceholder")},model:{value:t.tpPrice,callback:function(e){t.tpPrice=e},expression:"tpPrice"}})],1),e("div",{staticClass:"qt-tpsl-item"},[e("span",{staticClass:"qt-label",staticStyle:{color:"#f5222d"}},[t._v(t._s(t.$t("quickTrade.sl")))]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,step:t.priceStep,precision:t.pricePrecision,placeholder:t.$t("quickTrade.slPlaceholder")},model:{value:t.slPrice,callback:function(e){t.slPrice=e},expression:"slPrice"}})],1)])])],1),e("div",{staticClass:"qt-submit-section"},[e("a-button",{staticClass:"qt-submit-btn",class:["buy"===t.side?"qt-btn-long":"qt-btn-short"],attrs:{type:"buy"===t.side?"primary":"danger",size:"large",block:"",loading:t.submitting,disabled:!t.canSubmit},on:{click:t.handleSubmit}},[e("a-icon",{attrs:{type:"buy"===t.side?"arrow-up":"arrow-down"}}),t._v(" "+t._s("buy"===t.side?t.$t("quickTrade.buyLong"):t.$t("quickTrade.sellShort"))+" "+t._s(t.symbol)+" ")],1)],1),e("div",{staticClass:"qt-position-section"},[e("div",{staticClass:"qt-section-header"},[e("a-icon",{attrs:{type:"wallet"}}),t._v(" "+t._s(t.$t("quickTrade.currentPosition"))+" ")],1),t.currentPosition?e("div",{staticClass:"qt-position-card",class:t.currentPosition.side},[e("div",{staticClass:"qt-pos-row"},[e("span",[t._v(t._s(t.$t("quickTrade.side")))]),e("a-tag",{attrs:{color:"long"===t.currentPosition.side?"#52c41a":"#f5222d",size:"small"}},[t._v(" "+t._s("long"===t.currentPosition.side?t.$t("quickTrade.long"):t.$t("quickTrade.short"))+" ")])],1),e("div",{staticClass:"qt-pos-row"},[e("span",[t._v(t._s(t.$t("quickTrade.posSize")))]),e("span",[t._v(t._s(t.currentPosition.size))])]),e("div",{staticClass:"qt-pos-row"},[e("span",[t._v(t._s(t.$t("quickTrade.entryPrice")))]),e("span",[t._v("$"+t._s(t.formatPrice(t.currentPosition.entry_price)))])]),t.currentPosition.mark_price?e("div",{staticClass:"qt-pos-row"},[e("span",[t._v(t._s(t.$t("quickTrade.markPrice")))]),e("span",[t._v("$"+t._s(t.formatPrice(t.currentPosition.mark_price)))])]):t._e(),t.currentPosition.leverage&&t.currentPosition.leverage>1?e("div",{staticClass:"qt-pos-row"},[e("span",[t._v(t._s(t.$t("quickTrade.leverage")))]),e("span",[t._v(t._s(t.currentPosition.leverage)+"x")])]):t._e(),e("div",{staticClass:"qt-pos-row"},[e("span",[t._v(t._s(t.$t("quickTrade.unrealizedPnl")))]),e("span",{class:t.currentPosition.unrealized_pnl>=0?"qt-green":"qt-red"},[t._v(" $"+t._s(t.formatPrice(t.currentPosition.unrealized_pnl))+" ")])]),e("a-button",{staticStyle:{"margin-top":"8px"},attrs:{type:"danger",size:"small",block:"",ghost:"",loading:t.closingPosition},on:{click:t.handleClosePosition}},[t._v(" "+t._s(t.$t("quickTrade.closePosition"))+" ")])],1):e("div",{staticClass:"qt-position-empty"},[e("a-empty",{staticStyle:{padding:"20px 0"},attrs:{description:t.$t("quickTrade.noPosition"),image:!1}},[e("template",{slot:"description"},[e("span",{staticStyle:{color:"#999","font-size":"12px"}},[t._v(t._s(t.$t("quickTrade.noPositionHint")))])])],2)],1)]),t.recentTrades.length>0?e("div",{staticClass:"qt-history-section"},[e("a-collapse",{attrs:{bordered:!1,activeKey:t.historyCollapsed?[]:["history"]},on:{change:t.handleHistoryCollapse}},[e("a-collapse-panel",{key:"history",style:t.collapseStyle,attrs:{showArrow:!1}},[e("template",{slot:"header"},[e("div",{staticClass:"qt-section-header",staticStyle:{margin:"0",padding:"0"}},[e("a-icon",{attrs:{type:"history"}}),t._v(" "+t._s(t.$t("quickTrade.recentTrades"))+" "),e("span",{staticClass:"qt-history-count"},[t._v("("+t._s(t.recentTrades.length)+")")])],1)]),e("div",{staticClass:"qt-trade-list"},t._l(t.recentTrades,function(a){return e("div",{key:a.id,staticClass:"qt-trade-item"},[e("div",{staticClass:"qt-trade-main"},[e("a-tag",{attrs:{color:"buy"===a.side?"#52c41a":"#f5222d",size:"small"}},[t._v(" "+t._s("buy"===a.side?"LONG":"SHORT")+" ")]),e("span",{staticClass:"qt-trade-symbol"},[t._v(t._s(a.symbol))]),e("span",{staticClass:"qt-trade-amount"},[t._v("$"+t._s(t.formatPrice(a.amount)))])],1),e("div",{staticClass:"qt-trade-meta"},[e("a-tag",{attrs:{color:"filled"===a.status?"#52c41a":"failed"===a.status?"#f5222d":"#faad14",size:"small"}},[t._v(" "+t._s(a.status)+" ")]),e("span",{staticClass:"qt-trade-time"},[t._v(t._s(t.formatTime(a.created_at)))])],1)])}),0)],2)],1)],1):t._e()],1)},r=[],s=a(81127),n=a(56252),c=a(76338),l=(a(74423),a(95353)),o=a(42430),u=a(75769);function d(t){return(0,u.Ay)({url:"/api/quick-trade/place-order",method:"post",data:t})}function m(t){return(0,u.Ay)({url:"/api/quick-trade/balance",method:"get",params:t})}function p(t){return(0,u.Ay)({url:"/api/quick-trade/position",method:"get",params:t})}function h(t){return(0,u.Ay)({url:"/api/quick-trade/history",method:"get",params:t})}function v(t){return(0,u.Ay)({url:"/api/quick-trade/close-position",method:"post",data:t})}var b=a(35038),y=a(505),f={name:"QuickTradePanel",props:{visible:{type:Boolean,default:!1},symbol:{type:String,default:""},presetSide:{type:String,default:""},presetPrice:{type:Number,default:0},source:{type:String,default:"manual"},marketType:{type:String,default:"swap"}},data:function(){return{credentials:[],selectedCredentialId:void 0,credLoading:!1,balance:{available:0,total:0},side:"buy",orderType:"market",limitPrice:0,amount:100,leverage:5,tpPrice:null,slPrice:null,submitting:!1,closingPosition:!1,currentPrice:0,currentPosition:null,recentTrades:[],historyCollapsed:!1,currentSymbol:"",symbolSuggestions:[],symbolSearching:!1,symbolSearchTimer:null,userId:null,quickAmountPcts:[10,25,50,75,100],leverageMarks:{1:"1x",5:"5x",10:"10x",25:"25x",50:"50x",100:"100x",125:"125x"},pollTimer:null}},computed:(0,c.A)((0,c.A)({},(0,l.aH)({navTheme:function(t){return t.app.theme}})),{},{isDark:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},priceStep:function(){return this.currentPrice>1e4?1:this.currentPrice>100?.1:this.currentPrice>1?.01:1e-4},pricePrecision:function(){return this.currentPrice>1e4?0:this.currentPrice>100?1:this.currentPrice>1?2:4},canSubmit:function(){return this.selectedCredentialId&&this.currentSymbol&&this.amount>0&&!this.submitting},priceChangeClass:function(){return""},collapseStyle:function(){return{background:"transparent",borderRadius:"4px",border:0,overflow:"hidden"}}}),watch:{visible:function(t){t?this.init():this.stopPolling()},symbol:function(t){t&&(this.currentSymbol=t)},currentSymbol:function(t){t&&(this.loadPrice(),this.selectedCredentialId&&this.loadPosition(),this.$emit("update:symbol",t))},selectedCredentialId:function(t){t&&this.currentSymbol&&this.loadPosition()},presetSide:function(t){t&&(this.side=t)},presetPrice:function(t){t>0&&(this.currentPrice=t,this.limitPrice=t)}},methods:{init:function(){var t=this;return(0,n.A)((0,s.A)().m(function e(){return(0,s.A)().w(function(e){while(1)switch(e.n){case 0:return t.currentSymbol=t.symbol||"",t.presetSide&&(t.side=t.presetSide),t.presetPrice>0&&(t.currentPrice=t.presetPrice,t.limitPrice=t.presetPrice),e.n=1,t.loadCredentials();case 1:return e.n=2,t.loadUserInfo();case 2:return e.n=3,t.loadWatchlistSymbols();case 3:if(!t.currentSymbol){e.n=4;break}return e.n=4,t.loadPrice();case 4:if(!t.selectedCredentialId||!t.currentSymbol){e.n=5;break}return e.n=5,t.loadPosition();case 5:t.loadHistory(),t.startPolling();case 6:return e.a(2)}},e)}))()},loadUserInfo:function(){var t=this;return(0,n.A)((0,s.A)().m(function e(){var a,i,r,n;return(0,s.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(e.p=0,i=t.$store,r=(null===i||void 0===i||null===(a=i.getters)||void 0===a?void 0:a.userInfo)||{},!r||!r.id){e.n=1;break}return t.userId=r.id,e.a(2);case 1:return e.n=2,(0,y.ug)();case 2:n=e.v,n&&1===n.code&&n.data&&(t.userId=n.data.id,i&&i.commit("SET_INFO",n.data)),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[0,3]])}))()},loadWatchlistSymbols:function(){var t=this;return(0,n.A)((0,s.A)().m(function e(){var a,i;return(0,s.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.userId){e.n=2;break}return e.n=1,t.loadUserInfo();case 1:if(t.userId){e.n=2;break}return e.a(2);case 2:return e.p=2,e.n=3,(0,b.Qo)({userid:t.userId});case 3:a=e.v,a&&1===a.code&&a.data&&(i=(a.data||[]).filter(function(t){return"crypto"===(t.market||"").toLowerCase()}).map(function(t){return{value:t.symbol||"",symbol:t.symbol||"",name:t.name||""}}).filter(function(t){return t.value}),t.symbolSuggestions=i),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2)}},e,null,[[2,4]])}))()},handleSymbolSearch:function(t){var e=this;this.symbolSearchTimer&&clearTimeout(this.symbolSearchTimer),t&&""!==t.trim()?this.symbolSearchTimer=setTimeout((0,n.A)((0,s.A)().m(function a(){var i;return(0,s.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return e.symbolSearching=!0,a.p=1,a.n=2,(0,b._3)({market:"Crypto",keyword:t.trim(),limit:20});case 2:i=a.v,i&&1===i.code&&i.data?e.symbolSuggestions=(i.data.items||i.data||[]).map(function(t){return{value:t.symbol||"",symbol:t.symbol||"",name:t.name||""}}).filter(function(t){return t.value}):e.symbolSuggestions=[],a.n=4;break;case 3:a.p=3,a.v,e.symbolSuggestions=[];case 4:return a.p=4,e.symbolSearching=!1,a.f(4);case 5:return a.a(2)}},a,null,[[1,3,4,5]])})),300):this.loadWatchlistSymbols()},handleSymbolChange:function(t){t&&t!==this.currentSymbol&&(this.currentSymbol=t,this.loadPrice(),this.selectedCredentialId&&this.loadPosition(),this.$emit("update:symbol",t))},loadPrice:function(){var t=this;return(0,n.A)((0,s.A)().m(function e(){var a,i;return(0,s.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.currentSymbol){e.n=1;break}return t.currentPrice=0,e.a(2);case 1:return e.p=1,e.n=2,(0,u.Ay)({url:"/api/market/price",method:"get",params:{market:"Crypto",symbol:t.currentSymbol}});case 2:a=e.v,a&&1===a.code&&a.data&&(i=parseFloat(a.data.price||0),i>0&&(t.currentPrice=i,0!==t.limitPrice&&t.limitPrice!==t.presetPrice||(t.limitPrice=i))),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[1,3]])}))()},handleSymbolFocus:function(){0===this.symbolSuggestions.length&&this.loadWatchlistSymbols()},loadCredentials:function(){var t=this;return(0,n.A)((0,s.A)().m(function e(){var a,i,r;return(0,s.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.credLoading=!0,e.p=1,e.n=2,(0,o.IA)();case 2:a=e.v,1===a.code&&a.data&&(i=a.data.items||a.data||[],r=["ibkr","mt5"],t.credentials=i.filter(function(t){var e=(t.exchange_id||t.name||"").toLowerCase();return!r.includes(e)}),!t.selectedCredentialId&&t.credentials.length>0&&(t.selectedCredentialId=t.credentials[0].id,t.onCredentialChange(t.selectedCredentialId))),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.p=4,t.credLoading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},onCredentialChange:function(t){var e=this;return(0,n.A)((0,s.A)().m(function a(){return(0,s.A)().w(function(a){while(1)switch(a.n){case 0:return e.selectedCredentialId=t,a.n=1,e.loadBalance();case 1:return a.n=2,e.loadPosition();case 2:return a.a(2)}},a)}))()},loadBalance:function(){var t=this;return(0,n.A)((0,s.A)().m(function e(){var a;return(0,s.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.selectedCredentialId){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,m({credential_id:t.selectedCredentialId,market_type:t.marketType});case 2:a=e.v,1===a.code&&a.data&&(t.balance=a.data),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[1,3]])}))()},loadPosition:function(){var t=this;return(0,n.A)((0,s.A)().m(function e(){var a;return(0,s.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.selectedCredentialId&&t.currentSymbol){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,p({credential_id:t.selectedCredentialId,symbol:t.currentSymbol,market_type:t.marketType});case 2:if(a=e.v,!(1===a.code&&a.data&&a.data.positions&&a.data.positions.length>0)){e.n=3;break}return t.currentPosition=a.data.positions[0],e.a(2,!0);case 3:return t.currentPosition=null,e.a(2,!1);case 4:e.n=6;break;case 5:return e.p=5,e.v,t.currentPosition=null,e.a(2,!1);case 6:return e.a(2)}},e,null,[[1,5]])}))()},loadPositionWithRetry:function(){var t=arguments,e=this;return(0,n.A)((0,s.A)().m(function a(){var i,r,n,c;return(0,s.A)().w(function(a){while(1)switch(a.n){case 0:return i=t.length>0&&void 0!==t[0]?t[0]:3,r=t.length>1&&void 0!==t[1]?t[1]:2e3,a.n=1,e.loadPosition();case 1:if(n=a.v,!n){a.n=2;break}return a.a(2);case 2:c=0;case 3:if(!(c0&&(this.amount=Math.floor(this.balance.available*t/100*100)/100)},handleSubmit:function(){var t=this;return(0,n.A)((0,s.A)().m(function e(){var a,i,r;return(0,s.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.canSubmit){e.n=1;break}return e.a(2);case 1:return t.submitting=!0,e.p=2,a={credential_id:t.selectedCredentialId,symbol:t.currentSymbol,side:t.side,order_type:t.orderType,amount:t.amount,price:"limit"===t.orderType?t.limitPrice:0,leverage:"spot"!==t.marketType?t.leverage:1,market_type:t.marketType,tp_price:t.tpPrice||0,sl_price:t.slPrice||0,source:t.source},e.n=3,d(a);case 3:if(i=e.v,1!==i.code){e.n=7;break}return t.$emit("order-success",i.data),e.n=4,t.loadBalance();case 4:return e.n=5,t.loadHistory();case 5:return e.n=6,t.loadPositionWithRetry();case 6:e.n=8;break;case 7:t.$message.error(i.msg||t.$t("quickTrade.orderFailed"));case 8:e.n=10;break;case 9:e.p=9,r=e.v,t.$message.error(r.message||t.$t("quickTrade.orderFailed"));case 10:return e.p=10,t.submitting=!1,e.f(10);case 11:return e.a(2)}},e,null,[[2,9,10,11]])}))()},handleClosePosition:function(){var t=this;return(0,n.A)((0,s.A)().m(function e(){var a,i,r;return(0,s.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.currentPosition&&t.selectedCredentialId){e.n=1;break}return e.a(2);case 1:return t.closingPosition=!0,e.p=2,a={credential_id:t.selectedCredentialId,symbol:t.currentSymbol,market_type:t.marketType,size:0,source:"manual"},e.n=3,v(a);case 3:if(i=e.v,1!==i.code){e.n=6;break}return t.$message.success(t.$t("quickTrade.positionClosed")),e.n=4,t.loadBalance();case 4:return e.n=5,t.loadHistory();case 5:t.currentPosition=null,setTimeout((0,n.A)((0,s.A)().m(function e(){return(0,s.A)().w(function(e){while(1)switch(e.n){case 0:return e.n=1,t.loadPosition();case 1:return e.a(2)}},e)})),2e3),e.n=7;break;case 6:t.$message.error(i.msg||t.$t("quickTrade.orderFailed"));case 7:e.n=9;break;case 8:e.p=8,r=e.v,t.$message.error(r.message||t.$t("quickTrade.orderFailed"));case 9:return e.p=9,t.closingPosition=!1,e.f(9);case 10:return e.a(2)}},e,null,[[2,8,9,10]])}))()},startPolling:function(){var t=this;this.stopPolling(),this.pollTimer=setInterval(function(){t.currentSymbol&&t.loadPrice(),t.selectedCredentialId&&t.currentSymbol&&(t.loadBalance(),t.loadPosition())},1e4)},stopPolling:function(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)},handleClose:function(){this.$emit("close"),this.$emit("update:visible",!1)},handleHistoryCollapse:function(t){this.historyCollapsed=!t.includes("history")},formatPrice:function(t){var e=parseFloat(t||0);return Math.abs(e)>=1e4?e.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0}):Math.abs(e)>=100?e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):Math.abs(e)>=1?e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:4}):e.toLocaleString("en-US",{minimumFractionDigits:4,maximumFractionDigits:6})},formatTime:function(t){if(!t)return"";var e=new Date(t),a=function(t){return String(t).padStart(2,"0")};return"".concat(a(e.getMonth()+1),"-").concat(a(e.getDate())," ").concat(a(e.getHours()),":").concat(a(e.getMinutes()))}},beforeDestroy:function(){this.stopPolling()}},g=f,k=a(845),_=(0,k.A)(g,i,r,!1,null,"989be352",null),q=_.exports}}]); \ No newline at end of file diff --git a/frontend/dist/js/402-legacy.2bdb2b0f.js b/frontend/dist/js/402-legacy.2bdb2b0f.js new file mode 100644 index 0000000..f3bc5d2 --- /dev/null +++ b/frontend/dist/js/402-legacy.2bdb2b0f.js @@ -0,0 +1 @@ +"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[402],{75402:function(e,t,a){a.d(t,{A:function(){return m}});a(62010);var r=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.$t("profile.exchange.addTitle"),visible:e.visible,"wrap-class-name":e.modalWrapClass,confirmLoading:e.savingExchange,okText:e.$t("common.save"),cancelText:e.$t("common.cancel"),maskClosable:!1,width:"520px"},on:{ok:e.handleSaveExchange,cancel:e.handleCancel}},[t("a-form",{staticClass:"exchange-account-form",attrs:{form:e.exchangeForm,layout:"vertical"}},[t("a-form-item",{attrs:{label:e.$t("profile.exchange.selectExchange")}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["exchange_id",{rules:[{required:!0,message:e.$t("profile.exchange.selectExchange")}]}],expression:"['exchange_id', { rules: [{ required: true, message: $t('profile.exchange.selectExchange') }] }]"}],attrs:{placeholder:e.$t("profile.exchange.selectExchange"),"dropdown-class-name":e.isDarkTheme?"profile-exchange-select-dropdown-dark":"","get-popup-container":e.getExchangeSelectPopupContainer},on:{change:e.handleExchangeTypeChange}},[t("a-select-opt-group",{attrs:{label:e.$t("profile.exchange.typeCrypto")}},e._l(e.cryptoExchangeList,function(a){return t("a-select-option",{key:a.id,attrs:{value:a.id}},[e._v(" "+e._s(a.name)+" ")])}),1),t("a-select-opt-group",{attrs:{label:e.$t("profile.exchange.typeIBKR")}},[t("a-select-option",{attrs:{value:"ibkr"}},[e._v("Interactive Brokers (IBKR)")])],1),t("a-select-opt-group",{attrs:{label:e.$t("profile.exchange.typeMT5")}},[t("a-select-option",{attrs:{value:"mt5"}},[e._v("MetaTrader 5")])],1)],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.accountName")}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name"],expression:"['name']"}],attrs:{placeholder:e.$t("profile.exchange.accountNamePlaceholder")}})],1),"crypto"===e.addExchangeType?t("a-form-item",{attrs:{label:e.$t("profile.exchange.whitelistIpLabel")}},[t("div",{staticClass:"egress-ip-block"},[e.egressIpLoading?t("a-spin",{attrs:{size:"small"}}):[t("div",{staticClass:"egress-ip-line"},[t("span",{staticClass:"egress-ip-kind"},[e._v(e._s(e.$t("profile.exchange.whitelistIpv4")))]),t("code",{staticClass:"egress-ip-value"},[e._v(e._s(e.egressServerIpv4||"—"))]),t("a-button",{staticClass:"egress-ip-action",attrs:{type:"link",size:"small",disabled:!e.egressServerIpv4},on:{click:function(t){return e.copyEgressIp("v4")}}},[e._v(" "+e._s(e.$t("profile.exchange.whitelistIpCopy"))+" ")])],1),t("div",{staticClass:"egress-ip-line"},[t("span",{staticClass:"egress-ip-kind"},[e._v(e._s(e.$t("profile.exchange.whitelistIpv6")))]),t("code",{staticClass:"egress-ip-value"},[e._v(e._s(e.egressServerIpv6||"—"))]),t("a-button",{staticClass:"egress-ip-action",attrs:{type:"link",size:"small",disabled:!e.egressServerIpv6},on:{click:function(t){return e.copyEgressIp("v6")}}},[e._v(" "+e._s(e.$t("profile.exchange.whitelistIpCopy"))+" ")])],1),t("div",{staticClass:"egress-ip-row egress-ip-refresh-row"},[t("a-button",{staticClass:"egress-ip-action",attrs:{type:"link",size:"small"},on:{click:e.fetchEgressIp}},[e._v(" "+e._s(e.$t("profile.exchange.whitelistIpRefresh"))+" ")])],1)]],2),t("div",{staticClass:"field-hint egress-ip-hint"},[e._v(e._s(e.$t("profile.exchange.whitelistIpHint")))])]):e._e(),"crypto"===e.addExchangeType?[e.selectedExchangeApiDocUrl?t("div",{staticClass:"exchange-api-doc-callout"},[t("div",{staticClass:"exchange-api-doc-callout__content"},[t("div",{staticClass:"exchange-api-doc-callout__icon"},[t("a-icon",{attrs:{type:"link"}})],1),t("div",{staticClass:"exchange-api-doc-callout__text"},[t("div",{staticClass:"exchange-api-doc-callout__title"},[e._v(" "+e._s(e.selectedCryptoExchangeName)+" "+e._s(e.$t("profile.exchange.apiDocTitleSuffix"))+" ")]),t("div",{staticClass:"exchange-api-doc-callout__hint"},[e._v(" "+e._s(e.$t("profile.exchange.apiDocHint"))+" ")])])]),t("a-button",{staticClass:"exchange-api-doc-callout__action",attrs:{type:"link",size:"small"},on:{click:e.openSelectedExchangeApiDoc}},[e._v(" "+e._s(e.$t("profile.exchange.apiDocAction"))+" "),t("a-icon",{attrs:{type:"arrow-right"}})],1)],1):e._e(),t("a-form-item",{attrs:{label:e.$t("profile.exchange.apiKey")}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["api_key",{rules:[{required:!0,message:"API Key is required"}]}],expression:"['api_key', { rules: [{ required: true, message: 'API Key is required' }] }]"}],attrs:{placeholder:"API Key",autocomplete:"new-password"}})],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.secretKey")}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["secret_key",{rules:[{required:!0,message:"Secret Key is required"}]}],expression:"['secret_key', { rules: [{ required: true, message: 'Secret Key is required' }] }]"}],attrs:{placeholder:"Secret Key",autocomplete:"new-password"}})],1),e.addExchangeNeedsPassphrase?t("a-form-item",{attrs:{label:e.$t("profile.exchange.passphrase")}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["passphrase"],expression:"['passphrase']"}],attrs:{placeholder:"Passphrase",autocomplete:"new-password"}})],1):e._e(),e.addExchangeShowDemo?t("a-form-item",[t("a-checkbox",{directives:[{name:"decorator",rawName:"v-decorator",value:["enable_demo_trading",{valuePropName:"checked",initialValue:!1}],expression:"['enable_demo_trading', { valuePropName: 'checked', initialValue: false }]"}],staticClass:"exchange-demo-checkbox"},[t("span",{staticClass:"exchange-demo-checkbox-label"},[e._v(e._s(e.$t("profile.exchange.demoTrading")))])]),t("div",{staticClass:"field-hint exchange-demo-hint"},[e._v(e._s(e.$t("profile.exchange.demoTradingHint")))])],1):e._e()]:e._e(),"ibkr"===e.addExchangeType?[t("a-alert",{staticStyle:{"margin-bottom":"16px"},attrs:{type:"warning",showIcon:"",message:e.$t("profile.exchange.localDeploymentRequired"),description:e.$t("profile.exchange.localDeploymentHint")}}),t("a-form-item",{attrs:{label:e.$t("profile.exchange.ibkrHost")}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["ibkr_host",{initialValue:"127.0.0.1"}],expression:"['ibkr_host', { initialValue: '127.0.0.1' }]"}],attrs:{placeholder:"127.0.0.1"}})],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.ibkrPort")}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["ibkr_port",{initialValue:7497}],expression:"['ibkr_port', { initialValue: 7497 }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:65535}}),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.exchange.ibkrPortHint")))])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.ibkrClientId")}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["ibkr_client_id",{initialValue:1}],expression:"['ibkr_client_id', { initialValue: 1 }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:999}})],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.ibkrAccount")}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["ibkr_account"],expression:"['ibkr_account']"}],attrs:{placeholder:"DU123456"}})],1)]:e._e(),"mt5"===e.addExchangeType?[t("a-alert",{staticStyle:{"margin-bottom":"16px"},attrs:{type:"warning",showIcon:"",message:e.$t("profile.exchange.localDeploymentRequired"),description:e.$t("profile.exchange.localDeploymentHint")}}),t("a-form-item",{attrs:{label:e.$t("profile.exchange.mt5Server")}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["mt5_server",{rules:[{required:!0,message:"Server is required"}]}],expression:"['mt5_server', { rules: [{ required: true, message: 'Server is required' }] }]"}],attrs:{placeholder:"MetaQuotes-Demo"}})],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.mt5Login")}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["mt5_login",{rules:[{required:!0,message:"Login is required"}]}],expression:"['mt5_login', { rules: [{ required: true, message: 'Login is required' }] }]"}],staticStyle:{width:"100%"},attrs:{min:1,placeholder:"12345678"}})],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.mt5Password")}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["mt5_password",{rules:[{required:!0,message:"Password is required"}]}],expression:"['mt5_password', { rules: [{ required: true, message: 'Password is required' }] }]"}],attrs:{placeholder:"Password",autocomplete:"new-password"}})],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.mt5TerminalPath")}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["mt5_terminal_path"],expression:"['mt5_terminal_path']"}],attrs:{placeholder:"C:\\Program Files\\MetaTrader 5\\terminal64.exe"}}),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.exchange.mt5TerminalPathHint")))])],1)],1)]:e._e(),e.addExchangeType?t("a-form-item",[t("a-button",{attrs:{block:"",loading:e.testingExchange},on:{click:e.handleTestExchangeConnection}},[t("a-icon",{attrs:{type:"api"}}),e._v(" "+e._s(e.$t("profile.exchange.testConnection"))+" ")],1),e.exchangeTestResult?t("div",{staticClass:"test-result-msg",class:e.exchangeTestResult.success?"success":"error"},[t("a-icon",{attrs:{type:e.exchangeTestResult.success?"check-circle":"close-circle"}}),e._v(" "+e._s(e.exchangeTestResult.message)+" ")],1):e._e()],1):e._e()],2)],1)},s=[],i=a(81127),n=a(56252),c=a(76338),o=(a(28706),a(50113),a(74423),a(62062),a(26099),a(21699),a(42762),a(95353)),l=a(42430),p=a(36911),d={name:"ExchangeAccountModal",props:{visible:{type:Boolean,default:!1}},data:function(){return{savingExchange:!1,testingExchange:!1,exchangeTestResult:null,addExchangeType:"",selectedExchangeId:"",egressServerIpv4:"",egressServerIpv6:"",egressIpLoading:!1,cryptoExchangeList:[{id:"binance",name:"Binance",docsUrl:"https://www.binance.com/en/support/faq/detail/360002502072"},{id:"okx",name:"OKX",docsUrl:"https://www.okx.com/docs-v5/zh/#overview-v5-api-key-creation"},{id:"bitget",name:"Bitget",docsUrl:"https://www.bitget.com/api-doc/common/quick-start"},{id:"bybit",name:"Bybit",docsUrl:"https://www.bybit.com/en/help-center/article/How-to-create-your-API-key/"},{id:"coinbaseexchange",name:"Coinbase",docsUrl:"https://docs.cdp.coinbase.com/exchange/rest-api/authentication"},{id:"kraken",name:"Kraken",docsUrl:"https://support.kraken.com/articles/360000919966-how-to-create-an-api-key"},{id:"kucoin",name:"KuCoin",docsUrl:"https://www.kucoin.com/docs-new/authentication"},{id:"gate",name:"Gate.io",docsUrl:"https://www.gate.com/docs/developers/apiv4/"},{id:"bitfinex",name:"Bitfinex",docsUrl:"https://docs.bitfinex.com/docs/create-an-api-key"},{id:"deepcoin",name:"Deepcoin",docsUrl:"https://www.deepcoin.com/docs/authentication"},{id:"htx",name:"HTX",docsUrl:"https://www.htx.com/en-us/opend/newApiPages/?id=414"}]}},computed:(0,c.A)((0,c.A)({},(0,o.aH)({navTheme:function(e){return e.app.theme}})),{},{isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},modalWrapClass:function(){var e="profile-exchange-modal";return this.isDarkTheme?"".concat(e," ").concat(e,"--dark"):e},addExchangeNeedsPassphrase:function(){return["okx","bitget","kucoin"].includes(this.selectedExchangeId)},addExchangeShowDemo:function(){return"crypto"===this.addExchangeType&&!!this.selectedExchangeId},selectedCryptoExchangeMeta:function(){var e=this;return this.cryptoExchangeList.find(function(t){return t.id===e.selectedExchangeId})||null},selectedCryptoExchangeName:function(){return this.selectedCryptoExchangeMeta?this.selectedCryptoExchangeMeta.name:this.getExchangeDisplayName(this.selectedExchangeId)},selectedExchangeApiDocUrl:function(){return this.selectedCryptoExchangeMeta?this.selectedCryptoExchangeMeta.docsUrl:""}}),watch:{visible:function(e){e&&this.fetchEgressIp()}},beforeCreate:function(){this.exchangeForm=this.$form.createForm(this,{name:"exchangeAccountModal"})},methods:{getExchangeSelectPopupContainer:function(){return document.body},handleCancel:function(){this.$emit("update:visible",!1)},getExchangeDisplayName:function(e){var t={binance:"Binance",okx:"OKX",bitget:"Bitget",bybit:"Bybit",coinbaseexchange:"Coinbase",kraken:"Kraken",kucoin:"KuCoin",gate:"Gate.io",bitfinex:"Bitfinex",deepcoin:"Deepcoin",htx:"HTX",ibkr:"IBKR",mt5:"MetaTrader 5"};return t[e]||e},fetchEgressIp:function(){var e=this;return(0,n.A)((0,i.A)().m(function t(){var a,r,s,n;return(0,i.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return e.egressIpLoading=!0,e.egressServerIpv4="",e.egressServerIpv6="",t.p=1,t.n=2,(0,l.N6)();case 2:a=t.v,1===a.code&&a.data&&(r=null!=a.data.ipv4?String(a.data.ipv4).trim():"",s=null!=a.data.ipv6?String(a.data.ipv6).trim():"",e.egressServerIpv4=r,e.egressServerIpv6=s,r||s||!a.data.ip||(n=String(a.data.ip).trim(),n.includes(":")?e.egressServerIpv6=n:e.egressServerIpv4=n)),t.n=4;break;case 3:t.p=3,t.v,e.egressServerIpv4="",e.egressServerIpv6="";case 4:return t.p=4,e.egressIpLoading=!1,t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}))()},copyEgressIp:function(e){var t=this,a="v6"===e?this.egressServerIpv6:this.egressServerIpv4;if(a){var r=function(){return t.$message.success(t.$t("profile.exchange.whitelistIpCopied"))};navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(a).then(r).catch(function(){return t._fallbackCopyText(a,r)}):this._fallbackCopyText(a,r)}},_fallbackCopyText:function(e,t){try{var a=document.createElement("textarea");a.value=e,a.style.position="fixed",a.style.left="-9999px",document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a),t&&t()}catch(r){this.$message.error(this.$t("profile.exchange.whitelistIpCopyFail"))}},handleExchangeTypeChange:function(e){this.selectedExchangeId=e,this.exchangeTestResult=null;var t=this.cryptoExchangeList.map(function(e){return e.id});t.includes(e)?this.addExchangeType="crypto":this.addExchangeType="ibkr"===e?"ibkr":"mt5"===e?"mt5":""},openSelectedExchangeApiDoc:function(){var e=this.selectedExchangeApiDocUrl;e&&window.open(e,"_blank")},handleSaveExchange:function(){var e=this;this.exchangeForm.validateFields(function(){var t=(0,n.A)((0,i.A)().m(function t(a,r){var s,n,o;return(0,i.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(!a){t.n=1;break}return t.a(2);case 1:return e.savingExchange=!0,t.p=2,s=(0,c.A)({},r),t.n=3,(0,l.PR)(s);case 3:n=t.v,1===n.code?(e.$message.success(e.$t("profile.exchange.saveSuccess")),e.$emit("update:visible",!1),e.exchangeForm.resetFields(),e.addExchangeType="",e.selectedExchangeId="",e.exchangeTestResult=null,e.$emit("success",n.data)):e.$message.error(n.msg||e.$t("profile.exchange.saveFailed")),t.n=5;break;case 4:t.p=4,o=t.v,e.$message.error(o.message||e.$t("profile.exchange.saveFailed"));case 5:return t.p=5,e.savingExchange=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}));return function(e,a){return t.apply(this,arguments)}}())},handleTestExchangeConnection:function(){var e=this;return(0,n.A)((0,i.A)().m(function t(){var a,r,s,n,o,l;return(0,i.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(a=e.exchangeForm.getFieldsValue(),r=a.exchange_id,r){t.n=1;break}return t.a(2);case 1:return e.testingExchange=!0,e.exchangeTestResult=null,t.p=2,s=(0,c.A)({},a),t.n=3,(0,p.kv)(s);case 3:n=t.v,1===n.code?e.exchangeTestResult={success:!0,message:e.$t("profile.exchange.testSuccess")}:(o=n.data&&n.data.hint_cn?" ".concat(n.data.hint_cn):"",e.exchangeTestResult={success:!1,message:"".concat(e.$t("profile.exchange.testFailed"),": ").concat(n.msg||"Unknown error").concat(o)}),t.n=5;break;case 4:t.p=4,l=t.v,e.exchangeTestResult={success:!1,message:"".concat(e.$t("profile.exchange.testFailed"),": ").concat(l.message||"Network error")};case 5:return t.p=5,e.testingExchange=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}))()}}},h=d,u=a(845),g=(0,u.A)(h,r,s,!1,null,null,null),m=g.exports},42430:function(e,t,a){a.d(t,{IA:function(){return n},N6:function(){return l},PR:function(){return c},kI:function(){return o}});var r=a(76338),s=a(75769),i={list:"/api/credentials/list",get:"/api/credentials/get",create:"/api/credentials/create",delete:"/api/credentials/delete",egressIp:"/api/credentials/egress-ip"};function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,s.Ay)({url:i.list,method:"get",params:e})}function c(e){return(0,s.Ay)({url:i.create,method:"post",data:e})}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,s.Ay)({url:i.delete,method:"delete",params:(0,r.A)({id:e},t)})}function l(){return(0,s.Ay)({url:i.egressIp,method:"get"})}}}]); \ No newline at end of file diff --git a/frontend/dist/js/419.0b9ef592.js b/frontend/dist/js/419.0b9ef592.js deleted file mode 100644 index 2138af0..0000000 --- a/frontend/dist/js/419.0b9ef592.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[419],{29419:function(t,e,a){a.r(e),a.d(e,{default:function(){return q}});var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"backtest-center",class:{"theme-dark":t.isDarkTheme}},[e("div",{staticClass:"page-header"},[e("h2",{staticClass:"page-title"},[e("a-icon",{staticClass:"title-icon",attrs:{type:"experiment"}}),t._v(" "+t._s(t.$t("backtest-center.title"))+" ")],1),e("p",{staticClass:"page-subtitle"},[t._v(t._s(t.$t("backtest-center.subtitle")))])]),e("a-tabs",{staticClass:"main-tabs",model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[e("a-tab-pane",{key:"indicator",attrs:{tab:t.$t("backtest-center.tabs.indicator")}},[e("a-row",{staticClass:"workspace",attrs:{gutter:20}},[e("a-col",{staticClass:"config-col",attrs:{xs:24,md:9,lg:8}},[e("div",{staticClass:"config-panel"},[e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.indicator.selectIndicator")))]),e("a-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("backtest-center.indicator.selectIndicatorPlaceholder"),loading:t.loadingIndicators,"allow-clear":"","show-search":"","option-filter-prop":"children"},on:{change:t.onIndicatorChange},model:{value:t.selectedIndicatorId,callback:function(e){t.selectedIndicatorId=e},expression:"selectedIndicatorId"}},t._l(t.indicators,function(a){return e("a-select-option",{key:a.id,attrs:{value:a.id}},[t._v(t._s(a.name||"Indicator #"+a.id))])}),1)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.config.symbol")))]),e("a-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("backtest-center.config.watchlistPlaceholder"),"show-search":"","allow-clear":"","filter-option":t.filterWatchlistOption},on:{change:t.handleWatchlistChange},model:{value:t.selectedWatchlistKey,callback:function(e){t.selectedWatchlistKey=e},expression:"selectedWatchlistKey"}},[t._l(t.watchlist,function(a){return e("a-select-option",{key:"".concat(a.market,":").concat(a.symbol),attrs:{value:"".concat(a.market,":").concat(a.symbol)}},[e("a-tag",{attrs:{color:t.getMarketColor(a.market),size:"small"}},[t._v(t._s(a.market))]),e("strong",{staticStyle:{"margin-left":"4px"}},[t._v(t._s(a.symbol))]),a.name?e("span",{staticStyle:{color:"#999","margin-left":"4px","font-size":"12px"}},[t._v(t._s(a.name))]):t._e()],1)}),e("a-select-option",{key:"__add__",staticClass:"add-option",attrs:{value:"__add__"}},[e("div",{staticStyle:{"text-align":"center",color:"#1890ff"}},[e("a-icon",{attrs:{type:"plus"}}),t._v(" "+t._s(t.$t("backtest-center.config.addSymbol"))+" ")],1)])],2)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(" "+t._s(t.$t("backtest-center.config.timeframe"))+" "),e("span",{staticClass:"hint"},[t._v(t._s(t.tfLimitHint))])]),e("a-radio-group",{staticClass:"tf-group",attrs:{"button-style":"solid",size:"small"},on:{change:t.onTimeframeChange},model:{value:t.timeframe,callback:function(e){t.timeframe=e},expression:"timeframe"}},[e("a-radio-button",{attrs:{value:"1m"}},[t._v("1m")]),e("a-radio-button",{attrs:{value:"5m"}},[t._v("5m")]),e("a-radio-button",{attrs:{value:"15m"}},[t._v("15m")]),e("a-radio-button",{attrs:{value:"1H"}},[t._v("1H")]),e("a-radio-button",{attrs:{value:"4H"}},[t._v("4H")]),e("a-radio-button",{attrs:{value:"1D"}},[t._v("1D")]),e("a-radio-button",{attrs:{value:"1W"}},[t._v("1W")])],1)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.config.dateRange")))]),e("div",{staticClass:"date-presets"},t._l(t.filteredDatePresets,function(a){return e("a-button",{key:a.key,attrs:{size:"small",type:t.datePreset===a.key?"primary":"default"},on:{click:function(e){return t.applyDatePreset(a)}}},[t._v(t._s(a.label))])}),1),e("a-row",{staticStyle:{"margin-top":"8px"},attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("a-date-picker",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("backtest-center.config.startDate"),size:"small"},model:{value:t.startDate,callback:function(e){t.startDate=e},expression:"startDate"}})],1),e("a-col",{attrs:{span:12}},[e("a-date-picker",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("backtest-center.config.endDate"),size:"small"},model:{value:t.endDate,callback:function(e){t.endDate=e},expression:"endDate"}})],1)],1)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.config.capital")))]),e("a-row",{attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.initialCapital")))]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:1e3,step:1e4,precision:2,size:"small",formatter:function(t){return"$ ".concat(t).replace(/\B(?=(\d{3})+(?!\d))/g,",")},parser:function(t){return t.replace(/\$\s?|(,*)/g,"")}},model:{value:t.initialCapital,callback:function(e){t.initialCapital=e},expression:"initialCapital"}})],1),e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.leverage")))]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:1,max:125,step:1,precision:0,size:"small",formatter:function(t){return"".concat(t,"x")},parser:function(t){return t.replace("x","")}},model:{value:t.leverage,callback:function(e){t.leverage=e},expression:"leverage"}})],1)],1),e("a-row",{staticStyle:{"margin-top":"8px"},attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.commission"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:10,step:.01,precision:4,size:"small"},model:{value:t.commission,callback:function(e){t.commission=e},expression:"commission"}})],1),e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.slippage"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:10,step:.01,precision:4,size:"small"},model:{value:t.slippage,callback:function(e){t.slippage=e},expression:"slippage"}})],1)],1)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.config.direction")))]),e("a-radio-group",{attrs:{size:"small","button-style":"solid"},model:{value:t.tradeDirection,callback:function(e){t.tradeDirection=e},expression:"tradeDirection"}},[e("a-radio-button",{attrs:{value:"long"}},[t._v(t._s(t.$t("backtest-center.config.long")))]),e("a-radio-button",{attrs:{value:"short"}},[t._v(t._s(t.$t("backtest-center.config.short")))]),e("a-radio-button",{attrs:{value:"both"}},[t._v(t._s(t.$t("backtest-center.config.both")))])],1)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.config.riskPanel")))]),e("a-row",{attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.stopLoss"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:100,step:.5,precision:2,size:"small"},model:{value:t.stopLossPct,callback:function(e){t.stopLossPct=e},expression:"stopLossPct"}})],1),e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.takeProfit"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:1e3,step:.5,precision:2,size:"small"},model:{value:t.takeProfitPct,callback:function(e){t.takeProfitPct=e},expression:"takeProfitPct"}})],1)],1),e("a-row",{staticStyle:{"margin-top":"8px"},attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.entryPct"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:100,step:5,precision:2,size:"small"},model:{value:t.entryPct,callback:function(e){t.entryPct=e},expression:"entryPct"}})],1),e("a-col",{attrs:{span:12}},[e("a-checkbox",{staticStyle:{"margin-top":"18px"},model:{value:t.trailingEnabled,callback:function(e){t.trailingEnabled=e},expression:"trailingEnabled"}},[t._v(t._s(t.$t("backtest-center.config.trailing")))])],1)],1),t.trailingEnabled?[e("a-row",{staticStyle:{"margin-top":"8px"},attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.trailingPct"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:100,step:.5,precision:2,size:"small"},model:{value:t.trailingStopPct,callback:function(e){t.trailingStopPct=e},expression:"trailingStopPct"}})],1),e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.trailingActivation"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:1e3,step:.5,precision:2,size:"small"},model:{value:t.trailingActivationPct,callback:function(e){t.trailingActivationPct=e},expression:"trailingActivationPct"}})],1)],1)]:t._e()],2),e("div",{staticClass:"run-section"},[e("a-button",{attrs:{type:"primary",block:"",size:"large",loading:t.running,disabled:!t.canRunIndicator},on:{click:t.runIndicatorBacktest}},[t.running?t._e():e("a-icon",{attrs:{type:"thunderbolt"}}),t._v(" "+t._s(t.running?t.$t("backtest-center.running"):t.$t("backtest-center.indicator.runBacktest"))+" ")],1),e("a-button",{staticStyle:{"margin-top":"8px"},attrs:{block:"",disabled:!t.selectedIndicatorId},on:{click:function(e){return t.openHistory("indicator")}}},[e("a-icon",{attrs:{type:"history"}}),t._v(" "+t._s(t.$t("backtest-center.indicator.history"))+" ")],1)],1)])]),e("a-col",{staticClass:"result-col",attrs:{xs:24,md:15,lg:16}},[e("div",{staticClass:"result-panel"},[e("result-view",{attrs:{running:t.running,"run-tip":t.runTip,"has-result":t.hasResult,result:t.result,"user-id":t.userId,backtestRunId:t.backtestRunId,symbol:t.symbol,market:t.market,timeframe:t.timeframe,"is-dark":t.isDarkTheme}})],1)])],1)],1),e("a-tab-pane",{key:"strategy",attrs:{tab:t.$t("backtest-center.tabs.strategy")}},[e("a-row",{staticClass:"workspace",attrs:{gutter:20}},[e("a-col",{staticClass:"config-col",attrs:{xs:24,md:9,lg:8}},[e("div",{staticClass:"config-panel"},[e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.strategy.selectStrategy")))]),e("a-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("backtest-center.strategy.selectStrategyPlaceholder"),loading:t.loadingStrategies,"allow-clear":"","show-search":"","option-filter-prop":"children"},on:{change:t.onStrategyChange},model:{value:t.selectedStrategyId,callback:function(e){t.selectedStrategyId=e},expression:"selectedStrategyId"}},t._l(t.strategies,function(a){return e("a-select-option",{key:a.id,attrs:{value:a.id}},[t._v(t._s(a.strategy_name||"Strategy #"+a.id))])}),1),t.selectedStrategyObj?e("div",{staticClass:"strategy-summary-card"},[e("div",{staticClass:"strategy-summary-head"},[e("div",{staticClass:"strategy-summary-title"},[t._v(t._s(t.selectedStrategyObj.strategy_name||"Strategy #"+t.selectedStrategyObj.id))]),e("a-tag",{attrs:{size:"small",color:t.strategyTypeColor(t.selectedStrategyObj)}},[t._v(t._s(t.strategyTypeLabel(t.selectedStrategyObj)))])],1),e("div",{staticClass:"strategy-summary-meta"},[t.selectedStrategyObj.market_category?e("a-tag",{attrs:{size:"small"}},[t._v(t._s(t.selectedStrategyObj.market_category))]):t._e(),t.selectedStrategyObj.symbol?e("a-tag",{attrs:{size:"small"}},[t._v(t._s(t.selectedStrategyObj.symbol))]):t._e(),t.selectedStrategyObj.timeframe?e("a-tag",{attrs:{size:"small"}},[t._v(t._s(t.selectedStrategyObj.timeframe))]):t._e()],1),e("div",{staticClass:"strategy-summary-text"},[t._v(t._s(t.strategySummaryText(t.selectedStrategyObj)))]),e("a-button",{staticStyle:{"padding-left":"0"},attrs:{type:"link",size:"small"},on:{click:function(e){return t.goToStrategyEditor(t.selectedStrategyObj)}}},[t._v(" "+t._s(t.$t("backtest-center.strategy.goToAssistant"))+" ")])],1):t._e()],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.config.symbol")))]),e("a-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("backtest-center.config.watchlistPlaceholder"),"show-search":"","allow-clear":"","filter-option":t.filterWatchlistOption},on:{change:t.handleStWatchlistChange},model:{value:t.stSelectedWatchlistKey,callback:function(e){t.stSelectedWatchlistKey=e},expression:"stSelectedWatchlistKey"}},[t._l(t.watchlist,function(a){return e("a-select-option",{key:"".concat(a.market,":").concat(a.symbol),attrs:{value:"".concat(a.market,":").concat(a.symbol)}},[e("a-tag",{attrs:{color:t.getMarketColor(a.market),size:"small"}},[t._v(t._s(a.market))]),e("strong",{staticStyle:{"margin-left":"4px"}},[t._v(t._s(a.symbol))]),a.name?e("span",{staticStyle:{color:"#999","margin-left":"4px","font-size":"12px"}},[t._v(t._s(a.name))]):t._e()],1)}),e("a-select-option",{key:"__add__",staticClass:"add-option",attrs:{value:"__add__"}},[e("div",{staticStyle:{"text-align":"center",color:"#1890ff"}},[e("a-icon",{attrs:{type:"plus"}}),t._v(" "+t._s(t.$t("backtest-center.config.addSymbol"))+" ")],1)])],2)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(" "+t._s(t.$t("backtest-center.config.timeframe"))+" "),e("span",{staticClass:"hint"},[t._v(t._s(t.stTfLimitHint))])]),e("a-radio-group",{staticClass:"tf-group",attrs:{"button-style":"solid",size:"small"},on:{change:t.onStTimeframeChange},model:{value:t.stTimeframe,callback:function(e){t.stTimeframe=e},expression:"stTimeframe"}},[e("a-radio-button",{attrs:{value:"1m"}},[t._v("1m")]),e("a-radio-button",{attrs:{value:"5m"}},[t._v("5m")]),e("a-radio-button",{attrs:{value:"15m"}},[t._v("15m")]),e("a-radio-button",{attrs:{value:"1H"}},[t._v("1H")]),e("a-radio-button",{attrs:{value:"4H"}},[t._v("4H")]),e("a-radio-button",{attrs:{value:"1D"}},[t._v("1D")]),e("a-radio-button",{attrs:{value:"1W"}},[t._v("1W")])],1)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.config.dateRange")))]),e("div",{staticClass:"date-presets"},t._l(t.stFilteredDatePresets,function(a){return e("a-button",{key:"st-"+a.key,attrs:{size:"small",type:t.stDatePreset===a.key?"primary":"default"},on:{click:function(e){return t.applyStDatePreset(a)}}},[t._v(t._s(a.label))])}),1),e("a-row",{staticStyle:{"margin-top":"8px"},attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("a-date-picker",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("backtest-center.config.startDate"),size:"small"},model:{value:t.stStartDate,callback:function(e){t.stStartDate=e},expression:"stStartDate"}})],1),e("a-col",{attrs:{span:12}},[e("a-date-picker",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("backtest-center.config.endDate"),size:"small"},model:{value:t.stEndDate,callback:function(e){t.stEndDate=e},expression:"stEndDate"}})],1)],1)],1),e("div",{staticClass:"section"},[e("div",{staticClass:"section-title"},[t._v(t._s(t.$t("backtest-center.config.capital")))]),e("a-row",{attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.initialCapital")))]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:1e3,step:1e4,precision:2,size:"small",formatter:function(t){return"$ ".concat(t).replace(/\B(?=(\d{3})+(?!\d))/g,",")},parser:function(t){return t.replace(/\$\s?|(,*)/g,"")}},model:{value:t.stInitialCapital,callback:function(e){t.stInitialCapital=e},expression:"stInitialCapital"}})],1),e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.leverage")))]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:1,max:125,step:1,precision:0,size:"small",formatter:function(t){return"".concat(t,"x")},parser:function(t){return t.replace("x","")}},model:{value:t.stLeverage,callback:function(e){t.stLeverage=e},expression:"stLeverage"}})],1)],1),e("a-row",{staticStyle:{"margin-top":"8px"},attrs:{gutter:8}},[e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.commission"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:10,step:.01,precision:4,size:"small"},model:{value:t.stCommission,callback:function(e){t.stCommission=e},expression:"stCommission"}})],1),e("a-col",{attrs:{span:12}},[e("div",{staticClass:"field-label"},[t._v(t._s(t.$t("backtest-center.config.slippage"))+" (%)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:10,step:.01,precision:4,size:"small"},model:{value:t.stSlippage,callback:function(e){t.stSlippage=e},expression:"stSlippage"}})],1)],1)],1),e("div",{staticClass:"run-section"},[e("a-button",{attrs:{type:"primary",block:"",size:"large",loading:t.stRunning,disabled:!t.canRunStrategy},on:{click:t.runStrategyBacktest}},[t.stRunning?t._e():e("a-icon",{attrs:{type:"thunderbolt"}}),t._v(" "+t._s(t.stRunning?t.$t("backtest-center.strategy.running"):t.$t("backtest-center.strategy.runBacktest"))+" ")],1),e("a-button",{staticStyle:{"margin-top":"8px"},attrs:{block:"",disabled:!t.selectedStrategyId},on:{click:function(e){return t.openHistory("strategy")}}},[e("a-icon",{attrs:{type:"history"}}),t._v(" "+t._s(t.$t("backtest-center.strategy.history"))+" ")],1)],1)])]),e("a-col",{staticClass:"result-col",attrs:{xs:24,md:15,lg:16}},[e("div",{staticClass:"result-panel"},[e("result-view",{attrs:{running:t.stRunning,"run-tip":t.stRunTip,"has-result":t.stHasResult,result:t.stResult,"user-id":t.userId,backtestRunId:t.stBacktestRunId,symbol:t.stSymbol,market:t.stMarket,timeframe:t.stTimeframe,"is-dark":t.isDarkTheme}})],1)])],1)],1)],1),e("a-modal",{attrs:{title:t.$t("dashboard.analysis.modal.addStock.title"),visible:t.showAddModal,confirmLoading:t.addingStock,width:"560px","wrap-class-name":t.isDarkTheme?"bc-modal-wrap bc-modal-wrap--dark":"bc-modal-wrap"},on:{ok:t.handleAddStock,cancel:function(e){t.showAddModal=!1}}},[e("a-tabs",{attrs:{size:"small"},on:{change:t.onAddMarketTabChange},model:{value:t.addMarketTab,callback:function(e){t.addMarketTab=e},expression:"addMarketTab"}},[e("a-tab-pane",{key:"Crypto",attrs:{tab:"Crypto"}}),e("a-tab-pane",{key:"USStock",attrs:{tab:"US Stock"}}),e("a-tab-pane",{key:"HKStock",attrs:{tab:"HK Stock"}}),e("a-tab-pane",{key:"Forex",attrs:{tab:"Forex"}}),e("a-tab-pane",{key:"Futures",attrs:{tab:"Futures"}})],1),e("a-input-search",{staticStyle:{margin:"12px 0"},attrs:{placeholder:t.$t("backtest-center.config.symbolPlaceholder"),loading:t.addSearching,size:"large","allow-clear":""},on:{search:t.doAddSearch,change:t.onAddSearchInput},model:{value:t.addSearchKeyword,callback:function(e){t.addSearchKeyword=e},expression:"addSearchKeyword"}}),t.addSearchResults.length>0?e("a-list",{staticStyle:{"max-height":"240px","overflow-y":"auto"},attrs:{size:"small","data-source":t.addSearchResults},scopedSlots:t._u([{key:"renderItem",fn:function(a){return e("a-list-item",{class:{"add-item-active":t.addSelectedItem&&t.addSelectedItem.symbol===a.symbol},staticStyle:{cursor:"pointer"},on:{click:function(e){t.addSelectedItem=a}}},[e("strong",[t._v(t._s(a.symbol))]),a.name?e("span",{staticStyle:{color:"#999","margin-left":"8px"}},[t._v(t._s(a.name))]):t._e(),t.addSelectedItem&&t.addSelectedItem.symbol===a.symbol?e("a-icon",{staticStyle:{color:"#52c41a","margin-left":"auto"},attrs:{type:"check-circle",theme:"filled"}}):t._e()],1)}}],null,!1,2355352582)}):t._e(),0===t.addSearchResults.length&&t.addSearchKeyword&&t.addSearched?e("div",{staticStyle:{padding:"16px 0","text-align":"center",color:"#999"}},[t._v(" "+t._s(t.$t("backtest-center.config.noSearchResult"))+" ")]):t._e()],1),e("backtest-history-drawer",{attrs:{visible:t.showHistoryDrawer,userId:t.userId,indicatorId:t.historyIndicatorId,strategyId:t.historyStrategyId,runType:t.historyRunType,isMobile:!1},on:{cancel:function(e){t.showHistoryDrawer=!1},view:t.handleViewRun}}),e("backtest-run-viewer",{attrs:{visible:t.showRunViewer,run:t.selectedRun},on:{cancel:function(e){t.showRunViewer=!1,t.selectedRun=null}}})],1)},i=[],r=a(15863),n=a(76338),o=a(81127),c=a(56252),l=a(57532),d=(a(74423),a(95093)),u=a.n(d),h=a(29362),m=a(55434),p=a(75769),g=a(505),b=a(35038),y=a(36911),f=function(){var t=this,e=t._self._c;return e("a-drawer",{staticClass:"backtest-history-drawer",attrs:{title:t.$t("dashboard.indicator.backtest.historyTitle"),visible:t.visible,width:t.isMobile?"100%":1060,maskClosable:!0},on:{close:function(e){return t.$emit("cancel")}}},[e("div",{staticClass:"drawer-toolbar"},[e("div",{staticClass:"toolbar-left"},[e("a-button",{attrs:{type:"primary",loading:t.loading,icon:"reload",size:"small"},on:{click:t.loadRuns}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyRefresh"))+" ")]),e("a-button",{attrs:{type:"primary",ghost:"",size:"small",disabled:0===t.selectedRowKeys.length,loading:t.analyzing},on:{click:t.handleAIAnalyze}},[e("a-icon",{attrs:{type:"bulb"}}),t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyAISuggest"))+" ")],1),t.selectedRowKeys.length?e("span",{staticClass:"selected-tip"},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historySelectedCount",{count:t.selectedRowKeys.length}))+" ")]):t._e()],1),e("div",{staticClass:"toolbar-right"},[e("a-input",{staticStyle:{width:"160px"},attrs:{size:"small","allow-clear":"",placeholder:t.$t("dashboard.indicator.backtest.historyFilterSymbol")},on:{change:t.debouncedLoad},model:{value:t.filterSymbol,callback:function(e){t.filterSymbol=e},expression:"filterSymbol"}}),e("a-select",{staticStyle:{width:"100px"},attrs:{size:"small",placeholder:t.$t("dashboard.indicator.backtest.historyFilterTimeframe"),"allow-clear":""},on:{change:t.loadRuns},model:{value:t.filterTimeframe,callback:function(e){t.filterTimeframe=e},expression:"filterTimeframe"}},t._l(t.timeframes,function(a){return e("a-select-option",{key:a,attrs:{value:a}},[t._v(t._s(a))])}),1)],1)]),e("a-table",{attrs:{columns:t.columns,"data-source":t.runs,loading:t.loading,size:"small",pagination:{pageSize:15,size:"small"},rowKey:"id",scroll:{x:1e3},rowSelection:{selectedRowKeys:t.selectedRowKeys,onChange:t.onRowSelectionChange}},scopedSlots:t._u([{key:"symbol",fn:function(a,s){return[e("span",{staticStyle:{"font-weight":"600"}},[t._v(t._s(s.symbol||"-"))]),s.market?e("a-tag",{staticStyle:{"margin-left":"4px"},attrs:{size:"small"}},[t._v(t._s(s.market))]):t._e()]}},{key:"range",fn:function(a,s){return[e("span",[t._v(t._s((s.start_date||"").slice(0,10))+" ~ "+t._s((s.end_date||"").slice(0,10)))])]}},{key:"returnPct",fn:function(a){return[null!==a&&void 0!==a?e("span",{style:{color:a>=0?"#52c41a":"#f5222d",fontWeight:600}},[t._v(" "+t._s(a>=0?"+":"")+t._s(Number(a).toFixed(2))+"% ")]):e("span",[t._v("-")])]}},{key:"createdAt",fn:function(a){return[e("span",[t._v(t._s(t.formatLocalDateTime(a)))])]}},{key:"status",fn:function(a){return[e("a-tag",{attrs:{color:"success"===a?"green":"failed"===a?"red":"blue"}},[t._v(" "+t._s("success"===a?t.$t("dashboard.indicator.backtest.historyStatusSuccess"):"failed"===a?t.$t("dashboard.indicator.backtest.historyStatusFailed"):a)+" ")])]}},{key:"actions",fn:function(a,s){return[e("a-button",{attrs:{type:"link",size:"small",loading:t.detailLoadingId===s.id},on:{click:function(e){return t.viewRun(s)}}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyView"))+" ")]),e("a-button",{attrs:{type:"link",size:"small",loading:t.analyzingRunId===s.id},on:{click:function(e){return t.handleAIAnalyze(s)}}},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyAISuggestShort"))+" ")])]}}])}),t.loading||0!==t.runs.length?t._e():e("a-empty",{attrs:{description:t.$t("dashboard.indicator.backtest.historyNoData")}}),e("a-modal",{attrs:{title:t.$t("dashboard.indicator.backtest.historyAISuggestTitle"),visible:t.showAIResult,footer:null,width:t.isMobile?"100%":900},on:{cancel:function(e){t.showAIResult=!1}}},[t.analyzing?e("div",{staticStyle:{padding:"24px 0","text-align":"center"}},[e("a-spin",{attrs:{size:"large"}}),e("div",{staticStyle:{"margin-top":"12px",color:"#999"}},[t._v(t._s(t.$t("dashboard.indicator.backtest.historyAISuggestLoading")))])],1):e("div",{staticClass:"ai-modal-content"},[e("div",{staticClass:"ai-meta-card"},[e("div",{staticClass:"ai-meta-top"},[e("div",{staticClass:"ai-meta-left"},[e("a-tag",{attrs:{color:"blue"}},[t._v(t._s(t.$t("dashboard.indicator.backtest.historyAISuggest")))]),e("a-tag",[t._v(t._s(t.aiModeLabel))]),t.lastAnalyzeRunIds.length?e("a-tag",[t._v(t._s(t.$t("dashboard.indicator.backtest.historySelectedCount",{count:t.lastAnalyzeRunIds.length})))]):t._e()],1),e("div",{staticClass:"ai-meta-actions"},[e("a-button",{attrs:{size:"small"},on:{click:t.copyAIResult}},[e("a-icon",{attrs:{type:"copy"}}),t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyAICopy"))+" ")],1),e("a-button",{attrs:{size:"small",type:"primary",ghost:"",disabled:!t.lastAnalyzeRunIds.length},on:{click:function(e){return t.handleAIAnalyze(null,t.lastAnalyzeRunIds)}}},[e("a-icon",{attrs:{type:"redo"}}),t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyAIRetry"))+" ")],1)],1)]),t.analyzeRunSummaries.length?e("div",{staticClass:"ai-run-tags"},t._l(t.analyzeRunSummaries,function(a){return e("a-tag",{key:a.id,attrs:{color:"purple"}},[t._v(" #"+t._s(a.id)+" "+t._s(a.symbol||"-")+" / "+t._s(a.timeframe||"-")+" ")])}),1):t._e(),e("a-alert",{staticStyle:{"margin-top":"12px"},attrs:{type:"info","show-icon":"",message:t.$t("dashboard.indicator.backtest.historyAIHint")}})],1),t.aiResult?e("div",{staticClass:"ai-markdown-card"},[e("div",{staticClass:"ai-markdown-content",domProps:{innerHTML:t._s(t.renderedAIHtml)}})]):e("div",{staticClass:"ai-result-content"},[t._v(" "+t._s(t.$t("dashboard.indicator.backtest.historyNoAIResult"))+" ")])])])],1)},v=[],k=a(2403),_={name:"BacktestHistoryDrawer",props:{visible:{type:Boolean,default:!1},userId:{type:[Number,String],default:1},indicatorId:{type:[Number,String],default:null},strategyId:{type:[Number,String],default:null},runType:{type:String,default:""},symbol:{type:String,default:""},market:{type:String,default:""},timeframe:{type:String,default:""},isMobile:{type:Boolean,default:!1}},data:function(){return{loading:!1,detailLoadingId:null,analyzing:!1,showAIResult:!1,aiResult:"",filterSymbol:"",filterTimeframe:void 0,timeframes:["1m","5m","15m","30m","1H","4H","1D","1W"],runs:[],columns:[],selectedRowKeys:[],debounceTimer:null,analyzingRunId:null,lastAnalyzeRunIds:[],aiMode:""}},computed:{isStrategyHistory:function(){return!!this.strategyId||0===String(this.runType||"").indexOf("strategy_")},aiModeLabel:function(){return"llm"===this.aiMode?this.$t("dashboard.indicator.backtest.historyAIModeLLM"):"heuristic"===this.aiMode||"heuristic_fallback"===this.aiMode?this.$t("dashboard.indicator.backtest.historyAIModeRule"):this.$t("dashboard.indicator.backtest.historyAIModeUnknown")},analyzeRunSummaries:function(){var t=new Set((this.lastAnalyzeRunIds||[]).map(function(t){return Number(t)}));return(this.runs||[]).filter(function(e){return t.has(Number(e.id))}).slice(0,8)},renderedAIHtml:function(){return this.markdownToHtml(this.aiResult||"")}},watch:{visible:function(t){t&&(this.initColumns(),this.filterSymbol="",this.filterTimeframe=void 0,this.selectedRowKeys=[],this.aiResult="",this.aiMode="",this.lastAnalyzeRunIds=[],this.showAIResult=!1,this.loadRuns())}},methods:{onRowSelectionChange:function(t){this.selectedRowKeys=t||[]},debouncedLoad:function(){var t=this;clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(function(){return t.loadRuns()},400)},initColumns:function(){var t=[{title:"#",dataIndex:"id",key:"id",width:60}].concat((0,k.A)(this.isStrategyHistory?[{title:this.$t("backtest-center.strategy.selectStrategy")||"Strategy",dataIndex:"strategy_name",key:"strategy_name",width:180}]:[]),[{title:this.$t("dashboard.indicator.backtest.historySymbol")||"Symbol",key:"symbol",width:150,scopedSlots:{customRender:"symbol"}},{title:this.$t("dashboard.indicator.backtest.timeframe")||"TF",dataIndex:"timeframe",key:"timeframe",width:70},{title:this.$t("dashboard.indicator.backtest.historyRange"),key:"range",width:180,scopedSlots:{customRender:"range"}},{title:this.$t("dashboard.indicator.backtest.tradeDirection"),dataIndex:"trade_direction",key:"trade_direction",width:80},{title:this.$t("dashboard.indicator.backtest.leverage"),dataIndex:"leverage",key:"leverage",width:60},{title:this.$t("dashboard.indicator.backtest.totalReturn")||"Return",dataIndex:"total_return",key:"total_return",width:100,scopedSlots:{customRender:"returnPct"}},{title:this.$t("dashboard.indicator.backtest.historyStatus"),dataIndex:"status",key:"status",width:80,scopedSlots:{customRender:"status"}},{title:this.$t("dashboard.indicator.backtest.historyCreatedAt"),dataIndex:"created_at",key:"created_at",width:180,scopedSlots:{customRender:"createdAt"}},{title:"",key:"actions",width:180,scopedSlots:{customRender:"actions"}}]);this.columns=t},formatLocalDateTime:function(t){if(!t)return"-";var e=new Date(t);return Number.isNaN(e.getTime())?String(t):e.toLocaleString()},copyAIResult:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.aiResult){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,navigator.clipboard.writeText(t.aiResult);case 2:t.$message.success(t.$t("dashboard.indicator.backtest.historyAICopySuccess")),e.n=4;break;case 3:e.p=3,e.v,t.$message.warning(t.$t("dashboard.indicator.backtest.historyAICopyFailed"));case 4:return e.a(2)}},e,null,[[1,3]])}))()},escapeHtml:function(t){return String(t||"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},formatInlineMarkdown:function(t){var e=this.escapeHtml(t);return e=e.replace(/`([^`]+)`/g,"$1"),e=e.replace(/\*\*([^*]+)\*\*/g,"$1"),e=e.replace(/__([^_]+)__/g,"$1"),e=e.replace(/\*([^*]+)\*/g,"$1"),e=e.replace(/_([^_]+)_/g,"$1"),e},markdownToHtml:function(t){var e=String(t||"").replace(/\r\n/g,"\n").trim();if(!e)return"";var a,s=e.split("\n"),i=[],r=!1,n=!1,o=!1,c=[],d=function(){r&&(i.push(""),r=!1),n&&(i.push("
"),n=!1)},u=(0,l.A)(s);try{for(u.s();!(a=u.n()).done;){var h=a.value,m=h.trimRight(),p=m.trim();p.startsWith("```")?(d(),o?(i.push("
".concat(this.escapeHtml(c.join("\n")),"
")),o=!1,c=[]):(o=!0,c=[])):o?c.push(h):p?/^###\s+/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^###\s+/,"")),"

"))):/^##\s+/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^##\s+/,"")),"

"))):/^#\s+/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^#\s+/,"")),"

"))):/^【.+】$/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^【|】$/g,"")),"

"))):/^>\s+/.test(p)?(d(),i.push("
".concat(this.formatInlineMarkdown(p.replace(/^>\s+/,"")),"
"))):/^[-*]\s+/.test(p)?(n&&(i.push(""),n=!1),r||(i.push(""),r=!1),n||(i.push("
    "),n=!0),i.push("
  1. ".concat(this.formatInlineMarkdown(p.replace(/^\d+\.\s+/,"")),"
  2. "))):(d(),i.push("

    ".concat(this.formatInlineMarkdown(p),"

    "))):d()}}catch(g){u.e(g)}finally{u.f()}return d(),o&&i.push("
    ".concat(this.escapeHtml(c.join("\n")),"
    ")),i.join("")},loadRuns:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a,s;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.userId){e.n=1;break}return e.a(2);case 1:return t.loading=!0,e.p=2,a={userid:t.userId,limit:200,offset:0},t.indicatorId&&(a.indicatorId=t.indicatorId),t.strategyId&&(a.strategyId=t.strategyId),t.runType&&(a.runType=t.runType),t.filterSymbol&&(a.symbol=t.filterSymbol),t.filterTimeframe&&(a.timeframe=t.filterTimeframe),e.n=3,(0,p.Ay)({url:t.isStrategyHistory?"/api/strategies/backtest/history":"/api/indicator/backtest/history",method:"get",params:a});case 3:s=e.v,s&&1===s.code&&Array.isArray(s.data)?t.runs=s.data:t.runs=[];case 4:return e.p=4,t.loading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[2,,4,5]])}))()},viewRun:function(t){var e=this;return(0,c.A)((0,o.A)().m(function a(){var s;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:if(t&&t.id){a.n=1;break}return a.a(2);case 1:return e.detailLoadingId=t.id,a.p=2,a.n=3,(0,p.Ay)({url:e.isStrategyHistory?"/api/strategies/backtest/get":"/api/indicator/backtest/get",method:"get",params:{userid:e.userId,runId:t.id}});case 3:s=a.v,s&&1===s.code&&s.data&&e.$emit("view",s.data);case 4:return a.p=4,e.detailLoadingId=null,a.f(4);case 5:return a.a(2)}},a,null,[[2,,4,5]])}))()},handleAIAnalyze:function(){var t=arguments,e=this;return(0,c.A)((0,o.A)().m(function a(){var s,i,r,n,c,l;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:if(s=t.length>0&&void 0!==t[0]?t[0]:null,i=t.length>1&&void 0!==t[1]?t[1]:null,r=i||(s&&s.id?[s.id]:e.selectedRowKeys),e.userId){a.n=1;break}return a.a(2);case 1:if(r&&r.length){a.n=2;break}return e.$message.warning(e.$t("dashboard.indicator.backtest.historyAISelectPrompt")),a.a(2);case 2:return e.analyzing=!0,e.analyzingRunId=s&&s.id?s.id:null,e.lastAnalyzeRunIds=(0,k.A)(r),e.showAIResult=!0,e.aiResult="",e.aiMode="",a.p=3,n=e.$i18n&&e.$i18n.locale?e.$i18n.locale:"zh-CN",a.n=4,(0,p.Ay)({url:"/api/indicator/backtest/aiAnalyze",method:"post",timeout:p.v0,data:{userid:e.userId,runIds:r,lang:n}});case 4:c=a.v,c&&1===c.code&&c.data&&c.data.analysis?(e.aiResult=c.data.analysis,e.aiMode=c.data.mode||""):e.aiResult=c.msg||e.$t("dashboard.indicator.backtest.historyNoAIResult"),a.n=6;break;case 5:a.p=5,l=a.v,e.aiResult=l&&l.message||e.$t("dashboard.indicator.backtest.historyAIFailed");case 6:return a.p=6,e.analyzing=!1,e.analyzingRunId=null,a.f(6);case 7:return a.a(2)}},a,null,[[3,5,6,7]])}))()}}},S=_,w=a(845),I=(0,w.A)(S,f,v,!1,null,"2a402d06",null),$=I.exports,C=function(){var t,e,a,s=this,i=s._self._c;return i("a-modal",{staticClass:"backtest-run-viewer",attrs:{title:s.modalTitle,visible:s.visible,width:1100,maskClosable:!1},on:{cancel:function(t){return s.$emit("cancel")}}},[s.run&&s.run.result?i("div",[s.run.id?i("a-alert",{staticStyle:{"margin-bottom":"12px"},attrs:{type:"info","show-icon":"",message:s.$t("dashboard.indicator.backtest.savedRunId",{id:s.run.id})}}):s._e(),i("div",{staticClass:"metrics-cards"},[i("div",{staticClass:"metric-card",class:{positive:s.result.totalReturn>0,negative:s.result.totalReturn<0}},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.totalReturn")))]),i("div",{staticClass:"metric-value"},[s._v(s._s(s.formatPercent(s.result.totalReturn)))]),i("div",{staticClass:"metric-amount"},[s._v(s._s(s.formatMoney(s.result.totalProfit)))])]),i("div",{staticClass:"metric-card",class:{positive:s.result.annualReturn>0,negative:s.result.annualReturn<0}},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.annualReturn")))]),i("div",{staticClass:"metric-value"},[s._v(s._s(s.formatPercent(s.result.annualReturn)))])]),i("div",{staticClass:"metric-card negative"},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.maxDrawdown")))]),i("div",{staticClass:"metric-value"},[s._v(s._s(s.formatPercent(s.result.maxDrawdown)))])]),i("div",{staticClass:"metric-card"},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.sharpeRatio")))]),i("div",{staticClass:"metric-value"},[s._v(s._s((null!==(t=s.result.sharpeRatio)&&void 0!==t?t:0).toFixed(2)))])]),i("div",{staticClass:"metric-card"},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.winRate")))]),i("div",{staticClass:"metric-value"},[s._v(s._s(s.formatPercent(s.result.winRate)))])]),i("div",{staticClass:"metric-card",class:{positive:s.result.profitFactor>=1.5,negative:s.result.profitFactor<1}},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.profitFactor")))]),i("div",{staticClass:"metric-value"},[s._v(s._s((null!==(e=s.result.profitFactor)&&void 0!==e?e:0).toFixed(2)))])]),i("div",{staticClass:"metric-card"},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.totalTrades")))]),i("div",{staticClass:"metric-value"},[s._v(s._s(null!==(a=s.result.totalTrades)&&void 0!==a?a:0))])]),i("div",{staticClass:"metric-card negative"},[i("div",{staticClass:"metric-label"},[s._v(s._s(s.$t("dashboard.indicator.backtest.totalCommission")))]),i("div",{staticClass:"metric-value"},[s._v("-$"+s._s(s.result.totalCommission?s.result.totalCommission.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"0.00"))])])]),i("div",{staticClass:"chart-section"},[i("div",{staticClass:"chart-title"},[s._v(s._s(s.$t("dashboard.indicator.backtest.equityCurve")))]),i("div",{ref:"equityChartRef",staticClass:"equity-chart"})]),i("div",{staticClass:"trades-section"},[i("div",{staticClass:"chart-title"},[s._v(s._s(s.$t("dashboard.indicator.backtest.tradeHistory")))]),i("a-table",{attrs:{columns:s.tradeColumns,"data-source":s.result.trades||[],pagination:{pageSize:10,size:"small"},size:"small",scroll:{x:800},rowKey:s.rowKey},scopedSlots:s._u([{key:"type",fn:function(t){return[i("a-tag",{attrs:{color:s.getTradeTypeColor(t)}},[s._v(" "+s._s(s.getTradeTypeText(t))+" ")])]}},{key:"balance",fn:function(t){return[i("span",{staticStyle:{color:"#1890ff","font-weight":"500"}},[s._v(" $"+s._s(t?t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"--")+" ")])]}},{key:"profit",fn:function(t){return[i("span",{style:{color:t>0?"#52c41a":t<0?"#f5222d":"#666"}},[s._v(" "+s._s(s.formatMoney(t))+" ")])]}}])})],1)],1):i("div",{staticStyle:{padding:"12px 0"}},[i("a-empty",{attrs:{description:s.$t("dashboard.indicator.backtest.historyNoData")}})],1),i("template",{slot:"footer"},[i("a-button",{on:{click:function(t){return s.$emit("cancel")}}},[s._v(s._s(s.$t("dashboard.indicator.backtest.close")))])],1)],2)},R=[],x={name:"BacktestRunViewer",props:{visible:{type:Boolean,default:!1},run:{type:Object,default:null}},data:function(){return{equityChart:null,tradeColumns:[]}},computed:{result:function(){return this.run&&this.run.result?this.run.result:{}},modalTitle:function(){var t=this.run&&this.run.id?"#".concat(this.run.id):"";return"".concat(this.$t("dashboard.indicator.backtest.historyTitle")," ").concat(t).trim()}},watch:{visible:function(t){var e=this;t?this.$nextTick(function(){e.initColumns(),e.renderEquityChart()}):this.equityChart&&(this.equityChart.dispose(),this.equityChart=null)}},methods:{rowKey:function(t,e){return e},initColumns:function(){this.tradeColumns.length||(this.tradeColumns=[{title:this.$t("dashboard.indicator.backtest.tradeTime"),dataIndex:"time",key:"time",width:160},{title:this.$t("dashboard.indicator.backtest.tradeType"),dataIndex:"type",key:"type",width:150,scopedSlots:{customRender:"type"}},{title:this.$t("dashboard.indicator.backtest.price"),dataIndex:"price",key:"price",width:110},{title:this.$t("dashboard.indicator.backtest.amount"),dataIndex:"amount",key:"amount",width:100},{title:this.$t("dashboard.indicator.backtest.profit"),dataIndex:"profit",key:"profit",width:110,scopedSlots:{customRender:"profit"}},{title:this.$t("dashboard.indicator.backtest.balance"),dataIndex:"balance",key:"balance",width:120,scopedSlots:{customRender:"balance"}}])},getTradeTypeColor:function(t){var e={buy:"green",sell:"red",liquidation:"orange",open_long:"green",add_long:"cyan",close_long:"orange",close_long_stop:"red",close_long_profit:"lime",close_long_trailing:"gold",reduce_long:"volcano",open_short:"red",add_short:"magenta",close_short:"blue",close_short_stop:"red",close_short_profit:"cyan",close_short_trailing:"gold",reduce_short:"volcano"};return e[t]||"default"},getTradeTypeText:function(t){var e={open_long:this.$t("dashboard.indicator.backtest.openLong"),add_long:this.$t("dashboard.indicator.backtest.addLong"),close_long:this.$t("dashboard.indicator.backtest.closeLong"),close_long_stop:this.$t("dashboard.indicator.backtest.closeLongStop"),close_long_profit:this.$t("dashboard.indicator.backtest.closeLongProfit"),close_long_trailing:this.$t("dashboard.indicator.backtest.closeLongTrailing"),reduce_long:this.$t("dashboard.indicator.backtest.reduceLong"),open_short:this.$t("dashboard.indicator.backtest.openShort"),add_short:this.$t("dashboard.indicator.backtest.addShort"),close_short:this.$t("dashboard.indicator.backtest.closeShort"),close_short_stop:this.$t("dashboard.indicator.backtest.closeShortStop"),close_short_profit:this.$t("dashboard.indicator.backtest.closeShortProfit"),close_short_trailing:this.$t("dashboard.indicator.backtest.closeShortTrailing"),reduce_short:this.$t("dashboard.indicator.backtest.reduceShort"),liquidation:this.$t("dashboard.indicator.backtest.liquidation")};return e[t]||t},formatPercent:function(t){if(null===t||void 0===t)return"--";var e=t>=0?"+":"";return"".concat(e).concat(Number(t).toFixed(2),"%")},formatMoney:function(t){if(null===t||void 0===t)return"--";var e=t>=0?"+":"-";return"".concat(e,"$").concat(Math.abs(t).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}))},renderEquityChart:function(){var t=this;if(this.$refs.equityChartRef){this.equityChart&&this.equityChart.dispose(),this.equityChart=h.init(this.$refs.equityChartRef);var e=this.result.equityCurve||[],a=e.map(function(t){return t.time||t.date}),s=e.map(function(t){return void 0!==t.value?t.value:t.equity}),i=s[0]||1e5,r=s[s.length-1]||i,n=r>=i,o=n?"#52c41a":"#f5222d",c=n?[{offset:0,color:"rgba(82, 196, 26, 0.35)"},{offset:1,color:"rgba(82, 196, 26, 0.02)"}]:[{offset:0,color:"rgba(245, 34, 45, 0.35)"},{offset:1,color:"rgba(245, 34, 45, 0.02)"}],l={tooltip:{trigger:"axis"},grid:{left:"3%",right:"4%",bottom:"12%",top:"8%",containLabel:!0},xAxis:{type:"category",data:a,boundaryGap:!1},yAxis:{type:"value"},series:[{name:this.$t("dashboard.indicator.backtest.strategy"),type:"line",data:s,smooth:.4,symbol:"none",sampling:"lttb",lineStyle:{width:2.5,color:o},areaStyle:{color:new h.graphic.LinearGradient(0,0,0,1,c)}}]};this.equityChart.setOption(l),window.addEventListener("resize",function(){return t.equityChart&&t.equityChart.resize()})}}}},A=x,T=(0,w.A)(A,C,R,!1,null,"a484239a",null),D=T.exports,M={"1m":30,"5m":180,"15m":365,"30m":365,"1H":730,"4H":1460,"1D":3650,"1W":7300},z=[{key:"1m",label:"1M",days:30},{key:"3m",label:"3M",days:90},{key:"6m",label:"6M",days:180},{key:"1y",label:"1Y",days:365},{key:"2y",label:"2Y",days:730},{key:"5y",label:"5Y",days:1825}],P={name:"ResultView",props:{running:Boolean,runTip:String,hasResult:Boolean,result:Object,userId:[Number,String],backtestRunId:[Number,String],symbol:String,market:String,timeframe:String,isDark:Boolean},data:function(){return{chartInstance:null,elapsedSec:0,elapsedTimer:null,aiAnalyzing:!1,showAIResult:!1,aiResult:"",aiMode:""}},mounted:function(){this.running&&this._startElapsed()},computed:{aiModeLabel:function(){return"llm"===this.aiMode?this.$t("dashboard.indicator.backtest.historyAIModeLLM"):"heuristic"===this.aiMode||"heuristic_fallback"===this.aiMode?this.$t("dashboard.indicator.backtest.historyAIModeRule"):this.$t("dashboard.indicator.backtest.historyAIModeUnknown")},renderedAIHtml:function(){return this.markdownToHtml(this.aiResult||"")},pairedTrades:function(){for(var t=this.result&&this.result.trades||[],e=[],a=null,s=1,i=0;i=0?"+":"";return e+Number(t).toFixed(2)+"%"},fmtMoney:function(t){if(null==t||isNaN(t))return"$0.00";var e=Math.abs(t).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2});return(t>=0?"":"-")+"$"+e},fmtPrice:function(t){return null==t||isNaN(t)?"--":Number(t).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:4})},escapeHtml:function(t){return String(t||"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},formatInlineMarkdown:function(t){var e=this.escapeHtml(t);return e=e.replace(/`([^`]+)`/g,"$1"),e=e.replace(/\*\*([^*]+)\*\*/g,"$1"),e=e.replace(/__([^_]+)__/g,"$1"),e=e.replace(/\*([^*]+)\*/g,"$1"),e=e.replace(/_([^_]+)_/g,"$1"),e},markdownToHtml:function(t){var e=String(t||"").replace(/\r\n/g,"\n").trim();if(!e)return"";var a,s=e.split("\n"),i=[],r=!1,n=!1,o=!1,c=[],d=function(){r&&(i.push(""),r=!1),n&&(i.push("
"),n=!1)},u=(0,l.A)(s);try{for(u.s();!(a=u.n()).done;){var h=a.value,m=h.trimRight(),p=m.trim();p.startsWith("```")?(d(),o?(i.push("
".concat(this.escapeHtml(c.join("\n")),"
")),o=!1,c=[]):(o=!0,c=[])):o?c.push(h):p?/^###\s+/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^###\s+/,"")),"

"))):/^##\s+/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^##\s+/,"")),"

"))):/^#\s+/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^#\s+/,"")),"

"))):/^【.+】$/.test(p)?(d(),i.push("

".concat(this.formatInlineMarkdown(p.replace(/^【|】$/g,"")),"

"))):/^>\s+/.test(p)?(d(),i.push("
".concat(this.formatInlineMarkdown(p.replace(/^>\s+/,"")),"
"))):/^[-*]\s+/.test(p)?(n&&(i.push(""),n=!1),r||(i.push(""),r=!1),n||(i.push("
    "),n=!0),i.push("
  1. ".concat(this.formatInlineMarkdown(p.replace(/^\d+\.\s+/,"")),"
  2. "))):(d(),i.push("

    ".concat(this.formatInlineMarkdown(p),"

    "))):d()}}catch(g){u.e(g)}finally{u.f()}return d(),o&&i.push("
    ".concat(this.escapeHtml(c.join("\n")),"
    ")),i.join("")},copyAIResult:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.aiResult){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,navigator.clipboard.writeText(t.aiResult);case 2:t.$message.success(t.$t("dashboard.indicator.backtest.historyAICopySuccess")),e.n=4;break;case 3:e.p=3,e.v,t.$message.warning(t.$t("dashboard.indicator.backtest.historyAICopyFailed"));case 4:return e.a(2)}},e,null,[[1,3]])}))()},handleAIAnalyze:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a,s,i,r;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(a=t.backtestRunId,t.userId&&a){e.n=1;break}return t.$message.warning(t.$t("dashboard.indicator.backtest.historyAISelectPrompt")),e.a(2);case 1:return t.aiAnalyzing=!0,t.showAIResult=!0,t.aiResult="",t.aiMode="",e.p=2,s=t.$i18n&&t.$i18n.locale?t.$i18n.locale:"zh-CN",e.n=3,(0,p.Ay)({url:"/api/indicator/backtest/aiAnalyze",method:"post",timeout:p.v0,data:{userid:t.userId,runIds:[a],lang:s}});case 3:i=e.v,i&&1===i.code&&i.data&&i.data.analysis?(t.aiResult=i.data.analysis,t.aiMode=i.data.mode||""):t.aiResult=i&&i.msg||t.$t("dashboard.indicator.backtest.historyNoAIResult"),e.n=5;break;case 4:e.p=4,r=e.v,t.aiResult=r&&r.message||t.$t("dashboard.indicator.backtest.historyAIFailed");case 5:return e.p=5,t.aiAnalyzing=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},getCloseReason:function(t,e,a){if(t.includes("_stop"))return"stopLoss";if(t.includes("_profit"))return"takeProfit";if(t.includes("_trailing"))return"trailingStop";if("liquidation"===t)return"liquidation";if(("close_long"===t||"close_short"===t)&&a){var s=String(a.type||"").toLowerCase(),i=String(a.time||"")===String(e.time||"");if(i&&("open_long"===s||"open_short"===s))return"reverse"}return"signal"},reasonColor:function(t){return{stopLoss:"red",takeProfit:"green",trailingStop:"cyan",reverse:"orange",liquidation:"volcano",signal:"blue"}[t]||"default"},renderChart:function(){var t=this,e=this.result;if(e&&e.equityCurve&&e.equityCurve.length){var a=this.$refs.eqChart;if(a){this.chartInstance&&this.chartInstance.dispose(),this.chartInstance=h.init(a);var s=this.isDark,i=e.equityCurve,r=i.length>1&&(i[i.length-1].value||0)>=(i[0].value||0),n=r?"#52c41a":"#f5222d";this.chartInstance.setOption({backgroundColor:"transparent",tooltip:{trigger:"axis",backgroundColor:s?"#1f1f1f":"#fff",borderColor:s?"#434343":"#ddd",textStyle:{color:s?"rgba(255,255,255,0.85)":"#333",fontSize:12},formatter:function(t){var e=t[0];return'
    ').concat(e.name,'
    $').concat(Number(e.value).toLocaleString("en-US",{minimumFractionDigits:2}),"
    ")}},grid:{left:65,right:20,top:20,bottom:30},xAxis:{type:"category",data:i.map(function(t){return t.time||""}),axisLabel:{color:s?"rgba(255,255,255,0.35)":"#999",fontSize:10,rotate:0,interval:Math.floor(i.length/6)},axisLine:{lineStyle:{color:s?"#303030":"#e0e0e0"}},axisTick:{show:!1}},yAxis:{type:"value",axisLabel:{color:s?"rgba(255,255,255,0.35)":"#999",fontSize:11,formatter:function(t){return"$"+(t/1e3).toFixed(1)+"k"}},splitLine:{lineStyle:{color:s?"rgba(255,255,255,0.06)":"#f0f0f0",type:"dashed"}}},series:[{type:"line",data:i.map(function(t){return t.value||0}),smooth:.3,showSymbol:!1,lineStyle:{width:2,color:n},areaStyle:{color:new h.graphic.LinearGradient(0,0,0,1,[{offset:0,color:r?"rgba(82,196,26,0.2)":"rgba(245,34,45,0.2)"},{offset:1,color:"rgba(0,0,0,0)"}])}}]}),window.addEventListener("resize",function(){t.chartInstance&&t.chartInstance.resize()})}}}},render:function(t){var e=this,a=this.isDark;if(this.running){var s=[{key:"fetch",label:this.$t("backtest-center.tip.fetching"),icon:"cloud-download"},{key:"compute",label:this.$t("backtest-center.tip.computing"),icon:"calculator"},{key:"analyze",label:this.$t("backtest-center.tip.analyzing"),icon:"bar-chart"}],i=this.elapsedSec,r=i<4?0:i<10?1:2;return t("div",{class:"running-overlay"},[t("div",{class:"running-content"},[t("div",{class:"running-spinner"},[t("div",{class:"spinner-track"}),t("div",{class:"spinner-fill"})]),t("div",{class:"running-title"},this.$t("backtest-center.running")),t("div",{class:"running-elapsed"},this.fmtElapsed(i)),t("div",{class:"running-steps"},s.map(function(e,a){return t("div",{class:["step-item",a=0?"positive":"negative",sub:this.fmtMoney(n.totalProfit)},{label:"annualReturn",value:this.fmtPct(n.annualReturn),cls:(n.annualReturn||0)>=0?"positive":"negative"},{label:"maxDrawdown",value:this.fmtPct(n.maxDrawdown),cls:"negative"},{label:"sharpe",value:(n.sharpeRatio||0).toFixed(2),cls:(n.sharpeRatio||0)>=1?"positive":(n.sharpeRatio||0)<0?"negative":""},{label:"winRate",value:this.fmtPct(n.winRate),cls:(n.winRate||0)>=50?"positive":""},{label:"profitFactor",value:(n.profitFactor||0).toFixed(2),cls:(n.profitFactor||0)>=1.5?"positive":(n.profitFactor||0)<1?"negative":""},{label:"trades",value:String(n.totalTrades||0),cls:""},{label:"commission",value:this.fmtMoney(-(n.totalCommission||0)),cls:""}];return t("div",{class:"result-content"},[t("div",{class:"result-header"},[t("div",{class:"result-header-left"},[t("span",{class:"result-tag"},[t("a-tag",{props:{color:"blue"}},this.symbol),t("a-tag",{},this.market),t("a-tag",{},this.timeframe)]),this.backtestRunId?t("span",{class:"run-id"},"Run #"+this.backtestRunId):null]),t("div",{class:"result-header-actions"},[t("a-button",{props:{type:"primary",ghost:!0,size:"small",loading:this.aiAnalyzing,disabled:!this.backtestRunId},on:{click:this.handleAIAnalyze}},[t("a-icon",{props:{type:"bulb"},style:{color:a?"#177ddc":void 0}}),this.$t("dashboard.indicator.backtest.historyAISuggest")])])]),t("div",{class:"metrics-cards"},o.map(function(a){return t("div",{class:["metric-card",a.cls]},[t("div",{class:"metric-label"},e.$t("backtest-center.result."+a.label)),t("div",{class:"metric-value"},a.value),a.sub?t("div",{class:"metric-sub"},a.sub):null])})),t("div",{class:"chart-section"},[t("div",{class:"chart-title"},[t("a-icon",{props:{type:"area-chart"},style:{marginRight:"6px",color:a?"rgba(255,255,255,0.72)":"rgba(0,0,0,0.45)"}}),this.$t("backtest-center.result.equityCurve")]),t("div",{ref:"eqChart",class:"equity-chart"})]),t("div",{class:"trades-section"},[t("div",{class:"chart-title"},[t("a-icon",{props:{type:"swap"},style:{marginRight:"6px",color:a?"rgba(255,255,255,0.72)":"rgba(0,0,0,0.45)"}}),this.$t("backtest-center.result.tradeHistory"),t("span",{style:{fontWeight:400,fontSize:"12px",marginLeft:"8px",color:a?"rgba(255,255,255,0.45)":"#999"}},"(".concat(this.pairedTrades.length,")"))]),t("a-table",{props:{columns:this.tradeColumns,dataSource:this.pairedTrades,pagination:{pageSize:10,size:"small",showTotal:function(t){return"".concat(t," trades")}},size:"small",scroll:{x:980},rowKey:"id"},scopedSlots:{type:function(e){return t("a-tag",{props:{color:"long"===e?"green":"red"},style:"margin:0"},"long"===e?"LONG":"SHORT")},openAction:function(a){return t("a-tag",{props:{color:"openLong"===a?"green":"red"},style:"margin:0"},e.$t("backtest-center.result."+a))},closeReason:function(a){return t("a-tag",{props:{color:e.reasonColor(a)},style:"margin:0"},e.$t("backtest-center.result."+a))},price:function(a){return t("span",{style:"font-variant-numeric: tabular-nums"},e.fmtPrice(a))},profit:function(s){return t("span",{style:{color:s>0?"#52c41a":s<0?"#f5222d":a?"rgba(255,255,255,0.65)":"#666",fontWeight:"600",fontVariantNumeric:"tabular-nums"}},e.fmtMoney(s))},money:function(s){return t("span",{style:{color:a?"rgba(255,255,255,0.88)":"#262626",fontWeight:"600",fontVariantNumeric:"tabular-nums"}},e.fmtMoney(s))}}})]),t("a-modal",{props:{title:this.$t("dashboard.indicator.backtest.historyAISuggestTitle"),visible:this.showAIResult,footer:null,width:900,wrapClassName:this.isDark?"bc-modal-wrap bc-modal-wrap--dark":"bc-modal-wrap"},on:{cancel:function(){e.showAIResult=!1}}},[this.aiAnalyzing?t("div",{class:"result-ai-loading"},[t("a-spin",{props:{size:"large"}}),t("div",{class:"result-ai-loading-text"},this.$t("dashboard.indicator.backtest.historyAISuggestLoading"))]):t("div",{class:"result-ai-content"},[t("div",{class:"result-ai-meta-card"},[t("div",{class:"result-ai-meta-top"},[t("div",{class:"result-ai-meta-left"},[t("a-tag",{props:{color:"blue"}},this.$t("dashboard.indicator.backtest.historyAISuggest")),t("a-tag",{},this.aiModeLabel),this.backtestRunId?t("a-tag",{props:{color:"purple"}},"#".concat(this.backtestRunId)):null]),t("div",{class:"result-ai-meta-actions"},[t("a-button",{props:{size:"small"},on:{click:this.copyAIResult}},[t("a-icon",{props:{type:"copy"}}),this.$t("dashboard.indicator.backtest.historyAICopy")]),t("a-button",{props:{size:"small",type:"primary",ghost:!0,disabled:!this.backtestRunId},on:{click:this.handleAIAnalyze}},[t("a-icon",{props:{type:"redo"}}),this.$t("dashboard.indicator.backtest.historyAIRetry")])])]),t("a-alert",{style:{marginTop:"12px"},props:{type:"info",showIcon:!0,message:this.$t("dashboard.indicator.backtest.historyAIHint")}})]),this.aiResult?t("div",{class:"result-ai-markdown-card"},[t("div",{class:"result-ai-markdown-content",domProps:{innerHTML:this.renderedAIHtml}})]):t("div",{class:"result-ai-empty"},this.$t("dashboard.indicator.backtest.historyNoAIResult"))])])])}},L={name:"BacktestCenter",mixins:[m.t],components:{BacktestHistoryDrawer:$,BacktestRunViewer:D,ResultView:P},data:function(){return{activeTab:"indicator",userId:null,watchlist:[],loadingWatchlist:!1,showAddModal:!1,addingStock:!1,addMarketTab:"Crypto",addSearchKeyword:"",addSearchResults:[],addSearching:!1,addSelectedItem:null,addSearched:!1,addSearchTimer:null,addTriggerSource:"",indicators:[],loadingIndicators:!1,selectedIndicatorId:void 0,selectedWatchlistKey:void 0,market:"Crypto",symbol:"",timeframe:"1D",startDate:u()().subtract(6,"months"),endDate:u()(),datePreset:"6m",initialCapital:1e4,leverage:1,commission:.02,slippage:0,tradeDirection:"long",stopLossPct:0,takeProfitPct:0,entryPct:100,trailingEnabled:!1,trailingStopPct:0,trailingActivationPct:0,running:!1,runTip:"",runTimer:null,hasResult:!1,backtestRunId:null,result:{},strategies:[],loadingStrategies:!1,selectedStrategyId:void 0,stSelectedWatchlistKey:void 0,stMarket:"Crypto",stSymbol:"",stTimeframe:"1D",stStartDate:u()().subtract(6,"months"),stEndDate:u()(),stDatePreset:"6m",stInitialCapital:1e4,stLeverage:1,stCommission:.02,stSlippage:0,stRunning:!1,stRunTip:"",stRunTimer:null,stHasResult:!1,stBacktestRunId:null,stResult:{},showHistoryDrawer:!1,historyIndicatorId:null,historyStrategyId:null,historyRunType:"",showRunViewer:!1,selectedRun:null}},computed:{isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},selectedIndicatorObj:function(){var t=this;return this.selectedIndicatorId?this.indicators.find(function(e){return e.id===t.selectedIndicatorId}):null},selectedStrategyObj:function(){var t=this;return this.selectedStrategyId?this.strategies.find(function(e){return e.id===t.selectedStrategyId}):null},canRunIndicator:function(){return this.selectedIndicatorId&&this.symbol&&this.startDate&&this.endDate},canRunStrategy:function(){return this.selectedStrategyId&&this.stSymbol&&this.stStartDate&&this.stEndDate},tfMaxDays:function(){return M[this.timeframe]||3650},stTfMaxDays:function(){return M[this.stTimeframe]||3650},tfLimitHint:function(){var t=this.tfMaxDays;return t<=30?"(≤ 1".concat(this.$t("backtest-center.config.monthUnit"),")"):t<=180?"(≤ 6".concat(this.$t("backtest-center.config.monthUnit"),")"):t<=365?"(≤ 1".concat(this.$t("backtest-center.config.yearUnit"),")"):t<=730?"(≤ 2".concat(this.$t("backtest-center.config.yearUnit"),")"):"(≤ ".concat(Math.round(t/365)).concat(this.$t("backtest-center.config.yearUnit"),")")},stTfLimitHint:function(){var t=this.stTfMaxDays;return t<=30?"(≤ 1".concat(this.$t("backtest-center.config.monthUnit"),")"):t<=180?"(≤ 6".concat(this.$t("backtest-center.config.monthUnit"),")"):t<=365?"(≤ 1".concat(this.$t("backtest-center.config.yearUnit"),")"):t<=730?"(≤ 2".concat(this.$t("backtest-center.config.yearUnit"),")"):"(≤ ".concat(Math.round(t/365)).concat(this.$t("backtest-center.config.yearUnit"),")")},filteredDatePresets:function(){var t=this;return z.filter(function(e){return e.days<=t.tfMaxDays})},stFilteredDatePresets:function(){var t=this;return z.filter(function(e){return e.days<=t.stTfMaxDays})}},created:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){return(0,o.A)().w(function(e){while(1)switch(e.n){case 0:return e.n=1,t.loadUserId();case 1:t.loadIndicators(),t.loadStrategies(),t.loadWatchlistData(),t.parseQuery();case 2:return e.a(2)}},e)}))()},beforeDestroy:function(){clearInterval(this.runTimer),clearInterval(this.stRunTimer),clearTimeout(this.addSearchTimer)},methods:{loadUserId:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,g.ug)();case 1:a=e.v,a&&a.data&&(t.userId=a.data.id||a.data.user_id||1),e.n=3;break;case 2:e.p=2,e.v,t.userId=1;case 3:return e.a(2)}},e,null,[[0,2]])}))()},loadIndicators:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.userId){e.n=1;break}return e.a(2);case 1:return t.loadingIndicators=!0,e.p=2,e.n=3,(0,p.Ay)({url:"/api/indicator/getIndicators",method:"get",params:{userid:t.userId}});case 3:a=e.v,a&&a.data&&Array.isArray(a.data)&&(t.indicators=a.data.map(function(t){return(0,n.A)((0,n.A)({},t),{},{type:"python"})})),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.p=5,t.loadingIndicators=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},loadStrategies:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a,s,i;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.loadingStrategies=!0,e.p=1,e.n=2,(0,y.EM)();case 2:s=e.v,i=Array.isArray(null===s||void 0===s||null===(a=s.data)||void 0===a?void 0:a.strategies)?s.data.strategies:[],t.strategies=i,t.selectedStrategyId&&t.$nextTick(function(){return t.onStrategyChange()}),e.n=4;break;case 3:e.p=3,e.v,t.strategies=[];case 4:return e.p=4,t.loadingStrategies=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},loadWatchlistData:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.userId){e.n=1;break}return e.a(2);case 1:return t.loadingWatchlist=!0,e.p=2,e.n=3,(0,b.Qo)({userid:t.userId});case 3:a=e.v,a&&1===a.code&&a.data&&(t.watchlist=a.data),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.p=5,t.loadingWatchlist=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},parseQuery:function(){var t=this,e=this.$route.query;"strategy"===e.tab&&(this.activeTab="strategy"),e.indicator_id&&(this.selectedIndicatorId=Number(e.indicator_id)||void 0),e.strategy_id&&(this.selectedStrategyId=Number(e.strategy_id)||void 0),"history"===e.view&&this.$nextTick(function(){return t.openHistory(t.activeTab)})},filterWatchlistOption:function(t,e){var a=(e.componentOptions.propsData.value||"").toLowerCase();return"__add__"===a||a.includes(t.toLowerCase())},handleWatchlistChange:function(t){var e=this;if("__add__"===t)return this.addTriggerSource="indicator",this.showAddModal=!0,void this.$nextTick(function(){e.selectedWatchlistKey=void 0});if(t){var a=t.split(":"),s=(0,r.A)(a,2),i=s[0],n=s[1];this.market=i,this.symbol=n}else this.market="",this.symbol=""},handleStWatchlistChange:function(t){var e=this;if("__add__"===t)return this.addTriggerSource="strategy",this.showAddModal=!0,void this.$nextTick(function(){e.stSelectedWatchlistKey=void 0});if(t){var a=t.split(":"),s=(0,r.A)(a,2),i=s[0],n=s[1];this.stMarket=i,this.stSymbol=n}else this.stMarket="",this.stSymbol=""},getMarketColor:function(t){var e={Crypto:"orange",USStock:"blue",HKStock:"red",Forex:"green",Futures:"purple",PredictionMarket:"cyan"};return e[t]||"default"},onAddMarketTabChange:function(){this.addSearchKeyword="",this.addSearchResults=[],this.addSelectedItem=null,this.addSearched=!1},onAddSearchInput:function(){var t=this;clearTimeout(this.addSearchTimer),this.addSearchKeyword?this.addSearchTimer=setTimeout(function(){return t.doAddSearch()},400):this.addSearchResults=[]},doAddSearch:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.addSearchKeyword){e.n=1;break}return e.a(2);case 1:return t.addSearching=!0,e.p=2,e.n=3,(0,b._3)({market:t.addMarketTab,keyword:t.addSearchKeyword,limit:20});case 3:a=e.v,a&&a.data&&Array.isArray(a.data)?t.addSearchResults=a.data:t.addSearchResults=[],t.addSearched=!0,0===t.addSearchResults.length&&(t.addSelectedItem={market:t.addMarketTab,symbol:t.addSearchKeyword.trim().toUpperCase(),name:""}),e.n=5;break;case 4:e.p=4,e.v,t.addSelectedItem={market:t.addMarketTab,symbol:t.addSearchKeyword.trim().toUpperCase(),name:""};case 5:return e.p=5,t.addSearching=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},handleAddStock:function(){var t=this;return(0,c.A)((0,o.A)().m(function e(){var a,s,i,r;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(a=t.addSelectedItem,a&&a.symbol){e.n=1;break}return t.$message.warning(t.$t("backtest-center.config.symbolRequired")),e.a(2);case 1:return t.addingStock=!0,e.p=2,s=a.market||t.addMarketTab,e.n=3,(0,b.dp)({userid:t.userId,market:s,symbol:a.symbol,name:a.name||""});case 3:return t.$message.success(t.$t("backtest-center.config.addSuccess")),e.n=4,t.loadWatchlistData();case 4:i="".concat(s,":").concat(a.symbol),"strategy"===t.addTriggerSource?(t.stSelectedWatchlistKey=i,t.stMarket=s,t.stSymbol=a.symbol):(t.selectedWatchlistKey=i,t.market=s,t.symbol=a.symbol),t.showAddModal=!1,e.n=6;break;case 5:e.p=5,r=e.v,t.$message.error(r.message||"Failed");case 6:return e.p=6,t.addingStock=!1,e.f(6);case 7:return e.a(2)}},e,null,[[2,5,6,7]])}))()},onTimeframeChange:function(){this.clampDateRange("indicator"),this.datePreset=this.matchPreset(this.startDate,this.endDate)},onStTimeframeChange:function(){this.clampDateRange("strategy"),this.stDatePreset=this.matchPreset(this.stStartDate,this.stEndDate)},clampDateRange:function(t){var e="strategy"===t?this.stTfMaxDays:this.tfMaxDays,a="strategy"===t?this.stStartDate:this.startDate,s="strategy"===t?this.stEndDate:this.endDate;if(a&&s){var i=s.diff(a,"days");if(i>e){var r=u()(s).subtract(e,"days");"strategy"===t?this.stStartDate=r:this.startDate=r}}},matchPreset:function(t,e){if(!t||!e)return"";for(var a=e.diff(t,"days"),s=0,i=z;s0?a("span",{staticClass:"group-status running"},[e._v(" "+e._s(t.runningCount)+" "+e._s(e.$t("trading-assistant.status.running"))+" ")]):e._e(),t.stoppedCount>0?a("span",{staticClass:"group-status stopped"},[e._v(" "+e._s(t.stoppedCount)+" "+e._s(e.$t("trading-assistant.status.stopped"))+" ")]):e._e(),a("a-dropdown",{attrs:{getPopupContainer:e.getDropdownContainer,trigger:["click"]}},[a("a-menu",{attrs:{slot:"overlay"},on:{click:function(a){var s=a.key;return e.handleGroupMenuClick(s,t)}},slot:"overlay"},[a("a-menu-item",{key:"startAll"},[a("a-icon",{attrs:{type:"play-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.startAll"))+" ")],1),a("a-menu-item",{key:"stopAll"},[a("a-icon",{attrs:{type:"pause-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.stopAll"))+" ")],1),a("a-menu-divider"),a("a-menu-item",{key:"deleteAll",staticClass:"danger-item"},[a("a-icon",{attrs:{type:"delete"}}),e._v(" "+e._s(e.$t("trading-assistant.deleteAll"))+" ")],1)],1),a("a-button",{attrs:{type:"link",icon:"more",size:"small"}})],1)],1)]),a("div",{directives:[{name:"show",rawName:"v-show",value:!e.collapsedGroups[t.id],expression:"!collapsedGroups[group.id]"}],staticClass:"strategy-group-content"},e._l(t.strategies,function(t){return a("div",{key:t.id,class:["strategy-list-item",{active:e.selectedStrategy&&e.selectedStrategy.id===t.id}],on:{click:function(a){return e.handleSelectStrategy(t)}}},[a("div",{staticClass:"strategy-item-content"},[a("div",{staticClass:"strategy-item-header"},[a("div",{staticClass:"strategy-name-wrapper"},["strategy"===e.groupByMode?[t.trading_config&&t.trading_config.symbol?a("span",{staticClass:"info-item"},[a("a-icon",{attrs:{type:"dollar"}}),e._v(" "+e._s(t.trading_config.symbol)+" ")],1):e._e()]:[a("span",{staticClass:"info-item strategy-name-text"},[a("a-icon",{attrs:{type:"thunderbolt"}}),e._v(" "+e._s(t.displayInfo?t.displayInfo.strategyName:t.strategy_name)+" ")],1),t.displayInfo&&t.displayInfo.timeframe?a("a-tag",{attrs:{size:"small",color:"cyan"}},[a("a-icon",{staticStyle:{"margin-right":"2px"},attrs:{type:"clock-circle"}}),e._v(" "+e._s(t.displayInfo.timeframe)+" ")],1):e._e(),t.displayInfo&&t.displayInfo.indicatorName&&"-"!==t.displayInfo.indicatorName?a("a-tag",{attrs:{size:"small",color:"purple"}},[a("a-icon",{staticStyle:{"margin-right":"2px"},attrs:{type:"line-chart"}}),e._v(" "+e._s(t.displayInfo.indicatorName)+" ")],1):e._e()],"script"===t.strategy_mode?a("a-tag",{staticStyle:{"margin-left":"4px"},attrs:{size:"small",color:"green"}},[a("a-icon",{staticStyle:{"margin-right":"2px"},attrs:{type:"code"}}),e._v(e._s(e.$t("trading-assistant.strategyMode.script"))+" ")],1):e._e(),a("span",{staticClass:"status-label",class:[t.status?"status-".concat(t.status):"",{"status-stopped":"stopped"===t.status}]},[e._v(" "+e._s(e.getStatusText(t.status))+" ")])],2)])]),a("div",{staticClass:"strategy-item-actions",on:{click:function(t){t.stopPropagation()}}},[a("a-dropdown",{attrs:{getPopupContainer:e.getDropdownContainer,trigger:["click"]}},[a("a-menu",{attrs:{slot:"overlay"},on:{click:function(a){var s=a.key;return e.handleMenuClick(s,t)}},slot:"overlay"},["stopped"===t.status?a("a-menu-item",{key:"start"},[a("a-icon",{attrs:{type:"play-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.startStrategy"))+" ")],1):e._e(),"running"===t.status?a("a-menu-item",{key:"stop"},[a("a-icon",{attrs:{type:"pause-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.stopStrategy"))+" ")],1):e._e(),a("a-menu-divider"),a("a-menu-item",{key:"edit"},[a("a-icon",{attrs:{type:"edit"}}),e._v(" "+e._s(e.$t("trading-assistant.editStrategy"))+" ")],1),a("a-menu-item",{key:"backtest"},[a("a-icon",{attrs:{type:"experiment"}}),e._v(" "+e._s(e.$t("dashboard.indicator.action.backtest"))+" ")],1),a("a-menu-divider"),a("a-menu-item",{key:"delete",staticClass:"danger-item"},[a("a-icon",{attrs:{type:"delete"}}),e._v(" "+e._s(e.$t("trading-assistant.deleteStrategy"))+" ")],1)],1),a("a-button",{attrs:{type:"link",icon:"more",size:"small"}})],1)],1)])}),0)])}),e._l(e.groupedStrategies.ungrouped,function(t){return a("div",{key:t.id,class:["strategy-list-item",{active:e.selectedStrategy&&e.selectedStrategy.id===t.id}],on:{click:function(a){return e.handleSelectStrategy(t)}}},[a("div",{staticClass:"strategy-item-content"},[a("div",{staticClass:"strategy-item-header"},[a("div",{staticClass:"strategy-name-wrapper"},[t.exchange_config&&t.exchange_config.exchange_id?a("a-tag",{staticClass:"exchange-tag",attrs:{color:e.getExchangeTagColor(t.exchange_config.exchange_id),size:"small"}},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"bank"}}),e._v(" "+e._s(e.getExchangeDisplayName(t.exchange_config.exchange_id))+" ")],1):e._e(),a("span",{staticClass:"strategy-name"},[e._v(e._s(t.strategy_name))]),"PromptBasedStrategy"===t.strategy_type?a("a-tag",{staticClass:"strategy-type-tag",attrs:{color:"purple",size:"small"}},[a("a-icon",{staticStyle:{"margin-right":"2px"},attrs:{type:"robot"}}),e._v(" AI ")],1):e._e()],1)]),a("div",{staticClass:"strategy-item-info"},[t.trading_config&&t.trading_config.symbol?a("span",{staticClass:"info-item"},[a("a-icon",{attrs:{type:"dollar"}}),e._v(" "+e._s(t.trading_config.symbol)+" ")],1):e._e(),a("span",{staticClass:"status-label",class:[t.status?"status-".concat(t.status):"",{"status-stopped":"stopped"===t.status}]},[e._v(" "+e._s(e.getStatusText(t.status))+" ")])])]),a("div",{staticClass:"strategy-item-actions",on:{click:function(t){t.stopPropagation()}}},[a("a-dropdown",{attrs:{getPopupContainer:e.getDropdownContainer,trigger:["click"]}},[a("a-menu",{attrs:{slot:"overlay"},on:{click:function(a){var s=a.key;return e.handleMenuClick(s,t)}},slot:"overlay"},["stopped"===t.status?a("a-menu-item",{key:"start"},[a("a-icon",{attrs:{type:"play-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.startStrategy"))+" ")],1):e._e(),"running"===t.status?a("a-menu-item",{key:"stop"},[a("a-icon",{attrs:{type:"pause-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.stopStrategy"))+" ")],1):e._e(),a("a-menu-divider"),a("a-menu-item",{key:"edit"},[a("a-icon",{attrs:{type:"edit"}}),e._v(" "+e._s(e.$t("trading-assistant.editStrategy"))+" ")],1),a("a-menu-item",{key:"backtest"},[a("a-icon",{attrs:{type:"experiment"}}),e._v(" "+e._s(e.$t("dashboard.indicator.action.backtest"))+" ")],1),a("a-menu-divider"),a("a-menu-item",{key:"delete",staticClass:"danger-item"},[a("a-icon",{attrs:{type:"delete"}}),e._v(" "+e._s(e.$t("trading-assistant.deleteStrategy"))+" ")],1)],1),a("a-button",{attrs:{type:"link",icon:"more",size:"small"}})],1)],1)])})],2):a("div",{staticClass:"strategy-empty-state"},[a("a-empty",{attrs:{description:e.$t("trading-assistant.empty.title")}}),a("div",{staticClass:"strategy-empty-desc"},[e._v(e._s(e.$t("trading-assistant.empty.desc")))]),a("div",{staticClass:"strategy-empty-path"},[e._v(e._s(e.$t("trading-assistant.empty.path")))]),a("a-button",{attrs:{type:"primary"},on:{click:e.openCreateStrategyFromGuide}},[a("a-icon",{attrs:{type:"plus"}}),e._v(" "+e._s(e.$t("trading-assistant.empty.primary"))+" ")],1)],1)])],1)],1),a("a-col",{staticClass:"strategy-detail-col",attrs:{xs:24,sm:24,md:14,lg:16,xl:16}},[e.selectedStrategy?a("div",{staticClass:"strategy-detail-panel"},[a("a-card",{staticClass:"strategy-header-card",attrs:{bordered:!1}},[a("div",{staticClass:"strategy-header"},[a("div",{staticClass:"header-left"},[a("div",{staticClass:"strategy-title-row"},[a("h3",{staticClass:"strategy-title"},[e._v(e._s(e.selectedStrategy.strategy_name))]),a("div",{staticClass:"status-badge",class:["status-".concat(e.selectedStrategy.status)]},[a("span",{staticClass:"status-dot"}),e._v(" "+e._s(e.getStatusText(e.selectedStrategy.status))+" ")])]),a("div",{staticClass:"key-stats-grid"},[e.selectedStrategy.initial_capital||e.selectedStrategy.trading_config&&e.selectedStrategy.trading_config.initial_capital?a("div",{staticClass:"stat-card"},[a("div",{staticClass:"stat-icon investment"},[a("a-icon",{attrs:{type:"wallet"}})],1),a("div",{staticClass:"stat-content"},[a("div",{staticClass:"stat-label"},[e._v(e._s(e.$t("trading-assistant.detail.totalInvestment")))]),a("div",{staticClass:"stat-value"},[e._v("$"+e._s(parseFloat(e.selectedStrategy.initial_capital||(null===(t=e.selectedStrategy.trading_config)||void 0===t?void 0:t.initial_capital)||0).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})))])])]):e._e(),null!==e.currentEquity?a("div",{staticClass:"stat-card"},[a("div",{staticClass:"stat-icon equity"},[a("a-icon",{attrs:{type:"fund"}})],1),a("div",{staticClass:"stat-content"},[a("div",{staticClass:"stat-label"},[e._v(e._s(e.$t("trading-assistant.detail.currentEquity")))]),a("div",{staticClass:"stat-value",class:e.getEquityColorClass},[e._v(e._s(e.formatCurrency(e.currentEquity)))])])]):e._e(),null!==e.totalPnl?a("div",{staticClass:"stat-card pnl-card",class:{profit:e.totalPnl>0,loss:e.totalPnl<0}},[a("div",{staticClass:"stat-icon pnl"},[a("a-icon",{attrs:{type:e.totalPnl>=0?"rise":"fall"}})],1),a("div",{staticClass:"stat-content"},[a("div",{staticClass:"stat-label"},[e._v(e._s(e.$t("trading-assistant.detail.totalPnl")))]),a("div",{staticClass:"stat-value",class:e.getPnlColorClass},[e._v(" "+e._s(e.formatPnl(e.totalPnl))+" "),a("span",{staticClass:"pnl-percent"},[e._v("("+e._s(e.formatPnlPercent(e.totalPnlPercent))+")")])])])]):e._e()]),a("div",{staticClass:"strategy-tags"},[e.selectedStrategy.trading_config?a("div",{staticClass:"tag-item"},[a("a-icon",{attrs:{type:"stock"}}),a("span",[e._v(e._s(e.selectedStrategy.trading_config.symbol))])],1):e._e(),e.selectedStrategy.indicator_config&&e.selectedStrategy.indicator_config.indicator_name?a("div",{staticClass:"tag-item"},[a("a-icon",{attrs:{type:"line-chart"}}),a("span",[e._v(e._s(e.selectedStrategy.indicator_config.indicator_name))])],1):e._e(),e.selectedStrategy.trading_config?a("div",{staticClass:"tag-item"},[a("a-icon",{attrs:{type:"thunderbolt"}}),a("span",[e._v(e._s(e.selectedStrategy.trading_config.leverage||1)+"x")])],1):e._e(),e.selectedStrategy.trading_config&&e.selectedStrategy.trading_config.trade_direction?a("div",{staticClass:"tag-item"},[a("a-icon",{attrs:{type:"swap"}}),a("span",[e._v(e._s(e.getTradeDirectionText(e.selectedStrategy.trading_config.trade_direction)))])],1):e._e(),e.selectedStrategy.trading_config&&e.selectedStrategy.trading_config.timeframe?a("div",{staticClass:"tag-item"},[a("a-icon",{attrs:{type:"clock-circle"}}),a("span",[e._v(e._s(e.selectedStrategy.trading_config.timeframe))])],1):e._e()])]),a("div",{staticClass:"header-right"},["stopped"===e.selectedStrategy.status?a("a-button",{staticClass:"action-btn start-btn",attrs:{type:"primary",size:"large"},on:{click:function(t){return e.handleStartStrategy(e.selectedStrategy.id)}}},[a("a-icon",{attrs:{type:"play-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.startStrategy"))+" ")],1):e._e(),"running"===e.selectedStrategy.status?a("a-button",{staticClass:"action-btn stop-btn",attrs:{type:"danger",size:"large"},on:{click:function(t){return e.handleStopStrategy(e.selectedStrategy.id)}}},[a("a-icon",{attrs:{type:"pause-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.stopStrategy"))+" ")],1):e._e()],1)])]),a("a-card",{staticClass:"strategy-content-card",attrs:{bordered:!1}},[a("a-tabs",{attrs:{defaultActiveKey:"positions"}},[a("a-tab-pane",{key:"positions",attrs:{tab:e.$t("trading-assistant.tabs.positions")}},[a("position-records",{attrs:{"strategy-id":e.selectedStrategy.id,"market-type":e.selectedStrategy.trading_config&&e.selectedStrategy.trading_config.market_type||"swap",leverage:e.selectedStrategy.trading_config&&e.selectedStrategy.trading_config.leverage||1,loading:e.loadingRecords}})],1),a("a-tab-pane",{key:"trades",attrs:{tab:e.$t("trading-assistant.tabs.tradingRecords")}},[a("trading-records",{attrs:{"strategy-id":e.selectedStrategy.id,loading:e.loadingRecords}})],1),a("a-tab-pane",{key:"performance",attrs:{tab:e.$t("trading-assistant.tabs.performance")}},[a("performance-analysis",{attrs:{"strategy-id":e.selectedStrategy.id,"is-dark":e.isDarkTheme}})],1),a("a-tab-pane",{key:"logs",attrs:{tab:e.$t("trading-assistant.tabs.logs")}},[a("strategy-logs",{attrs:{"strategy-id":e.selectedStrategy.id,"is-dark":e.isDarkTheme}})],1)],1)],1)],1):a("div",{staticClass:"empty-detail"},[a("a-empty",{attrs:{description:e.$t("trading-assistant.selectStrategy")}})],1)])],1),a("a-modal",{staticClass:"mode-selector-modal",attrs:{visible:e.showModeSelector,title:e.$t("trading-assistant.selectMode"),width:e.isMobile?"95%":700,footer:null,maskClosable:!0,bodyStyle:{padding:"16px 24px"}},on:{cancel:function(t){e.showModeSelector=!1}}},[a("strategy-type-selector",{attrs:{selected:e.strategyMode,"is-dark":e.isDarkTheme},on:{select:e.handleModeSelect,"use-template":e.handleUseTemplate}})],1),a("a-modal",{attrs:{visible:e.showFormModal,title:e.editingStrategy?e.$t("trading-assistant.editStrategy"):e.$t("trading-assistant.createStrategy")+("script"===e.strategyMode?" - "+e.$t("trading-assistant.strategyMode.script"):""),width:e.isMobile?"95%":1120,confirmLoading:e.saving,maskClosable:!1,wrapClassName:e.strategyFormWrapClass,bodyStyle:{maxHeight:"76vh",overflowY:"auto",paddingBottom:"8px"}},on:{ok:e.handleSubmit,cancel:e.handleCloseModal}},[a("a-spin",{attrs:{spinning:e.loadingIndicators}},[e.editingStrategy||"script"===e.strategyMode?e._e():a("div",{staticClass:"creation-mode-toggle"},[a("div",{staticClass:"mode-meta"},[a("div",{staticClass:"mode-title"},[e._v(e._s(e.$t("trading-assistant.selectMode")))]),a("div",{staticClass:"mode-hint"},[e._v(e._s(e.isSimpleMode?e.$t("trading-assistant.form.simpleModeHint"):e.$t("trading-assistant.form.advancedModeHint")))])]),a("a-radio-group",{attrs:{size:"small","button-style":"solid"},model:{value:e.creationMode,callback:function(t){e.creationMode=t},expression:"creationMode"}},[a("a-radio-button",{attrs:{value:"simple"}},[a("a-icon",{attrs:{type:"rocket"}}),e._v(" "+e._s(e.$t("trading-assistant.form.simpleMode"))+" ")],1),a("a-radio-button",{attrs:{value:"advanced"}},[a("a-icon",{attrs:{type:"setting"}}),e._v(" "+e._s(e.$t("trading-assistant.form.advancedMode"))+" ")],1)],1)],1),a("a-steps",{staticClass:"steps-container",attrs:{current:e.displayCurrentStep}},["script"===e.strategyMode?[a("a-step",{attrs:{title:e.$t("trading-assistant.form.simpleStep1")}}),a("a-step",{attrs:{title:e.$t("trading-assistant.editor.title")}}),a("a-step",{attrs:{title:e.$t("trading-assistant.form.step3Signal")}})]:[a("a-step",{attrs:{title:e.isSimpleMode&&!e.editingStrategy?e.$t("trading-assistant.form.simpleStep1"):e.$t("trading-assistant.form.step1")}}),e.isAdvancedMode||e.editingStrategy?a("a-step",{attrs:{title:e.$t("trading-assistant.form.step2Params")}}):e._e(),a("a-step",{attrs:{title:e.isSimpleMode&&!e.editingStrategy?e.$t("trading-assistant.form.simpleStep2"):e.$t("trading-assistant.form.step3Signal")}})]],2),a("div",{staticClass:"form-container"},[a("div",{directives:[{name:"show",rawName:"v-show",value:0===e.currentStep,expression:"currentStep === 0"}],staticClass:"step-content"},["indicator"===e.strategyType&&"script"!==e.strategyMode?a("div",[a("a-form",{attrs:{form:e.form,layout:"vertical"}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.indicator")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["indicator_id",{rules:[{required:!0,message:e.$t("trading-assistant.validation.indicatorRequired")}]}],expression:"['indicator_id', { rules: [{ required: true, message: $t('trading-assistant.validation.indicatorRequired') }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.selectIndicator"),"show-search":"",optionLabelProp:"label","filter-option":e.filterIndicatorOption,loading:e.loadingIndicators,getPopupContainer:function(t){return t.parentNode}},on:{focus:e.handleIndicatorSelectFocus,change:e.handleIndicatorChange}},e._l(e.availableIndicators,function(t){return a("a-select-option",{key:String(t.id),attrs:{value:String(t.id),label:e.getIndicatorOptionLabel(t)}},[a("div",{staticClass:"indicator-option"},[a("div",{staticClass:"indicator-option-main"},[a("span",{staticClass:"indicator-name"},[e._v(e._s(t.name))]),t.description?a("span",{staticClass:"indicator-option-desc"},[e._v(e._s(t.description))]):e._e()]),t.type?a("a-tag",{attrs:{size:"small",color:e.getIndicatorTypeColor(t.type)}},[e._v(" "+e._s(e.getIndicatorTypeName(t.type))+" ")]):e._e()],1)])}),1),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.indicatorHint"))+" ")])],1),e.selectedIndicator?a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.indicatorDescription")}},[a("div",{staticClass:"selected-indicator-card"},[a("div",{staticClass:"selected-indicator-header"},[a("span",{staticClass:"selected-indicator-name"},[e._v(e._s(e.selectedIndicator.name))]),e.selectedIndicator.type?a("a-tag",{attrs:{size:"small",color:e.getIndicatorTypeColor(e.selectedIndicator.type)}},[e._v(" "+e._s(e.getIndicatorTypeName(e.selectedIndicator.type))+" ")]):e._e()],1),a("div",{staticClass:"indicator-description"},[e._v(" "+e._s(e.selectedIndicator.description||e.$t("trading-assistant.form.noDescription"))+" ")])])]):e._e(),e.indicatorParams.length>0?a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.indicatorParams")}},[a("div",{staticClass:"indicator-params-form"},[a("a-row",{attrs:{gutter:16}},e._l(e.indicatorParams,function(t){return a("a-col",{key:t.name,attrs:{xs:24,sm:12,md:8}},[a("div",{staticClass:"param-item"},[a("label",{staticClass:"param-label"},[e._v(" "+e._s(t.name)+" "),t.description?a("a-tooltip",{attrs:{title:t.description}},[a("a-icon",{staticStyle:{"margin-left":"4px",color:"#999"},attrs:{type:"question-circle"}})],1):e._e()],1),"int"===t.type?a("a-input-number",{staticStyle:{width:"100%"},attrs:{precision:0,size:"small"},model:{value:e.indicatorParamValues[t.name],callback:function(a){e.$set(e.indicatorParamValues,t.name,a)},expression:"indicatorParamValues[param.name]"}}):"float"===t.type?a("a-input-number",{staticStyle:{width:"100%"},attrs:{precision:4,size:"small"},model:{value:e.indicatorParamValues[t.name],callback:function(a){e.$set(e.indicatorParamValues,t.name,a)},expression:"indicatorParamValues[param.name]"}}):"bool"===t.type?a("a-switch",{attrs:{size:"small"},model:{value:e.indicatorParamValues[t.name],callback:function(a){e.$set(e.indicatorParamValues,t.name,a)},expression:"indicatorParamValues[param.name]"}}):a("a-input",{attrs:{size:"small"},model:{value:e.indicatorParamValues[t.name],callback:function(a){e.$set(e.indicatorParamValues,t.name,a)},expression:"indicatorParamValues[param.name]"}})],1)])}),1),a("div",{staticClass:"form-item-hint",staticStyle:{"margin-top":"8px"}},[e._v(" "+e._s(e.$t("trading-assistant.form.indicatorParamsHint"))+" ")])],1)]):e._e(),a("a-divider"),a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.strategyName")}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["strategy_name",{rules:[{required:!0,message:e.$t("trading-assistant.validation.strategyNameRequired")}]}],expression:"['strategy_name', { rules: [{ required: true, message: $t('trading-assistant.validation.strategyNameRequired') }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.inputStrategyName")}}),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.strategyNameHint"))+" ")])],1),e.isSimpleMode&&!e.editingStrategy?a("div",{staticClass:"simple-essentials-card"},[a("div",{staticClass:"simple-mode-hero"},[a("div",{staticClass:"simple-mode-hero-main"},[a("div",{staticClass:"simple-mode-kicker"},[e._v(e._s(e.$t("trading-assistant.form.simpleModePreset")))]),a("div",{staticClass:"simple-mode-hero-desc"},[e._v(e._s(e.$t("trading-assistant.form.simpleModePresetValue")))])]),a("div",{staticClass:"simple-mode-badges"},[a("a-tag",[e._v("15m")]),a("a-tag",{attrs:{color:"blue"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeFutures")))]),a("a-tag",{attrs:{color:"purple"}},[e._v("5x")])],1)]),a("div",{staticClass:"section-block-title"},[a("span",[e._v(e._s(e.$t("trading-assistant.form.simpleModeSectionCore")))]),a("span",{staticClass:"section-block-desc"},[e._v(e._s(e.$t("trading-assistant.form.simpleModeSectionCoreDesc")))])]),a("a-form-item",{staticClass:"compact-form-item"},[a("span",{staticClass:"required-label",attrs:{slot:"label"},slot:"label"},[a("span",{staticClass:"required-star"},[e._v("*")]),e._v(e._s(e.$t("trading-assistant.form.symbol"))+" ")]),a("a-select",{attrs:{value:e.selectedSymbols[0],placeholder:e.$t("trading-assistant.placeholders.selectSymbol"),"show-search":"","filter-option":e.filterWatchlistOptionWithAdd,loading:e.loadingWatchlist,"allow-clear":"",getPopupContainer:function(t){return t.parentNode}},on:{change:e.handleSimpleSymbolChange}},[e._l(e.watchlist,function(t){return a("a-select-option",{key:"".concat(t.market,":").concat(t.symbol),attrs:{value:"".concat(t.market,":").concat(t.symbol)}},[a("div",{staticClass:"symbol-option"},[a("a-tag",{staticStyle:{"margin-right":"8px","margin-bottom":"0"},attrs:{color:e.getMarketColor(t.market)}},[e._v(" "+e._s(t.market)+" ")]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.symbol))]),t.name?a("span",{staticClass:"symbol-name-extra"},[e._v(e._s(t.name))]):e._e()],1)])}),a("a-select-option",{key:"__add_symbol_option__",staticClass:"add-symbol-option",attrs:{value:"__add_symbol_option__"}},[a("div",{staticStyle:{width:"100%","text-align":"center",padding:"4px 0",color:"#1890ff",cursor:"pointer"}},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"plus"}}),a("span",[e._v(e._s(e.$t("trading-assistant.form.addSymbol")))])],1)])],2),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.symbolHintCrypto"))+" ")])],1),a("a-row",{staticClass:"compact-grid-row",attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.initialCapital")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["initial_capital",{rules:[{required:!0,message:e.$t("trading-assistant.validation.initialCapitalRequired")}],initialValue:1e3}],expression:"['initial_capital', { rules: [{ required: true, message: $t('trading-assistant.validation.initialCapitalRequired') }], initialValue: 1000 }]"}],staticStyle:{width:"100%"},attrs:{min:10,step:100,precision:2}})],1)],1),a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.leverage")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["leverage",{initialValue:5,rules:[{required:!0,message:e.$t("trading-assistant.validation.leverageRequired")}]}],expression:"['leverage', { initialValue: 5, rules: [{ required: true, message: $t('trading-assistant.validation.leverageRequired') }] }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:"spot"===e.form.getFieldValue("market_type")?1:125,step:1,disabled:"spot"===e.form.getFieldValue("market_type")}})],1)],1)],1),a("a-row",{staticClass:"compact-grid-row",attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.marketType")}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["market_type",{initialValue:"swap"}],expression:"['market_type', { initialValue: 'swap' }]"}],on:{change:e.handleMarketTypeChange}},[a("a-radio",{attrs:{value:"swap"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeFutures")))]),a("a-radio",{attrs:{value:"spot"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeSpot")))])],1)],1)],1),a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.tradeDirection")}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["trade_direction",{initialValue:"long"}],expression:"['trade_direction', { initialValue: 'long' }]"}],attrs:{disabled:"spot"===e.form.getFieldValue("market_type")}},[a("a-radio",{attrs:{value:"long"}},[e._v(e._s(e.$t("trading-assistant.form.tradeDirectionLong")))]),a("a-radio",{attrs:{value:"short",disabled:"spot"===e.form.getFieldValue("market_type")}},[e._v(" "+e._s(e.$t("trading-assistant.form.tradeDirectionShort"))+" ")]),a("a-radio",{attrs:{value:"both",disabled:"spot"===e.form.getFieldValue("market_type")}},[e._v(" "+e._s(e.$t("trading-assistant.form.tradeDirectionBoth"))+" ")])],1)],1)],1)],1),a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.klinePeriod")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["timeframe",{initialValue:"15m",rules:[{required:!0}]}],expression:"['timeframe', { initialValue: '15m', rules: [{ required: true }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.selectKlinePeriod"),getPopupContainer:function(t){return t.parentNode}}},[a("a-select-option",{attrs:{value:"1m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1m")))]),a("a-select-option",{attrs:{value:"5m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe5m")))]),a("a-select-option",{attrs:{value:"15m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe15m")))]),a("a-select-option",{attrs:{value:"30m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe30m")))]),a("a-select-option",{attrs:{value:"1H"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1H")))]),a("a-select-option",{attrs:{value:"4H"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe4H")))]),a("a-select-option",{attrs:{value:"1D"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1D")))])],1)],1)],1):e._e(),e.isAdvancedMode||e.editingStrategy?a("div",{staticClass:"advanced-settings-shell"},[a("div",{staticClass:"section-block-title"},[a("span",[e._v(e._s(e.$t("trading-assistant.form.advancedMode")))]),a("span",{staticClass:"section-block-desc"},[e._v(e._s(e.$t("trading-assistant.form.advancedModeHint")))])]),a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.strategyType")}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["cs_strategy_type",{initialValue:"single"}],expression:"['cs_strategy_type', { initialValue: 'single' }]"}],on:{change:e.handleStrategyTypeChange}},[a("a-radio",{attrs:{value:"single"}},[e._v(e._s(e.$t("trading-assistant.form.strategyTypeSingle")))]),a("a-radio",{attrs:{value:"cross_sectional"}},[e._v(e._s(e.$t("trading-assistant.form.strategyTypeCrossSectional")))])],1),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.strategyTypeHint"))+" ")])],1)],1):e._e(),(e.isAdvancedMode||e.editingStrategy)&&"cross_sectional"===e.form.getFieldValue("cs_strategy_type")?[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.symbolList")}},[a("a-select",{attrs:{mode:"multiple",placeholder:e.$t("trading-assistant.placeholders.selectSymbols"),"show-search":"","filter-option":e.filterWatchlistOptionWithAdd,loading:e.loadingWatchlist,getPopupContainer:function(t){return t.parentNode},maxTagCount:5},on:{change:e.handleCrossSectionalSymbolChange},model:{value:e.crossSectionalSymbols,callback:function(t){e.crossSectionalSymbols=t},expression:"crossSectionalSymbols"}},[e._l(e.watchlist,function(t){return a("a-select-option",{key:"".concat(t.market,":").concat(t.symbol),attrs:{value:"".concat(t.market,":").concat(t.symbol)}},[a("div",{staticClass:"symbol-option"},[a("a-tag",{staticStyle:{"margin-right":"8px","margin-bottom":"0"},attrs:{color:e.getMarketColor(t.market)}},[e._v(" "+e._s(t.market)+" ")]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.symbol))]),t.name?a("span",{staticClass:"symbol-name-extra"},[e._v(e._s(t.name))]):e._e()],1)])}),a("a-select-option",{key:"__add_symbol_option__",staticClass:"add-symbol-option",attrs:{value:"__add_symbol_option__"}},[a("div",{staticStyle:{width:"100%","text-align":"center",padding:"4px 0",color:"#1890ff",cursor:"pointer"}},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"plus"}}),a("span",[e._v(e._s(e.$t("trading-assistant.form.addSymbol")))])],1)])],2),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.symbolListHint"))+" ")])],1),a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.portfolioSize")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["portfolio_size",{initialValue:10,rules:[{required:!0,message:e.$t("trading-assistant.validation.portfolioSizeRequired")}]}],expression:"['portfolio_size', { initialValue: 10, rules: [{ required: true, message: $t('trading-assistant.validation.portfolioSizeRequired') }] }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:100,step:1}}),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.portfolioSizeHint"))+" ")])],1)],1),a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.longRatio")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["long_ratio",{initialValue:.5,rules:[{required:!0,message:e.$t("trading-assistant.validation.longRatioRequired")}]}],expression:"['long_ratio', { initialValue: 0.5, rules: [{ required: true, message: $t('trading-assistant.validation.longRatioRequired') }] }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:1,step:.1,precision:2}}),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.longRatioHint"))+" ")])],1)],1)],1),a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.rebalanceFrequency")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["rebalance_frequency",{initialValue:"daily"}],expression:"['rebalance_frequency', { initialValue: 'daily' }]"}],staticStyle:{width:"100%"}},[a("a-select-option",{attrs:{value:"daily"}},[e._v(e._s(e.$t("trading-assistant.form.rebalanceDaily")))]),a("a-select-option",{attrs:{value:"weekly"}},[e._v(e._s(e.$t("trading-assistant.form.rebalanceWeekly")))]),a("a-select-option",{attrs:{value:"monthly"}},[e._v(e._s(e.$t("trading-assistant.form.rebalanceMonthly")))])],1),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.rebalanceFrequencyHint"))+" ")])],1)]:e._e(),(e.isAdvancedMode||e.editingStrategy)&&"cross_sectional"!==e.form.getFieldValue("cs_strategy_type")?a("a-form-item",{attrs:{label:e.isEditMode?e.$t("trading-assistant.form.symbol"):e.$t("trading-assistant.form.symbols")}},[e.isEditMode?a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["symbol",{rules:[{required:!0,message:e.$t("trading-assistant.validation.symbolRequired")}]}],expression:"['symbol', { rules: [{ required: true, message: $t('trading-assistant.validation.symbolRequired') }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.selectSymbol"),"show-search":"","filter-option":e.filterWatchlistOption,loading:e.loadingWatchlist,getPopupContainer:function(t){return t.parentNode}},on:{change:e.handleWatchlistSymbolChange}},[e._l(e.watchlist,function(t){return a("a-select-option",{key:"".concat(t.market,":").concat(t.symbol),attrs:{value:"".concat(t.market,":").concat(t.symbol)}},[a("div",{staticClass:"symbol-option"},[a("a-tag",{staticStyle:{"margin-right":"8px","margin-bottom":"0"},attrs:{color:e.getMarketColor(t.market)}},[e._v(" "+e._s(t.market)+" ")]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.symbol))]),t.name?a("span",{staticClass:"symbol-name-extra"},[e._v(e._s(t.name))]):e._e()],1)])}),a("a-select-option",{key:"__add_symbol_option__",staticClass:"add-symbol-option",attrs:{value:"__add_symbol_option__"}},[a("div",{staticStyle:{width:"100%","text-align":"center",padding:"4px 0",color:"#1890ff",cursor:"pointer"}},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"plus"}}),a("span",[e._v(e._s(e.$t("trading-assistant.form.addSymbol")))])],1)])],2):a("a-select",{attrs:{mode:"multiple",placeholder:e.$t("trading-assistant.placeholders.selectSymbols"),"show-search":"","filter-option":e.filterWatchlistOptionWithAdd,loading:e.loadingWatchlist,getPopupContainer:function(t){return t.parentNode},maxTagCount:3},on:{change:e.handleMultiSymbolChangeWithAdd},model:{value:e.selectedSymbols,callback:function(t){e.selectedSymbols=t},expression:"selectedSymbols"}},[e._l(e.watchlist,function(t){return a("a-select-option",{key:"".concat(t.market,":").concat(t.symbol),attrs:{value:"".concat(t.market,":").concat(t.symbol)}},[a("div",{staticClass:"symbol-option"},[a("a-tag",{staticStyle:{"margin-right":"8px","margin-bottom":"0"},attrs:{color:e.getMarketColor(t.market)}},[e._v(" "+e._s(t.market)+" ")]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.symbol))]),t.name?a("span",{staticClass:"symbol-name-extra"},[e._v(e._s(t.name))]):e._e()],1)])}),a("a-select-option",{key:"__add_symbol_option__",staticClass:"add-symbol-option",attrs:{value:"__add_symbol_option__"}},[a("div",{staticStyle:{width:"100%","text-align":"center",padding:"4px 0",color:"#1890ff",cursor:"pointer"}},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"plus"}}),a("span",[e._v(e._s(e.$t("trading-assistant.form.addSymbol")))])],1)])],2),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.isEditMode?e.$t("trading-assistant.form.symbolHintCrypto"):e.$t("trading-assistant.form.symbolsHint"))+" ")])],1):e._e(),e.isAdvancedMode||e.editingStrategy?a("div",[a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:24,md:12,lg:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.initialCapital")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["initial_capital",{rules:[{required:!0,message:e.$t("trading-assistant.validation.initialCapitalRequired")}],initialValue:1e3}],expression:"['initial_capital', { rules: [{ required: true, message: $t('trading-assistant.validation.initialCapitalRequired') }], initialValue: 1000 }]"}],staticStyle:{width:"100%"},attrs:{min:10,step:100,precision:2}})],1)],1),a("a-col",{attrs:{xs:24,sm:24,md:12,lg:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.marketType")}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["market_type",{initialValue:"swap"}],expression:"['market_type', { initialValue: 'swap' }]"}],on:{change:e.handleMarketTypeChange}},[a("a-radio",{attrs:{value:"swap"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeFutures")))]),a("a-radio",{attrs:{value:"spot"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeSpot")))])],1),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.marketTypeHint"))+" ")])],1)],1)],1),a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:24,md:12,lg:12}},[a("a-form-item",{attrs:{label:"".concat(e.$t("trading-assistant.form.leverage")," (x)")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["leverage",{initialValue:5,rules:[{required:!0,message:e.$t("trading-assistant.validation.leverageRequired")}]}],expression:"['leverage', { initialValue: 5, rules: [{ required: true, message: $t('trading-assistant.validation.leverageRequired') }] }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:"spot"===e.form.getFieldValue("market_type")?1:125,step:1,disabled:"spot"===e.form.getFieldValue("market_type")}}),a("div",{staticClass:"form-item-hint"},["spot"===e.form.getFieldValue("market_type")?a("span",[e._v(" "+e._s(e.$t("trading-assistant.form.spotLeverageFixed"))+" ")]):a("span",[e._v(" "+e._s(e.$t("trading-assistant.form.leverageHint"))+" ")])])],1)],1),a("a-col",{attrs:{xs:24,sm:24,md:12,lg:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.tradeDirection")}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["trade_direction",{initialValue:"long"}],expression:"['trade_direction', { initialValue: 'long' }]"}],attrs:{disabled:"spot"===e.form.getFieldValue("market_type")}},[a("a-radio",{attrs:{value:"long"}},[e._v(e._s(e.$t("trading-assistant.form.tradeDirectionLong")))]),a("a-radio",{attrs:{value:"short",disabled:"spot"===e.form.getFieldValue("market_type")}},[e._v(" "+e._s(e.$t("trading-assistant.form.tradeDirectionShort"))+" ")]),a("a-radio",{attrs:{value:"both",disabled:"spot"===e.form.getFieldValue("market_type")}},[e._v(" "+e._s(e.$t("trading-assistant.form.tradeDirectionBoth"))+" ")])],1),"spot"===e.form.getFieldValue("market_type")?a("div",{staticClass:"form-item-hint",staticStyle:{color:"#ff9800"}},[e._v(" "+e._s(e.$t("trading-assistant.form.spotOnlyLongHint"))+" ")]):e._e()],1)],1)],1),a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:24,md:12,lg:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.klinePeriod")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["timeframe",{initialValue:"15m",rules:[{required:!0}]}],expression:"['timeframe', { initialValue: '15m', rules: [{ required: true }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.selectKlinePeriod"),getPopupContainer:function(t){return t.parentNode}}},[a("a-select-option",{attrs:{value:"1m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1m")))]),a("a-select-option",{attrs:{value:"5m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe5m")))]),a("a-select-option",{attrs:{value:"15m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe15m")))]),a("a-select-option",{attrs:{value:"30m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe30m")))]),a("a-select-option",{attrs:{value:"1H"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1H")))]),a("a-select-option",{attrs:{value:"4H"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe4H")))]),a("a-select-option",{attrs:{value:"1D"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1D")))])],1)],1)],1),a("a-col",{attrs:{xs:24,sm:24,md:12,lg:12}})],1)],1):e._e()],2)],1):e._e(),"script"===e.strategyMode?a("div",[a("a-form",{attrs:{form:e.form,layout:"vertical"}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.strategyName")}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["strategy_name",{rules:[{required:!0,message:e.$t("trading-assistant.validation.strategyNameRequired")}]}],expression:"['strategy_name', { rules: [{ required: true, message: $t('trading-assistant.validation.strategyNameRequired') }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.inputStrategyName")}})],1),a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.symbol")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["symbol",{rules:[{required:!0,message:e.$t("trading-assistant.validation.symbolRequired")}]}],expression:"['symbol', { rules: [{ required: true, message: $t('trading-assistant.validation.symbolRequired') }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.selectSymbol"),"show-search":"","filter-option":e.filterWatchlistOption,loading:e.loadingWatchlist,getPopupContainer:function(t){return t.parentNode}},on:{change:e.handleWatchlistSymbolChange}},e._l(e.watchlist,function(t){return a("a-select-option",{key:"".concat(t.market,":").concat(t.symbol),attrs:{value:"".concat(t.market,":").concat(t.symbol)}},[a("div",{staticClass:"symbol-option"},[a("a-tag",{staticStyle:{"margin-right":"8px","margin-bottom":"0"},attrs:{color:e.getMarketColor(t.market)}},[e._v(" "+e._s(t.market)+" ")]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.symbol))]),t.name?a("span",{staticClass:"symbol-name-extra"},[e._v(e._s(t.name))]):e._e()],1)])}),1)],1),a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.initialCapital")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["initial_capital",{initialValue:1e3,rules:[{required:!0}]}],expression:"['initial_capital', { initialValue: 1000, rules: [{ required: true }] }]"}],staticStyle:{width:"100%"},attrs:{min:10,step:100,precision:2}})],1)],1),a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.klinePeriod")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["timeframe",{initialValue:"15m",rules:[{required:!0}]}],expression:"['timeframe', { initialValue: '15m', rules: [{ required: true }] }]"}],attrs:{getPopupContainer:function(t){return t.parentNode}}},[a("a-select-option",{attrs:{value:"1m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1m")))]),a("a-select-option",{attrs:{value:"5m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe5m")))]),a("a-select-option",{attrs:{value:"15m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe15m")))]),a("a-select-option",{attrs:{value:"30m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe30m")))]),a("a-select-option",{attrs:{value:"1H"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1H")))]),a("a-select-option",{attrs:{value:"4H"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe4H")))]),a("a-select-option",{attrs:{value:"1D"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1D")))])],1)],1)],1)],1),a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.marketType")}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["market_type",{initialValue:"swap"}],expression:"['market_type', { initialValue: 'swap' }]"}]},[a("a-radio",{attrs:{value:"swap"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeFutures")))]),a("a-radio",{attrs:{value:"spot"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeSpot")))])],1)],1)],1),a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:"".concat(e.$t("trading-assistant.form.leverage")," (x)")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["leverage",{initialValue:5}],expression:"['leverage', { initialValue: 5 }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:125,step:1}})],1)],1)],1)],1)],1):e._e()]),"script"===e.strategyMode?a("div",{directives:[{name:"show",rawName:"v-show",value:1===e.currentStep,expression:"currentStep === 1"}],staticClass:"step-content"},[a("strategy-editor",{ref:"strategyEditor",attrs:{"is-dark":e.isDarkTheme,"user-id":1,visible:e.showFormModal&&"script"===e.strategyMode&&1===e.currentStep,"initial-template-key":e.pendingScriptTemplateKey},model:{value:e.strategyCode,callback:function(t){e.strategyCode=t},expression:"strategyCode"}})],1):e._e(),a("div",{directives:[{name:"show",rawName:"v-show",value:"script"!==e.strategyMode&&1===e.currentStep,expression:"strategyMode !== 'script' && currentStep === 1"}],staticClass:"step-content"},["indicator"===e.strategyType?a("div",[a("a-form",{attrs:{form:e.form,layout:"vertical"}},[a("a-collapse",{staticStyle:{background:"#fafafa"},attrs:{bordered:!1},model:{value:e.backtestCollapseKeys,callback:function(t){e.backtestCollapseKeys=t},expression:"backtestCollapseKeys"}},[a("a-collapse-panel",{key:"risk",attrs:{header:e.$t("dashboard.indicator.backtest.panel.risk")}},[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.stopLossPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["stop_loss_pct",{initialValue:3}],expression:"['stop_loss_pct', { initialValue: 3 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.01,precision:4}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.takeProfitPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["take_profit_pct",{initialValue:6}],expression:"['take_profit_pct', { initialValue: 6 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trailingEnabled")}},[a("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["trailing_enabled",{valuePropName:"checked",initialValue:!1}],expression:"['trailing_enabled', { valuePropName: 'checked', initialValue: false }]"}],on:{change:e.onTrailingToggle}})],1)],1),a("a-col",{attrs:{span:12}})],1),e.trailingEnabledUi?[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trailingStopPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trailing_stop_pct",{initialValue:0}],expression:"['trailing_stop_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.01,precision:4}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trailingActivationPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trailing_activation_pct",{initialValue:0}],expression:"['trailing_activation_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1)],1)]:e._e()],2),a("a-collapse-panel",{key:"scale",attrs:{header:e.$t("dashboard.indicator.backtest.panel.scale")}},[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendAddEnabled")}},[a("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_add_enabled",{valuePropName:"checked",initialValue:!1}],expression:"['trend_add_enabled', { valuePropName: 'checked', initialValue: false }]"}],on:{change:e.onTrendAddToggle}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.dcaAddEnabled")}},[a("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["dca_add_enabled",{valuePropName:"checked",initialValue:!1}],expression:"['dca_add_enabled', { valuePropName: 'checked', initialValue: false }]"}],on:{change:e.onDcaAddToggle}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendAddStepPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_add_step_pct",{initialValue:0}],expression:"['trend_add_step_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4},on:{change:e.onScaleParamsChange}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.dcaAddStepPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["dca_add_step_pct",{initialValue:0}],expression:"['dca_add_step_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4},on:{change:e.onScaleParamsChange}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendAddSizePct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_add_size_pct",{initialValue:0}],expression:"['trend_add_size_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4},on:{change:e.onScaleParamsChange}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.dcaAddSizePct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["dca_add_size_pct",{initialValue:0}],expression:"['dca_add_size_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4},on:{change:e.onScaleParamsChange}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendAddMaxTimes")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_add_max_times",{initialValue:0}],expression:"['trend_add_max_times', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:50,step:1,precision:0},on:{change:e.onScaleParamsChange}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.dcaAddMaxTimes")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["dca_add_max_times",{initialValue:0}],expression:"['dca_add_max_times', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:50,step:1,precision:0},on:{change:e.onScaleParamsChange}})],1)],1)],1)],1),a("a-collapse-panel",{key:"reduce",attrs:{header:e.$t("dashboard.indicator.backtest.panel.reduce")}},[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendReduceEnabled")}},[a("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_reduce_enabled",{valuePropName:"checked",initialValue:!1}],expression:"['trend_reduce_enabled', { valuePropName: 'checked', initialValue: false }]"}]})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.adverseReduceEnabled")}},[a("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverse_reduce_enabled",{valuePropName:"checked",initialValue:!1}],expression:"['adverse_reduce_enabled', { valuePropName: 'checked', initialValue: false }]"}]})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendReduceStepPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_reduce_step_pct",{initialValue:0}],expression:"['trend_reduce_step_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.adverseReduceStepPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverse_reduce_step_pct",{initialValue:0}],expression:"['adverse_reduce_step_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendReduceSizePct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_reduce_size_pct",{initialValue:0}],expression:"['trend_reduce_size_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.adverseReduceSizePct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverse_reduce_size_pct",{initialValue:0}],expression:"['adverse_reduce_size_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendReduceMaxTimes")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_reduce_max_times",{initialValue:0}],expression:"['trend_reduce_max_times', { initialValue: 0 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:50,step:1,precision:0}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.adverseReduceMaxTimes")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverse_reduce_max_times",{initialValue:0}],expression:"['adverse_reduce_max_times', { initialValue: 0 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:50,step:1,precision:0}})],1)],1)],1)],1),a("a-collapse-panel",{key:"position",attrs:{header:e.$t("dashboard.indicator.backtest.panel.position")}},[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.entryPct"),help:e.$t("dashboard.indicator.backtest.hint.entryPctMax",{maxPct:Number(e.entryPctMaxUi||0).toFixed(0)})}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["entry_pct",{initialValue:100}],expression:"['entry_pct', { initialValue: 100 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:e.entryPctMaxUi,step:.1,precision:4},on:{change:e.onEntryPctChange}})],1)],1),a("a-col",{attrs:{span:12}})],1)],1)],1),a("div",{staticClass:"ai-filter-box"},[a("div",{staticClass:"ai-filter-header"},[a("div",{staticClass:"ai-filter-title"},[a("a-icon",{attrs:{type:"robot"}}),a("span",[e._v(e._s(e.$t("trading-assistant.form.enableAiFilter")))])],1),a("a-switch",{attrs:{checked:e.aiFilterEnabledUi},on:{change:e.onAiFilterToggle}})],1),a("div",{staticClass:"ai-filter-hint"},[e._v(e._s(e.$t("trading-assistant.form.enableAiFilterHint")))])])],1)],1):e._e()]),a("div",{directives:[{name:"show",rawName:"v-show",value:2===e.currentStep,expression:"currentStep === 2"}],staticClass:"step-content"},[a("a-form",{attrs:{form:e.form,layout:"vertical",autocomplete:"off"}},[a("div",{staticClass:"execution-step-layout"},[a("div",{staticClass:"execution-step-hero"},[a("div",{staticClass:"simple-mode-kicker"},[e._v(e._s(e.$t("trading-assistant.form.step2HeroTitle")))]),a("div",{staticClass:"execution-step-hero-desc"},[e._v(e._s(e.$t("trading-assistant.form.step2HeroDesc")))])]),a("div",{staticClass:"execution-section-card"},[a("div",{staticClass:"section-block-title"},[a("span",[e._v(e._s(e.$t("trading-assistant.form.executionSectionTitle")))]),a("span",{staticClass:"section-block-desc"},[e._v(e._s(e.$t("trading-assistant.form.executionSectionDesc")))])]),a("a-form-item",{staticClass:"compact-form-item",attrs:{label:e.$t("trading-assistant.form.executionMode")}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["execution_mode",{initialValue:"signal"}],expression:"['execution_mode', { initialValue: 'signal' }]"}],staticStyle:{display:"none"}}),a("div",{staticClass:"execution-mode-cards"},[a("div",{class:["execution-mode-card",{active:"signal"===e.executionModeUi}],on:{click:function(t){return e.setExecutionModeUi("signal")}}},[a("div",{staticClass:"execution-mode-card-icon signal"},[a("a-icon",{attrs:{type:"notification"}})],1),a("div",{staticClass:"execution-mode-card-body"},[a("div",{staticClass:"execution-mode-card-title"},[e._v(e._s(e.$t("trading-assistant.form.executionModeSignal")))]),a("div",{staticClass:"execution-mode-card-desc"},[e._v(e._s(e.$t("trading-assistant.form.executionModeSignalDesc")))])]),"signal"===e.executionModeUi?a("a-icon",{staticClass:"execution-mode-card-check",attrs:{type:"check-circle",theme:"filled"}}):e._e()],1),a("div",{class:["execution-mode-card","live-card",{active:"live"===e.executionModeUi,disabled:!e.canUseLiveTrading}],on:{click:function(t){e.canUseLiveTrading&&e.setExecutionModeUi("live")}}},[a("div",{staticClass:"execution-mode-card-icon live"},[a("a-icon",{attrs:{type:"thunderbolt"}})],1),a("div",{staticClass:"execution-mode-card-body"},[a("div",{staticClass:"execution-mode-card-title"},[e._v(e._s(e.$t("trading-assistant.form.executionModeLive")))]),a("div",{staticClass:"execution-mode-card-desc"},[e._v(" "+e._s(e.canUseLiveTrading?e.$t("trading-assistant.form.executionModeLiveDesc"):e.$t("trading-assistant.form.liveTradingNotSupportedHint"))+" ")])]),"live"===e.executionModeUi&&e.canUseLiveTrading?a("a-icon",{staticClass:"execution-mode-card-check",attrs:{type:"check-circle",theme:"filled"}}):e._e()],1)]),e.canUseLiveTrading?e._e():a("div",{staticClass:"form-item-hint execution-warn-text"},[e._v(" "+e._s(e.$t("trading-assistant.form.liveTradingNotSupportedHint"))+" ")])],1),"live"===e.executionModeUi&&e.canUseLiveTrading?a("a-alert",{staticClass:"section-inline-alert",attrs:{type:"warning",showIcon:"",message:e.$t("trading-assistant.liveDisclaimer.title"),description:e.$t("trading-assistant.liveDisclaimer.content")}}):e._e()],1),a("div",{staticClass:"execution-section-card"},[a("div",{staticClass:"section-block-title"},[a("span",[e._v(e._s(e.$t("trading-assistant.form.notificationSectionTitle")))]),a("span",{staticClass:"section-block-desc"},[e._v(e._s(e.$t("trading-assistant.form.notificationSectionDesc")))])]),a("a-form-item",{staticClass:"compact-form-item",attrs:{label:e.$t("trading-assistant.form.notifyChannels")}},[a("a-checkbox-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["notify_channels",{initialValue:["browser"]}],expression:"['notify_channels', { initialValue: ['browser'] }]"}],staticClass:"notify-channel-grid",on:{change:e.onNotifyChannelsChange}},[a("a-checkbox",{attrs:{value:"browser"}},[e._v(e._s(e.$t("trading-assistant.notify.browser")))]),a("a-checkbox",{attrs:{value:"email"}},[e._v(e._s(e.$t("trading-assistant.notify.email")))]),a("a-checkbox",{attrs:{value:"telegram"}},[e._v(e._s(e.$t("trading-assistant.notify.telegram")))]),a("a-checkbox",{attrs:{value:"discord"}},[e._v(e._s(e.$t("trading-assistant.notify.discord")))]),a("a-checkbox",{attrs:{value:"webhook"}},[e._v(e._s(e.$t("trading-assistant.notify.webhook")))]),a("a-checkbox",{attrs:{value:"phone"}},[e._v(e._s(e.$t("trading-assistant.notify.phone")))])],1),a("div",{staticClass:"form-item-hint"},[e._v(e._s(e.$t("trading-assistant.form.notifyChannelsHint")))])],1),e.unconfiguredChannels.length>0?a("a-alert",{staticClass:"section-inline-alert",attrs:{type:"warning",showIcon:""},scopedSlots:e._u([{key:"message",fn:function(){return[a("span",[e._v(" "+e._s(e.$t("trading-assistant.form.notificationConfigMissing",{channels:e.unconfiguredChannels.join(", ")}))+" "),a("router-link",{staticStyle:{"margin-left":"8px"},attrs:{to:"/profile"}},[a("a-icon",{attrs:{type:"setting"}}),e._v(" "+e._s(e.$t("trading-assistant.form.goToProfile"))+" ")],1)],1)]},proxy:!0}],null,!1,2930252607)}):e.notifyChannelsUi.length>0&&!e.notifyChannelsUi.includes("browser")||e.notifyChannelsUi.length>1?a("a-alert",{staticClass:"section-inline-alert",attrs:{type:"info",showIcon:""},scopedSlots:e._u([{key:"message",fn:function(){return[a("span",[e._v(" "+e._s(e.$t("trading-assistant.form.notificationFromProfile"))+" "),a("router-link",{staticStyle:{"margin-left":"8px"},attrs:{to:"/profile"}},[a("a-icon",{attrs:{type:"setting"}}),e._v(" "+e._s(e.$t("trading-assistant.form.goToProfile"))+" ")],1)],1)]},proxy:!0}])}):e._e()],1),"live"===e.executionModeUi&&e.canUseLiveTrading?a("div",{staticClass:"execution-section-card risk-section-card"},[a("div",{staticClass:"section-block-title"},[a("span",[e._v(e._s(e.$t("trading-assistant.form.riskSectionTitle")))]),a("span",{staticClass:"section-block-desc"},[e._v(e._s(e.$t("trading-assistant.form.riskSectionDesc")))])]),a("a-alert",{staticClass:"section-inline-alert",attrs:{type:"warning","show-icon":"",message:e.$t("trading-assistant.form.liveTradingConfigTitle"),description:e.$t("trading-assistant.form.liveTradingConfigHint")}})],1):e._e(),"live"===e.executionModeUi&&e.canUseLiveTrading?a("div",{staticClass:"execution-section-card"},[a("div",{staticClass:"section-block-title"},[a("span",[e._v(e._s(e.$t("trading-assistant.form.liveConnectionSectionTitle")))]),a("span",{staticClass:"section-block-desc"},[e._v(e._s(e.$t("trading-assistant.form.liveConnectionSectionDesc")))])]),a("a-form-item",{staticClass:"compact-form-item",attrs:{label:e.$t("trading-assistant.form.savedCredential")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["credential_id",{rules:[{required:!0,message:e.$t("profile.exchange.noCredentialHint")}],getValueFromEvent:function(t){return t||void 0}}],expression:"['credential_id', {\n rules: [{ required: true, message: $t('profile.exchange.noCredentialHint') }],\n getValueFromEvent: (val) => val || undefined\n }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.selectSavedCredential"),"allow-clear":"","show-search":"","option-filter-prop":"children",loading:e.loadingExchangeCredentials},on:{change:e.handleCredentialSelectChange}},e._l(e.filteredExchangeCredentials,function(t){return a("a-select-option",{key:t.id,attrs:{value:t.id}},[e._v(" "+e._s(e.formatCredentialLabel(t))+" ")])}),1),a("div",{staticClass:"form-item-hint",staticStyle:{"margin-top":"6px"}},[a("router-link",{attrs:{to:"/profile?tab=exchange"}},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"setting"}}),e._v(e._s(e.$t("profile.exchange.goToManage"))+" ")],1)],1)],1)],1):e._e()])])],1)])],1),a("template",{slot:"footer"},[a("a-button",{on:{click:e.handleCloseModal}},[e._v(e._s(e.$t("trading-assistant.form.cancel")))]),a("a-button",{directives:[{name:"show",rawName:"v-show",value:e.currentStep>0,expression:"currentStep > 0"}],on:{click:e.handlePrev}},[e._v(" "+e._s(e.$t("trading-assistant.form.prev"))+" ")]),a("a-button",{directives:[{name:"show",rawName:"v-show",value:e.currentStep<2,expression:"currentStep < 2"}],attrs:{type:"primary",loading:e.saving},on:{click:e.handleNext}},[e._v(" "+e._s(e.$t("trading-assistant.form.next"))+" ")]),a("a-button",{directives:[{name:"show",rawName:"v-show",value:2===e.currentStep,expression:"currentStep === 2"}],attrs:{type:"primary",loading:e.saving},on:{click:e.handleSubmit}},[e._v(" "+e._s(e.editingStrategy?e.$t("trading-assistant.form.confirmEdit"):e.$t("trading-assistant.form.confirmCreate"))+" ")])],1)],2),a("a-modal",{attrs:{title:e.$t("trading-assistant.form.addSymbolTitle"),visible:e.showAddSymbolModal,confirmLoading:e.addingSymbol,width:"600px",okText:e.$t("trading-assistant.form.confirmAdd"),cancelText:e.$t("trading-assistant.form.cancel"),maskClosable:!1,keyboard:!1},on:{ok:e.handleConfirmAddSymbol,cancel:e.handleCloseAddSymbolModal}},[a("div",{staticClass:"add-symbol-modal-content"},[a("a-tabs",{staticClass:"market-tabs",on:{change:e.handleAddSymbolMarketChange},model:{value:e.addSymbolMarket,callback:function(t){e.addSymbolMarket=t},expression:"addSymbolMarket"}},e._l(e.addSymbolMarketTypes,function(t){return a("a-tab-pane",{key:t.value,attrs:{tab:e.$t(t.i18nKey||"dashboard.analysis.market.".concat(t.value))}})}),1),a("div",{staticClass:"symbol-search-section"},[a("a-input-search",{attrs:{placeholder:e.$t("dashboard.analysis.modal.addStock.searchOrInputPlaceholder"),loading:e.searchingSymbol,size:"large","allow-clear":""},on:{search:e.handleSearchSymbol,change:e.handleSymbolSearchInputChange},model:{value:e.addSymbolKeyword,callback:function(t){e.addSymbolKeyword=t},expression:"addSymbolKeyword"}},[a("a-button",{attrs:{slot:"enterButton",type:"primary",icon:"search"},slot:"enterButton"},[e._v(" "+e._s(e.$t("dashboard.analysis.modal.addStock.search"))+" ")])],1)],1),e.symbolSearchResults.length>0?a("div",{staticClass:"search-results-section"},[a("div",{staticClass:"section-title"},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"search"}}),e._v(" "+e._s(e.$t("dashboard.analysis.modal.addStock.searchResults"))+" ")],1),a("a-list",{staticClass:"symbol-list",attrs:{"data-source":e.symbolSearchResults,loading:e.searchingSymbol,size:"small"},scopedSlots:e._u([{key:"renderItem",fn:function(t){return a("a-list-item",{staticClass:"symbol-list-item",on:{click:function(a){return e.handleSelectAddSymbol(t)}}},[a("a-list-item-meta",[a("template",{slot:"title"},[a("div",{staticClass:"symbol-item-content"},[a("span",{staticClass:"symbol-code"},[e._v(e._s(t.symbol))]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.name))]),t.exchange?a("a-tag",{staticStyle:{"margin-left":"8px"},attrs:{size:"small",color:"blue"}},[e._v(" "+e._s(t.exchange)+" ")]):e._e()],1)])],2)],1)}}],null,!1,2801225082)})],1):e._e(),a("div",{staticClass:"hot-symbols-section"},[a("div",{staticClass:"section-title"},[a("a-icon",{staticStyle:{color:"#ff4d4f","margin-right":"4px"},attrs:{type:"fire"}}),e._v(" "+e._s(e.$t("dashboard.analysis.modal.addStock.hotSymbols"))+" ")],1),a("a-spin",{attrs:{spinning:e.loadingHotSymbols}},[e.hotSymbols.length>0?a("a-list",{staticClass:"symbol-list",attrs:{"data-source":e.hotSymbols,size:"small"},scopedSlots:e._u([{key:"renderItem",fn:function(t){return a("a-list-item",{staticClass:"symbol-list-item",on:{click:function(a){return e.handleSelectAddSymbol(t)}}},[a("a-list-item-meta",[a("template",{slot:"title"},[a("div",{staticClass:"symbol-item-content"},[a("span",{staticClass:"symbol-code"},[e._v(e._s(t.symbol))]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.name))]),t.exchange?a("a-tag",{staticStyle:{"margin-left":"8px"},attrs:{size:"small",color:"orange"}},[e._v(" "+e._s(t.exchange)+" ")]):e._e()],1)])],2)],1)}}],null,!1,3959834868)}):a("a-empty",{attrs:{description:e.$t("dashboard.analysis.modal.addStock.noHotSymbols"),image:!1}})],1)],1),e.selectedAddSymbol?a("div",{staticClass:"selected-symbol-section"},[a("div",{staticClass:"section-title"},[a("a-icon",{staticStyle:{color:"#52c41a","margin-right":"4px"},attrs:{type:"check-circle"}}),e._v(" "+e._s(e.$t("dashboard.analysis.modal.addStock.selectedSymbol"))+" ")],1),a("div",{staticClass:"selected-symbol-info"},[a("a-tag",{staticStyle:{"margin-right":"8px"},attrs:{color:e.getMarketColor(e.addSymbolMarket)}},[e._v(e._s(e.addSymbolMarket))]),a("span",{staticClass:"symbol-code"},[e._v(e._s(e.selectedAddSymbol.symbol))]),e.selectedAddSymbol.name?a("span",{staticClass:"symbol-name"},[e._v(e._s(e.selectedAddSymbol.name))]):e._e()],1)]):e._e()],1)])],1)],1)],1)},i=[],r=a(15863),n=a(44735),o=a(81127),l=a(56252),c=a(2403),d=a(57532),u=a(76338),p=(a(2008),a(50113),a(23418),a(62062),a(34782),a(26910),a(79432),a(26099),a(16034),a(31415),a(47764),a(42762),a(23500),a(62953),a(36911)),m=a(35038),g=a(42430),h=a(84841),_=a(55434),y=a(75769),f=function(){var t=this,e=t._self._c;return e("div",{staticClass:"trading-records"},[0!==t.records.length||t.loading?e("a-table",{attrs:{columns:t.columns,"data-source":t.records,loading:t.loading,pagination:{pageSize:10},size:"small",rowKey:"id",scroll:{x:800}},scopedSlots:t._u([{key:"type",fn:function(a){return[e("a-tag",{attrs:{color:t.getTradeTypeColor(a)}},[t._v(" "+t._s(t.getTradeTypeText(a))+" ")])]}},{key:"price",fn:function(e){return[t._v(" $"+t._s(parseFloat(e).toFixed(4))+" ")]}},{key:"amount",fn:function(e){return[t._v(" "+t._s(parseFloat(e).toFixed(4))+" ")]}},{key:"value",fn:function(e){return[t._v(" $"+t._s(parseFloat(e).toFixed(2))+" ")]}},{key:"profit",fn:function(a,s){return[e("span",{style:{color:a>0?"#52c41a":a<0?"#f5222d":"#666"}},[t._v(" "+t._s(t.formatProfit(a,s))+" ")])]}},{key:"commission",fn:function(e){return[t._v(" "+t._s(t.formatCommission(e))+" ")]}},{key:"time",fn:function(e,a){return[t._v(" "+t._s(t.formatTime(a.created_at||e))+" ")]}}])}):e("div",{staticClass:"empty-state"},[e("a-empty",{attrs:{description:t.$t("trading-assistant.table.noPositions")}})],1)],1)},v=[],b=(a(27495),{name:"TradingRecords",props:{strategyId:{type:Number,required:!0},loading:{type:Boolean,default:!1}},computed:{columns:function(){return[{title:this.$t("trading-assistant.table.time"),dataIndex:"created_at",key:"created_at",width:180,scopedSlots:{customRender:"time"}},{title:this.$t("dashboard.indicator.backtest.tradeType"),dataIndex:"type",key:"type",width:140,scopedSlots:{customRender:"type"}},{title:this.$t("trading-assistant.table.price"),dataIndex:"price",key:"price",width:120,scopedSlots:{customRender:"price"}},{title:this.$t("trading-assistant.table.amount"),dataIndex:"amount",key:"amount",width:120,scopedSlots:{customRender:"amount"}},{title:this.$t("trading-assistant.table.value"),dataIndex:"value",key:"value",width:120,scopedSlots:{customRender:"value"}},{title:this.$t("dashboard.indicator.backtest.profit"),dataIndex:"profit",key:"profit",width:120,scopedSlots:{customRender:"profit"}},{title:this.$t("trading-assistant.table.commission"),dataIndex:"commission",key:"commission",width:100,scopedSlots:{customRender:"commission"}}]}},data:function(){return{records:[]}},watch:{strategyId:{handler:function(t){t&&this.loadRecords()},immediate:!0}},methods:{loadRecords:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.strategyId){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,(0,p.tq)(t.strategyId);case 2:a=e.v,1===a.code?t.records=(a.data.trades||[]).map(function(t){return(0,u.A)((0,u.A)({},t),{},{time:t.created_at||t.time})}):t.$message.error(a.msg||t.$t("trading-assistant.messages.loadTradesFailed")),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[1,3]])}))()},formatTime:function(t){if(!t)return"--";try{var e;if("number"===typeof t){var a=t<1e12?1e3*t:t;e=new Date(a)}else{if("string"!==typeof t)return"--";if(/^\d+$/.test(t)){var s=parseInt(t,10),i=s<1e12?1e3*s:s;e=new Date(i)}else e=new Date(t)}if(isNaN(e.getTime()))return"--";var r=this.$i18n.locale||"zh-CN",n={"zh-CN":"zh-CN","zh-TW":"zh-TW","en-US":"en-US"};return e.toLocaleString(n[r]||"zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}catch(o){return"--"}},getTradeTypeColor:function(t){var e={buy:"green",sell:"red",liquidation:"orange",open_long:"green",add_long:"cyan",close_long:"orange",close_long_stop:"red",close_long_profit:"lime",open_short:"red",add_short:"magenta",close_short:"blue",close_short_stop:"red",close_short_profit:"cyan"};return e[t]||"default"},getTradeTypeText:function(t){var e={buy:this.$t("dashboard.indicator.backtest.buy"),sell:this.$t("dashboard.indicator.backtest.sell"),liquidation:this.$t("dashboard.indicator.backtest.liquidation"),open_long:this.$t("dashboard.indicator.backtest.openLong"),add_long:this.$t("dashboard.indicator.backtest.addLong"),close_long:this.$t("dashboard.indicator.backtest.closeLong"),close_long_stop:this.$t("dashboard.indicator.backtest.closeLongStop"),close_long_profit:this.$t("dashboard.indicator.backtest.closeLongProfit"),open_short:this.$t("dashboard.indicator.backtest.openShort"),add_short:this.$t("dashboard.indicator.backtest.addShort"),close_short:this.$t("dashboard.indicator.backtest.closeShort"),close_short_stop:this.$t("dashboard.indicator.backtest.closeShortStop"),close_short_profit:this.$t("dashboard.indicator.backtest.closeShortProfit")};return e[t]||t},formatMoney:function(t){if(null===t||void 0===t)return"--";var e=t>=0?"+":"-";return"".concat(e,"$").concat(Math.abs(t).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}))},formatProfit:function(t,e){if(null===t||void 0===t)return"--";var a=parseFloat(t),s=["open_long","open_short","add_long","add_short"];return 0===a&&e&&s.includes(e.type)?"--":Math.abs(a)<1e-6?e&&s.includes(e.type)?"--":"$0.00":this.formatMoney(a)},formatCommission:function(t){if(null===t||void 0===t)return"--";var e=parseFloat(t);return isNaN(e)||Math.abs(e)<1e-6?"--":"$".concat(e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:6}))}}}),x=b,C=a(845),k=(0,C.A)(x,f,v,!1,null,"a5bdef7e",null),S=k.exports,w=function(){var t=this,e=t._self._c;return e("div",{staticClass:"position-records"},[0!==t.positions.length||t.loading?e("a-table",{attrs:{columns:t.columns,"data-source":t.positions,loading:t.loading,pagination:!1,size:"small",rowKey:"id",scroll:{x:800}},scopedSlots:t._u([{key:"symbol",fn:function(a,s){return[e("strong",[t._v(t._s(s.symbol||a))])]}},{key:"side",fn:function(a,s){return[e("a-tag",{attrs:{color:"long"===(s.side||a)?"green":"red"}},[t._v(" "+t._s("long"===(s.side||a)?t.$t("trading-assistant.table.long"):t.$t("trading-assistant.table.short"))+" ")])]}},{key:"entryPrice",fn:function(a,s){return[t.hasValidPrice(s.entry_price||a)?e("span",[t._v(" $"+t._s(parseFloat(s.entry_price||a).toFixed(4))+" ")]):e("span",[t._v("--")])]}},{key:"currentPrice",fn:function(e,a){return[t._v(" $"+t._s(parseFloat(a.current_price||e||0).toFixed(4))+" ")]}},{key:"size",fn:function(e,a){return[t._v(" "+t._s(parseFloat(a.size||e||0).toFixed(4))+" ")]}},{key:"unrealizedPnl",fn:function(a,s){return[e("span",{class:{profit:parseFloat(s.unrealized_pnl||a||0)>0,loss:parseFloat(s.unrealized_pnl||a||0)<0}},[t._v(" $"+t._s(parseFloat(s.unrealized_pnl||a||0).toFixed(2))+" ")])]}},{key:"pnlPercent",fn:function(a,s){return[e("span",{class:{profit:parseFloat(s.pnl_percent||a||0)>0,loss:parseFloat(s.pnl_percent||a||0)<0}},[t._v(" "+t._s(parseFloat(s.pnl_percent||a||0).toFixed(2))+"% ")])]}}])}):e("div",{staticClass:"empty-state"},[e("a-empty",{attrs:{description:t.$t("trading-assistant.table.noPositions")}})],1)],1)},$=[],T=(a(25428),a(38781),{name:"PositionRecords",props:{strategyId:{type:Number,required:!0},marketType:{type:String,default:"swap"},leverage:{type:[Number,String],default:1},loading:{type:Boolean,default:!1}},data:function(){return{positions:[]}},computed:{columns:function(){return[{title:this.$t("trading-assistant.table.symbol"),dataIndex:"symbol",key:"symbol",width:120,scopedSlots:{customRender:"symbol"}},{title:this.$t("trading-assistant.table.side"),dataIndex:"side",key:"side",width:80,scopedSlots:{customRender:"side"}},{title:this.$t("trading-assistant.table.size"),dataIndex:"size",key:"size",width:120,scopedSlots:{customRender:"size"}},{title:this.$t("trading-assistant.table.entryPrice"),dataIndex:"entry_price",key:"entry_price",width:120,scopedSlots:{customRender:"entryPrice"}},{title:this.$t("trading-assistant.table.currentPrice"),dataIndex:"current_price",key:"current_price",width:120,scopedSlots:{customRender:"currentPrice"}},{title:this.$t("trading-assistant.table.unrealizedPnl"),dataIndex:"unrealized_pnl",key:"unrealized_pnl",width:120,scopedSlots:{customRender:"unrealizedPnl"}},{title:this.$t("trading-assistant.table.pnlPercent"),dataIndex:"pnl_percent",key:"pnl_percent",width:100,scopedSlots:{customRender:"pnlPercent"}}]}},watch:{strategyId:{handler:function(t){t?(this.loadPositions(),this.startPolling()):this.stopPolling()},immediate:!0}},beforeDestroy:function(){this.stopPolling()},methods:{loadPositions:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.strategyId){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,(0,p.oK)(t.strategyId);case 2:a=e.v,1===a.code?(s=a.data.positions||[],t.positions=s.map(function(e,a){var s=String(t.marketType||"swap").toLowerCase(),i=parseFloat(t.leverage);(!isFinite(i)||i<=0)&&(i=1),"spot"===s&&(i=1);var r=parseFloat(e.entry_price||e.entryPrice||0),n=parseFloat(e.size||"0")||0,o=parseFloat(e.unrealized_pnl||e.unrealizedPnl||"0")||0,l=parseFloat(e.pnl_percent||e.pnlPercent||"0")||0;r>0&&n>0?l=o/(r*n)*100*i:"spot"!==s&&(l*=i);var c={id:e.id||a,symbol:e.symbol||"",side:e.side||"long",size:n>0?n.toString():"0",entry_price:r>0?r.toString():"0",current_price:e.current_price||e.currentPrice||"0",unrealized_pnl:e.unrealized_pnl||e.unrealizedPnl||"0",pnl_percent:l,updated_at:e.updated_at||e.updatedAt||""};return c})):t.positions=[],e.n=4;break;case 3:e.p=3,e.v,t.positions=[];case 4:return e.a(2)}},e,null,[[1,3]])}))()},hasValidPrice:function(t){var e=parseFloat(t);return Number.isFinite(e)&&e>0},startPolling:function(){var t=this;this.stopPolling(),this.pollingTimer=setInterval(function(){t.loadPositions()},5e3)},stopPolling:function(){this.pollingTimer&&(clearInterval(this.pollingTimer),this.pollingTimer=null)}}}),A=T,P=(0,C.A)(A,w,$,!1,null,"2abcf4f1",null),M=P.exports,F=function(){var t=this,e=t._self._c;return e("div",{staticClass:"strategy-type-selector",class:{"theme-dark":t.isDark}},[e("div",{staticClass:"selector-header"},[e("h3",[t._v(t._s(t.$t("trading-assistant.selectMode")))]),e("p",{staticClass:"selector-hint"},[t._v(t._s(t.$t("trading-assistant.selectModeHint")))])]),e("div",{staticClass:"mode-cards"},[e("div",{staticClass:"mode-card",class:{selected:"signal"===t.selected},on:{click:function(e){return t.$emit("select","signal")}}},[e("div",{staticClass:"card-icon signal-icon"},[e("a-icon",{attrs:{type:"line-chart"}})],1),e("div",{staticClass:"card-body"},[e("div",{staticClass:"card-badge-row"},[e("span",{staticClass:"card-badge"},[t._v(t._s(t.$t("trading-assistant.strategyMode.signalBadge")))])]),e("h4",[t._v(t._s(t.$t("trading-assistant.strategyMode.signal")))]),e("p",{staticClass:"card-desc"},[t._v(t._s(t.$t("trading-assistant.strategyMode.signalDesc")))]),e("ul",{staticClass:"card-features"},[e("li",[e("a-icon",{attrs:{type:"check"}}),t._v(" "+t._s(t.$t("trading-assistant.strategyMode.signalFeature1")))],1),e("li",[e("a-icon",{attrs:{type:"check"}}),t._v(" "+t._s(t.$t("trading-assistant.strategyMode.signalFeature2")))],1),e("li",[e("a-icon",{attrs:{type:"check"}}),t._v(" "+t._s(t.$t("trading-assistant.strategyMode.signalFeature3")))],1)])]),e("a-button",{staticClass:"card-btn",attrs:{type:"primary",ghost:""},on:{click:function(e){return e.stopPropagation(),t.$emit("select","signal")}}},[t._v(" "+t._s(t.$t("trading-assistant.useThisMode"))+" ")])],1),e("div",{staticClass:"mode-card",class:{selected:"script"===t.selected},on:{click:function(e){return t.$emit("select","script")}}},[e("div",{staticClass:"card-icon script-icon"},[e("a-icon",{attrs:{type:"code"}})],1),e("div",{staticClass:"card-body"},[e("div",{staticClass:"card-badge-row"},[e("span",{staticClass:"card-badge card-badge--script"},[t._v(t._s(t.$t("trading-assistant.strategyMode.scriptBadge")))])]),e("h4",[t._v(t._s(t.$t("trading-assistant.strategyMode.script")))]),e("p",{staticClass:"card-desc"},[t._v(t._s(t.$t("trading-assistant.strategyMode.scriptDesc")))]),e("ul",{staticClass:"card-features"},[e("li",[e("a-icon",{attrs:{type:"check"}}),t._v(" "+t._s(t.$t("trading-assistant.strategyMode.scriptFeature1")))],1),e("li",[e("a-icon",{attrs:{type:"check"}}),t._v(" "+t._s(t.$t("trading-assistant.strategyMode.scriptFeature2")))],1),e("li",[e("a-icon",{attrs:{type:"check"}}),t._v(" "+t._s(t.$t("trading-assistant.strategyMode.scriptFeature3")))],1)])]),e("a-button",{staticClass:"card-btn",attrs:{type:"primary",ghost:""},on:{click:function(e){return e.stopPropagation(),t.$emit("select","script")}}},[t._v(" "+t._s(t.$t("trading-assistant.useThisMode"))+" ")])],1)]),e("div",{staticClass:"template-quick-start"},[e("a-divider",[e("span",{staticClass:"divider-text"},[t._v(t._s(t.$t("trading-assistant.fromTemplate")))])]),e("div",{staticClass:"template-tags"},t._l(t.templates,function(a){return e("a-tag",{key:a.key,staticClass:"template-tag",on:{click:function(e){return t.$emit("use-template",a.key)}}},[e("span",{staticClass:"tpl-icon"},[t._v(t._s(a.icon))]),t._v(" "+t._s(t.$t("trading-assistant.template.".concat(a.key)))+" ")])}),1)],1)])},I=[],N=(a(84864),a(25440),[{key:"trendFollowing",icon:"📈",code:"\"\"\"\nTrend Following Strategy\nUses EMA crossover with dynamic stop-loss / take-profit.\n\"\"\"\n\ndef on_init(ctx):\n ctx.fast_period = ctx.param('fast_period', 12)\n ctx.slow_period = ctx.param('slow_period', 26)\n ctx.position_pct = ctx.param('position_pct', 0.95)\n ctx.stop_pct = ctx.param('stop_pct', 0.03)\n ctx.take_profit_pct = ctx.param('take_profit_pct', 0.08)\n\ndef on_bar(ctx, bar):\n bars = ctx.bars(ctx.slow_period + 5)\n if len(bars) < ctx.slow_period:\n return\n\n closes = [b['close'] for b in bars]\n fast_ema = _ema(closes, ctx.fast_period)\n slow_ema = _ema(closes, ctx.slow_period)\n price = bar['close']\n\n if fast_ema > slow_ema and not ctx.position:\n qty = (ctx.equity * ctx.position_pct) / price\n ctx.buy(price, qty)\n ctx.log(f\"BUY at {price:.2f}\")\n\n elif fast_ema < slow_ema and ctx.position and ctx.position['side'] == 'long':\n ctx.close_position()\n ctx.log(f\"SELL at {price:.2f}\")\n\n if ctx.position and ctx.position['side'] == 'long':\n entry = ctx.position['entry_price']\n pnl_pct = (price - entry) / entry\n if pnl_pct <= -ctx.stop_pct:\n ctx.close_position()\n ctx.log(f\"STOP LOSS at {price:.2f}\")\n elif pnl_pct >= ctx.take_profit_pct:\n ctx.close_position()\n ctx.log(f\"TAKE PROFIT at {price:.2f}\")\n\ndef _ema(data, period):\n k = 2 / (period + 1)\n ema = data[0]\n for price in data[1:]:\n ema = price * k + ema * (1 - k)\n return ema\n",params:[{name:"fast_period",type:"integer",default:12,min:2,max:120,step:1},{name:"slow_period",type:"integer",default:26,min:5,max:240,step:1},{name:"position_pct",type:"percent",default:.95,min:.05,max:1,step:.01},{name:"stop_pct",type:"percent",default:.03,min:.001,max:.5,step:.001},{name:"take_profit_pct",type:"percent",default:.08,min:.001,max:1,step:.001}]},{key:"martingale",icon:"🔥",code:"\"\"\"\nMartingale Strategy\nDouble position on each loss, with max layer control.\n\"\"\"\n\ndef on_init(ctx):\n ctx.base_amount = ctx.param('base_amount', 100)\n ctx.max_layers = ctx.param('max_layers', 5)\n ctx.multiplier = ctx.param('multiplier', 2.0)\n ctx.take_profit_pct = ctx.param('take_profit_pct', 0.02)\n ctx.stop_loss_pct = ctx.param('stop_loss_pct', 0.04)\n ctx.cooldown_bars = ctx.param('cooldown_bars', 1)\n ctx.current_layer = 0\n ctx.cooldown = 0\n\ndef on_bar(ctx, bar):\n if ctx.cooldown > 0:\n ctx.cooldown -= 1\n return\n\n price = bar['close']\n if not ctx.position:\n amount = ctx.base_amount * (ctx.multiplier ** ctx.current_layer)\n if amount <= ctx.balance:\n qty = amount / price\n ctx.buy(price, qty)\n ctx.log(f\"Layer {ctx.current_layer}: BUY {qty:.4f} at {price:.2f}\")\n else:\n entry = ctx.position['entry_price']\n pnl_pct = (price - entry) / entry\n\n if pnl_pct >= ctx.take_profit_pct:\n ctx.close_position()\n ctx.current_layer = 0\n ctx.cooldown = ctx.cooldown_bars\n ctx.log(f\"TAKE PROFIT at {price:.2f}, reset layers\")\n\n elif pnl_pct <= -ctx.stop_loss_pct:\n ctx.close_position()\n ctx.cooldown = ctx.cooldown_bars\n if ctx.current_layer < ctx.max_layers:\n ctx.current_layer += 1\n ctx.log(f\"LOSS, escalate to layer {ctx.current_layer}\")\n else:\n ctx.current_layer = 0\n ctx.log(\"Max layers reached, reset\")\n",params:[{name:"base_amount",type:"number",default:100,min:10,max:1e6,step:10},{name:"max_layers",type:"integer",default:5,min:1,max:20,step:1},{name:"multiplier",type:"number",default:2,min:1,max:5,step:.1},{name:"take_profit_pct",type:"percent",default:.02,min:.001,max:1,step:.001},{name:"stop_loss_pct",type:"percent",default:.04,min:.001,max:1,step:.001},{name:"cooldown_bars",type:"integer",default:1,min:0,max:500,step:1}]},{key:"grid",icon:"📐",code:"\"\"\"\nGrid Trading Strategy\nPlaces buy/sell orders at equal intervals within a price range.\n\"\"\"\n\ndef on_init(ctx):\n ctx.grid_upper = ctx.param('grid_upper', 70000)\n ctx.grid_lower = ctx.param('grid_lower', 60000)\n ctx.grid_levels = ctx.param('grid_levels', 10)\n ctx.order_amount = ctx.param('order_amount', 100)\n ctx.take_profit_pct = ctx.param('take_profit_pct', 0.05)\n ctx.stop_loss_pct = ctx.param('stop_loss_pct', 0.03)\n ctx.filled_grids = set()\n\n spacing = (ctx.grid_upper - ctx.grid_lower) / ctx.grid_levels\n ctx.grid_prices = [ctx.grid_lower + i * spacing for i in range(ctx.grid_levels + 1)]\n\ndef on_bar(ctx, bar):\n price = bar['close']\n if price < ctx.grid_lower or price > ctx.grid_upper:\n return\n\n if ctx.position and ctx.position['side'] == 'long':\n entry = ctx.position['entry_price']\n pnl_pct = (price - entry) / entry\n if pnl_pct >= ctx.take_profit_pct or pnl_pct <= -ctx.stop_loss_pct:\n ctx.close_position()\n ctx.filled_grids.clear()\n ctx.log(f\"Grid risk exit at {price:.2f}, pnl={pnl_pct:.2%}\")\n return\n\n for i, gp in enumerate(ctx.grid_prices[:-1]):\n upper_gp = ctx.grid_prices[i + 1]\n grid_id = f\"grid_{i}\"\n\n if price <= gp and grid_id not in ctx.filled_grids:\n qty = ctx.order_amount / price\n ctx.buy(price, qty)\n ctx.filled_grids.add(grid_id)\n ctx.log(f\"Grid BUY at {price:.2f} (level {i})\")\n\n elif price >= upper_gp and grid_id in ctx.filled_grids:\n qty = ctx.order_amount / price\n ctx.sell(price, qty)\n ctx.filled_grids.discard(grid_id)\n ctx.log(f\"Grid SELL at {price:.2f} (level {i})\")\n",params:[{name:"grid_upper",type:"number",default:7e4,min:1,max:1e8,step:10},{name:"grid_lower",type:"number",default:6e4,min:1,max:1e8,step:10},{name:"grid_levels",type:"integer",default:10,min:2,max:200,step:1},{name:"order_amount",type:"number",default:100,min:1,max:1e6,step:1},{name:"take_profit_pct",type:"percent",default:.05,min:.001,max:1,step:.001},{name:"stop_loss_pct",type:"percent",default:.03,min:.001,max:1,step:.001}]},{key:"dca",icon:"💰",code:"\"\"\"\nDCA (Dollar Cost Averaging) Strategy\nPeriodic purchases with optional dip-buying.\n\"\"\"\n\ndef on_init(ctx):\n ctx.buy_amount = ctx.param('buy_amount', 100)\n ctx.dip_threshold = ctx.param('dip_threshold', 0.05)\n ctx.dip_multiplier = ctx.param('dip_multiplier', 2.0)\n ctx.buy_interval = ctx.param('buy_interval', 24)\n ctx.max_orders = ctx.param('max_orders', 999)\n ctx.bar_count = 0\n ctx.order_count = 0\n ctx.last_buy_price = None\n\ndef on_bar(ctx, bar):\n ctx.bar_count += 1\n price = bar['close']\n\n if ctx.order_count >= ctx.max_orders:\n return\n\n is_dip = False\n if ctx.last_buy_price and price < ctx.last_buy_price * (1 - ctx.dip_threshold):\n is_dip = True\n\n if ctx.bar_count % ctx.buy_interval == 0 or is_dip:\n amount = ctx.buy_amount * (ctx.dip_multiplier if is_dip else 1.0)\n if amount <= ctx.balance:\n qty = amount / price\n ctx.buy(price, qty)\n ctx.last_buy_price = price\n ctx.order_count += 1\n tag = \" (DIP BUY)\" if is_dip else \"\"\n ctx.log(f\"DCA BUY {qty:.6f} at {price:.2f}{tag}\")\n",params:[{name:"buy_amount",type:"number",default:100,min:1,max:1e6,step:1},{name:"buy_interval",type:"integer",default:24,min:1,max:1e3,step:1},{name:"dip_threshold",type:"percent",default:.05,min:.001,max:1,step:.001},{name:"dip_multiplier",type:"number",default:2,min:1,max:10,step:.1},{name:"max_orders",type:"integer",default:999,min:1,max:9999,step:1}]},{key:"meanReversion",icon:"🔄",code:"\"\"\"\nMean Reversion Strategy\nBollinger Bands based: buy at lower band, sell at upper band.\n\"\"\"\n\ndef on_init(ctx):\n ctx.period = ctx.param('period', 20)\n ctx.std_mult = ctx.param('std_mult', 2.0)\n ctx.position_pct = ctx.param('position_pct', 0.5)\n ctx.take_profit_pct = ctx.param('take_profit_pct', 0.03)\n ctx.stop_loss_pct = ctx.param('stop_loss_pct', 0.02)\n\ndef on_bar(ctx, bar):\n bars = ctx.bars(ctx.period + 5)\n if len(bars) < ctx.period:\n return\n\n closes = [b['close'] for b in bars[-ctx.period:]]\n mean = sum(closes) / len(closes)\n std = (sum((c - mean) ** 2 for c in closes) / len(closes)) ** 0.5\n\n upper = mean + ctx.std_mult * std\n lower = mean - ctx.std_mult * std\n price = bar['close']\n\n if price <= lower and not ctx.position:\n qty = (ctx.equity * ctx.position_pct) / price\n ctx.buy(price, qty)\n ctx.log(f\"BUY at {price:.2f} (below lower band {lower:.2f})\")\n\n elif price >= upper and ctx.position and ctx.position['side'] == 'long':\n ctx.close_position()\n ctx.log(f\"SELL at {price:.2f} (above upper band {upper:.2f})\")\n\n elif ctx.position and ctx.position['side'] == 'long':\n entry = ctx.position['entry_price']\n pnl_pct = (price - entry) / entry\n if pnl_pct >= ctx.take_profit_pct or pnl_pct <= -ctx.stop_loss_pct:\n ctx.close_position()\n ctx.log(f\"Risk exit at {price:.2f}, pnl={pnl_pct:.2%}\")\n",params:[{name:"period",type:"integer",default:20,min:2,max:300,step:1},{name:"std_mult",type:"number",default:2,min:.5,max:6,step:.1},{name:"position_pct",type:"percent",default:.5,min:.05,max:1,step:.01},{name:"take_profit_pct",type:"percent",default:.03,min:.001,max:1,step:.001},{name:"stop_loss_pct",type:"percent",default:.02,min:.001,max:1,step:.001}]},{key:"breakout",icon:"⚡",code:"\"\"\"\nBreakout Strategy\nEnter when price breaks key resistance/support with volume confirmation.\n\"\"\"\n\ndef on_init(ctx):\n ctx.lookback = ctx.param('lookback', 20)\n ctx.volume_mult = ctx.param('volume_mult', 1.5)\n ctx.position_pct = ctx.param('position_pct', 0.9)\n ctx.stop_pct = ctx.param('stop_pct', 0.02)\n ctx.take_profit_pct = ctx.param('take_profit_pct', 0.05)\n\ndef on_bar(ctx, bar):\n bars = ctx.bars(ctx.lookback + 5)\n if len(bars) < ctx.lookback:\n return\n\n recent = bars[-ctx.lookback:]\n high = max(b['high'] for b in recent[:-1])\n low = min(b['low'] for b in recent[:-1])\n avg_vol = sum(b['volume'] for b in recent[:-1]) / (len(recent) - 1)\n price = bar['close']\n vol = bar['volume']\n\n if price > high and vol > avg_vol * ctx.volume_mult and not ctx.position:\n qty = (ctx.equity * ctx.position_pct) / price\n ctx.buy(price, qty)\n ctx.log(f\"BREAKOUT BUY at {price:.2f} (prev high: {high:.2f})\")\n\n elif price < low and ctx.position and ctx.position['side'] == 'long':\n ctx.close_position()\n ctx.log(f\"BREAK DOWN, close at {price:.2f}\")\n\n if ctx.position and ctx.position['side'] == 'long':\n entry = ctx.position['entry_price']\n pnl_pct = (price - entry) / entry\n if pnl_pct <= -ctx.stop_pct:\n ctx.close_position()\n ctx.log(f\"STOP LOSS at {price:.2f}\")\n elif pnl_pct >= ctx.take_profit_pct:\n ctx.close_position()\n ctx.log(f\"TAKE PROFIT at {price:.2f}\")\n",params:[{name:"lookback",type:"integer",default:20,min:2,max:300,step:1},{name:"volume_mult",type:"number",default:1.5,min:.5,max:10,step:.1},{name:"position_pct",type:"percent",default:.9,min:.05,max:1,step:.01},{name:"stop_pct",type:"percent",default:.02,min:.001,max:1,step:.001},{name:"take_profit_pct",type:"percent",default:.05,min:.001,max:1,step:.001}]}]);function D(t){return String(t).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function V(t){return"boolean"===typeof t?t?"True":"False":"number"===typeof t?Number.isFinite(t)?String(t):"0":null===t||void 0===t?"None":"'".concat(String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\'"),"'")}var R=N;function z(t){return N.find(function(e){return e.key===t})||null}function E(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a="string"===typeof t?z(t):t;return a?a.params.reduce(function(t,a){return t[a.name]=Object.prototype.hasOwnProperty.call(e,a.name)?e[a.name]:a.default,t},{}):{}}function L(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a="string"===typeof t?z(t):t;if(!a)return"";var s=E(a,e);return a.params.reduce(function(t,e){var a=V(s[e.name]),i=new RegExp("(ctx\\.param\\(['\"]".concat(D(e.name),"['\"],\\s*)([^\\)]+)(\\))"));return t.replace(i,"$1".concat(a,"$3"))},a.code)}var U={name:"StrategyTypeSelector",props:{selected:{type:String,default:""},isDark:{type:Boolean,default:!1}},data:function(){return{templates:R.map(function(t){return{key:t.key,icon:t.icon}})}}},q=U,K=(0,C.A)(q,F,I,!1,null,"1cfbbafc",null),O=K.exports,B=function(){var t=this,e=t._self._c;return e("div",{staticClass:"strategy-editor",class:{"theme-dark":t.isDark}},[e("a-row",{staticClass:"editor-layout",attrs:{gutter:16}},[e("a-col",{staticClass:"code-col",attrs:{xs:24,md:16}},[e("div",{staticClass:"code-section"},[e("div",{staticClass:"section-header"},[e("div",{staticClass:"section-title-wrap"},[e("span",{staticClass:"section-title"},[e("a-icon",{attrs:{type:"code"}}),t._v(" "+t._s(t.$t("trading-assistant.editor.title"))+" ")],1),t.selectedTemplate?e("a-tag",{staticClass:"current-template-tag",attrs:{color:"blue"}},[t._v(" "+t._s(t.$t("trading-assistant.template.".concat(t.selectedTemplate.key)))+" ")]):t._e()],1),e("div",{staticClass:"section-actions"},[e("a-button",{staticClass:"verify-btn",attrs:{type:"link",size:"small",loading:t.verifying},on:{click:t.handleVerify}},[e("a-icon",{attrs:{type:"check-circle"}}),t._v(" "+t._s(t.$t("trading-assistant.editor.verify"))+" ")],1)],1)]),e("div",{ref:"editorContainer",staticClass:"code-editor-container"})])]),e("a-col",{staticClass:"side-col",attrs:{xs:24,md:8}},[e("a-tabs",{staticClass:"side-tabs",attrs:{size:"small"},model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[e("a-tab-pane",{key:"templates",attrs:{tab:t.$t("trading-assistant.editor.templateTab")}},[e("div",{staticClass:"panel-intro"},[e("div",{staticClass:"panel-intro__title"},[t._v(t._s(t.$t("trading-assistant.editor.templateIntroTitle")))]),e("div",{staticClass:"panel-intro__desc"},[t._v(t._s(t.$t("trading-assistant.editor.templateIntroDesc")))])]),e("div",{staticClass:"template-list"},t._l(t.templates,function(a){return e("div",{key:a.key,staticClass:"template-item",class:{active:t.selectedTemplateKey===a.key},on:{click:function(e){return t.loadTemplate(a.key,{focusParams:!0,resetParams:!0})}}},[e("div",{staticClass:"tpl-header"},[e("span",{staticClass:"tpl-icon"},[t._v(t._s(a.icon))]),e("span",{staticClass:"tpl-name"},[t._v(t._s(t.$t("trading-assistant.template.".concat(a.key))))])]),e("p",{staticClass:"tpl-desc"},[t._v(t._s(t.$t("trading-assistant.template.".concat(a.key,"Desc"))))]),e("a-button",{staticClass:"tpl-use-btn",attrs:{type:"link",size:"small"}},[t._v(" "+t._s(t.$t("trading-assistant.template.useTemplate"))+" "),e("a-icon",{attrs:{type:"arrow-right"}})],1)],1)}),0)]),e("a-tab-pane",{key:"params",attrs:{tab:t.$t("trading-assistant.editor.paramsTab")}},[t.selectedTemplate?e("div",{staticClass:"params-panel"},[e("div",{staticClass:"panel-intro"},[e("div",{staticClass:"panel-intro__title"},[t._v(" "+t._s(t.$t("trading-assistant.template.".concat(t.selectedTemplate.key)))+" ")]),e("div",{staticClass:"panel-intro__desc"},[t._v(" "+t._s(t.$t("trading-assistant.template.".concat(t.selectedTemplate.key,"Desc")))+" ")])]),e("a-alert",{staticClass:"params-tip",attrs:{type:"info","show-icon":"",message:t.$t("trading-assistant.editor.paramsHint")}}),e("div",{staticClass:"param-list"},t._l(t.selectedTemplate.params,function(a){return e("div",{key:a.name,staticClass:"param-item"},[e("div",{staticClass:"param-item__label-row"},[e("span",{staticClass:"param-item__label"},[t._v(t._s(t.getParamLabel(a)))]),e("span",{staticClass:"param-item__type"},[t._v(t._s(t.getParamTypeLabel(a.type)))])]),t.getParamDescription(a)?e("div",{staticClass:"param-item__desc"},[t._v(t._s(t.getParamDescription(a)))]):t._e(),"number"===a.type||"integer"===a.type||"percent"===a.type?e("a-input-number",{staticStyle:{width:"100%"},attrs:{value:t.templateParamValues[a.name],min:a.min,max:a.max,step:a.step||1,precision:"integer"===a.type?0:t.getParamPrecision(a)},on:{change:function(e){return t.handleNumericParamChange(a,e)}}}):"select"===a.type?e("a-select",{staticStyle:{width:"100%"},attrs:{value:t.templateParamValues[a.name]},on:{change:function(e){return t.handleSelectParamChange(a,e)}}},t._l(a.options||[],function(a){return e("a-select-option",{key:a.value,attrs:{value:a.value}},[t._v(" "+t._s(t.getOptionLabel(a))+" ")])}),1):"boolean"===a.type?e("div",{staticClass:"param-item__switch"},[e("a-switch",{attrs:{checked:!!t.templateParamValues[a.name]},on:{change:function(e){return t.handleBooleanParamChange(a,e)}}}),e("span",[t._v(t._s(t.templateParamValues[a.name]?t.$t("common.yes"):t.$t("common.no")))])],1):e("a-input",{attrs:{value:t.templateParamValues[a.name]},on:{input:function(e){return t.handleTextParamChange(a,e.target.value)}}})],1)}),0),e("div",{staticClass:"params-actions"},[e("a-button",{on:{click:t.resetTemplateParams}},[t._v(" "+t._s(t.$t("trading-assistant.editor.resetTemplateParams"))+" ")]),e("a-button",{attrs:{type:"primary",disabled:!t.templateDirty},on:{click:t.applySelectedTemplateToCode}},[t._v(" "+t._s(t.$t("trading-assistant.editor.applyTemplateParams"))+" ")])],1)],1):e("a-empty",{attrs:{description:t.$t("trading-assistant.editor.paramsEmpty")}})],1),e("a-tab-pane",{key:"ai",attrs:{tab:t.$t("trading-assistant.editor.aiTab")}},[e("div",{staticClass:"ai-panel"},[e("div",{staticClass:"panel-intro"},[e("div",{staticClass:"panel-intro__title"},[e("a-icon",{attrs:{type:"robot"}}),e("span",[t._v(t._s(t.$t("trading-assistant.editor.aiGenerate")))])],1),e("div",{staticClass:"panel-intro__desc"},[t._v(t._s(t.$t("trading-assistant.editor.aiHint")))])]),e("div",{staticClass:"ai-suggestions"},t._l(t.aiPromptSuggestions,function(a){return e("a-tag",{key:a.id,staticClass:"prompt-tag",on:{click:function(e){return t.applyPromptSuggestion(a.value)}}},[t._v(" "+t._s(a.label)+" ")])}),1),e("a-textarea",{attrs:{placeholder:t.$t("trading-assistant.editor.aiPromptPlaceholder"),rows:10,"auto-size":{minRows:8,maxRows:16}},model:{value:t.aiPrompt,callback:function(e){t.aiPrompt=e},expression:"aiPrompt"}}),e("a-button",{staticStyle:{"margin-top":"10px"},attrs:{type:"primary",block:"",loading:t.aiGenerating,size:"large"},on:{click:t.handleAIGenerate}},[e("a-icon",{attrs:{type:"thunderbolt"}}),t._v(" "+t._s(t.$t("trading-assistant.editor.aiGenerateBtn"))+" ")],1),t.aiGenerating?e("div",{staticClass:"ai-status"},[e("a-icon",{attrs:{type:"loading",spin:""}}),t._v(" "+t._s(t.$t("trading-assistant.editor.generating"))+" ")],1):t._e()],1)]),e("a-tab-pane",{key:"docs",attrs:{tab:t.$t("trading-assistant.editor.docsTab")}},[e("div",{staticClass:"docs-panel"},[e("div",{staticClass:"panel-intro"},[e("div",{staticClass:"panel-intro__title"},[t._v(t._s(t.$t("trading-assistant.editor.docsIntroTitle")))]),e("div",{staticClass:"panel-intro__desc"},[t._v(t._s(t.$t("trading-assistant.editor.docsIntroDesc")))])]),e("div",{staticClass:"docs-content",domProps:{innerHTML:t._s(t.apiDocsHtml)}})])])],1)],1)],1)],1)},H=[],G=(a(6011),a(18787)),W=(a(32637),a(15237)),j=a.n(W),Y=(a(74806),a(55218),a(97923),a(50436),'\n

    Strategy API Reference

    \n
    Lifecycle Functions
    \n
    def on_init(ctx):\n    """Called once when strategy starts"""\n\ndef on_bar(ctx, bar):\n    """Called on each new K-line bar"""\n    # bar: { open, high, low, close, volume, timestamp }\n\ndef on_order_filled(ctx, order):\n    """Called when an order is filled"""\n\ndef on_stop(ctx):\n    """Called when strategy stops"""
    \n\n
    Trading Actions
    \n
    ctx.buy(price, amount)      # Buy / go long\nctx.sell(price, amount)     # Sell / reduce long / go short\nctx.close_position()        # Close current position\nctx.cancel_all_orders()     # Cancel pending orders
    \n\n
    Context Properties
    \n
    ctx.position       # { side, amount, entry_price, unrealized_pnl }\nctx.balance        # Available balance\nctx.equity         # Total equity\nctx.current_price  # Current market price\nctx.symbol         # Trading symbol\nctx.timeframe      # K-line timeframe
    \n\n
    Data Access
    \n
    ctx.bars(n=100)            # Get last N bars\nctx.param(name, default)   # Get strategy parameter\nctx.indicator(id, params)  # Call existing indicator\nctx.log(message)           # Write strategy log
    \n'),J={name:"StrategyEditor",props:{value:{type:String,default:""},isDark:{type:Boolean,default:!1},userId:{type:[Number,String],default:1},visible:{type:Boolean,default:!1},initialTemplateKey:{type:String,default:""}},data:function(){return{activeTab:"templates",aiPrompt:"",aiGenerating:!1,verifying:!1,editor:null,apiDocsHtml:Y,templates:R,selectedTemplateKey:"",templateParamValues:{},templateDirty:!1,refreshTimer:null}},computed:{selectedTemplate:function(){return z(this.selectedTemplateKey)},aiPromptSuggestions:function(){return[{id:"improve",label:this.$t("trading-assistant.editor.aiSuggestionImprove"),value:this.$t("trading-assistant.editor.aiSuggestionImprovePrompt")},{id:"risk",label:this.$t("trading-assistant.editor.aiSuggestionRisk"),value:this.$t("trading-assistant.editor.aiSuggestionRiskPrompt")},{id:"explain",label:this.$t("trading-assistant.editor.aiSuggestionExplain"),value:this.$t("trading-assistant.editor.aiSuggestionExplainPrompt")}]}},mounted:function(){var t=this;this.$nextTick(function(){t.initEditor(),t.initialTemplateKey?t.loadTemplate(t.initialTemplateKey,{focusParams:!0,resetParams:!0}):t.value||t.$emit("input",t._getDefaultCode())}),window.addEventListener("resize",this.scheduleEditorRefresh)},beforeDestroy:function(){window.removeEventListener("resize",this.scheduleEditorRefresh),this.refreshTimer&&(clearTimeout(this.refreshTimer),this.refreshTimer=null),this.editor&&("function"===typeof this.editor.toTextArea&&this.editor.toTextArea(),this.editor=null)},watch:{value:function(t){this.editor&&this.editor.getValue()!==t&&(this.editor.setValue(t||""),this.scheduleEditorRefresh())},isDark:function(){this.editor&&this.editor.setOption("theme",this.isDark?"monokai":"eclipse"),this.scheduleEditorRefresh()},visible:function(t){t&&this.scheduleEditorRefresh()},initialTemplateKey:function(t){t&&t!==this.selectedTemplateKey&&this.loadTemplate(t,{focusParams:!0,resetParams:!0})}},methods:{initEditor:function(){var t=this;this.$refs.editorContainer&&(this.editor=j()(this.$refs.editorContainer,{value:this.value||this._getDefaultCode(),mode:"python",theme:this.isDark?"monokai":"eclipse",lineNumbers:!0,autoCloseBrackets:!0,matchBrackets:!0,styleActiveLine:!0,tabSize:4,indentUnit:4,indentWithTabs:!1,lineWrapping:!1,viewportMargin:1/0,gutters:["CodeMirror-linenumbers"]}),this.editor.on("change",function(){t.$emit("input",t.editor.getValue())}),this.scheduleEditorRefresh())},scheduleEditorRefresh:function(){var t=this;this.refreshTimer&&clearTimeout(this.refreshTimer),this.refreshTimer=setTimeout(function(){t.editor&&t.editor.refresh()},60)},_getDefaultCode:function(){return'"""\nMy Custom Strategy\n"""\n\ndef on_init(ctx):\n # Initialize strategy parameters\n pass\n\ndef on_bar(ctx, bar):\n # Core trading logic, called on each K-line bar\n # bar: { open, high, low, close, volume, timestamp }\n price = bar[\'close\']\n\n bars = ctx.bars(20)\n if len(bars) < 20:\n return\n\n avg = sum(b[\'close\'] for b in bars) / len(bars)\n\n if price > avg and not ctx.position:\n ctx.buy(price, ctx.equity * 0.9 / price)\n ctx.log(f"BUY at {price}")\n\n elif price < avg and ctx.position:\n ctx.close_position()\n ctx.log(f"SELL at {price}")\n'},loadTemplate:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=e.focusParams,s=void 0!==a&&a,i=e.resetParams,r=void 0===i||i,n=z(t);n&&(this.selectedTemplateKey=t,!r&&this.templateParamValues&&0!==Object.keys(this.templateParamValues).length||(this.templateParamValues=E(n)),this.templateDirty=!0,this.applySelectedTemplateToCode({silent:!0}),s&&(this.activeTab="params"),this.aiPrompt.trim()||(this.aiPrompt=this.$t("trading-assistant.editor.aiPromptTemplateHint")+" "+this.$t("trading-assistant.template.".concat(n.key))),this.scheduleEditorRefresh())},getCode:function(){return this.editor?this.editor.getValue():this.value},setCode:function(t){this.editor&&this.editor.getValue()!==t?this.editor.setValue(t):this.$emit("input",t),this.scheduleEditorRefresh()},applySelectedTemplateToCode:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.silent,a=void 0!==e&&e;if(this.selectedTemplate){var s=L(this.selectedTemplate,this.templateParamValues);this.setCode(s),this.templateDirty=!1,this.$emit("template-change",{key:this.selectedTemplateKey,params:(0,u.A)({},this.templateParamValues)}),a||G.A.success(this.$t("trading-assistant.editor.templateApplied"))}},resetTemplateParams:function(){this.selectedTemplate&&(this.templateParamValues=E(this.selectedTemplate),this.templateDirty=!0,this.applySelectedTemplateToCode({silent:!1}))},getParamLabel:function(t){var e="trading-assistant.templateParam.".concat(t.name,".label"),a=this.$t(e);return a===e?t.name:a},getParamDescription:function(t){var e="trading-assistant.templateParam.".concat(t.name,".desc"),a=this.$t(e);return a===e?"":a},getParamTypeLabel:function(t){return this.$t("trading-assistant.editor.paramType.".concat(t))},getOptionLabel:function(t){if(!t)return"";if(t.labelKey){var e=this.$t(t.labelKey);if(e!==t.labelKey)return e}return t.label||t.value},getParamPrecision:function(t){if("integer"===t.type)return 0;var e=t.step;if(!e||Number.isInteger(e))return 0;var a=String(e),s=a.split(".");return s[1]?s[1].length:0},handleNumericParamChange:function(t,e){var a=""===e||null===e||void 0===e?t.default:"integer"===t.type?parseInt(e,10):Number(e);this.$set(this.templateParamValues,t.name,a),this.templateDirty=!0},handleSelectParamChange:function(t,e){this.$set(this.templateParamValues,t.name,e),this.templateDirty=!0},handleBooleanParamChange:function(t,e){this.$set(this.templateParamValues,t.name,!!e),this.templateDirty=!0},handleTextParamChange:function(t,e){this.$set(this.templateParamValues,t.name,e),this.templateDirty=!0},applyPromptSuggestion:function(t){this.aiPrompt=t},handleVerify:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.verifying=!0,e.p=1,a=t.getCode(),e.n=2,(0,y.Ay)({url:"/api/strategies/verify-code",method:"post",data:{code:a,user_id:t.userId}});case 2:s=e.v,s&&s.success?G.A.success(t.$t("trading-assistant.editor.verifySuccess")):G.A.error(s&&(s.msg||s.message)||t.$t("trading-assistant.editor.verifyFailed")),e.n=4;break;case 3:e.p=3,i=e.v,G.A.error(t.$t("trading-assistant.editor.verifyFailed")+": "+(i.message||""));case 4:return e.p=4,t.verifying=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},handleAIGenerate:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.aiPrompt.trim()){e.n=1;break}return G.A.warning(t.$t("trading-assistant.editor.aiPromptRequired")),e.a(2);case 1:return t.aiGenerating=!0,e.p=2,e.n=3,(0,y.Ay)({url:"/api/strategies/ai-generate",method:"post",data:{prompt:t.aiPrompt,user_id:t.userId}});case 3:a=e.v,a&&a.code?(t.setCode(a.code),G.A.success(t.$t("trading-assistant.editor.aiGenerateSuccess"))):G.A.error(a&&(a.msg||a.message)||t.$t("trading-assistant.editor.aiGenerateFailed")),e.n=5;break;case 4:e.p=4,s=e.v,G.A.error(s&&s.message||t.$t("trading-assistant.editor.aiGenerateFailed"));case 5:return e.p=5,t.aiGenerating=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()}}},X=J,Q=(0,C.A)(X,B,H,!1,null,"6c7c8660",null),Z=Q.exports,tt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"performance-analysis",class:{"theme-dark":t.isDark}},[e("a-spin",{attrs:{spinning:t.loading}},[t.hasData?e("div",[e("div",{staticClass:"metrics-grid"},[e("div",{staticClass:"metric-card",class:t.getMetricClass(t.metrics.totalReturn)},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.totalReturn")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.metrics.totalReturn)))])]),e("div",{staticClass:"metric-card",class:t.getMetricClass(t.metrics.annualReturn)},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.annualReturn")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.metrics.annualReturn)))])]),e("div",{staticClass:"metric-card negative"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.maxDrawdown")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.metrics.maxDrawdown)))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.sharpe")))]),e("div",{staticClass:"metric-value"},[t._v(t._s((t.metrics.sharpe||0).toFixed(2)))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.winRate")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.metrics.winRate)))])]),e("div",{staticClass:"metric-card",class:t.getMetricClass((t.metrics.profitFactor||0)-1)},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.profitFactor")))]),e("div",{staticClass:"metric-value"},[t._v(t._s((t.metrics.profitFactor||0).toFixed(2)))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.totalTrades")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.metrics.totalTrades||0))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.runningDays")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.metrics.runningDays||0))])])]),e("div",{staticClass:"chart-section"},[e("div",{staticClass:"chart-title"},[t._v(t._s(t.$t("trading-assistant.performance.equityCurve")))]),e("div",{ref:"equityChart",staticClass:"chart-container"})]),e("div",{staticClass:"chart-section"},[e("div",{staticClass:"chart-title"},[t._v(t._s(t.$t("trading-assistant.performance.dailyReturns")))]),e("div",{ref:"dailyChart",staticClass:"chart-container",staticStyle:{height:"250px"}})])]):t.loading?t._e():e("a-empty",{staticStyle:{padding:"60px 0"},attrs:{description:t.$t("trading-assistant.performance.noData")}})],1)],1)},et=[],at={name:"PerformanceAnalysis",props:{strategyId:{type:[Number,String],default:null},isDark:{type:Boolean,default:!1}},data:function(){return{loading:!1,metrics:{},equityData:[],dailyReturns:[],equityChartInstance:null,dailyChartInstance:null}},computed:{hasData:function(){return this.equityData.length>0}},watch:{strategyId:{handler:function(t){t&&this.loadData()},immediate:!0},isDark:function(){var t=this;this.disposeCharts(),this.$nextTick(function(){return t.renderCharts()})}},beforeDestroy:function(){this.disposeCharts()},methods:{loadData:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.strategyId){e.n=1;break}return e.a(2);case 1:return t.loading=!0,e.p=2,e.n=3,(0,p.Yx)(t.strategyId);case 3:a=e.v,a&&a.data&&(t.equityData=a.data.equity_curve||a.data||[],t.computeMetrics(),t.$nextTick(function(){return t.renderCharts()})),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.p=5,t.loading=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},computeMetrics:function(){var t=this.equityData;if(t.length){for(var e=t.map(function(t){return t.equity||t.value||t.y||0}),a=e[0]||1,s=e[e.length-1]||a,i=(s-a)/a,r=e[0],n=0,o=[],l=1;lr&&(r=e[l]);var c=(e[l]-r)/r;c1?Math.sqrt(o.reduce(function(t,e){return t+Math.pow(e-p,2)},0)/(o.length-1)):0,g=t.filter(function(t){return t.trade_count}).reduce(function(t,e){return t+e.trade_count},0)||0,h=t.filter(function(t){return t.win_count}).reduce(function(t,e){return t+e.win_count},0)||0,_=t.filter(function(t){return t.gross_profit}).reduce(function(t,e){return t+e.gross_profit},0),y=Math.abs(t.filter(function(t){return t.gross_loss}).reduce(function(t,e){return t+e.gross_loss},0));this.metrics={totalReturn:i,annualReturn:Math.pow(1+i,u)-1,maxDrawdown:n,sharpe:m>0?p/m*Math.sqrt(252):0,winRate:g>0?h/g:0,profitFactor:y>0?_/y:_>0?999:0,totalTrades:g,runningDays:d}}else this.metrics={}},renderCharts:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.n){case 0:return e.n=1,t.getEcharts();case 1:if(a=e.v,a){e.n=2;break}return e.a(2);case 2:t.renderEquityChart(a),t.renderDailyChart(a);case 3:return e.a(2)}},e)}))()},getEcharts:function(){return(0,l.A)((0,o.A)().m(function t(){var e;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(!window.echarts){t.n=1;break}return t.a(2,window.echarts);case 1:return t.p=1,t.n=2,Promise.resolve().then(a.bind(a,29362));case 2:return e=t.v,window.echarts=e.default||e,t.a(2,window.echarts);case 3:return t.p=3,t.v,t.a(2,null)}},t,null,[[1,3]])}))()},renderEquityChart:function(t){if(this.$refs.equityChart){this.equityChartInstance=t.init(this.$refs.equityChart,this.isDark?"dark":null);var e=this.equityData.map(function(t){return t.date||t.timestamp||t.x||""}),a=this.equityData.map(function(t){return t.equity||t.value||t.y||0});this.equityChartInstance.setOption({tooltip:{trigger:"axis"},grid:{left:60,right:20,top:20,bottom:30},xAxis:{type:"category",data:e,axisLabel:{fontSize:10}},yAxis:{type:"value",axisLabel:{fontSize:10}},series:[{type:"line",data:a,smooth:!0,lineStyle:{width:2,color:"#1890ff"},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(24,144,255,0.3)"},{offset:1,color:"rgba(24,144,255,0.02)"}]}},itemStyle:{color:"#1890ff"},showSymbol:!1}]})}},renderDailyChart:function(t){this.$refs.dailyChart&&this.dailyReturns.length&&(this.dailyChartInstance=t.init(this.$refs.dailyChart,this.isDark?"dark":null),this.dailyChartInstance.setOption({tooltip:{trigger:"axis",formatter:function(t){return"".concat((100*t[0].value).toFixed(2),"%")}},grid:{left:60,right:20,top:10,bottom:30},xAxis:{type:"category",data:this.dailyReturns.map(function(t,e){return e+1}),show:!1},yAxis:{type:"value",axisLabel:{formatter:function(t){return(100*t).toFixed(1)+"%"},fontSize:10}},series:[{type:"bar",data:this.dailyReturns.map(function(t){return{value:t,itemStyle:{color:t>=0?"#52c41a":"#ff4d4f"}}}),barMaxWidth:6}]}))},disposeCharts:function(){this.equityChartInstance&&(this.equityChartInstance.dispose(),this.equityChartInstance=null),this.dailyChartInstance&&(this.dailyChartInstance.dispose(),this.dailyChartInstance=null)},formatPercent:function(t){return void 0===t||null===t?"--":(t>=0?"+":"")+(100*t).toFixed(2)+"%"},getMetricClass:function(t){return t?t>0?"positive":t<0?"negative":"":""}}},st=at,it=(0,C.A)(st,tt,et,!1,null,"192d71db",null),rt=it.exports,nt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"strategy-logs",class:{"theme-dark":t.isDark}},[e("div",{staticClass:"logs-toolbar"},[e("div",{staticClass:"toolbar-left"},[e("a-radio-group",{attrs:{size:"small","button-style":"solid"},model:{value:t.filterLevel,callback:function(e){t.filterLevel=e},expression:"filterLevel"}},[e("a-radio-button",{attrs:{value:"all"}},[t._v("All")]),e("a-radio-button",{attrs:{value:"trade"}},[e("a-badge",{attrs:{count:t.countByLevel("trade"),"overflow-count":99,offset:[6,-2]}},[t._v(" "+t._s(t.$t("trading-assistant.logs.level.trade"))+" ")])],1),e("a-radio-button",{attrs:{value:"signal"}},[t._v(t._s(t.$t("trading-assistant.logs.level.signal")))]),e("a-radio-button",{attrs:{value:"error"}},[t._v(t._s(t.$t("trading-assistant.logs.level.error")))])],1)],1),e("div",{staticClass:"toolbar-right"},[e("a-switch",{attrs:{checked:t.autoRefresh,size:"small"},on:{change:t.toggleAutoRefresh}}),e("span",{staticClass:"auto-refresh-label"},[t._v(t._s(t.$t("trading-assistant.logs.autoRefresh")))])],1)]),e("div",{ref:"logsContainer",staticClass:"logs-container custom-scrollbar"},[0===t.filteredLogs.length?e("div",{staticClass:"logs-empty"},[e("a-icon",{staticStyle:{"font-size":"32px",color:"#ccc"},attrs:{type:"file-text"}}),e("p",[t._v(t._s(t.$t("trading-assistant.logs.noLogs")))])],1):t._e(),t._l(t.filteredLogs,function(a,s){return e("div",{key:s,staticClass:"log-entry",class:"level-"+a.level},[e("span",{staticClass:"log-time"},[t._v(t._s(t.formatTime(a.timestamp)))]),e("a-tag",{staticClass:"log-level",attrs:{color:t.getLevelColor(a.level),size:"small"}},[t._v(" "+t._s(t.getLevelText(a.level))+" ")]),e("span",{staticClass:"log-message"},[t._v(t._s(a.message))])],1)})],2)])},ot=[],lt={name:"StrategyLogs",props:{strategyId:{type:[Number,String],default:null},isDark:{type:Boolean,default:!1}},data:function(){return{logs:[],filterLevel:"all",autoRefresh:!1,refreshTimer:null,loading:!1}},computed:{filteredLogs:function(){var t=this;return"all"===this.filterLevel?this.logs:this.logs.filter(function(e){return e.level===t.filterLevel})}},watch:{strategyId:{handler:function(t){t&&this.loadLogs()},immediate:!0}},beforeDestroy:function(){this.stopAutoRefresh()},methods:{loadLogs:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.strategyId){e.n=1;break}return e.a(2);case 1:return t.loading=!0,e.p=2,e.n=3,(0,y.Ay)({url:"/api/strategies/logs",method:"get",params:{id:t.strategyId,limit:200}});case 3:a=e.v,a&&a.data&&(t.logs=a.data,t.$nextTick(function(){return t.scrollToBottom()})),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.p=5,t.loading=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},toggleAutoRefresh:function(t){var e=this;this.autoRefresh=t,t?this.refreshTimer=setInterval(function(){return e.loadLogs()},5e3):this.stopAutoRefresh()},stopAutoRefresh:function(){this.refreshTimer&&(clearInterval(this.refreshTimer),this.refreshTimer=null)},scrollToBottom:function(){var t=this.$refs.logsContainer;t&&(t.scrollTop=t.scrollHeight)},countByLevel:function(t){return this.logs.filter(function(e){return e.level===t}).length},formatTime:function(t){if(!t)return"";try{var e=new Date(t);return e.toLocaleTimeString("en-GB",{hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch(a){return t}},getLevelColor:function(t){var e={info:"blue",warn:"orange",error:"red",trade:"green",signal:"purple"};return e[t]||"default"},getLevelText:function(t){var e="trading-assistant.logs.level.".concat(t),a=this.$t(e);return a!==e?a:t}}},ct=lt,dt=(0,C.A)(ct,nt,ot,!1,null,"129fed65",null),ut=dt.exports,pt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"dashboard-pro",class:{"theme-dark":t.isDarkTheme}},[e("div",{staticClass:"kpi-grid"},[e("div",{staticClass:"kpi-card kpi-primary"},[e("div",{staticClass:"kpi-glow"}),e("div",{staticClass:"kpi-content"},[e("div",{staticClass:"kpi-header"},[e("span",{staticClass:"kpi-icon"},[e("a-icon",{attrs:{type:"wallet"}})],1),e("span",{staticClass:"kpi-label"},[t._v(t._s(t.$t("dashboard.totalEquity")))])]),e("div",{staticClass:"kpi-value"},[e("span",{staticClass:"currency"},[t._v("$")]),e("span",{staticClass:"amount"},[t._v(t._s(t.formatNumber(t.summary.total_equity)))])]),e("div",{staticClass:"kpi-sub"},[e("span",{class:t.summary.total_pnl>=0?"positive":"negative"},[t._v(" "+t._s(t.summary.total_pnl>=0?"+":"")+t._s(t.formatNumber(t.summary.total_pnl))+" ")]),e("span",{staticClass:"label"},[t._v(t._s(t.$t("dashboard.label.totalPnl")))])])])]),e("div",{staticClass:"kpi-card kpi-win-rate"},[e("div",{staticClass:"kpi-content"},[e("div",{staticClass:"kpi-header"},[e("span",{staticClass:"kpi-icon"},[e("a-icon",{attrs:{type:"trophy"}})],1),e("span",{staticClass:"kpi-label"},[t._v(t._s(t.$t("dashboard.winRate")||"胜率"))])]),e("div",{staticClass:"kpi-value"},[e("span",{staticClass:"amount"},[t._v(t._s(t.formatNumber(t.performance.win_rate,1)))]),e("span",{staticClass:"unit"},[t._v("%")])]),e("div",{staticClass:"kpi-sub"},[e("span",{staticClass:"positive"},[t._v(t._s(t.performance.winning_trades))]),e("span",{staticClass:"label"},[t._v(t._s(t.$t("dashboard.label.win")))]),e("span",{staticClass:"divider"},[t._v("/")]),e("span",{staticClass:"negative"},[t._v(t._s(t.performance.losing_trades))]),e("span",{staticClass:"label"},[t._v(t._s(t.$t("dashboard.label.lose")))])])]),e("div",{staticClass:"kpi-ring"},[e("svg",{attrs:{viewBox:"0 0 36 36"}},[e("path",{staticClass:"ring-bg",attrs:{d:"M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831"}}),e("path",{staticClass:"ring-progress",attrs:{"stroke-dasharray":"".concat(t.performance.win_rate||0,", 100"),d:"M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831"}})])])]),e("div",{staticClass:"kpi-card kpi-profit-factor"},[e("div",{staticClass:"kpi-content"},[e("div",{staticClass:"kpi-header"},[e("span",{staticClass:"kpi-icon"},[e("a-icon",{attrs:{type:"rise"}})],1),e("span",{staticClass:"kpi-label"},[t._v(t._s(t.$t("dashboard.profitFactor")||"盈亏比"))])]),e("div",{staticClass:"kpi-value"},[e("span",{staticClass:"amount"},[t._v(t._s(t.formatNumber(t.performance.profit_factor,2)))]),e("span",{staticClass:"unit"},[t._v(":1")])]),e("div",{staticClass:"kpi-sub"},[e("span",[t._v(t._s(t.$t("dashboard.label.avgProfit"))+" ")]),e("span",{staticClass:"positive"},[t._v("$"+t._s(t.formatNumber(t.performance.avg_win)))])])])]),e("div",{staticClass:"kpi-card kpi-drawdown"},[e("div",{staticClass:"kpi-content"},[e("div",{staticClass:"kpi-header"},[e("span",{staticClass:"kpi-icon"},[e("a-icon",{attrs:{type:"fall"}})],1),e("span",{staticClass:"kpi-label"},[t._v(t._s(t.$t("dashboard.maxDrawdown")||"最大回撤"))])]),e("div",{staticClass:"kpi-value"},[e("span",{staticClass:"amount negative"},[t._v(t._s(t.formatNumber(t.performance.max_drawdown_pct,1)))]),e("span",{staticClass:"unit"},[t._v("%")])]),e("div",{staticClass:"kpi-sub"},[e("span",[t._v("$"+t._s(t.formatNumber(t.performance.max_drawdown)))])])])]),e("div",{staticClass:"kpi-card kpi-trades"},[e("div",{staticClass:"kpi-content"},[e("div",{staticClass:"kpi-header"},[e("span",{staticClass:"kpi-icon"},[e("a-icon",{attrs:{type:"swap"}})],1),e("span",{staticClass:"kpi-label"},[t._v(t._s(t.$t("dashboard.totalTrades")||"总交易"))])]),e("div",{staticClass:"kpi-value"},[e("span",{staticClass:"amount"},[t._v(t._s(t.performance.total_trades))]),e("span",{staticClass:"unit"},[t._v(t._s(t.$t("dashboard.unit.trades")))])]),e("div",{staticClass:"kpi-sub"},[e("span",[t._v(t._s(t.$t("dashboard.label.avgDaily"))+" ")]),e("span",[t._v(t._s(t.avgTradesPerDay))]),e("span",{staticClass:"label"},[t._v(" "+t._s(t.$t("dashboard.unit.trades")))])])])]),e("div",{staticClass:"kpi-card kpi-strategies clickable",on:{click:t.goToStrategyManagement}},[e("div",{staticClass:"kpi-content"},[e("div",{staticClass:"kpi-header"},[e("span",{staticClass:"kpi-icon"},[e("a-icon",{attrs:{type:"thunderbolt",theme:"filled"}})],1),e("span",{staticClass:"kpi-label"},[t._v(t._s(t.$t("dashboard.runningStrategies")||"运行中策略"))])]),e("div",{staticClass:"kpi-value"},[e("span",{staticClass:"amount"},[t._v(t._s(t.summary.indicator_strategy_count))]),e("span",{staticClass:"unit"},[t._v(t._s(t.$t("dashboard.unit.strategies")))])]),e("div",{staticClass:"kpi-sub"},[e("span",{staticClass:"highlight"},[t._v(t._s(t.summary.indicator_strategy_count))]),e("span",{staticClass:"label"},[t._v(" "+t._s(t.$t("dashboard.label.indicator")))])])]),e("div",{staticClass:"card-arrow"},[e("a-icon",{attrs:{type:"right"}})],1)])]),t.showSetupGuide?e("div",{staticClass:"setup-guide-card"},[e("div",{staticClass:"setup-guide-copy"},[e("div",{staticClass:"setup-guide-title"},[t._v(t._s(t.$t("dashboard.setupGuide.title")))]),e("div",{staticClass:"setup-guide-desc"},[t._v(t._s(t.$t("dashboard.setupGuide.desc")))]),e("div",{staticClass:"setup-guide-path"},[t._v(t._s(t.$t("dashboard.setupGuide.path")))])]),e("div",{staticClass:"setup-guide-actions"},[e("a-button",{on:{click:t.goToStrategyManagement}},[e("a-icon",{attrs:{type:"appstore"}}),t._v(" "+t._s(t.$t("dashboard.setupGuide.secondary"))+" ")],1),e("a-button",{attrs:{type:"primary"},on:{click:t.goToStrategyCreate}},[e("a-icon",{attrs:{type:"plus"}}),t._v(" "+t._s(t.$t("dashboard.setupGuide.primary"))+" ")],1)],1)]):t._e(),e("div",{staticClass:"chart-row"},[e("div",{staticClass:"chart-panel chart-main"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"calendar"}}),e("span",[t._v(t._s(t.$t("dashboard.profitCalendar")||"收益日曆"))])],1),e("div",{staticClass:"calendar-nav"},[e("a-button",{attrs:{type:"link",size:"small",disabled:t.currentCalendarIndex>=t.calendarMonths.length-1},on:{click:t.prevMonth}},[e("a-icon",{attrs:{type:"left"}})],1),e("span",{staticClass:"current-month"},[t._v(t._s(t.currentMonthLabel))]),e("a-button",{attrs:{type:"link",size:"small",disabled:t.currentCalendarIndex<=0},on:{click:t.nextMonth}},[e("a-icon",{attrs:{type:"right"}})],1)],1)]),e("div",{staticClass:"profit-calendar"},[t.currentCalendarMonth?[e("div",{staticClass:"month-summary"},[e("div",{staticClass:"summary-item"},[e("span",{staticClass:"summary-label"},[t._v(t._s(t.$t("dashboard.ranking.totalProfit")))]),e("span",{staticClass:"summary-value",class:t.currentCalendarMonth.total>=0?"positive":"negative"},[t._v(" "+t._s(t.currentCalendarMonth.total>=0?"+":"")+"$"+t._s(t.formatNumber(t.currentCalendarMonth.total))+" ")])]),e("div",{staticClass:"summary-item"},[e("span",{staticClass:"summary-label"},[t._v(t._s(t.$t("dashboard.label.win")))]),e("span",{staticClass:"summary-value positive"},[t._v(t._s(t.currentCalendarMonth.win_days))])]),e("div",{staticClass:"summary-item"},[e("span",{staticClass:"summary-label"},[t._v(t._s(t.$t("dashboard.label.lose")))]),e("span",{staticClass:"summary-value negative"},[t._v(t._s(t.currentCalendarMonth.lose_days))])])]),e("div",{staticClass:"calendar-weekdays"},t._l(t.weekdays,function(a){return e("div",{key:a,staticClass:"weekday"},[t._v(t._s(a))])}),0),e("div",{staticClass:"calendar-grid"},[t._l(t.calendarFirstDayOffset,function(t){return e("div",{key:"empty-"+t,staticClass:"calendar-cell empty"})}),t._l(t.currentCalendarMonth.days_in_month,function(a){return e("div",{key:a,staticClass:"calendar-cell",class:t.getDayClass(a)},[e("span",{staticClass:"day-number"},[t._v(t._s(a))]),null!==t.getDayProfit(a)?e("span",{staticClass:"day-profit",class:t.getDayProfit(a)>=0?"positive":"negative"},[t._v(" "+t._s(t.getDayProfit(a)>=0?"+":"")+t._s(t.formatCompactNumber(t.getDayProfit(a)))+" ")]):t._e()])})],2)]:e("div",{staticClass:"calendar-empty"},[e("a-icon",{attrs:{type:"inbox"}}),e("span",[t._v(t._s(t.$t("dashboard.noData")))])],1)],2)]),e("div",{staticClass:"chart-panel chart-side"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"pie-chart"}}),e("span",[t._v(t._s(t.$t("dashboard.strategyAllocation")||"策略分布"))])],1)]),e("div",{ref:"pieChart",staticClass:"chart-body"})])]),e("div",{staticClass:"chart-row"},[e("div",{staticClass:"chart-panel chart-half"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"area-chart"}}),e("span",[t._v(t._s(t.$t("dashboard.drawdownCurve")||"回撤曲线"))])],1)]),e("div",{ref:"drawdownChart",staticClass:"chart-body chart-sm"})]),e("div",{staticClass:"chart-panel chart-half"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"clock-circle"}}),e("span",[t._v(t._s(t.$t("dashboard.hourlyDistribution")||"交易时段"))])],1)]),e("div",{ref:"hourlyChart",staticClass:"chart-body chart-sm"})])]),e("div",{staticClass:"chart-panel"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"ordered-list"}}),e("span",[t._v(t._s(t.$t("dashboard.strategyRanking")||"策略排行榜"))])],1)]),e("div",{staticClass:"strategy-ranking"},[0===t.strategyStats.length?e("div",{staticClass:"empty-state"},[e("a-icon",{attrs:{type:"inbox"}}),e("span",[t._v(t._s(t.$t("dashboard.noStrategyData")))])],1):e("div",{staticClass:"ranking-grid"},t._l(t.strategyStats.slice(0,6),function(a,s){return e("div",{key:a.strategy_id,staticClass:"ranking-card",class:{"rank-top":s<3}},[e("div",{staticClass:"rank-badge",class:"rank-".concat(s+1)},[t._v(t._s(s+1))]),e("div",{staticClass:"rank-info"},[e("div",{staticClass:"rank-name"},[t._v(t._s(a.strategy_name))]),e("div",{staticClass:"rank-stats"},[e("span",{staticClass:"stat"},[e("label",[t._v(t._s(t.$t("dashboard.ranking.totalProfit")))]),e("span",{class:a.total_pnl>=0?"positive":"negative"},[t._v(" "+t._s(a.total_pnl>=0?"+":"")+"$"+t._s(t.formatNumber(a.total_pnl))+" ")])]),e("span",{staticClass:"stat"},[e("label",[t._v(t._s(t.$t("dashboard.winRate")))]),e("span",[t._v(t._s(t.formatNumber(a.win_rate,1))+"%")])]),e("span",{staticClass:"stat"},[e("label",[t._v(t._s(t.$t("dashboard.profitFactor")))]),e("span",[t._v(t._s(t.formatNumber(a.profit_factor,2)))])]),e("span",{staticClass:"stat"},[e("label",[t._v(t._s(t.$t("dashboard.ranking.trades")))]),e("span",[t._v(t._s(a.total_trades))])])])]),e("div",{staticClass:"rank-pnl-bar"},[e("div",{staticClass:"bar-fill",class:a.total_pnl>=0?"positive":"negative",style:{width:"".concat(Math.min(100,Math.abs(a.total_pnl)/t.maxStrategyPnl*100),"%")}})])])}),0)])]),e("div",{staticClass:"table-row"},[e("div",{staticClass:"table-panel"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"stock"}}),e("span",[t._v(t._s(t.$t("dashboard.currentPositions")))])],1),e("div",{staticClass:"panel-badge"},[t._v(t._s((t.summary.current_positions||[]).length))])]),e("a-table",{staticClass:"pro-table",attrs:{columns:t.positionColumns,"data-source":t.summary.current_positions,rowKey:"id",pagination:!1,size:"small",scroll:{x:"max-content"}},scopedSlots:t._u([{key:"symbol",fn:function(a,s){return[e("div",{staticClass:"symbol-cell"},[e("span",{staticClass:"symbol-name"},[t._v(t._s(a))]),e("span",{staticClass:"symbol-strategy"},[t._v(t._s(s.strategy_name))])])]}},{key:"side",fn:function(a){return[e("span",{staticClass:"side-tag",class:"long"===a?"long":"short"},[t._v(" "+t._s("long"===a?"LONG":"SHORT")+" ")])]}},{key:"unrealized_pnl",fn:function(a,s){return[e("div",{staticClass:"pnl-cell"},[e("span",{class:a>=0?"positive":"negative"},[t._v(" "+t._s(a>=0?"+":"")+"$"+t._s(t.formatNumber(a))+" ")]),e("span",{staticClass:"pnl-percent",class:s.pnl_percent>=0?"positive":"negative"},[t._v(" "+t._s(s.pnl_percent>=0?"+":"")+t._s(t.formatNumber(s.pnl_percent))+"% ")])])]}}])})],1),e("div",{staticClass:"table-panel"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"history"}}),e("span",[t._v(t._s(t.$t("dashboard.recentTrades")))])],1)]),e("a-table",{staticClass:"pro-table",attrs:{columns:t.columns,"data-source":t.summary.recent_trades,rowKey:"id",pagination:{pageSize:8,size:"small"},size:"small",scroll:{x:"max-content"}},scopedSlots:t._u([{key:"type",fn:function(a){return[e("span",{staticClass:"type-tag",class:t.getTypeClass(a)},[t._v(" "+t._s(t.getSignalTypeText(a))+" ")])]}},{key:"profit",fn:function(a,s){return[e("span",{class:"--"!==t.formatProfitValue(a,s)?a>=0?"positive":"negative":""},[t._v(" "+t._s(t.formatProfitValue(a,s))+" ")])]}},{key:"time",fn:function(a){return[e("span",{staticClass:"time-cell"},[t._v(t._s(t.formatTime(a)))])]}}])})],1)]),e("div",{staticClass:"chart-panel orders-panel"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"unordered-list"}}),e("span",[t._v(t._s(t.$t("dashboard.pendingOrders")))]),e("a-tooltip",{attrs:{title:t.soundEnabled?t.$t("dashboard.clickToMute"):t.$t("dashboard.clickToUnmute")}},[e("a-icon",{staticClass:"sound-toggle",class:{"sound-off":!t.soundEnabled},attrs:{type:t.soundEnabled?"sound":"audio-muted"},on:{click:t.toggleSound}})],1)],1),e("div",{staticClass:"panel-badge"},[t._v(t._s(t.ordersPagination.total))])]),e("a-table",{staticClass:"pro-table",attrs:{columns:t.orderColumns,"data-source":t.pendingOrders,rowKey:"id",pagination:{current:t.ordersPagination.current,pageSize:t.ordersPagination.pageSize,total:t.ordersPagination.total,showSizeChanger:!0,size:"small",showTotal:function(e){return t.$t("dashboard.totalOrders",{total:e})}},size:"small",loading:t.ordersLoading,scroll:{x:1200}},on:{change:t.handleOrdersTableChange},scopedSlots:t._u([{key:"strategy_name",fn:function(a,s){return[e("div",{staticClass:"symbol-cell"},[e("span",{staticClass:"symbol-name"},[t._v(t._s(a||"-"))]),e("span",{staticClass:"symbol-strategy"},[t._v("ID: "+t._s(s.strategy_id))])])]}},{key:"symbol",fn:function(a){return[e("span",{staticClass:"symbol-tag"},[t._v(t._s(a))])]}},{key:"signal_type",fn:function(a){return[e("span",{staticClass:"type-tag",class:t.getTypeClass(a)},[t._v(" "+t._s(t.getSignalTypeText(a))+" ")])]}},{key:"exchange",fn:function(a,s){return[s&&(s.exchange_display||s.exchange_id||a)?e("span",{staticClass:"exchange-tag",class:(s.exchange_display||s.exchange_id||a).toLowerCase()},[t._v(" "+t._s(String(s.exchange_display||s.exchange_id||a).toUpperCase())+" ")]):e("span",{staticClass:"text-muted"},[t._v("-")]),s&&s.market_type?e("div",{staticClass:"market-type"},[t._v(" "+t._s(String(s.market_type).toUpperCase())+" ")]):t._e()]}},{key:"notify",fn:function(a,s){return[e("div",{staticClass:"notify-icons"},[t._l(s&&s.notify_channels?s.notify_channels:[],function(a){return e("a-tooltip",{key:"".concat(s.id,"-").concat(a),attrs:{title:String(a)}},[e("a-icon",{staticClass:"notify-icon",attrs:{type:t.getNotifyIconType(a)}})],1)}),s&&s.notify_channels&&0!==s.notify_channels.length?t._e():e("span",{staticClass:"text-muted"},[t._v("-")])],2)]}},{key:"status",fn:function(a,s){return[e("span",{staticClass:"status-tag",class:a},[t._v(" "+t._s(t.getStatusText(a))+" ")]),"failed"===a&&s.error_message?e("div",{staticClass:"error-hint"},[e("a-tooltip",{attrs:{title:s.error_message}},[e("a-icon",{attrs:{type:"exclamation-circle"}}),e("span",[t._v(t._s(t.$t("dashboard.viewError")))])],1)],1):t._e()]}},{key:"amount",fn:function(a,s){return[e("div",[t._v(t._s(t.formatNumber(a,8)))]),s.filled_amount?e("div",{staticClass:"sub-text"},[t._v(" "+t._s(t.$t("dashboard.filled"))+": "+t._s(t.formatNumber(s.filled_amount,8))+" ")]):t._e()]}},{key:"price",fn:function(a,s){return[s.filled_price?e("div",[t._v(t._s(t.formatNumber(s.filled_price)))]):e("div",{staticClass:"text-muted"},[t._v("-")])]}},{key:"time_info",fn:function(a,s){return[e("div",{staticClass:"time-cell"},[t._v(t._s(t.formatTime(s.created_at)))]),s.executed_at?e("div",{staticClass:"sub-text"},[t._v(" "+t._s(t.formatTime(s.executed_at))+" ")]):t._e()]}}])})],1)])},mt=[],gt=(a(36033),a(68156),a(29362)),ht={summary:"/api/dashboard/summary",pendingOrders:"/api/dashboard/pendingOrders"};function _t(){return(0,y.Ay)({url:ht.summary,method:"get"})}function yt(t){return(0,y.Ay)({url:ht.pendingOrders,method:"get",params:t})}var ft=a(95353),vt={name:"Dashboard",data:function(){return{summary:{ai_strategy_count:0,indicator_strategy_count:0,total_equity:0,total_pnl:0,total_realized_pnl:0,total_unrealized_pnl:0,performance:{},strategy_stats:[],daily_pnl_chart:[],strategy_pnl_chart:[],monthly_returns:[],hourly_distribution:[],calendar_months:[],recent_trades:[],current_positions:[]},currentCalendarIndex:0,pieChart:null,drawdownChart:null,hourlyChart:null,pendingOrders:[],ordersLoading:!1,ordersPagination:{current:1,pageSize:20,total:0},orderPollTimer:null,lastOrderId:0,orderPollIntervalMs:5e3,soundEnabled:!0,beepCtx:null}},computed:(0,u.A)((0,u.A)({},(0,ft.aH)({navTheme:function(t){return t.app.theme}})),{},{isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},performance:function(){return this.summary.performance||{}},strategyStats:function(){return this.summary.strategy_stats||[]},showSetupGuide:function(){var t=Number(this.summary.indicator_strategy_count||0),e=Array.isArray(this.summary.current_positions)&&this.summary.current_positions.length>0,a=Array.isArray(this.summary.recent_trades)&&this.summary.recent_trades.length>0;return 0===t||!e&&!a},maxStrategyPnl:function(){var t=this.strategyStats;return t.length?Math.max.apply(Math,(0,c.A)(t.map(function(t){return Math.abs(t.total_pnl||0)})).concat([1])):1},avgTradesPerDay:function(){var t=this.summary.daily_pnl_chart||[],e=t.length||1,a=this.performance.total_trades||0;return(a/e).toFixed(1)},calendarMonths:function(){return this.summary.calendar_months||[]},currentCalendarMonth:function(){var t=this.calendarMonths;return t.length&&t[this.currentCalendarIndex]||null},currentMonthLabel:function(){var t=this.currentCalendarMonth;if(!t)return"-";var e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];return"".concat(e[t.month-1]," ").concat(t.year)},weekdays:function(){return["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},calendarFirstDayOffset:function(){var t=this.currentCalendarMonth;return t?t.first_weekday:0},orderStrategyFilters:function(){var t,e=Array.isArray(this.pendingOrders)?this.pendingOrders:[],a=new Map,s=(0,d.A)(e);try{for(s.s();!(t=s.n()).done;){var i=t.value,r=i&&i.strategy_id;if(void 0!==r&&null!==r&&!a.has(String(r))){var n=i&&i.strategy_name?String(i.strategy_name):"",o=n?"".concat(n," (ID: ").concat(r,")"):"ID: ".concat(r);a.set(String(r),{text:o,value:String(r)})}}}catch(l){s.e(l)}finally{s.f()}return Array.from(a.values()).sort(function(t,e){return String(t.text).localeCompare(String(e.text))})},columns:function(){var t=this;return[{title:this.$t("dashboard.table.time"),dataIndex:"created_at",scopedSlots:{customRender:"time"},width:150},{title:this.$t("dashboard.table.symbol"),dataIndex:"symbol",width:100},{title:this.$t("dashboard.table.type"),dataIndex:"type",scopedSlots:{customRender:"type"},width:90},{title:this.$t("dashboard.table.price"),dataIndex:"price",customRender:function(e){return t.formatNumber(e)},width:100},{title:this.$t("dashboard.table.profit"),dataIndex:"profit",scopedSlots:{customRender:"profit"},align:"right",width:100}]},positionColumns:function(){var t=this;return[{title:this.$t("dashboard.table.symbol"),dataIndex:"symbol",scopedSlots:{customRender:"symbol"}},{title:this.$t("dashboard.table.side"),dataIndex:"side",scopedSlots:{customRender:"side"}},{title:this.$t("dashboard.table.size"),dataIndex:"size",customRender:function(e){return t.formatNumber(e,4)}},{title:this.$t("dashboard.table.entryPrice"),dataIndex:"entry_price",customRender:function(e){return t.formatNumber(e)}},{title:this.$t("dashboard.table.pnl"),dataIndex:"unrealized_pnl",scopedSlots:{customRender:"unrealized_pnl"},align:"right"}]},orderColumns:function(){return[{title:this.$t("dashboard.orderTable.strategy"),dataIndex:"strategy_name",scopedSlots:{customRender:"strategy_name"},filters:this.orderStrategyFilters,filterMultiple:!0,onFilter:function(t,e){return String(e&&e.strategy_id)===String(t)},width:150},{title:this.$t("dashboard.orderTable.exchange"),dataIndex:"exchange_id",scopedSlots:{customRender:"exchange"},width:120},{title:this.$t("dashboard.orderTable.notify"),dataIndex:"notify_channels",scopedSlots:{customRender:"notify"},width:100},{title:this.$t("dashboard.orderTable.symbol"),dataIndex:"symbol",scopedSlots:{customRender:"symbol"},width:110},{title:this.$t("dashboard.orderTable.signalType"),dataIndex:"signal_type",scopedSlots:{customRender:"signal_type"},width:100},{title:this.$t("dashboard.orderTable.amount"),dataIndex:"amount",scopedSlots:{customRender:"amount"},width:130},{title:this.$t("dashboard.orderTable.price"),dataIndex:"filled_price",scopedSlots:{customRender:"price"},width:100},{title:this.$t("dashboard.orderTable.status"),dataIndex:"status",scopedSlots:{customRender:"status"},width:130},{title:this.$t("dashboard.orderTable.timeInfo"),dataIndex:"created_at",scopedSlots:{customRender:"time_info"},width:160}]}}),mounted:function(){this.fetchData(),this.fetchPendingOrders(),this.startOrderPolling(),window.addEventListener("resize",this.handleResize)},beforeDestroy:function(){this.stopOrderPolling(),window.removeEventListener("resize",this.handleResize),this.pieChart&&this.pieChart.dispose(),this.drawdownChart&&this.drawdownChart.dispose(),this.hourlyChart&&this.hourlyChart.dispose()},methods:{goToStrategyManagement:function(){this.$router.push("/trading-assistant?tab=strategy")},goToStrategyCreate:function(){this.$router.push("/trading-assistant?tab=strategy&mode=create")},fetchData:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,_t();case 1:a=e.v,1===a.code&&(t.summary=(0,u.A)((0,u.A)({},t.summary),a.data),t.$nextTick(function(){t.initCharts()})),e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}))()},fetchPendingOrders:function(t,e){var a=this;return(0,l.A)((0,o.A)().m(function s(){var i,r,n,l;return(0,o.A)().w(function(s){while(1)switch(s.p=s.n){case 0:return a.ordersLoading=!0,s.p=1,i=t||a.ordersPagination.current||1,r=e||a.ordersPagination.pageSize||20,s.n=2,yt({page:i,pageSize:r});case 2:n=s.v,1===n.code&&(l=n.data||{},a.pendingOrders=l.list||[],a.ordersPagination.current=Number(l.page||i||1),a.ordersPagination.pageSize=Number(l.pageSize||r||20),a.ordersPagination.total=Number(l.total||0)),s.n=4;break;case 3:s.p=3,s.v;case 4:return s.p=4,a.ordersLoading=!1,s.f(4);case 5:return s.a(2)}},s,null,[[1,3,4,5]])}))()},playOrderBeep:function(){if(this.soundEnabled)try{var t=window.AudioContext||window.webkitAudioContext;if(!t)return;this.beepCtx||(this.beepCtx=new t);var e=this.beepCtx;"suspended"===e.state&&"function"===typeof e.resume&&e.resume().catch(function(){});var a=function(t,a){var s=e.createOscillator(),i=e.createGain();s.type="sine",s.frequency.value=a,i.gain.value=.08,s.connect(i),i.connect(e.destination),s.start(t),s.stop(t+.12)},s=e.currentTime;a(s,880),a(s+.18,1100)}catch(i){}},startOrderPolling:function(){var t=this;this.stopOrderPolling(),this.initLastOrderId(),this.orderPollTimer=setInterval(function(){t.pollNewOrders()},this.orderPollIntervalMs)},stopOrderPolling:function(){this.orderPollTimer&&(clearInterval(this.orderPollTimer),this.orderPollTimer=null)},initLastOrderId:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,yt({page:1,pageSize:1});case 1:a=e.v,1===a.code&&a.data&&a.data.list&&a.data.list.length>0&&(t.lastOrderId=a.data.list[0].id||0),e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}))()},pollNewOrders:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i,r,n,l,c,u;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,yt({page:1,pageSize:10});case 1:if(a=e.v,1===a.code&&a.data&&a.data.list){e.n=2;break}return e.a(2);case 2:if(s=a.data.list||[],0!==s.length){e.n=3;break}return e.a(2);case 3:i=!1,r=t.lastOrderId,n=(0,d.A)(s);try{for(n.s();!(l=n.n()).done;)c=l.value,u=c.id||0,u>t.lastOrderId&&(i=!0,u>r&&(r=u))}catch(o){n.e(o)}finally{n.f()}i&&(t.lastOrderId=r,t.playOrderBeep(),t.fetchPendingOrders(),t.$notification.info({message:t.$t("dashboard.newOrderNotify"),description:t.$t("dashboard.newOrderDesc"),duration:4})),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2)}},e,null,[[0,4]])}))()},toggleSound:function(){this.soundEnabled=!this.soundEnabled,this.soundEnabled?this.$message.success(this.$t("dashboard.soundEnabled")):this.$message.info(this.$t("dashboard.soundDisabled"))},handleOrdersTableChange:function(t){var e=t&&t.current?t.current:1,a=t&&t.pageSize?t.pageSize:this.ordersPagination.pageSize||20;this.ordersPagination.current=e,this.ordersPagination.pageSize=a,this.fetchPendingOrders(e,a)},getTypeClass:function(t){if(!t)return"";var e=t.toLowerCase();return e.includes("open_long")||e.includes("add_long")?"long":e.includes("open_short")||e.includes("add_short")?"short":e.includes("close_long")?"close-long":e.includes("close_short")?"close-short":""},getSignalTypeColor:function(t){return t?(t=t.toLowerCase(),t.includes("open_long")||t.includes("add_long")?"green":t.includes("open_short")||t.includes("add_short")?"red":t.includes("close_long")?"orange":t.includes("close_short")?"purple":"blue"):"default"},getSignalTypeText:function(t){if(!t)return"-";var e={open_long:this.$t("dashboard.signalType.openLong"),open_short:this.$t("dashboard.signalType.openShort"),close_long:this.$t("dashboard.signalType.closeLong"),close_short:this.$t("dashboard.signalType.closeShort"),add_long:this.$t("dashboard.signalType.addLong"),add_short:this.$t("dashboard.signalType.addShort")};return e[t.toLowerCase()]||t.toUpperCase()},getStatusColor:function(t){var e={pending:"orange",processing:"blue",completed:"green",failed:"red",cancelled:"default"};return e[t]||"default"},getStatusText:function(t){if(!t)return"-";var e={pending:this.$t("dashboard.status.pending"),processing:this.$t("dashboard.status.processing"),completed:this.$t("dashboard.status.completed"),failed:this.$t("dashboard.status.failed"),cancelled:this.$t("dashboard.status.cancelled")};return e[t.toLowerCase()]||t.toUpperCase()},getNotifyIconType:function(t){var e=String(t||"").trim().toLowerCase(),a={browser:"bell",webhook:"link",discord:"comment",telegram:"message",tg:"message",tele:"message",email:"mail",phone:"phone"};return a[e]||"notification"},getExchangeTagColor:function(t){var e=String(t||"").trim().toLowerCase(),a={binance:"gold",okx:"purple",bitget:"cyan",signal:"geekblue"};return a[e]||"blue"},formatNumber:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return void 0===t||null===t?"0.00":Number(t).toLocaleString("en-US",{minimumFractionDigits:e,maximumFractionDigits:e})},formatProfitValue:function(t,e){if(null===t||void 0===t)return"--";var a=parseFloat(t),s=["open_long","open_short","add_long","add_short"];if(0===a&&e&&s.includes(e.type))return"--";if(Math.abs(a)<1e-6)return e&&s.includes(e.type)?"--":"$0.00";var i=a>=0?"+":"";return"".concat(i,"$").concat(this.formatNumber(a))},formatCompactNumber:function(t){if(void 0===t||null===t)return"0";var e=Math.abs(t);return e>=1e6?(t/1e6).toFixed(1)+"M":e>=1e3?(t/1e3).toFixed(1)+"k":e>=100?Math.round(t):t.toFixed(0)},prevMonth:function(){this.currentCalendarIndex0&&this.currentCalendarIndex--},getDayProfit:function(t){var e=this.currentCalendarMonth;if(!e||!e.days)return null;var a=String(t).padStart(2,"0");return void 0!==e.days[a]?e.days[a]:null},getDayClass:function(t){var e=this.getDayProfit(t);return null===e?"no-data":e>0?"profit":e<0?"loss":"zero"},formatTime:function(t){if(!t)return"-";try{var e;if("string"===typeof t&&t.includes("-")&&t.includes(":"))e=new Date(t);else{if(!("number"===typeof t||"string"===typeof t&&/^\d+$/.test(t)))return"-";var a="string"===typeof t?parseInt(t,10):t,s=a<1e12?1e3*a:a;e=new Date(s)}return isNaN(e.getTime())?"-":e.toLocaleString()}catch(i){return"-"}},initCharts:function(){this.initPieChart(),this.initDrawdownChart(),this.initHourlyChart()},initPieChart:function(){var t=this,e=this.$refs.pieChart;if(e){this.pieChart=gt.init(e);var a=Array.isArray(this.summary.strategy_stats)?this.summary.strategy_stats:[],s=Array.isArray(this.summary.strategy_pnl_chart)?this.summary.strategy_pnl_chart:[],i=[];i=a.length>0?a.map(function(t){var e=t&&t.strategy_name?String(t.strategy_name):"-",a=Number(t&&t.total_pnl?t.total_pnl:0),s=Number(t&&t.total_trades?t.total_trades:0),i=0!==a?Math.abs(a):s;return{name:e,value:i,signedValue:a,trades:s}}).filter(function(t){return t.value>0}):s.map(function(t){var e=t&&t.name?String(t.name):"-",a=Number(t&&t.value?t.value:0);return{name:e,value:Math.abs(a),signedValue:a}}).filter(function(t){return t.value>0});var r=this.isDarkTheme,n=r?"#9ca3af":"#6b7280",o=[new gt.graphic.LinearGradient(0,0,1,1,[{offset:0,color:"#3b82f6"},{offset:1,color:"#1d4ed8"}]),new gt.graphic.LinearGradient(0,0,1,1,[{offset:0,color:"#8b5cf6"},{offset:1,color:"#6d28d9"}]),new gt.graphic.LinearGradient(0,0,1,1,[{offset:0,color:"#10b981"},{offset:1,color:"#059669"}]),new gt.graphic.LinearGradient(0,0,1,1,[{offset:0,color:"#f59e0b"},{offset:1,color:"#d97706"}]),new gt.graphic.LinearGradient(0,0,1,1,[{offset:0,color:"#ec4899"},{offset:1,color:"#be185d"}]),new gt.graphic.LinearGradient(0,0,1,1,[{offset:0,color:"#06b6d4"},{offset:1,color:"#0891b2"}])],l={backgroundColor:"transparent",tooltip:{trigger:"item",backgroundColor:r?"rgba(17, 24, 39, 0.95)":"rgba(255, 255, 255, 0.95)",borderColor:r?"#374151":"#e5e7eb",textStyle:{color:r?"#f3f4f6":"#1f2937"},formatter:function(e){var a=e&&e.data&&"number"===typeof e.data.signedValue?e.data.signedValue:0,s=(a>=0?"+":"")+t.formatNumber(a,2),i=a>=0?"#10b981":"#ef4444";return'\n
    \n
    '.concat(e.name,'
    \n
    占比 ').concat(e.percent,'%
    \n
    PNL $').concat(s,"
    \n
    \n ")}},legend:{bottom:10,left:"center",itemWidth:12,itemHeight:12,itemGap:16,textStyle:{color:n,fontSize:11}},color:o,series:[{name:"策略分布",type:"pie",radius:["50%","75%"],center:["50%","45%"],avoidLabelOverlap:!1,itemStyle:{borderRadius:6,borderColor:r?"#1f2937":"#ffffff",borderWidth:3},label:{show:!1},emphasis:{label:{show:!0,fontSize:14,fontWeight:"bold",color:r?"#f3f4f6":"#1f2937"},scaleSize:8},labelLine:{show:!1},data:i.length>0?i:[{value:1,name:this.$t("dashboard.noData"),signedValue:0}]}]};this.pieChart.setOption(l)}},initDrawdownChart:function(){var t=this,e=this.$refs.drawdownChart;if(e){this.drawdownChart=gt.init(e);var a,s=(this.summary.daily_pnl_chart||[]).map(function(t){return t.date}),i=(this.summary.daily_pnl_chart||[]).map(function(t){return Number(t.profit||0)}),r=[],n=0,o=(0,d.A)(i);try{for(o.s();!(a=o.n()).done;){var l=a.value;n+=Number(l||0),r.push(n)}}catch(f){o.e(f)}finally{o.f()}var c=-1/0,u=0,p=0,m=r.map(function(t,e){c=Math.max(c,t);var a=Number((t-c).toFixed(2));return a\n
    ').concat(s,'
    \n
    \n \n \n ').concat(t.$t("dashboard.drawdown")||"Drawdown",'\n \n -$').concat(r,'\n
    \n
    \n
    \n
    \n \n ')}},grid:{left:55,right:20,bottom:35,top:20,containLabel:!1},xAxis:{type:"category",data:s,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:h,fontSize:10,formatter:function(t){return t.slice(5)}}},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:h,fontSize:10,formatter:function(t){return Math.abs(t)>=1e3?"-$"+(Math.abs(t)/1e3).toFixed(1)+"k":0===t?"0":"-$"+Math.abs(t)}},splitLine:{lineStyle:{color:_,type:[4,4]}},max:0},series:[{name:this.$t("dashboard.drawdown")||"Drawdown",type:"line",data:m,smooth:.3,showSymbol:!1,lineStyle:{width:2.5,color:new gt.graphic.LinearGradient(0,0,1,0,[{offset:0,color:"#ef4444"},{offset:.5,color:"#f87171"},{offset:1,color:"#fca5a5"}]),shadowColor:"rgba(239, 68, 68, 0.4)",shadowBlur:8,shadowOffsetY:4},areaStyle:{color:new gt.graphic.LinearGradient(0,0,0,1,[{offset:0,color:g?"rgba(239, 68, 68, 0.4)":"rgba(239, 68, 68, 0.25)"},{offset:.5,color:g?"rgba(248, 113, 113, 0.15)":"rgba(248, 113, 113, 0.1)"},{offset:1,color:"transparent"}])},markPoint:u<0?{symbol:"pin",symbolSize:45,itemStyle:{color:new gt.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"#f87171"},{offset:1,color:"#dc2626"}]),shadowColor:"rgba(239, 68, 68, 0.5)",shadowBlur:10},label:{show:!0,color:"#fff",fontSize:10,fontWeight:"bold",formatter:function(){return t.$t("dashboard.label.maxDrawdownPoint")||"MAX"}},data:[{name:this.$t("dashboard.maxDrawdown")||"Max Drawdown",coord:[p,u]}]}:void 0,markLine:{silent:!0,symbol:"none",lineStyle:{color:g?"#52525b":"#a1a1aa",type:"dashed",width:1},data:[{yAxis:0}],label:{show:!1}}}]};this.drawdownChart.setOption(y)}},initHourlyChart:function(){var t=this,e=this.$refs.hourlyChart;if(e){this.hourlyChart=gt.init(e);var a=this.summary.hourly_distribution||[],s=a.map(function(t){return"".concat(String(t.hour).padStart(2,"0"),":00")}),i=a.map(function(t){return t.count||0}),r=a.map(function(t){return t.profit||0}),n=this.isDarkTheme,o=n?"#9ca3af":"#6b7280",l=n?"rgba(75, 85, 99, 0.3)":"rgba(229, 231, 235, 0.8)",c={backgroundColor:"transparent",tooltip:{trigger:"axis",backgroundColor:n?"rgba(17, 24, 39, 0.95)":"rgba(255, 255, 255, 0.95)",borderColor:n?"#374151":"#e5e7eb",textStyle:{color:n?"#f3f4f6":"#1f2937"},formatter:function(e){var a,s=Array.isArray(e)?e:[],i=s[0]&&s[0].axisValue?s[0].axisValue:"",r=0,l=0,c=t.$t("dashboard.tradeCount")||"Trade Count",u=t.$t("dashboard.profit")||"Profit",p=t.$t("dashboard.unit.trades")||"",m=(0,d.A)(s);try{for(m.s();!(a=m.n()).done;){var g=a.value;g.seriesName===c&&(r=g.data||0),g.seriesName===u&&(l=g.data||0)}}catch(y){m.e(y)}finally{m.f()}var h=l>=0?"#10b981":"#ef4444",_=(l>=0?"+":"")+t.formatNumber(l,2);return'\n
    \n
    '.concat(i,'
    \n
    ').concat(c,' ').concat(r," ").concat(p,'
    \n
    ').concat(u,' $').concat(_,"
    \n
    \n ")}},grid:{left:50,right:20,bottom:30,top:10,containLabel:!1},xAxis:{type:"category",data:s,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:o,fontSize:10,interval:3}},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:o,fontSize:10},splitLine:{lineStyle:{color:l,type:"dashed"}}},series:[{name:this.$t("dashboard.tradeCount")||"Trade Count",type:"bar",data:i,barMaxWidth:16,itemStyle:{borderRadius:[3,3,0,0],color:new gt.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"#60a5fa"},{offset:1,color:"#3b82f6"}])}},{name:this.$t("dashboard.profit")||"Profit",type:"line",data:r,smooth:!0,showSymbol:!1,lineStyle:{width:2,color:"#a855f7"}}]};this.hourlyChart.setOption(c)}},handleResize:function(){this.pieChart&&this.pieChart.resize(),this.drawdownChart&&this.drawdownChart.resize(),this.hourlyChart&&this.hourlyChart.resize()}}},bt=vt,xt=(0,C.A)(bt,pt,mt,!1,null,"a3f2f566",null),Ct=xt.exports,kt=["BTC/USDT","ETH/USDT","BNB/USDT","SOL/USDT","ADA/USDT","XRP/USDT","DOGE/USDT","DOT/USDT","MATIC/USDT","AVAX/USDT","LINK/USDT","UNI/USDT","LTC/USDT","ATOM/USDT","ETC/USDT"],St=[{value:"binance",labelKey:"binance"},{value:"okx",labelKey:"okx"},{value:"bitget",labelKey:"bitget"},{value:"bybit",labelKey:"bybit"},{value:"coinbaseexchange",labelKey:"coinbaseexchange"},{value:"kraken",labelKey:"kraken"},{value:"kucoin",labelKey:"kucoin"},{value:"gate",labelKey:"gate"},{value:"bitfinex",labelKey:"bitfinex"},{value:"deepcoin",labelKey:"deepcoin"}],wt=[{value:"ibkr",labelKey:"ibkr",name:"Interactive Brokers"}],$t=[{value:"mt5",labelKey:"mt5",name:"MetaTrader 5"}],Tt={name:"TradingAssistant",mixins:[_.t],components:{TradingRecords:S,PositionRecords:M,StrategyTypeSelector:O,StrategyEditor:Z,PerformanceAnalysis:rt,StrategyLogs:ut,DashboardOverview:Ct},computed:{isAdvancedMode:function(){return"advanced"===this.creationMode},isSimpleMode:function(){return"simple"===this.creationMode},isSimpleCreateMode:function(){return this.isSimpleMode&&!this.editingStrategy},strategyFormWrapClass:function(){var t=["strategy-form-modal"];return this.isMobile&&t.push("mobile-modal"),this.isDarkTheme&&t.push("strategy-form-modal-dark"),t.join(" ")},displayCurrentStep:function(){return"script"===this.strategyMode?this.currentStep:this.isSimpleMode&&!this.editingStrategy?0===this.currentStep?0:1:this.currentStep},isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},needsPassphrase:function(){return["okx","okex","coinbaseexchange","kucoin","bitget","deepcoin"].includes(this.currentExchangeId)},isIBKRMarket:function(){return"USStock"===this.selectedMarketCategory},isMT5Market:function(){return"Forex"===this.selectedMarketCategory},isBrokerMarket:function(){return this.isIBKRMarket||this.isMT5Market},filteredExchangeCredentials:function(){var t=this;return this.exchangeCredentials&&Array.isArray(this.exchangeCredentials)?this.exchangeCredentials.filter(function(e){return t.isCredentialCompatible(e)}):[]},formattedExchangeOptions:function(){var t=this;return St.map(function(e){var a="";try{if(e.labelKey){var s="trading-assistant.exchangeNames.".concat(e.labelKey),i=t.$t(s);i!==s&&(a=i)}}catch(r){}return a||(a=e.value.charAt(0).toUpperCase()+e.value.slice(1)),(0,u.A)((0,u.A)({},e),{},{displayName:a})})},totalPnl:function(){return null!==this.currentEquity&&this.selectedStrategy&&this.selectedStrategy.initial_capital?this.currentEquity-(this.selectedStrategy.initial_capital||0):null},totalPnlPercent:function(){return null!==this.totalPnl&&this.selectedStrategy&&this.selectedStrategy.initial_capital?0===this.selectedStrategy.initial_capital?0:this.totalPnl/this.selectedStrategy.initial_capital*100:null},getEquityColorClass:function(){return null===this.totalPnl?"":this.totalPnl>=0?"text-success":"text-danger"},getPnlColorClass:function(){return null===this.totalPnl?"":this.totalPnl>=0?"text-success":"text-danger"},isCryptoMarket:function(){var t=this.selectedMarketCategory||"Crypto";return"crypto"===String(t).toLowerCase()},canUseLiveTrading:function(){var t=this.selectedMarketCategory||"Crypto";return"crypto"===String(t).toLowerCase()||("USStock"===t||"Forex"===t)},isLiveTradingAvailable:function(){var t=this.selectedMarketCategory||"Crypto",e=this.currentExchangeId||"";return"crypto"===String(t).toLowerCase()?["binance","okx","bitget","bybit","coinbaseexchange","kraken","kucoin","gate","bitfinex"].includes(e):"USStock"===t?"ibkr"===this.currentBrokerId:"Forex"===t&&"mt5"===this.currentBrokerId},showDemoTradingSwitch:function(){return this.currentExchangeId&&"binance"===this.currentExchangeId.toLowerCase()},brokerOptions:function(){var t=this;return wt.map(function(e){var a="";try{var s="trading-assistant.brokerNames.".concat(e.labelKey),i=t.$t(s);i!==s&&(a=i)}catch(r){}return a||(a=e.name||e.value.toUpperCase()),(0,u.A)((0,u.A)({},e),{},{displayName:a})})},forexBrokerOptions:function(){var t=this;return $t.map(function(e){var a="";try{var s="trading-assistant.brokerNames.".concat(e.labelKey),i=t.$t(s);i!==s&&(a=i)}catch(r){}return a||(a=e.name||e.value.toUpperCase()),(0,u.A)((0,u.A)({},e),{},{displayName:a})})},cryptoExchangeOptions:function(){var t=this;return St.map(function(e){var a="";try{if(e.labelKey){var s="trading-assistant.exchangeNames.".concat(e.labelKey),i=t.$t(s);i!==s&&(a=i)}}catch(r){}return a||(a=e.value.charAt(0).toUpperCase()+e.value.slice(1)),(0,u.A)((0,u.A)({},e),{},{displayName:a})})},groupedStrategies:function(){return"symbol"===this.groupByMode?this.groupedBySymbol:this.groupedByStrategy},groupedByStrategy:function(){var t,e={},a=[],s=(0,d.A)(this.strategies);try{for(s.s();!(t=s.n()).done;){var i=t.value,r=i.strategy_group_id;r&&r.trim()?(e[r]||(e[r]={id:r,baseName:i.group_base_name||i.strategy_name.split("-")[0],strategies:[],runningCount:0,stoppedCount:0}),e[r].strategies.push(i),"running"===i.status?e[r].runningCount++:e[r].stoppedCount++):a.push(i)}}catch(o){s.e(o)}finally{s.f()}var n=Object.values(e).sort(function(t,e){var a=Math.max.apply(Math,(0,c.A)(t.strategies.map(function(t){return t.created_at||0}))),s=Math.max.apply(Math,(0,c.A)(e.strategies.map(function(t){return t.created_at||0})));return s-a});return{groups:n,ungrouped:a}},groupedBySymbol:function(){var t,e={},a=[],s=(0,d.A)(this.strategies);try{for(s.s();!(t=s.n()).done;){var i=t.value,r=i.trading_config||{},n=r.symbol;if(n&&n.trim()){e[n]||(e[n]={id:"symbol_".concat(n),baseName:n,strategies:[],runningCount:0,stoppedCount:0});var o=(0,u.A)((0,u.A)({},i),{},{displayInfo:{strategyName:i.strategy_name||i.group_base_name||"Unnamed",timeframe:r.timeframe||"-",indicatorName:i.indicator_name||i.indicator_config&&i.indicator_config.name||"-"}});e[n].strategies.push(o),"running"===i.status?e[n].runningCount++:e[n].stoppedCount++}else a.push(i)}}catch(c){s.e(c)}finally{s.f()}var l=Object.values(e).sort(function(t,e){return t.baseName.localeCompare(e.baseName)});return{groups:l,ungrouped:a}},unconfiguredChannels:function(){var t=[];return this.notifyChannelsUi.includes("telegram")&&(this.userNotificationSettings.telegram_bot_token||this.userNotificationSettings.telegram_chat_id||t.push("Telegram")),this.notifyChannelsUi.includes("email")&&(this.userNotificationSettings.email||t.push("Email")),this.notifyChannelsUi.includes("discord")&&(this.userNotificationSettings.discord_webhook||t.push("Discord")),this.notifyChannelsUi.includes("webhook")&&(this.userNotificationSettings.webhook_url||t.push("Webhook")),t}},data:function(){return{topTab:"overview",loading:!1,loadingRecords:!1,strategies:[],selectedStrategy:null,showFormModal:!1,creationMode:"simple",showAdvancedSettings:!1,pendingRouteIndicatorId:"",lastAutoStrategyName:"",strategyMode:"",strategyCode:"",pendingScriptTemplateKey:"",showModeSelector:!1,strategyType:"indicator",selectedMarketCategory:"Crypto",currentStep:0,saving:!1,loadingIndicators:!1,availableIndicators:[],selectedIndicator:null,indicatorParams:[],indicatorParamValues:{},cryptoSymbols:kt,loadingWatchlist:!1,watchlist:[],exchangeOptions:St,currentExchangeId:"",currentBrokerId:"ibkr",connectionTestResult:null,indicatorsLoaded:!1,editingStrategy:null,currentEquity:null,equityPollingTimer:null,backtestCollapseKeys:["risk"],trailingEnabledUi:!1,entryPctMaxUi:100,aiFilterEnabledUi:!1,isEditMode:!1,supportedIPs:[],executionModeUi:"signal",liveDisclaimerAckUi:!1,notifyChannelsUi:["browser"],userNotificationSettings:{default_channels:["browser"],telegram_bot_token:"",telegram_chat_id:"",email:"",phone:"",discord_webhook:"",webhook_url:"",webhook_token:""},loadingExchangeCredentials:!1,exchangeCredentials:[],saveCredentialUi:!1,suppressApiClearOnce:!1,selectedSymbols:[],crossSectionalSymbols:[],collapsedGroups:{},groupByMode:"strategy",showAddSymbolModal:!1,addSymbolMarket:"Crypto",addSymbolMarketTypes:[{value:"Crypto",i18nKey:"dashboard.analysis.market.Crypto"},{value:"USStock",i18nKey:"dashboard.analysis.market.USStock"},{value:"Forex",i18nKey:"dashboard.analysis.market.Forex"},{value:"Futures",i18nKey:"dashboard.analysis.market.Futures"}],addSymbolKeyword:"",searchingSymbol:!1,symbolSearchResults:[],selectedAddSymbol:null,hasSearchedSymbol:!1,addingSymbol:!1,hotSymbols:[],loadingHotSymbols:!1,searchTimer:null}},beforeCreate:function(){this.form=this.$form.createForm(this)},mounted:function(){var t=this;"strategy"!==this.$route.query.tab&&"create"!==this.$route.query.mode||(this.topTab="strategy"),this.loadStrategies(),this.loadUserNotificationSettings(),"create"===this.$route.query.mode&&this.$nextTick(function(){var e=t.$route.query.indicator_id;e?(t.strategyMode="signal",t.creationMode="simple",t.pendingRouteIndicatorId=String(e),t._openCreateModal()):t.handleCreateStrategy()})},beforeDestroy:function(){this.stopEquityPolling()},methods:{goToStrategyTab:function(){this.topTab="strategy"},openCreateStrategyFromGuide:function(){var t=this;this.topTab="strategy",this.$nextTick(function(){t.handleCreateStrategy()})},loadUserNotificationSettings:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,h.vF)();case 1:a=e.v,1===a.code&&a.data&&(t.userNotificationSettings={default_channels:a.data.default_channels||["browser"],telegram_bot_token:a.data.telegram_bot_token||"",telegram_chat_id:a.data.telegram_chat_id||"",email:a.data.email||"",phone:a.data.phone||"",discord_webhook:a.data.discord_webhook||"",webhook_url:a.data.webhook_url||"",webhook_token:a.data.webhook_token||""}),e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}))()},loadWatchlist:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.loadingWatchlist=!0,e.p=1,e.n=2,(0,m.Qo)({userid:1});case 2:a=e.v,a&&1===a.code?t.watchlist=Array.isArray(a.data)?a.data:[]:t.watchlist=[],e.n=4;break;case 3:e.p=3,e.v,t.watchlist=[];case 4:return e.p=4,t.loadingWatchlist=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},handleCloseAddSymbolModal:function(){this.showAddSymbolModal=!1,this.addSymbolKeyword="",this.symbolSearchResults=[],this.selectedAddSymbol=null,this.hasSearchedSymbol=!1},handleAddSymbolMarketChange:function(t){this.addSymbolMarket=t,this.addSymbolKeyword="",this.symbolSearchResults=[],this.selectedAddSymbol=null,this.hasSearchedSymbol=!1,this.loadHotSymbols(t)},handleSymbolSearchInputChange:function(t){var e=this,a=t.target.value;if(this.addSymbolKeyword=a,this.searchTimer&&clearTimeout(this.searchTimer),!a||""===a.trim())return this.symbolSearchResults=[],this.hasSearchedSymbol=!1,void(this.selectedAddSymbol=null);this.searchTimer=setTimeout(function(){e.searchSymbolsInModal(a)},500)},handleSearchSymbol:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){return(0,o.A)().w(function(a){while(1)switch(a.n){case 0:if(t&&t.trim()){a.n=1;break}return a.a(2);case 1:if(e.addSymbolMarket){a.n=2;break}return e.$message.warning(e.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")),a.a(2);case 2:if(!(e.symbolSearchResults.length>0)){a.n=3;break}return a.a(2);case 3:e.hasSearchedSymbol&&0===e.symbolSearchResults.length?e.handleDirectAdd():e.searchSymbolsInModal(t);case 4:return a.a(2)}},a)}))()},searchSymbolsInModal:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:if(t&&""!==t.trim()){a.n=1;break}return e.symbolSearchResults=[],e.hasSearchedSymbol=!1,a.a(2);case 1:if(e.addSymbolMarket){a.n=2;break}return a.a(2);case 2:return e.searchingSymbol=!0,e.hasSearchedSymbol=!0,a.p=3,a.n=4,(0,m._3)({market:e.addSymbolMarket,keyword:t.trim()});case 4:s=a.v,s&&1===s.code&&Array.isArray(s.data)?e.symbolSearchResults=s.data:e.symbolSearchResults=[],a.n=6;break;case 5:a.p=5,a.v,e.symbolSearchResults=[];case 6:return a.p=6,e.searchingSymbol=!1,a.f(6);case 7:return a.a(2)}},a,null,[[3,5,6,7]])}))()},handleDirectAdd:function(){this.addSymbolKeyword&&this.addSymbolKeyword.trim()?this.addSymbolMarket?this.selectedAddSymbol={market:this.addSymbolMarket,symbol:this.addSymbolKeyword.trim().toUpperCase(),name:""}:this.$message.warning(this.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")):this.$message.warning(this.$t("dashboard.analysis.modal.addStock.pleaseEnterSymbol"))},handleSelectAddSymbol:function(t){this.selectedAddSymbol={market:this.addSymbolMarket,symbol:t.symbol,name:t.name||""}},loadHotSymbols:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:if(t||(t=e.addSymbolMarket||"Crypto"),t){a.n=1;break}return a.a(2);case 1:return e.loadingHotSymbols=!0,a.p=2,a.n=3,(0,m.z6)({market:t,limit:10});case 3:s=a.v,s&&1===s.code&&s.data?e.hotSymbols=s.data:e.hotSymbols=[],a.n=5;break;case 4:a.p=4,a.v,e.hotSymbols=[];case 5:return a.p=5,e.loadingHotSymbols=!1,a.f(5);case 6:return a.a(2)}},a,null,[[2,4,5,6]])}))()},handleConfirmAddSymbol:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i,r,n,l,d;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(a="",s="",!t.selectedAddSymbol){e.n=1;break}a=t.selectedAddSymbol.market,s=t.selectedAddSymbol.symbol.toUpperCase(),e.n=4;break;case 1:if(!t.addSymbolKeyword||!t.addSymbolKeyword.trim()){e.n=3;break}if(t.addSymbolMarket){e.n=2;break}return t.$message.warning(t.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")),e.a(2);case 2:a=t.addSymbolMarket,s=t.addSymbolKeyword.trim().toUpperCase(),e.n=4;break;case 3:return t.$message.warning(t.$t("dashboard.analysis.modal.addStock.pleaseSelectOrEnterSymbol")),e.a(2);case 4:return t.addingSymbol=!0,e.p=5,e.n=6,(0,m.dp)({userid:1,market:a,symbol:s});case 6:if(i=e.v,!i||1!==i.code){e.n=8;break}return t.$message.success(t.$t("dashboard.analysis.message.addStockSuccess")),e.n=7,t.loadWatchlist();case 7:r="".concat(a,":").concat(s),t.isEditMode?(t.form.setFieldsValue({symbol:r}),t.handleWatchlistSymbolChange(r)):(t.selectedSymbols.includes(r)||(t.selectedSymbols=[].concat((0,c.A)(t.selectedSymbols),[r])),t.handleMultiSymbolChange(t.selectedSymbols)),t.handleCloseAddSymbolModal(),e.n=9;break;case 8:t.$message.error((null===i||void 0===i?void 0:i.msg)||t.$t("dashboard.analysis.message.addStockFailed"));case 9:e.n=11;break;case 10:e.p=10,d=e.v,l=(null===d||void 0===d||null===(n=d.response)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.msg)||(null===d||void 0===d?void 0:d.message)||t.$t("dashboard.analysis.message.addStockFailed"),t.$message.error(l);case 11:return e.p=11,t.addingSymbol=!1,e.f(11);case 12:return e.a(2)}},e,null,[[5,10,11,12]])}))()},filterWatchlistOption:function(t,e){var a,s=(null===(a=e.componentOptions)||void 0===a||null===(a=a.propsData)||void 0===a?void 0:a.value)||"";return"__add_symbol_option__"===s||String(s).toLowerCase().includes(String(t||"").toLowerCase())},filterWatchlistOptionWithAdd:function(t,e){var a,s=(null===(a=e.componentOptions)||void 0===a||null===(a=a.propsData)||void 0===a?void 0:a.value)||"";return"__add_symbol_option__"===s||String(s).toLowerCase().includes(String(t||"").toLowerCase())},handleMultiSymbolChangeWithAdd:function(t){if(t&&t.includes("__add_symbol_option__"))return this.selectedSymbols=t.filter(function(t){return"__add_symbol_option__"!==t}),this.showAddSymbolModal=!0,void this.loadHotSymbols(this.addSymbolMarket);this.handleMultiSymbolChange(t)},handleStrategyTypeChange:function(t){var e=t.target.value;"single"===e&&(this.crossSectionalSymbols=[])},handleCrossSectionalSymbolChange:function(t){if(t&&t.includes("__add_symbol_option__"))return this.crossSectionalSymbols=t.filter(function(t){return"__add_symbol_option__"!==t}),this.showAddSymbolModal=!0,void this.loadHotSymbols(this.addSymbolMarket);if(this.crossSectionalSymbols=t||[],t&&t.length>0){var e=t[0];if("string"===typeof e&&e.includes(":")){var a=e.indexOf(":"),s=e.slice(0,a);this.selectedMarketCategory=s||"Crypto"}}},getMarketColor:function(t){var e={USStock:"green",Crypto:"purple",Forex:"gold",Futures:"cyan"};return e[t]||"default"},handleWatchlistSymbolChange:function(t){var e=this;if("__add_symbol_option__"===t)return this.$nextTick(function(){e.form.setFieldsValue({symbol:void 0})}),this.showAddSymbolModal=!0,void this.loadHotSymbols(this.addSymbolMarket);if(t&&"string"===typeof t&&t.includes(":")){var a=t.indexOf(":"),s=t.slice(0,a);if(this.selectedMarketCategory=s||"Crypto","Forex"===this.selectedMarketCategory){this.currentBrokerId="mt5";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({forex_broker_id:"mt5"})}catch(r){}}else if("USStock"===this.selectedMarketCategory){this.currentBrokerId="ibkr";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({broker_id:"ibkr"})}catch(r){}}var i=["Crypto","USStock","Forex"].includes(this.selectedMarketCategory);if(!i){this.executionModeUi="signal";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({execution_mode:"signal"})}catch(r){}}this.currentExchangeId="";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({exchange_id:void 0})}catch(r){}}},handleSimpleSymbolChange:function(t){if("__add_symbol_option__"===t)return this.showAddSymbolModal=!0,void this.loadHotSymbols(this.addSymbolMarket);var e=t?[t]:[];this.handleMultiSymbolChange(e)},handleMultiSymbolChange:function(t){if(this.selectedSymbols=t||[],t&&t.length>0){var e=t[0];if("string"===typeof e&&e.includes(":")){var a=e.indexOf(":"),s=e.slice(0,a);this.selectedMarketCategory=s||"Crypto"}}if("Forex"===this.selectedMarketCategory){this.currentBrokerId="mt5";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({forex_broker_id:"mt5"})}catch(r){}}else if("USStock"===this.selectedMarketCategory){this.currentBrokerId="ibkr";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({broker_id:"ibkr"})}catch(r){}}var i=["Crypto","USStock","Forex"].includes(this.selectedMarketCategory);if(!i){this.executionModeUi="signal";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({execution_mode:"signal"})}catch(r){}}this.currentExchangeId="";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({exchange_id:void 0})}catch(r){}},loadExchangeCredentials:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.loadingExchangeCredentials=!0,e.p=1,e.n=2,(0,g.IA)({user_id:1});case 2:a=e.v,a&&1===a.code?t.exchangeCredentials=a.data&&a.data.items||[]:(t.exchangeCredentials=[],t.$message.warning((null===a||void 0===a?void 0:a.msg)||t.$t("trading-assistant.messages.loadFailed"))),e.n=4;break;case 3:e.p=3,e.v,t.exchangeCredentials=[],t.$message.warning(t.$t("trading-assistant.exchange.testFailed"));case 4:return e.p=4,t.loadingExchangeCredentials=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},formatCredentialLabel:function(t){if(!t)return"";var e=(t.name||"").trim(),a=t.exchange_id||"",s=t.api_key_hint||"";return e?"".concat(a.toUpperCase()," - ").concat(e," (").concat(s,")"):"".concat(a.toUpperCase()," (").concat(s,")")},isCredentialCompatible:function(t){if(!t||!t.exchange_id)return!0;var e=(t.exchange_id||"").toLowerCase(),a=this.selectedMarketCategory||"Crypto";if("mt5"===e)return"Forex"===a;if("ibkr"===e)return"USStock"===a;var s=["binance","okx","bitget","bybit","coinbaseexchange","kraken","kucoin","gate","bitfinex","deepcoin"];return!s.includes(e)||"Crypto"===a},handleCredentialSelectChange:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s,i,r;return(0,o.A)().w(function(a){while(1)switch(a.n){case 0:if(t){a.n=1;break}return e.currentExchangeId="",e.connectionTestResult=null,a.a(2);case 1:if(s=e.exchangeCredentials.find(function(e){return String(e.id)===String(t)}),!s){a.n=5;break}if(i=(s.exchange_id||"").toLowerCase(),"mt5"!==i||"Forex"===e.selectedMarketCategory){a.n=2;break}e.$message.error(e.$t("trading-assistant.validation.mt5OnlyForForex"));try{e.form&&e.form.setFieldsValue&&e.form.setFieldsValue({credential_id:void 0})}catch(n){}return e.currentExchangeId="",e.connectionTestResult=null,a.a(2);case 2:if("ibkr"!==i||"USStock"===e.selectedMarketCategory){a.n=3;break}e.$message.error(e.$t("trading-assistant.validation.ibkrOnlyForUSStock"));try{e.form&&e.form.setFieldsValue&&e.form.setFieldsValue({credential_id:void 0})}catch(n){}return e.currentExchangeId="",e.connectionTestResult=null,a.a(2);case 3:if(r=["binance","okx","bitget","bybit","coinbaseexchange","kraken","kucoin","gate","bitfinex"],!r.includes(i)||"Crypto"===e.selectedMarketCategory){a.n=4;break}e.$message.error(e.$t("trading-assistant.validation.cryptoExchangeOnlyForCrypto"));try{e.form&&e.form.setFieldsValue&&e.form.setFieldsValue({credential_id:void 0})}catch(n){}return e.currentExchangeId="",e.connectionTestResult=null,a.a(2);case 4:e.currentExchangeId=s.exchange_id||"";case 5:e.connectionTestResult=null;case 6:return a.a(2)}},a)}))()},onSaveCredentialChange:function(t){var e=!!(t&&t.target&&t.target.checked);this.saveCredentialUi=e;try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({save_credential:e})}catch(a){}},onExecutionModeChange:function(t){var e=t&&t.target?t.target.value:t;if(this.executionModeUi=e||"signal",!this.canUseLiveTrading&&"signal"!==this.executionModeUi){this.executionModeUi="signal";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({execution_mode:"signal"})}catch(a){}}},setExecutionModeUi:function(t){var e=t||"signal";this.onExecutionModeChange(e);try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({execution_mode:e})}catch(a){}},onLiveDisclaimerAckChange:function(t){var e=!!(t&&t.target&&t.target.checked);this.liveDisclaimerAckUi=e;try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({live_disclaimer_ack:e})}catch(a){}},onNotifyChannelsChange:function(t){this.notifyChannelsUi=Array.isArray(t)?t:[]},formatCurrency:function(t){return null===t||void 0===t?"-":"$"+t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},formatPnl:function(t){if(null===t||void 0===t)return"-";var e=t>=0?"+":"";return e+"$"+Math.abs(t).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},formatPnlPercent:function(t){if(null===t||void 0===t)return"-";var e=t>=0?"+":"";return e+Math.abs(t).toFixed(2)+"%"},loadStrategies:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.loading=!0,e.p=1,e.n=2,(0,p.EM)();case 2:a=e.v,1===a.code?(s=a.data.strategies||[],t.strategies=s,t.selectedStrategy&&(i=t.strategies.find(function(e){return e.id===t.selectedStrategy.id}),t.selectedStrategy=i||null)):t.$message.error(a.msg||t.$t("trading-assistant.messages.loadFailed")),e.n=4;break;case 3:e.p=3,e.v,t.$message.error(t.$t("trading-assistant.messages.loadFailed"));case 4:return e.p=4,t.loading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},handleCreateStrategy:function(){this.isEditMode=!1,this.editingStrategy=null,this.creationMode="simple",this.strategyMode="",this.strategyCode="",this.pendingScriptTemplateKey="",this.showModeSelector=!0,this.showFormModal=!1},handleModeSelect:function(t){this.strategyMode=t,this.pendingScriptTemplateKey="",this.showModeSelector=!1,this._openCreateModal()},handleUseTemplate:function(t){this.strategyMode="script",this.pendingScriptTemplateKey=t,this.showModeSelector=!1,this._openCreateModal()},_openCreateModal:function(){var t=this;this.strategyType="indicator",this.creationMode=this.editingStrategy?"advanced":"simple",this.currentStep=0,this.currentExchangeId="",this.currentBrokerId="ibkr",this.selectedIndicator=null,this.connectionTestResult=null,this.executionModeUi="signal",this.notifyChannelsUi=["browser"],this.saveCredentialUi=!1,this.backtestCollapseKeys=["risk"],this.trailingEnabledUi=!1,this.entryPctMaxUi=100,this.aiFilterEnabledUi=!1,this.selectedMarketCategory="Crypto",this.selectedSymbols=[],this.showAdvancedSettings=!1;var e=this.buildStrategyDefaultName();this.lastAutoStrategyName=e,this.form.resetFields(),this.form.setFieldsValue({strategy_name:e,execution_mode:"signal",notify_channels:["browser"],save_credential:!1,live_disclaimer_ack:!1,initial_capital:1e3,market_type:"swap",leverage:5,trade_direction:"long",timeframe:"15m",cs_strategy_type:"single"}),this.liveDisclaimerAckUi=!1,this.showFormModal=!0,this.$nextTick((0,l.A)((0,o.A)().m(function e(){return(0,o.A)().w(function(e){while(1)switch(e.n){case 0:return e.n=1,t.loadWatchlist();case 1:return e.n=2,t.loadIndicators();case 2:t.applyPendingRouteIndicatorSelection(),t.loadExchangeCredentials();case 3:return e.a(2)}},e)})))},handleEditStrategy:function(t){var e=this;"running"!==t.status?(this.strategyType="indicator",this.strategyMode=t.strategy_mode||"signal",this.creationMode="advanced",this.strategyCode=t.strategy_code||"",this.pendingScriptTemplateKey="",this.isEditMode=!0,this.editingStrategy=t,this.currentStep=0,this.currentExchangeId="",this.selectedIndicator=null,this.connectionTestResult=null,this.form.resetFields(),this.backtestCollapseKeys=["risk"],this.trailingEnabledUi=!1,this.entryPctMaxUi=100,this.aiFilterEnabledUi=!1,this.showFormModal=!0,this.$nextTick((0,l.A)((0,o.A)().m(function a(){return(0,o.A)().w(function(a){while(1)switch(a.n){case 0:return e.loadWatchlist(),e.loadIndicators(),e.loadExchangeCredentials(),a.n=1,e.loadStrategyDataToForm(t);case 1:return a.a(2)}},a)})))):this.$message.warning(this.$t("trading-assistant.messages.runningWarning"))},loadStrategyDataToForm:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s,i,r,l,c,d,u,p,m,g,h,_,y,f,v,b,x,C,k,S,w,$,T,A,P,M,F,I,N,D,V,R,z,E,L,U,q,K,O,B,H,G;return(0,o.A)().w(function(a){while(1)switch(a.n){case 0:if(e.indicatorsLoaded){a.n=1;break}return a.n=1,e.loadIndicators();case 1:return a.n=2,e.$nextTick();case 2:return e.selectedMarketCategory=t.market_category||"Crypto",d=t.execution_mode||"signal",e.executionModeUi=d,e.liveDisclaimerAckUi="live"===d,u=t.notification_config&&t.notification_config.channels||["browser"],e.notifyChannelsUi=Array.isArray(u)?u:["browser"],p=!1,m=!1,t.trading_config&&(f=t.trading_config||{},v=f.trailing&&"object"===(0,n.A)(f.trailing)?f.trailing:null,p=void 0!==f.trailing_enabled?!!f.trailing_enabled:!(!v||!v.enabled),b=f.enable_ai_filter,m=!0===b||"true"===b||1===b||"1"===b,x=f.scale&&"object"===(0,n.A)(f.scale)?f.scale:null,C=f.position&&"object"===(0,n.A)(f.position)?f.position:null,k=new Set(["risk"]),(f.trend_add_enabled||f.dca_add_enabled||x&&(null!==(g=x.trendAdd)&&void 0!==g&&g.enabled||null!==(h=x.dcaAdd)&&void 0!==h&&h.enabled))&&k.add("scale"),(f.trend_reduce_enabled||f.adverse_reduce_enabled||x&&(null!==(_=x.trendReduce)&&void 0!==_&&_.enabled||null!==(y=x.adverseReduce)&&void 0!==y&&y.enabled))&&k.add("reduce"),(void 0!==f.entry_pct||C&&void 0!==C.entryPct)&&k.add("position"),e.backtestCollapseKeys=Array.from(k)),e.trailingEnabledUi=p,e.aiFilterEnabledUi=m,a.n=3,e.$nextTick();case 3:return e.form.setFieldsValue({enable_ai_filter:m}),a.n=4,e.$nextTick();case 4:if(e.form.setFieldsValue({execution_mode:e.executionModeUi,live_disclaimer_ack:e.liveDisclaimerAckUi,notify_channels:e.notifyChannelsUi,notify_email:(null===(s=t.notification_config)||void 0===s||null===(s=s.targets)||void 0===s?void 0:s.email)||"",notify_phone:(null===(i=t.notification_config)||void 0===i||null===(i=i.targets)||void 0===i?void 0:i.phone)||"",notify_telegram:(null===(r=t.notification_config)||void 0===r||null===(r=r.targets)||void 0===r?void 0:r.telegram)||"",notify_discord:(null===(l=t.notification_config)||void 0===l||null===(l=l.targets)||void 0===l?void 0:l.discord)||"",notify_webhook:(null===(c=t.notification_config)||void 0===c||null===(c=c.targets)||void 0===c?void 0:c.webhook)||""}),!t.indicator_config||!t.indicator_config.indicator_id){a.n=7;break}if(S=t.indicator_config.indicator_id,w=e.availableIndicators.find(function(t){return String(t.id)===String(S)}),!w){a.n=6;break}return T=String(w.id),e.form.setFieldsValue({indicator_id:T}),a.n=5,e.handleIndicatorChange(T);case 5:A=null===($=t.trading_config)||void 0===$?void 0:$.indicator_params,A&&"object"===(0,n.A)(A)&&Object.keys(A).forEach(function(t){t in e.indicatorParamValues&&e.$set(e.indicatorParamValues,t,A[t])}),a.n=7;break;case 6:e.form.setFieldsValue({indicator_id:String(S)});case 7:if(!t.exchange_config){a.n=11;break}if(P=t.exchange_config.exchange_id||"",M="live"===e.executionModeUi,F=["Crypto","USStock","Forex"].includes(e.selectedMarketCategory),I="USStock"===e.selectedMarketCategory,N="Forex"===e.selectedMarketCategory,!M||!F){a.n=10;break}if(!I){a.n=8;break}e.currentBrokerId=P||"ibkr",e.form.setFieldsValue({broker_id:P||"ibkr",ibkr_host:t.exchange_config.ibkr_host||"127.0.0.1",ibkr_port:t.exchange_config.ibkr_port||7497,ibkr_client_id:t.exchange_config.ibkr_client_id||1,ibkr_account:t.exchange_config.ibkr_account||""}),a.n=10;break;case 8:if(!N){a.n=9;break}e.currentBrokerId=P||"mt5",e.form.setFieldsValue({forex_broker_id:P||"mt5",mt5_server:t.exchange_config.mt5_server||"",mt5_login:t.exchange_config.mt5_login||"",mt5_password:t.exchange_config.mt5_password||"",mt5_terminal_path:t.exchange_config.mt5_terminal_path||""}),a.n=10;break;case 9:if(e.currentExchangeId=P||t.exchange_config.exchange_id||"",D=t.exchange_config.credential_id,!D){a.n=10;break}return e.form.setFieldsValue({credential_id:D}),a.n=10,e.handleCredentialSelectChange(D);case 10:I||N?e.currentBrokerId=P||(N?"mt5":"ibkr"):e.currentExchangeId=P;case 11:if(t.trading_config){if(V=t.trading_config||{},R=V.trailing&&"object"===(0,n.A)(V.trailing)?V.trailing:null,z=V.scale&&"object"===(0,n.A)(V.scale)?V.scale:null,E=V.position&&"object"===(0,n.A)(V.position)?V.position:null,L=V.strategy_type||t.strategy_type||"single","cross_sectional"===L)if(e.form.setFieldsValue({cs_strategy_type:"cross_sectional",portfolio_size:V.portfolio_size||10,long_ratio:V.long_ratio||.5,rebalance_frequency:V.rebalance_frequency||"daily"}),V.symbol_list&&Array.isArray(V.symbol_list))e.crossSectionalSymbols=V.symbol_list;else if(t.symbol_list)try{U="string"===typeof t.symbol_list?JSON.parse(t.symbol_list):t.symbol_list,Array.isArray(U)&&(e.crossSectionalSymbols=U)}catch(o){e.crossSectionalSymbols=[]}else e.crossSectionalSymbols=[];else e.form.setFieldsValue({cs_strategy_type:"single"}),e.crossSectionalSymbols=[];q=z&&z.trendAdd?z.trendAdd:null,K=z&&z.dcaAdd?z.dcaAdd:null,O=z&&z.trendReduce?z.trendReduce:null,B=z&&z.adverseReduce?z.adverseReduce:null,H=V.symbol,G="string"===typeof H&&H.includes(":")?H:"".concat(e.selectedMarketCategory,":").concat(H),e.form.setFieldsValue({strategy_name:t.strategy_name,symbol:G,initial_capital:V.initial_capital,leverage:V.leverage,trade_direction:V.trade_direction||"long",timeframe:V.timeframe||"1H",market_type:"futures"===V.market_type?"swap":V.market_type||"swap",take_profit_pct:V.take_profit_pct||0,stop_loss_pct:V.stop_loss_pct||0,trailing_enabled:p,trailing_stop_pct:void 0!==V.trailing_stop_pct?V.trailing_stop_pct||0:R&&R.pct||0,trailing_activation_pct:void 0!==V.trailing_activation_pct?V.trailing_activation_pct||0:R&&R.activationPct||0,trend_add_enabled:void 0!==V.trend_add_enabled?!!V.trend_add_enabled:!(!q||!q.enabled),trend_add_step_pct:void 0!==V.trend_add_step_pct?V.trend_add_step_pct||0:q&&q.stepPct||0,trend_add_size_pct:void 0!==V.trend_add_size_pct?V.trend_add_size_pct||0:q&&q.sizePct||0,trend_add_max_times:void 0!==V.trend_add_max_times?V.trend_add_max_times||0:q&&q.maxTimes||0,dca_add_enabled:void 0!==V.dca_add_enabled?!!V.dca_add_enabled:!(!K||!K.enabled),dca_add_step_pct:void 0!==V.dca_add_step_pct?V.dca_add_step_pct||0:K&&K.stepPct||0,dca_add_size_pct:void 0!==V.dca_add_size_pct?V.dca_add_size_pct||0:K&&K.sizePct||0,dca_add_max_times:void 0!==V.dca_add_max_times?V.dca_add_max_times||0:K&&K.maxTimes||0,trend_reduce_enabled:void 0!==V.trend_reduce_enabled?!!V.trend_reduce_enabled:!(!O||!O.enabled),trend_reduce_step_pct:void 0!==V.trend_reduce_step_pct?V.trend_reduce_step_pct||0:O&&O.stepPct||0,trend_reduce_size_pct:void 0!==V.trend_reduce_size_pct?V.trend_reduce_size_pct||0:O&&O.sizePct||0,trend_reduce_max_times:void 0!==V.trend_reduce_max_times?V.trend_reduce_max_times||0:O&&O.maxTimes||0,adverse_reduce_enabled:void 0!==V.adverse_reduce_enabled?!!V.adverse_reduce_enabled:!(!B||!B.enabled),adverse_reduce_step_pct:void 0!==V.adverse_reduce_step_pct?V.adverse_reduce_step_pct||0:B&&B.stepPct||0,adverse_reduce_size_pct:void 0!==V.adverse_reduce_size_pct?V.adverse_reduce_size_pct||0:B&&B.sizePct||0,adverse_reduce_max_times:void 0!==V.adverse_reduce_max_times?V.adverse_reduce_max_times||0:B&&B.maxTimes||0,entry_pct:0===V.entry_pct||V.entry_pct?V.entry_pct:E&&E.entryPct?E.entryPct:100,enable_ai_filter:m}),e.$nextTick(function(){e.recalcEntryPctMaxUi(),e.normalizeEntryPct()})}case 12:return a.a(2)}},a)}))()},handleSelectStrategy:function(t){this.selectedStrategy=t,this.currentEquity=null,this.loadStrategyDetails(),this.startEquityPolling()},loadStrategyDetails:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i,n,l,c,u,m,g,h,_,y,f;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.selectedStrategy){e.n=1;break}return e.a(2,Promise.resolve());case 1:return e.p=1,e.n=2,Promise.all([(0,p.Yx)(t.selectedStrategy.id),(0,p.oK)(t.selectedStrategy.id)]);case 2:if(a=e.v,s=(0,r.A)(a,2),i=s[0],n=s[1],l=null,1===i.code&&i.data&&(Array.isArray(i.data)&&i.data.length>0?(c=i.data[i.data.length-1],l=c.equity):(m=(null===(u=t.selectedStrategy.trading_config)||void 0===u?void 0:u.initial_capital)||t.selectedStrategy.initial_capital,l=m||null)),g=0,1===n.code&&n.data){h=n.data.positions||n.data.items||[],_=(0,d.A)(h);try{for(_.s();!(y=_.n()).done;)f=y.value,g+=parseFloat(f.unrealized_pnl||f.unrealizedPnl||0)}catch(o){_.e(o)}finally{_.f()}}t.currentEquity=null!==l?l+g:null,e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[1,3]])}))()},startEquityPolling:function(){var t=this;this.stopEquityPolling(),this.selectedStrategy&&(this.loadStrategyDetails(),this.equityPollingTimer=setInterval(function(){t.loadStrategyDetails()},1e4))},stopEquityPolling:function(){this.equityPollingTimer&&(clearInterval(this.equityPollingTimer),this.equityPollingTimer=null)},handleCloseModal:function(){this.showFormModal=!1,this.editingStrategy=null,this.isEditMode=!1,this.strategyType="indicator",this.strategyMode="",this.strategyCode="",this.pendingScriptTemplateKey="",this.currentStep=0,this.currentExchangeId="",this.selectedIndicator=null,this.connectionTestResult=null,this.indicatorsLoaded=!1,this.availableIndicators=[],this.pendingRouteIndicatorId="",this.lastAutoStrategyName="",this.backtestCollapseKeys=["risk"],this.trailingEnabledUi=!1,this.entryPctMaxUi=100,this.aiFilterEnabledUi=!1,this.showAdvancedSettings=!1,this.executionModeUi="signal",this.liveDisclaimerAckUi=!1,this.form.resetFields()},handleRefresh:function(){this.loadStrategies(),this.showFormModal=!1},handleMenuClick:function(t,e){switch(t){case"start":this.handleStartStrategy(e.id);break;case"stop":this.handleStopStrategy(e.id);break;case"edit":this.handleEditStrategy(e);break;case"backtest":this.handleBacktestStrategy(e);break;case"delete":this.handleDeleteStrategy(e);break}},toggleGroup:function(t){this.$set(this.collapsedGroups,t,!this.collapsedGroups[t])},handleBacktestStrategy:function(t){t&&t.id&&this.$router.push({path:"/backtest-center",query:{tab:"strategy",strategy_id:String(t.id)}})},handleGroupMenuClick:function(t,e){var a=this;return(0,l.A)((0,o.A)().m(function s(){var i,r;return(0,o.A)().w(function(s){while(1)switch(s.n){case 0:i=e.strategies.map(function(t){return t.id}),r=t,s.n="startAll"===r?1:"stopAll"===r?3:"deleteAll"===r?5:7;break;case 1:return s.n=2,a.handleBatchStartStrategies(i,e.baseName);case 2:return s.a(3,7);case 3:return s.n=4,a.handleBatchStopStrategies(i,e.baseName);case 4:return s.a(3,7);case 5:return s.n=6,a.handleBatchDeleteStrategies(i,e.baseName);case 6:return s.a(3,7);case 7:return s.a(2)}},s)}))()},handleBatchStartStrategies:function(t,e){var a=this;return(0,l.A)((0,o.A)().m(function e(){var s,i,r;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,p.UH)({strategy_ids:t});case 1:s=e.v,1===s.code?(r=(null===(i=s.data)||void 0===i||null===(i=i.success_ids)||void 0===i?void 0:i.length)||t.length,a.$message.success(a.$t("trading-assistant.messages.batchStartSuccess",{count:r})),a.loadStrategies()):a.$message.error(s.msg||a.$t("trading-assistant.messages.batchStartFailed")),e.n=3;break;case 2:e.p=2,e.v,a.$message.error(a.$t("trading-assistant.messages.batchStartFailed"));case 3:return e.a(2)}},e,null,[[0,2]])}))()},handleBatchStopStrategies:function(t,e){var a=this;return(0,l.A)((0,o.A)().m(function e(){var s,i,r;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,p.GF)({strategy_ids:t});case 1:s=e.v,1===s.code?(r=(null===(i=s.data)||void 0===i||null===(i=i.success_ids)||void 0===i?void 0:i.length)||t.length,a.$message.success(a.$t("trading-assistant.messages.batchStopSuccess",{count:r})),a.loadStrategies()):a.$message.error(s.msg||a.$t("trading-assistant.messages.batchStopFailed")),e.n=3;break;case 2:e.p=2,e.v,a.$message.error(a.$t("trading-assistant.messages.batchStopFailed"));case 3:return e.a(2)}},e,null,[[0,2]])}))()},handleBatchDeleteStrategies:function(t,e){var a=this;return(0,l.A)((0,o.A)().m(function s(){var i;return(0,o.A)().w(function(s){while(1)switch(s.n){case 0:i=a.$t("trading-assistant.messages.batchDeleteConfirm",{count:t.length,name:e}),a.$confirm({title:a.$t("trading-assistant.deleteAll"),content:i,okText:a.$t("trading-assistant.deleteAll"),okType:"danger",cancelText:a.$t("trading-assistant.form.cancel"),onOk:function(){var e=(0,l.A)((0,o.A)().m(function e(){var s,i,r;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,p.xQ)({strategy_ids:t});case 1:s=e.v,1===s.code?(r=(null===(i=s.data)||void 0===i||null===(i=i.success_ids)||void 0===i?void 0:i.length)||t.length,a.$message.success(a.$t("trading-assistant.messages.batchDeleteSuccess",{count:r})),a.selectedStrategy&&t.includes(a.selectedStrategy.id)&&(a.selectedStrategy=null,a.stopEquityPolling()),a.loadStrategies()):a.$message.error(s.msg||a.$t("trading-assistant.messages.batchDeleteFailed")),e.n=3;break;case 2:e.p=2,e.v,a.$message.error(a.$t("trading-assistant.messages.batchDeleteFailed"));case 3:return e.a(2)}},e,null,[[0,2]])}));function s(){return e.apply(this,arguments)}return s}()});case 1:return s.a(2)}},s)}))()},handleStartStrategy:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return a.p=0,a.n=1,(0,p.mV)(t);case 1:s=a.v,1===s.code?(e.$message.success(e.$t("trading-assistant.messages.startSuccess")),e.loadStrategies(),e.selectedStrategy&&e.selectedStrategy.id===t&&(e.selectedStrategy.status="running")):e.$message.error(s.msg||e.$t("trading-assistant.messages.startFailed")),a.n=3;break;case 2:a.p=2,a.v,e.$message.error(e.$t("trading-assistant.messages.startFailed"));case 3:return a.a(2)}},a,null,[[0,2]])}))()},handleStopStrategy:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return a.p=0,a.n=1,(0,p.Ke)(t);case 1:s=a.v,1===s.code?(e.$message.success(e.$t("trading-assistant.messages.stopSuccess")),e.loadStrategies(),e.selectedStrategy&&e.selectedStrategy.id===t&&(e.selectedStrategy.status="stopped")):e.$message.error(s.msg||e.$t("trading-assistant.messages.stopFailed")),a.n=3;break;case 2:a.p=2,a.v,e.$message.error(e.$t("trading-assistant.messages.stopFailed"));case 3:return a.a(2)}},a,null,[[0,2]])}))()},handleDeleteStrategy:function(t){var e=this,a=this.$t("trading-assistant.messages.deleteConfirmWithName",{name:t.strategy_name});this.$confirm({title:this.$t("trading-assistant.deleteStrategy"),content:a,okText:this.$t("trading-assistant.deleteStrategy"),okType:"danger",cancelText:this.$t("trading-assistant.form.cancel"),onOk:function(){var a=(0,l.A)((0,o.A)().m(function a(){var s;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return a.p=0,a.n=1,(0,p.v_)(t.id);case 1:s=a.v,1===s.code?(e.$message.success(e.$t("trading-assistant.messages.deleteSuccess")),e.selectedStrategy&&e.selectedStrategy.id===t.id&&(e.selectedStrategy=null,e.stopEquityPolling()),e.loadStrategies()):e.$message.error(s.msg||e.$t("trading-assistant.messages.deleteFailed")),a.n=3;break;case 2:a.p=2,a.v,e.$message.error(e.$t("trading-assistant.messages.deleteFailed"));case 3:return a.a(2)}},a,null,[[0,2]])}));function s(){return a.apply(this,arguments)}return s}()})},getStatusColor:function(t){var e={running:"green",stopped:"default",error:"red"};return e[t]||"default"},getStatusText:function(t){return this.$t("trading-assistant.status.".concat(t))||t},getStrategyTypeText:function(t){return this.$t("trading-assistant.strategyType.".concat(t))||t},getTradeDirectionText:function(t){if(!t)return"";var e={long:this.$t("trading-assistant.form.tradeDirectionLong")||"做多",short:this.$t("trading-assistant.form.tradeDirectionShort")||"做空",both:this.$t("trading-assistant.form.tradeDirectionBoth")||"双向"};return e[t]||t},handleIndicatorSelectFocus:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){return(0,o.A)().w(function(e){while(1)switch(e.n){case 0:if(t.indicatorsLoaded||t.loadingIndicators){e.n=1;break}return e.n=1,t.loadIndicators();case 1:return e.a(2)}},e)}))()},loadIndicators:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i,r;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!t.loadingIndicators){e.n=1;break}return e.a(2,new Promise(function(e){var a=setInterval(function(){t.loadingIndicators||(clearInterval(a),e())},100)}));case 1:if(!t.indicatorsLoaded){e.n=2;break}return e.a(2,Promise.resolve());case 2:return a=t.$store.getters.userInfo||{},s=a.id||1,t.loadingIndicators=!0,e.p=3,e.n=4,(0,y.Ay)({url:"/api/indicator/getIndicators",method:"get",params:{userid:s}});case 4:i=e.v,1===i.code&&i.data?(r=i.data.map(function(t){return{id:t.id,name:t.name,description:t.description,type:t.indicator_type||t.indicatorType||"python",code:t.code,is_buy:t.is_buy,source:1===t.is_buy?"bought":"custom"}}),t.availableIndicators=r,t.indicatorsLoaded=!0,t.applyPendingRouteIndicatorSelection()):(t.availableIndicators=[],t.$message.warning(i.msg||t.$t("trading-assistant.messages.loadIndicatorsFailed"))),e.n=6;break;case 5:e.p=5,e.v,t.availableIndicators=[],t.$message.warning(t.$t("trading-assistant.messages.loadIndicatorsFailed"));case 6:return e.p=6,t.loadingIndicators=!1,e.f(6);case 7:return e.a(2)}},e,null,[[3,5,6,7]])}))()},handleIndicatorChange:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s,i,r;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:if(s=String(t),e.selectedIndicator=e.availableIndicators.find(function(t){return String(t.id)===s}),e.applyAutoStrategyName(e.selectedIndicator),e.indicatorParams=[],e.indicatorParamValues={},!t){a.n=4;break}return a.p=1,a.n=2,e.$http.get("/api/indicator/getIndicatorParams",{params:{indicator_id:t}});case 2:i=a.v,i&&1===i.code&&Array.isArray(i.data)&&(e.indicatorParams=i.data,r={},i.data.forEach(function(t){r[t.name]=t.default}),e.indicatorParamValues=r),a.n=4;break;case 3:a.p=3,a.v;case 4:return a.a(2)}},a,null,[[1,3]])}))()},handleMarketTypeChange:function(t){var e=t.target.value;"spot"===e&&this.form.setFieldsValue({trade_direction:"long",leverage:1})},recalcEntryPctMaxUi:function(){if(this.form){var t=!!this.form.getFieldValue("trend_add_enabled"),e=!!this.form.getFieldValue("dca_add_enabled"),a=Number(this.form.getFieldValue("trend_add_max_times")||0),s=Number(this.form.getFieldValue("dca_add_max_times")||0),i=Number(this.form.getFieldValue("trend_add_size_pct")||0),r=Number(this.form.getFieldValue("dca_add_size_pct")||0),n=(t?a*i:0)+(e?s*r:0),o=Math.max(0,Math.min(100,100-n));this.entryPctMaxUi=o}else this.entryPctMaxUi=100},normalizeEntryPct:function(){if(this.form){var t=Number(this.form.getFieldValue("entry_pct")||0),e=Number(this.entryPctMaxUi||100);t>e&&this.form.setFieldsValue({entry_pct:e})}},onTrendAddToggle:function(t){var e=this;this.form&&(t&&this.form.setFieldsValue({dca_add_enabled:!1}),this.$nextTick(function(){e.recalcEntryPctMaxUi(),e.normalizeEntryPct()}))},onDcaAddToggle:function(t){var e=this;this.form&&(t&&this.form.setFieldsValue({trend_add_enabled:!1}),this.$nextTick(function(){e.recalcEntryPctMaxUi(),e.normalizeEntryPct()}))},onScaleParamsChange:function(){var t=this;this.$nextTick(function(){t.recalcEntryPctMaxUi(),t.normalizeEntryPct()})},onEntryPctChange:function(){var t=this;this.$nextTick(function(){return t.normalizeEntryPct()})},onTrailingToggle:function(t){this.form&&(this.trailingEnabledUi=!!t,t||this.form.setFieldsValue({trailing_stop_pct:0,trailing_activation_pct:0}))},onAiFilterToggle:function(t){this.aiFilterEnabledUi=!!t;try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({enable_ai_filter:!!t})}catch(e){}},filterIndicatorOption:function(t,e){var a,s=(null===(a=e.componentOptions)||void 0===a||null===(a=a.propsData)||void 0===a?void 0:a.label)||"";return s.toLowerCase().indexOf(t.toLowerCase())>=0},getIndicatorOptionLabel:function(t){return t?t.description?"".concat(t.name," - ").concat(t.description):t.name:""},buildStrategyDefaultName:function(t){var e=t&&t.name?t.name:this.$t("trading-assistant.form.defaultStrategyName"),a=this.$t("trading-assistant.form.defaultStrategySuffix");return"".concat(e).concat(a)},applyAutoStrategyName:function(t){if(!this.editingStrategy&&this.form&&"script"!==this.strategyMode){var e=this.buildStrategyDefaultName(t),a=this.form.getFieldValue("strategy_name");a&&a!==this.lastAutoStrategyName||(this.form.setFieldsValue({strategy_name:e}),this.lastAutoStrategyName=e)}},applyPendingRouteIndicatorSelection:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s;return(0,o.A)().w(function(e){while(1)switch(e.n){case 0:if(t.pendingRouteIndicatorId&&t.form&&!t.loadingIndicators){e.n=1;break}return e.a(2);case 1:if(a=String(t.pendingRouteIndicatorId),s=t.availableIndicators.find(function(t){return String(t.id)===a}),s){e.n=2;break}return e.a(2);case 2:return t.form.setFieldsValue({indicator_id:a}),e.n=3,t.handleIndicatorChange(a);case 3:t.pendingRouteIndicatorId="";case 4:return e.a(2)}},e)}))()},filterSymbolOption:function(t,e){return e.componentOptions.children[0].text.toLowerCase().indexOf(t.toLowerCase())>=0},getIndicatorTypeColor:function(t){var e={trend:"blue",momentum:"green",volatility:"orange",volume:"purple",custom:"default"};return e[t]||"default"},getIndicatorTypeName:function(t){return this.$t("trading-assistant.indicatorType.".concat(t))||t},getExchangeName:function(t){if(t.labelKey){var e="trading-assistant.exchangeNames.".concat(t.labelKey),a=this.$t(e);return a===e?t.value.charAt(0).toUpperCase()+t.value.slice(1):a}return t.label||t.value},getExchangeDisplayName:function(t){if(!t)return"";var e=this.exchangeOptions.find(function(e){return e.value===t});return e?this.getExchangeName(e):t.charAt(0).toUpperCase()+t.slice(1)},getExchangeTagColor:function(t){var e={binance:"gold",okx:"blue",coinbaseexchange:"cyan",kraken:"purple",bitfinex:"geekblue",huobi:"orange",gate:"green",mexc:"lime",kucoin:"volcano",bybit:"red",bitget:"magenta",bitmex:"red",deribit:"blue",phemex:"cyan",bitmart:"geekblue",bitstamp:"purple",bittrex:"orange",poloniex:"green",gemini:"lime",cryptocom:"volcano",blockchaincom:"magenta",bitflyer:"red",upbit:"blue",bithumb:"cyan",coinone:"purple",zb:"geekblue",lbank:"orange",bibox:"green",bigone:"lime",bitrue:"volcano",coinex:"magenta",ftx:"red",ftxus:"blue",binanceus:"gold",binancecoinm:"gold",binanceusdm:"gold",ibkr:"green"};return e[t]||"default"},handleApiConfigChange:function(){this.connectionTestResult=null},getModalPopupContainer:function(){return window.document.body},handleBrokerSelectChange:function(t){this.currentBrokerId=t||"ibkr",this.connectionTestResult=null},handleForexBrokerSelectChange:function(t){this.currentBrokerId=t||"mt5",this.connectionTestResult=null},handleExchangeSelectChange:function(t){var e=this;this.currentExchangeId=t||"",this.connectionTestResult=null,this.suppressApiClearOnce?this.suppressApiClearOnce=!1:this.$nextTick(function(){var t={api_key:void 0,secret_key:void 0,passphrase:void 0,enable_demo_trading:!1};setTimeout(function(){e.form.setFieldsValue(t)},100)})},getPlaceholder:function(t){var e={okx:{api_key:"请输入API Key",secret_key:"请输入Secret Key",passphrase:"请输入Passphrase(创建API时设置)"},okex:{api_key:"请输入API Key",secret_key:"请输入Secret Key",passphrase:"请输入Passphrase(创建API时设置)"},binance:{api_key:"请输入API Key",secret_key:"请输入Secret Key"},coinbaseexchange:{api_key:"请输入API Key(或Key Name)",secret_key:"请输入API Secret(或Private Key)",passphrase:"请输入Passphrase(Legacy Pro API需要)"},kucoin:{api_key:"请输入API Key",secret_key:"请输入Secret Key",passphrase:"请输入Passphrase"},gate:{api_key:"请输入API Key",secret_key:"请输入Secret Key"},mexc:{api_key:"请输入Access Key",secret_key:"请输入Secret Key"},kraken:{api_key:"请输入API Key",secret_key:"请输入Secret Key"},bitfinex:{api_key:"请输入API Key",secret_key:"请输入Secret Key"},bybit:{api_key:"请输入API Key",secret_key:"请输入Secret Key"},bitget:{api_key:"请输入API Key",secret_key:"请输入Secret Key",passphrase:"请输入Passphrase(Legacy Pro API需要)"}},a=e[this.currentExchangeId]||{};if(a[t])return a[t];var s={api_key:this.$t("trading-assistant.placeholders.inputApiKey"),secret_key:this.$t("trading-assistant.placeholders.inputSecretKey"),passphrase:this.$t("trading-assistant.placeholders.inputPassphrase")};return s[t]||this.$t("trading-assistant.placeholders.inputApiKey")},handleNext:function(){var t=this;if("script"!==this.strategyMode){if(0===this.currentStep){var e=["indicator_id","strategy_name"];e.push("initial_capital","market_type","leverage","trade_direction","timeframe"),this.isEditMode&&e.push("symbol"),this.form.validateFields(e,function(e,a){if(!e){if(!t.isEditMode){var s=t.form.getFieldValue("cs_strategy_type")||"single";if("cross_sectional"===s){if(!t.crossSectionalSymbols||0===t.crossSectionalSymbols.length)return void t.$message.warning(t.$t("trading-assistant.validation.symbolsRequired"))}else if(!t.selectedSymbols||0===t.selectedSymbols.length)return void t.$message.warning(t.$t("trading-assistant.validation.symbolsRequired"))}try{var i=a&&a.market_type||t.form.getFieldValue("market_type");"spot"===i&&t.form.setFieldsValue({leverage:1,trade_direction:"long"})}catch(r){}t.backtestCollapseKeys=["risk"];try{t.trailingEnabledUi=!!t.form.getFieldValue("trailing_enabled")}catch(r){t.trailingEnabledUi=!1}t.$nextTick(function(){t.recalcEntryPctMaxUi(),t.normalizeEntryPct()}),t.isSimpleMode&&!t.editingStrategy?t.currentStep=2:t.currentStep++}})}else if(1===this.currentStep){try{var a=this.form.getFieldValue("execution_mode")||"signal";this.executionModeUi=a;var s=this.form.getFieldValue("notify_channels")||["browser"];this.notifyChannelsUi=Array.isArray(s)?s:["browser"]}catch(o){}this.currentStep++}}else if(0===this.currentStep){var i=["strategy_name","symbol","initial_capital","timeframe"];this.form.validateFields(i,function(e){e||(t.currentStep=1)})}else if(1===this.currentStep){if(!this.strategyCode||this.strategyCode.trim().length<20)return void this.$message.warning(this.$t("trading-assistant.editor.codeHint"));try{var r=this.form.getFieldValue("execution_mode")||"signal";this.executionModeUi=r;var n=this.form.getFieldValue("notify_channels")||["browser"];this.notifyChannelsUi=Array.isArray(n)?n:["browser"]}catch(o){}this.currentStep=2}},handlePrev:function(){if(this.currentStep>0){if("script"===this.strategyMode)return void this.currentStep--;this.isSimpleMode&&!this.editingStrategy&&2===this.currentStep?this.currentStep=0:this.currentStep--}},handleSubmit:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){return(0,o.A)().w(function(e){while(1)switch(e.n){case 0:t.form.validateFields(function(){var e=(0,l.A)((0,o.A)().m(function e(a,s){var i,r,n,l,c,d,u,m,g,h,_,y,f,v,b,x,C,k,S,w,$,T,A;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(a){e.n=15;break}if(e.p=1,t.saving=!0,"script"!==t.strategyMode||t.editingStrategy){e.n=3;break}return i={channels:s.notify_channels||["browser"],targets:{email:t.userNotificationSettings.email||"",phone:t.userNotificationSettings.phone||"",telegram:t.userNotificationSettings.telegram_chat_id||"",telegram_bot_token:t.userNotificationSettings.telegram_bot_token||"",discord:t.userNotificationSettings.discord_webhook||"",webhook:t.userNotificationSettings.webhook_url||"",webhook_token:t.userNotificationSettings.webhook_token||""}},r=s.symbol||"",n="Crypto","string"===typeof r&&r.includes(":")&&(l=r.indexOf(":"),n=r.slice(0,l)||"Crypto",r=r.slice(l+1)),c={user_id:1,strategy_name:s.strategy_name,strategy_type:"ScriptStrategy",strategy_mode:"script",strategy_code:t.strategyCode,market_category:n,execution_mode:s.execution_mode||"signal",notification_config:i,trading_config:{initial_capital:s.initial_capital||1e3,leverage:s.leverage||1,timeframe:s.timeframe||"15m",market_type:s.market_type||"swap",symbol:r}},e.n=2,(0,p.WM)(c);case 2:return d=e.v,1===d.code?(t.$message.success(t.$t("trading-assistant.messages.createSuccess")),t.handleRefresh()):t.$message.error(d.msg||t.$t("trading-assistant.messages.createFailed")),t.saving=!1,t.showFormModal=!1,e.a(2);case 3:if(u=t.canUseLiveTrading&&"live"===s.execution_mode,!u){e.n=4;break}if(m=s.credential_id,m){e.n=4;break}return t.$message.warning(t.$t("trading-assistant.validation.credentialRequired")),t.saving=!1,e.a(2);case 4:if(g={channels:s.notify_channels||[],targets:{email:t.userNotificationSettings.email||"",phone:t.userNotificationSettings.phone||"",telegram:t.userNotificationSettings.telegram_chat_id||"",telegram_bot_token:t.userNotificationSettings.telegram_bot_token||"",discord:t.userNotificationSettings.discord_webhook||"",webhook:t.userNotificationSettings.webhook_url||"",webhook_token:t.userNotificationSettings.webhook_token||""}},g.channels&&0!==g.channels.length){e.n=5;break}return t.$message.warning(t.$t("trading-assistant.validation.notifyChannelRequired")),t.saving=!1,e.a(2);case 5:if(h=String(s.indicator_id),_=t.availableIndicators.find(function(t){return String(t.id)===h}),_){e.n=6;break}return t.$message.error(t.$t("trading-assistant.validation.indicatorRequired")),t.saving=!1,e.a(2);case 6:if(y=!!t.aiFilterEnabledUi,f="futures"===s.market_type?"swap":s.market_type||"swap",v=s.leverage||1,b=s.trade_direction||"long","spot"===f?(v=1,b="long",t.$message.info(t.$t("trading-assistant.messages.spotLimitations"))):(v<1&&(v=1),v>125&&(v=125)),x={strategy_name:s.strategy_name,market_category:t.selectedMarketCategory||"Crypto",execution_mode:s.execution_mode||"signal",notification_config:g,indicator_config:{indicator_id:_.id,indicator_name:_.name,indicator_code:_.code||""},exchange_config:u?t.isIBKRMarket?{exchange_id:s.broker_id||t.currentBrokerId||"ibkr",ibkr_host:s.ibkr_host||"127.0.0.1",ibkr_port:s.ibkr_port||7497,ibkr_client_id:s.ibkr_client_id||1,ibkr_account:s.ibkr_account||""}:t.isMT5Market?{exchange_id:s.forex_broker_id||t.currentBrokerId||"mt5",mt5_server:s.mt5_server||"",mt5_login:s.mt5_login||"",mt5_password:s.mt5_password||"",mt5_terminal_path:s.mt5_terminal_path||""}:{credential_id:s.credential_id,exchange_id:t.currentExchangeId||void 0}:void 0,trading_config:{initial_capital:s.initial_capital,leverage:v,trade_direction:b,timeframe:s.timeframe,market_type:f,margin_mode:"cross",signal_mode:"confirmed",take_profit_pct:s.take_profit_pct||0,stop_loss_pct:s.stop_loss_pct||0,trailing_enabled:!!s.trailing_enabled,trailing_stop_pct:s.trailing_stop_pct||0,trailing_activation_pct:s.trailing_activation_pct||0,trend_add_enabled:!!s.trend_add_enabled,trend_add_step_pct:s.trend_add_step_pct||0,trend_add_size_pct:s.trend_add_size_pct||0,trend_add_max_times:s.trend_add_max_times||0,dca_add_enabled:!!s.dca_add_enabled,dca_add_step_pct:s.dca_add_step_pct||0,dca_add_size_pct:s.dca_add_size_pct||0,dca_add_max_times:s.dca_add_max_times||0,trend_reduce_enabled:!!s.trend_reduce_enabled,trend_reduce_step_pct:s.trend_reduce_step_pct||0,trend_reduce_size_pct:s.trend_reduce_size_pct||0,trend_reduce_max_times:s.trend_reduce_max_times||0,adverse_reduce_enabled:!!s.adverse_reduce_enabled,adverse_reduce_step_pct:s.adverse_reduce_step_pct||0,adverse_reduce_size_pct:s.adverse_reduce_size_pct||0,adverse_reduce_max_times:s.adverse_reduce_max_times||0,entry_pct:0===s.entry_pct||s.entry_pct?s.entry_pct:100,commission:s.commission||0,slippage:s.slippage||0,enable_ai_filter:y,indicator_params:t.indicatorParamValues,strategy_type:s.cs_strategy_type||"single",symbol_list:"cross_sectional"===s.cs_strategy_type?t.crossSectionalSymbols:void 0,portfolio_size:"cross_sectional"===s.cs_strategy_type?s.portfolio_size||10:void 0,long_ratio:"cross_sectional"===s.cs_strategy_type?s.long_ratio||.5:void 0,rebalance_frequency:"cross_sectional"===s.cs_strategy_type?s.rebalance_frequency||"daily":void 0}},!t.editingStrategy){e.n=8;break}return k=s.symbol,"string"===typeof k&&k.includes(":")&&(S=k.indexOf(":"),x.market_category=k.slice(0,S)||x.market_category,k=k.slice(S+1)),x.trading_config.symbol=k,e.n=7,(0,p.P7)(t.editingStrategy.id,x);case 7:C=e.v,e.n=12;break;case 8:if(x.user_id=1,x.strategy_type="IndicatorStrategy","cross_sectional"!==s.cs_strategy_type){e.n=10;break}return x.strategy_type="IndicatorStrategy",x.trading_config.symbol=null,e.n=9,(0,p.WM)(x);case 9:C=e.v,e.n=12;break;case 10:return x.symbols=t.selectedSymbols,e.n=11,(0,p.Ox)(x);case 11:C=e.v;case 12:1===C.code?(t.isEditMode?t.$message.success(t.$t("trading-assistant.messages.updateSuccess")):($=s.cs_strategy_type||"single",T="cross_sectional"===$?t.crossSectionalSymbols.length:t.selectedSymbols.length,A=(null===(w=C.data)||void 0===w?void 0:w.total_created)||T,t.$message.success(t.$t("trading-assistant.messages.batchCreateSuccess",{count:A}))),t.handleRefresh()):t.$message.error(C.msg||(t.isEditMode?t.$t("trading-assistant.messages.updateFailed"):t.$t("trading-assistant.messages.createFailed"))),e.n=14;break;case 13:e.p=13,e.v,t.$message.error(t.isEditMode?t.$t("trading-assistant.messages.updateFailed"):t.$t("trading-assistant.messages.createFailed"));case 14:return e.p=14,t.saving=!1,e.f(14);case 15:return e.a(2)}},e,null,[[1,13,14,15]])}));return function(t,a){return e.apply(this,arguments)}}());case 1:return e.a(2)}},e)}))()},getFormValues:function(){var t=this;return new Promise(function(e,a){t.form.validateFields(function(t,s){t?a(t):e(s)})})},getDropdownContainer:function(t){return document.body}}},At=Tt,Pt=(0,C.A)(At,s,i,!1,null,"bbcac474",null),Mt=Pt.exports},84841:function(t,e,a){a.d(e,{DK:function(){return v},E$:function(){return d},Gl:function(){return m},O0:function(){return c},TK:function(){return n},aU:function(){return i},cw:function(){return l},d$:function(){return x},hG:function(){return o},hl:function(){return g},kg:function(){return r},nY:function(){return f},r7:function(){return u},rx:function(){return _},v9:function(){return h},vF:function(){return p},vi:function(){return b},wq:function(){return y}});var s=a(75769);function i(t){return(0,s.Ay)({url:"/api/users/list",method:"get",params:t})}function r(t){return(0,s.Ay)({url:"/api/users/create",method:"post",data:t})}function n(t,e){return(0,s.Ay)({url:"/api/users/update",method:"put",params:{id:t},data:e})}function o(t){return(0,s.Ay)({url:"/api/users/delete",method:"delete",params:{id:t}})}function l(t){return(0,s.Ay)({url:"/api/users/reset-password",method:"post",data:t})}function c(){return(0,s.Ay)({url:"/api/users/roles",method:"get"})}function d(){return(0,s.Ay)({url:"/api/users/profile",method:"get"})}function u(t){return(0,s.Ay)({url:"/api/users/profile/update",method:"put",data:t})}function p(){return(0,s.Ay)({url:"/api/users/notification-settings",method:"get"})}function m(t){return(0,s.Ay)({url:"/api/users/notification-settings",method:"put",data:t})}function g(){return(0,s.Ay)({url:"/api/users/notification-settings/test",method:"post",data:{}})}function h(t){return(0,s.Ay)({url:"/api/users/my-credits-log",method:"get",params:t})}function _(t){return(0,s.Ay)({url:"/api/users/my-referrals",method:"get",params:t})}function y(t){return(0,s.Ay)({url:"/api/users/set-credits",method:"post",data:t})}function f(t){return(0,s.Ay)({url:"/api/users/set-vip",method:"post",data:t})}function v(t){return(0,s.Ay)({url:"/api/users/system-strategies",method:"get",params:t})}function b(t){return(0,s.Ay)({url:"/api/users/admin-orders",method:"get",params:t})}function x(t){return(0,s.Ay)({url:"/api/users/admin-ai-stats",method:"get",params:t})}}}]); \ No newline at end of file diff --git a/frontend/dist/js/303-legacy.548ae0f9.js b/frontend/dist/js/447-legacy.998c00ff.js similarity index 99% rename from frontend/dist/js/303-legacy.548ae0f9.js rename to frontend/dist/js/447-legacy.998c00ff.js index 4638648..b5e1888 100644 --- a/frontend/dist/js/303-legacy.548ae0f9.js +++ b/frontend/dist/js/447-legacy.998c00ff.js @@ -1,4 +1,4 @@ -(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[303],{83401:function(t,e,i){"use strict";i.r(e),i.d(e,{default:function(){return $a}});i(52675),i(89463),i(62010),i(9868);var n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"chart-container",class:{"theme-dark":t.isDarkTheme}},[e("div",{staticClass:"chart-header"},[e("div",{staticClass:"header-top"},[e("div",{staticClass:"header-left"},[e("div",{staticClass:"search-section"},[e("a-select",{staticClass:"symbol-select",attrs:{"show-search":"",placeholder:t.$t("dashboard.indicator.selectSymbol"),dropdownClassName:"dark-dropdown","filter-option":t.filterSymbolOption,"not-found-content":null,open:t.symbolSearchOpen},on:{search:t.handleSymbolSearch,change:t.handleSymbolSelect,dropdownVisibleChange:t.handleDropdownVisibleChange},model:{value:t.searchSymbol,callback:function(e){t.searchSymbol=e},expression:"searchSymbol"}},[e("a-icon",{staticStyle:{color:"#999"},attrs:{slot:"suffixIcon",type:"search"},slot:"suffixIcon"}),t._l(t.symbolSuggestions,function(i){return e("a-select-option",{key:i.value,attrs:{value:i.value}},[e("div",{staticClass:"symbol-option"},[e("a-tag",{staticStyle:{"margin-right":"8px","margin-bottom":"0"},attrs:{color:t.getMarketColor(i.market)}},[t._v(" "+t._s(t.getMarketName(i.market))+" ")]),e("span",{staticClass:"symbol-name"},[t._v(t._s(i.symbol))]),i.name?e("span",{staticClass:"symbol-name-extra"},[t._v(t._s(i.name))]):t._e()],1)])}),e("a-select-option",{key:"add-stock-option",staticClass:"add-stock-option",attrs:{value:"__add_stock_option__"}},[e("div",{staticStyle:{width:"100%","text-align":"center",padding:"4px 0",color:"#1890ff",cursor:"pointer"}},[e("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"plus"}}),e("span",[t._v(t._s(t.$t("dashboard.analysis.watchlist.add")))])],1)])],2)],1),e("div",{staticClass:"timeframe-group"},t._l(["1m","5m","15m","30m","1H","4H","1D","1W"],function(i){return e("div",{key:i,staticClass:"timeframe-item",class:{active:t.timeframe===i},on:{click:function(e){return t.setTimeframe(i)}}},[t._v(" "+t._s(i)+" ")])}),0)]),t.currentSymbol?e("div",{staticClass:"current-symbol"},[e("div",{staticClass:"symbol-info"},[e("span",{staticClass:"symbol-label"},[t._v(t._s(t.currentSymbol))]),e("span",{staticClass:"market-tag"},[t._v(t._s(t.currentMarket))])]),e("div",{staticClass:"price-info",class:t.priceChangeClass},[e("span",{staticClass:"symbol-price"},[t._v(t._s(t.currentPrice))]),e("span",{staticClass:"symbol-change"},[t._v(" "+t._s(t.priceChange>0?"+":"")+t._s(t.priceChange.toFixed(2))+"% ")])]),t.isCryptoMarket?e("a-button",{staticClass:"qt-header-btn",attrs:{size:"small"},on:{click:t.openQuickTrade}},[e("a-icon",{attrs:{type:"thunderbolt",theme:"filled"}}),t._v(" "+t._s(t.$t("quickTrade.openPanel"))+" ")],1):t._e()],1):t._e()])]),e("div",{staticClass:"chart-content"},[e("div",{staticClass:"chart-main-row"},[t.currentSymbol?e("div",{staticClass:"mobile-symbol-price"},[e("div",{staticClass:"mobile-symbol-info"},[e("span",{staticClass:"mobile-market-tag"},[t._v(t._s(t.currentMarket))]),e("span",[t._v("-")]),e("span",{staticClass:"mobile-symbol-label"},[t._v(t._s(t.currentSymbol))])]),e("div",{staticClass:"mobile-price-info",class:t.priceChangeClass},[e("span",{staticClass:"mobile-symbol-price"},[t._v(t._s(t.currentPrice))]),e("span",{staticClass:"mobile-symbol-change"},[t._v(" "+t._s(t.priceChange>0?"+":"")+t._s(t.priceChange.toFixed(2))+"% ")])])]):t._e(),e("kline-chart",{ref:"klineChart",attrs:{symbol:t.currentSymbol,market:t.currentMarket,timeframe:t.timeframe,theme:t.chartTheme,activeIndicators:t.activeIndicators,realtimeEnabled:t.realtimeEnabled},on:{"price-change":t.handlePriceChange,retry:t.handleChartRetry,"indicator-toggle":t.handleIndicatorToggle}}),e("div",{staticClass:"chart-right"},[e("div",{staticClass:"indicators-panel"},[e("div",{staticClass:"panel-header"},[e("span",[t._v(t._s(t.$t("dashboard.indicator.panel.title")))]),e("div",{staticStyle:{display:"flex","align-items":"center","margin-left":"auto",gap:"8px"}},[t.isMobile?e("a-button",{staticClass:"mobile-header-create-btn",attrs:{type:"primary",size:"small",icon:"plus"},on:{click:t.handleCreateIndicator}},[t._v(" "+t._s(t.$t("dashboard.indicator.create"))+" ")]):t._e(),e("a-tooltip",{attrs:{title:t.realtimeEnabled?t.$t("dashboard.indicator.panel.realtimeOn"):t.$t("dashboard.indicator.panel.realtimeOff")}},[e("a-button",{staticClass:"realtime-toggle-btn",class:{active:t.realtimeEnabled},attrs:{type:"text"},on:{click:t.toggleRealtime}},[e("a-icon",{attrs:{type:t.realtimeEnabled?"sync":"pause-circle",spin:t.realtimeEnabled}})],1)],1)],1)]),e("div",{staticClass:"panel-body"},[t.isMobile?[e("div",{staticClass:"mobile-tab-content"},[e("div",{staticClass:"section-content custom-scrollbar"},[t._l(t.customIndicators,function(i){return e("div",{key:"custom-"+i.id,class:["indicator-card",{"indicator-active":t.isIndicatorActive("custom-"+i.id)}],on:{click:function(e){return t.toggleIndicator(i,"custom")}}},[e("div",{staticClass:"card-content"},[e("div",{staticClass:"card-header"},[e("span",{staticClass:"card-name"},[t._v(t._s(i.name))]),e("div",{staticClass:"card-actions"},[e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.action.edit")}},[e("a-icon",{staticClass:"action-icon edit-icon",attrs:{type:"edit"},on:{click:function(e){return e.stopPropagation(),t.handleEditIndicator(i)}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.action.delete")}},[e("a-icon",{staticClass:"action-icon delete-icon",attrs:{type:"delete"},on:{click:function(e){return e.stopPropagation(),t.handleDeleteIndicator(i)}}})],1),e("a-tooltip",{attrs:{title:t.isIndicatorActive("custom-"+i.id)?t.$t("dashboard.indicator.action.stop"):t.$t("dashboard.indicator.action.start")}},[e("a-icon",{class:["action-icon","toggle-icon",{active:t.isIndicatorActive("custom-"+i.id)}],attrs:{type:t.isIndicatorActive("custom-"+i.id)?"pause-circle":"play-circle"},on:{click:function(e){return e.stopPropagation(),t.toggleIndicator(i,"custom")}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.backtest.title")}},[e("a-icon",{staticClass:"action-icon backtest-icon",attrs:{type:"experiment"},on:{click:function(e){return e.stopPropagation(),t.handleOpenBacktest(i)}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.backtest.historyTitle")}},[e("a-icon",{staticClass:"action-icon backtest-history-icon",attrs:{type:"clock-circle"},on:{click:function(e){return e.stopPropagation(),t.handleOpenBacktestHistory(i)}}})],1),e("a-tooltip",{attrs:{title:i.publish_to_community?t.$t("dashboard.indicator.action.unpublish"):t.$t("dashboard.indicator.action.publish")}},[e("a-icon",{class:["action-icon","publish-icon",{published:i.publish_to_community}],attrs:{type:i.publish_to_community?"cloud":"cloud-upload"},on:{click:function(e){return e.stopPropagation(),t.handlePublishIndicator(i)}}})],1)],1)]),e("span",{staticClass:"card-desc"},[t._v(t._s(i.description||""))])])])}),0===t.customIndicators.length?e("div",{staticClass:"empty-indicators"},[e("a-icon",{attrs:{type:"info-circle"}}),e("span",[t._v(t._s(t.$t("dashboard.indicator.empty")))])],1):t._e()],2)])]:[e("div",{staticClass:"indicator-section",class:{"section-empty":0===t.customIndicators.length}},[e("div",{staticClass:"section-label"},[e("div",{staticClass:"section-label-left",on:{click:t.toggleCustomSection}},[e("a-icon",{staticClass:"collapse-icon",attrs:{type:t.customSectionCollapsed?"right":"down"}}),e("span",[t._v(t._s(t.$t("dashboard.indicator.section.myCreated"))+" ("+t._s(t.customIndicators.length)+")")])],1),e("a-button",{staticClass:"create-indicator-btn",attrs:{type:"primary",size:"small",icon:"plus"},on:{click:function(e){return e.stopPropagation(),t.handleCreateIndicator.apply(null,arguments)}}},[t._v(" "+t._s(t.$t("dashboard.indicator.create"))+" ")])],1),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.customSectionCollapsed,expression:"!customSectionCollapsed"}],staticClass:"section-content custom-scrollbar"},[t._l(t.customIndicators,function(i){return e("div",{key:"custom-"+i.id,class:["indicator-card",{"indicator-active":t.isIndicatorActive("custom-"+i.id)}],on:{click:function(e){return t.toggleIndicator(i,"custom")}}},[e("div",{staticClass:"card-content"},[e("div",{staticClass:"card-header"},[e("span",{staticClass:"card-name"},[t._v(t._s(i.name))]),e("div",{staticClass:"card-actions"},[e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.action.edit")}},[e("a-icon",{staticClass:"action-icon edit-icon",attrs:{type:"edit"},on:{click:function(e){return e.stopPropagation(),t.handleEditIndicator(i)}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.action.delete")}},[e("a-icon",{staticClass:"action-icon delete-icon",attrs:{type:"delete"},on:{click:function(e){return e.stopPropagation(),t.handleDeleteIndicator(i)}}})],1),e("a-tooltip",{attrs:{title:t.isIndicatorActive("custom-"+i.id)?t.$t("dashboard.indicator.action.stop"):t.$t("dashboard.indicator.action.start")}},[e("a-icon",{class:["action-icon","toggle-icon",{active:t.isIndicatorActive("custom-"+i.id)}],attrs:{type:t.isIndicatorActive("custom-"+i.id)?"pause-circle":"play-circle"},on:{click:function(e){return e.stopPropagation(),t.toggleIndicator(i,"custom")}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.backtest.title")}},[e("a-icon",{staticClass:"action-icon backtest-icon",attrs:{type:"experiment"},on:{click:function(e){return e.stopPropagation(),t.handleOpenBacktest(i)}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.backtest.historyTitle")}},[e("a-icon",{staticClass:"action-icon backtest-history-icon",attrs:{type:"clock-circle"},on:{click:function(e){return e.stopPropagation(),t.handleOpenBacktestHistory(i)}}})],1),e("a-tooltip",{attrs:{title:i.publish_to_community?t.$t("dashboard.indicator.action.unpublish"):t.$t("dashboard.indicator.action.publish")}},[e("a-icon",{class:["action-icon","publish-icon",{published:i.publish_to_community}],attrs:{type:i.publish_to_community?"cloud":"cloud-upload"},on:{click:function(e){return e.stopPropagation(),t.handlePublishIndicator(i)}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.action.createStrategy")}},[e("a-icon",{staticClass:"action-icon create-strategy-icon",attrs:{type:"rocket"},on:{click:function(e){return e.stopPropagation(),t.handleCreateStrategyFromIndicator(i)}}})],1)],1)]),e("span",{staticClass:"card-desc"},[t._v(t._s(i.description||""))])])])}),0===t.customIndicators.length?e("div",{staticClass:"empty-indicators"},[e("a-icon",{attrs:{type:"info-circle"}}),e("span",[t._v(t._s(t.$t("dashboard.indicator.empty")))])],1):t._e()],2)]),e("div",{staticClass:"indicator-section",class:{"section-empty":0===t.purchasedIndicators.length}},[e("div",{staticClass:"section-label"},[e("div",{staticClass:"section-label-left",on:{click:function(e){t.purchasedSectionCollapsed=!t.purchasedSectionCollapsed}}},[e("a-icon",{staticClass:"collapse-icon",attrs:{type:t.purchasedSectionCollapsed?"right":"down"}}),e("span",[t._v(t._s(t.$t("dashboard.indicator.section.purchased"))+" ("+t._s(t.purchasedIndicators.length)+")")])],1),e("a-button",{staticClass:"buy-indicator-btn",attrs:{type:"link",size:"small",icon:"shop"},on:{click:function(e){return e.stopPropagation(),t.goToIndicatorMarket.apply(null,arguments)}}},[t._v(" "+t._s(t.$t("menu.dashboard.community"))+" ")])],1),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.purchasedSectionCollapsed,expression:"!purchasedSectionCollapsed"}],staticClass:"section-content custom-scrollbar"},[t._l(t.purchasedIndicators,function(i){return e("div",{key:"purchased-"+i.id,class:["indicator-card","purchased-indicator",{"indicator-active":t.isIndicatorActive("purchased-"+i.id)}],on:{click:function(e){return t.toggleIndicator(i,"purchased")}}},[e("div",{staticClass:"card-content"},[e("div",{staticClass:"card-header"},[e("span",{staticClass:"card-name"},[e("a-icon",{staticClass:"purchased-icon",attrs:{type:"shopping"}}),t._v(" "+t._s(i.name)+" ")],1),e("div",{staticClass:"card-actions"},[e("a-tooltip",{attrs:{title:t.isIndicatorActive("purchased-"+i.id)?t.$t("dashboard.indicator.action.stop"):t.$t("dashboard.indicator.action.start")}},[e("a-icon",{class:["action-icon","toggle-icon",{active:t.isIndicatorActive("purchased-"+i.id)}],attrs:{type:t.isIndicatorActive("purchased-"+i.id)?"pause-circle":"play-circle"},on:{click:function(e){return e.stopPropagation(),t.toggleIndicator(i,"purchased")}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.backtest.title")}},[e("a-icon",{staticClass:"action-icon backtest-icon",attrs:{type:"experiment"},on:{click:function(e){return e.stopPropagation(),t.handleOpenBacktest(i)}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.backtest.historyTitle")}},[e("a-icon",{staticClass:"action-icon backtest-history-icon",attrs:{type:"clock-circle"},on:{click:function(e){return e.stopPropagation(),t.handleOpenBacktestHistory(i)}}})],1)],1)]),e("span",{staticClass:"card-desc"},[t._v(t._s(i.description||""))])])])}),0===t.purchasedIndicators.length?e("div",{staticClass:"empty-indicators"},[e("a-icon",{attrs:{type:"shopping"}}),e("span",[t._v(t._s(t.$t("dashboard.indicator.emptyPurchased")))])],1):t._e()],2)])]],2)])])],1),e("indicator-editor",{ref:"indicatorEditor",attrs:{visible:t.showIndicatorEditor,indicator:t.editingIndicator,userId:t.userId},on:{run:t.handleRunIndicator,save:t.handleSaveIndicator,cancel:function(e){t.showIndicatorEditor=!1,t.editingIndicator=null}}}),e("a-modal",{attrs:{visible:t.showParamsModal,title:t.$t("dashboard.indicator.paramsConfig.title"),confirmLoading:t.loadingParams,width:500,maskClosable:!1,keyboard:!1},on:{ok:t.confirmIndicatorParams,cancel:t.cancelIndicatorParams,afterClose:t.handleParamsModalAfterClose}},[t.pendingIndicator?e("div",{staticClass:"params-config-modal"},[e("div",{staticClass:"indicator-info"},[e("span",{staticClass:"indicator-name"},[t._v(t._s(t.pendingIndicator.name))])]),e("a-divider"),t.indicatorParams.length>0?e("div",{staticClass:"params-form"},t._l(t.indicatorParams,function(i){return e("div",{key:i.name,staticClass:"param-item"},[e("div",{staticClass:"param-header"},[e("label",{staticClass:"param-label"},[t._v(t._s(i.name))]),i.description?e("a-tooltip",{attrs:{title:i.description}},[e("a-icon",{staticStyle:{color:"#999","margin-left":"4px"},attrs:{type:"question-circle"}})],1):t._e()],1),"int"===i.type?e("a-input-number",{staticStyle:{width:"100%"},attrs:{precision:0},model:{value:t.indicatorParamValues[i.name],callback:function(e){t.$set(t.indicatorParamValues,i.name,e)},expression:"indicatorParamValues[param.name]"}}):"float"===i.type?e("a-input-number",{staticStyle:{width:"100%"},attrs:{precision:4},model:{value:t.indicatorParamValues[i.name],callback:function(e){t.$set(t.indicatorParamValues,i.name,e)},expression:"indicatorParamValues[param.name]"}}):"bool"===i.type?e("a-switch",{model:{value:t.indicatorParamValues[i.name],callback:function(e){t.$set(t.indicatorParamValues,i.name,e)},expression:"indicatorParamValues[param.name]"}}):e("a-input",{model:{value:t.indicatorParamValues[i.name],callback:function(e){t.$set(t.indicatorParamValues,i.name,e)},expression:"indicatorParamValues[param.name]"}})],1)}),0):e("a-empty",{attrs:{description:t.$t("dashboard.indicator.paramsConfig.noParams")}})],1):t._e()]),e("a-modal",{attrs:{title:t.publishIndicator&&t.publishIndicator.publish_to_community?t.$t("dashboard.indicator.publish.editTitle"):t.$t("dashboard.indicator.publish.title"),visible:t.showPublishModal,confirmLoading:t.publishing,width:"500px",okText:t.publishIndicator&&t.publishIndicator.publish_to_community?t.$t("dashboard.indicator.publish.update"):t.$t("dashboard.indicator.publish.confirm"),cancelText:t.$t("common.cancel")},on:{ok:t.handleConfirmPublish,cancel:function(e){t.showPublishModal=!1,t.publishIndicator=null}}},[e("a-form-model",{ref:"publishForm",attrs:{model:t.publishForm,rules:t.publishRules,layout:"vertical"}},[e("a-alert",{staticStyle:{"margin-bottom":"16px"},attrs:{type:"info","show-icon":"",message:t.$t("dashboard.indicator.publish.hint")}}),e("a-form-model-item",{attrs:{label:t.$t("dashboard.indicator.publish.pricingType"),prop:"pricingType"}},[e("a-radio-group",{model:{value:t.publishPricingType,callback:function(e){t.publishPricingType=e},expression:"publishPricingType"}},[e("a-radio",{attrs:{value:"free"}},[t._v(t._s(t.$t("dashboard.indicator.publish.free")))]),e("a-radio",{attrs:{value:"paid"}},[t._v(t._s(t.$t("dashboard.indicator.publish.paid")))])],1)],1),"paid"===t.publishPricingType?e("a-form-model-item",{attrs:{label:t.$t("dashboard.indicator.publish.price"),prop:"price"}},[e("a-input-number",{staticStyle:{width:"200px"},attrs:{min:1,max:1e4,precision:0},model:{value:t.publishPrice,callback:function(e){t.publishPrice=e},expression:"publishPrice"}}),e("span",{staticStyle:{"margin-left":"8px"}},[t._v(t._s(t.$t("community.credits")))])],1):t._e(),"paid"===t.publishPricingType?e("a-form-model-item",{attrs:{label:t.$t("dashboard.indicator.publish.vipFree")}},[e("a-switch",{model:{value:t.publishVipFree,callback:function(e){t.publishVipFree=e},expression:"publishVipFree"}}),e("div",{staticStyle:{"margin-top":"6px",color:"rgba(0,0,0,0.45)","font-size":"12px"}},[t._v(" "+t._s(t.$t("dashboard.indicator.publish.vipFreeHint"))+" ")])],1):t._e(),e("a-form-model-item",{attrs:{label:t.$t("dashboard.indicator.publish.description"),prop:"description"}},[e("a-textarea",{attrs:{placeholder:t.$t("dashboard.indicator.publish.descriptionPlaceholder"),rows:4,maxLength:500},model:{value:t.publishDescription,callback:function(e){t.publishDescription=e},expression:"publishDescription"}})],1),t.publishIndicator&&t.publishIndicator.publish_to_community?e("div",{staticStyle:{"margin-top":"16px"}},[e("a-button",{attrs:{type:"danger",ghost:"",loading:t.unpublishing},on:{click:t.handleUnpublish}},[e("a-icon",{attrs:{type:"close-circle"}}),t._v(" "+t._s(t.$t("dashboard.indicator.publish.unpublish"))+" ")],1)],1):t._e()],1)],1),e("a-modal",{attrs:{title:t.$t("dashboard.analysis.modal.addStock.title"),visible:t.showAddStockModal,confirmLoading:t.addingStock,width:"600px",okText:t.$t("dashboard.analysis.modal.addStock.confirm"),cancelText:t.$t("dashboard.analysis.modal.addStock.cancel")},on:{ok:t.handleAddStock,cancel:t.handleCloseAddStockModal}},[e("div",{staticClass:"add-stock-modal-content"},[e("a-tabs",{staticClass:"market-tabs",on:{change:t.handleMarketTabChange},model:{value:t.selectedMarketTab,callback:function(e){t.selectedMarketTab=e},expression:"selectedMarketTab"}},t._l(t.marketTypes,function(i){return e("a-tab-pane",{key:i.value,attrs:{tab:t.$t(i.i18nKey||"dashboard.analysis.market.".concat(i.value))}})}),1),e("div",{staticClass:"symbol-search-section"},[e("a-input-search",{attrs:{placeholder:t.$t("dashboard.analysis.modal.addStock.searchOrInputPlaceholder"),loading:t.searchingSymbols,size:"large","allow-clear":""},on:{search:t.handleSearchOrInput,change:t.handleSymbolSearchInput},model:{value:t.symbolSearchKeyword,callback:function(e){t.symbolSearchKeyword=e},expression:"symbolSearchKeyword"}},[e("a-button",{attrs:{slot:"enterButton",type:"primary",icon:"search"},slot:"enterButton"},[t._v(" "+t._s(t.$t("dashboard.analysis.modal.addStock.search"))+" ")])],1)],1),t.symbolSearchResults.length>0?e("div",{staticClass:"search-results-section"},[e("div",{staticClass:"section-title"},[e("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"search"}}),t._v(" "+t._s(t.$t("dashboard.analysis.modal.addStock.searchResults"))+" ")],1),e("a-list",{staticClass:"symbol-list",attrs:{"data-source":t.symbolSearchResults,loading:t.searchingSymbols,size:"small"},scopedSlots:t._u([{key:"renderItem",fn:function(i){return e("a-list-item",{staticClass:"symbol-list-item",on:{click:function(e){return t.selectSymbol(i)}}},[e("a-list-item-meta",[e("template",{slot:"title"},[e("div",{staticClass:"symbol-item-content"},[e("span",{staticClass:"symbol-code"},[t._v(t._s(i.symbol))]),e("span",{staticClass:"symbol-name"},[t._v(t._s(i.name))]),i.exchange?e("a-tag",{staticStyle:{"margin-left":"8px"},attrs:{size:"small",color:"blue"}},[t._v(" "+t._s(i.exchange)+" ")]):t._e()],1)])],2)],1)}}],null,!1,1074844145)})],1):t._e(),e("div",{staticClass:"hot-symbols-section"},[e("div",{staticClass:"section-title"},[e("a-icon",{staticStyle:{color:"#ff4d4f","margin-right":"4px"},attrs:{type:"fire"}}),t._v(" "+t._s(t.$t("dashboard.analysis.modal.addStock.hotSymbols"))+" ")],1),e("a-spin",{attrs:{spinning:t.loadingHotSymbols}},[t.hotSymbols.length>0?e("a-list",{staticClass:"symbol-list",attrs:{"data-source":t.hotSymbols,size:"small"},scopedSlots:t._u([{key:"renderItem",fn:function(i){return e("a-list-item",{staticClass:"symbol-list-item",on:{click:function(e){return t.selectSymbol(i)}}},[e("a-list-item-meta",[e("template",{slot:"title"},[e("div",{staticClass:"symbol-item-content"},[e("span",{staticClass:"symbol-code"},[t._v(t._s(i.symbol))]),e("span",{staticClass:"symbol-name"},[t._v(t._s(i.name))]),i.exchange?e("a-tag",{staticStyle:{"margin-left":"8px"},attrs:{size:"small",color:"orange"}},[t._v(" "+t._s(i.exchange)+" ")]):t._e()],1)])],2)],1)}}],null,!1,2177647935)}):e("a-empty",{attrs:{description:t.$t("dashboard.analysis.modal.addStock.noHotSymbols"),image:!1}})],1)],1),t.selectedSymbolForAdd?e("div",{staticClass:"selected-symbol-section"},[e("a-alert",{attrs:{message:t.$t("dashboard.analysis.modal.addStock.selectedSymbol"),type:"info","show-icon":"",closable:""},on:{close:function(e){t.selectedSymbolForAdd=null}}},[e("template",{slot:"description"},[e("div",{staticClass:"selected-symbol-info"},[e("a-tag",{staticStyle:{"margin-right":"8px"},attrs:{color:t.getMarketColor(t.selectedSymbolForAdd.market)}},[t._v(" "+t._s(t.$t("dashboard.analysis.market.".concat(t.selectedSymbolForAdd.market)))+" ")]),e("strong",[t._v(t._s(t.selectedSymbolForAdd.symbol))]),t.selectedSymbolForAdd.name?e("span",{staticStyle:{color:"#999","margin-left":"8px"}},[t._v(t._s(t.selectedSymbolForAdd.name))]):e("span",{staticStyle:{color:"#999","margin-left":"8px","font-style":"italic"}},[t._v(t._s(t.$t("dashboard.analysis.modal.addStock.nameWillBeFetched")))])],1)])],2)],1):t._e()],1)])],1),e("a-tooltip",{attrs:{title:t.$t("quickTrade.openPanel"),placement:"left"}},[!t.showQuickTrade&&t.currentSymbol&&t.isCryptoMarket?e("div",{staticClass:"qt-floating-btn",on:{click:t.openQuickTrade}},[e("a-icon",{attrs:{type:"thunderbolt",theme:"filled"}})],1):t._e()]),e("quick-trade-panel",{attrs:{visible:t.showQuickTrade,symbol:t.qtSymbol,"preset-side":t.qtSide,"preset-price":t.qtPrice,source:"indicator","market-type":"swap"},on:{close:function(e){t.showQuickTrade=!1},"order-success":t.onQuickTradeSuccess,"update:symbol":t.handleQuickTradeSymbolChange}})],1)},a=[],r=(i(62621),i(43898)),o=i(44735),s=i(15863),l=i(81127),c=i(56252),u=(i(6011),i(18787)),d=i(76338),h=(i(28706),i(2008),i(50113),i(48980),i(74423),i(48598),i(62062),i(54554),i(79432),i(26099),i(16034),i(38781),i(31415),i(21699),i(47764),i(42762),i(23500),i(62953),i(85471)),p=i(95353),v=i(75769),f=i(35038),g=i(505),m=function(){var t=this,e=t._self._c;return e("div",[e("a-modal",{staticClass:"indicator-editor-modal",style:t.isMobile?{top:0,paddingBottom:0}:{top:"2%"},attrs:{title:t.$t("dashboard.indicator.editor.title"),visible:t.visible,width:t.isMobile?"100%":"95vw",confirmLoading:t.saving,okText:t.$t("dashboard.indicator.editor.save"),cancelText:t.$t("dashboard.indicator.editor.cancel"),maskClosable:!1,centered:!1},on:{ok:t.handleSave,cancel:t.handleCancel,afterClose:t.handleAfterClose}},[e("div",{staticClass:"editor-content"},[e("a-row",{staticClass:"editor-layout",class:{"mobile-layout":t.isMobile},attrs:{gutter:16}},[e("a-col",{staticClass:"code-editor-column",attrs:{span:24,xs:24,sm:24,md:24}},[e("div",{staticClass:"code-section"},[e("div",{staticClass:"section-header"},[e("div",{staticClass:"header-left"},[e("span",{staticClass:"section-title"},[t._v(t._s(t.$t("dashboard.indicator.editor.code")))])]),e("div",{staticClass:"section-actions"},[e("a-button",{staticStyle:{padding:"0 8px",color:"#52c41a","font-weight":"bold"},attrs:{type:"link",size:"small",loading:t.verifying},on:{click:t.handleVerifyCode}},[e("a-icon",{attrs:{type:"check-circle"}}),t._v(" "+t._s(t.$t("dashboard.indicator.editor.verifyCode"))+" ")],1),e("a-button",{staticStyle:{padding:"0"},attrs:{type:"link",size:"small"},on:{click:t.goToDocs}},[e("a-icon",{attrs:{type:"book"}}),t._v(" "+t._s(t.$t("dashboard.indicator.editor.guide"))+" ")],1)],1)]),e("a-alert",{staticStyle:{"margin-bottom":"12px"},attrs:{type:"info","show-icon":"",message:t.$t("dashboard.indicator.boundary.message"),description:t.$t("dashboard.indicator.boundary.indicatorRule")}}),e("div",{staticClass:"code-mode-split"},[e("a-row",{staticClass:"code-mode-row",attrs:{gutter:16}},[e("a-col",{staticClass:"code-pane",attrs:{xs:24,sm:24,md:18}},[e("div",{ref:"codeEditorContainer",staticClass:"code-editor-container"})]),e("a-col",{staticClass:"ai-pane",attrs:{xs:24,sm:24,md:6}},[e("div",{staticClass:"ai-panel"},[e("div",{staticClass:"ai-panel-title"},[e("a-icon",{attrs:{type:"robot"}}),e("span",[t._v(t._s(t.$t("dashboard.indicator.editor.aiGenerate")))])],1),e("a-textarea",{attrs:{placeholder:t.$t("dashboard.indicator.editor.aiPromptPlaceholder"),rows:12,"auto-size":{minRows:12,maxRows:20}},model:{value:t.aiPrompt,callback:function(e){t.aiPrompt=e},expression:"aiPrompt"}}),e("a-button",{staticStyle:{"margin-top":"10px"},attrs:{type:"primary",block:"",loading:t.aiGenerating,size:"large"},on:{click:t.handleAIGenerate}},[t._v(" "+t._s(t.$t("dashboard.indicator.editor.aiGenerateBtn"))+" ")])],1)])],1)],1)],1)])],1)],1),e("div",{staticClass:"editor-footer",attrs:{slot:"footer"},slot:"footer"},[e("a-button",{on:{click:t.handleCancel}},[t._v(" "+t._s(t.$t("dashboard.indicator.editor.cancel"))+" ")]),e("a-button",{attrs:{type:"primary",loading:t.saving},on:{click:t.handleSave}},[t._v(" "+t._s(t.$t("dashboard.indicator.editor.save"))+" ")])],1)])],1)},y=[],_=i(57532),b=(i(2892),i(27495),i(99449),i(25440),i(11392),i(15237)),x=i.n(b),w=(i(74806),i(55218),i(97923),i(50436),i(74053)),S=i.n(w),C=i(75314),k={name:"IndicatorEditor",props:{visible:{type:Boolean,default:!1},indicator:{type:Object,default:null},userId:{type:Number,default:null}},data:function(){return{saving:!1,codeEditor:null,aiPrompt:"",aiGenerating:!1,verifying:!1,isMobile:!1}},computed:{},watch:{visible:function(t){var e=this;t?this.$nextTick(function(){setTimeout(function(){!e.codeEditor&&e.$refs.codeEditorContainer&&e.initCodeEditor(),e.initFormData()},200)}):this.codeEditor&&this.codeEditor.refresh()},indicator:{handler:function(t){var e=this;t&&this.visible&&this.$nextTick(function(){setTimeout(function(){e.initFormData()},100)})},deep:!0}},mounted:function(){var t=this;this.checkMobile(),window.addEventListener("resize",this.checkMobile),this.visible&&this.$nextTick(function(){setTimeout(function(){t.initCodeEditor()},100)})},beforeDestroy:function(){if(window.removeEventListener("resize",this.checkMobile),this.codeEditor)try{if("function"===typeof this.codeEditor.toTextArea)this.codeEditor.toTextArea();else if("function"===typeof this.codeEditor.getWrapperElement){var t=this.codeEditor.getWrapperElement();t&&t.parentNode&&t.parentNode.removeChild(t)}}catch(e){}finally{this.codeEditor=null}},methods:{getDefaultIndicatorCode:function(){return'#Demo Code:\n#my_indicator_name = "My Buy/Sell Indicator"\n#my_indicator_description = "Buy/Sell only; execution is normalized in backend."\n\n#df = df.copy()\n#sma = df["close"].rolling(14).mean()\n#buy = (df["close"] > sma) & (df["close"].shift(1) <= sma.shift(1))\n#sell = (df["close"] < sma) & (df["close"].shift(1) >= sma.shift(1))\n#df["buy"] = buy.fillna(False).astype(bool)\n#df["sell"] = sell.fillna(False).astype(bool)\n\n#buy_marks = [df["low"].iloc[i] * 0.995 if df["buy"].iloc[i] else None for i in range(len(df))]\n#sell_marks = [df["high"].iloc[i] * 1.005 if df["sell"].iloc[i] else None for i in range(len(df))]\n\n#output = {\n# "name": my_indicator_name,\n# "plots": [],\n# "signals": [\n# {"type": "buy", "text": "B", "data": buy_marks, "color": "#00E676"},\n# {"type": "sell", "text": "S", "data": sell_marks, "color": "#FF5252"}\n# ]\n#}\n'},checkMobile:function(){this.isMobile=window.innerWidth<=768},goToDocs:function(){window.open("https://github.com/brokermr810/QuantDinger/blob/main/docs/STRATEGY_DEV_GUIDE.md","_blank")},handleVerifyCode:function(){var t=this,e=this.codeEditor?this.codeEditor.getValue():"";e&&e.trim()?(this.verifying=!0,(0,v.Ay)({url:"/api/indicator/verifyCode",method:"post",data:{code:e}}).then(function(e){if(1===e.code){var i=e.data||{};t.$message.success("".concat(t.$t("dashboard.indicator.editor.verifyCodeSuccess")," (").concat(i.plots_count||0," plots, ").concat(i.signals_count||0," signals)"))}else{var n=e.data||{};t.$error({title:t.$t("dashboard.indicator.editor.verifyCodeFailed"),width:600,content:function(t){return t("div",[t("p",{style:{fontWeight:"bold",color:"#ff4d4f"}},e.msg),n.details?t("pre",{style:{background:"#f5f5f5",padding:"8px",overflow:"auto",maxHeight:"300px",marginTop:"8px",fontSize:"12px",fontFamily:"monospace"}},n.details):null])}})}}).catch(function(e){t.$message.error("Request Failed: "+(e.message||"Unknown Error"))}).finally(function(){t.verifying=!1})):this.$message.warning(this.$t("dashboard.indicator.editor.verifyCodeEmpty"))},cleanMarkdownCodeBlocks:function(t){if(!t||"string"!==typeof t)return t;var e=t.trim(),i=/```/.test(e);return i?(e=e.replace(/^```[\w]*\s*\n?/i,""),e.startsWith("```")&&(e=e.replace(/^```\s*\n?/g,"")),e.endsWith("```")&&(e=e.replace(/\n?```\s*$/g,"")),e=e.replace(/^\s*```[\w]*\s*$/gm,""),e=e.replace(/^\s*```\s*$/gm,""),e=e.replace(/\n{3,}/g,"\n\n"),e=e.trim(),e):e},initFormData:function(){var t=this;if(this.visible){var e=this.indicator&&this.indicator.code||"";e&&String(e).trim()||(e=this.getDefaultIndicatorCode()),this.$nextTick(function(){setTimeout(function(){t.aiPrompt="",t.codeEditor&&(t.codeEditor.setValue(e),t.codeEditor.refresh())},50)})}},initCodeEditor:function(){var t=this;if(this.$refs.codeEditorContainer){if(this.codeEditor){try{if("function"===typeof this.codeEditor.toTextArea)this.codeEditor.toTextArea();else if("function"===typeof this.codeEditor.getWrapperElement){var e=this.codeEditor.getWrapperElement();e&&e.parentNode&&e.parentNode.removeChild(e)}}catch(i){}this.codeEditor=null}try{this.$refs.codeEditorContainer.innerHTML="",this.codeEditor=x()(this.$refs.codeEditorContainer,{value:function(){var e=t.indicator&&t.indicator.code||"";return e&&String(e).trim()?e:t.getDefaultIndicatorCode()}(),mode:"python",theme:"eclipse",lineNumbers:!0,lineWrapping:!0,indentUnit:4,indentWithTabs:!1,smartIndent:!0,matchBrackets:!0,autoCloseBrackets:!0,styleActiveLine:!0,foldGutter:!1,gutters:["CodeMirror-linenumbers"],tabSize:4,viewportMargin:1/0}),this.codeEditor.on("change",function(t){t.getValue()}),this.$nextTick(function(){t.codeEditor&&t.codeEditor.refresh()})}catch(n){}}},handleSave:function(){var t=this.codeEditor?this.codeEditor.getValue():"",e=t||"";e.trim()?(this.saving=!0,this.$emit("save",{id:this.indicator?this.indicator.id:0,code:e,userid:this.userId})):this.$message.warning(this.$t("dashboard.indicator.editor.codeRequired"))},handleCancel:function(){this.codeEditor&&this.codeEditor.setValue(""),this.$emit("cancel")},handleAfterClose:function(){var t=this;this.codeEditor&&this.$nextTick(function(){t.codeEditor&&t.codeEditor.refresh()}),this.aiPrompt=""},handleAIGenerate:function(){var t=this;return(0,c.A)((0,l.A)().m(function e(){var i,n,a,r,o,s,c,u,d,h,p,v,f,g,m,y,b,x,w,k,I,E,A,P,M;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.aiPrompt&&t.aiPrompt.trim()){e.n=1;break}return t.$message.warning(t.$t("dashboard.indicator.editor.aiPromptRequired")),e.a(2);case 1:return t.aiGenerating=!0,i="",t.codeEditor&&(i=t.codeEditor.getValue()||""),t.codeEditor&&(t.codeEditor.setValue("# AI generating...\n"),t.codeEditor.refresh()),n="",e.p=2,a="/api/indicator/aiGenerate",r=S().get(C.Xh),o={prompt:t.aiPrompt.trim()},i.trim()&&(o.existingCode=i.trim()),e.n=3,fetch(a,{method:"POST",headers:{"Content-Type":"application/json",Authorization:r?"Bearer ".concat(r):"","Access-Token":r||"",Token:r||""},body:JSON.stringify(o),credentials:"include"});case 3:if(s=e.v,s.ok){e.n=5;break}return e.n=4,s.text().catch(function(){return""});case 4:throw c=e.v,new Error(c||"HTTP error! status: ".concat(s.status));case 5:if(s.body&&"function"===typeof s.body.getReader){e.n=6;break}throw new Error("AI 服务未返回可读取的流(response.body 不存在)");case 6:u=s.body.getReader(),d=new TextDecoder,h="";case 7:return e.n=8,u.read();case 8:if(p=e.v,v=p.done,f=p.value,!v){e.n=9;break}return e.a(3,21);case 9:h+=d.decode(f,{stream:!0}),g=h.split("\n\n"),h=g.pop()||"",m=(0,_.A)(g),e.p=10,m.s();case 11:if((y=m.n()).done){e.n=17;break}if(b=y.value,b.trim()&&b.startsWith("data: ")){e.n=12;break}return e.a(3,16);case 12:if(x=b.substring(6),"[DONE]"!==x){e.n=13;break}return e.a(3,17);case 13:if(e.p=13,w=JSON.parse(x),!w.error){e.n=14;break}throw new Error(w.error);case 14:w.content&&(n+=w.content,k=t.cleanMarkdownCodeBlocks(n),t.codeEditor&&(t.codeEditor.setValue(k),I=t.codeEditor.lineCount(),t.codeEditor.setCursor({line:I-1,ch:0}),t.codeEditor.refresh())),e.n=16;break;case 15:e.p=15,e.v;case 16:e.n=11;break;case 17:e.n=19;break;case 18:e.p=18,P=e.v,m.e(P);case 19:return e.p=19,m.f(),e.f(19);case 20:e.n=7;break;case 21:t.codeEditor&&n?(E=t.cleanMarkdownCodeBlocks(n),t.codeEditor.setValue(E),t.codeEditor.refresh(),t.$message.success(t.$t("dashboard.indicator.editor.aiGenerateSuccess"))):n||t.$message.warning("未生成任何代码,请尝试更详细的提示词"),e.n=23;break;case 22:e.p=22,M=e.v,t.$message.error(M.message||t.$t("dashboard.indicator.editor.aiGenerateError")),n&&t.codeEditor&&(A=t.cleanMarkdownCodeBlocks(n),t.codeEditor.setValue(A));case 23:return e.p=23,t.aiGenerating=!1,e.f(23);case 24:return e.a(2)}},e,null,[[13,15],[10,18,19,20],[2,22,23,24]])}))()}}},I=k,E=i(845),A=(0,E.A)(I,m,y,!1,null,"4fea1865",null),P=A.exports,M=function(){var t=this,e=t._self._c;return e("div",{staticClass:"chart-left",class:{"theme-dark":"dark"===t.chartTheme}},[e("div",{staticClass:"chart-wrapper"},[e("div",{staticClass:"drawing-toolbar"},[t._l(t.drawingTools,function(i){return e("a-tooltip",{key:i.name,attrs:{title:i.title,placement:"right"}},[e("div",{staticClass:"drawing-tool-btn",class:{active:t.activeDrawingTool===i.name},on:{click:function(e){return t.selectDrawingTool(i.name)}}},[e("a-icon",{attrs:{type:i.icon}})],1)])}),e("a-divider",{attrs:{type:"vertical"}}),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.drawing.clearAll"),placement:"right"}},[e("div",{staticClass:"drawing-tool-btn",on:{click:t.clearAllDrawings}},[e("a-icon",{attrs:{type:"delete"}})],1)])],2),e("div",{staticClass:"chart-content-area"},[e("div",{staticClass:"indicator-toolbar"},t._l(t.indicatorButtons,function(i){return e("div",{key:i.id,staticClass:"indicator-btn",class:{active:t.isIndicatorActive(i.id)},attrs:{title:i.name},on:{click:function(e){return t.toggleIndicator(i)}}},[t._v(" "+t._s(i.shortName)+" ")])}),0),e("div",{staticClass:"kline-chart-container",attrs:{id:"kline-chart-container"}})]),t.loading?e("div",{staticClass:"chart-overlay"},[e("a-spin",{attrs:{size:"large"}},[e("a-icon",{staticStyle:{"font-size":"24px",color:"#13c2c2"},attrs:{slot:"indicator",type:"loading",spin:""},slot:"indicator"})],1)],1):t._e(),t.error?e("div",{staticClass:"chart-overlay"},[e("div",{staticClass:"error-box"},[e("a-icon",{staticStyle:{"font-size":"24px",color:"#ef5350","margin-bottom":"10px"},attrs:{type:"warning"}}),e("span",[t._v(t._s(t.error))]),e("a-button",{staticStyle:{"margin-top":"12px"},attrs:{type:"primary",size:"small",ghost:""},on:{click:t.handleRetry}},[t._v(" "+t._s(t.$t("dashboard.indicator.retry"))+" ")])],1)]):t._e(),t.pyodideLoadFailed?e("div",{staticClass:"chart-overlay pyodide-warning"},[e("div",{staticClass:"warning-box"},[e("a-icon",{staticStyle:{"font-size":"32px",color:"#faad14","margin-bottom":"12px"},attrs:{type:"warning"}}),e("div",{staticClass:"warning-title"},[t._v(t._s(t.$t("dashboard.indicator.warning.pyodideLoadFailed")))]),e("div",{staticClass:"warning-desc"},[t._v(t._s(t.$t("dashboard.indicator.warning.pyodideLoadFailedDesc")))])],1)]):t._e(),t.symbol||t.loading||t.error||t.pyodideLoadFailed?t._e():e("div",{staticClass:"chart-overlay initial-hint"},[e("div",{staticClass:"hint-box"},[e("a-icon",{staticStyle:{"font-size":"48px",color:"#1890ff","margin-bottom":"16px"},attrs:{type:"line-chart"}}),e("div",{staticClass:"hint-title"},[t._v(t._s(t.$t("dashboard.indicator.hint.selectSymbol")))]),e("div",{staticClass:"hint-desc"},[t._v(t._s(t.$t("dashboard.indicator.hint.selectSymbolDesc")))])],1)])])])},D=[],T=i(21560),B=i(26297),F=i(2403),R=(i(34782),i(26910),i(71761),function(t,e){return R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},R(t,e)});function L(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}R(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var N,O,z,V,W,H,$,Y,X,K=function(){return K=Object.assign||function(t){for(var e,i=1,n=arguments.length;i0&&a[a.length-1])&&(6===s[0]||2===s[0])){r=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Z(t,e){var i="function"===typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,a,r=i.call(t),o=[];try{while((void 0===e||e-- >0)&&!(n=r.next()).done)o.push(n.value)}catch(s){a={error:s}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(a)throw a.error}}return o}function q(t,e,i){if(i||2===arguments.length)for(var n,a=0,r=e.length;a1e9)return"".concat(+(e/1e9).toFixed(3),"B");if(e>1e6)return"".concat(+(e/1e6).toFixed(3),"M");if(e>1e3)return"".concat(+(e/1e3).toFixed(3),"K")}return"".concat(t)}function zt(t,e){var i="".concat(t);if(0===e.length)return i;if(i.includes(".")){var n=i.split(".");return"".concat(n[0].replace(/(\d)(?=(\d{3})+$)/g,function(t){return"".concat(t).concat(e)}),".").concat(n[1])}return i.replace(/(\d)(?=(\d{3})+$)/g,function(t){return"".concat(t).concat(e)})}function Vt(t,e){var i="".concat(t),n=new RegExp("\\.0{"+e+",}[1-9][0-9]*$");if(n.test(i)){var a=i.split("."),r=a[a.length-1],o=r.match(/0*/);if(At(o)){var s=o[0].length;return a[a.length-1]=r.replace(/0*/,"0{".concat(s,"}")),a.join(".")}}return i}function Wt(t){var e,i,n;return null!==(n=null===(i=null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView)||void 0===i?void 0:i.devicePixelRatio)&&void 0!==n?n:1}function Ht(t,e,i){return"".concat(null!==e&&void 0!==e?e:"normal"," ").concat(null!==t&&void 0!==t?t:12,"px ").concat(null!==i&&void 0!==i?i:"Helvetica Neue")}function $t(t,e,i,n){if(!At(Dt)){var a=document.createElement("canvas"),r=Wt(a);Dt=a.getContext("2d"),Dt.scale(r,r)}return Dt.font=Ht(e,i,n),Math.round(Dt.measureText(t).width)}(function(t){t["OnDataReady"]="onDataReady",t["OnZoom"]="onZoom",t["OnScroll"]="onScroll",t["OnVisibleRangeChange"]="onVisibleRangeChange",t["OnTooltipIconClick"]="onTooltipIconClick",t["OnCrosshairChange"]="onCrosshairChange",t["OnCandleBarClick"]="onCandleBarClick",t["OnPaneDrag"]="onPaneDrag"})(Tt||(Tt={}));var Yt,Xt,Kt=function(){function t(){this._callbacks=[]}return t.prototype.subscribe=function(t){var e,i=null!==(e=this._callbacks.indexOf(t))&&void 0!==e?e:-1;i<0&&this._callbacks.push(t)},t.prototype.unsubscribe=function(t){var e;if(kt(t)){var i=null!==(e=this._callbacks.indexOf(t))&&void 0!==e?e:-1;i>-1&&this._callbacks.splice(i,1)}else this._callbacks=[]},t.prototype.execute=function(t){this._callbacks.forEach(function(e){e(t)})},t.prototype.isEmpty=function(){return 0===this._callbacks.length},t}();function jt(t,e,i,n,a){var r,o=e.result,s=e.figures,l=e.styles,c=Rt(l,"circles",n.circles),u=c.length,d=Rt(l,"bars",n.bars),h=d.length,p=Rt(l,"lines",n.lines),v=p.length,f=0,g=0,m=0,y=0;s.forEach(function(s){var l;switch(s.type){case"circle":y=f;var _=c[f%u];r=K(K({},_),{color:_.noChangeColor}),f++;break;case"bar":y=g;var b=d[g%h];r=K(K({},b),{color:b.noChangeColor}),g++;break;case"line":y=m,r=p[m%v],m++;break}if(At(r)){var x={prev:{kLineData:t[i-1],indicatorData:o[i-1]},current:{kLineData:t[i],indicatorData:o[i]},next:{kLineData:t[i+1],indicatorData:o[i+1]}},w=null===(l=s.styles)||void 0===l?void 0:l.call(s,x,e,n);a(s,K(K({},r),w),y)}})}(function(t){t["Init"]="init",t["Forward"]="forward",t["Backward"]="backward"})(Yt||(Yt={})),function(t){t["Normal"]="normal",t["Price"]="price",t["Volume"]="volume"}(Xt||(Xt={}));var Ut,Gt=function(){function t(t){this.result=[],this._precisionFlag=!1;var e=t.name,i=t.shortName,n=t.series,a=t.calcParams,r=t.figures,o=t.precision,s=t.shouldOhlc,l=t.shouldFormatBigNumber,c=t.visible,u=t.zLevel,d=t.minValue,h=t.maxValue,p=t.styles,v=t.extendData,f=t.regenerateFigures,g=t.createTooltipDataSource,m=t.draw;this.name=e,this.shortName=null!==i&&void 0!==i?i:e,this.series=null!==n&&void 0!==n?n:Xt.Normal,this.precision=null!==o&&void 0!==o?o:4,this.calcParams=null!==a&&void 0!==a?a:[],this.figures=null!==r&&void 0!==r?r:[],this.shouldOhlc=null!==s&&void 0!==s&&s,this.shouldFormatBigNumber=null!==l&&void 0!==l&&l,this.visible=null===c||void 0===c||c,this.zLevel=null!==u&&void 0!==u?u:0,this.minValue=null!==d&&void 0!==d?d:null,this.maxValue=null!==h&&void 0!==h?h:null,this.styles=St(null!==p&&void 0!==p?p:{}),this.extendData=v,this.regenerateFigures=null!==f&&void 0!==f?f:null,this.createTooltipDataSource=null!==g&&void 0!==g?g:null,this.draw=null!==m&&void 0!==m?m:null}return t.prototype.setShortName=function(t){return this.shortName!==t&&(this.shortName=t,!0)},t.prototype.setSeries=function(t){return this.series!==t&&(this.series=t,!0)},t.prototype.setPrecision=function(t,e){var i=null!==e&&void 0!==e&&e,n=Math.floor(t);return!(!(n!==this.precision&&t>=0)||i&&(!i||this._precisionFlag))&&(this.precision=n,i||(this._precisionFlag=!0),!0)},t.prototype.setCalcParams=function(t){var e,i;return this.calcParams=t,this.figures=null!==(i=null===(e=this.regenerateFigures)||void 0===e?void 0:e.call(this,t))&&void 0!==i?i:this.figures,!0},t.prototype.setShouldOhlc=function(t){return this.shouldOhlc!==t&&(this.shouldOhlc=t,!0)},t.prototype.setShouldFormatBigNumber=function(t){return this.shouldFormatBigNumber!==t&&(this.shouldFormatBigNumber=t,!0)},t.prototype.setVisible=function(t){return this.visible!==t&&(this.visible=t,!0)},t.prototype.setZLevel=function(t){return this.zLevel!==t&&(this.zLevel=t,!0)},t.prototype.setStyles=function(t){return wt(this.styles,t),!0},t.prototype.setExtendData=function(t){return this.extendData!==t&&(this.extendData=t,!0)},t.prototype.setFigures=function(t){return this.figures!==t&&(this.figures=t,!0)},t.prototype.setMinValue=function(t){return this.minValue!==t&&(this.minValue=t,!0)},t.prototype.setMaxValue=function(t){return this.maxValue!==t&&(this.maxValue=t,!0)},t.prototype.setRegenerateFigures=function(t){return this.regenerateFigures!==t&&(this.regenerateFigures=t,!0)},t.prototype.setCreateTooltipDataSource=function(t){return this.createTooltipDataSource!==t&&(this.createTooltipDataSource=t,!0)},t.prototype.setDraw=function(t){return this.draw!==t&&(this.draw=t,!0)},t.prototype.calcIndicator=function(t){return j(this,void 0,void 0,function(){var e;return U(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.calc(t,this)];case 1:return e=i.sent(),this.result=e,[2,!0];case 2:return i.sent(),[2,!1];case 3:return[2]}})})},t.extend=function(e){var i=function(t){function i(){return t.call(this,e)||this}return L(i,t),i.prototype.calc=function(t,i){return e.calc(t,i)},i}(t);return i},t}();function Zt(){return["mouseClickEvent","mouseDoubleClickEvent","mouseRightClickEvent","tapEvent","doubleTapEvent","mouseDownEvent","touchStartEvent","mouseMoveEvent","touchMoveEvent"]}(function(t){t["Normal"]="normal",t["WeakMagnet"]="weak_magnet",t["StrongMagnet"]="strong_magnet"})(Ut||(Ut={}));var qt,Jt=1,Qt=-1,te="overlay_",ee="overlay_figure_",ie=function(){function t(t){this.currentStep=Jt,this.points=[],this._prevPressedPoint=null,this._prevPressedPoints=[];var e=t.mode,i=t.modeSensitivity,n=t.extendData,a=t.styles,r=t.name,o=t.totalStep,s=t.lock,l=t.visible,c=t.zLevel,u=t.needDefaultPointFigure,d=t.needDefaultXAxisFigure,h=t.needDefaultYAxisFigure,p=t.createPointFigures,v=t.createXAxisFigures,f=t.createYAxisFigures,g=t.performEventPressedMove,m=t.performEventMoveForDrawing,y=t.onDrawStart,_=t.onDrawing,b=t.onDrawEnd,x=t.onClick,w=t.onDoubleClick,S=t.onRightClick,C=t.onPressedMoveStart,k=t.onPressedMoving,I=t.onPressedMoveEnd,E=t.onMouseEnter,A=t.onMouseLeave,P=t.onRemoved,M=t.onSelected,D=t.onDeselected;this.name=r,this.totalStep=!Et(o)||o<2?1:o,this.lock=null!==s&&void 0!==s&&s,this.visible=null===l||void 0===l||l,this.zLevel=null!==c&&void 0!==c?c:0,this.needDefaultPointFigure=null!==u&&void 0!==u&&u,this.needDefaultXAxisFigure=null!==d&&void 0!==d&&d,this.needDefaultYAxisFigure=null!==h&&void 0!==h&&h,this.mode=null!==e&&void 0!==e?e:Ut.Normal,this.modeSensitivity=null!==i&&void 0!==i?i:8,this.extendData=n,this.styles=St(null!==a&&void 0!==a?a:{}),this.createPointFigures=null!==p&&void 0!==p?p:null,this.createXAxisFigures=null!==v&&void 0!==v?v:null,this.createYAxisFigures=null!==f&&void 0!==f?f:null,this.performEventPressedMove=null!==g&&void 0!==g?g:null,this.performEventMoveForDrawing=null!==m&&void 0!==m?m:null,this.onDrawStart=null!==y&&void 0!==y?y:null,this.onDrawing=null!==_&&void 0!==_?_:null,this.onDrawEnd=null!==b&&void 0!==b?b:null,this.onClick=null!==x&&void 0!==x?x:null,this.onDoubleClick=null!==w&&void 0!==w?w:null,this.onRightClick=null!==S&&void 0!==S?S:null,this.onPressedMoveStart=null!==C&&void 0!==C?C:null,this.onPressedMoving=null!==k&&void 0!==k?k:null,this.onPressedMoveEnd=null!==I&&void 0!==I?I:null,this.onMouseEnter=null!==E&&void 0!==E?E:null,this.onMouseLeave=null!==A&&void 0!==A?A:null,this.onRemoved=null!==P&&void 0!==P?P:null,this.onSelected=null!==M&&void 0!==M?M:null,this.onDeselected=null!==D&&void 0!==D?D:null}return t.prototype.setId=function(t){return!Mt(this.id)&&(this.id=t,!0)},t.prototype.setGroupId=function(t){return!Mt(this.groupId)&&(this.groupId=t,!0)},t.prototype.setPaneId=function(t){this.paneId=t},t.prototype.setExtendData=function(t){return t!==this.extendData&&(this.extendData=t,!0)},t.prototype.setStyles=function(t){return wt(this.styles,t),!0},t.prototype.setPoints=function(t){if(t.length>0){var e=void 0;if(this.points=q([],Z(t),!1),t.length>=this.totalStep-1?(this.currentStep=Qt,e=this.totalStep-1):(this.currentStep=t.length+1,e=t.length),null!==this.performEventMoveForDrawing)for(var i=0;is?n=r:a=r,o<=2)break}return n}function ve(t){var e=Math.floor(ye(t)),i=_e(e),n=t/i,a=0;return a=n<1.5?1:n<2.5?2:n<3.5?3:n<4.5?4:n<5.5?5:n<6.5?6:8,t=a*i,e>=-20?+t.toFixed(e<0?-e:0):t}function fe(t,e){null==e&&(e=10),e=Math.min(Math.max(0,e),20);var i=(+t).toFixed(e);return+i}function ge(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var a=e.indexOf(".");return a<0?0:e.length-1-a}function me(t,e,i){var n=[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER];return t.forEach(function(t){var a,r;n[0]=Math.max(null!==(a=t[e])&&void 0!==a?a:t,n[0]),n[1]=Math.min(null!==(r=t[i])&&void 0!==r?r:t,n[1])}),n}function ye(t){return Math.log(t)/Math.log(10)}function _e(t){return Math.pow(10,t)}function be(){return{from:0,to:0,realFrom:0,realTo:0}}var xe={MIN:1,MAX:50},we=8,Se=80,Ce=.88,ke=10,Ie=function(){function t(t){this._dateTimeFormat=this._buildDateTimeFormat(),this._zoomEnabled=!0,this._scrollEnabled=!0,this._totalBarSpace=0,this._barSpace=we,this._offsetRightDistance=Se,this._startLastBarRightSideDiffBarCount=0,this._scrollLimitRole=0,this._minVisibleBarCount={left:2,right:2},this._maxOffsetDistance={left:50,right:50},this._visibleRange=be(),this._chartStore=t,this._gapBarSpace=this._calcGapBarSpace(),this._lastBarRightSideDiffBarCount=this._offsetRightDistance/this._barSpace}return t.prototype._calcGapBarSpace=function(){var t;return this._barSpace>3?t=Math.floor(this._barSpace*Ce):(t=Math.floor(this._barSpace),t===this._barSpace&&t--),t%2===0&&t--,t=Math.max(1,t),t},t.prototype.adjustVisibleRange=function(){var t,e,i,n,a=this._chartStore.getDataList(),r=a.length,o=this._totalBarSpace/this._barSpace;1===this._scrollLimitRole?(i=(this._totalBarSpace-this._maxOffsetDistance.right)/this._barSpace,n=(this._totalBarSpace-this._maxOffsetDistance.left)/this._barSpace):(i=this._minVisibleBarCount.left,n=this._minVisibleBarCount.right),i=Math.max(0,i),n=Math.max(0,n);var s=o-Math.min(i,r);this._lastBarRightSideDiffBarCount>s&&(this._lastBarRightSideDiffBarCount=s);var l=-r+Math.min(n,r);this._lastBarRightSideDiffBarCountr&&(c=r);var d=Math.round(c-o)-1;d<0&&(d=0);var h=this._lastBarRightSideDiffBarCount>0?Math.round(r+this._lastBarRightSideDiffBarCount-o)-1:d;if(this._visibleRange={from:d,to:c,realFrom:h,realTo:u},this._chartStore.getActionStore().execute(Tt.OnVisibleRangeChange,this._visibleRange),this._chartStore.adjustVisibleDataList(),0===d){var p=a[0];this._chartStore.executeLoadMoreCallback(null!==(t=null===p||void 0===p?void 0:p.timestamp)&&void 0!==t?t:null),this._chartStore.executeLoadDataCallback({type:Yt.Forward,data:null!==p&&void 0!==p?p:null})}c===r&&this._chartStore.executeLoadDataCallback({type:Yt.Backward,data:null!==(e=a[r-1])&&void 0!==e?e:null})},t.prototype.getDateTimeFormat=function(){return this._dateTimeFormat},t.prototype._buildDateTimeFormat=function(t){var e={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};Mt(t)&&(e.timeZone=t);var i=null;try{i=new Intl.DateTimeFormat("en",e)}catch(n){_t("","","Timezone is error!!!")}return i},t.prototype.setTimezone=function(t){var e=this._buildDateTimeFormat(t);null!==e&&(this._dateTimeFormat=e)},t.prototype.getTimezone=function(){return this._dateTimeFormat.resolvedOptions().timeZone},t.prototype.getBarSpace=function(){return{bar:this._barSpace,halfBar:this._barSpace/2,gapBar:this._gapBarSpace,halfGapBar:Math.floor(this._gapBarSpace/2)}},t.prototype.setBarSpace=function(t,e){txe.MAX||this._barSpace===t||(this._barSpace=t,this._gapBarSpace=this._calcGapBarSpace(),null===e||void 0===e||e(),this.adjustVisibleRange(),this._chartStore.getTooltipStore().recalculateCrosshair(!0),this._chartStore.getChart().adjustPaneViewport(!1,!0,!0,!0))},t.prototype.setTotalBarSpace=function(t){return this._totalBarSpace!==t&&(this._totalBarSpace=t,this.adjustVisibleRange(),this._chartStore.getTooltipStore().recalculateCrosshair(!0)),this},t.prototype.setOffsetRightDistance=function(t,e){return this._offsetRightDistance=1===this._scrollLimitRole?Math.min(this._maxOffsetDistance.right,t):t,this._lastBarRightSideDiffBarCount=this._offsetRightDistance/this._barSpace,null!==e&&void 0!==e&&e&&(this.adjustVisibleRange(),this._chartStore.getTooltipStore().recalculateCrosshair(!0),this._chartStore.getChart().adjustPaneViewport(!1,!0,!0,!0)),this},t.prototype.resetOffsetRightDistance=function(){this.setOffsetRightDistance(this._offsetRightDistance)},t.prototype.getInitialOffsetRightDistance=function(){return this._offsetRightDistance},t.prototype.getOffsetRightDistance=function(){return Math.max(0,this._lastBarRightSideDiffBarCount*this._barSpace)},t.prototype.getLastBarRightSideDiffBarCount=function(){return this._lastBarRightSideDiffBarCount},t.prototype.setLastBarRightSideDiffBarCount=function(t){return this._lastBarRightSideDiffBarCount=t,this},t.prototype.setMaxOffsetLeftDistance=function(t){return this._scrollLimitRole=1,this._maxOffsetDistance.left=t,this},t.prototype.setMaxOffsetRightDistance=function(t){return this._scrollLimitRole=1,this._maxOffsetDistance.right=t,this},t.prototype.setLeftMinVisibleBarCount=function(t){return this._scrollLimitRole=0,this._minVisibleBarCount.left=t,this},t.prototype.setRightMinVisibleBarCount=function(t){return this._scrollLimitRole=0,this._minVisibleBarCount.right=t,this},t.prototype.getVisibleRange=function(){return this._visibleRange},t.prototype.startScroll=function(){this._startLastBarRightSideDiffBarCount=this._lastBarRightSideDiffBarCount},t.prototype.scroll=function(t){if(this._scrollEnabled){var e=t/this._barSpace,i=this._lastBarRightSideDiffBarCount*this._barSpace;this._lastBarRightSideDiffBarCount=this._startLastBarRightSideDiffBarCount-e,this.adjustVisibleRange(),this._chartStore.getTooltipStore().recalculateCrosshair(!0),this._chartStore.getChart().adjustPaneViewport(!1,!0,!0,!0);var n=Math.round(i-this._lastBarRightSideDiffBarCount*this._barSpace);0!==n&&this._chartStore.getActionStore().execute(Tt.OnScroll,{distance:n})}},t.prototype.getDataByDataIndex=function(t){var e;return null!==(e=this._chartStore.getDataList()[t])&&void 0!==e?e:null},t.prototype.coordinateToFloatIndex=function(t){var e=this._chartStore.getDataList().length,i=(this._totalBarSpace-t)/this._barSpace,n=e+this._lastBarRightSideDiffBarCount-i;return Math.round(1e6*n)/1e6},t.prototype.dataIndexToTimestamp=function(t){var e,i=this.getDataByDataIndex(t);return null!==(e=null===i||void 0===i?void 0:i.timestamp)&&void 0!==e?e:null},t.prototype.timestampToDataIndex=function(t){var e=this._chartStore.getDataList();return 0===e.length?0:pe(e,"timestamp",t)},t.prototype.dataIndexToCoordinate=function(t){var e=this._chartStore.getDataList().length,i=e+this._lastBarRightSideDiffBarCount-t;return Math.floor(this._totalBarSpace-(i-.5)*this._barSpace)},t.prototype.coordinateToDataIndex=function(t){return Math.ceil(this.coordinateToFloatIndex(t))-1},t.prototype.zoom=function(t,e){var i,n=this;if(this._zoomEnabled){var a=null!==e&&void 0!==e?e:null;if(!Et(null===a||void 0===a?void 0:a.x)){var r=this._chartStore.getTooltipStore().getCrosshair();a={x:null!==(i=null===r||void 0===r?void 0:r.x)&&void 0!==i?i:this._totalBarSpace/2}}var o=a.x,s=this.coordinateToFloatIndex(o),l=this._barSpace,c=this._barSpace+t*(this._barSpace/ke);this.setBarSpace(c,function(){n._lastBarRightSideDiffBarCount+=s-n.coordinateToFloatIndex(o)});var u=this._barSpace/l;1!==u&&this._chartStore.getActionStore().execute(Tt.OnZoom,{scale:u})}},t.prototype.setZoomEnabled=function(t){return this._zoomEnabled=t,this},t.prototype.getZoomEnabled=function(){return this._zoomEnabled},t.prototype.setScrollEnabled=function(t){return this._scrollEnabled=t,this},t.prototype.getScrollEnabled=function(){return this._scrollEnabled},t.prototype.clear=function(){this._visibleRange=be()},t}(),Ee={name:"AVP",shortName:"AVP",series:Xt.Price,precision:2,figures:[{key:"avp",title:"AVP: ",type:"line"}],calc:function(t){var e=0,i=0;return t.map(function(t){var n,a,r={},o=null!==(n=null===t||void 0===t?void 0:t.turnover)&&void 0!==n?n:0,s=null!==(a=null===t||void 0===t?void 0:t.volume)&&void 0!==a?a:0;return e+=o,i+=s,0!==i&&(r.avp=e/i),r})}},Ae={name:"AO",shortName:"AO",calcParams:[5,34],figures:[{key:"ao",title:"AO: ",type:"bar",baseValue:0,styles:function(t,e,i){var n,a,r,o,s,l=t.prev,c=t.current,u=null!==(a=null===(n=l.indicatorData)||void 0===n?void 0:n.ao)&&void 0!==a?a:Number.MIN_SAFE_INTEGER,d=null!==(o=null===(r=c.indicatorData)||void 0===r?void 0:r.ao)&&void 0!==o?o:Number.MIN_SAFE_INTEGER;s=d>u?Rt(e.styles,"bars[0].upColor",i.bars[0].upColor):Rt(e.styles,"bars[0].downColor",i.bars[0].downColor);var h=d>u?O.Stroke:O.Fill;return{color:s,style:h,borderColor:s}}}],calc:function(t,e){var i=e.calcParams,n=Math.max(i[0],i[1]),a=0,r=0,o=0,s=0;return t.map(function(e,l){var c={},u=(e.low+e.high)/2;if(a+=u,r+=u,l>=i[0]-1){o=a/i[0];var d=t[l-(i[0]-1)];a-=(d.low+d.high)/2}if(l>=i[1]-1){s=r/i[1];d=t[l-(i[1]-1)];r-=(d.low+d.high)/2}return l>=n-1&&(c.ao=o-s),c})}},Pe={name:"BIAS",shortName:"BIAS",calcParams:[6,12,24],figures:[{key:"bias1",title:"BIAS6: ",type:"line"},{key:"bias2",title:"BIAS12: ",type:"line"},{key:"bias3",title:"BIAS24: ",type:"line"}],regenerateFigures:function(t){return t.map(function(t,e){return{key:"bias".concat(e+1),title:"BIAS".concat(t,": "),type:"line"}})},calc:function(t,e){var i=e.calcParams,n=e.figures,a=[];return t.map(function(e,r){var o={},s=e.close;return i.forEach(function(e,l){var c;if(a[l]=(null!==(c=a[l])&&void 0!==c?c:0)+s,r>=e-1){var u=a[l]/i[l];o[n[l].key]=(s-u)/u*100,a[l]-=t[r-(e-1)].close}}),o})}};function Me(t,e){var i=t.length,n=0;return t.forEach(function(t){var i=t.close-e;n+=i*i}),n=Math.abs(n),Math.sqrt(n/i)}var De={name:"BOLL",shortName:"BOLL",series:Xt.Price,calcParams:[20,2],precision:2,shouldOhlc:!0,figures:[{key:"up",title:"UP: ",type:"line"},{key:"mid",title:"MID: ",type:"line"},{key:"dn",title:"DN: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=i[0]-1,a=0;return t.map(function(e,r){var o=e.close,s={};if(a+=o,r>=n){s.mid=a/i[0];var l=Me(t.slice(r-n,r+1),s.mid);s.up=s.mid+i[1]*l,s.dn=s.mid-i[1]*l,a-=t[r-n].close}return s})}},Te={name:"BRAR",shortName:"BRAR",calcParams:[26],figures:[{key:"br",title:"BR: ",type:"line"},{key:"ar",title:"AR: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=0,r=0,o=0;return t.map(function(e,s){var l,c,u={},d=e.high,h=e.low,p=e.open,v=(null!==(l=t[s-1])&&void 0!==l?l:e).close;if(r+=d-p,o+=p-h,n+=d-v,a+=v-h,s>=i[0]-1){u.ar=0!==o?r/o*100:0,u.br=0!==a?n/a*100:0;var f=t[s-(i[0]-1)],g=f.high,m=f.low,y=f.open,_=(null!==(c=t[s-i[0]])&&void 0!==c?c:t[s-(i[0]-1)]).close;n-=g-_,a-=_-m,r-=g-y,o-=y-m}return u})}},Be={name:"BBI",shortName:"BBI",series:Xt.Price,precision:2,calcParams:[3,6,12,24],shouldOhlc:!0,figures:[{key:"bbi",title:"BBI: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=Math.max.apply(Math,q([],Z(i),!1)),a=[],r=[];return t.map(function(e,o){var s={},l=e.close;if(i.forEach(function(e,i){var n;a[i]=(null!==(n=a[i])&&void 0!==n?n:0)+l,o>=e-1&&(r[i]=a[i]/e,a[i]-=t[o-(e-1)].close)}),o>=n-1){var c=0;r.forEach(function(t){c+=t}),s.bbi=c/4}return s})}},Fe={name:"CCI",shortName:"CCI",calcParams:[20],figures:[{key:"cci",title:"CCI: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=i[0]-1,a=0,r=[];return t.map(function(e,o){var s={},l=(e.high+e.low+e.close)/3;if(a+=l,r.push(l),o>=n){var c=a/i[0],u=r.slice(o-n,o+1),d=0;u.forEach(function(t){d+=Math.abs(t-c)});var h=d/i[0];s.cci=0!==h?(l-c)/h/.015:0;var p=(t[o-n].high+t[o-n].low+t[o-n].close)/3;a-=p}return s})}},Re={name:"CR",shortName:"CR",calcParams:[26,10,20,40,60],figures:[{key:"cr",title:"CR: ",type:"line"},{key:"ma1",title:"MA1: ",type:"line"},{key:"ma2",title:"MA2: ",type:"line"},{key:"ma3",title:"MA3: ",type:"line"},{key:"ma4",title:"MA4: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=Math.ceil(i[1]/2.5+1),a=Math.ceil(i[2]/2.5+1),r=Math.ceil(i[3]/2.5+1),o=Math.ceil(i[4]/2.5+1),s=0,l=[],c=0,u=[],d=0,h=[],p=0,v=[],f=[];return t.forEach(function(e,g){var m,y,_,b,x,w={},S=null!==(m=t[g-1])&&void 0!==m?m:e,C=(S.high+S.close+S.low+S.open)/4,k=Math.max(0,e.high-C),I=Math.max(0,C-e.low);g>=i[0]-1&&(w.cr=0!==I?k/I*100:0,s+=w.cr,c+=w.cr,d+=w.cr,p+=w.cr,g>=i[0]+i[1]-2&&(l.push(s/i[1]),g>=i[0]+i[1]+n-3&&(w.ma1=l[l.length-1-n]),s-=null!==(y=f[g-(i[1]-1)].cr)&&void 0!==y?y:0),g>=i[0]+i[2]-2&&(u.push(c/i[2]),g>=i[0]+i[2]+a-3&&(w.ma2=u[u.length-1-a]),c-=null!==(_=f[g-(i[2]-1)].cr)&&void 0!==_?_:0),g>=i[0]+i[3]-2&&(h.push(d/i[3]),g>=i[0]+i[3]+r-3&&(w.ma3=h[h.length-1-r]),d-=null!==(b=f[g-(i[3]-1)].cr)&&void 0!==b?b:0),g>=i[0]+i[4]-2&&(v.push(p/i[4]),g>=i[0]+i[4]+o-3&&(w.ma4=v[v.length-1-o]),p-=null!==(x=f[g-(i[4]-1)].cr)&&void 0!==x?x:0)),f.push(w)}),f}},Le={name:"DMA",shortName:"DMA",calcParams:[10,50,10],figures:[{key:"dma",title:"DMA: ",type:"line"},{key:"ama",title:"AMA: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=Math.max(i[0],i[1]),a=0,r=0,o=0,s=[];return t.forEach(function(e,l){var c,u={},d=e.close;a+=d,r+=d;var h=0,p=0;if(l>=i[0]-1&&(h=a/i[0],a-=t[l-(i[0]-1)].close),l>=i[1]-1&&(p=r/i[1],r-=t[l-(i[1]-1)].close),l>=n-1){var v=h-p;u.dma=v,o+=v,l>=n+i[2]-2&&(u.ama=o/i[2],o-=null!==(c=s[l-(i[2]-1)].dma)&&void 0!==c?c:0)}s.push(u)}),s}},Ne={name:"DMI",shortName:"DMI",calcParams:[14,6],figures:[{key:"pdi",title:"PDI: ",type:"line"},{key:"mdi",title:"MDI: ",type:"line"},{key:"adx",title:"ADX: ",type:"line"},{key:"adxr",title:"ADXR: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=0,r=0,o=0,s=0,l=0,c=0,u=0,d=[];return t.forEach(function(e,h){var p,v,f={},g=null!==(p=t[h-1])&&void 0!==p?p:e,m=g.close,y=e.high,_=e.low,b=y-_,x=Math.abs(y-m),w=Math.abs(m-_),S=y-g.high,C=g.low-_,k=Math.max(Math.max(b,x),w),I=S>0&&S>C?S:0,E=C>0&&C>S?C:0;if(n+=k,a+=I,r+=E,h>=i[0]-1){h>i[0]-1?(o=o-o/i[0]+k,s=s-s/i[0]+I,l=l-l/i[0]+E):(o=n,s=a,l=r);var A=0,P=0;0!==o&&(A=100*s/o,P=100*l/o),f.pdi=A,f.mdi=P;var M=0;P+A!==0&&(M=Math.abs(P-A)/(P+A)*100),c+=M,h>=2*i[0]-2&&(u=h>2*i[0]-2?(u*(i[0]-1)+M)/i[0]:c/i[0],f.adx=u,h>=2*i[0]+i[1]-3&&(f.adxr=((null!==(v=d[h-(i[1]-1)].adx)&&void 0!==v?v:0)+u)/2))}d.push(f)}),d}},Oe={name:"EMV",shortName:"EMV",calcParams:[14,9],figures:[{key:"emv",title:"EMV: ",type:"line"},{key:"maEmv",title:"MAEMV: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=[];return t.map(function(e,r){var o,s={};if(r>0){var l=t[r-1],c=e.high,u=e.low,d=null!==(o=e.volume)&&void 0!==o?o:0,h=(c+u)/2-(l.high+l.low)/2;if(0===d||c-u===0)s.emv=0;else{var p=d/1e8/(c-u);s.emv=h/p}n+=s.emv,a.push(s.emv),r>=i[0]&&(s.maEmv=n/i[0],n-=a[r-i[0]])}return s})}},ze={name:"EMA",shortName:"EMA",series:Xt.Price,calcParams:[6,12,20],precision:2,shouldOhlc:!0,figures:[{key:"ema1",title:"EMA6: ",type:"line"},{key:"ema2",title:"EMA12: ",type:"line"},{key:"ema3",title:"EMA20: ",type:"line"}],regenerateFigures:function(t){return t.map(function(t,e){return{key:"ema".concat(e+1),title:"EMA".concat(t,": "),type:"line"}})},calc:function(t,e){var i=e.calcParams,n=e.figures,a=0,r=[];return t.map(function(t,e){var o={},s=t.close;return a+=s,i.forEach(function(t,i){e>=t-1&&(r[i]=e>t-1?(2*s+(t-1)*r[i])/(t+1):a/t,o[n[i].key]=r[i])}),o})}},Ve={name:"MTM",shortName:"MTM",calcParams:[12,6],figures:[{key:"mtm",title:"MTM: ",type:"line"},{key:"maMtm",title:"MAMTM: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=[];return t.forEach(function(e,r){var o,s={};if(r>=i[0]){var l=e.close,c=t[r-i[0]].close;s.mtm=l-c,n+=s.mtm,r>=i[0]+i[1]-1&&(s.maMtm=n/i[1],n-=null!==(o=a[r-(i[1]-1)].mtm)&&void 0!==o?o:0)}a.push(s)}),a}},We={name:"MA",shortName:"MA",series:Xt.Price,calcParams:[5,10,30,60],precision:2,shouldOhlc:!0,figures:[{key:"ma5",title:"MA5: ",type:"line"},{key:"ma10",title:"MA10: ",type:"line"},{key:"ma30",title:"MA30: ",type:"line"},{key:"ma60",title:"MA60: ",type:"line"}],regenerateFigures:function(t){return t.map(function(t,e){return{key:"ma".concat(e+1),title:"MA".concat(t,": "),type:"line"}})},calc:function(t,e){var i=e.calcParams,n=e.figures,a=[];return t.map(function(e,r){var o={},s=e.close;return i.forEach(function(e,i){var l;a[i]=(null!==(l=a[i])&&void 0!==l?l:0)+s,r>=e-1&&(o[n[i].key]=a[i]/e,a[i]-=t[r-(e-1)].close)}),o})}},He={name:"MACD",shortName:"MACD",calcParams:[12,26,9],figures:[{key:"dif",title:"DIF: ",type:"line"},{key:"dea",title:"DEA: ",type:"line"},{key:"macd",title:"MACD: ",type:"bar",baseValue:0,styles:function(t,e,i){var n,a,r,o,s,l=t.prev,c=t.current,u=null!==(a=null===(n=l.indicatorData)||void 0===n?void 0:n.macd)&&void 0!==a?a:Number.MIN_SAFE_INTEGER,d=null!==(o=null===(r=c.indicatorData)||void 0===r?void 0:r.macd)&&void 0!==o?o:Number.MIN_SAFE_INTEGER;s=d>0?Rt(e.styles,"bars[0].upColor",i.bars[0].upColor):d<0?Rt(e.styles,"bars[0].downColor",i.bars[0].downColor):Rt(e.styles,"bars[0].noChangeColor",i.bars[0].noChangeColor);var h=u=a[0]-1&&(i=e>a[0]-1?(2*d+(a[0]-1)*i)/(a[0]+1):r/a[0]),e>=a[1]-1&&(n=e>a[1]-1?(2*d+(a[1]-1)*n)/(a[1]+1):r/a[1]),e>=c-1&&(o=i-n,u.dif=o,s+=o,e>=c+a[2]-2&&(l=e>c+a[2]-2?(2*o+l*(a[2]-1))/(a[2]+1):s/a[2],u.macd=2*(o-l),u.dea=l)),u})}},$e={name:"OBV",shortName:"OBV",calcParams:[30],figures:[{key:"obv",title:"OBV: ",type:"line"},{key:"maObv",title:"MAOBV: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=0,r=[];return t.forEach(function(e,o){var s,l,c,u,d=null!==(s=t[o-1])&&void 0!==s?s:e;e.closed.close&&(a+=null!==(c=e.volume)&&void 0!==c?c:0);var h={obv:a};n+=a,o>=i[0]-1&&(h.maObv=n/i[0],n-=null!==(u=r[o-(i[0]-1)].obv)&&void 0!==u?u:0),r.push(h)}),r}},Ye={name:"PVT",shortName:"PVT",figures:[{key:"pvt",title:"PVT: ",type:"line"}],calc:function(t){var e=0;return t.map(function(i,n){var a,r,o={},s=i.close,l=null!==(a=i.volume)&&void 0!==a?a:1,c=(null!==(r=t[n-1])&&void 0!==r?r:i).close,u=0,d=c*l;return 0!==d&&(u=(s-c)/d),e+=u,o.pvt=e,o})}},Xe={name:"PSY",shortName:"PSY",calcParams:[12,6],figures:[{key:"psy",title:"PSY: ",type:"line"},{key:"maPsy",title:"MAPSY: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=0,r=[],o=[];return t.forEach(function(e,s){var l,c,u={},d=(null!==(l=t[s-1])&&void 0!==l?l:e).close,h=e.close-d>0?1:0;r.push(h),n+=h,s>=i[0]-1&&(u.psy=n/i[0]*100,a+=u.psy,s>=i[0]+i[1]-2&&(u.maPsy=a/i[1],a-=null!==(c=o[s-(i[1]-1)].psy)&&void 0!==c?c:0),n-=r[s-(i[0]-1)]),o.push(u)}),o}},Ke={name:"ROC",shortName:"ROC",calcParams:[12,6],figures:[{key:"roc",title:"ROC: ",type:"line"},{key:"maRoc",title:"MAROC: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=[],a=0;return t.forEach(function(e,r){var o,s,l={};if(r>=i[0]-1){var c=e.close,u=(null!==(o=t[r-i[0]])&&void 0!==o?o:t[r-(i[0]-1)]).close;l.roc=0!==u?(c-u)/u*100:0,a+=l.roc,r>=i[0]-1+i[1]-1&&(l.maRoc=a/i[1],a-=null!==(s=n[r-(i[1]-1)].roc)&&void 0!==s?s:0)}n.push(l)}),n}},je={name:"RSI",shortName:"RSI",calcParams:[6,12,24],figures:[{key:"rsi1",title:"RSI1: ",type:"line"},{key:"rsi2",title:"RSI2: ",type:"line"},{key:"rsi3",title:"RSI3: ",type:"line"}],regenerateFigures:function(t){return t.map(function(t,e){var i=e+1;return{key:"rsi".concat(i),title:"RSI".concat(i,": "),type:"line"}})},calc:function(t,e){var i=e.calcParams,n=e.figures,a=[],r=[];return t.map(function(e,o){var s,l={},c=(null!==(s=t[o-1])&&void 0!==s?s:e).close,u=e.close-c;return i.forEach(function(e,i){var s,c,d;if(u>0?a[i]=(null!==(s=a[i])&&void 0!==s?s:0)+u:r[i]=(null!==(c=r[i])&&void 0!==c?c:0)+Math.abs(u),o>=e-1){0!==r[i]?l[n[i].key]=100-100/(1+a[i]/r[i]):l[n[i].key]=0;var h=t[o-(e-1)],p=null!==(d=t[o-e])&&void 0!==d?d:h,v=h.close-p.close;v>0?a[i]-=v:r[i]-=Math.abs(v)}}),l})}},Ue={name:"SMA",shortName:"SMA",series:Xt.Price,calcParams:[12,2],precision:2,figures:[{key:"sma",title:"SMA: ",type:"line"}],shouldOhlc:!0,calc:function(t,e){var i=e.calcParams,n=0,a=0;return t.map(function(t,e){var r={},o=t.close;return n+=o,e>=i[0]-1&&(a=e>i[0]-1?(o*i[1]+a*(i[0]-i[1]+1))/(i[0]+1):n/i[0],r.sma=a),r})}},Ge={name:"KDJ",shortName:"KDJ",calcParams:[9,3,3],figures:[{key:"k",title:"K: ",type:"line"},{key:"d",title:"D: ",type:"line"},{key:"j",title:"J: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=[];return t.forEach(function(e,a){var r,o,s,l,c={},u=e.close;if(a>=i[0]-1){var d=me(t.slice(a-(i[0]-1),a+1),"high","low"),h=d[0],p=d[1],v=h-p,f=(u-p)/(0===v?1:v)*100;c.k=((i[1]-1)*(null!==(o=null===(r=n[a-1])||void 0===r?void 0:r.k)&&void 0!==o?o:50)+f)/i[1],c.d=((i[2]-1)*(null!==(l=null===(s=n[a-1])||void 0===s?void 0:s.d)&&void 0!==l?l:50)+c.k)/i[2],c.j=3*c.k-2*c.d}n.push(c)}),n}},Ze={name:"SAR",shortName:"SAR",series:Xt.Price,calcParams:[2,2,20],precision:2,shouldOhlc:!0,figures:[{key:"sar",title:"SAR: ",type:"circle",styles:function(t,e,i){var n,a,r=t.current,o=null!==(a=null===(n=r.indicatorData)||void 0===n?void 0:n.sar)&&void 0!==a?a:Number.MIN_SAFE_INTEGER,s=r.kLineData,l=((null===s||void 0===s?void 0:s.high)+(null===s||void 0===s?void 0:s.low))/2,c=oe.low?(c=s,o=n,s=-100,l=!l):c>p&&(c=p)}else{(-100===s||s>h)&&(s=h,o=Math.min(o+a,r)),c=u+o*(s-u);var v=Math.max(t[Math.max(1,i)-1].high,d);c=r[0]-1&&(i=e>r[0]-1?(2*p+(r[0]-1)*i)/(r[0]+1):o/r[0],s+=i,e>=2*r[0]-2&&(n=e>2*r[0]-2?(2*i+(r[0]-1)*n)/(r[0]+1):s/r[0],l+=n,e>=3*r[0]-3))){var v=void 0,f=0;e>3*r[0]-3?(v=(2*n+(r[0]-1)*a)/(r[0]+1),f=(v-a)/a*100):v=l/r[0],a=v,h.trix=f,c+=f,e>=3*r[0]+r[1]-4&&(h.maTrix=c/r[1],c-=null!==(d=u[e-(r[1]-1)].trix)&&void 0!==d?d:0)}u.push(h)}),u}};function Je(){return{key:"volume",title:"VOLUME: ",type:"bar",baseValue:0,styles:function(t,e,i){var n=t.current.kLineData,a=Rt(e.styles,"bars[0].noChangeColor",i.bars[0].noChangeColor);return At(n)&&(n.close>n.open?a=Rt(e.styles,"bars[0].upColor",i.bars[0].upColor):n.close=e-1&&(l[n[i].key]=a[i]/e,a[i]-=null!==(c=t[r-(e-1)].volume)&&void 0!==c?c:0)}),l})}},ti={name:"VR",shortName:"VR",calcParams:[26,6],figures:[{key:"vr",title:"VR: ",type:"line"},{key:"maVr",title:"MAVR: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=0,r=0,o=0,s=[];return t.forEach(function(e,l){var c,u,d,h,p,v={},f=e.close,g=(null!==(c=t[l-1])&&void 0!==c?c:e).close,m=null!==(u=e.volume)&&void 0!==u?u:0;if(f>g?n+=m:f=i[0]-1){var y=r/2;v.vr=a+y===0?0:(n+y)/(a+y)*100,o+=v.vr,l>=i[0]+i[1]-2&&(v.maVr=o/i[1],o-=null!==(d=s[l-(i[1]-1)].vr)&&void 0!==d?d:0);var _=t[l-(i[0]-1)],b=null!==(h=t[l-i[0]])&&void 0!==h?h:_,x=_.close,w=null!==(p=_.volume)&&void 0!==p?p:0;x>b.close?n-=w:x=s){var l=me(t.slice(a-s,a+1),"high","low"),c=l[0],u=l[1],d=c-u;r[n[i].key]=0===d?0:(o-c)/d*100}}),r})}},ii={},ni=[Ee,Ae,Pe,De,Te,Be,Fe,Re,Le,Ne,Oe,ze,Ve,We,He,$e,Ye,Xe,Ke,je,Ue,Ge,Ze,qe,Qe,ti,ei];function ai(t){ii[t.name]=Gt.extend(t)}function ri(t){var e;return null!==(e=ii[t])&&void 0!==e?e:null}ni.forEach(function(t){ii[t.name]=Gt.extend(t)});var oi=function(){function t(t){this._instances=new Map,this._chartStore=t}return t.prototype._overrideInstance=function(t,e){var i=e.shortName,n=e.series,a=e.calcParams,r=e.precision,o=e.figures,s=e.minValue,l=e.maxValue,c=e.shouldOhlc,u=e.shouldFormatBigNumber,d=e.visible,h=e.zLevel,p=e.styles,v=e.extendData,f=e.regenerateFigures,g=e.createTooltipDataSource,m=e.draw,y=e.calc,_=!1;Mt(i)&&t.setShortName(i)&&(_=!0),At(n)&&t.setSeries(n)&&(_=!0);var b=!1;Ct(a)&&t.setCalcParams(a)&&(_=!0,b=!0),Ct(o)&&t.setFigures(o)&&(_=!0,b=!0),void 0!==s&&t.setMinValue(s)&&(_=!0),void 0!==l&&t.setMinValue(l)&&(_=!0),Et(r)&&t.setPrecision(r)&&(_=!0),Pt(c)&&t.setShouldOhlc(c)&&(_=!0),Pt(u)&&t.setShouldFormatBigNumber(u)&&(_=!0),Pt(d)&&t.setVisible(d)&&(_=!0);var x=!1;return Et(h)&&t.setZLevel(h)&&(_=!0,x=!0),At(p)&&t.setStyles(p)&&(_=!0),void 0!==v&&t.setExtendData(v)&&(_=!0,b=!0),void 0!==f&&t.setRegenerateFigures(f)&&(_=!0),void 0!==g&&t.setCreateTooltipDataSource(g)&&(_=!0),void 0!==m&&t.setDraw(m)&&(_=!0),kt(y)&&(t.calc=y,b=!0),[_,b,x]},t.prototype._sort=function(t){var e;Mt(t)?null===(e=this._instances.get(t))||void 0===e||e.sort(function(t,e){return t.zLevel-e.zLevel}):this._instances.forEach(function(t){t.sort(function(t,e){return t.zLevel-e.zLevel})})},t.prototype.addInstance=function(t,e,i){return j(this,void 0,void 0,function(){var n,a,r,o,s;return U(this,function(l){switch(l.label){case 0:return n=t.name,a=this._instances.get(e),At(a)?(r=a.find(function(t){return t.name===n}),At(r)?[4,Promise.reject(new Error("Duplicate indicators."))]:[3,2]):[3,2];case 1:return[2,l.sent()];case 2:return At(a)||(a=[]),o=ri(n),s=new o,this.synchronizeSeriesPrecision(s),this._overrideInstance(s,t),i||(a=[]),a.push(s),this._instances.set(e,a),this._sort(e),[4,s.calcIndicator(this._chartStore.getDataList())];case 3:return[2,l.sent()]}})})},t.prototype.getInstances=function(t){var e;return null!==(e=this._instances.get(t))&&void 0!==e?e:[]},t.prototype.removeInstance=function(t,e){var i,n=!1,a=this._instances.get(t);if(At(a)){if(Mt(e)){var r=a.findIndex(function(t){return t.name===e});r>-1&&(a.splice(r,1),n=!0)}else this._instances.set(t,[]),n=!0;0===(null===(i=this._instances.get(t))||void 0===i?void 0:i.length)&&this._instances.delete(t)}return n},t.prototype.hasInstances=function(t){return this._instances.has(t)},t.prototype.calcInstance=function(t,e){return j(this,void 0,void 0,function(){var i,n,a,r,o=this;return U(this,function(s){switch(s.label){case 0:return i=[],Mt(t)?Mt(e)?(n=this._instances.get(e),At(n)&&(a=n.find(function(e){return e.name===t}),At(a)&&i.push(a.calcIndicator(this._chartStore.getDataList())))):this._instances.forEach(function(e){var n=e.find(function(e){return e.name===t});At(n)&&i.push(n.calcIndicator(o._chartStore.getDataList()))}):this._instances.forEach(function(t){t.forEach(function(t){i.push(t.calcIndicator(o._chartStore.getDataList()))})}),[4,Promise.all(i)];case 1:return r=s.sent(),[2,r.includes(!0)]}})})},t.prototype.getInstanceByPaneId=function(t,e){var i,n,a=function(t){var e=new Map;return t.forEach(function(t){e.set(t.name,t)}),e};if(Mt(t)){var r=null!==(i=this._instances.get(t))&&void 0!==i?i:[];return Mt(e)?null!==(n=null===r||void 0===r?void 0:r.find(function(t){return t.name===e}))&&void 0!==n?n:null:a(r)}var o=new Map;return this._instances.forEach(function(t,e){o.set(e,a(t))}),o},t.prototype.synchronizeSeriesPrecision=function(t){var e=this._chartStore.getPrecision(),i=e.price,n=e.volume,a=function(t){switch(t.series){case Xt.Price:t.setPrecision(i,!0);break;case Xt.Volume:t.setPrecision(n,!0);break}};At(t)?a(t):this._instances.forEach(function(t){t.forEach(function(t){a(t)})})},t.prototype.override=function(t,e){return j(this,void 0,void 0,function(){var i,n,a,r,o,s,l,c=this;return U(this,function(u){switch(u.label){case 0:return i=t.name,n=new Map,null!==e?(a=this._instances.get(e),At(a)&&n.set(e,a)):n=this._instances,r=!1,o=[],s=!1,n.forEach(function(e){var n=e.find(function(t){return t.name===i});if(At(n)){var a=c._overrideInstance(n,t);a[2]&&(s=!0),a[1]?o.push(n.calcIndicator(c._chartStore.getDataList())):a[0]&&(r=!0)}}),s&&this._sort(),[4,Promise.all(o)];case 1:return l=u.sent(),[2,[r,l.includes(!0)]]}})})},t}(),si=function(){function t(t){this._crosshair={},this._activeIcon=null,this._chartStore=t}return t.prototype.setCrosshair=function(t,e){var i,n,a=null!==e&&void 0!==e?e:{},r=a.notInvalidate,o=a.notExecuteAction,s=this._chartStore.getDataList(),l=null!==t&&void 0!==t?t:{};Et(l.x)?(i=this._chartStore.getTimeScaleStore().coordinateToDataIndex(l.x),n=i<0?0:i>s.length-1?s.length-1:i):(i=s.length-1,n=i);var c=s[n],u=this._chartStore.getTimeScaleStore().dataIndexToCoordinate(i),d={x:this._crosshair.x,y:this._crosshair.y,paneId:this._crosshair.paneId};this._crosshair=K(K({},l),{realX:u,kLineData:c,realDataIndex:i,dataIndex:n}),d.x===l.x&&d.y===l.y&&d.paneId===l.paneId||(null===c||null!==o&&void 0!==o&&o||this._chartStore.getChart().crosshairChange(this._crosshair),null!==r&&void 0!==r&&r||this._chartStore.getChart().updatePane(1))},t.prototype.recalculateCrosshair=function(t){this.setCrosshair(this._crosshair,{notInvalidate:t})},t.prototype.getCrosshair=function(){return this._crosshair},t.prototype.setActiveIcon=function(t){this._activeIcon=null!==t&&void 0!==t?t:null},t.prototype.getActiveIcon=function(){return this._activeIcon},t.prototype.clear=function(){this.setCrosshair({},{notInvalidate:!0}),this.setActiveIcon()},t}(),li={name:"fibonacciLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e,i=t.coordinates,n=t.bounding,a=t.overlay,r=t.precision,o=t.thousandsSeparator,s=t.decimalFoldThreshold,l=t.yAxis,c=a.points;if(i.length>0){var u=null===(e=null===l||void 0===l?void 0:l.isInCandle())||void 0===e||e?r.price:r.excludePriceVolumeMax,d=[],h=[],p=0,v=n.width;if(i.length>1&&Et(c[0].value)&&Et(c[1].value)){var f=[1,.786,.618,.5,.382,.236,0],g=i[0].y-i[1].y,m=c[0].value-c[1].value;f.forEach(function(t){var e,n=i[1].y+g*t,a=Vt(zt(((null!==(e=c[1].value)&&void 0!==e?e:0)+m*t).toFixed(u),o),s);d.push({coordinates:[{x:p,y:n},{x:v,y:n}]}),h.push({x:p,y:n,text:"".concat(a," (").concat((100*t).toFixed(1),"%)"),baseline:"bottom"})})}return[{type:"line",attrs:d},{type:"text",isCheckEvent:!1,attrs:h}]}return[]}},ci={name:"horizontalRayLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates,i=t.bounding,n={x:0,y:e[0].y};return At(e[1])&&e[0].x-1)for(var a=n;a>-1;a--)if(this._children[a].dispatchEvent(t,e,i))return!0;return this.onEvent(t,e,i)},t.prototype.addChild=function(t){return this._children.push(t),this},t.prototype.clear=function(){this._children=[]},t}(),pi=2,vi=function(t){function e(e){var i=t.call(this)||this;return i.attrs=e.attrs,i.styles=e.styles,i}return L(e,t),e.prototype.checkEventOn=function(t){return this.checkEventOnImp(t,this.attrs,this.styles)},e.prototype.setAttrs=function(t){return this.attrs=t,this},e.prototype.setStyles=function(t){return this.styles=t,this},e.prototype.draw=function(t){this.drawImp(t,this.attrs,this.styles)},e.extend=function(t){var i=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return L(i,e),i.prototype.checkEventOnImp=function(e,i,n){return t.checkEventOn(e,i,n)},i.prototype.drawImp=function(e,i,n){t.draw(e,i,n)},i}(e);return i},e}(hi);function fi(t,e){var i=[];i=i.concat(e);for(var n=0;n1)for(var r=1;r0&&i<1?i:0:i?.5:0;if(a>0&&n>2){for(var r=e[0].x,o=e[0].y,s=1;s1&&(2!==i.length||i[0].x!==i[1].x&&i[0].y!==i[1].y?(t.save(),c%2===1&&t.translate(.5,.5),t.beginPath(),t.moveTo(i[0].x,i[0].y),_i(t,i,s),t.stroke(),t.closePath(),t.restore()):(t.beginPath(),i[0].x===i[1].x?(t.moveTo(i[0].x+v,i[0].y),t.lineTo(i[1].x+v,i[1].y)):(t.moveTo(i[0].x,i[0].y+v),t.lineTo(i[1].x,i[1].y+v)),t.stroke(),t.closePath()))})}var xi={name:"line",checkEventOn:fi,draw:function(t,e,i){bi(t,e,i)}};function wi(t,e,i){var n=null!==i&&void 0!==i?i:0,a=[];if(t.length>1)if(t[0].x===t[1].x){var r=0,o=e.height;if(a.push({coordinates:[{x:t[0].x,y:r},{x:t[0].x,y:o}]}),t.length>2){a.push({coordinates:[{x:t[2].x,y:r},{x:t[2].x,y:o}]});for(var s=t[0].x-t[2].x,l=0;l2){var f=t[2].y-p*t[2].x;a.push({coordinates:[{x:u,y:u*p+f},{x:d,y:d*p+f}]});for(s=v-f,l=0;l1){var i=void 0;return i=t[0].x===t[1].x&&t[0].y!==t[1].y?t[0].yt[1].x?{x:0,y:mi(t[0],t[1],{x:0,y:t[0].y})}:{x:e.width,y:mi(t[0],t[1],{x:e.width,y:t[0].y})},{coordinates:[t[0],i]}}return[]}var Ei={name:"rayLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates,i=t.bounding;return[{type:"line",attrs:Ii(e,i)}]}},Ai={name:"segment",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates;return 2===e.length?[{type:"line",attrs:{coordinates:e}}]:[]}},Pi={name:"straightLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates,i=t.bounding;return 2===e.length?e[0].x===e[1].x?[{type:"line",attrs:{coordinates:[{x:e[0].x,y:0},{x:e[0].x,y:i.height}]}}]:[{type:"line",attrs:{coordinates:[{x:0,y:mi(e[0],e[1],{x:0,y:e[0].y})},{x:i.width,y:mi(e[0],e[1],{x:i.width,y:e[0].y})}]}}]:[]}},Mi={name:"verticalRayLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates,i=t.bounding;if(2===e.length){var n={x:e[0].x,y:0};return e[0].y0&&l.set(e[0],n)};try{for(var u=G(this._instances),d=u.next();!d.done;d=u.next()){var h=d.value;c(h)}}catch(v){e={error:v}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(e)throw e.error}}this._instances=l}else this._instances.forEach(function(t,e){r.push(e),t.forEach(function(t){var e;null===(e=t.onRemoved)||void 0===e||e.call(t,{overlay:t})})}),this._instances.clear();if(r.length>0){var p=this._chartStore.getChart();r.forEach(function(t){p.updatePane(1,t)}),p.updatePane(1,Wi.X_AXIS)}},t.prototype.setPressedInstanceInfo=function(t){this._pressedInstanceInfo=t},t.prototype.getPressedInstanceInfo=function(){return this._pressedInstanceInfo},t.prototype.updatePointPosition=function(t,e){if(t>0){var i=this._chartStore.getDataList();this._instances.forEach(function(n){n.forEach(function(n){var a=n.points;a.forEach(function(n){if(!At(n.timestamp)&&At(n.dataIndex)){e===Yt.Forward&&(n.dataIndex=n.dataIndex+t);var a=i[n.dataIndex];n.timestamp=null===a||void 0===a?void 0:a.timestamp}})})})}},t.prototype.setHoverInstanceInfo=function(t,e){var i,n,a=this._hoverInstanceInfo,r=a.instance,o=a.figureType,s=a.figureKey,l=a.figureIndex;if(((null===r||void 0===r?void 0:r.id)!==(null===(i=t.instance)||void 0===i?void 0:i.id)||o!==t.figureType||l!==t.figureIndex)&&(this._hoverInstanceInfo=t,(null===r||void 0===r?void 0:r.id)!==(null===(n=t.instance)||void 0===n?void 0:n.id))){var c=!1,u=!1;null!==r&&(u=!0,kt(r.onMouseLeave)&&(r.onMouseLeave(K({overlay:r,figureKey:s,figureIndex:l},e)),c=!0)),null!==t.instance&&(u=!0,kt(t.instance.onMouseEnter)&&(t.instance.onMouseEnter(K({overlay:t.instance,figureKey:t.figureKey,figureIndex:t.figureIndex},e)),c=!0)),u&&this._sort(),c||this._chartStore.getChart().updatePane(1)}},t.prototype.getHoverInstanceInfo=function(){return this._hoverInstanceInfo},t.prototype.setClickInstanceInfo=function(t,e){var i,n,a,r,o,s,l,c,u,d=this._clickInstanceInfo,h=d.paneId,p=d.instance,v=d.figureType,f=d.figureKey,g=d.figureIndex;if(null!==(n=null===(i=t.instance)||void 0===i?void 0:i.isDrawing())&&void 0!==n&&n||null===(r=null===(a=t.instance)||void 0===a?void 0:a.onClick)||void 0===r||r.call(a,K({overlay:t.instance,figureKey:t.figureKey,figureIndex:t.figureIndex},e)),((null===p||void 0===p?void 0:p.id)!==(null===(o=t.instance)||void 0===o?void 0:o.id)||v!==t.figureType||g!==t.figureIndex)&&(this._clickInstanceInfo=t,(null===p||void 0===p?void 0:p.id)!==(null===(s=t.instance)||void 0===s?void 0:s.id))){null===(l=null===p||void 0===p?void 0:p.onDeselected)||void 0===l||l.call(p,K({overlay:p,figureKey:f,figureIndex:g},e)),null===(u=null===(c=t.instance)||void 0===c?void 0:c.onSelected)||void 0===u||u.call(c,K({overlay:t.instance,figureKey:t.figureKey,figureIndex:t.figureIndex},e));var m=this._chartStore.getChart();m.updatePane(1,t.paneId),h!==t.paneId&&m.updatePane(1,h),m.updatePane(1,Wi.X_AXIS)}},t.prototype.getClickInstanceInfo=function(){return this._clickInstanceInfo},t.prototype.isEmpty=function(){return 0===this._instances.size&&null===this._progressInstanceInfo},t.prototype.isDrawing=function(){var t,e;return null!==this._progressInstanceInfo&&null!==(e=null===(t=this._progressInstanceInfo)||void 0===t?void 0:t.instance.isDrawing())&&void 0!==e&&e},t}(),$i=function(){function t(){this._actions=new Map}return t.prototype.execute=function(t,e){var i;null===(i=this._actions.get(t))||void 0===i||i.execute(e)},t.prototype.subscribe=function(t,e){var i;this._actions.has(t)||this._actions.set(t,new Kt),null===(i=this._actions.get(t))||void 0===i||i.subscribe(e)},t.prototype.unsubscribe=function(t,e){var i=this._actions.get(t);At(i)&&(i.unsubscribe(e),i.isEmpty()&&this._actions.delete(t))},t.prototype.has=function(t){var e=this._actions.get(t);return At(e)&&!e.isEmpty()},t}(),Yi={grid:{horizontal:{color:"#EDEDED"},vertical:{color:"#EDEDED"}},candle:{priceMark:{high:{color:"#76808F"},low:{color:"#76808F"}},tooltip:{rect:{color:"#FEFEFE",borderColor:"#F2F3F5"},text:{color:"#76808F"}}},indicator:{tooltip:{text:{color:"#76808F"}}},xAxis:{axisLine:{color:"#DDDDDD"},tickText:{color:"#76808F"},tickLine:{color:"#DDDDDD"}},yAxis:{axisLine:{color:"#DDDDDD"},tickText:{color:"#76808F"},tickLine:{color:"#DDDDDD"}},separator:{color:"#DDDDDD"},crosshair:{horizontal:{line:{color:"#76808F"},text:{borderColor:"#686D76",backgroundColor:"#686D76"}},vertical:{line:{color:"#76808F"},text:{borderColor:"#686D76",backgroundColor:"#686D76"}}}},Xi={grid:{horizontal:{color:"#292929"},vertical:{color:"#292929"}},candle:{priceMark:{high:{color:"#929AA5"},low:{color:"#929AA5"}},tooltip:{rect:{color:"rgba(10, 10, 10, .6)",borderColor:"rgba(10, 10, 10, .6)"},text:{color:"#929AA5"}}},indicator:{tooltip:{text:{color:"#929AA5"}}},xAxis:{axisLine:{color:"#333333"},tickText:{color:"#929AA5"},tickLine:{color:"#333333"}},yAxis:{axisLine:{color:"#333333"},tickText:{color:"#929AA5"},tickLine:{color:"#333333"}},separator:{color:"#333333"},crosshair:{horizontal:{line:{color:"#929AA5"},text:{borderColor:"#373a40",backgroundColor:"#373a40"}},vertical:{line:{color:"#929AA5"},text:{borderColor:"#373a40",backgroundColor:"#373a40"}}}},Ki={light:Yi,dark:Xi};function ji(t){var e;return null!==(e=Ki[t])&&void 0!==e?e:null}var Ui=function(){function t(t,e){this._styles=gt(),this._customApi=ne(),this._locale=ae,this._precision={price:2,volume:0},this._thousandsSeparator=",",this._decimalFoldThreshold=3,this._dataList=[],this._loadMoreCallback=null,this._loadDataCallback=null,this._loading=!0,this._forwardMore=!0,this._backwardMore=!0,this._timeScaleStore=new Ie(this),this._indicatorStore=new oi(this),this._overlayStore=new Hi(this),this._tooltipStore=new si(this),this._actionStore=new $i,this._visibleDataList=[],this._chart=t,this.setOptions(e)}return t.prototype.adjustVisibleDataList=function(){this._visibleDataList=[];for(var t=this._timeScaleStore.getVisibleRange(),e=t.realFrom,i=t.realTo,n=e;n0&&(this._decimalFoldThreshold=u)}return this},t.prototype.getStyles=function(){return this._styles},t.prototype.getLocale=function(){return this._locale},t.prototype.getCustomApi=function(){return this._customApi},t.prototype.getThousandsSeparator=function(){return this._thousandsSeparator},t.prototype.getDecimalFoldThreshold=function(){return this._decimalFoldThreshold},t.prototype.getPrecision=function(){return this._precision},t.prototype.setPrecision=function(t){return this._precision=t,this._indicatorStore.synchronizeSeriesPrecision(),this},t.prototype.getDataList=function(){return this._dataList},t.prototype.getVisibleFirstData=function(){var t,e=this._timeScaleStore.getVisibleRange().from;return null!==(t=this._dataList[e])&&void 0!==t?t:null},t.prototype.getVisibleDataList=function(){return this._visibleDataList},t.prototype.addData=function(t,e,i){return j(this,void 0,void 0,function(){var n,a,r,o,s,l,c;return U(this,function(u){switch(u.label){case 0:if(n=!1,a=!1,r=0,Ct(t)){switch(r=t.length,e){case Yt.Init:this.clear(),this._dataList=t,this._forwardMore=null===i||void 0===i||i,this._timeScaleStore.resetOffsetRightDistance(),a=!0;break;case Yt.Backward:this._dataList=this._dataList.concat(t),this._backwardMore=null!==i&&void 0!==i&&i,a=r>0;break;case Yt.Forward:this._dataList=t.concat(this._dataList),this._forwardMore=null!==i&&void 0!==i&&i,a=r>0}this._loading=!1,n=!0}else o=this._dataList.length,s=t.timestamp,l=Rt(this._dataList[o-1],"timestamp",0),s>l?(this._dataList.push(t),c=this._timeScaleStore.getLastBarRightSideDiffBarCount(),c<0&&this._timeScaleStore.setLastBarRightSideDiffBarCount(--c),r=1,n=!0,a=!0):s===l&&(this._dataList[o-1]=t,n=!0,a=!0);if(!n)return[3,5];u.label=1;case 1:return u.trys.push([1,4,,5]),this._overlayStore.updatePointPosition(r,e),a?(this._timeScaleStore.adjustVisibleRange(),this._tooltipStore.recalculateCrosshair(!0),[4,this._indicatorStore.calcInstance()]):[3,3];case 2:u.sent(),this._chart.adjustPaneViewport(!1,!0,!0,!0),u.label=3;case 3:return this._actionStore.execute(Tt.OnDataReady),[3,5];case 4:return u.sent(),[3,5];case 5:return[2]}})})},t.prototype.setLoadMoreCallback=function(t){this._loadMoreCallback=t},t.prototype.executeLoadMoreCallback=function(t){this._forwardMore&&!this._loading&&At(this._loadMoreCallback)&&(this._loading=!0,this._loadMoreCallback(t))},t.prototype.setLoadDataCallback=function(t){this._loadDataCallback=t},t.prototype.executeLoadDataCallback=function(t){var e=this;if(!this._loading&&At(this._loadDataCallback)&&(this._forwardMore&&t.type===Yt.Forward||this._backwardMore&&t.type===Yt.Backward)){var i=function(i,n){e.addData(i,t.type,n).then(function(){}).catch(function(){})};this._loading=!0,this._loadDataCallback(K(K({},t),{callback:i}))}},t.prototype.clear=function(){this._forwardMore=!0,this._backwardMore=!0,this._loading=!0,this._dataList=[],this._visibleDataList=[],this._timeScaleStore.clear(),this._tooltipStore.clear()},t.prototype.getTimeScaleStore=function(){return this._timeScaleStore},t.prototype.getIndicatorStore=function(){return this._indicatorStore},t.prototype.getOverlayStore=function(){return this._overlayStore},t.prototype.getTooltipStore=function(){return this._tooltipStore},t.prototype.getActionStore=function(){return this._actionStore},t.prototype.getChart=function(){return this._chart},t}(),Gi={MAIN:"main",X_AXIS:"xAxis",Y_AXIS:"yAxis",SEPARATOR:"separator"},Zi=7;function qi(){return j(this,void 0,void 0,function(){return U(this,function(t){switch(t.label){case 0:return[4,new Promise(function(t){var e=new ResizeObserver(function(i){t(i.every(function(t){return"devicePixelContentBoxSize"in t})),e.disconnect()});e.observe(document.body,{box:"device-pixel-content-box"})}).catch(function(){return!1})];case 1:return[2,t.sent()]}})})}var Ji=function(){function t(t,e){var i=this;this._supportedDevicePixelContentBox=!1,this._width=0,this._height=0,this._pixelWidth=0,this._pixelHeight=0,this._nextPixelWidth=0,this._nextPixelHeight=0,this._requestAnimationId=re,this._mediaQueryListener=function(){var t=Wt(i._element);i._nextPixelWidth=Math.round(i._element.clientWidth*t),i._nextPixelHeight=Math.round(i._element.clientHeight*t),i._resetPixelRatio()},this._listener=e,this._element=he("canvas",t),this._ctx=this._element.getContext("2d",{willReadFrequently:!0}),qi().then(function(t){i._supportedDevicePixelContentBox=t,t?(i._resizeObserver=new ResizeObserver(function(t){var e,n=t.find(function(t){return t.target===i._element}),a=null===(e=null===n||void 0===n?void 0:n.devicePixelContentBoxSize)||void 0===e?void 0:e[0];At(a)&&(i._nextPixelWidth=a.inlineSize,i._nextPixelHeight=a.blockSize,i._pixelWidth===i._nextPixelWidth&&i._pixelHeight===i._nextPixelHeight||i._resetPixelRatio())}),i._resizeObserver.observe(i._element,{box:"device-pixel-content-box"})):(i._mediaQueryList=window.matchMedia("(resolution: ".concat(Wt(i._element),"dppx)")),i._mediaQueryList.addListener(i._mediaQueryListener))}).catch(function(t){return!1})}return t.prototype._resetPixelRatio=function(){var t=this;this._executeListener(function(){var e=t._element.clientWidth,i=t._element.clientHeight,n=t._nextPixelWidth/e,a=t._nextPixelHeight/i;t._width=e,t._height=i,t._pixelWidth=t._nextPixelWidth,t._pixelHeight=t._nextPixelHeight,t._element.width=t._nextPixelWidth,t._element.height=t._nextPixelHeight,t._ctx.scale(n,a)})},t.prototype._executeListener=function(t){var e=this;this._requestAnimationId===re&&(this._requestAnimationId=oe(function(){e._ctx.clearRect(0,0,e._width,e._height),null===t||void 0===t||t(),e._listener(),e._requestAnimationId=re}))},t.prototype.update=function(t,e){if(this._width!==t||this._height!==e){if(this._element.style.width="".concat(t,"px"),this._element.style.height="".concat(e,"px"),!this._supportedDevicePixelContentBox){var i=Wt(this._element);this._nextPixelWidth=Math.round(t*i),this._nextPixelHeight=Math.round(e*i),this._resetPixelRatio()}}else this._executeListener()},t.prototype.getElement=function(){return this._element},t.prototype.getContext=function(){return this._ctx},t.prototype.destroy=function(){At(this._resizeObserver)&&this._resizeObserver.unobserve(this._element),At(this._mediaQueryList)&&this._mediaQueryList.removeListener(this._mediaQueryListener)},t}();function Qi(t){var e={width:0,height:0,left:0,right:0,top:0,bottom:0};return At(t)&&wt(e,t),e}var tn=function(t){function e(e,i){var n=t.call(this)||this;return n._bounding=Qi(),n._pane=i,n._rootContainer=e,n._container=n.createContainer(),e.appendChild(n._container),n}return L(e,t),e.prototype.setBounding=function(t){return wt(this._bounding,t),this},e.prototype.getContainer=function(){return this._container},e.prototype.getBounding=function(){return this._bounding},e.prototype.getPane=function(){return this._pane},e.prototype.update=function(t){this.updateImp(this._container,this._bounding,null!==t&&void 0!==t?t:3)},e.prototype.destroy=function(){this._rootContainer.removeChild(this._container)},e}(hi),en=function(t){function e(e,i){var n=t.call(this,e,i)||this;n._mainCanvas=new Ji({position:"absolute",top:"0",left:"0",zIndex:"2",boxSizing:"border-box"},function(){n.updateMain(n._mainCanvas.getContext())}),n._overlayCanvas=new Ji({position:"absolute",top:"0",left:"0",zIndex:"2",boxSizing:"border-box"},function(){n.updateOverlay(n._overlayCanvas.getContext())});var a=n.getContainer();return a.appendChild(n._mainCanvas.getElement()),a.appendChild(n._overlayCanvas.getElement()),n}return L(e,t),e.prototype.createContainer=function(){return he("div",{margin:"0",padding:"0",position:"absolute",top:"0",overflow:"hidden",boxSizing:"border-box",zIndex:"1"})},e.prototype.updateImp=function(t,e,i){var n=e.width,a=e.height,r=e.left;t.style.left="".concat(r,"px");var o=i,s=t.clientWidth,l=t.clientHeight;switch(n===s&&a===l||(t.style.width="".concat(n,"px"),t.style.height="".concat(a,"px"),o=3),o){case 0:this._mainCanvas.update(n,a);break;case 1:this._overlayCanvas.update(n,a);break;case 3:case 4:this._mainCanvas.update(n,a),this._overlayCanvas.update(n,a);break}},e.prototype.destroy=function(){this._mainCanvas.destroy(),this._overlayCanvas.destroy()},e.prototype.getImage=function(t){var e=this.getBounding(),i=e.width,n=e.height,a=he("canvas",{width:"".concat(i,"px"),height:"".concat(n,"px"),boxSizing:"border-box"}),r=a.getContext("2d"),o=Wt(a);return a.width=i*o,a.height=n*o,r.scale(o,o),r.drawImage(this._mainCanvas.getElement(),0,0,i,n),t&&r.drawImage(this._overlayCanvas.getElement(),0,0,i,n),a},e}(tn);function nn(t){return"transparent"===t||"none"===t||/^[rR][gG][Bb][Aa]\(([\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\s]*,){3}[\s]*0[\s]*\)$/.test(t)||/^[hH][Ss][Ll][Aa]\(([\s]*(360|3[0-5][0-9]|[012]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,){2}([\s]*0[\s]*)\)$/.test(t)}function an(t,e){var i=[];i=i.concat(e);for(var n=0;ns*s))return!0}return!1}function rn(t,e,i){var n=[];n=n.concat(e);var a=i.style,r=void 0===a?O.Fill:a,o=i.color,s=void 0===o?"currentColor":o,l=i.borderSize,c=void 0===l?1:l,u=i.borderColor,d=void 0===u?"currentColor":u,h=i.borderStyle,p=void 0===h?N.Solid:h,v=i.borderDashedValue,f=void 0===v?[2,2]:v,g=(r===O.Fill||i.style===O.StrokeFill)&&(!Mt(s)||!nn(s));g&&(t.fillStyle=s,n.forEach(function(e){var i=e.x,n=e.y,a=e.r;t.beginPath(),t.arc(i,n,a,0,2*Math.PI),t.closePath(),t.fill()})),(r===O.Stroke||i.style===O.StrokeFill)&&c>0&&!nn(d)&&(t.strokeStyle=d,t.lineWidth=c,p===N.Dashed?t.setLineDash(f):t.setLineDash([]),n.forEach(function(e){var i=e.x,n=e.y,a=e.r;(!g||a>c)&&(t.beginPath(),t.arc(i,n,a,0,2*Math.PI),t.closePath(),t.stroke())}))}var on={name:"circle",checkEventOn:an,draw:function(t,e,i){rn(t,e,i)}};function sn(t,e){var i=[];i=i.concat(e);for(var n=0;nt.y!==r[s].y>t.y&&t.x<(r[s].x-r[o].x)*(t.y-r[o].y)/(r[s].y-r[o].y)+r[o].x&&(a=!a);if(a)return!0}return!1}function ln(t,e,i){var n=[];n=n.concat(e);var a=i.style,r=void 0===a?O.Fill:a,o=i.color,s=void 0===o?"currentColor":o,l=i.borderSize,c=void 0===l?1:l,u=i.borderColor,d=void 0===u?"currentColor":u,h=i.borderStyle,p=void 0===h?N.Solid:h,v=i.borderDashedValue,f=void 0===v?[2,2]:v;r!==O.Fill&&i.style!==O.StrokeFill||Mt(s)&&nn(s)||(t.fillStyle=s,n.forEach(function(e){var i=e.coordinates;t.beginPath(),t.moveTo(i[0].x,i[0].y);for(var n=1;n0&&!nn(d)&&(t.strokeStyle=d,t.lineWidth=c,p===N.Dashed?t.setLineDash(f):t.setLineDash([]),n.forEach(function(e){var i=e.coordinates;t.beginPath(),t.moveTo(i[0].x,i[0].y);for(var n=1;n=r&&t.x<=r+o&&t.y>=s&&t.y<=s+l)return!0}return!1}function dn(t,e,i){var n,a=[];a=a.concat(e);var r=i.style,o=void 0===r?O.Fill:r,s=i.color,l=void 0===s?"transparent":s,c=i.borderSize,u=void 0===c?1:c,d=i.borderColor,h=void 0===d?"transparent":d,p=i.borderStyle,v=void 0===p?N.Solid:p,f=i.borderRadius,g=void 0===f?0:f,m=i.borderDashedValue,y=void 0===m?[2,2]:m,_=null!==(n=t.roundRect)&&void 0!==n?n:t.rect,b=(o===O.Fill||i.style===O.StrokeFill)&&(!Mt(l)||!nn(l));if(b&&(t.fillStyle=l,a.forEach(function(e){var i=e.x,n=e.y,a=e.width,r=e.height;t.beginPath(),_.call(t,i,n,a,r,g),t.closePath(),t.fill()})),(o===O.Stroke||i.style===O.StrokeFill)&&u>0&&!nn(h)){t.strokeStyle=h,t.fillStyle=h,t.lineWidth=u,v===N.Dashed?t.setLineDash(y):t.setLineDash([]);var x=u%2===1?.5:0,w=Math.round(2*x);a.forEach(function(e){var i=e.x,n=e.y,a=e.width,r=e.height;a>2*u&&r>2*u?(t.beginPath(),_.call(t,i+x,n+x,a-w,r-w,g),t.closePath(),t.stroke()):b||t.fillRect(i,n,a,r)})}}var hn={name:"rect",checkEventOn:un,draw:function(t,e,i){dn(t,e,i)}};function pn(t,e){var i,n,a=e.size,r=void 0===a?12:a,o=e.paddingLeft,s=void 0===o?0:o,l=e.paddingTop,c=void 0===l?0:l,u=e.paddingRight,d=void 0===u?0:u,h=e.paddingBottom,p=void 0===h?0:h,v=e.weight,f=void 0===v?"normal":v,g=e.family,m=t.x,y=t.y,_=t.text,b=t.align,x=void 0===b?"left":b,w=t.baseline,S=void 0===w?"top":w,C=t.width,k=t.height,I=null!==C&&void 0!==C?C:s+$t(_,r,f,g)+d,E=null!==k&&void 0!==k?k:c+r+p;switch(x){case"left":case"start":i=m;break;case"right":case"end":i=m-I;break;default:i=m-I/2;break}switch(S){case"top":case"hanging":n=y;break;case"bottom":case"ideographic":case"alphabetic":n=y-E;break;default:n=y-E/2;break}return{x:i,y:n,width:I,height:E}}function vn(t,e,i){var n=[];n=n.concat(e);for(var a=0;a=o&&t.x<=o+l&&t.y>=s&&t.y<=s+c)return!0}return!1}function fn(t,e,i){var n=[];n=n.concat(e);var a=i.color,r=void 0===a?"currentColor":a,o=i.size,s=void 0===o?12:o,l=i.family,c=i.weight,u=i.paddingLeft,d=void 0===u?0:u,h=i.paddingTop,p=void 0===h?0:h,v=i.paddingRight,f=void 0===v?0:v,g=n.map(function(t){return pn(t,i)});dn(t,g,K(K({},i),{color:i.backgroundColor})),t.textAlign="left",t.textBaseline="top",t.font=Ht(s,c,l),t.fillStyle=r,n.forEach(function(e,i){var n=g[i];t.fillText(e.text,n.x+d,n.y+p,n.width-d-f)})}var gn={name:"text",checkEventOn:vn,draw:function(t,e,i){fn(t,e,i)}},mn=gn;function yn(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}function _n(t,e){var i=[];i=i.concat(e);for(var n=0;n=Math.min(l,u)-pi&&t.y<=Math.max(c,d)+pi&&t.y>=Math.min(c,d)-pi)return!0}}return!1}function bn(t,e,i){var n=[];n=n.concat(e);var a=i.style,r=void 0===a?N.Solid:a,o=i.size,s=void 0===o?1:o,l=i.color,c=void 0===l?"currentColor":l,u=i.dashedValue,d=void 0===u?[2,2]:u;t.lineWidth=s,t.strokeStyle=c,r===N.Dashed?t.setLineDash(d):t.setLineDash([]),n.forEach(function(e){var i=e.x,n=e.y,a=e.r,r=e.startAngle,o=e.endAngle;t.beginPath(),t.arc(i,n,a,r,o),t.stroke(),t.closePath()})}var xn={name:"arc",checkEventOn:_n,draw:function(t,e,i){bn(t,e,i)}},wn={},Sn=[on,xi,cn,hn,gn,mn,xn];function Cn(t){var e;return null!==(e=wn[t])&&void 0!==e?e:null}Sn.forEach(function(t){wn[t.name]=vi.extend(t)});var kn=function(t){function e(e){var i=t.call(this)||this;return i._widget=e,i}return L(e,t),e.prototype.getWidget=function(){return this._widget},e.prototype.createFigure=function(t,e){var i=Cn(t.name);if(null!==i){var n=new i(t);if(At(e)){for(var a in e)e.hasOwnProperty(a)&&n.registerEvent(a,e[a]);this.addChild(n)}return n}return null},e.prototype.draw=function(t){this.clear(),this.drawImp(t)},e}(hi),In=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.drawImp=function(t){var e,i,n=this.getWidget(),a=this.getWidget().getPane(),r=a.getChart(),o=n.getBounding(),s=r.getStyles().grid,l=s.show;if(l){t.save(),t.globalCompositeOperation="destination-over";var c=s.horizontal,u=c.show;if(u){var d=a.getAxisComponent(),h=d.getTicks().map(function(t){return{coordinates:[{x:0,y:t.coord},{x:o.width,y:t.coord}]}});null===(e=this.createFigure({name:"line",attrs:h,styles:c}))||void 0===e||e.draw(t)}var p=s.vertical,v=p.show;if(v){var f=r.getXAxisPane().getAxisComponent();h=f.getTicks().map(function(t){return{coordinates:[{x:t.coord,y:0},{x:t.coord,y:o.height}]}});null===(i=this.createFigure({name:"line",attrs:h,styles:p}))||void 0===i||i.draw(t)}t.restore()}},e}(kn),En=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.eachChildren=function(t){var e=this.getWidget().getPane(),i=e.getChart().getChartStore(),n=i.getVisibleDataList(),a=i.getTimeScaleStore().getBarSpace();n.forEach(function(e,i){t(e,a,i)})},e}(kn),An=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._boundCandleBarClickEvent=function(t){return function(){return e.getWidget().getPane().getChart().getChartStore().getActionStore().execute(Tt.OnCandleBarClick,t),!1}},e}return L(e,t),e.prototype.drawImp=function(t){var e=this,i=this.getWidget().getPane(),n=i.getId()===Wi.CANDLE,a=i.getChart().getChartStore(),r=this.getCandleBarOptions(a);if(null!==r){var o=0,s=0;if(r.type===$.Ohlc){var l=a.getTimeScaleStore().getBarSpace().gapBar;o=Math.min(Math.max(Math.round(.2*l),1),8),o>2&&o%2===1&&o--,s=Math.floor(s/2)}var c=i.getAxisComponent();this.eachChildren(function(i,a){var l=i.data,u=i.x;if(At(l)){var d=l.open,h=l.high,p=l.low,v=l.close,f=r.type,g=r.styles,m=[];v>d?(m[0]=g.upColor,m[1]=g.upBorderColor,m[2]=g.upWickColor):vd?e._createStrokeBar(u,b,a,m):e._createSolidBar(u,b,a,m);break;case $.CandleDownStroke:x=d>v?e._createStrokeBar(u,b,a,m):e._createSolidBar(u,b,a,m);break;case $.Ohlc:x=[{name:"rect",attrs:[{x:u-s,y:b[0],width:o,height:b[3]-b[0]},{x:u-a.halfGapBar,y:y+o>b[3]?b[3]-o:y,width:a.halfGapBar,height:o},{x:u+s,y:_+o>b[3]?b[3]-o:_,width:a.halfGapBar-s,height:o}],styles:{color:m[0]}}];break}x.forEach(function(a){var r,o;n&&(o={mouseClickEvent:e._boundCandleBarClickEvent(i)}),null===(r=e.createFigure(a,o))||void 0===r||r.draw(t)})}})}},e.prototype.getCandleBarOptions=function(t){var e=t.getStyles().candle;return{type:e.type,styles:e.bar}},e.prototype._createSolidBar=function(t,e,i,n){return[{name:"rect",attrs:{x:t,y:e[0],width:1,height:e[3]-e[0]},styles:{color:n[2]}},{name:"rect",attrs:{x:t-i.halfGapBar,y:e[1],width:i.gapBar,height:Math.max(1,e[2]-e[1])},styles:{style:O.StrokeFill,color:n[0],borderColor:n[1]}}]},e.prototype._createStrokeBar=function(t,e,i,n){return[{name:"rect",attrs:[{x:t,y:e[0],width:1,height:e[1]-e[0]},{x:t,y:e[2],width:1,height:e[3]-e[2]}],styles:{color:n[2]}},{name:"rect",attrs:{x:t-i.halfGapBar,y:e[1],width:i.gapBar,height:Math.max(1,e[2]-e[1])},styles:{style:O.Stroke,borderColor:n[1]}}]},e}(En),Pn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.getCandleBarOptions=function(t){var e,i,n=this.getWidget().getPane(),a=n.getAxisComponent();if(!a.isInCandle()){var r=t.getIndicatorStore().getInstances(n.getId());try{for(var o=G(r),s=o.next();!s.done;s=o.next()){var l=s.value;if(l.shouldOhlc&&l.visible){var c=l.styles,u=t.getStyles().indicator,d=Rt(c,"ohlc.upColor",u.ohlc.upColor),h=Rt(c,"ohlc.downColor",u.ohlc.downColor),p=Rt(c,"ohlc.noChangeColor",u.ohlc.noChangeColor);return{type:$.Ohlc,styles:{upColor:d,downColor:h,noChangeColor:p,upBorderColor:d,downBorderColor:h,noChangeBorderColor:p,upWickColor:d,downWickColor:h,noChangeWickColor:p}}}}}catch(v){e={error:v}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(e)throw e.error}}}return null},e.prototype.drawImp=function(e){var i=this;t.prototype.drawImp.call(this,e);var n=this.getWidget(),a=n.getPane(),r=a.getChart(),o=n.getBounding(),s=r.getXAxisPane().getAxisComponent(),l=a.getAxisComponent(),c=r.getChartStore(),u=c.getDataList(),d=c.getTimeScaleStore(),h=d.getVisibleRange(),p=c.getIndicatorStore().getInstances(a.getId()),v=c.getStyles().indicator;e.save(),p.forEach(function(t){var n;if(t.visible){t.zLevel<0?e.globalCompositeOperation="destination-over":e.globalCompositeOperation="source-over";var a=!1;if(null!==t.draw&&(e.save(),a=null!==(n=t.draw({ctx:e,kLineDataList:u,indicator:t,visibleRange:h,bounding:o,barSpace:d.getBarSpace(),defaultStyles:v,xAxis:s,yAxis:l}))&&void 0!==n&&n,e.restore()),!a){var r=t.result,c=[];i.eachChildren(function(n,a){var d,h,p,f=a.halfGapBar,g=n.dataIndex,m=n.x,y=s.convertToPixel(g-1),_=s.convertToPixel(g+1),b=null!==(d=r[g-1])&&void 0!==d?d:null,x=null!==(h=r[g])&&void 0!==h?h:null,w=null!==(p=r[g+1])&&void 0!==p?p:null,S={x:y},C={x:m},k={x:_};t.figures.forEach(function(t){var e=t.key,i=null===b||void 0===b?void 0:b[e];Et(i)&&(S[e]=l.convertToPixel(i));var n=null===x||void 0===x?void 0:x[e];Et(n)&&(C[e]=l.convertToPixel(n));var a=null===w||void 0===w?void 0:w[e];Et(a)&&(k[e]=l.convertToPixel(a))}),jt(u,t,g,v,function(t,n,r){var u,d,h;if(At(null===x||void 0===x?void 0:x[t.key])){var p=C[t.key],v=null===(u=t.attrs)||void 0===u?void 0:u.call(t,{data:{prev:b,current:x,next:w},coordinate:{prev:S,current:C,next:k},bounding:o,barSpace:a,xAxis:s,yAxis:l});if(!At(v))switch(t.type){case"circle":v={x:m,y:p,r:Math.max(1,f)};break;case"rect":case"bar":var g=null!==(d=t.baseValue)&&void 0!==d?d:l.getRange().from,y=l.convertToPixel(g),_=Math.abs(y-p);g!==(null===x||void 0===x?void 0:x[t.key])&&(_=Math.max(1,_));var I=void 0;I=p>y?y:p,v={x:m-f,y:I,width:Math.max(1,2*f),height:_};break;case"line":At(c[r])||(c[r]=[]),Et(C[t.key])&&Et(k[t.key])&&c[r].push({coordinates:[{x:C.x,y:C[t.key]},{x:k.x,y:k[t.key]}],styles:n});break}var E=t.type;At(v)&&"line"!==E&&(null===(h=i.createFigure({name:"bar"===E?"rect":E,attrs:v,styles:n}))||void 0===h||h.draw(e))}})}),c.forEach(function(t){if(t.length>1){for(var n=[{coordinates:[t[0].coordinates[0],t[0].coordinates[1]],styles:t[0].styles}],a=1;a0,C=x.length>0;if(S||C){var k=Z(p.classifyTooltipIcons(w),3),I=k[0],E=k[1],A=k[2];if(g=p.drawStandardTooltipIcons(t,a,I,m,e,r.name,c,g,d),S){var P=_;b.length>0&&(P="".concat(P).concat(b)),g=p.drawStandardTooltipLegends(t,[{title:{text:"",color:f.color},value:{text:P,color:f.color}}],m,c,g,d,f)}g=p.drawStandardTooltipIcons(t,a,E,m,e,r.name,c,g,d),C&&(g=p.drawStandardTooltipLegends(t,x,m,c,g,d,v.text)),g=p.drawStandardTooltipIcons(t,a,A,m,e,r.name,c,g,d),u=m.y+g}})}return u},e.prototype.drawStandardTooltipIcons=function(t,e,i,n,a,r,o,s,l){var c=this;if(i.length>0){var u=0,d=0;i.forEach(function(e){var i=e.marginLeft,n=void 0===i?0:i,a=e.marginTop,r=void 0===a?0:a,o=e.marginRight,s=void 0===o?0:o,l=e.marginBottom,c=void 0===l?0:l,h=e.paddingLeft,p=void 0===h?0:h,v=e.paddingTop,f=void 0===v?0:v,g=e.paddingRight,m=void 0===g?0:g,y=e.paddingBottom,_=void 0===y?0:y,b=e.size,x=e.fontFamily,w=e.icon;t.font=Ht(b,"normal",x),u+=n+p+t.measureText(w).width+m+s,d=Math.max(d,r+f+b+_+c)}),n.x+u>l?(n.x=o,n.y+=s,s=d):s=Math.max(s,d),i.forEach(function(i){var o,s=i.marginLeft,l=void 0===s?0:s,u=i.marginTop,d=void 0===u?0:u,h=i.marginRight,p=void 0===h?0:h,v=i.paddingLeft,f=void 0===v?0:v,g=i.paddingTop,m=void 0===g?0:g,y=i.paddingRight,_=void 0===y?0:y,b=i.paddingBottom,x=void 0===b?0:b,w=i.color,S=i.activeColor,C=i.size,k=i.fontFamily,I=i.icon,E=i.backgroundColor,A=i.activeBackgroundColor,P=(null===e||void 0===e?void 0:e.paneId)===a&&(null===e||void 0===e?void 0:e.indicatorName)===r&&(null===e||void 0===e?void 0:e.iconId)===i.id;null===(o=c.createFigure({name:"text",attrs:{text:I,x:n.x+l,y:n.y+d},styles:{paddingLeft:f,paddingTop:m,paddingRight:_,paddingBottom:x,color:P?S:w,size:C,family:k,backgroundColor:P?A:E}},{mouseClickEvent:c._boundIconClickEvent({paneId:a,indicatorName:r,iconId:i.id}),mouseMoveEvent:c._boundIconMouseMoveEvent({paneId:a,indicatorName:r,iconId:i.id})}))||void 0===o||o.draw(t),n.x+=l+f+t.measureText(I).width+_+p})}return s},e.prototype.drawStandardTooltipLegends=function(t,e,i,n,a,r,o){var s=this;if(e.length>0){var l=o.marginLeft,c=o.marginTop,u=o.marginRight,d=o.marginBottom,h=o.size,p=o.family,v=o.weight;t.font=Ht(h,v,p),e.forEach(function(e){var o,f,g=e.title,m=e.value,y=t.measureText(g.text).width,_=t.measureText(m.text).width,b=y+_,x=c+h+d;i.x+l+b+u>r?(i.x=n,i.y+=a,a=x):a=Math.max(a,x),g.text.length>0&&(null===(o=s.createFigure({name:"text",attrs:{x:i.x+l,y:i.y+c,text:g.text},styles:{color:g.color,size:h,family:p,weight:v}}))||void 0===o||o.draw(t)),null===(f=s.createFigure({name:"text",attrs:{x:i.x+l+y,y:i.y+c,text:m.text},styles:{color:m.color,size:h,family:p,weight:v}}))||void 0===f||f.draw(t),i.x+=l+b+u})}return a},e.prototype.isDrawTooltip=function(t,e){var i=e.showRule;return i===z.Always||i===z.FollowCross&&Mt(t.paneId)},e.prototype.getIndicatorTooltipData=function(t,e,i,n,a,r,o){var s,l,c=o.tooltip,u=c.showName?i.shortName:"",d="",h=i.calcParams;h.length>0&&c.showParams&&(d="(".concat(h.join(","),")"));var p={name:u,calcParamsText:d,values:[],icons:c.icons},v=e.dataIndex,f=null!==(s=i.result)&&void 0!==s?s:[],g=[];if(i.visible){var m=null!==(l=f[v])&&void 0!==l?l:{};jt(t,i,v,o,function(t,e){var o;if(Mt(t.title)){var s=e.color,l=null!==(o=m[t.key])&&void 0!==o?o:c.defaultValue;Et(l)&&(l=Nt(l,i.precision),i.shouldFormatBigNumber&&(l=n.formatBigNumber(l)),l=Vt(zt(l,a),r)),g.push({title:{text:t.title,color:s},value:{text:l,color:s}})}}),p.values=g}if(null!==i.createTooltipDataSource){var y=this.getWidget(),_=y.getPane(),b=_.getChart().getChartStore(),x=i.createTooltipDataSource({kLineDataList:t,indicator:i,visibleRange:b.getTimeScaleStore().getVisibleRange(),bounding:y.getBounding(),crosshair:e,defaultStyles:o,xAxis:_.getChart().getXAxisPane().getAxisComponent(),yAxis:_.getAxisComponent()}),w=x.name,S=x.calcParamsText,C=x.values,k=x.icons;if(Mt(w)&&c.showName&&(p.name=w),Mt(S)&&c.showParams&&(p.calcParamsText=S),At(k)&&(p.icons=k),At(C)&&i.visible){var I=[],E=o.tooltip.text.color;C.forEach(function(t){var e,o={text:"",color:E};It(t.title)?o=t.title:o.text=t.title;var s={text:"",color:E};if(It(t.value)?s=t.value:s.text=null!==(e=t.value)&&void 0!==e?e:c.defaultValue,Et(s.text)){var l=Nt(s.text,i.precision);i.shouldFormatBigNumber&&(l=n.formatBigNumber(l)),l=Vt(zt(l,a),r),s.text=l}I.push({title:o,value:s})}),p.values=I}}return p},e.prototype.classifyTooltipIcons=function(t){var e=[],i=[],n=[];return t.forEach(function(t){switch(t.position){case W.Left:e.push(t);break;case W.Middle:i.push(t);break;case W.Right:n.push(t);break}}),[e,i,n]},e}(kn),Tn=function(t){function e(e){var i=t.call(this,e)||this;return i._initEvent(),i}return L(e,t),e.prototype._initEvent=function(){var t=this,e=this.getWidget().getPane(),i=e.getId(),n=e.getChart().getChartStore().getOverlayStore();this.registerEvent("mouseMoveEvent",function(e){var a,r=n.getProgressInstanceInfo();if(null!==r){var o=r.instance,s=r.paneId;o.isStart()&&(n.updateProgressInstanceInfo(i),s=i);var l=o.points.length-1,c="".concat(ee,"point_").concat(l);return o.isDrawing()&&s===i&&(o.eventMoveForDrawing(t._coordinateToPoint(r.instance,e)),null===(a=o.onDrawing)||void 0===a||a.call(o,K({overlay:o,figureKey:c,figureIndex:l},e))),t._figureMouseMoveEvent(o,1,c,l,0)(e)}return n.setHoverInstanceInfo({paneId:i,instance:null,figureType:0,figureKey:"",figureIndex:-1,attrsIndex:-1},e),!1}).registerEvent("mouseClickEvent",function(e){var a,r,o=n.getProgressInstanceInfo();if(null!==o){var s=o.instance,l=o.paneId;s.isStart()&&(n.updateProgressInstanceInfo(i,!0),l=i);var c=s.points.length-1,u="".concat(ee,"point_").concat(c);return s.isDrawing()&&l===i&&(s.eventMoveForDrawing(t._coordinateToPoint(s,e)),null===(a=s.onDrawing)||void 0===a||a.call(s,K({overlay:s,figureKey:u,figureIndex:c},e)),s.nextStep(),s.isDrawing()||(n.progressInstanceComplete(),null===(r=s.onDrawEnd)||void 0===r||r.call(s,K({overlay:s,figureKey:u,figureIndex:c},e)))),t._figureMouseClickEvent(s,1,u,c,0)(e)}return n.setClickInstanceInfo({paneId:i,instance:null,figureType:0,figureKey:"",figureIndex:-1,attrsIndex:-1},e),!1}).registerEvent("mouseDoubleClickEvent",function(e){var a,r=n.getProgressInstanceInfo();if(null!==r){var o=r.instance,s=r.paneId;if(o.isDrawing()&&s===i&&(o.forceComplete(),!o.isDrawing())){n.progressInstanceComplete();var l=o.points.length-1,c="".concat(ee,"point_").concat(l);null===(a=o.onDrawEnd)||void 0===a||a.call(o,K({overlay:o,figureKey:c,figureIndex:l},e))}var u=o.points.length-1;return t._figureMouseClickEvent(o,1,"".concat(ee,"point_").concat(u),u,0)(e)}return!1}).registerEvent("mouseRightClickEvent",function(e){var i=n.getProgressInstanceInfo();if(null!==i){var a=i.instance;if(a.isDrawing()){var r=a.points.length-1;return t._figureMouseRightClickEvent(a,1,"".concat(ee,"point_").concat(r),r,0)(e)}}return!1}).registerEvent("mouseUpEvent",function(t){var e,a=n.getPressedInstanceInfo(),r=a.instance,o=a.figureIndex,s=a.figureKey;return null!==r&&(null===(e=r.onPressedMoveEnd)||void 0===e||e.call(r,K({overlay:r,figureKey:s,figureIndex:o},t))),n.setPressedInstanceInfo({paneId:i,instance:null,figureType:0,figureKey:"",figureIndex:-1,attrsIndex:-1}),!1}).registerEvent("pressedMouseMoveEvent",function(e){var i,a,r=n.getPressedInstanceInfo(),o=r.instance,s=r.figureType,l=r.figureIndex,c=r.figureKey;if(null!==o){if(!o.lock&&(null===(a=null===(i=o.onPressedMoving)||void 0===i?void 0:i.call(o,K({overlay:o,figureIndex:l,figureKey:c},e)))||void 0===a||!a)){var u=t._coordinateToPoint(o,e);1===s?o.eventPressedPointMove(u,l):o.eventPressedOtherMove(u,t.getWidget().getPane().getChart().getChartStore().getTimeScaleStore())}return!0}return!1})},e.prototype._createFigureEvents=function(t,e,i,n,a,r){var o;if(!t.isDrawing()){var s=[];if(At(r)&&(Pt(r)?r&&(s=Zt()):s=r),0===s.length)return{mouseMoveEvent:this._figureMouseMoveEvent(t,e,i,n,a),mouseDownEvent:this._figureMouseDownEvent(t,e,i,n,a),mouseClickEvent:this._figureMouseClickEvent(t,e,i,n,a),mouseRightClickEvent:this._figureMouseRightClickEvent(t,e,i,n,a),mouseDoubleClickEvent:this._figureMouseDoubleClickEvent(t,e,i,n,a)};o={},s.includes("mouseMoveEvent")||s.includes("touchMoveEvent")||(o.mouseMoveEvent=this._figureMouseMoveEvent(t,e,i,n,a)),s.includes("mouseDownEvent")||s.includes("touchStartEvent")||(o.mouseDownEvent=this._figureMouseDownEvent(t,e,i,n,a)),s.includes("mouseClickEvent")||s.includes("tapEvent")||(o.mouseClickEvent=this._figureMouseClickEvent(t,e,i,n,a)),s.includes("mouseDoubleClickEvent")||s.includes("doubleTapEvent")||(o.mouseDoubleClickEvent=this._figureMouseDoubleClickEvent(t,e,i,n,a)),s.includes("mouseRightClickEvent")||(o.mouseRightClickEvent=this._figureMouseRightClickEvent(t,e,i,n,a))}return o},e.prototype._figureMouseMoveEvent=function(t,e,i,n,a){var r=this;return function(o){var s=r.getWidget().getPane(),l=s.getChart().getChartStore().getOverlayStore();return l.setHoverInstanceInfo({paneId:s.getId(),instance:t,figureType:e,figureKey:i,figureIndex:n,attrsIndex:a},o),!0}},e.prototype._figureMouseDownEvent=function(t,e,i,n,a){var r=this;return function(o){var s,l=r.getWidget().getPane(),c=l.getId(),u=l.getChart().getChartStore().getOverlayStore();return t.startPressedMove(r._coordinateToPoint(t,o)),null===(s=t.onPressedMoveStart)||void 0===s||s.call(t,K({overlay:t,figureIndex:n,figureKey:i},o)),u.setPressedInstanceInfo({paneId:c,instance:t,figureType:e,figureKey:i,figureIndex:n,attrsIndex:a}),!0}},e.prototype._figureMouseClickEvent=function(t,e,i,n,a){var r=this;return function(o){var s=r.getWidget().getPane(),l=s.getId(),c=s.getChart().getChartStore().getOverlayStore();return c.setClickInstanceInfo({paneId:l,instance:t,figureType:e,figureKey:i,figureIndex:n,attrsIndex:a},o),!0}},e.prototype._figureMouseDoubleClickEvent=function(t,e,i,n,a){return function(e){var a;return null===(a=t.onDoubleClick)||void 0===a||a.call(t,K(K({},e),{figureIndex:n,figureKey:i,overlay:t})),!0}},e.prototype._figureMouseRightClickEvent=function(t,e,i,n,a){var r=this;return function(e){var a,o;if(null===(o=null===(a=t.onRightClick)||void 0===a?void 0:a.call(t,K({overlay:t,figureIndex:n,figureKey:i},e)))||void 0===o||!o){var s=r.getWidget().getPane(),l=s.getChart().getChartStore().getOverlayStore();l.removeInstance(t)}return!0}},e.prototype._coordinateToPoint=function(t,e){var i,n={},a=this.getWidget().getPane(),r=a.getChart(),o=a.getId(),s=r.getChartStore().getTimeScaleStore();if(this.coordinateToPointTimestampDataIndexFlag()){var l=r.getXAxisPane().getAxisComponent(),c=l.convertFromPixel(e.x),u=null!==(i=s.dataIndexToTimestamp(c))&&void 0!==i?i:void 0;n.dataIndex=c,n.timestamp=u}if(this.coordinateToPointValueFlag()){var d=a.getAxisComponent(),h=d.convertFromPixel(e.y);if(t.mode!==Ut.Normal&&o===Wi.CANDLE&&Et(n.dataIndex)){var p=s.getDataByDataIndex(n.dataIndex);if(null!==p){var v=t.modeSensitivity;if(h>p.high)if(t.mode===Ut.WeakMagnet){var f=d.convertToPixel(p.high),g=d.convertFromPixel(f-v);hg&&(h=p.low)}else h=p.low;else{var y=Math.max(p.open,p.close),_=Math.min(p.open,p.close);h=h>y?h-y0){var m=(new Array).concat(this.getFigures(e,g,i,n,a,s,l,r,c,u,d));this.drawFigures(t,e,m,c)}this.drawDefaultFigures(t,e,g,i,a,r,o,s,l,c,u,d,h,p)},e.prototype.drawFigures=function(t,e,i,n){var a=this;i.forEach(function(i,r){var o=i.type,s=i.styles,l=i.attrs,c=i.ignoreEvent,u=[].concat(l);u.forEach(function(l,u){var d,h,p,v=a._createFigureEvents(e,2,null!==(d=i.key)&&void 0!==d?d:"",r,u,c),f=K(K(K({},n[o]),null===(h=e.styles)||void 0===h?void 0:h[o]),s);null===(p=a.createFigure({name:o,attrs:l,styles:f},v))||void 0===p||p.draw(t)})})},e.prototype.getCompleteOverlays=function(t,e){return t.getInstances(e)},e.prototype.getProgressOverlay=function(t,e){return t.paneId===e?t.instance:null},e.prototype.getFigures=function(t,e,i,n,a,r,o,s,l,c,u){var d,h;return null!==(h=null===(d=t.createPointFigures)||void 0===d?void 0:d.call(t,{overlay:t,coordinates:e,bounding:i,barSpace:n,precision:a,thousandsSeparator:r,decimalFoldThreshold:o,dateTimeFormat:s,defaultStyles:l,xAxis:c,yAxis:u}))&&void 0!==h?h:[]},e.prototype.drawDefaultFigures=function(t,e,i,n,a,r,o,s,l,c,u,d,h,p){var v,f,g=this;if(e.needDefaultPointFigure&&((null===(v=h.instance)||void 0===v?void 0:v.id)===e.id&&0!==h.figureType||(null===(f=p.instance)||void 0===f?void 0:f.id)===e.id&&0!==p.figureType)){var m=e.styles,y=K(K({},c.point),null===m||void 0===m?void 0:m.point);i.forEach(function(i,n){var a,r,o,s=i.x,l=i.y,c=y.radius,u=y.color,d=y.borderColor,p=y.borderSize;(null===(a=h.instance)||void 0===a?void 0:a.id)===e.id&&1===h.figureType&&h.figureIndex===n&&(c=y.activeRadius,u=y.activeColor,d=y.activeBorderColor,p=y.activeBorderSize),null===(r=g.createFigure({name:"circle",attrs:{x:s,y:l,r:c+p},styles:{color:d}},g._createFigureEvents(e,1,"".concat(ee,"point_").concat(n),n,0)))||void 0===r||r.draw(t),null===(o=g.createFigure({name:"circle",attrs:{x:s,y:l,r:c},styles:{color:u}}))||void 0===o||o.draw(t)})}},e}(kn),Bn=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._gridView=new In(n),n._indicatorView=new Pn(n),n._crosshairLineView=new Mn(n),n._tooltipView=n.createTooltipView(),n._overlayView=new Tn(n),n.addChild(n._tooltipView),n.addChild(n._overlayView),n.getContainer().style.cursor="crosshair",n.registerEvent("mouseMoveEvent",function(){return i.getChart().getChartStore().getTooltipStore().setActiveIcon(),!1}),n}return L(e,t),e.prototype.getName=function(){return Gi.MAIN},e.prototype.updateMain=function(t){this.updateMainContent(t),this._indicatorView.draw(t),this._gridView.draw(t)},e.prototype.createTooltipView=function(){return new Dn(this)},e.prototype.updateMainContent=function(t){},e.prototype.updateOverlay=function(t){this._overlayView.draw(t),this._crosshairLineView.draw(t),this._tooltipView.draw(t)},e}(en),Fn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._ripplePoint=e.createFigure({name:"circle",attrs:{x:0,y:0,r:0},styles:{style:"fill"}}),e._animationFrameTime=0,e._animation=new le({iterationCount:1/0}).doFrame(function(t){e._animationFrameTime=t;var i=e.getWidget().getPane();i.getChart().updatePane(0,i.getId())}),e}return L(e,t),e.prototype.drawImp=function(t){var e,i,n,a=this.getWidget(),r=a.getPane(),o=r.getChart(),s=o.getDataList(),l=s.length-1,c=a.getBounding(),u=r.getAxisComponent(),d=o.getStyles().candle.area,h=[],p=Number.MAX_SAFE_INTEGER,v=Number.MIN_SAFE_INTEGER,f=null;if(this.eachChildren(function(t){var e=t.data,i=t.x,n=null===e||void 0===e?void 0:e[d.value];if(Et(n)){var a=u.convertToPixel(n);v===Number.MIN_SAFE_INTEGER&&(v=i),h.push({x:i,y:a}),p=Math.min(p,a),t.dataIndex===l&&(f={x:i,y:a})}}),h.length>0){null===(e=this.createFigure({name:"line",attrs:{coordinates:h},styles:{color:d.lineColor,size:d.lineSize,smooth:d.smooth}}))||void 0===e||e.draw(t);var g=d.backgroundColor,m=void 0;if(Ct(g)){var y=t.createLinearGradient(0,c.height,0,p);try{g.forEach(function(t){var e=t.offset,i=t.color;y.addColorStop(e,i)})}catch(x){}m=y}else m=g;t.fillStyle=m,t.beginPath(),t.moveTo(v,c.height),t.lineTo(h[0].x,h[0].y),_i(t,h,d.smooth),t.lineTo(h[h.length-1].x,c.height),t.closePath(),t.fill()}var _=d.point;if(_.show&&At(f)){null===(i=this.createFigure({name:"circle",attrs:{x:f.x,y:f.y,r:_.radius},styles:{style:"fill",color:_.color}}))||void 0===i||i.draw(t);var b=_.rippleRadius;_.animation&&(b=_.radius+this._animationFrameTime/_.animationDuration*(_.rippleRadius-_.radius),this._animation.setDuration(_.animationDuration).start()),null===(n=this._ripplePoint)||void 0===n||n.setAttrs({x:f.x,y:f.y,r:b}).setStyles({style:"fill",color:_.rippleColor}).draw(t)}else this.stopAnimation()},e.prototype.stopAnimation=function(){this._animation.stop()},e}(En),Rn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.drawImp=function(t){var e=this.getWidget(),i=e.getPane(),n=i.getChart().getChartStore(),a=n.getStyles().candle.priceMark,r=a.high,o=a.low;if(a.show&&(r.show||o.show)){var s=n.getThousandsSeparator(),l=n.getDecimalFoldThreshold(),c=n.getPrecision(),u=i.getAxisComponent(),d=Number.MIN_SAFE_INTEGER,h=0,p=Number.MAX_SAFE_INTEGER,v=0;this.eachChildren(function(t){var e=t.data,i=t.x;At(e)&&(de.low&&(p=e.low,v=i))});var f=u.convertToPixel(d),g=u.convertToPixel(p);r.show&&d!==Number.MIN_SAFE_INTEGER&&this._drawMark(t,Vt(zt(Nt(d,c.price),s),l),{x:h,y:f},fp/2?(l=d-5,c=l-a.textOffset,u="right"):(l=d+5,u="left",c=l+a.textOffset);var v=h+n[1];null===(o=this.createFigure({name:"line",attrs:{coordinates:[{x:d,y:h},{x:d,y:v},{x:l,y:v}]},styles:{color:a.color}}))||void 0===o||o.draw(t),null===(s=this.createFigure({name:"text",attrs:{x:c,y:v,text:e,align:u,baseline:"middle"},styles:{color:a.color,size:a.textSize,family:a.textFamily,weight:a.textWeight}}))||void 0===s||s.draw(t)},e}(En),Ln=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.drawImp=function(t){var e,i=this.getWidget(),n=i.getPane(),a=i.getBounding(),r=n.getChart().getChartStore(),o=r.getStyles().candle.priceMark,s=o.last,l=s.line;if(o.show&&s.show&&l.show){var c=n.getAxisComponent(),u=r.getDataList(),d=u[u.length-1];if(null!=d){var h=d.close,p=d.open,v=c.convertToNicePixel(h),f=void 0;f=h>p?s.upColor:h0&&(b=this.drawStandardTooltipLegends(t,S,x,d,b,p,_)),b=this.drawStandardTooltipIcons(t,a,E,x,i,"",d,b,p)}return x.y+b},e.prototype._drawRectTooltip=function(t,e,i,n,a,r,o,s,l,c,u,d,h,p,v,f){var g,m,y,_,b,x=this,w=f.candle,S=f.indicator,C=w.tooltip,k=S.tooltip;if(h||p){var I=null!==(g=r.dataIndex)&&void 0!==g?g:0,E=this._getCandleTooltipLegends({prev:null!==(m=e[I-1])&&void 0!==m?m:null,current:r.kLineData,next:null!==(y=e[I+1])&&void 0!==y?y:null},o,s,l,c,u,d,w),A=C.offsetLeft,P=C.offsetTop,M=C.offsetRight,D=C.offsetBottom,T=C.text,B=T.marginLeft,F=T.marginRight,R=T.marginTop,L=T.marginBottom,N=T.size,z=T.weight,V=T.family,W=C.rect,$=W.position,X=W.paddingLeft,K=W.paddingRight,j=W.paddingTop,U=W.paddingBottom,G=W.offsetLeft,Z=W.offsetRight,q=W.offsetTop,J=W.offsetBottom,Q=W.borderSize,tt=W.borderRadius,et=W.borderColor,it=W.color,nt=0,at=0,rt=0;h&&(t.font=Ht(N,z,V),E.forEach(function(e){var i=e.title,n=e.value,a="".concat(i.text).concat(n.text),r=t.measureText(a).width+B+F;nt=Math.max(nt,r)}),rt+=(L+R+N)*E.length);var ot=k.text,st=ot.marginLeft,lt=ot.marginRight,ct=ot.marginTop,ut=ot.marginBottom,dt=ot.size,ht=ot.weight,pt=ot.family,vt=[];if(p&&(t.font=Ht(dt,ht,pt),i.forEach(function(i){var n,a=null!==(n=x.getIndicatorTooltipData(e,r,i,c,u,d,S).values)&&void 0!==n?n:[];vt.push(a),a.forEach(function(e){var i=e.title,n=e.value,a="".concat(i.text).concat(n.text),r=t.measureText(a).width+st+lt;nt=Math.max(nt,r),rt+=ct+ut+dt})})),at+=nt,0!==at&&0!==rt){at+=2*Q+X+K,rt+=2*Q+j+U;var ft=n.width/2,gt=$===H.Pointer&&r.paneId===Wi.CANDLE,mt=(null!==(_=r.realX)&&void 0!==_?_:0)>ft,yt=0;if(gt){var _t=r.realX;yt=mt?_t-Z-at:_t+G}else mt?(yt=G+A,f.yAxis.inside&&f.yAxis.position===Y.Left&&(yt+=a.width)):(yt=n.width-Z-at-M,f.yAxis.inside&&f.yAxis.position===Y.Right&&(yt-=a.width));var bt=v+q;if(gt){var xt=r.y;bt=xt-rt/2,bt+rt>n.height-J-D&&(bt=n.height-J-rt-D),bt1){var c="{".concat(l[1],"}");o.text=o.text.replace(c,null!==(e=b[c])&&void 0!==e?e:p.defaultValue),"{change}"===c&&(o.color=0===m?s.priceMark.last.noChangeColor:m>0?s.priceMark.last.upColor:s.priceMark.last.downColor)}return{title:r,value:o}})},e}(Dn),Hn=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._candleBarView=new An(n),n._candleAreaView=new Fn(n),n._candleHighLowPriceView=new Rn(n),n._candleLastPriceLineView=new Ln(n),n.addChild(n._candleBarView),n}return L(e,t),e.prototype.updateMainContent=function(t){var e=this.getPane().getChart().getStyles().candle;e.type!==$.Area?(this._candleBarView.draw(t),this._candleHighLowPriceView.draw(t),this._candleAreaView.stopAnimation()):this._candleAreaView.draw(t),this._candleLastPriceLineView.draw(t)},e.prototype.createTooltipView=function(){return new Wn(this)},e}(Bn),$n=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.drawImp=function(t){var e,i,n=this,a=this.getWidget(),r=a.getPane(),o=a.getBounding(),s=r.getAxisComponent(),l=this.getAxisStyles(r.getChart().getStyles());if(l.show){l.axisLine.show&&(null===(e=this.createFigure({name:"line",attrs:this.createAxisLine(o,l),styles:l.axisLine}))||void 0===e||e.draw(t));var c=s.getTicks();if(l.tickLine.show){var u=this.createTickLines(c,o,l);u.forEach(function(e){var i;null===(i=n.createFigure({name:"line",attrs:e,styles:l.tickLine}))||void 0===i||i.draw(t)})}if(l.tickText.show){var d=this.createTickTexts(c,o,l);null===(i=this.createFigure({name:"text",attrs:d,styles:l.tickText}))||void 0===i||i.draw(t)}}},e}(kn),Yn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.getAxisStyles=function(t){return t.yAxis},e.prototype.createAxisLine=function(t,e){var i,n=this.getWidget().getPane().getAxisComponent(),a=e.axisLine.size;return i=n.isFromZero()?0:t.width-a,{coordinates:[{x:i,y:0},{x:i,y:t.height}]}},e.prototype.createTickLines=function(t,e,i){var n=this.getWidget().getPane().getAxisComponent(),a=i.axisLine,r=i.tickLine,o=0,s=0;return n.isFromZero()?(o=0,a.show&&(o+=a.size),s=o+r.length):(o=e.width,a.show&&(o-=a.size),s=o-r.length),t.map(function(t){return{coordinates:[{x:o,y:t.coord},{x:s,y:t.coord}]}})},e.prototype.createTickTexts=function(t,e,i){var n=this.getWidget().getPane().getAxisComponent(),a=i.axisLine,r=i.tickLine,o=i.tickText,s=0;n.isFromZero()?(s=o.marginStart,a.show&&(s+=a.size),r.show&&(s+=r.length)):(s=e.width-o.marginEnd,a.show&&(s-=a.size),r.show&&(s-=r.length));var l=this.getWidget().getPane().getAxisComponent().isFromZero()?"left":"right";return t.map(function(t){return{x:s,y:t.coord,text:t.text,align:l,baseline:"middle"}})},e}($n),Xn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.drawImp=function(t){var e,i=this.getWidget(),n=i.getPane(),a=i.getBounding(),r=n.getChart().getChartStore(),o=r.getStyles().candle.priceMark,s=o.last,l=s.text;if(o.show&&s.show&&l.show){var c=r.getPrecision(),u=n.getAxisComponent(),d=r.getDataList(),h=d[d.length-1];if(At(h)){var p=h.close,v=h.open,f=u.convertToNicePixel(p),g=void 0;g=p>v?s.upColor:p1&&p.unshift({type:"rect",attrs:{x:0,y:g,width:i.width,height:m-g},ignoreEvent:!0})}return p},e.prototype.getFigures=function(t,e,i,n,a,r,o,s,l,c,u){var d,h;return null!==(h=null===(d=t.createYAxisFigures)||void 0===d?void 0:d.call(t,{overlay:t,coordinates:e,bounding:i,barSpace:n,precision:a,thousandsSeparator:r,decimalFoldThreshold:o,dateTimeFormat:s,defaultStyles:l,xAxis:c,yAxis:u}))&&void 0!==h?h:[]},e}(Tn),Un=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.drawImp=function(t){var e,i=this.getWidget(),n=i.getPane(),a=i.getBounding(),r=i.getPane().getChart().getChartStore(),o=r.getTooltipStore().getCrosshair(),s=r.getStyles().crosshair;if(Mt(o.paneId)&&this.compare(o,n.getId())&&s.show){var l=this.getDirectionStyles(s),c=l.text;if(l.show&&c.show){var u=n.getAxisComponent(),d=this.getText(o,r,u);t.font=Ht(c.size,c.weight,c.family),null===(e=this.createFigure({name:"text",attrs:this.getTextAttrs(d,t.measureText(d).width,o,a,u,c),styles:c}))||void 0===e||e.draw(t)}}},e.prototype.compare=function(t,e){return t.paneId===e},e.prototype.getDirectionStyles=function(t){return t.horizontal},e.prototype.getText=function(t,e,i){var n,a=i,r=i.convertFromPixel(t.y);if(a.getType()===X.Percentage){var o=e.getVisibleFirstData();n="".concat(((r-o.close)/o.close*100).toFixed(2),"%")}else{var s=e.getIndicatorStore().getInstances(t.paneId),l=0,c=!1;a.isInCandle()?l=e.getPrecision().price:s.forEach(function(t){l=Math.max(t.precision,l),c||(c=t.shouldFormatBigNumber)}),n=Nt(r,l),c&&(n=e.getCustomApi().formatBigNumber(n))}return Vt(zt(n,e.getThousandsSeparator()),e.getDecimalFoldThreshold())},e.prototype.getTextAttrs=function(t,e,i,n,a,r){var o,s,l=a;return l.isFromZero()?(o=0,s="left"):(o=n.width,s="right"),{x:o,y:i.y,text:t,align:s,baseline:"middle"}},e}(kn),Gn=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._yAxisView=new Yn(n),n._candleLastPriceLabelView=new Xn(n),n._indicatorLastValueView=new Kn(n),n._overlayYAxisView=new jn(n),n._crosshairHorizontalLabelView=new Un(n),n.getContainer().style.cursor="ns-resize",n.addChild(n._overlayYAxisView),n}return L(e,t),e.prototype.getName=function(){return Gi.Y_AXIS},e.prototype.updateMain=function(t){this._yAxisView.draw(t),this.getPane().getAxisComponent().isInCandle()&&this._candleLastPriceLabelView.draw(t),this._indicatorLastValueView.draw(t)},e.prototype.updateOverlay=function(t){this._overlayYAxisView.draw(t),this._crosshairHorizontalLabelView.draw(t)},e}(en),Zn=function(){function t(t){this._range={from:0,to:0,range:0,realFrom:0,realTo:0,realRange:0},this._prevRange={from:0,to:0,range:0,realFrom:0,realTo:0,realRange:0},this._ticks=[],this._autoCalcTickFlag=!0,this._parent=t}return t.prototype.getParent=function(){return this._parent},t.prototype.buildTicks=function(t){if(this._autoCalcTickFlag&&(this._range=this.calcRange()),this._prevRange.from!==this._range.from||this._prevRange.to!==this._range.to||t){this._prevRange=this._range;var e=this.optimalTicks(this._calcTicks());return this._ticks=this.createTicks({range:this._range,bounding:this.getSelfBounding(),defaultTicks:e}),!0}return!1},t.prototype.getTicks=function(){return this._ticks},t.prototype.getScrollZoomEnabled=function(){var t;return null===(t=this.getParent().getOptions().axisOptions.scrollZoomEnabled)||void 0===t||t},t.prototype.setRange=function(t){this._autoCalcTickFlag=!1,this._range=t},t.prototype.getRange=function(){return this._range},t.prototype.setAutoCalcTickFlag=function(t){this._autoCalcTickFlag=t},t.prototype.getAutoCalcTickFlag=function(){return this._autoCalcTickFlag},t.prototype._calcTicks=function(){var t=this._range,e=t.realFrom,i=t.realTo,n=t.realRange,a=[];if(n>=0){var r=Z(this._calcTickInterval(n),2),o=r[0],s=r[1],l=fe(Math.ceil(e/o)*o,s),c=fe(Math.floor(i/o)*o,s),u=0,d=l;if(0!==o)while(d<=c){var h=d.toFixed(s);a[u]={text:h,coord:0,value:h},++u,d+=o}}return a},t.prototype._calcTickInterval=function(t){var e=ve(t/8),i=ge(e);return[e,i]},t}(),qn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.calcRange=function(){var t,e,i,n,a=this.getParent(),r=a.getChart(),o=r.getChartStore(),s=Number.MAX_SAFE_INTEGER,l=Number.MIN_SAFE_INTEGER,c=[],u=!1,d=Number.MAX_SAFE_INTEGER,h=Number.MIN_SAFE_INTEGER,p=Number.MAX_SAFE_INTEGER,v=o.getIndicatorStore().getInstances(a.getId());v.forEach(function(t){var e,i,n;u||(u=null!==(e=t.shouldOhlc)&&void 0!==e&&e),p=Math.min(p,t.precision),Et(t.minValue)&&(d=Math.min(d,t.minValue)),Et(t.maxValue)&&(h=Math.max(h,t.maxValue)),c.push({figures:null!==(i=t.figures)&&void 0!==i?i:[],result:null!==(n=t.result)&&void 0!==n?n:[]})});var f=4,g=this.isInCandle();if(g){var m=o.getPrecision().price;f=p!==Number.MAX_SAFE_INTEGER?Math.min(p,m):m}else p!==Number.MAX_SAFE_INTEGER&&(f=p);var y=o.getVisibleDataList(),_=r.getStyles().candle,b=_.type===$.Area,x=_.area.value,w=g&&!b||!g&&u;y.forEach(function(t){var e=t.dataIndex,i=t.data;if(At(i)&&(w&&(s=Math.min(s,i.low),l=Math.max(l,i.high)),g&&b)){var n=i[x];Et(n)&&(s=Math.min(s,n),l=Math.max(l,n))}c.forEach(function(t){var i,n=t.figures,a=t.result,r=null!==(i=a[e])&&void 0!==i?i:{};n.forEach(function(t){var e=r[t.key];Et(e)&&(s=Math.min(s,e),l=Math.max(l,e))})})}),s!==Number.MAX_SAFE_INTEGER&&l!==Number.MIN_SAFE_INTEGER?(s=Math.min(d,s),l=Math.max(h,l)):(s=0,l=10);var S,C=this.getType();switch(C){case X.Percentage:var k=o.getVisibleFirstData();At(k)&&Et(k.close)&&(s=(s-k.close)/k.close*100,l=(l-k.close)/k.close*100),S=Math.pow(10,-2);break;case X.Log:s=ye(s),l=ye(l),S=.05*_e(-f);break;default:S=_e(-f)}if(s===l||Math.abs(s-l)=1&&(M/=A);var D=null!==(n=null===P||void 0===P?void 0:P.bottom)&&void 0!==n?n:.1;D>=1&&(D/=A);var T,B,F,R=Math.abs(l-s);return s-=R*D,l+=R*M,R=Math.abs(l-s),C===X.Log?(T=_e(s),B=_e(l),F=Math.abs(B-T)):(T=s,B=l,F=R),{from:s,to:l,range:R,realFrom:T,realTo:B,realRange:F}},e.prototype._innerConvertToPixel=function(t){var e,i,n=null!==(i=null===(e=this.getParent().getYAxisWidget())||void 0===e?void 0:e.getBounding().height)&&void 0!==i?i:0,a=this.getRange(),r=a.from,o=a.range,s=(t-r)/o;return this.isReverse()?Math.round(s*n):Math.round((1-s)*n)},e.prototype.isInCandle=function(){return this.getParent().getId()===Wi.CANDLE},e.prototype.getType=function(){return this.isInCandle()?this.getParent().getChart().getStyles().yAxis.type:X.Normal},e.prototype.getPosition=function(){return this.getParent().getChart().getStyles().yAxis.position},e.prototype.isReverse=function(){return!!this.isInCandle()&&this.getParent().getChart().getStyles().yAxis.reverse},e.prototype.isFromZero=function(){var t=this.getParent().getChart().getStyles().yAxis,e=t.inside;return t.position===Y.Left&&e||t.position===Y.Right&&!e},e.prototype.optimalTicks=function(t){var e,i,n=this,a=this.getParent(),r=null!==(i=null===(e=a.getYAxisWidget())||void 0===e?void 0:e.getBounding().height)&&void 0!==i?i:0,o=a.getChart().getChartStore(),s=o.getCustomApi(),l=[],c=this.getType(),u=o.getIndicatorStore().getInstances(a.getId()),d=o.getThousandsSeparator(),h=o.getDecimalFoldThreshold(),p=0,v=!1;this.isInCandle()?p=o.getPrecision().price:u.forEach(function(t){p=Math.max(p,t.precision),v||(v=t.shouldFormatBigNumber)});var f,g=o.getStyles().xAxis.tickText.size;return t.forEach(function(t){var e,i=t.value,a=n._innerConvertToPixel(+i);switch(c){case X.Percentage:e="".concat(Nt(i,2),"%");break;case X.Log:a=n._innerConvertToPixel(ye(+i)),e=Nt(i,p);break;default:e=Nt(i,p),v&&(e=s.formatBigNumber(i));break}e=Vt(zt(e,d),h);var o=Et(f);a>g&&a2*g||!o)&&(l.push({text:e,coord:a,value:i}),f=a)}),l},e.prototype.getAutoSize=function(){var t=this.getParent(),e=t.getChart(),i=e.getStyles(),n=i.yAxis,a=n.size;if("auto"!==a)return a;var r=e.getChartStore(),o=r.getCustomApi(),s=0;if(n.show&&(n.axisLine.show&&(s+=n.axisLine.size),n.tickLine.show&&(s+=n.tickLine.length),n.tickText.show)){var l=0;this.getTicks().forEach(function(t){l=Math.max(l,$t(t.text,n.tickText.size,n.tickText.weight,n.tickText.family))}),s+=n.tickText.marginStart+n.tickText.marginEnd+l}var c=i.crosshair,u=0;if(c.show&&c.horizontal.show&&c.horizontal.text.show){var d=r.getIndicatorStore().getInstances(t.getId()),h=0,p=!1;d.forEach(function(t){h=Math.max(t.precision,h),p||(p=t.shouldFormatBigNumber)});var v=2;if(this.getType()!==X.Percentage)if(this.isInCandle()){var f=r.getPrecision().price,g=i.indicator.lastValueMark;v=g.show&&g.text.show?Math.max(h,f):f}else v=h;var m=Nt(this.getRange().to,v);p&&(m=o.formatBigNumber(m)),m=Vt(m,r.getDecimalFoldThreshold()),u+=c.horizontal.text.paddingLeft+c.horizontal.text.paddingRight+2*c.horizontal.text.borderSize+$t(m,c.horizontal.text.size,c.horizontal.text.weight,c.horizontal.text.family)}return Math.max(s,u)},e.prototype.getSelfBounding=function(){return this.getParent().getYAxisWidget().getBounding()},e.prototype.convertFromPixel=function(t){var e,i,n=null!==(i=null===(e=this.getParent().getYAxisWidget())||void 0===e?void 0:e.getBounding().height)&&void 0!==i?i:0,a=this.getRange(),r=a.from,o=a.range,s=this.isReverse()?t/n:1-t/n,l=s*o+r;switch(this.getType()){case X.Percentage:var c=this.getParent().getChart().getChartStore().getVisibleFirstData();return At(c)&&Et(c.close)?c.close*l/100+c.close:0;case X.Log:return _e(l);default:return l}},e.prototype.convertToRealValue=function(t){var e=t;return this.getType()===X.Log&&(e=_e(t)),e},e.prototype.convertToPixel=function(t){var e=t;switch(this.getType()){case X.Percentage:var i=this.getParent().getChart().getChartStore().getVisibleFirstData();At(i)&&Et(i.close)&&(e=(t-i.close)/i.close*100);break;case X.Log:e=ye(t);break;default:e=t}return this._innerConvertToPixel(e)},e.prototype.convertToNicePixel=function(t){var e,i,n=null!==(i=null===(e=this.getParent().getYAxisWidget())||void 0===e?void 0:e.getBounding().height)&&void 0!==i?i:0,a=this.convertToPixel(t);return Math.round(Math.max(.05*n,Math.min(a,.98*n)))},e.extend=function(t){var i=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return L(i,e),i.prototype.createTicks=function(e){return t.createTicks(e)},i}(e);return i},e}(Zn),Jn={name:"default",createTicks:function(t){var e=t.defaultTicks;return e}},Qn={default:qn.extend(Jn)};function ta(t){var e;return null!==(e=Qn[t])&&void 0!==e?e:Qn.default}var ea=function(){function t(t,e,i,n){this._bounding=Qi(),this._chart=i,this._id=n,this._init(t,e)}return t.prototype._init=function(t,e){this._rootContainer=t,this._container=he("div",{width:"100%",margin:"0",padding:"0",position:"relative",overflow:"hidden",boxSizing:"border-box"}),null!==e?t.insertBefore(this._container,e):t.appendChild(this._container)},t.prototype.getContainer=function(){return this._container},t.prototype.getId=function(){return this._id},t.prototype.getChart=function(){return this._chart},t.prototype.getBounding=function(){return this._bounding},t.prototype.update=function(t){this._bounding.height!==this._container.clientHeight&&(this._container.style.height="".concat(this._bounding.height,"px")),this.updateImp(null!==t&&void 0!==t?t:3,this._container,this._bounding)},t.prototype.destroy=function(){this._rootContainer.removeChild(this._container)},t}(),ia=function(t){function e(e,i,n,a,r){var o=t.call(this,e,i,n,a)||this;o._yAxisWidget=null,o._options={minHeight:zi,dragEnabled:!0,gap:{top:.2,bottom:.1},axisOptions:{name:"default",scrollZoomEnabled:!0}};var s=o.getContainer();return o._mainWidget=o.createMainWidget(s),o._yAxisWidget=o.createYAxisWidget(s),o.setOptions(r),o}return L(e,t),e.prototype.setOptions=function(t){var e,i,n,a,r,o=null===(e=t.axisOptions)||void 0===e?void 0:e.name;return(this._options.axisOptions.name!==o&&Mt(o)||!At(this._axis))&&(this._axis=this.createAxisComponent(null!==o&&void 0!==o?o:"default")),wt(this._options,t),this.getId()===Wi.X_AXIS?(a=this.getMainWidget().getContainer(),r="ew-resize"):(a=this.getYAxisWidget().getContainer(),r="ns-resize"),null===(n=null===(i=t.axisOptions)||void 0===i?void 0:i.scrollZoomEnabled)||void 0===n||n?a.style.cursor=r:a.style.cursor="default",this},e.prototype.getOptions=function(){return this._options},e.prototype.getAxisComponent=function(){return this._axis},e.prototype.setBounding=function(t,e,i){var n,a;wt(this.getBounding(),t);var r={};return At(t.height)&&(r.height=t.height),At(t.top)&&(r.top=t.top),this._mainWidget.setBounding(r),null===(n=this._yAxisWidget)||void 0===n||n.setBounding(r),At(e)&&this._mainWidget.setBounding(e),At(i)&&(null===(a=this._yAxisWidget)||void 0===a||a.setBounding(i)),this},e.prototype.getMainWidget=function(){return this._mainWidget},e.prototype.getYAxisWidget=function(){return this._yAxisWidget},e.prototype.updateImp=function(t){var e;this._mainWidget.update(t),null===(e=this._yAxisWidget)||void 0===e||e.update(t)},e.prototype.destroy=function(){var e;t.prototype.destroy.call(this),this._mainWidget.destroy(),null===(e=this._yAxisWidget)||void 0===e||e.destroy()},e.prototype.getImage=function(t){var e=this.getBounding(),i=e.width,n=e.height,a=he("canvas",{width:"".concat(i,"px"),height:"".concat(n,"px"),boxSizing:"border-box"}),r=a.getContext("2d"),o=Wt(a);a.width=i*o,a.height=n*o,r.scale(o,o);var s=this._mainWidget.getBounding();if(r.drawImage(this._mainWidget.getImage(t),s.left,0,s.width,s.height),null!==this._yAxisWidget){var l=this._yAxisWidget.getBounding();r.drawImage(this._yAxisWidget.getImage(t),l.left,0,l.width,l.height)}return a},e.prototype.createYAxisWidget=function(t){return null},e}(ea),na=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.createAxisComponent=function(t){var e=ta(null!==t&&void 0!==t?t:"default");return new e(this)},e.prototype.createMainWidget=function(t){return new Bn(t,this)},e.prototype.createYAxisWidget=function(t){return new Gn(t,this)},e}(ia),aa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.createMainWidget=function(t){return new Hn(t,this)},e}(na),ra=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.getAxisStyles=function(t){return t.xAxis},e.prototype.createAxisLine=function(t){return{coordinates:[{x:0,y:0},{x:t.width,y:0}]}},e.prototype.createTickLines=function(t,e,i){var n=i.tickLine,a=i.axisLine.size;return t.map(function(t){return{coordinates:[{x:t.coord,y:0},{x:t.coord,y:a+n.length}]}})},e.prototype.createTickTexts=function(t,e,i){var n=i.tickText,a=i.axisLine.size,r=i.tickLine.length;return t.map(function(t){return{x:t.coord,y:a+r+n.marginStart,text:t.text,align:"center",baseline:"top"}})},e}($n),oa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.coordinateToPointTimestampDataIndexFlag=function(){return!0},e.prototype.coordinateToPointValueFlag=function(){return!1},e.prototype.getCompleteOverlays=function(t){return t.getInstances()},e.prototype.getProgressOverlay=function(t){return t.instance},e.prototype.getDefaultFigures=function(t,e,i,n,a,r,o,s,l,c,u){var d,h=[];if(t.needDefaultXAxisFigure&&t.id===(null===(d=u.instance)||void 0===d?void 0:d.id)){var p=Number.MAX_SAFE_INTEGER,v=Number.MIN_SAFE_INTEGER;e.forEach(function(e,i){p=Math.min(p,e.x),v=Math.max(v,e.x);var n=t.points[i];if(Et(n.timestamp)){var o=r.formatDate(a,n.timestamp,"YYYY-MM-DD HH:mm",qt.Crosshair);h.push({type:"text",attrs:{x:e.x,y:0,text:o,align:"center"},ignoreEvent:!0})}}),e.length>1&&h.unshift({type:"rect",attrs:{x:p,y:0,width:v-p,height:i.height},ignoreEvent:!0})}return h},e.prototype.getFigures=function(t,e,i,n,a,r,o,s,l,c,u){var d,h;return null!==(h=null===(d=t.createXAxisFigures)||void 0===d?void 0:d.call(t,{overlay:t,coordinates:e,bounding:i,barSpace:n,precision:a,thousandsSeparator:r,decimalFoldThreshold:o,dateTimeFormat:s,defaultStyles:l,xAxis:c,yAxis:u}))&&void 0!==h?h:[]},e}(jn),sa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.compare=function(t){return At(t.kLineData)&&t.dataIndex===t.realDataIndex},e.prototype.getDirectionStyles=function(t){return t.vertical},e.prototype.getText=function(t,e){var i,n=null===(i=t.kLineData)||void 0===i?void 0:i.timestamp;return e.getCustomApi().formatDate(e.getTimeScaleStore().getDateTimeFormat(),n,"YYYY-MM-DD HH:mm",qt.Crosshair)},e.prototype.getTextAttrs=function(t,e,i,n,a,r){var o,s=i.realX,l="center";return s-e/2-r.paddingLeft<0?(o=0,l="left"):s+e/2+r.paddingRight>n.width?(o=n.width,l="right"):o=s,{x:o,y:0,text:t,align:l,baseline:"top"}},e}(Un),la=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._xAxisView=new ra(n),n._overlayXAxisView=new oa(n),n._crosshairVerticalLabelView=new sa(n),n.getContainer().style.cursor="ew-resize",n.addChild(n._overlayXAxisView),n}return L(e,t),e.prototype.getName=function(){return Gi.X_AXIS},e.prototype.updateMain=function(t){this._xAxisView.draw(t)},e.prototype.updateOverlay=function(t){this._overlayXAxisView.draw(t),this._crosshairVerticalLabelView.draw(t)},e}(en),ca=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.calcRange=function(){var t=this.getParent().getChart().getChartStore(),e=t.getTimeScaleStore().getVisibleRange(),i=e.from,n=e.to,a=i,r=n-1,o=n-i;return{from:a,to:r,range:o,realFrom:a,realTo:r,realRange:o}},e.prototype.optimalTicks=function(t){var e,i,n=this.getParent().getChart(),a=n.getChartStore(),r=a.getCustomApi().formatDate,o=[],s=t.length,l=a.getDataList();if(s>0){var c=a.getTimeScaleStore().getDateTimeFormat(),u=n.getStyles().xAxis.tickText,d=$t("00-00 00:00",u.size,u.weight,u.family),h=parseInt(t[0].value,10),p=this.convertToPixel(h),v=1;if(s>1){var f=parseInt(t[1].value,10),g=this.convertToPixel(f),m=Math.abs(g-p);me&&(t.apply(this,arguments),i=n)}}var fa=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._dragFlag=!1,n._dragStartY=0,n._topPaneHeight=0,n._bottomPaneHeight=0,n._pressedMouseMoveEvent=va(n._pressedTouchMouseMoveEvent,20),n.registerEvent("touchStartEvent",n._mouseDownEvent.bind(n)).registerEvent("touchMoveEvent",n._pressedMouseMoveEvent.bind(n)).registerEvent("touchEndEvent",n._mouseUpEvent.bind(n)).registerEvent("mouseDownEvent",n._mouseDownEvent.bind(n)).registerEvent("mouseUpEvent",n._mouseUpEvent.bind(n)).registerEvent("pressedMouseMoveEvent",n._pressedMouseMoveEvent.bind(n)).registerEvent("mouseEnterEvent",n._mouseEnterEvent.bind(n)).registerEvent("mouseLeaveEvent",n._mouseLeaveEvent.bind(n)),n}return L(e,t),e.prototype.getName=function(){return Gi.SEPARATOR},e.prototype.checkEventOn=function(){return!0},e.prototype._mouseDownEvent=function(t){this._dragFlag=!0,this._dragStartY=t.pageY;var e=this.getPane();return this._topPaneHeight=e.getTopPane().getBounding().height,this._bottomPaneHeight=e.getBottomPane().getBounding().height,!0},e.prototype._mouseUpEvent=function(){return this._dragFlag=!1,this._mouseLeaveEvent()},e.prototype._pressedTouchMouseMoveEvent=function(t){var e=t.pageY-this._dragStartY,i=this.getPane(),n=i.getTopPane(),a=i.getBottomPane(),r=e<0;if(null!==n&&(null===a||void 0===a?void 0:a.getOptions().dragEnabled)){var o=void 0,s=void 0,l=void 0,c=void 0;r?(o=n,s=a,l=this._topPaneHeight,c=this._bottomPaneHeight):(o=a,s=n,l=this._bottomPaneHeight,c=this._topPaneHeight);var u=o.getOptions().minHeight;if(l>u){var d=Math.max(l-Math.abs(e),u),h=l-d;o.setBounding({height:d}),s.setBounding({height:c+h});var p=i.getChart();p.getChartStore().getActionStore().execute(Tt.OnPaneDrag,{paneId:i.getId()}),p.adjustPaneViewport(!0,!0,!0,!0,!0)}}return!0},e.prototype._mouseEnterEvent=function(){var t,e=this.getPane(),i=e.getBottomPane();if(null!==(t=null===i||void 0===i?void 0:i.getOptions().dragEnabled)&&void 0!==t&&t){var n=e.getChart(),a=n.getStyles().separator;return this.getContainer().style.background=a.activeBackgroundColor,!0}return!1},e.prototype._mouseLeaveEvent=function(){return!this._dragFlag&&(this.getContainer().style.background="",!0)},e.prototype.createContainer=function(){return he("div",{width:"100%",height:"".concat(Zi,"px"),margin:"0",padding:"0",position:"absolute",top:"-3px",zIndex:"20",boxSizing:"border-box",cursor:"ns-resize"})},e.prototype.updateImp=function(t,e,i){if(4===i||2===i){var n=this.getPane().getChart().getStyles().separator;t.style.top="".concat(-Math.floor((Zi-n.size)/2),"px"),t.style.height="".concat(Zi,"px")}},e}(tn),ga=function(t){function e(e,i,n,a,r,o){var s=t.call(this,e,i,n,a)||this;return s.getContainer().style.overflow="",s._topPane=r,s._bottomPane=o,s._separatorWidget=new fa(s.getContainer(),s),s}return L(e,t),e.prototype.setBounding=function(t){return wt(this.getBounding(),t),this},e.prototype.getTopPane=function(){return this._topPane},e.prototype.setTopPane=function(t){return this._topPane=t,this},e.prototype.getBottomPane=function(){return this._bottomPane},e.prototype.setBottomPane=function(t){return this._bottomPane=t,this},e.prototype.getWidget=function(){return this._separatorWidget},e.prototype.getImage=function(t){var e=this.getBounding(),i=e.width,n=e.height,a=this.getChart().getStyles().separator,r=he("canvas",{width:"".concat(i,"px"),height:"".concat(n,"px"),boxSizing:"border-box"}),o=r.getContext("2d"),s=Wt(r);return r.width=i*s,r.height=n*s,o.scale(s,s),o.fillStyle=a.color,o.fillRect(0,0,i,n),r},e.prototype.updateImp=function(t,e,i){if(4===t||2===t){var n=this.getChart().getStyles().separator;e.style.backgroundColor=n.color,e.style.height="".concat(i.height,"px"),e.style.marginLeft="".concat(i.left,"px"),e.style.width="".concat(i.width,"px"),this._separatorWidget.update(t)}},e}(ea);function ma(){var t;return"undefined"!==typeof window&&(null!==(t=window.navigator.userAgent.toLowerCase().indexOf("firefox"))&&void 0!==t?t:-1)>-1}function ya(){return"undefined"!==typeof window&&/iPhone|iPad|iPod/.test(window.navigator.platform)}var _a,ba=10,xa=function(){function t(t,e,i){var n=this;this._clickCount=0,this._clickTimeoutId=null,this._clickCoordinate={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY},this._tapCount=0,this._tapTimeoutId=null,this._tapCoordinate={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY},this._longTapTimeoutId=null,this._longTapActive=!1,this._mouseMoveStartCoordinate=null,this._touchMoveStartCoordinate=null,this._touchMoveExceededManhattanDistance=!1,this._cancelClick=!1,this._cancelTap=!1,this._unsubscribeOutsideMouseEvents=null,this._unsubscribeOutsideTouchEvents=null,this._unsubscribeMobileSafariEvents=null,this._unsubscribeMousemove=null,this._unsubscribeMouseWheel=null,this._unsubscribeContextMenu=null,this._unsubscribeRootMouseEvents=null,this._unsubscribeRootTouchEvents=null,this._startPinchMiddleCoordinate=null,this._startPinchDistance=0,this._pinchPrevented=!1,this._preventTouchDragProcess=!1,this._mousePressed=!1,this._lastTouchEventTimeStamp=0,this._activeTouchId=null,this._acceptMouseLeave=!ya(),this._onFirefoxOutsideMouseUp=function(t){n._mouseUpHandler(t)},this._onMobileSafariDoubleClick=function(t){if(n._firesTouchEvents(t)){if(++n._tapCount,null!==n._tapTimeoutId&&n._tapCount>1){var e=n._mouseTouchMoveWithDownInfo(n._getCoordinate(t),n._tapCoordinate).manhattanDistance;e<30&&!n._cancelTap&&n._processEvent(n._makeCompatEvent(t),n._handler.doubleTapEvent),n._resetTapTimeout()}}else if(++n._clickCount,null!==n._clickTimeoutId&&n._clickCount>1){e=n._mouseTouchMoveWithDownInfo(n._getCoordinate(t),n._clickCoordinate).manhattanDistance;e<5&&!n._cancelClick&&n._processEvent(n._makeCompatEvent(t),n._handler.mouseDoubleClickEvent),n._resetClickTimeout()}},this._target=t,this._handler=e,this._options=i,this._init()}return t.prototype.destroy=function(){null!==this._unsubscribeOutsideMouseEvents&&(this._unsubscribeOutsideMouseEvents(),this._unsubscribeOutsideMouseEvents=null),null!==this._unsubscribeOutsideTouchEvents&&(this._unsubscribeOutsideTouchEvents(),this._unsubscribeOutsideTouchEvents=null),null!==this._unsubscribeMousemove&&(this._unsubscribeMousemove(),this._unsubscribeMousemove=null),null!==this._unsubscribeMouseWheel&&(this._unsubscribeMouseWheel(),this._unsubscribeMouseWheel=null),null!==this._unsubscribeContextMenu&&(this._unsubscribeContextMenu(),this._unsubscribeContextMenu=null),null!==this._unsubscribeRootMouseEvents&&(this._unsubscribeRootMouseEvents(),this._unsubscribeRootMouseEvents=null),null!==this._unsubscribeRootTouchEvents&&(this._unsubscribeRootTouchEvents(),this._unsubscribeRootTouchEvents=null),null!==this._unsubscribeMobileSafariEvents&&(this._unsubscribeMobileSafariEvents(),this._unsubscribeMobileSafariEvents=null),this._clearLongTapTimeout(),this._resetClickTimeout()},t.prototype._mouseEnterHandler=function(t){var e,i,n,a=this;null===(e=this._unsubscribeMousemove)||void 0===e||e.call(this),null===(i=this._unsubscribeMouseWheel)||void 0===i||i.call(this),null===(n=this._unsubscribeContextMenu)||void 0===n||n.call(this);var r=this._mouseMoveHandler.bind(this);this._unsubscribeMousemove=function(){a._target.removeEventListener("mousemove",r)},this._target.addEventListener("mousemove",r);var o=this._mouseWheelHandler.bind(this);this._unsubscribeMouseWheel=function(){a._target.removeEventListener("wheel",o)},this._target.addEventListener("wheel",o,{passive:!1});var s=this._contextMenuHandler.bind(this);this._unsubscribeContextMenu=function(){a._target.removeEventListener("contextmenu",s)},this._target.addEventListener("contextmenu",s,{passive:!1}),this._firesTouchEvents(t)||(this._processEvent(this._makeCompatEvent(t),this._handler.mouseEnterEvent),this._acceptMouseLeave=!0)},t.prototype._resetClickTimeout=function(){null!==this._clickTimeoutId&&clearTimeout(this._clickTimeoutId),this._clickCount=0,this._clickTimeoutId=null,this._clickCoordinate={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY}},t.prototype._resetTapTimeout=function(){null!==this._tapTimeoutId&&clearTimeout(this._tapTimeoutId),this._tapCount=0,this._tapTimeoutId=null,this._tapCoordinate={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY}},t.prototype._mouseMoveHandler=function(t){this._mousePressed||null!==this._touchMoveStartCoordinate||this._firesTouchEvents(t)||(this._processEvent(this._makeCompatEvent(t),this._handler.mouseMoveEvent),this._acceptMouseLeave=!0)},t.prototype._mouseWheelHandler=function(t){if(Math.abs(t.deltaX)>Math.abs(t.deltaY)){if(!At(this._handler.mouseWheelHortEvent))return;if(this._preventDefault(t),0===Math.abs(t.deltaX))return;this._handler.mouseWheelHortEvent(this._makeCompatEvent(t),-t.deltaX)}else{if(!At(this._handler.mouseWheelVertEvent))return;var e=-t.deltaY/100;if(0===e)return;switch(this._preventDefault(t),t.deltaMode){case t.DOM_DELTA_PAGE:e*=120;break;case t.DOM_DELTA_LINE:e*=32;break}if(0!==e){var i=Math.sign(e)*Math.min(1,Math.abs(e));this._handler.mouseWheelVertEvent(this._makeCompatEvent(t),i)}}},t.prototype._contextMenuHandler=function(t){this._preventDefault(t)},t.prototype._touchMoveHandler=function(t){var e=this._touchWithId(t.changedTouches,this._activeTouchId);if(null!==e&&(this._lastTouchEventTimeStamp=this._eventTimeStamp(t),null===this._startPinchMiddleCoordinate&&!this._preventTouchDragProcess)){this._pinchPrevented=!0;var i=this._mouseTouchMoveWithDownInfo(this._getCoordinate(e),this._touchMoveStartCoordinate),n=i.xOffset,a=i.yOffset,r=i.manhattanDistance;if(this._touchMoveExceededManhattanDistance||!(r<5)){if(!this._touchMoveExceededManhattanDistance){var o=.5*n,s=a>=o&&!this._options.treatVertDragAsPageScroll(),l=o>a&&!this._options.treatHorzDragAsPageScroll();s||l||(this._preventTouchDragProcess=!0),this._touchMoveExceededManhattanDistance=!0,this._cancelTap=!0,this._clearLongTapTimeout(),this._resetTapTimeout()}this._preventTouchDragProcess||this._processEvent(this._makeCompatEvent(t,e),this._handler.touchMoveEvent)}}},t.prototype._mouseMoveWithDownHandler=function(t){if(0===t.button){var e=this._mouseTouchMoveWithDownInfo(this._getCoordinate(t),this._mouseMoveStartCoordinate),i=e.manhattanDistance;i>=5&&(this._cancelClick=!0,this._resetClickTimeout()),this._cancelClick&&this._processEvent(this._makeCompatEvent(t),this._handler.pressedMouseMoveEvent)}},t.prototype._mouseTouchMoveWithDownInfo=function(t,e){var i=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y),a=i+n;return{xOffset:i,yOffset:n,manhattanDistance:a}},t.prototype._touchEndHandler=function(t){var e=this._touchWithId(t.changedTouches,this._activeTouchId);if(null===e&&0===t.touches.length&&(e=t.changedTouches[0]),null!==e){this._activeTouchId=null,this._lastTouchEventTimeStamp=this._eventTimeStamp(t),this._clearLongTapTimeout(),this._touchMoveStartCoordinate=null,null!==this._unsubscribeRootTouchEvents&&(this._unsubscribeRootTouchEvents(),this._unsubscribeRootTouchEvents=null);var i=this._makeCompatEvent(t,e);if(this._processEvent(i,this._handler.touchEndEvent),++this._tapCount,null!==this._tapTimeoutId&&this._tapCount>1){var n=this._mouseTouchMoveWithDownInfo(this._getCoordinate(e),this._tapCoordinate).manhattanDistance;n<30&&!this._cancelTap&&this._processEvent(i,this._handler.doubleTapEvent),this._resetTapTimeout()}else this._cancelTap||(this._processEvent(i,this._handler.tapEvent),At(this._handler.tapEvent)&&this._preventDefault(t));0===this._tapCount&&this._preventDefault(t),0===t.touches.length&&this._longTapActive&&(this._longTapActive=!1,this._preventDefault(t))}},t.prototype._mouseUpHandler=function(t){if(0===t.button){var e=this._makeCompatEvent(t);if(this._mouseMoveStartCoordinate=null,this._mousePressed=!1,null!==this._unsubscribeRootMouseEvents&&(this._unsubscribeRootMouseEvents(),this._unsubscribeRootMouseEvents=null),ma()){var i=this._target.ownerDocument.documentElement;i.removeEventListener("mouseleave",this._onFirefoxOutsideMouseUp)}if(!this._firesTouchEvents(t))if(this._processEvent(e,this._handler.mouseUpEvent),++this._clickCount,null!==this._clickTimeoutId&&this._clickCount>1){var n=this._mouseTouchMoveWithDownInfo(this._getCoordinate(t),this._clickCoordinate).manhattanDistance;n<5&&!this._cancelClick&&this._processEvent(e,this._handler.mouseDoubleClickEvent),this._resetClickTimeout()}else this._cancelClick||this._processEvent(e,this._handler.mouseClickEvent)}},t.prototype._clearLongTapTimeout=function(){null!==this._longTapTimeoutId&&(clearTimeout(this._longTapTimeoutId),this._longTapTimeoutId=null)},t.prototype._touchStartHandler=function(t){if(null===this._activeTouchId){var e=t.changedTouches[0];this._activeTouchId=e.identifier,this._lastTouchEventTimeStamp=this._eventTimeStamp(t);var i=this._target.ownerDocument.documentElement;this._cancelTap=!1,this._touchMoveExceededManhattanDistance=!1,this._preventTouchDragProcess=!1,this._touchMoveStartCoordinate=this._getCoordinate(e),null!==this._unsubscribeRootTouchEvents&&(this._unsubscribeRootTouchEvents(),this._unsubscribeRootTouchEvents=null);var n=this._touchMoveHandler.bind(this),a=this._touchEndHandler.bind(this);this._unsubscribeRootTouchEvents=function(){i.removeEventListener("touchmove",n),i.removeEventListener("touchend",a)},i.addEventListener("touchmove",n,{passive:!1}),i.addEventListener("touchend",a,{passive:!1}),this._clearLongTapTimeout(),this._longTapTimeoutId=setTimeout(this._longTapHandler.bind(this,t),500),this._processEvent(this._makeCompatEvent(t,e),this._handler.touchStartEvent),null===this._tapTimeoutId&&(this._tapCount=0,this._tapTimeoutId=setTimeout(this._resetTapTimeout.bind(this),500),this._tapCoordinate=this._getCoordinate(e))}},t.prototype._mouseDownHandler=function(t){if(2===t.button)return this._preventDefault(t),void this._processEvent(this._makeCompatEvent(t),this._handler.mouseRightClickEvent);if(0===t.button){var e=this._target.ownerDocument.documentElement;ma()&&e.addEventListener("mouseleave",this._onFirefoxOutsideMouseUp),this._cancelClick=!1,this._mouseMoveStartCoordinate=this._getCoordinate(t),null!==this._unsubscribeRootMouseEvents&&(this._unsubscribeRootMouseEvents(),this._unsubscribeRootMouseEvents=null);var i=this._mouseMoveWithDownHandler.bind(this),n=this._mouseUpHandler.bind(this);this._unsubscribeRootMouseEvents=function(){e.removeEventListener("mousemove",i),e.removeEventListener("mouseup",n)},e.addEventListener("mousemove",i),e.addEventListener("mouseup",n),this._mousePressed=!0,this._firesTouchEvents(t)||(this._processEvent(this._makeCompatEvent(t),this._handler.mouseDownEvent),null===this._clickTimeoutId&&(this._clickCount=0,this._clickTimeoutId=setTimeout(this._resetClickTimeout.bind(this),500),this._clickCoordinate=this._getCoordinate(t)))}},t.prototype._init=function(){var t=this;this._target.addEventListener("mouseenter",this._mouseEnterHandler.bind(this)),this._target.addEventListener("touchcancel",this._clearLongTapTimeout.bind(this));var e=this._target.ownerDocument,i=function(e){null!=t._handler.mouseDownOutsideEvent&&(e.composed&&t._target.contains(e.composedPath()[0])||null!==e.target&&t._target.contains(e.target)||t._handler.mouseDownOutsideEvent({x:0,y:0,pageX:0,pageY:0}))};this._unsubscribeOutsideTouchEvents=function(){e.removeEventListener("touchstart",i)},this._unsubscribeOutsideMouseEvents=function(){e.removeEventListener("mousedown",i)},e.addEventListener("mousedown",i),e.addEventListener("touchstart",i,{passive:!0}),ya()&&(this._unsubscribeMobileSafariEvents=function(){t._target.removeEventListener("dblclick",t._onMobileSafariDoubleClick)},this._target.addEventListener("dblclick",this._onMobileSafariDoubleClick)),this._target.addEventListener("mouseleave",this._mouseLeaveHandler.bind(this)),this._target.addEventListener("touchstart",this._touchStartHandler.bind(this),{passive:!0}),this._target.addEventListener("mousedown",function(t){if(1===t.button)return t.preventDefault(),!1}),this._target.addEventListener("mousedown",this._mouseDownHandler.bind(this)),this._initPinch(),this._target.addEventListener("touchmove",function(){},{passive:!1})},t.prototype._initPinch=function(){var t=this;(At(this._handler.pinchStartEvent)||At(this._handler.pinchEvent)||At(this._handler.pinchEndEvent))&&(this._target.addEventListener("touchstart",function(e){t._checkPinchState(e.touches)},{passive:!0}),this._target.addEventListener("touchmove",function(e){if(2===e.touches.length&&null!==t._startPinchMiddleCoordinate&&At(t._handler.pinchEvent)){var i=t._getTouchDistance(e.touches[0],e.touches[1]),n=i/t._startPinchDistance;t._handler.pinchEvent(K(K({},t._startPinchMiddleCoordinate),{pageX:0,pageY:0}),n),t._preventDefault(e)}},{passive:!1}),this._target.addEventListener("touchend",function(e){t._checkPinchState(e.touches)}))},t.prototype._checkPinchState=function(t){1===t.length&&(this._pinchPrevented=!1),2!==t.length||this._pinchPrevented||this._longTapActive?this._stopPinch():this._startPinch(t)},t.prototype._startPinch=function(t){var e,i=null!==(e=this._target.getBoundingClientRect())&&void 0!==e?e:{left:0,top:0};this._startPinchMiddleCoordinate={x:(t[0].clientX-i.left+(t[1].clientX-i.left))/2,y:(t[0].clientY-i.top+(t[1].clientY-i.top))/2},this._startPinchDistance=this._getTouchDistance(t[0],t[1]),At(this._handler.pinchStartEvent)&&this._handler.pinchStartEvent({x:0,y:0,pageX:0,pageY:0}),this._clearLongTapTimeout()},t.prototype._stopPinch=function(){null!==this._startPinchMiddleCoordinate&&(this._startPinchMiddleCoordinate=null,At(this._handler.pinchEndEvent)&&this._handler.pinchEndEvent({x:0,y:0,pageX:0,pageY:0}))},t.prototype._mouseLeaveHandler=function(t){var e,i,n;null===(e=this._unsubscribeMousemove)||void 0===e||e.call(this),null===(i=this._unsubscribeMouseWheel)||void 0===i||i.call(this),null===(n=this._unsubscribeContextMenu)||void 0===n||n.call(this),this._firesTouchEvents(t)||this._acceptMouseLeave&&(this._processEvent(this._makeCompatEvent(t),this._handler.mouseLeaveEvent),this._acceptMouseLeave=!ya())},t.prototype._longTapHandler=function(t){var e=this._touchWithId(t.touches,this._activeTouchId);null!==e&&(this._processEvent(this._makeCompatEvent(t,e),this._handler.longTapEvent),this._cancelTap=!0,this._longTapActive=!0)},t.prototype._firesTouchEvents=function(t){var e;return At(null===(e=t.sourceCapabilities)||void 0===e?void 0:e.firesTouchEvents)?t.sourceCapabilities.firesTouchEvents:this._eventTimeStamp(t)this._startScrollCoordinate.y-s.y){var d=s.x-this._startScrollCoordinate.x;c.getTimeScaleStore().scroll(d)}return!0;case Gi.X_AXIS:case Gi.Y_AXIS:var h=o.dispatchEvent("pressedMouseMoveEvent",s);return h&&(null===(n=s.preventDefault)||void 0===n||n.call(s),this._chart.updatePane(1)),h}}return!1},t.prototype.touchEndEvent=function(t){var e=this,i=this._findWidgetByEvent(t).widget;if(null!==i){var n=this._makeWidgetEvent(t,i),a=i.getName();switch(a){case Gi.MAIN:if(i.dispatchEvent("mouseUpEvent",n),null!==this._startScrollCoordinate){var r=(new Date).getTime()-this._flingStartTime,o=n.x-this._startScrollCoordinate.x,s=o/(r>0?r:1)*20;if(r<200&&Math.abs(s)>0){var l=this._chart.getChartStore().getTimeScaleStore(),c=function(){e._flingScrollRequestId=oe(function(){l.startScroll(),l.scroll(s),s*=.975,Math.abs(s)<1?null!==e._flingScrollRequestId&&(se(e._flingScrollRequestId),e._flingScrollRequestId=null):c()})};c()}}return!0;case Gi.X_AXIS:case Gi.Y_AXIS:var u=i.dispatchEvent("mouseUpEvent",n);u&&this._chart.updatePane(1)}}return!1},t.prototype.tapEvent=function(t){var e=this._findWidgetByEvent(t),i=e.pane,n=e.widget,a=!1;if(null!==n){var r=this._makeWidgetEvent(t,n),o=n.dispatchEvent("mouseClickEvent",r);if(n.getName()===Gi.MAIN){var s=this._makeWidgetEvent(t,n),l=this._chart.getChartStore(),c=l.getTooltipStore();o?(this._touchCancelCrosshair=!0,this._touchCoordinate=null,c.setCrosshair(void 0,{notInvalidate:!0}),a=!0):(this._touchCancelCrosshair||this._touchZoomed||(this._touchCoordinate={x:s.x,y:s.y},c.setCrosshair({x:s.x,y:s.y,paneId:null===i||void 0===i?void 0:i.getId()},{notInvalidate:!0}),a=!0),this._touchCancelCrosshair=!1)}(a||o)&&this._chart.updatePane(1)}return a},t.prototype.doubleTapEvent=function(t){return this.mouseDoubleClickEvent(t)},t.prototype.longTapEvent=function(t){var e=this._findWidgetByEvent(t),i=e.pane,n=e.widget;if(null!==n&&n.getName()===Gi.MAIN){var a=this._makeWidgetEvent(t,n);return this._touchCoordinate={x:a.x,y:a.y},this._chart.getChartStore().getTooltipStore().setCrosshair({x:a.x,y:a.y,paneId:null===i||void 0===i?void 0:i.getId()}),!0}return!1},t.prototype._findWidgetByEvent=function(t){var e,i,n,a,r=t.x,o=t.y,s=this._chart.getAllSeparatorPanes(),l=this._chart.getChartStore().getStyles().separator.size;try{for(var c=G(s),u=c.next();!u.done;u=c.next()){var d=Z(u.value,2),h=d[1],p=h.getBounding(),v=p.top-Math.round((Zi-l)/2);if(r>=p.left&&r<=p.left+p.width&&o>=v&&o<=v+Zi)return{pane:h,widget:h.getWidget()}}}catch(k){e={error:k}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(e)throw e.error}}var f=this._chart.getAllDrawPanes(),g=null;try{for(var m=G(f),y=m.next();!y.done;y=m.next()){var _=y.value;p=_.getBounding();if(r>=p.left&&r<=p.left+p.width&&o>=p.top&&o<=p.top+p.height){g=_;break}}}catch(I){n={error:I}}finally{try{y&&!y.done&&(a=m.return)&&a.call(m)}finally{if(n)throw n.error}}var b=null;if(null!==g){if(null===b){var x=g.getMainWidget(),w=x.getBounding();r>=w.left&&r<=w.left+w.width&&o>=w.top&&o<=w.top+w.height&&(b=x)}if(null===b){var S=g.getYAxisWidget();if(null!==S){var C=S.getBounding();r>=C.left&&r<=C.left+C.width&&o>=C.top&&o<=C.top+C.height&&(b=S)}}}return{pane:g,widget:b}},t.prototype._makeWidgetEvent=function(t,e){var i,n,a,r=null!==(i=null===e||void 0===e?void 0:e.getBounding())&&void 0!==i?i:null;return K(K({},t),{x:t.x-(null!==(n=null===r||void 0===r?void 0:r.left)&&void 0!==n?n:0),y:t.y-(null!==(a=null===r||void 0===r?void 0:r.top)&&void 0!==a?a:0)})},t.prototype.destroy=function(){this._container.removeEventListener("keydown",this._boundKeyBoardDownEvent),this._event.destroy()},t}();(function(t){t["Root"]="root",t["Main"]="main",t["YAxis"]="yAxis"})(_a||(_a={}));var Sa=function(){function t(t,e){this._drawPanes=[],this._separatorPanes=new Map,this._initContainer(t),this._chartEvent=new wa(this._chartContainer,this),this._chartStore=new Ui(this,e),this._initPanes(e),this.adjustPaneViewport(!0,!0,!0)}return t.prototype._initContainer=function(t){this._container=t,this._chartContainer=he("div",{position:"relative",width:"100%",outline:"none",borderStyle:"none",cursor:"crosshair",boxSizing:"border-box",userSelect:"none",webkitUserSelect:"none",msUserSelect:"none",MozUserSelect:"none",webkitTapHighlightColor:"transparent"}),this._chartContainer.tabIndex=1,t.appendChild(this._chartContainer)},t.prototype._initPanes=function(t){var e,i=this,n=null!==(e=null===t||void 0===t?void 0:t.layout)&&void 0!==e?e:[{type:"candle"}],a=!1,r=!1,o=function(t){if(!r){var e=i._createPane(pa,Wi.X_AXIS,null!==t&&void 0!==t?t:{});i._xAxisPane=e,r=!0}};n.forEach(function(t){var e,n,r;switch(t.type){case"candle":if(!a){var s=null!==(e=t.options)&&void 0!==e?e:{};wt(s,{id:Wi.CANDLE}),i._candlePane=i._createPane(aa,Wi.CANDLE,s);var l=null!==(n=t.content)&&void 0!==n?n:[];l.forEach(function(t){i.createIndicator(t,!0,s)}),a=!0}break;case"indicator":var c;l=null!==(r=t.content)&&void 0!==r?r:[];if(l.length>0)l.forEach(function(e){At(c)?i.createIndicator(e,!0,{id:c}):c=i.createIndicator(e,!0,t.options)});break;case"xAxis":o(t.options);break}}),o({position:"bottom"})},t.prototype._createPane=function(t,e,i){var n,a=null,r=null,o=null===i||void 0===i?void 0:i.position;switch(o){case"top":var s=this._drawPanes[0];At(s)&&(r=new t(this._chartContainer,s.getContainer(),this,e,null!==i&&void 0!==i?i:{}),a=0);break;case"bottom":break;default:for(var l=this._drawPanes.length-1;l>-1;l--){var c=this._drawPanes[l],u=this._drawPanes[l-1];if("bottom"===(null===c||void 0===c?void 0:c.getOptions().position)&&"bottom"!==(null===u||void 0===u?void 0:u.getOptions().position)){r=new t(this._chartContainer,c.getContainer(),this,e,null!==i&&void 0!==i?i:{}),a=l;break}}}if(At(r)||(r=new t(this._chartContainer,null,this,e,null!==i&&void 0!==i?i:{})),Et(a)?(this._drawPanes.splice(a,0,r),n=a):(this._drawPanes.push(r),n=this._drawPanes.length-1),r.getId()!==Wi.X_AXIS){var d=this._drawPanes[n+1];if(At(d)&&d.getId()===Wi.X_AXIS&&(d=this._drawPanes[n+2]),At(d)){var h=this._separatorPanes.get(d);At(h)?h.setTopPane(r):(h=new ga(this._chartContainer,d.getContainer(),this,"",r,d),this._separatorPanes.set(d,h))}var p=this._drawPanes[n-1];if(At(p)&&p.getId()===Wi.X_AXIS&&(p=this._drawPanes[n-2]),At(p)){h=new ga(this._chartContainer,r.getContainer(),this,"",p,r);this._separatorPanes.set(r,h)}}return r},t.prototype._measurePaneHeight=function(){var t,e=this,i=Math.floor(this._container.clientHeight),n=this._chartStore.getStyles().separator.size,a=this._xAxisPane.getAxisComponent().getAutoSize(),r=i-a-this._separatorPanes.size*n;r<0&&(r=0);var o=0;this._drawPanes.forEach(function(t){if(t.getId()!==Wi.CANDLE&&t.getId()!==Wi.X_AXIS){var e=t.getBounding().height,i=t.getOptions().minHeight;er?(o=r,e=Math.max(r-o,0)):o+=e,t.setBounding({height:e})}});var s=r-o;null===(t=this._candlePane)||void 0===t||t.setBounding({height:s}),this._xAxisPane.setBounding({height:a});var l=0;this._drawPanes.forEach(function(t){var i=e._separatorPanes.get(t);At(i)&&(i.setBounding({height:n,top:l}),l+=n),t.setBounding({top:l}),l+=t.getBounding().height})},t.prototype._measurePaneWidth=function(){var t=this,e=Math.floor(this._container.clientWidth),i=this._chartStore.getStyles(),n=i.yAxis,a=n.position===Y.Left,r=!n.inside,o=0,s=0,l=0,c=0;this._drawPanes.forEach(function(t){t.getId()!==Wi.X_AXIS&&(s=Math.max(s,t.getAxisComponent().getAutoSize()))}),s>e&&(s=e),r?(o=e-s,a?(l=0,c=s):(l=e-s,c=0)):(o=e,c=0,l=a?0:e-s),this._chartStore.getTimeScaleStore().setTotalBarSpace(o);var u,d={width:e},h={width:o,left:c},p={width:s,left:l},v=i.separator.fill;u=r&&!v?h:d,this._drawPanes.forEach(function(e){var i;null===(i=t._separatorPanes.get(e))||void 0===i||i.setBounding(u),e.setBounding(d,h,p)})},t.prototype._setPaneOptions=function(t,e){var i,n;if(Mt(t.id)){var a=this.getDrawPaneById(t.id),r=!1;if(null!==a){var o=e;if(t.id!==Wi.CANDLE&&Et(t.height)&&t.height>0){var s=Math.max(null!==(i=t.minHeight)&&void 0!==i?i:a.getOptions().minHeight,0),l=Math.max(s,t.height);a.setBounding({height:l}),o=!0,r=!0}(Mt(null===(n=t.axisOptions)||void 0===n?void 0:n.name)||At(t.gap))&&(o=!0),a.setOptions(t),o&&this.adjustPaneViewport(r,!0,!0,!0,!0)}}},t.prototype.getDrawPaneById=function(t){if(t===Wi.CANDLE)return this._candlePane;if(t===Wi.X_AXIS)return this._xAxisPane;var e=this._drawPanes.find(function(e){return e.getId()===t});return null!==e&&void 0!==e?e:null},t.prototype.getContainer=function(){return this._container},t.prototype.getChartStore=function(){return this._chartStore},t.prototype.getXAxisPane=function(){return this._xAxisPane},t.prototype.getAllDrawPanes=function(){return this._drawPanes},t.prototype.getAllSeparatorPanes=function(){return this._separatorPanes},t.prototype.adjustPaneViewport=function(t,e,i,n,a){t&&this._measurePaneHeight();var r=e,o=null!==n&&void 0!==n&&n,s=null!==a&&void 0!==a&&a;(o||s)&&this._drawPanes.forEach(function(t){var e=t.getAxisComponent().buildTicks(s);r||(r=e)}),r&&this._measurePaneWidth(),null!==i&&void 0!==i&&i&&(this._xAxisPane.getAxisComponent().buildTicks(!0),this.updatePane(4))},t.prototype.updatePane=function(t,e){if(At(e)){var i=this.getDrawPaneById(e);null===i||void 0===i||i.update(t)}else this._separatorPanes.forEach(function(e){e.update(t)}),this._drawPanes.forEach(function(e){e.update(t)})},t.prototype.crosshairChange=function(t){var e=this,i=this._chartStore.getActionStore();if(i.has(Tt.OnCrosshairChange)){var n={};this._drawPanes.forEach(function(i){var a=i.getId(),r={},o=e._chartStore.getIndicatorStore().getInstances(a);o.forEach(function(e){var i,n=e.result;r[e.name]=n[null!==(i=t.dataIndex)&&void 0!==i?i:n.length-1]}),n[a]=r}),Mt(t.paneId)&&i.execute(Tt.OnCrosshairChange,K(K({},t),{indicatorData:n}))}},t.prototype.getDom=function(t,e){var i,n;if(!Mt(t))return this._chartContainer;var a=this.getDrawPaneById(t);if(null!==a){var r=null!==e&&void 0!==e?e:_a.Root;switch(r){case _a.Root:return a.getContainer();case _a.Main:return a.getMainWidget().getContainer();case _a.YAxis:return null!==(n=null===(i=a.getYAxisWidget())||void 0===i?void 0:i.getContainer())&&void 0!==n?n:null}}return null},t.prototype.getSize=function(t,e){var i,n;if(!At(t))return{width:Math.floor(this._chartContainer.clientWidth),height:Math.floor(this._chartContainer.clientHeight),left:0,top:0,right:0,bottom:0};var a=this.getDrawPaneById(t);if(null!==a){var r=null!==e&&void 0!==e?e:_a.Root;switch(r){case _a.Root:return a.getBounding();case _a.Main:return a.getMainWidget().getBounding();case _a.YAxis:return null!==(n=null===(i=a.getYAxisWidget())||void 0===i?void 0:i.getBounding())&&void 0!==n?n:null}}return null},t.prototype.setStyles=function(t){var e,i,n;this._chartStore.setOptions({styles:t}),n=Mt(t)?ji(t):t,At(null===(e=null===n||void 0===n?void 0:n.yAxis)||void 0===e?void 0:e.type)&&(null===(i=this._candlePane)||void 0===i||i.getAxisComponent().setAutoCalcTickFlag(!0)),this.adjustPaneViewport(!0,!0,!0,!0,!0)},t.prototype.getStyles=function(){return this._chartStore.getStyles()},t.prototype.setLocale=function(t){this._chartStore.setOptions({locale:t}),this.adjustPaneViewport(!0,!0,!0,!0,!0)},t.prototype.getLocale=function(){return this._chartStore.getLocale()},t.prototype.setCustomApi=function(t){this._chartStore.setOptions({customApi:t}),this.adjustPaneViewport(!0,!0,!0,!0,!0)},t.prototype.setPriceVolumePrecision=function(t,e){this._chartStore.setPrecision({price:t,volume:e})},t.prototype.getPriceVolumePrecision=function(){return this._chartStore.getPrecision()},t.prototype.setTimezone=function(t){this._chartStore.setOptions({timezone:t}),this._xAxisPane.getAxisComponent().buildTicks(!0),this._xAxisPane.update(3)},t.prototype.getTimezone=function(){return this._chartStore.getTimeScaleStore().getTimezone()},t.prototype.setOffsetRightDistance=function(t){this._chartStore.getTimeScaleStore().setOffsetRightDistance(t,!0)},t.prototype.getOffsetRightDistance=function(){return this._chartStore.getTimeScaleStore().getOffsetRightDistance()},t.prototype.setMaxOffsetLeftDistance=function(t){t<0?_t("setMaxOffsetLeftDistance","distance","distance must greater than zero!!!"):this._chartStore.getTimeScaleStore().setMaxOffsetLeftDistance(t)},t.prototype.setMaxOffsetRightDistance=function(t){t<0?_t("setMaxOffsetRightDistance","distance","distance must greater than zero!!!"):this._chartStore.getTimeScaleStore().setMaxOffsetRightDistance(t)},t.prototype.setLeftMinVisibleBarCount=function(t){t<0?_t("setLeftMinVisibleBarCount","barCount","barCount must greater than zero!!!"):this._chartStore.getTimeScaleStore().setLeftMinVisibleBarCount(Math.ceil(t))},t.prototype.setRightMinVisibleBarCount=function(t){t<0?_t("setRightMinVisibleBarCount","barCount","barCount must greater than zero!!!"):this._chartStore.getTimeScaleStore().setRightMinVisibleBarCount(Math.ceil(t))},t.prototype.setBarSpace=function(t){this._chartStore.getTimeScaleStore().setBarSpace(t)},t.prototype.getBarSpace=function(){return this._chartStore.getTimeScaleStore().getBarSpace().bar},t.prototype.getVisibleRange=function(){return this._chartStore.getTimeScaleStore().getVisibleRange()},t.prototype.clearData=function(){this._chartStore.clear()},t.prototype.getDataList=function(){return this._chartStore.getDataList()},t.prototype.applyNewData=function(t,e,i){At(i)&&_t("applyNewData","","param `callback` has been deprecated since version 9.8.0, use `subscribeAction('onDataReady')` instead."),this._chartStore.addData(t,Yt.Init,e).then(function(){}).catch(function(){}).finally(function(){null===i||void 0===i||i()})},t.prototype.applyMoreData=function(t,e,i){_t("","","Api `applyMoreData` has been deprecated since version 9.8.0."),this._chartStore.addData(t,Yt.Forward,null===e||void 0===e||e).then(function(){}).catch(function(){}).finally(function(){null===i||void 0===i||i()})},t.prototype.updateData=function(t,e){At(e)&&_t("updateData","","param `callback` has been deprecated since version 9.8.0, use `subscribeAction('onDataReady')` instead."),this._chartStore.addData(t).then(function(){}).catch(function(){}).finally(function(){null===e||void 0===e||e()})},t.prototype.loadMore=function(t){_t("","","Api `loadMore` has been deprecated since version 9.8.0, use `setLoadDataCallback` instead."),this._chartStore.setLoadMoreCallback(t)},t.prototype.setLoadDataCallback=function(t){this._chartStore.setLoadDataCallback(t)},t.prototype.createIndicator=function(t,e,i,n){var a,r=this,o=Mt(t)?{name:t}:t;if(null===ri(o.name))return _t("createIndicator","value","indicator not supported, you may need to use registerIndicator to add one!!!"),null;var s=null===i||void 0===i?void 0:i.id,l=this.getDrawPaneById(null!==s&&void 0!==s?s:"");if(null!==l)this._chartStore.getIndicatorStore().addInstance(o,null!==s&&void 0!==s?s:"",null!==e&&void 0!==e&&e).then(function(t){var e;r._setPaneOptions(null!==i&&void 0!==i?i:{},null!==(e=l.getAxisComponent().buildTicks(!0))&&void 0!==e&&e)}).catch(function(t){});else{null!==s&&void 0!==s||(s=de(Wi.INDICATOR));var c=this._createPane(na,s,null!==i&&void 0!==i?i:{}),u=null!==(a=null===i||void 0===i?void 0:i.height)&&void 0!==a?a:Vi;c.setBounding({height:u}),this._chartStore.getIndicatorStore().addInstance(o,s,null!==e&&void 0!==e&&e).finally(function(){r.adjustPaneViewport(!0,!0,!0,!0,!0),null===n||void 0===n||n()})}return null!==s&&void 0!==s?s:null},t.prototype.overrideIndicator=function(t,e,i){var n=this;this._chartStore.getIndicatorStore().override(t,null!==e&&void 0!==e?e:null).then(function(t){var e=Z(t,2),a=e[0],r=e[1];(a||r)&&(n.adjustPaneViewport(!1,r,!0,r),null===i||void 0===i||i())}).catch(function(){})},t.prototype.getIndicatorByPaneId=function(t,e){return this._chartStore.getIndicatorStore().getInstanceByPaneId(t,e)},t.prototype.removeIndicator=function(t,e){var i,n,a,r=this._chartStore.getIndicatorStore(),o=r.removeInstance(t,e);if(o){var s=!1;if(t!==Wi.CANDLE&&!r.hasInstances(t)){var l=this.getDrawPaneById(t),c=this._drawPanes.findIndex(function(e){return e.getId()===t});if(null!==l){s=!0;var u=this._separatorPanes.get(l);if(At(u)){var d=null===u||void 0===u?void 0:u.getTopPane();try{for(var h=G(this._separatorPanes),p=h.next();!p.done;p=h.next()){var v=p.value;if(v[1].getTopPane().getId()===l.getId()){v[1].setTopPane(d);break}}}catch(g){i={error:g}}finally{try{p&&!p.done&&(n=h.return)&&n.call(h)}finally{if(i)throw i.error}}u.destroy(),this._separatorPanes.delete(l)}this._drawPanes.splice(c,1),l.destroy();var f=this._drawPanes[0];At(f)&&f.getId()===Wi.X_AXIS&&(f=this._drawPanes[1]),null===(a=this._separatorPanes.get(f))||void 0===a||a.destroy(),this._separatorPanes.delete(f)}}this.adjustPaneViewport(s,!0,!0,!0,!0)}},t.prototype.createOverlay=function(t,e){var i=[];if(Mt(t))i=[{name:t}];else if(Ct(t))i=t.map(function(t){return Mt(t)?{name:t}:t});else{var n=t;i=[n]}var a=!0;At(e)&&null!==this.getDrawPaneById(e)||(e=Wi.CANDLE,a=!1);var r=this._chartStore.getOverlayStore().addInstances(i,e,a);return Ct(t)?r:r[0]},t.prototype.getOverlayById=function(t){return this._chartStore.getOverlayStore().getInstanceById(t)},t.prototype.overrideOverlay=function(t){this._chartStore.getOverlayStore().override(t)},t.prototype.removeOverlay=function(t){var e;At(t)&&(e=Mt(t)?{id:t}:t),this._chartStore.getOverlayStore().removeInstance(e)},t.prototype.setPaneOptions=function(t){this._setPaneOptions(t,!1)},t.prototype.setZoomEnabled=function(t){this._chartStore.getTimeScaleStore().setZoomEnabled(t)},t.prototype.isZoomEnabled=function(){return this._chartStore.getTimeScaleStore().getZoomEnabled()},t.prototype.setScrollEnabled=function(t){this._chartStore.getTimeScaleStore().setScrollEnabled(t)},t.prototype.isScrollEnabled=function(){return this._chartStore.getTimeScaleStore().getScrollEnabled()},t.prototype.scrollByDistance=function(t,e){var i=Et(e)&&e>0?e:0,n=this._chartStore.getTimeScaleStore();if(n.startScroll(),i>0){var a=new le({duration:i});a.doFrame(function(e){var a=t*(e/i);n.scroll(a)}),a.start()}else n.scroll(t)},t.prototype.scrollToRealTime=function(t){var e=this._chartStore.getTimeScaleStore(),i=e.getBarSpace().bar,n=e.getLastBarRightSideDiffBarCount()-e.getInitialOffsetRightDistance()/i,a=n*i;this.scrollByDistance(a,t)},t.prototype.scrollToDataIndex=function(t,e){var i=this._chartStore.getTimeScaleStore(),n=(i.getLastBarRightSideDiffBarCount()+(this.getDataList().length-1-t))*i.getBarSpace().bar;this.scrollByDistance(n,e)},t.prototype.scrollToTimestamp=function(t,e){var i=pe(this.getDataList(),"timestamp",t);this.scrollToDataIndex(i,e)},t.prototype.zoomAtCoordinate=function(t,e,i){var n=Et(i)&&i>0?i:0,a=this._chartStore.getTimeScaleStore(),r=a.getBarSpace().bar,o=r*t,s=o-r;if(n>0){var l=0,c=new le({duration:n});c.doFrame(function(t){var i=s*(t/n),r=(i-l)/a.getBarSpace().bar*ke;a.zoom(r,e),l=i}),c.start()}else a.zoom(s/r*ke,e)},t.prototype.zoomAtDataIndex=function(t,e,i){var n=this._chartStore.getTimeScaleStore().dataIndexToCoordinate(e);this.zoomAtCoordinate(t,{x:n,y:0},i)},t.prototype.zoomAtTimestamp=function(t,e,i){var n=pe(this.getDataList(),"timestamp",e);this.zoomAtDataIndex(t,n,i)},t.prototype.convertToPixel=function(t,e){var i,n=e.paneId,a=void 0===n?Wi.CANDLE:n,r=e.absolute,o=void 0!==r&&r,s=[];if(a!==Wi.X_AXIS){var l=this.getDrawPaneById(a);if(null!==l){var c=this._chartStore.getTimeScaleStore(),u=l.getBounding(),d=(new Array).concat(t),h=this._xAxisPane.getAxisComponent(),p=l.getAxisComponent();s=d.map(function(t){var e={},i=t.dataIndex;if(Et(t.timestamp)&&(i=c.timestampToDataIndex(t.timestamp)),Et(i)&&(e.x=null===h||void 0===h?void 0:h.convertToPixel(i)),Et(t.value)){var n=null===p||void 0===p?void 0:p.convertToPixel(t.value);e.y=o?u.top+n:n}return e})}}return Ct(t)?s:null!==(i=s[0])&&void 0!==i?i:{}},t.prototype.convertFromPixel=function(t,e){var i,n=e.paneId,a=void 0===n?Wi.CANDLE:n,r=e.absolute,o=void 0!==r&&r,s=[];if(a!==Wi.X_AXIS){var l=this.getDrawPaneById(a);if(null!==l){var c=this._chartStore.getTimeScaleStore(),u=l.getBounding(),d=(new Array).concat(t),h=this._xAxisPane.getAxisComponent(),p=l.getAxisComponent();s=d.map(function(t){var e,i,n={};if(Et(t.x)){var a=null!==(e=null===h||void 0===h?void 0:h.convertFromPixel(t.x))&&void 0!==e?e:-1;n.dataIndex=a,n.timestamp=null!==(i=c.dataIndexToTimestamp(a))&&void 0!==i?i:void 0}if(Et(t.y)){var r=o?t.y-u.top:t.y;n.value=p.convertFromPixel(r)}return n})}}return Ct(t)?s:null!==(i=s[0])&&void 0!==i?i:{}},t.prototype.executeAction=function(t,e){var i;switch(t){case Tt.OnCrosshairChange:var n=K({},e);n.paneId=null!==(i=n.paneId)&&void 0!==i?i:Wi.CANDLE,this._chartStore.getTooltipStore().setCrosshair(n,{notExecuteAction:!0});break}},t.prototype.subscribeAction=function(t,e){this._chartStore.getActionStore().subscribe(t,e)},t.prototype.unsubscribeAction=function(t,e){this._chartStore.getActionStore().unsubscribe(t,e)},t.prototype.getConvertPictureUrl=function(t,e,i){var n=this,a=this._chartContainer.clientWidth,r=this._chartContainer.clientHeight,o=he("canvas",{width:"".concat(a,"px"),height:"".concat(r,"px"),boxSizing:"border-box"}),s=o.getContext("2d"),l=Wt(o);o.width=a*l,o.height=r*l,s.scale(l,l),s.fillStyle=null!==i&&void 0!==i?i:"#FFFFFF",s.fillRect(0,0,a,r);var c=null!==t&&void 0!==t&&t;return this._drawPanes.forEach(function(t){var e=n._separatorPanes.get(t);if(At(e)){var i=e.getBounding();s.drawImage(e.getImage(c),i.left,i.top,i.width,i.height)}var r=t.getBounding();s.drawImage(t.getImage(c),0,r.top,a,r.height)}),o.toDataURL("image/".concat(null!==e&&void 0!==e?e:"jpeg"))},t.prototype.resize=function(){this.adjustPaneViewport(!0,!0,!0,!0,!0)},t.prototype.destroy=function(){this._chartEvent.destroy(),this._drawPanes.forEach(function(t){t.destroy()}),this._drawPanes=[],this._separatorPanes.forEach(function(t){t.destroy()}),this._separatorPanes.clear(),this._container.removeChild(this._chartContainer)},t}(),Ca=new Map,ka=1;function Ia(t,e){var i;if(xt(),i=Mt(t)?document.getElementById(t):t,null===i)return bt("","","The chart cannot be initialized correctly. Please check the parameters. The chart container cannot be null and child elements need to be added!!!"),null;var n=Ca.get(i.id);if(At(n))return _t("","","The chart has been initialized on the dom!!!"),n;var a="k_line_chart_".concat(ka++);return n=new Sa(i,e),n.id=a,i.setAttribute("k-line-chart-id",a),Ca.set(a,n),n}var Ea=i(21396),Aa=i.n(Ea);function Pa(t,e,i,n){if(!t||!e||!i||!n)return t;try{var a=Aa().enc.Base64.parse(t),r=Aa().lib.WordArray.create(a.words.slice(0,4)),o=Aa().lib.WordArray.create(a.words.slice(4)),s=Aa().enc.Base64.parse(n),l=Aa().AES.decrypt({ciphertext:o},s,{iv:r,mode:Aa().mode.CBC,padding:Aa().pad.Pkcs7}),c=l.toString(Aa().enc.Utf8);return c||t}catch(u){return t}}function Ma(t,e){return Da.apply(this,arguments)}function Da(){return Da=(0,c.A)((0,l.A)().m(function t(e,i){var n,a;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e&&i){t.n=1;break}throw new Error("用户ID和指标ID不能为空");case 1:return t.p=1,t.n=2,(0,v.Ay)({url:"/api/indicator/getDecryptKey",method:"post",data:{userid:e,indicatorId:i}});case 2:if(n=t.v,1!==n.code||!n.data||!n.data.key){t.n=3;break}return t.a(2,n.data.key);case 3:throw new Error(n.msg||"获取解密密钥失败");case 4:t.n=6;break;case 5:throw t.p=5,a=t.v,new Error("无法获取解密密钥,请检查网络连接或联系管理员: "+(a.message||"未知错误"));case 6:return t.a(2)}},t,null,[[1,5]])})),Da.apply(this,arguments)}function Ta(t,e,i){return Ba.apply(this,arguments)}function Ba(){return Ba=(0,c.A)((0,l.A)().m(function t(e,i,n){var a;return(0,l.A)().w(function(t){while(1)switch(t.n){case 0:return t.n=1,Ma(i,n);case 1:return a=t.v,t.a(2,Pa(e,i,n,a))}},t)})),Ba.apply(this,arguments)}function Fa(t,e){if(1===e||!0===e)return!0;if(t&&t.length>100)try{var i=atob(t);if(i.length>50)return!0}catch(n){}return!1}var Ra={name:"KlineChart",props:{symbol:{type:String,default:""},market:{type:String,default:""},timeframe:{type:String,default:"1H"},theme:{type:String,default:"light"},activeIndicators:{type:Array,default:function(){return[]}},realtimeEnabled:{type:Boolean,default:!1},userId:{type:Number,default:null}},emits:["retry","price-change","load","indicator-toggle"],setup:function(t,e){var i=e.emit,n=(0,h.IJ)([]),a=(0,h.KR)(!1),r=(0,h.KR)(null),s=(0,h.KR)(!1),u=(0,h.KR)(!0),p=null,f=(0,h.KR)(!1),g=(0,h.IJ)(null),m=(0,h.KR)(t.theme||"light"),y=(0,h.KR)(null),b=(0,h.KR)(5e3),x=(0,h.KR)(!1),w=(0,h.KR)(1e4),S=(0,h.KR)(0),C=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(g.value){var e=Date.now(),i=Number(w.value||1e4);(t||!S.value||e-S.value>=i)&&(S.value=e,xt())}},k=(0,h.KR)([]),I=(0,h.KR)([]),E=(0,h.KR)([]),A=(0,h.KR)(null),P=(0,h.nI)(),M=P.proxy,D=(0,h.EW)(function(){return[{name:"line",title:M.$t("dashboard.indicator.drawing.line"),icon:"line"},{name:"horizontalLine",title:M.$t("dashboard.indicator.drawing.horizontalLine"),icon:"minus"},{name:"verticalLine",title:M.$t("dashboard.indicator.drawing.verticalLine"),icon:"column-width"},{name:"ray",title:M.$t("dashboard.indicator.drawing.ray"),icon:"arrow-right"},{name:"straightLine",title:M.$t("dashboard.indicator.drawing.straightLine"),icon:"menu"},{name:"parallelStraightLine",title:M.$t("dashboard.indicator.drawing.parallelLine"),icon:"menu"},{name:"priceLine",title:M.$t("dashboard.indicator.drawing.priceLine"),icon:"dollar"},{name:"priceChannelLine",title:M.$t("dashboard.indicator.drawing.priceChannel"),icon:"border"},{name:"fibonacciLine",title:M.$t("dashboard.indicator.drawing.fibonacciLine"),icon:"rise"},{name:"measure",title:M.$t("dashboard.indicator.drawing.measure"),icon:"drag"}]}),R=(0,h.KR)([{id:"sma",name:"SMA (简单移动平均)",shortName:"SMA",type:"line",defaultParams:{length:20}},{id:"ema",name:"EMA (指数移动平均)",shortName:"EMA",type:"line",defaultParams:{length:20}},{id:"rsi",name:"RSI (相对强弱)",shortName:"RSI",type:"line",defaultParams:{length:14}},{id:"macd",name:"MACD",shortName:"MACD",type:"macd",defaultParams:{fast:12,slow:26,signal:9}},{id:"bb",name:"布林带 (Bollinger Bands)",shortName:"BB",type:"band",defaultParams:{length:20,mult:2}},{id:"atr",name:"ATR (平均真实波幅)",shortName:"ATR",type:"line",defaultParams:{period:14}},{id:"cci",name:"CCI (商品通道指数)",shortName:"CCI",type:"line",defaultParams:{length:20}},{id:"williams",name:"Williams %R (威廉指标)",shortName:"W%R",type:"line",defaultParams:{length:14}},{id:"mfi",name:"MFI (资金流量指标)",shortName:"MFI",type:"line",defaultParams:{length:14}},{id:"adx",name:"ADX (平均趋向指数)",shortName:"ADX",type:"adx",defaultParams:{length:14}},{id:"obv",name:"OBV (能量潮)",shortName:"OBV",type:"line",defaultParams:{}},{id:"adosc",name:"ADOSC (积累/派发振荡器)",shortName:"ADOSC",type:"line",defaultParams:{fast:3,slow:10}},{id:"ad",name:"AD (积累/派发线)",shortName:"AD",type:"line",defaultParams:{}},{id:"kdj",name:"KDJ (随机指标)",shortName:"KDJ",type:"line",defaultParams:{period:9,k:3,d:3}}]),L=function(e){return t.activeIndicators.some(function(t){return t.id===e})},N=function(t){if(g.value){var e={line:"segment",horizontalLine:"horizontalStraightLine",verticalLine:"verticalStraightLine",ray:"rayLine",straightLine:"straightLine",parallelStraightLine:"parallelStraightLine",priceLine:"priceLine",priceChannelLine:"priceChannelLine",fibonacciLine:"fibonacciLine",measure:"priceRangeMeasure"},i=e[t]||t;if(A.value!==t){A.value=t;try{var n=["priceRangeMeasure"];if(n.includes(i)){if("function"!==typeof g.value.overrideOverlay)return void(A.value=null);g.value.overrideOverlay({name:i,lock:!1})}else{var a={name:i,lock:!1,extendData:{isDrawing:!0}},r=g.value.createOverlay(a);r?E.value.push(r):A.value=null}}catch(o){A.value=null}}else{A.value=null;try{"function"===typeof g.value.overrideOverlay&&g.value.overrideOverlay(null)}catch(s){}}}},O=function(){if(g.value)try{E.value.forEach(function(t){try{"function"===typeof g.value.removeOverlay?g.value.removeOverlay(t):"function"===typeof g.value.removeOverlayById&&g.value.removeOverlayById(t)}catch(e){}}),E.value=[],A.value=null,"function"===typeof g.value.overrideOverlay&&g.value.overrideOverlay(null)}catch(t){}},z=function(t){var e=L(t.id);if(e)i("indicator-toggle",{action:"remove",indicator:{id:t.id}});else{var n=(0,d.A)((0,d.A)({},t),{},{params:(0,d.A)({},t.defaultParams),calculate:null});i("indicator-toggle",{action:"add",indicator:n})}},V=(0,h.KR)(null),W=(0,h.KR)(!1),H=(0,h.KR)(!1),$=(0,h.KR)(!1),Y=(0,h.EW)(function(){return"dark"===m.value?{backgroundColor:"#141414",textColor:"#d1d4dc",textColorSecondary:"#787b86",borderColor:"#2a2a2a",gridLineColor:"#252525",gridLineColorDashed:"#363c4e",tooltipBg:"rgba(25, 27, 32, 0.95)",tooltipBorder:"#333",tooltipText:"#ccc",tooltipTextSecondary:"#888",axisLabelColor:"#787b86",splitAreaColor:["rgba(250,250,250,0.05)","rgba(200,200,200,0.02)"],dataZoomBorder:"#2a2a2a",dataZoomFiller:"rgba(41, 98, 255, 0.15)",dataZoomHandle:"#13c2c2",dataZoomText:"transparent",dataZoomBg:"#252525"}:{backgroundColor:"#fff",textColor:"#333",textColorSecondary:"#666",borderColor:"#e8e8e8",gridLineColor:"#e8e8e8",gridLineColorDashed:"#e8e8e8",tooltipBg:"rgba(255, 255, 255, 0.95)",tooltipBorder:"#e8e8e8",tooltipText:"#333",tooltipTextSecondary:"#666",axisLabelColor:"#666",splitAreaColor:["rgba(250,250,250,0.05)","rgba(200,200,200,0.02)"],dataZoomBorder:"#e8e8e8",dataZoomFiller:"rgba(24, 144, 255, 0.15)",dataZoomHandle:"#1890ff",dataZoomText:"#999",dataZoomBg:"#f0f2f5"}}),X=function(t){return"dark"===m.value?["#13c2c2","#e040fb","#ffeb3b","#00e676","#ff6d00","#9c27b0"][t%6]:["#13c2c2","#9c27b0","#f57c00","#1976d2","#c2185b","#7b1fa2"][t%6]},K=function(){return new Promise(function(t,e){if(window.pyodide)return V.value=window.pyodide,H.value=!0,void t(window.pyodide);W.value=!0;var i="0.25.0",n=function(t){return t&&t.endsWith("/")?t:t?t+"/":t},a="/assets/pyodide/v".concat(i,"/full/"),r="https://cdn.jsdelivr.net/pyodide/v".concat(i,"/full/"),o=n({NODE_ENV:"production",VUE_APP_API_BASE_URL:"/api",VUE_APP_PREVIEW:"false",BASE_URL:"/"}.VUE_APP_PYODIDE_LOCAL_BASE||a),s=n({NODE_ENV:"production",VUE_APP_API_BASE_URL:"/api",VUE_APP_PREVIEW:"false",BASE_URL:"/"}.VUE_APP_PYODIDE_CDN_BASE||r),u=({NODE_ENV:"production",VUE_APP_API_BASE_URL:"/api",VUE_APP_PREVIEW:"false",BASE_URL:"/"}.VUE_APP_PYODIDE_PREFER_CDN||"").toString().toLowerCase(),d=!u||("true"===u||"1"===u||"yes"===u),h=function(t){return new Promise(function(e,i){var n=document.querySelector('script[data-pyodide-src="'.concat(t,'"]'));if(n)return"function"===typeof window.loadPyodide?e():(n.addEventListener("load",function(){return e()},{once:!0}),void n.addEventListener("error",function(){return i(new Error("Pyodide 脚本加载失败"))},{once:!0}));var a=document.createElement("script");a.dataset.pyodideSrc=t,a.src=t,a.onload=function(){return e()},a.onerror=function(){return i(new Error("Pyodide 脚本加载失败"))},document.head.appendChild(a)})},p=function(){var e=(0,c.A)((0,l.A)().m(function e(i){return(0,l.A)().w(function(e){while(1)switch(e.n){case 0:if("function"===typeof window.loadPyodide){e.n=1;break}throw new Error("loadPyodide 函数未找到");case 1:return e.n=2,window.loadPyodide({indexURL:i});case 2:return window.pyodide=e.v,e.n=3,window.pyodide.loadPackage(["pandas","numpy"]);case 3:V.value=window.pyodide,H.value=!0,W.value=!1,t(window.pyodide);case 4:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}();(0,c.A)((0,l.A)().m(function t(){var e,i,n;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e=function(){var t=(0,c.A)((0,l.A)().m(function t(e){return(0,l.A)().w(function(t){while(1)switch(t.n){case 0:return t.n=1,h(e+"pyodide.js");case 1:return t.n=2,p(e);case 2:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),t.p=1,!d){t.n=3;break}return t.n=2,e(s);case 2:t.n=4;break;case 3:return t.n=4,e(o);case 4:t.n=9;break;case 5:return t.p=5,i=t.v,t.p=6,t.n=7,e(d?o:s);case 7:t.n=9;break;case 8:throw t.p=8,n=t.v,n||i;case 9:return t.a(2)}},t,null,[[6,8],[1,5]])}))().catch(function(t){W.value=!1,$.value=!0,e(t)})})},j=function(t){if(!t||"string"!==typeof t)return null;try{var e={},i=t.match(/(\w+)\s*=\s*(\d+\.?\d*)/g);return i&&i.forEach(function(t){var i=t.split("=");if(2===i.length){var n=i[0].trim(),a=parseFloat(i[1].trim());isNaN(a)||(e[n]=a)}}),{params:e,plots:[],success:!0}}catch(n){return{params:{},plots:[],success:!1}}},U=function(){var e=(0,c.A)((0,l.A)().m(function e(i,n){var a,r,s,c,u,d,h,p,v,f,g,m,y,_,b,x,w,S,C=arguments;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(a=C.length>2&&void 0!==C[2]?C[2]:{},r=C.length>3&&void 0!==C[3]?C[3]:{},H.value&&V.value){e.n=5;break}if(!W.value){e.n=4;break}s=0;case 1:if(!(W.value&&s<30)){e.n=4;break}return e.n=2,new Promise(function(t){return setTimeout(t,500)});case 2:if(s++,!H.value||!V.value){e.n=3;break}return e.a(3,4);case 3:e.n=1;break;case 4:if(H.value&&V.value){e.n=5;break}throw W.value?(W.value=!1,$.value=!0):$.value=!0,new Error("Python 引擎未就绪,请等待加载完成");case 5:if(e.p=5,c=i,u=r.is_encrypted||r.isEncrypted||0,!u&&!Fa(i,u)){e.n=11;break}if(d=r.user_id||r.userId||t.userId||a.userId,h=r.originalId||r.id||a.indicatorId,!d||!h){e.n=10;break}return e.p=6,e.n=7,Ta(c,d,h);case 7:c=e.v,e.n=9;break;case 8:throw e.p=8,x=e.v,new Error("代码解密失败,无法执行指标: "+(x.message||"未知错误"));case 9:e.n=11;break;case 10:throw new Error("缺少必要的解密参数(用户ID或指标ID),无法执行加密指标");case 11:return p=n.map(function(t){var e=t.timestamp||t.time;return e<1e10&&(e*=1e3),{time:Math.floor(e/1e3),open:parseFloat(t.open)||0,high:parseFloat(t.high)||0,low:parseFloat(t.low)||0,close:parseFloat(t.close)||0,volume:parseFloat(t.volume)||0}}),v=JSON.stringify(p),f=JSON.stringify(a||{}),g=v.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r"),m=f.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r"),y="\nimport json\nimport pandas as pd\nimport numpy as np\n\n# 递归清理 NaN 值的函数\ndef clean_nan(obj):\n if isinstance(obj, dict):\n return {k: clean_nan(v) for k, v in obj.items()}\n elif isinstance(obj, list):\n return [clean_nan(item) for item in obj]\n elif isinstance(obj, (pd.Series, np.ndarray)):\n return [None if (isinstance(x, float) and (np.isnan(x) or np.isinf(x))) else x for x in obj]\n elif isinstance(obj, (float, np.floating)):\n if np.isnan(obj) or np.isinf(obj):\n return None\n return float(obj)\n elif pd.isna(obj):\n return None\n else:\n return obj\n\n# 接收 JSON 数据\nraw_data = json.loads('".concat(g,"')\nparams = json.loads('").concat(m,"')\n\n# 将前端参数注入为指标代码可直接使用的变量(对齐回测/实盘执行环境)\n# 兼容多种命名(snake_case / camelCase)\ndef _get_param(key, default=None):\n if key in params:\n return params.get(key, default)\n # camelCase fallback\n camel = ''.join([key.split('_')[0]] + [p.capitalize() for p in key.split('_')[1:]])\n return params.get(camel, default)\n\ntry:\n leverage = float(_get_param('leverage', 1) or 1)\nexcept Exception:\n leverage = 1\n\ntrade_direction = _get_param('trade_direction', _get_param('tradeDirection', 'both')) or 'both'\n\ntry:\n initial_position = int(_get_param('initial_position', 0) or 0)\nexcept Exception:\n initial_position = 0\n\ntry:\n initial_avg_entry_price = float(_get_param('initial_avg_entry_price', 0.0) or 0.0)\nexcept Exception:\n initial_avg_entry_price = 0.0\n\ntry:\n initial_position_count = int(_get_param('initial_position_count', 0) or 0)\nexcept Exception:\n initial_position_count = 0\n\ntry:\n initial_last_add_price = float(_get_param('initial_last_add_price', 0.0) or 0.0)\nexcept Exception:\n initial_last_add_price = 0.0\n\ntry:\n initial_highest_price = float(_get_param('initial_highest_price', 0.0) or 0.0)\nexcept Exception:\n initial_highest_price = 0.0\n\n# 转换为 DataFrame\ndf = pd.DataFrame(raw_data)\n\n# 转换数据类型\ndf['open'] = df['open'].astype(float)\ndf['high'] = df['high'].astype(float)\ndf['low'] = df['low'].astype(float)\ndf['close'] = df['close'].astype(float)\ndf['volume'] = df['volume'].astype(float)\n\n# 用户代码(已解密)\n").concat(c,"\n\n# 构造输出(如果用户没有定义 output,则尝试从 result_json 获取)\nif 'output' not in locals():\n if 'result_json' in locals():\n output = json.loads(result_json)\n else:\n output = {\"plots\": []}\nelse:\n # 确保 output 是字典格式\n if isinstance(output, str):\n output = json.loads(output)\n\n# 清理 output 中的所有 NaN 值\noutput = clean_nan(output)\n\n# 返回 JSON 字符串\njson.dumps(output)\n"),e.n=12,V.value.runPythonAsync(y);case 12:if(_=e.v,_&&"string"===typeof _){e.n=13;break}throw new Error("Python 代码执行后未返回有效的 JSON 字符串,返回类型: ".concat((0,o.A)(_)));case 13:e.p=13,b=JSON.parse(_),e.n=15;break;case 14:throw e.p=14,w=e.v,new Error("JSON 解析失败: ".concat(w.message,"。可能是数据中包含 NaN 或其他无效值。"));case 15:if(b){e.n=16;break}return e.a(2,{plots:[],signals:[],calculatedVars:{}});case 16:return b.plots&&Array.isArray(b.plots)||(b.plots=[]),b.plots=b.plots.map(function(t){return t.data&&Array.isArray(t.data)&&(t.data=t.data.map(function(t){return null===t||void 0===t||"number"===typeof t&&isNaN(t)?null:t})),t}),b.signals&&Array.isArray(b.signals)&&(b.signals=b.signals.map(function(t){return t.data&&Array.isArray(t.data)&&(t.data=t.data.map(function(t){return null===t||void 0===t||"number"===typeof t&&isNaN(t)?null:t})),t})),b.calculatedVars||(b.calculatedVars={}),e.a(2,b);case 17:throw e.p=17,S=e.v,new Error("Python 执行失败: ".concat(S.message));case 18:return e.a(2)}},e,null,[[13,14],[6,8],[5,17]])}));return function(t,i){return e.apply(this,arguments)}}();function G(t,e){for(var i=[],n=0;nn-e+1){var c=(t[o-1].high+t[o-1].low+t[o-1].close)/3;s>c?a+=l:sp&&h>0?o.push(h):o.push(0),p>h&&p>0?s.push(p):s.push(0)}for(var v=[],f=[],g=[],m=0;m=e-1){var w=v[m],S=f[m],C=g[m];if(0===w?(i.push(0),n.push(0)):(i.push(S/w*100),n.push(C/w*100)),m>=e-1){var k=i[m]+n[m],I=0===k?0:Math.abs(i[m]-n[m])/k*100;if(m===e-1)a.push(I);else if(m===e){var E=Math.abs(i[m-1]-n[m-1])/(i[m-1]+n[m-1])*100;a.push((E+I)/2)}else a.push((a[m-1]*(e-1)+I)/e)}}}return{adx:a,plusDI:i,minusDI:n}}function nt(t){for(var e=[],i=0,n=0;nt[n-1].close?i+=t[n].volume:t[n].close255?12:7)},0),m=g+2*h,y=v+2*p,_=(null===(i=r.extendData)||void 0===i?void 0:i.side)||(null===(n=r.extendData)||void 0===n?void 0:n.type)||"buy",b="buy"===_,x=b?u:u-y,w=d,S=w,C=b?x:x+y;return[{type:"line",attrs:{coordinates:[{x:c,y:S},{x:c,y:C}]},styles:{style:"stroke",color:l,dashedValue:[2,2]},ignoreEvent:!0},{type:"circle",attrs:{x:c,y:w,r:4},styles:{style:"fill",color:l},ignoreEvent:!0},{type:"rect",attrs:{x:c-m/2,y:x,width:m,height:y,r:4},styles:{style:"fill",color:l,borderSize:0},ignoreEvent:!0},{type:"text",attrs:{x:c,y:x+y/2,text:f,align:"center",baseline:"middle"},styles:{color:"#ffffff",size:v,weight:"bold",backgroundColor:l,borderRadius:5},ignoreEvent:!0}]}}),Ni({name:"priceRangeMeasure",totalStep:2,lock:!1,needDefaultPointFigure:!1,needDefaultXAxisFigure:!1,needDefaultYAxisFigure:!1,createPointFigures:function(t){var e=t.coordinates,i=t.overlay,n=t.ctx;if(!e[0]||!e[1])return[];var a=i.points[0],r=i.points[1];if(!a||!r)return[];var o=a.value,s=r.value,l=s-o,c=l/o*100,u=a.timestamp,d=r.timestamp,h=Math.abs(d-u),p="",v=Math.floor(h/864e5),f=Math.floor(h%864e5/36e5),g=Math.floor(h%36e5/6e4),m=Math.floor(h%6e4/1e3);p=v>0?"".concat(v,"天").concat(f>0?f+"小时":""):f>0?"".concat(f,"小时").concat(g>0?g+"分钟":""):g>0?"".concat(g,"分钟"):"".concat(m,"秒");var y=0;try{if(n&&n.chart){var _=n.chart.getData();if(_&&Array.isArray(_)&&_.length>0){var b=_.findIndex(function(t){return Math.abs(t.timestamp-u)<1e3}),x=_.findIndex(function(t){return Math.abs(t.timestamp-d)<1e3});b>=0&&x>=0&&(y=Math.abs(x-b))}}}catch(z){}var w=c>=0?"+".concat(c.toFixed(2),"%"):"".concat(c.toFixed(2),"%"),S=l>=0?"+".concat(l.toFixed(2)):"".concat(l.toFixed(2)),C="".concat(w," ").concat(S);y>0?(C+=" (".concat(y,"根"),p&&(C+=" / ".concat(p)),C+=")"):p&&(C+=" (".concat(p,")"));var k=l>=0,I=k?"#0ecb81":"#f6465d",E=k?"#0ecb81":"#f6465d",A=k?"rgba(14, 203, 129, 0.1)":"rgba(246, 70, 93, 0.1)",P=e[0].x,M=e[0].y,D=e[1].x,T=e[1].y,B=(P+D)/2,F=(M+T)/2,R=-20,L=12,N=7*C.length+16,O=L+8;return[{type:"line",attrs:{coordinates:[{x:P,y:M},{x:D,y:T}]},styles:{style:"stroke",color:I,size:2,dashedValue:[4,4]},ignoreEvent:!1},{type:"circle",attrs:{x:P,y:M,r:4},styles:{style:"fill",color:I},ignoreEvent:!1},{type:"circle",attrs:{x:D,y:T,r:4},styles:{style:"fill",color:I},ignoreEvent:!1},{type:"rect",attrs:{x:B-N/2,y:F+R-O/2,width:N,height:O,r:4},styles:{style:"fill",color:A,borderSize:1,borderColor:I},ignoreEvent:!1},{type:"text",attrs:{x:B,y:F+R,text:C,align:"center",baseline:"middle"},styles:{color:E,size:L,weight:"bold"},ignoreEvent:!1}]}});var st=function(t){return t.map(function(t){var e=t.time||t.timestamp;return"string"===typeof e&&(e=parseInt(e)),e<1e10&&(e*=1e3),{timestamp:e,open:parseFloat(t.open),high:parseFloat(t.high),low:parseFloat(t.low),close:parseFloat(t.close),volume:parseFloat(t.volume||0)}}).filter(function(t){return t.timestamp&&!isNaN(t.open)&&!isNaN(t.high)&&!isNaN(t.low)&&!isNaN(t.close)}).sort(function(t,e){return t.timestamp-e.timestamp})},lt=function(t){if(t.length>0){var e=t[t.length-1];if(t.length>1){var n=t[t.length-2],a=e.close.toFixed(2),r=(e.close-n.close)/n.close*100;i("price-change",{price:a,change:r})}else{var o=e.close.toFixed(2);i("price-change",{price:o,change:0})}}},ct=function(t){return t.map(function(t){return{time:Math.floor(t.timestamp/1e3),open:t.open,high:t.high,low:t.low,close:t.close,volume:t.volume}})},ut=function(t,e,i){var n=new Date(1e3*t),a=new Date(1e3*e);switch(i){case"1m":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()&&n.getHours()===a.getHours()&&n.getMinutes()===a.getMinutes();case"5m":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()&&n.getHours()===a.getHours()&&Math.floor(n.getMinutes()/5)===Math.floor(a.getMinutes()/5);case"15m":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()&&n.getHours()===a.getHours()&&Math.floor(n.getMinutes()/15)===Math.floor(a.getMinutes()/15);case"30m":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()&&n.getHours()===a.getHours()&&Math.floor(n.getMinutes()/30)===Math.floor(a.getMinutes()/30);case"1H":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()&&n.getHours()===a.getHours();case"4H":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()&&Math.floor(n.getHours()/4)===Math.floor(a.getHours()/4);case"1D":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate();case"1W":var r=Math.floor((n.getTime()-new Date(n.getFullYear(),0,1).getTime())/6048e5),o=Math.floor((a.getTime()-new Date(a.getFullYear(),0,1).getTime())/6048e5);return n.getFullYear()===a.getFullYear()&&r===o;default:return t===e}},dt=function(){var e=(0,c.A)((0,l.A)().m(function e(){var i,o,s,c,d,p,f,m=arguments;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(i=m.length>0&&void 0!==m[0]&&m[0],t.symbol){e.n=1;break}return e.a(2);case 1:if(!a.value||i){e.n=2;break}return e.a(2);case 2:return a.value=!0,r.value=null,e.p=3,o=[],e.p=4,e.n=5,(0,v.Ay)({url:"/api/indicator/kline",method:"get",params:{market:t.market,symbol:t.symbol,timeframe:t.timeframe,limit:500}});case 5:if(s=e.v,1!==s.code||!s.data||!Array.isArray(s.data)){e.n=6;break}o=st(s.data),e.n=7;break;case 6:throw c=s.msg||"获取K线数据失败","tiingo_subscription"===s.hint&&(c=M.$t("dashboard.indicator.error.tiingoSubscription")||"Forex 1-minute data requires Tiingo paid subscription"),new Error(c);case 7:e.n=9;break;case 8:throw e.p=8,p=e.v,p;case 9:if(o&&0!==o.length){e.n=10;break}throw new Error("未获取到K线数据");case 10:n.value=o,u.value=!0,d=ct(o),lt(d),(0,h.dY)(function(){if(g.value){var e=n.value.filter(function(t){return t.timestamp&&!isNaN(t.open)&&!isNaN(t.high)&&!isNaN(t.low)&&!isNaN(t.close)});if(e.length>0&&g.value){try{g.value.applyNewData(e)}catch(i){g.value.applyNewData(e)}setTimeout(function(){g.value&&xt()},100)}}else mt();t.realtimeEnabled&&(gt(),ft())}),e.n=12;break;case 11:if(e.p=11,f=e.v,r.value=M.$t("dashboard.indicator.error.loadDataFailed")+": "+(f.message||M.$t("dashboard.indicator.error.loadDataFailedDesc")),n.value=[],g.value)try{g.value.applyNewData([])}catch(l){}case 12:return e.p=12,a.value=!1,e.f(12);case 13:return e.a(2)}},e,null,[[4,8],[3,11,12,13]])}));return function(){return e.apply(this,arguments)}}(),ht=function(){var e=(0,c.A)((0,l.A)().m(function e(i){return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.symbol&&n.value&&0!==n.value.length){e.n=1;break}return e.a(2);case 1:if(!s.value&&!p){e.n=6;break}if(!p){e.n=5;break}return e.p=2,e.n=3,p;case 3:e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2);case 6:if(u.value){e.n=7;break}return g.value&&"function"===typeof g.value.noMoreData&&g.value.noMoreData(),e.a(2);case 7:return s.value=!0,p=(0,c.A)((0,l.A)().m(function e(){var a,r,o,c,d,f;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.n=1,(0,h.dY)();case 1:return e.p=1,a=Math.floor(i/1e3),e.n=2,(0,v.Ay)({url:"/api/indicator/kline",method:"get",params:{market:t.market,symbol:t.symbol,timeframe:t.timeframe,limit:500,before_time:a}});case 2:if(r=e.v,1!==r.code||!r.data||!Array.isArray(r.data)){e.n=5;break}if(o=st(r.data),0!==o.length){e.n=3;break}return u.value=!1,g.value&&"function"===typeof g.value.noMoreData&&g.value.noMoreData(),e.a(2);case 3:if(c=o.filter(function(t){return t.timestamp0&&(a=st(i.data),r=(0,F.A)(n.value),a.length>0&&(o=Math.floor(a[a.length-1].timestamp/1e3),s=Math.floor(r[r.length-1].timestamp/1e3),ut(o,s,t.timeframe)?(c=r[r.length-1],u=a[a.length-1],r[r.length-1]={timestamp:c.timestamp,open:c.open,high:Math.max(c.high,u.high),low:Math.min(c.low,u.low),close:u.close,volume:u.volume},n.value=r,d=ct(n.value),lt(d),g.value&&"function"===typeof g.value.updateData?(h=n.value.length-1,g.value.updateData(r[h]),C(!1)):g.value&&(g.value.applyNewData(n.value),C(!1))):o>s&&(p=a.filter(function(e){var i=Math.floor(e.timestamp/1e3);return!r.some(function(e){var n=Math.floor(e.timestamp/1e3);return ut(i,n,t.timeframe)})}),p.length>0&&(n.value=[].concat((0,F.A)(r),(0,F.A)(p)),n.value.length>500&&(n.value=n.value.slice(-500)),f=ct(n.value),lt(f),g.value&&"function"===typeof g.value.applyMoreData?(g.value.applyMoreData(p),C(!0)):g.value&&(g.value.applyNewData(n.value),C(!0)))))),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[1,3]])}));return function(){return e.apply(this,arguments)}}(),ft=function(){y.value&&clearInterval(y.value);var e={"1m":5e3,"5m":1e4,"15m":15e3,"30m":3e4,"1H":6e4,"4H":3e5,"1D":6e5,"1W":18e5},i=e[t.timeframe]||1e4;b.value=Math.min(i,1e3),t.realtimeEnabled&&t.symbol&&n.value.length>0&&(y.value=setInterval(function(){!a.value&&t.symbol&&n.value&&n.value.length>0&&vt()},b.value))},gt=function(){y.value&&(clearInterval(y.value),y.value=null)},mt=function(){var t=document.getElementById("kline-chart-container");if(t)if(0!==t.clientWidth&&0!==t.clientHeight){if(g.value){try{g.value.destroy()}catch(y){}g.value=null}try{var e=document.getElementById("kline-chart-container");if(!e)throw new Error("容器元素不存在");try{g.value=Ia(e,{drawingBarVisible:!0,overlay:{visible:!0}})}catch(y){g.value=Ia(e)}if(g.value&&"function"===typeof g.value.setDrawingBarVisible?g.value.setDrawingBarVisible(!0):g.value&&"function"===typeof g.value.setDrawingBar?g.value.setDrawingBar(!0):g.value&&"function"===typeof g.value.enableDrawing&&g.value.enableDrawing(!0),!g.value)throw new Error("图表初始化失败:无法创建图表实例");if(g.value&&("function"===typeof g.value.setDrawingBarVisible&&g.value.setDrawingBarVisible(!0),"function"===typeof g.value.setDrawingBar&&g.value.setDrawingBar(!0),"function"===typeof g.value.enableDrawing&&g.value.enableDrawing(!0)),_t(),g.value&&"function"===typeof g.value.subscribeAction){if(g.value.subscribeAction("onOverlayCreated",function(t){if(A.value&&t&&t.id){var e={line:"segment",horizontalLine:"horizontalStraightLine",verticalLine:"verticalStraightLine",ray:"rayLine",straightLine:"straightLine",parallelStraightLine:"parallelStraightLine",priceLine:"priceLine",priceChannelLine:"priceChannelLine",fibonacciLine:"fibonacciLine",measure:"priceRangeMeasure"},i=e[A.value];if(!t.name||t.name===i||"priceRangeMeasure"===i){E.value.push(t.id),A.value=null;try{"function"===typeof g.value.overrideOverlay&&g.value.overrideOverlay(null)}catch(y){}}}}),"function"===typeof g.value.subscribeAction)try{g.value.subscribeAction("onOverlayComplete",function(t){A.value&&t&&t.id&&(E.value.push(t.id),A.value=null)})}catch(y){}g.value.subscribeAction("onOverlayRemoved",function(t){var e=E.value.indexOf(t);e>-1&&E.value.splice(e,1)})}if(g.value&&"function"===typeof g.value.subscribeAction){var i=null,a=!1;g.value.subscribeAction("onVisibleRangeChange",function(){var t=(0,c.A)((0,l.A)().m(function t(e){var r,o,c,d,h,v;return(0,l.A)().w(function(t){while(1)switch(t.n){case 0:if(!e||"number"!==typeof e.from){t.n=5;break}if(a){t.n=1;break}return i=e.from,a=!0,setTimeout(function(){f.value=!0},1e3),t.a(2);case 1:if(f.value){t.n=2;break}return i=e.from,t.a(2);case 2:if(!(s.value&&e.from<=0)){t.n=3;break}try{g.value&&"function"===typeof g.value.setVisibleRange&&(r=n.value.length,r>0&&(o=g.value.getVisibleRange(),o&&(c=Math.ceil((o.to-o.from)*r/100),d=.1,h=Math.min(100,d+c/r*100),g.value.setVisibleRange(d,h))))}catch(y){}return t.a(2);case 3:if(!(e.from<=5&&!s.value&&!p&&u.value&&f.value)){t.n=4;break}if(!(null!==i&&i>e.from)){t.n=4;break}if(!(n.value.length>0)){t.n=4;break}return v=n.value[0].timestamp,t.n=4,ht(v);case 4:i=e.from;case 5:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}())}if(n.value&&n.value.length>0){var o=n.value.filter(function(t){return t.timestamp&&!isNaN(t.open)&&!isNaN(t.high)&&!isNaN(t.low)&&!isNaN(t.close)});if(o.length>0){try{g.value.applyNewData(o)}catch(y){try{g.value.applyNewData(o)}catch(_){}}try{g.value.createIndicator("VOL",!1,{height:100,dragEnabled:!0})}catch(y){}(0,h.dY)(function(){xt()})}}window.addEventListener("resize",yt)}catch(r){r.value=M.$t("dashboard.indicator.error.chartInitFailed")+": "+(r.message||"未知错误")}}else{var d=0,v=10,m=function(){var t=document.getElementById("kline-chart-container");t&&t.clientWidth>0&&t.clientHeight>0?mt():d0&&t.clientHeight>0&&mt()}},_t=function(){if(g.value){var t=Y.value,e="dark"===m.value;g.value.setStyles({grid:{show:!0,horizontal:{show:!0,color:t.gridLineColor,style:"dashed",size:1},vertical:{show:!1}},candle:{priceMark:{show:!0,high:{show:!0,color:t.axisLabelColor},low:{show:!0,color:t.axisLabelColor}},tooltip:{showRule:"always",showType:"standard",labels:[M.$t("dashboard.indicator.tooltip.time"),M.$t("dashboard.indicator.tooltip.open"),M.$t("dashboard.indicator.tooltip.high"),M.$t("dashboard.indicator.tooltip.low"),M.$t("dashboard.indicator.tooltip.close"),M.$t("dashboard.indicator.tooltip.volume")],values:function(t){var e=new Date(t.timestamp);return["".concat(e.getFullYear(),"-").concat(e.getMonth()+1,"-").concat(e.getDate()," ").concat(e.getHours(),":").concat(e.getMinutes()),t.open.toFixed(2),t.high.toFixed(2),t.low.toFixed(2),t.close.toFixed(2),t.volume.toFixed(0)]}},bar:{upColor:e?"#0ecb81":"#13c2c2",downColor:e?"#f6465d":"#fa541c",noChangeColor:t.borderColor}},indicator:{tooltip:{showRule:"always",showType:"standard"}},xAxis:{show:!0,axisLine:{show:!0,color:t.borderColor}},yAxis:{show:!0,axisLine:{show:!1}},crosshair:{show:!0,horizontal:{show:!0,line:{show:!0,style:"dashed",color:t.gridLineColor,size:1}},vertical:{show:!0,line:{show:!0,style:"dashed",color:t.gridLineColor,size:1}}},watermark:{show:!1}})}},bt=function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2,r=arguments.length>5&&void 0!==arguments[5]&&arguments[5];try{var o={name:t,shortName:t,calc:e,figures:i,calcParams:n,precision:a,series:r?"price":"normal"};return ai(o),!0}catch(s){return!(!s.message||!s.message.includes("already registered"))}},xt=function(){var e=(0,c.A)((0,l.A)().m(function e(){var i,a,r,o;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!x.value){e.n=1;break}return e.a(2);case 1:if(g.value&&0!==n.value.length){e.n=2;break}return e.a(2);case 2:x.value=!0,e.p=3;try{I.value.length>0&&g.value&&(I.value.forEach(function(t){try{"function"===typeof g.value.removeOverlay?g.value.removeOverlay(t):"function"===typeof g.value.removeOverlayById&&g.value.removeOverlayById(t)}catch(e){}}),I.value=[])}catch(s){}try{k.value.length>0&&(k.value.forEach(function(t){var e="string"===typeof t?t:t.name,i="string"===typeof t?void 0:t.paneId;i?g.value.removeIndicator(i,e):(g.value.removeIndicator("candle_pane",e),g.value.removeIndicator(e))}),k.value=[])}catch(s){}i=ct(n.value),a=(0,l.A)().m(function e(){var n,a,r,s,c,u,d,h,p,v,f,m,y,b,x,w,S,C,E,A,P,M,D,T,R,L,N,O,z,V,H,Y,K,j,st,lt,ct,ut,dt,ht,pt,vt,ft,gt,mt,yt,_t,xt,wt,St,Ct,kt,It,Et,At,Pt,Mt,Dt,Tt,Bt,Ft,Rt,Lt,Nt,Ot,zt,Vt,Wt,Ht,$t,Yt,Xt,Kt,jt,Ut,Gt,Zt,qt,Jt,Qt,te,ee,ie,ne,ae,re,oe,se,le,ce,ue,de,he,pe,ve,fe,ge,me,ye,_e,be,xe,we,Se,Ce,ke,Ie,Ee,Ae,Pe,Me,De,Te,Be,Fe,Re,Le,Ne,Oe,ze,Ve,We,He,$e,Ye,Xe,Ke,je,Ue,Ge,Ze,qe,Je,Qe,ti,ei,ii,ni,ai,ri,oi,si,li,ci,ui,di,hi,pi,vi,fi,gi,mi,yi,_i;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(n=t.activeIndicators[o],e.p=1,"python"!==n.type){e.n=31;break}if(n.code){e.n=2;break}return e.a(2,0);case 2:if(e.p=2,!n.calculate||"function"!==typeof n.calculate){e.n=15;break}return e.n=3,n.calculate(i,n.params||{});case 3:if(a=e.v,r=[],a&&a.plots&&Array.isArray(a.plots)&&(r=(0,F.A)(a.plots)),!(a&&a.signals&&Array.isArray(a.signals))){e.n=14;break}s=(0,_.A)(a.signals),e.p=4,s.s();case 5:if((c=s.n()).done){e.n=11;break}if(u=c.value,!(u.data&&Array.isArray(u.data)&&u.data.length>0)){e.n=10;break}for(d=[],h=0;h0&&g.value){M=(0,_.A)(v);try{for(M.s();!(D=M.n()).done;){T=D.value;try{R=T.timestamp,R<1e10&&(R*=1e3),L=T.text,"function"===typeof g.value.createOverlay&&(N=g.value.createOverlay({name:"signalTag",points:[{timestamp:R,value:T.price},{timestamp:R,value:T.anchorPrice}],extendData:{text:L,color:T.color,side:T.side,action:T.action,price:T.price},lock:!0},"candle_pane"),N&&I.value.push(N))}catch(l){}}}catch(bi){M.e(bi)}finally{M.f()}}case 10:e.n=5;break;case 11:e.n=13;break;case 12:e.p=12,mi=e.v,s.e(mi);case 13:return e.p=13,s.f(),e.f(13);case 14:if(r.length>0&&(O=r.filter(function(t){return t.data&&Array.isArray(t.data)&&t.data.length>0}),O.length>0)){for(z=[],V={},H=0;H0)){e.n=23;break}for(xt=[],wt=0;wt0&&g.value){Lt=(0,_.A)(Ct);try{for(Lt.s();!(Nt=Lt.n()).done;){Ot=Nt.value;try{zt=Ot.timestamp,zt<1e10&&(zt*=1e3),Vt=Ot.text,"function"===typeof g.value.createOverlay&&(Wt=g.value.createOverlay({name:"signalTag",points:[{timestamp:zt,value:Ot.price},{timestamp:zt,value:Ot.anchorPrice}],extendData:{text:Vt,color:Ot.color,side:Ot.side,action:Ot.action,price:Ot.price},lock:!0},"candle_pane"),Wt&&I.value.push(Wt))}catch(l){}}}catch(bi){Lt.e(bi)}finally{Lt.f()}}case 23:e.n=18;break;case 24:e.n=26;break;case 25:e.p=25,yi=e.v,mt.e(yi);case 26:return e.p=26,mt.f(),e.f(26);case 27:if(gt.length>0&&(Ht=gt.filter(function(t){return t.data&&Array.isArray(t.data)&&t.data.length>0}),Ht.length>0)){for($t=[],Yt={},Xt=0;Xt0&&(0,h.dY)(function(){g.value&&xt()})},{deep:!0}),(0,h.wB)(function(){return t.realtimeEnabled},function(t){t?ft():gt()}),(0,h.sV)((0,c.A)((0,l.A)().m(function e(){return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.n=1,(0,h.dY)();case 1:return!t.theme||"dark"!==t.theme&&"light"!==t.theme||(m.value=t.theme),e.p=2,e.n=3,K();case 3:e.n=5;break;case 4:e.p=4,e.v,$.value=!0;case 5:(0,h.dY)(function(){setTimeout(function(){!g.value&&t.symbol&&mt()},300)});case 6:return e.a(2)}},e,null,[[2,4]])}))),(0,h.xo)(function(){gt(),g.value&&(g.value.destroy(),g.value=null),window.removeEventListener("resize",yt)}),{klineData:n,loading:a,error:r,loadingHistory:s,chartRef:g,chartTheme:m,themeConfig:Y,getIndicatorColor:X,handleRetry:wt,loadingPython:W,pythonReady:H,pyodideLoadFailed:$,formatKlineData:st,updatePricePanel:lt,isSameTimeframe:ut,loadKlineData:dt,loadMoreHistoryData:pt,updateKlineRealtime:vt,startRealtime:ft,stopRealtime:gt,initChart:mt,handleResize:yt,updateChartTheme:_t,updateIndicators:xt,executePythonStrategy:U,parsePythonStrategy:j,indicatorButtons:R,isIndicatorActive:L,toggleIndicator:z,drawingTools:D,activeDrawingTool:A,selectDrawingTool:N,clearAllDrawings:O}}},La=Ra,Na=(0,E.A)(La,M,D,!1,null,"58f93984",null),Oa=Na.exports,za=i(23022),Va={name:"DashboardIndicator",components:{IndicatorEditor:P,KlineChart:Oa,QuickTradePanel:za.A},computed:(0,d.A)((0,d.A)({},(0,p.aH)({navTheme:function(t){return t.app.theme}})),{},{chartTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme?"dark":"light"},isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme}}),setup:function(){var t=(0,h.nI)(),e=t||{},i=e.proxy,n=(0,h.KR)(1),a=(0,h.KR)(!1),p=(0,h.KR)(void 0),m=(0,h.KR)([]),y=(0,h.KR)([]),_=(0,h.KR)(!1),b=(0,h.KR)(""),x=(0,h.KR)(!1),w=(0,h.KR)(!1),S=(0,h.KR)(!1),C=(0,h.KR)(""),k=(0,h.KR)(""),I=(0,h.KR)([]),E=(0,h.KR)(!1),A=(0,h.KR)([]),P=(0,h.KR)(!1),M=(0,h.KR)(null),D=(0,h.KR)(null),T=(0,h.KR)([]),B=(0,h.KR)(!1),F=(0,h.KR)(!1),R=(0,h.KR)(""),L=(0,h.KR)(""),N=(0,h.KR)(0),O=(0,h.EW)(function(){return"crypto"===(Y.value||"").toLowerCase()}),z=function(){O.value?(R.value=$.value||"",N.value=parseFloat(X.value)||0,L.value="",F.value=!0):u.A.warning(i.$t("quickTrade.cryptoOnly"))},V=function(){u.A.success(i.$t("quickTrade.orderSuccess"))},W=function(t){t&&O.value&&(R.value=t)},H=function(){i&&i.$router&&i.$router.push("/indicator-community")},$=(0,h.KR)(""),Y=(0,h.KR)(""),X=(0,h.KR)("--"),K=(0,h.KR)(0),j=(0,h.EW)(function(){return K.value>0?"color-up":K.value<0?"color-down":""}),U=(0,h.KR)("1D"),G=(0,h.KR)([]),Z=(0,h.KR)(!1),q=[{id:"sma5",name:"SMA5 (5日均线)",shortName:"SMA5",type:"line",defaultParams:{length:5}},{id:"sma10",name:"SMA10 (10日均线)",shortName:"SMA10",type:"line",defaultParams:{length:10}},{id:"sma20",name:"SMA20 (20日均线)",shortName:"SMA20",type:"line",defaultParams:{length:20}},{id:"sma30",name:"SMA30 (30日均线)",shortName:"SMA30",type:"line",defaultParams:{length:30}}],J=[{id:"ema5",name:"EMA5 (5日指数均线)",shortName:"EMA5",type:"line",defaultParams:{length:5}},{id:"ema10",name:"EMA10 (10日指数均线)",shortName:"EMA10",type:"line",defaultParams:{length:10}},{id:"ema20",name:"EMA20 (20日指数均线)",shortName:"EMA20",type:"line",defaultParams:{length:20}},{id:"ema30",name:"EMA30 (30日指数均线)",shortName:"EMA30",type:"line",defaultParams:{length:30}}],Q=(0,h.KR)([]),tt=(0,h.KR)([]),et=(0,h.KR)(!1),it=(0,h.KR)(!1),nt=(0,h.KR)(null),at=(0,h.KR)(""),rt=(0,h.KR)([]),ot=(0,h.KR)({}),st=(0,h.KR)(!1),lt=(0,h.KR)({}),ct=(0,h.KR)(!1),ut=(0,h.KR)(!1),dt=(0,h.KR)(!1),ht=(0,h.KR)(null),pt=(0,h.KR)(!1),vt=(0,h.KR)(null),ft=(0,h.KR)(!1),gt=(0,h.KR)(null),mt=(0,h.KR)(!1),yt=(0,h.KR)(null),_t=(0,h.KR)(!1),bt=(0,h.KR)(null),xt=(0,h.KR)(!1),wt=(0,h.KR)(!1),St=(0,h.KR)("free"),Ct=(0,h.KR)(10),kt=(0,h.KR)(""),It=(0,h.KR)(!1),Et={price:[{required:!0,message:"请输入价格",trigger:"blur",type:"number"}]},At=(0,h.KR)(!1),Pt=function(t){var e=t.price,i=t.change;X.value=e,K.value=i},Mt=function(){},Dt=(0,h.KR)([]),Tt=(0,h.KR)([]),Bt=function(t){U.value=t},Ft=function(t){return t?Object.values(t).join(", "):""},Rt=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,i,r,o,s,c;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(a.value=!0,t.p=1,r=(0,h.nI)(),o=null===r||void 0===r||null===(e=r.proxy)||void 0===e?void 0:e.$store,s=(null===o||void 0===o||null===(i=o.getters)||void 0===i?void 0:i.userInfo)||{},!s||!s.email){t.n=2;break}return n.value=s.id,a.value=!1,Lt(),ae(),t.a(2);case 2:return t.n=3,(0,g.ug)();case 3:c=t.v,c&&1===c.code&&c.data&&(n.value=c.data.id,o&&o.commit("SET_INFO",c.data),Lt(),ae()),t.n=5;break;case 4:t.p=4,t.v;case 5:return t.p=5,a.value=!1,t.f(5);case 6:return t.a(2)}},t,null,[[1,4,5,6]])}));return function(){return t.apply(this,arguments)}}(),Lt=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,a;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(n.value){t.n=1;break}return t.a(2);case 1:return _.value=!0,t.p=2,t.n=3,(0,f.Qo)({userid:n.value});case 3:e=t.v,e&&1===e.code&&e.data&&(y.value=e.data.map(function(t){return(0,d.A)((0,d.A)({},t),{},{label:t.symbol+(t.name?" (".concat(t.name,")"):""),value:"".concat(t.market,":").concat(t.symbol)})}),Nt(),y.value.length>0&&!$.value&&(a=y.value[0],Y.value=a.market,$.value=a.symbol,p.value=a.value)),t.n=5;break;case 4:t.p=4,t.v,u.A.error(i.$t("dashboard.indicator.error.loadWatchlistFailed"));case 5:return t.p=5,_.value=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}));return function(){return t.apply(this,arguments)}}(),Nt=function(){b.value?m.value=y.value.filter(function(t){return t.symbol.toLowerCase().includes(b.value.toLowerCase())||t.name&&t.name.toLowerCase().includes(b.value.toLowerCase())}):m.value=y.value},Ot=function(t){b.value=t,0===y.value.length&&t&&(x.value=!0),Nt()},zt=function(t){x.value=t,t||(b.value="")},Vt=function(t){if("__empty_watchlist_hint__"!==t){if("__add_stock_option__"===t)return w.value=!0,void setTimeout(function(){p.value=void 0},0);var e=y.value.find(function(e){return e.value===t});if(e||(e=m.value.find(function(e){return e.value===t})),!e&&t.includes(":")){var i=t.split(":"),n=(0,s.A)(i,2),a=n[0],r=n[1];e={market:a,symbol:r,value:t}}e&&(Y.value=e.market,$.value=e.symbol,p.value=e.value)}},Wt=function(t,e){var i,n=(null===(i=e.componentOptions)||void 0===i||null===(i=i.propsData)||void 0===i?void 0:i.value)||"";return"__empty_watchlist_hint__"===n||"__add_stock_option__"===n||n.toLowerCase().includes(t.toLowerCase())},Ht=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return t.p=0,t.n=1,(0,f.iO)();case 1:e=t.v,e&&1===e.code&&e.data&&Array.isArray(e.data)?T.value=e.data.map(function(t){return{value:t.value,i18nKey:t.i18nKey||"dashboard.analysis.market.".concat(t.value)}}):e&&1===e.code&&e.data&&"object"===(0,o.A)(e.data)?T.value=Object.keys(e.data).map(function(t){return{value:t,i18nKey:"dashboard.analysis.market.".concat(t)}}):T.value=[{value:"USStock",i18nKey:"dashboard.analysis.market.USStock"},{value:"Crypto",i18nKey:"dashboard.analysis.market.Crypto"},{value:"Forex",i18nKey:"dashboard.analysis.market.Forex"},{value:"Futures",i18nKey:"dashboard.analysis.market.Futures"}],T.value.length>0&&!C.value&&(C.value=T.value[0].value),t.n=3;break;case 2:t.p=2,t.v,T.value=[{value:"USStock",i18nKey:"dashboard.analysis.market.USStock"},{value:"Crypto",i18nKey:"dashboard.analysis.market.Crypto"},{value:"Forex",i18nKey:"dashboard.analysis.market.Forex"},{value:"Futures",i18nKey:"dashboard.analysis.market.Futures"}];case 3:return t.a(2)}},t,null,[[0,2]])}));return function(){return t.apply(this,arguments)}}(),$t=function(){w.value=!1,M.value=null,k.value="",I.value=[],B.value=!1,C.value=T.value.length>0?T.value[0].value:""},Yt=function(t){C.value=t,k.value="",I.value=[],M.value=null,B.value=!1,Zt(t)},Xt=function(t){var e=t.target.value;if(k.value=e,D.value&&clearTimeout(D.value),!e||""===e.trim())return I.value=[],B.value=!1,void(M.value=null);D.value=setTimeout(function(){jt(e)},500)},Kt=function(t){t&&t.trim()&&(C.value?I.value.length>0||(B.value&&0===I.value.length?Ut():jt(t)):u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")))},jt=function(){var t=(0,c.A)((0,l.A)().m(function t(e){var n;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e&&""!==e.trim()){t.n=1;break}return I.value=[],B.value=!1,t.a(2);case 1:if(C.value){t.n=2;break}return u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")),t.a(2);case 2:return E.value=!0,B.value=!0,t.p=3,t.n=4,(0,f._3)({market:C.value,keyword:e.trim(),limit:20});case 4:n=t.v,n&&1===n.code&&n.data&&n.data.length>0?I.value=n.data:(I.value=[],M.value={market:C.value,symbol:e.trim().toUpperCase(),name:""}),t.n=6;break;case 5:t.p=5,t.v,I.value=[],M.value={market:C.value,symbol:e.trim().toUpperCase(),name:""};case 6:return t.p=6,E.value=!1,t.f(6);case 7:return t.a(2)}},t,null,[[3,5,6,7]])}));return function(e){return t.apply(this,arguments)}}(),Ut=function(){k.value&&k.value.trim()?C.value?M.value={market:C.value,symbol:k.value.trim().toUpperCase(),name:""}:u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")):u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseEnterSymbol"))},Gt=function(t){M.value={market:t.market,symbol:t.symbol,name:t.name||t.symbol}},Zt=function(){var t=(0,c.A)((0,l.A)().m(function t(e){var i;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e||(e=C.value||(T.value.length>0?T.value[0].value:"")),e){t.n=1;break}return t.a(2);case 1:return P.value=!0,t.p=2,t.n=3,(0,f.z6)({market:e,limit:10});case 3:i=t.v,i&&1===i.code&&i.data?A.value=i.data:A.value=[],t.n=5;break;case 4:t.p=4,t.v,A.value=[];case 5:return t.p=5,P.value=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}));return function(e){return t.apply(this,arguments)}}(),qt=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,a,r,o,s,c;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e="",a="",!M.value){t.n=1;break}e=M.value.market,a=M.value.symbol.toUpperCase(),t.n=4;break;case 1:if(!k.value||!k.value.trim()){t.n=3;break}if(C.value){t.n=2;break}return u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")),t.a(2);case 2:e=C.value,a=k.value.trim().toUpperCase(),t.n=4;break;case 3:return u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectOrEnterSymbol")),t.a(2);case 4:return S.value=!0,t.p=5,t.n=6,(0,f.dp)({userid:n.value,market:e,symbol:a});case 6:if(r=t.v,!r||1!==r.code){t.n=8;break}return u.A.success(i.$t("dashboard.analysis.message.addStockSuccess")),$t(),t.n=7,Lt();case 7:t.n=9;break;case 8:u.A.error((null===r||void 0===r?void 0:r.msg)||i.$t("dashboard.analysis.message.addStockFailed"));case 9:t.n=11;break;case 10:t.p=10,c=t.v,s=(null===c||void 0===c||null===(o=c.response)||void 0===o||null===(o=o.data)||void 0===o?void 0:o.msg)||(null===c||void 0===c?void 0:c.message)||i.$t("dashboard.analysis.message.addStockFailed"),u.A.error(s);case 11:return t.p=11,S.value=!1,t.f(11);case 12:return t.a(2)}},t,null,[[5,10,11,12]])}));return function(){return t.apply(this,arguments)}}(),Jt=function(t){if(!ie(t.id)){var e=t.params||t.defaultParams||{};G.value.push((0,d.A)((0,d.A)({},t),{},{id:t.id,params:(0,d.A)({},e)}))}},Qt=function(t){G.value=G.value.filter(function(e){return e.id!==t})},te=function(t){var e=t.action,i=t.indicator;if("add"===e){var n=(0,d.A)((0,d.A)({},i),{},{calculate:ee(i.id)});Jt(n)}else"remove"===e&&Qt(i.id)},ee=function(t){return null},ie=function(t){return"sma"===t?q.some(function(t){return G.value.some(function(e){return e.id===t.id})}):"ema"===t?J.some(function(t){return G.value.some(function(e){return e.id===t.id})}):G.value.some(function(e){return e.id===t})},ne=function(){var t=new Set;return q.forEach(function(e){return t.add(e.id)}),J.forEach(function(e){return t.add(e.id)}),G.value.filter(function(e){return!t.has(e.id)})},ae=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,i,a;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(n.value){t.n=1;break}return t.a(2);case 1:return et.value=!0,t.p=2,t.n=3,(0,v.Ay)({url:"/api/indicator/getIndicators",method:"get",params:{userid:n.value}});case 3:e=t.v,1===e.code&&e.data&&(i=e.data.filter(function(t){return!t.is_buy||0===t.is_buy||"0"===t.is_buy}),a=e.data.filter(function(t){return 1===t.is_buy||"1"===t.is_buy}),Q.value=i.map(function(t){return(0,d.A)((0,d.A)({},t),{},{type:"python",source:"custom"})}),tt.value=a.map(function(t){return(0,d.A)((0,d.A)({},t),{},{type:"python",source:"purchased"})})),t.n=5;break;case 4:t.p=4,t.v;case 5:return t.p=5,et.value=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}));return function(){return t.apply(this,arguments)}}(),re=(0,h.KR)(null),oe=function(){var t=(0,c.A)((0,l.A)().m(function t(e,n){var a,r,o,s,c,h,p,v,f;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(a="".concat(n,"-").concat(e.id),!ie(a)){t.n=1;break}return Qt(a),t.a(2);case 1:if(t.p=1,r=e.code||"",re.value){t.n=2;break}return u.A.error(i.$t("dashboard.indicator.error.chartNotReady")),t.a(2);case 2:if("function"===typeof re.value.parsePythonStrategy){t.n=3;break}return u.A.error(i.$t("dashboard.indicator.error.chartMethodNotReady")),t.a(2);case 3:if("function"===typeof re.value.executePythonStrategy){t.n=4;break}return u.A.error(i.$t("dashboard.indicator.error.chartExecuteNotReady")),t.a(2);case 4:if(o=re.value.parsePythonStrategy(r),o){t.n=5;break}return u.A.error(i.$t("dashboard.indicator.error.parseFailed")),t.a(2);case 5:s=e.userParams||{},c=r,h=(0,d.A)({},s),p={id:a,name:e.name,type:"python",code:c,description:e.description,parsed:o,userParams:h,originalId:e.id,user_id:e.user_id||e.userId,is_encrypted:e.is_encrypted||e.isEncrypted||0,calculate:function(t,i){return re.value.executePythonStrategy(c,t,(0,d.A)((0,d.A)({},i),h),{id:e.id,user_id:e.user_id||e.userId,is_encrypted:e.is_encrypted||e.isEncrypted||0})}},v=(0,d.A)((0,d.A)({},o.params),s),G.value.push((0,d.A)((0,d.A)({},p),{},{params:v})),t.n=7;break;case 6:t.p=6,f=t.v,u.A.error(i.$t("dashboard.indicator.error.addIndicatorFailed")+": "+(f.message||"未知错误"));case 7:return t.a(2)}},t,null,[[1,6]])}));return function(e,i){return t.apply(this,arguments)}}(),se=function(){var t=(0,c.A)((0,l.A)().m(function t(e,n){var a,r,o,s,c;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(a="".concat(n,"-").concat(e.id),!ie(a)){t.n=1;break}Qt(a),t.n=5;break;case 1:return t.p=1,st.value=!0,t.n=2,i.$http.get("/api/indicator/getIndicatorParams",{params:{indicator_id:e.id}});case 2:r=t.v,r&&1===r.code&&Array.isArray(r.data)&&r.data.length>0?(rt.value=r.data,o="".concat(n,"-").concat(e.id),s=lt.value[o],c={},r.data.forEach(function(t){var e=s&&void 0!==s[t.name]?s[t.name]:t.default;e="int"===t.type?parseInt(e)||0:"float"===t.type?parseFloat(e)||0:"bool"===t.type?!0===e||"true"===e||1===e||"1"===e:e||"",c[t.name]=e}),ot.value=c,nt.value=e,at.value=n,it.value=!0):oe(e,n),t.n=4;break;case 3:t.p=3,t.v,oe(e,n);case 4:return t.p=4,st.value=!1,t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}));return function(e,i){return t.apply(this,arguments)}}(),le=function(){if(nt.value){var t="".concat(at.value,"-").concat(nt.value.id);lt.value[t]=(0,d.A)({},ot.value);var e=(0,d.A)((0,d.A)({},nt.value),{},{userParams:(0,d.A)({},ot.value)});oe(e,at.value)}it.value=!1,nt.value=null,at.value=""},ce=function(){ue(),it.value=!1,setTimeout(function(){nt.value=null,at.value=""},100)},ue=function(){if(nt.value&&at.value){var t="".concat(at.value,"-").concat(nt.value.id);lt.value[t]=JSON.parse(JSON.stringify(ot.value))}},de=function(){ue()},he=function(t){var e=t.code,n=t.name;if(e&&e.trim())try{if(!re.value)return void u.A.error(i.$t("dashboard.indicator.error.chartNotReady"));if("function"!==typeof re.value.parsePythonStrategy)return void u.A.error(i.$t("dashboard.indicator.error.chartMethodNotReady"));if("function"!==typeof re.value.executePythonStrategy)return void u.A.error(i.$t("dashboard.indicator.error.chartExecuteNotReady"));var a=re.value.parsePythonStrategy(e);if(!a)return void u.A.error(i.$t("dashboard.indicator.error.parseFailedCheck"));var r={id:"temp-editor-indicator",name:n||"临时指标",type:"python",code:e,description:"",parsed:a,calculate:function(t,i){var n=e;return re.value.executePythonStrategy(n,t,i)}},o=G.value.findIndex(function(t){return"temp-editor-indicator"===t.id});o>=0&&G.value.splice(o,1),G.value.push((0,d.A)((0,d.A)({},r),{},{params:(0,d.A)({},a.params)})),u.A.success(i.$t("dashboard.indicator.success.runIndicator"))}catch(s){u.A.error(i.$t("dashboard.indicator.error.runIndicatorFailed")+": "+(s.message||"未知错误"))}else u.A.warning(i.$t("dashboard.indicator.warning.enterCode"))},pe=function(){ht.value=null,dt.value=!0},ve=function(t){ht.value=t,dt.value=!0},fe=function(){ct.value=!ct.value},ge=function(t){r.A.confirm({title:i.$t("dashboard.indicator.delete.confirmTitle"),content:i.$t("dashboard.indicator.delete.confirmContent",{name:t.name}),okText:i.$t("dashboard.indicator.delete.confirmOk"),okType:"danger",cancelText:i.$t("dashboard.indicator.delete.confirmCancel"),onOk:function(){var e=(0,c.A)((0,l.A)().m(function e(){var a,r,o;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,v.Ay)({url:"/api/indicator/deleteIndicator",method:"post",data:{id:t.id,userid:n.value}});case 1:if(a=e.v,1!==a.code){e.n=3;break}return u.A.success(i.$t("dashboard.indicator.delete.success")),r="custom-"+t.id,ie(r)&&Qt(r),e.n=2,ae();case 2:e.n=4;break;case 3:u.A.error(a.msg||i.$t("dashboard.indicator.delete.failed"));case 4:e.n=6;break;case 5:e.p=5,o=e.v,u.A.error(i.$t("dashboard.indicator.delete.failed")+": "+(o.message||"未知错误"));case 6:return e.a(2)}},e,null,[[0,5]])}));function a(){return e.apply(this,arguments)}return a}()})},me=function(t){i.$router.push({path:"/backtest-center",query:{tab:"indicator",indicator_id:String(t.id)}})},ye=function(t){i.$router.push({path:"/backtest-center",query:{tab:"indicator",indicator_id:String(t.id),view:"history"}})},_e=function(t){},be=function(t){bt.value=(0,d.A)({},t),St.value=t.pricing_type||"free",Ct.value=t.price||10,kt.value=t.description||"",It.value=!!t.vip_free,_t.value=!0},xe=function(t){i.$router.push({path:"/trading-assistant",query:{mode:"create",indicator_id:String(t.id),indicator_name:t.name||"",indicator_desc:t.description||""}})},we=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,a;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(n.value){t.n=1;break}return u.A.error(i.$t("dashboard.indicator.error.pleaseLogin")),t.a(2);case 1:return xt.value=!0,t.p=2,t.n=3,(0,v.Ay)({url:"/api/indicator/saveIndicator",method:"post",data:{userid:n.value,id:bt.value.id,code:bt.value.code,name:bt.value.name,description:kt.value,publishToCommunity:!0,pricingType:St.value,price:"paid"===St.value?Ct.value:0,vipFree:"paid"===St.value&&It.value}});case 3:if(e=t.v,1!==e.code){t.n=5;break}return u.A.success(i.$t("dashboard.indicator.publish.success")),_t.value=!1,bt.value=null,t.n=4,ae();case 4:t.n=6;break;case 5:u.A.error(e.msg||i.$t("dashboard.indicator.publish.failed"));case 6:t.n=8;break;case 7:t.p=7,a=t.v,u.A.error(i.$t("dashboard.indicator.publish.failed")+": "+(a.message||""));case 8:return t.p=8,xt.value=!1,t.f(8);case 9:return t.a(2)}},t,null,[[2,7,8,9]])}));return function(){return t.apply(this,arguments)}}(),Se=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(n.value&&bt.value){t.n=1;break}return t.a(2);case 1:return wt.value=!0,t.p=2,t.n=3,(0,v.Ay)({url:"/api/indicator/saveIndicator",method:"post",data:{userid:n.value,id:bt.value.id,code:bt.value.code,name:bt.value.name,description:bt.value.description,publishToCommunity:!1,pricingType:"free",price:0,vipFree:!1}});case 3:if(e=t.v,1!==e.code){t.n=5;break}return u.A.success(i.$t("dashboard.indicator.publish.unpublishSuccess")),_t.value=!1,bt.value=null,t.n=4,ae();case 4:t.n=6;break;case 5:u.A.error(e.msg||i.$t("dashboard.indicator.publish.unpublishFailed"));case 6:t.n=8;break;case 7:t.p=7,t.v,u.A.error(i.$t("dashboard.indicator.publish.unpublishFailed"));case 8:return t.p=8,wt.value=!1,t.f(8);case 9:return t.a(2)}},t,null,[[2,7,8,9]])}));return function(){return t.apply(this,arguments)}}(),Ce=function(){var t=(0,c.A)((0,l.A)().m(function t(e){var a,r,o;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(n.value){t.n=1;break}return u.A.error(i.$t("dashboard.indicator.error.pleaseLogin")),t.a(2);case 1:return a=i.$refs.indicatorEditor,a&&(a.saving=!0),t.p=2,t.n=3,(0,v.Ay)({url:"/api/indicator/saveIndicator",method:"post",data:{userid:n.value,id:e.id||0,code:e.code}});case 3:if(r=t.v,1!==r.code){t.n=5;break}return u.A.success(i.$t("dashboard.indicator.save.success")),dt.value=!1,ht.value=null,t.n=4,ae();case 4:t.n=6;break;case 5:u.A.error(r.msg||i.$t("dashboard.indicator.save.failed"));case 6:t.n=8;break;case 7:t.p=7,o=t.v,u.A.error(i.$t("dashboard.indicator.save.failed")+": "+(o.message||"未知错误"));case 8:return t.p=8,a&&(a.saving=!1),t.f(8);case 9:return t.a(2)}},t,null,[[2,7,8,9]])}));return function(e){return t.apply(this,arguments)}}(),ke=function(t){var e=t.end_time;if(1===e||"1"===e)return i.$t("dashboard.indicator.status.normalPermanent");if(!e||0===e)return i.$t("dashboard.indicator.status.normal");var n=Math.floor(Date.now()/1e3);return e0&&!C.value&&(C.value=T.value[0].value),C.value&&Zt(C.value)):(M.value=null,k.value="",I.value=[],B.value=!1,D.value&&(clearTimeout(D.value),D.value=null))}),(0,h.wB)(function(){return ot.value},function(t){if(it.value&&nt.value&&at.value){var e="".concat(at.value,"-").concat(nt.value.id);lt.value[e]=JSON.parse(JSON.stringify(t))}},{deep:!0,immediate:!1}),(0,h.wB)(it,function(t){t||ue()}),{userId:n,klineChart:re,searchSymbol:p,symbolSuggestions:m,watchlist:y,symbolSearchValue:b,symbolSearchOpen:x,currentSymbol:$,currentMarket:Y,currentPrice:X,priceChange:K,priceChangeClass:j,timeframe:U,loadingWatchlist:_,activeIndicators:G,trendIndicators:Dt,oscillatorIndicators:Tt,customIndicators:Q,purchasedIndicators:tt,loadingIndicators:et,realtimeEnabled:At,toggleRealtime:De,handleSymbolSearch:Ot,handleSymbolSelect:Vt,handleDropdownVisibleChange:zt,filterSymbolOption:Wt,getMarketName:Pe,getMarketColor:Me,setTimeframe:Bt,addIndicator:Jt,removeIndicator:Qt,isIndicatorActive:ie,loadIndicators:ae,addPythonIndicator:oe,toggleIndicator:se,getIndicatorStatus:ke,getIndicatorStatusIcon:Ie,getIndicatorStatusClass:Ee,getExpiryTimeText:Ae,formatParams:Ft,loadWatchlist:Lt,getCustomActiveIndicators:ne,showIndicatorEditor:dt,editingIndicator:ht,handleCreateIndicator:pe,handleRunIndicator:he,handleSaveIndicator:Ce,handleEditIndicator:ve,handleDeleteIndicator:ge,toggleCustomSection:fe,customSectionCollapsed:ct,purchasedSectionCollapsed:ut,handlePriceChange:Pt,handleChartRetry:Mt,handleIndicatorToggle:te,showParamsModal:it,pendingIndicator:nt,indicatorParams:rt,indicatorParamValues:ot,loadingParams:st,confirmIndicatorParams:le,cancelIndicatorParams:ce,handleParamsModalAfterClose:de,showBacktestModal:pt,backtestIndicator:vt,handleOpenBacktest:me,showBacktestHistoryDrawer:ft,backtestHistoryIndicator:gt,handleOpenBacktestHistory:ye,showBacktestRunViewer:mt,selectedBacktestRun:yt,handleViewBacktestRun:_e,showPublishModal:_t,publishIndicator:bt,publishing:xt,unpublishing:wt,publishPricingType:St,publishPrice:Ct,publishDescription:kt,publishVipFree:It,publishRules:Et,handlePublishIndicator:be,handleCreateStrategyFromIndicator:xe,handleConfirmPublish:we,handleUnpublish:Se,selectedSymbol:$,selectedMarket:Y,selectedTimeframe:U,isMobile:Z,showAddStockModal:w,addingStock:S,selectedMarketTab:C,symbolSearchKeyword:k,symbolSearchResults:I,searchingSymbols:E,hotSymbols:A,loadingHotSymbols:P,selectedSymbolForAdd:M,marketTypes:T,hasSearched:B,handleCloseAddStockModal:$t,handleMarketTabChange:Yt,handleSymbolSearchInput:Xt,handleSearchOrInput:Kt,searchSymbolsInModal:jt,selectSymbol:Gt,loadHotSymbols:Zt,handleAddStock:qt,handleDirectAdd:Ut,loadMarketTypes:Ht,showQuickTrade:F,qtSymbol:R,qtSide:L,qtPrice:N,isCryptoMarket:O,openQuickTrade:z,onQuickTradeSuccess:V,handleQuickTradeSymbolChange:W,goToIndicatorMarket:H}}},Wa=Va,Ha=(0,E.A)(Wa,n,a,!1,null,"6bd239a6",null),$a=Ha.exports},40955:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(80754),i(84636),i(39506),i(57165))})(0,function(t){return function(){var e=t,i=e.lib,n=i.BlockCipher,a=e.algo,r=[],o=[],s=[],l=[],c=[],u=[],d=[],h=[],p=[],v=[];(function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var i=0,n=0;for(e=0;e<256;e++){var a=n^n<<1^n<<2^n<<3^n<<4;a=a>>>8^255&a^99,r[i]=a,o[a]=i;var f=t[i],g=t[f],m=t[g],y=257*t[a]^16843008*a;s[i]=y<<24|y>>>8,l[i]=y<<16|y>>>16,c[i]=y<<8|y>>>24,u[i]=y;y=16843009*m^65537*g^257*f^16843008*i;d[a]=y<<24|y>>>8,h[a]=y<<16|y>>>16,p[a]=y<<8|y>>>24,v[a]=y,i?(i=f^t[t[t[m^f]]],n^=t[t[n]]):i=n=1}})();var f=[0,1,2,4,8,16,32,64,128,27,54],g=a.AES=n.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,i=t.sigBytes/4,n=this._nRounds=i+6,a=4*(n+1),o=this._keySchedule=[],s=0;s6&&s%i==4&&(u=r[u>>>24]<<24|r[u>>>16&255]<<16|r[u>>>8&255]<<8|r[255&u]):(u=u<<8|u>>>24,u=r[u>>>24]<<24|r[u>>>16&255]<<16|r[u>>>8&255]<<8|r[255&u],u^=f[s/i|0]<<24),o[s]=o[s-i]^u);for(var l=this._invKeySchedule=[],c=0;c>>24]]^h[r[u>>>16&255]]^p[r[u>>>8&255]]^v[r[255&u]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,s,l,c,u,r)},decryptBlock:function(t,e){var i=t[e+1];t[e+1]=t[e+3],t[e+3]=i,this._doCryptBlock(t,e,this._invKeySchedule,d,h,p,v,o);i=t[e+1];t[e+1]=t[e+3],t[e+3]=i},_doCryptBlock:function(t,e,i,n,a,r,o,s){for(var l=this._nRounds,c=t[e]^i[0],u=t[e+1]^i[1],d=t[e+2]^i[2],h=t[e+3]^i[3],p=4,v=1;v>>24]^a[u>>>16&255]^r[d>>>8&255]^o[255&h]^i[p++],g=n[u>>>24]^a[d>>>16&255]^r[h>>>8&255]^o[255&c]^i[p++],m=n[d>>>24]^a[h>>>16&255]^r[c>>>8&255]^o[255&u]^i[p++],y=n[h>>>24]^a[c>>>16&255]^r[u>>>8&255]^o[255&d]^i[p++];c=f,u=g,d=m,h=y}f=(s[c>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[255&h])^i[p++],g=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[h>>>8&255]<<8|s[255&c])^i[p++],m=(s[d>>>24]<<24|s[h>>>16&255]<<16|s[c>>>8&255]<<8|s[255&u])^i[p++],y=(s[h>>>24]<<24|s[c>>>16&255]<<16|s[u>>>8&255]<<8|s[255&d])^i[p++];t[e]=f,t[e+1]=g,t[e+2]=m,t[e+3]=y},keySize:8});e.AES=n._createHelper(g)}(),t.AES})},43128:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(80754),i(84636),i(39506),i(57165))})(0,function(t){return function(){var e=t,i=e.lib,n=i.BlockCipher,a=e.algo;const r=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],s=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var l={pbox:[],sbox:[]};function c(t,e){let i=e>>24&255,n=e>>16&255,a=e>>8&255,r=255&e,o=t.sbox[0][i]+t.sbox[1][n];return o^=t.sbox[2][a],o+=t.sbox[3][r],o}function u(t,e,i){let n,a=e,o=i;for(let s=0;s1;--s)a^=t.pbox[s],o=c(t,a)^o,n=a,a=o,o=n;return n=a,a=o,o=n,o^=t.pbox[1],a^=t.pbox[0],{left:a,right:o}}function h(t,e,i){for(let r=0;r<4;r++){t.sbox[r]=[];for(let e=0;e<256;e++)t.sbox[r][e]=s[r][e]}let n=0;for(let s=0;s=i&&(n=0);let a=0,l=0,c=0;for(let o=0;o>>2];t.sigBytes-=e}},m=(n.BlockCipher=d.extend({cfg:d.cfg.extend({mode:v,padding:g}),reset:function(){var t;d.reset.call(this);var e=this.cfg,i=e.iv,n=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=n.createEncryptor:(t=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,i&&i.words):(this._mode=t.call(n,this,i&&i.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4}),n.CipherParams=a.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),y=i.format={},_=y.OpenSSL={stringify:function(t){var e,i=t.ciphertext,n=t.salt;return e=n?r.create([1398893684,1701076831]).concat(n).concat(i):i,e.toString(l)},parse:function(t){var e,i=l.parse(t),n=i.words;return 1398893684==n[0]&&1701076831==n[1]&&(e=r.create(n.slice(2,4)),n.splice(0,4),i.sigBytes-=16),m.create({ciphertext:i,salt:e})}},b=n.SerializableCipher=a.extend({cfg:a.extend({format:_}),encrypt:function(t,e,i,n){n=this.cfg.extend(n);var a=t.createEncryptor(i,n),r=a.finalize(e),o=a.cfg;return m.create({ciphertext:r,key:i,iv:o.iv,algorithm:t,mode:o.mode,padding:o.padding,blockSize:t.blockSize,formatter:n.format})},decrypt:function(t,e,i,n){n=this.cfg.extend(n),e=this._parse(e,n.format);var a=t.createDecryptor(i,n).finalize(e.ciphertext);return a},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),x=i.kdf={},w=x.OpenSSL={execute:function(t,e,i,n,a){if(n||(n=r.random(8)),a)o=u.create({keySize:e+i,hasher:a}).compute(t,n);else var o=u.create({keySize:e+i}).compute(t,n);var s=r.create(o.words.slice(e),4*i);return o.sigBytes=4*e,m.create({key:o,iv:s,salt:n})}},S=n.PasswordBasedCipher=b.extend({cfg:b.cfg.extend({kdf:w}),encrypt:function(t,e,i,n){n=this.cfg.extend(n);var a=n.kdf.execute(i,t.keySize,t.ivSize,n.salt,n.hasher);n.iv=a.iv;var r=b.encrypt.call(this,t,e,a.key,n);return r.mixIn(a),r},decrypt:function(t,e,i,n){n=this.cfg.extend(n),e=this._parse(e,n.format);var a=n.kdf.execute(i,t.keySize,t.ivSize,e.salt,n.hasher);n.iv=a.iv;var r=b.decrypt.call(this,t,e,a.key,n);return r}})}()})},19021:function(t,e,i){(function(e,i){t.exports=i()})(0,function(){var t=t||function(t,e){var n;if("undefined"!==typeof window&&window.crypto&&(n=window.crypto),"undefined"!==typeof self&&self.crypto&&(n=self.crypto),"undefined"!==typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!==typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&"undefined"!==typeof i.g&&i.g.crypto&&(n=i.g.crypto),!n)try{n=i(50477)}catch(g){}var a=function(){if(n){if("function"===typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(g){}if("function"===typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(g){}}throw new Error("Native crypto module could not be used to get secure random number.")},r=Object.create||function(){function t(){}return function(e){var i;return t.prototype=e,i=new t,t.prototype=null,i}}(),o={},s=o.lib={},l=s.Base=function(){return{extend:function(t){var e=r(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=s.WordArray=l.extend({init:function(t,i){t=this.words=t||[],this.sigBytes=i!=e?i:4*t.length},toString:function(t){return(t||d).stringify(this)},concat:function(t){var e=this.words,i=t.words,n=this.sigBytes,a=t.sigBytes;if(this.clamp(),n%4)for(var r=0;r>>2]>>>24-r%4*8&255;e[n+r>>>2]|=o<<24-(n+r)%4*8}else for(var s=0;s>>2]=i[s>>>2];return this.sigBytes+=a,this},clamp:function(){var e=this.words,i=this.sigBytes;e[i>>>2]&=4294967295<<32-i%4*8,e.length=t.ceil(i/4)},clone:function(){var t=l.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],i=0;i>>2]>>>24-a%4*8&255;n.push((r>>>4).toString(16)),n.push((15&r).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,i=[],n=0;n>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new c.init(i,e/2)}},h=u.Latin1={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],a=0;a>>2]>>>24-a%4*8&255;n.push(String.fromCharCode(r))}return n.join("")},parse:function(t){for(var e=t.length,i=[],n=0;n>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new c.init(i,e)}},p=u.Utf8={stringify:function(t){try{return decodeURIComponent(escape(h.stringify(t)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(t){return h.parse(unescape(encodeURIComponent(t)))}},v=s.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=p.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var i,n=this._data,a=n.words,r=n.sigBytes,o=this.blockSize,s=4*o,l=r/s;l=e?t.ceil(l):t.max((0|l)-this._minBufferSize,0);var u=l*o,d=t.min(4*u,r);if(u){for(var h=0;h>>2]>>>24-r%4*8&255,s=e[r+1>>>2]>>>24-(r+1)%4*8&255,l=e[r+2>>>2]>>>24-(r+2)%4*8&255,c=o<<16|s<<8|l,u=0;u<4&&r+.75*u>>6*(3-u)&63));var d=n.charAt(64);if(d)while(a.length%4)a.push(d);return a.join("")},parse:function(t){var e=t.length,i=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var a=0;a>>6-o%4*2,c=s|l;a[r>>>2]|=c<<24-r%4*8,r++}return n.create(a,r)}}(),t.enc.Base64})},64725:function(t,e,i){(function(e,n){t.exports=n(i(19021))})(0,function(t){return function(){var e=t,i=e.lib,n=i.WordArray,a=e.enc;a.Base64url={stringify:function(t,e){void 0===e&&(e=!0);var i=t.words,n=t.sigBytes,a=e?this._safe_map:this._map;t.clamp();for(var r=[],o=0;o>>2]>>>24-o%4*8&255,l=i[o+1>>>2]>>>24-(o+1)%4*8&255,c=i[o+2>>>2]>>>24-(o+2)%4*8&255,u=s<<16|l<<8|c,d=0;d<4&&o+.75*d>>6*(3-d)&63));var h=a.charAt(64);if(h)while(r.length%4)r.push(h);return r.join("")},parse:function(t,e){void 0===e&&(e=!0);var i=t.length,n=e?this._safe_map:this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var o=0;o>>6-o%4*2,c=s|l;a[r>>>2]|=c<<24-r%4*8,r++}return n.create(a,r)}}(),t.enc.Base64url})},45503:function(t,e,i){(function(e,n){t.exports=n(i(19021))})(0,function(t){return function(){var e=t,i=e.lib,n=i.WordArray,a=e.enc;a.Utf16=a.Utf16BE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],a=0;a>>2]>>>16-a%4*8&65535;n.push(String.fromCharCode(r))}return n.join("")},parse:function(t){for(var e=t.length,i=[],a=0;a>>1]|=t.charCodeAt(a)<<16-a%2*16;return n.create(i,2*e)}};function r(t){return t<<8&4278255360|t>>>8&16711935}a.Utf16LE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],a=0;a>>2]>>>16-a%4*8&65535);n.push(String.fromCharCode(o))}return n.join("")},parse:function(t){for(var e=t.length,i=[],a=0;a>>1]|=r(t.charCodeAt(a)<<16-a%2*16);return n.create(i,2*e)}}}(),t.enc.Utf16})},39506:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(45471),i(51025))})(0,function(t){return function(){var e=t,i=e.lib,n=i.Base,a=i.WordArray,r=e.algo,o=r.MD5,s=r.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:o,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){var i,n=this.cfg,r=n.hasher.create(),o=a.create(),s=o.words,l=n.keySize,c=n.iterations;while(s.lengthn&&(e=t.finalize(e)),e.clamp();for(var a=this._oKey=e.clone(),o=this._iKey=e.clone(),s=a.words,l=o.words,c=0;c>>2]|=t[n]<<24-n%4*8;a.call(this,i,e)}else a.apply(this,arguments)};r.prototype=n}}(),t.lib.WordArray})},84636:function(t,e,i){(function(e,n){t.exports=n(i(19021))})(0,function(t){return function(e){var i=t,n=i.lib,a=n.WordArray,r=n.Hasher,o=i.algo,s=[];(function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0})();var l=o.MD5=r.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var i=0;i<16;i++){var n=e+i,a=t[n];t[n]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}var r=this._hash.words,o=t[e+0],l=t[e+1],p=t[e+2],v=t[e+3],f=t[e+4],g=t[e+5],m=t[e+6],y=t[e+7],_=t[e+8],b=t[e+9],x=t[e+10],w=t[e+11],S=t[e+12],C=t[e+13],k=t[e+14],I=t[e+15],E=r[0],A=r[1],P=r[2],M=r[3];E=c(E,A,P,M,o,7,s[0]),M=c(M,E,A,P,l,12,s[1]),P=c(P,M,E,A,p,17,s[2]),A=c(A,P,M,E,v,22,s[3]),E=c(E,A,P,M,f,7,s[4]),M=c(M,E,A,P,g,12,s[5]),P=c(P,M,E,A,m,17,s[6]),A=c(A,P,M,E,y,22,s[7]),E=c(E,A,P,M,_,7,s[8]),M=c(M,E,A,P,b,12,s[9]),P=c(P,M,E,A,x,17,s[10]),A=c(A,P,M,E,w,22,s[11]),E=c(E,A,P,M,S,7,s[12]),M=c(M,E,A,P,C,12,s[13]),P=c(P,M,E,A,k,17,s[14]),A=c(A,P,M,E,I,22,s[15]),E=u(E,A,P,M,l,5,s[16]),M=u(M,E,A,P,m,9,s[17]),P=u(P,M,E,A,w,14,s[18]),A=u(A,P,M,E,o,20,s[19]),E=u(E,A,P,M,g,5,s[20]),M=u(M,E,A,P,x,9,s[21]),P=u(P,M,E,A,I,14,s[22]),A=u(A,P,M,E,f,20,s[23]),E=u(E,A,P,M,b,5,s[24]),M=u(M,E,A,P,k,9,s[25]),P=u(P,M,E,A,v,14,s[26]),A=u(A,P,M,E,_,20,s[27]),E=u(E,A,P,M,C,5,s[28]),M=u(M,E,A,P,p,9,s[29]),P=u(P,M,E,A,y,14,s[30]),A=u(A,P,M,E,S,20,s[31]),E=d(E,A,P,M,g,4,s[32]),M=d(M,E,A,P,_,11,s[33]),P=d(P,M,E,A,w,16,s[34]),A=d(A,P,M,E,k,23,s[35]),E=d(E,A,P,M,l,4,s[36]),M=d(M,E,A,P,f,11,s[37]),P=d(P,M,E,A,y,16,s[38]),A=d(A,P,M,E,x,23,s[39]),E=d(E,A,P,M,C,4,s[40]),M=d(M,E,A,P,o,11,s[41]),P=d(P,M,E,A,v,16,s[42]),A=d(A,P,M,E,m,23,s[43]),E=d(E,A,P,M,b,4,s[44]),M=d(M,E,A,P,S,11,s[45]),P=d(P,M,E,A,I,16,s[46]),A=d(A,P,M,E,p,23,s[47]),E=h(E,A,P,M,o,6,s[48]),M=h(M,E,A,P,y,10,s[49]),P=h(P,M,E,A,k,15,s[50]),A=h(A,P,M,E,g,21,s[51]),E=h(E,A,P,M,S,6,s[52]),M=h(M,E,A,P,v,10,s[53]),P=h(P,M,E,A,x,15,s[54]),A=h(A,P,M,E,l,21,s[55]),E=h(E,A,P,M,_,6,s[56]),M=h(M,E,A,P,I,10,s[57]),P=h(P,M,E,A,m,15,s[58]),A=h(A,P,M,E,C,21,s[59]),E=h(E,A,P,M,f,6,s[60]),M=h(M,E,A,P,w,10,s[61]),P=h(P,M,E,A,p,15,s[62]),A=h(A,P,M,E,b,21,s[63]),r[0]=r[0]+E|0,r[1]=r[1]+A|0,r[2]=r[2]+P|0,r[3]=r[3]+M|0},_doFinalize:function(){var t=this._data,i=t.words,n=8*this._nDataBytes,a=8*t.sigBytes;i[a>>>5]|=128<<24-a%32;var r=e.floor(n/4294967296),o=n;i[15+(a+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),i[14+(a+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(i.length+1),this._process();for(var s=this._hash,l=s.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});function c(t,e,i,n,a,r,o){var s=t+(e&i|~e&n)+a+o;return(s<>>32-r)+e}function u(t,e,i,n,a,r,o){var s=t+(e&n|i&~n)+a+o;return(s<>>32-r)+e}function d(t,e,i,n,a,r,o){var s=t+(e^i^n)+a+o;return(s<>>32-r)+e}function h(t,e,i,n,a,r,o){var s=t+(i^(e|~n))+a+o;return(s<>>32-r)+e}i.MD5=r._createHelper(l),i.HmacMD5=r._createHmacHelper(l)}(Math),t.MD5})},82169:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.mode.CFB=function(){var e=t.lib.BlockCipherMode.extend();function i(t,e,i,n){var a,r=this._iv;r?(a=r.slice(0),this._iv=void 0):a=this._prevBlock,n.encryptBlock(a,0);for(var o=0;o0?"+":"")+t._s(t.priceChange.toFixed(2))+"% ")])]),t.isCryptoMarket?e("a-button",{staticClass:"qt-header-btn",attrs:{size:"small"},on:{click:t.openQuickTrade}},[e("a-icon",{attrs:{type:"thunderbolt",theme:"filled"}}),t._v(" "+t._s(t.$t("quickTrade.openPanel"))+" ")],1):t._e()],1):t._e()])]),e("div",{staticClass:"chart-content"},[e("div",{staticClass:"chart-main-row"},[t.currentSymbol?e("div",{staticClass:"mobile-symbol-price"},[e("div",{staticClass:"mobile-symbol-info"},[e("span",{staticClass:"mobile-market-tag"},[t._v(t._s(t.currentMarket))]),e("span",[t._v("-")]),e("span",{staticClass:"mobile-symbol-label"},[t._v(t._s(t.currentSymbol))])]),e("div",{staticClass:"mobile-price-info",class:t.priceChangeClass},[e("span",{staticClass:"mobile-symbol-price"},[t._v(t._s(t.currentPrice))]),e("span",{staticClass:"mobile-symbol-change"},[t._v(" "+t._s(t.priceChange>0?"+":"")+t._s(t.priceChange.toFixed(2))+"% ")])])]):t._e(),e("kline-chart",{ref:"klineChart",attrs:{symbol:t.currentSymbol,market:t.currentMarket,timeframe:t.timeframe,theme:t.chartTheme,activeIndicators:t.activeIndicators,realtimeEnabled:t.realtimeEnabled},on:{"price-change":t.handlePriceChange,retry:t.handleChartRetry,"indicator-toggle":t.handleIndicatorToggle}}),e("div",{staticClass:"chart-right"},[e("div",{staticClass:"indicators-panel"},[e("div",{staticClass:"panel-header"},[e("span",[t._v(t._s(t.$t("dashboard.indicator.panel.title")))]),e("div",{staticStyle:{display:"flex","align-items":"center","margin-left":"auto",gap:"8px"}},[t.isMobile?e("a-button",{staticClass:"mobile-header-create-btn",attrs:{type:"primary",size:"small",icon:"plus"},on:{click:t.handleCreateIndicator}},[t._v(" "+t._s(t.$t("dashboard.indicator.create"))+" ")]):t._e(),e("a-tooltip",{attrs:{title:t.realtimeEnabled?t.$t("dashboard.indicator.panel.realtimeOn"):t.$t("dashboard.indicator.panel.realtimeOff")}},[e("a-button",{staticClass:"realtime-toggle-btn",class:{active:t.realtimeEnabled},attrs:{type:"text"},on:{click:t.toggleRealtime}},[e("a-icon",{attrs:{type:t.realtimeEnabled?"sync":"pause-circle",spin:t.realtimeEnabled}})],1)],1)],1)]),e("div",{staticClass:"panel-body"},[t.isMobile?[e("div",{staticClass:"mobile-tab-content"},[e("div",{staticClass:"section-content custom-scrollbar"},[t._l(t.customIndicators,function(i){return e("div",{key:"custom-"+i.id,class:["indicator-card",{"indicator-active":t.isIndicatorActive("custom-"+i.id)}],on:{click:function(e){return t.toggleIndicator(i,"custom")}}},[e("div",{staticClass:"card-content"},[e("div",{staticClass:"card-header"},[e("span",{staticClass:"card-name"},[t._v(t._s(i.name))]),e("div",{staticClass:"card-actions"},[e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.action.edit")}},[e("a-icon",{staticClass:"action-icon edit-icon",attrs:{type:"edit"},on:{click:function(e){return e.stopPropagation(),t.handleEditIndicator(i)}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.action.delete")}},[e("a-icon",{staticClass:"action-icon delete-icon",attrs:{type:"delete"},on:{click:function(e){return e.stopPropagation(),t.handleDeleteIndicator(i)}}})],1),e("a-tooltip",{attrs:{title:t.isIndicatorActive("custom-"+i.id)?t.$t("dashboard.indicator.action.stop"):t.$t("dashboard.indicator.action.start")}},[e("a-icon",{class:["action-icon","toggle-icon",{active:t.isIndicatorActive("custom-"+i.id)}],attrs:{type:t.isIndicatorActive("custom-"+i.id)?"pause-circle":"play-circle"},on:{click:function(e){return e.stopPropagation(),t.toggleIndicator(i,"custom")}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.backtest.title")}},[e("a-icon",{staticClass:"action-icon backtest-icon",attrs:{type:"experiment"},on:{click:function(e){return e.stopPropagation(),t.handleOpenBacktest(i)}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.backtest.historyTitle")}},[e("a-icon",{staticClass:"action-icon backtest-history-icon",attrs:{type:"clock-circle"},on:{click:function(e){return e.stopPropagation(),t.handleOpenBacktestHistory(i)}}})],1),e("a-tooltip",{attrs:{title:i.publish_to_community?t.$t("dashboard.indicator.action.unpublish"):t.$t("dashboard.indicator.action.publish")}},[e("a-icon",{class:["action-icon","publish-icon",{published:i.publish_to_community}],attrs:{type:i.publish_to_community?"cloud":"cloud-upload"},on:{click:function(e){return e.stopPropagation(),t.handlePublishIndicator(i)}}})],1)],1)]),e("span",{staticClass:"card-desc"},[t._v(t._s(i.description||""))])])])}),0===t.customIndicators.length?e("div",{staticClass:"empty-indicators"},[e("a-icon",{attrs:{type:"info-circle"}}),e("span",[t._v(t._s(t.$t("dashboard.indicator.empty")))])],1):t._e()],2)])]:[e("div",{staticClass:"indicator-section",class:{"section-empty":0===t.customIndicators.length}},[e("div",{staticClass:"section-label"},[e("div",{staticClass:"section-label-left",on:{click:t.toggleCustomSection}},[e("a-icon",{staticClass:"collapse-icon",attrs:{type:t.customSectionCollapsed?"right":"down"}}),e("span",[t._v(t._s(t.$t("dashboard.indicator.section.myCreated"))+" ("+t._s(t.customIndicators.length)+")")])],1),e("a-button",{staticClass:"create-indicator-btn",attrs:{type:"primary",size:"small",icon:"plus"},on:{click:function(e){return e.stopPropagation(),t.handleCreateIndicator.apply(null,arguments)}}},[t._v(" "+t._s(t.$t("dashboard.indicator.create"))+" ")])],1),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.customSectionCollapsed,expression:"!customSectionCollapsed"}],staticClass:"section-content custom-scrollbar"},[t._l(t.customIndicators,function(i){return e("div",{key:"custom-"+i.id,class:["indicator-card",{"indicator-active":t.isIndicatorActive("custom-"+i.id)}],on:{click:function(e){return t.toggleIndicator(i,"custom")}}},[e("div",{staticClass:"card-content"},[e("div",{staticClass:"card-header"},[e("span",{staticClass:"card-name"},[t._v(t._s(i.name))]),e("div",{staticClass:"card-actions"},[e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.action.edit")}},[e("a-icon",{staticClass:"action-icon edit-icon",attrs:{type:"edit"},on:{click:function(e){return e.stopPropagation(),t.handleEditIndicator(i)}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.action.delete")}},[e("a-icon",{staticClass:"action-icon delete-icon",attrs:{type:"delete"},on:{click:function(e){return e.stopPropagation(),t.handleDeleteIndicator(i)}}})],1),e("a-tooltip",{attrs:{title:t.isIndicatorActive("custom-"+i.id)?t.$t("dashboard.indicator.action.stop"):t.$t("dashboard.indicator.action.start")}},[e("a-icon",{class:["action-icon","toggle-icon",{active:t.isIndicatorActive("custom-"+i.id)}],attrs:{type:t.isIndicatorActive("custom-"+i.id)?"pause-circle":"play-circle"},on:{click:function(e){return e.stopPropagation(),t.toggleIndicator(i,"custom")}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.backtest.title")}},[e("a-icon",{staticClass:"action-icon backtest-icon",attrs:{type:"experiment"},on:{click:function(e){return e.stopPropagation(),t.handleOpenBacktest(i)}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.backtest.historyTitle")}},[e("a-icon",{staticClass:"action-icon backtest-history-icon",attrs:{type:"clock-circle"},on:{click:function(e){return e.stopPropagation(),t.handleOpenBacktestHistory(i)}}})],1),e("a-tooltip",{attrs:{title:i.publish_to_community?t.$t("dashboard.indicator.action.unpublish"):t.$t("dashboard.indicator.action.publish")}},[e("a-icon",{class:["action-icon","publish-icon",{published:i.publish_to_community}],attrs:{type:i.publish_to_community?"cloud":"cloud-upload"},on:{click:function(e){return e.stopPropagation(),t.handlePublishIndicator(i)}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.action.createStrategy")}},[e("a-icon",{staticClass:"action-icon create-strategy-icon",attrs:{type:"rocket"},on:{click:function(e){return e.stopPropagation(),t.handleCreateStrategyFromIndicator(i)}}})],1)],1)]),e("span",{staticClass:"card-desc"},[t._v(t._s(i.description||""))])])])}),0===t.customIndicators.length?e("div",{staticClass:"empty-indicators"},[e("a-icon",{attrs:{type:"info-circle"}}),e("span",[t._v(t._s(t.$t("dashboard.indicator.empty")))])],1):t._e()],2)]),e("div",{staticClass:"indicator-section",class:{"section-empty":0===t.purchasedIndicators.length}},[e("div",{staticClass:"section-label"},[e("div",{staticClass:"section-label-left",on:{click:function(e){t.purchasedSectionCollapsed=!t.purchasedSectionCollapsed}}},[e("a-icon",{staticClass:"collapse-icon",attrs:{type:t.purchasedSectionCollapsed?"right":"down"}}),e("span",[t._v(t._s(t.$t("dashboard.indicator.section.purchased"))+" ("+t._s(t.purchasedIndicators.length)+")")])],1),e("a-button",{staticClass:"buy-indicator-btn",attrs:{type:"link",size:"small",icon:"shop"},on:{click:function(e){return e.stopPropagation(),t.goToIndicatorMarket.apply(null,arguments)}}},[t._v(" "+t._s(t.$t("menu.dashboard.community"))+" ")])],1),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.purchasedSectionCollapsed,expression:"!purchasedSectionCollapsed"}],staticClass:"section-content custom-scrollbar"},[t._l(t.purchasedIndicators,function(i){return e("div",{key:"purchased-"+i.id,class:["indicator-card","purchased-indicator",{"indicator-active":t.isIndicatorActive("purchased-"+i.id)}],on:{click:function(e){return t.toggleIndicator(i,"purchased")}}},[e("div",{staticClass:"card-content"},[e("div",{staticClass:"card-header"},[e("span",{staticClass:"card-name"},[e("a-icon",{staticClass:"purchased-icon",attrs:{type:"shopping"}}),t._v(" "+t._s(i.name)+" ")],1),e("div",{staticClass:"card-actions"},[e("a-tooltip",{attrs:{title:t.isIndicatorActive("purchased-"+i.id)?t.$t("dashboard.indicator.action.stop"):t.$t("dashboard.indicator.action.start")}},[e("a-icon",{class:["action-icon","toggle-icon",{active:t.isIndicatorActive("purchased-"+i.id)}],attrs:{type:t.isIndicatorActive("purchased-"+i.id)?"pause-circle":"play-circle"},on:{click:function(e){return e.stopPropagation(),t.toggleIndicator(i,"purchased")}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.backtest.title")}},[e("a-icon",{staticClass:"action-icon backtest-icon",attrs:{type:"experiment"},on:{click:function(e){return e.stopPropagation(),t.handleOpenBacktest(i)}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.backtest.historyTitle")}},[e("a-icon",{staticClass:"action-icon backtest-history-icon",attrs:{type:"clock-circle"},on:{click:function(e){return e.stopPropagation(),t.handleOpenBacktestHistory(i)}}})],1)],1)]),e("span",{staticClass:"card-desc"},[t._v(t._s(i.description||""))])])])}),0===t.purchasedIndicators.length?e("div",{staticClass:"empty-indicators"},[e("a-icon",{attrs:{type:"shopping"}}),e("span",[t._v(t._s(t.$t("dashboard.indicator.emptyPurchased")))])],1):t._e()],2)])]],2)])])],1),e("indicator-editor",{ref:"indicatorEditor",attrs:{visible:t.showIndicatorEditor,indicator:t.editingIndicator,userId:t.userId},on:{run:t.handleRunIndicator,save:t.handleSaveIndicator,cancel:function(e){t.showIndicatorEditor=!1,t.editingIndicator=null}}}),e("a-modal",{attrs:{visible:t.showParamsModal,title:t.$t("dashboard.indicator.paramsConfig.title"),confirmLoading:t.loadingParams,width:500,maskClosable:!1,keyboard:!1},on:{ok:t.confirmIndicatorParams,cancel:t.cancelIndicatorParams,afterClose:t.handleParamsModalAfterClose}},[t.pendingIndicator?e("div",{staticClass:"params-config-modal"},[e("div",{staticClass:"indicator-info"},[e("span",{staticClass:"indicator-name"},[t._v(t._s(t.pendingIndicator.name))])]),e("a-divider"),t.indicatorParams.length>0?e("div",{staticClass:"params-form"},t._l(t.indicatorParams,function(i){return e("div",{key:i.name,staticClass:"param-item"},[e("div",{staticClass:"param-header"},[e("label",{staticClass:"param-label"},[t._v(t._s(i.name))]),i.description?e("a-tooltip",{attrs:{title:i.description}},[e("a-icon",{staticStyle:{color:"#999","margin-left":"4px"},attrs:{type:"question-circle"}})],1):t._e()],1),"int"===i.type?e("a-input-number",{staticStyle:{width:"100%"},attrs:{precision:0},model:{value:t.indicatorParamValues[i.name],callback:function(e){t.$set(t.indicatorParamValues,i.name,e)},expression:"indicatorParamValues[param.name]"}}):"float"===i.type?e("a-input-number",{staticStyle:{width:"100%"},attrs:{precision:4},model:{value:t.indicatorParamValues[i.name],callback:function(e){t.$set(t.indicatorParamValues,i.name,e)},expression:"indicatorParamValues[param.name]"}}):"bool"===i.type?e("a-switch",{model:{value:t.indicatorParamValues[i.name],callback:function(e){t.$set(t.indicatorParamValues,i.name,e)},expression:"indicatorParamValues[param.name]"}}):e("a-input",{model:{value:t.indicatorParamValues[i.name],callback:function(e){t.$set(t.indicatorParamValues,i.name,e)},expression:"indicatorParamValues[param.name]"}})],1)}),0):e("a-empty",{attrs:{description:t.$t("dashboard.indicator.paramsConfig.noParams")}})],1):t._e()]),e("a-modal",{attrs:{title:t.publishIndicator&&t.publishIndicator.publish_to_community?t.$t("dashboard.indicator.publish.editTitle"):t.$t("dashboard.indicator.publish.title"),visible:t.showPublishModal,confirmLoading:t.publishing,width:"500px",okText:t.publishIndicator&&t.publishIndicator.publish_to_community?t.$t("dashboard.indicator.publish.update"):t.$t("dashboard.indicator.publish.confirm"),cancelText:t.$t("common.cancel")},on:{ok:t.handleConfirmPublish,cancel:function(e){t.showPublishModal=!1,t.publishIndicator=null}}},[e("a-form-model",{ref:"publishForm",attrs:{model:t.publishForm,rules:t.publishRules,layout:"vertical"}},[e("a-alert",{staticStyle:{"margin-bottom":"16px"},attrs:{type:"info","show-icon":"",message:t.$t("dashboard.indicator.publish.hint")}}),e("a-form-model-item",{attrs:{label:t.$t("dashboard.indicator.publish.pricingType"),prop:"pricingType"}},[e("a-radio-group",{model:{value:t.publishPricingType,callback:function(e){t.publishPricingType=e},expression:"publishPricingType"}},[e("a-radio",{attrs:{value:"free"}},[t._v(t._s(t.$t("dashboard.indicator.publish.free")))]),e("a-radio",{attrs:{value:"paid"}},[t._v(t._s(t.$t("dashboard.indicator.publish.paid")))])],1)],1),"paid"===t.publishPricingType?e("a-form-model-item",{attrs:{label:t.$t("dashboard.indicator.publish.price"),prop:"price"}},[e("a-input-number",{staticStyle:{width:"200px"},attrs:{min:1,max:1e4,precision:0},model:{value:t.publishPrice,callback:function(e){t.publishPrice=e},expression:"publishPrice"}}),e("span",{staticStyle:{"margin-left":"8px"}},[t._v(t._s(t.$t("community.credits")))])],1):t._e(),"paid"===t.publishPricingType?e("a-form-model-item",{attrs:{label:t.$t("dashboard.indicator.publish.vipFree")}},[e("a-switch",{model:{value:t.publishVipFree,callback:function(e){t.publishVipFree=e},expression:"publishVipFree"}}),e("div",{staticStyle:{"margin-top":"6px",color:"rgba(0,0,0,0.45)","font-size":"12px"}},[t._v(" "+t._s(t.$t("dashboard.indicator.publish.vipFreeHint"))+" ")])],1):t._e(),e("a-form-model-item",{attrs:{label:t.$t("dashboard.indicator.publish.description"),prop:"description"}},[e("a-textarea",{attrs:{placeholder:t.$t("dashboard.indicator.publish.descriptionPlaceholder"),rows:4,maxLength:500},model:{value:t.publishDescription,callback:function(e){t.publishDescription=e},expression:"publishDescription"}})],1),t.publishIndicator&&t.publishIndicator.publish_to_community?e("div",{staticStyle:{"margin-top":"16px"}},[e("a-button",{attrs:{type:"danger",ghost:"",loading:t.unpublishing},on:{click:t.handleUnpublish}},[e("a-icon",{attrs:{type:"close-circle"}}),t._v(" "+t._s(t.$t("dashboard.indicator.publish.unpublish"))+" ")],1)],1):t._e()],1)],1),e("a-modal",{attrs:{title:t.$t("dashboard.analysis.modal.addStock.title"),visible:t.showAddStockModal,confirmLoading:t.addingStock,width:"600px",okText:t.$t("dashboard.analysis.modal.addStock.confirm"),cancelText:t.$t("dashboard.analysis.modal.addStock.cancel")},on:{ok:t.handleAddStock,cancel:t.handleCloseAddStockModal}},[e("div",{staticClass:"add-stock-modal-content"},[e("a-tabs",{staticClass:"market-tabs",on:{change:t.handleMarketTabChange},model:{value:t.selectedMarketTab,callback:function(e){t.selectedMarketTab=e},expression:"selectedMarketTab"}},t._l(t.marketTypes,function(i){return e("a-tab-pane",{key:i.value,attrs:{tab:t.$t(i.i18nKey||"dashboard.analysis.market.".concat(i.value))}})}),1),e("div",{staticClass:"symbol-search-section"},[e("a-input-search",{attrs:{placeholder:t.$t("dashboard.analysis.modal.addStock.searchOrInputPlaceholder"),loading:t.searchingSymbols,size:"large","allow-clear":""},on:{search:t.handleSearchOrInput,change:t.handleSymbolSearchInput},model:{value:t.symbolSearchKeyword,callback:function(e){t.symbolSearchKeyword=e},expression:"symbolSearchKeyword"}},[e("a-button",{attrs:{slot:"enterButton",type:"primary",icon:"search"},slot:"enterButton"},[t._v(" "+t._s(t.$t("dashboard.analysis.modal.addStock.search"))+" ")])],1)],1),t.symbolSearchResults.length>0?e("div",{staticClass:"search-results-section"},[e("div",{staticClass:"section-title"},[e("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"search"}}),t._v(" "+t._s(t.$t("dashboard.analysis.modal.addStock.searchResults"))+" ")],1),e("a-list",{staticClass:"symbol-list",attrs:{"data-source":t.symbolSearchResults,loading:t.searchingSymbols,size:"small"},scopedSlots:t._u([{key:"renderItem",fn:function(i){return e("a-list-item",{staticClass:"symbol-list-item",on:{click:function(e){return t.selectSymbol(i)}}},[e("a-list-item-meta",[e("template",{slot:"title"},[e("div",{staticClass:"symbol-item-content"},[e("span",{staticClass:"symbol-code"},[t._v(t._s(i.symbol))]),e("span",{staticClass:"symbol-name"},[t._v(t._s(i.name))]),i.exchange?e("a-tag",{staticStyle:{"margin-left":"8px"},attrs:{size:"small",color:"blue"}},[t._v(" "+t._s(i.exchange)+" ")]):t._e()],1)])],2)],1)}}],null,!1,1074844145)})],1):t._e(),e("div",{staticClass:"hot-symbols-section"},[e("div",{staticClass:"section-title"},[e("a-icon",{staticStyle:{color:"#ff4d4f","margin-right":"4px"},attrs:{type:"fire"}}),t._v(" "+t._s(t.$t("dashboard.analysis.modal.addStock.hotSymbols"))+" ")],1),e("a-spin",{attrs:{spinning:t.loadingHotSymbols}},[t.hotSymbols.length>0?e("a-list",{staticClass:"symbol-list",attrs:{"data-source":t.hotSymbols,size:"small"},scopedSlots:t._u([{key:"renderItem",fn:function(i){return e("a-list-item",{staticClass:"symbol-list-item",on:{click:function(e){return t.selectSymbol(i)}}},[e("a-list-item-meta",[e("template",{slot:"title"},[e("div",{staticClass:"symbol-item-content"},[e("span",{staticClass:"symbol-code"},[t._v(t._s(i.symbol))]),e("span",{staticClass:"symbol-name"},[t._v(t._s(i.name))]),i.exchange?e("a-tag",{staticStyle:{"margin-left":"8px"},attrs:{size:"small",color:"orange"}},[t._v(" "+t._s(i.exchange)+" ")]):t._e()],1)])],2)],1)}}],null,!1,2177647935)}):e("a-empty",{attrs:{description:t.$t("dashboard.analysis.modal.addStock.noHotSymbols"),image:!1}})],1)],1),t.selectedSymbolForAdd?e("div",{staticClass:"selected-symbol-section"},[e("a-alert",{attrs:{message:t.$t("dashboard.analysis.modal.addStock.selectedSymbol"),type:"info","show-icon":"",closable:""},on:{close:function(e){t.selectedSymbolForAdd=null}}},[e("template",{slot:"description"},[e("div",{staticClass:"selected-symbol-info"},[e("a-tag",{staticStyle:{"margin-right":"8px"},attrs:{color:t.getMarketColor(t.selectedSymbolForAdd.market)}},[t._v(" "+t._s(t.$t("dashboard.analysis.market.".concat(t.selectedSymbolForAdd.market)))+" ")]),e("strong",[t._v(t._s(t.selectedSymbolForAdd.symbol))]),t.selectedSymbolForAdd.name?e("span",{staticStyle:{color:"#999","margin-left":"8px"}},[t._v(t._s(t.selectedSymbolForAdd.name))]):e("span",{staticStyle:{color:"#999","margin-left":"8px","font-style":"italic"}},[t._v(t._s(t.$t("dashboard.analysis.modal.addStock.nameWillBeFetched")))])],1)])],2)],1):t._e()],1)])],1),e("a-tooltip",{attrs:{title:t.$t("quickTrade.openPanel"),placement:"left"}},[!t.showQuickTrade&&t.currentSymbol&&t.isCryptoMarket?e("div",{staticClass:"qt-floating-btn",on:{click:t.openQuickTrade}},[e("a-icon",{attrs:{type:"thunderbolt",theme:"filled"}})],1):t._e()]),e("quick-trade-panel",{attrs:{visible:t.showQuickTrade,symbol:t.qtSymbol,"preset-side":t.qtSide,"preset-price":t.qtPrice,source:"indicator","market-type":"swap"},on:{close:function(e){t.showQuickTrade=!1},"order-success":t.onQuickTradeSuccess,"update:symbol":t.handleQuickTradeSymbolChange}})],1)},a=[],r=(i(62621),i(43898)),o=i(44735),s=i(15863),l=i(81127),c=i(56252),u=(i(6011),i(18787)),d=i(76338),h=(i(28706),i(2008),i(50113),i(48980),i(74423),i(48598),i(62062),i(54554),i(79432),i(26099),i(16034),i(38781),i(31415),i(21699),i(47764),i(42762),i(23500),i(62953),i(85471)),p=i(95353),v=i(75769),f=i(35038),g=i(505),m=function(){var t=this,e=t._self._c;return e("div",[e("a-modal",{staticClass:"indicator-editor-modal",style:t.isMobile?{top:0,paddingBottom:0}:{top:"2%"},attrs:{title:t.$t("dashboard.indicator.editor.title"),visible:t.visible,width:t.isMobile?"100%":"95vw",confirmLoading:t.saving,okText:t.$t("dashboard.indicator.editor.save"),cancelText:t.$t("dashboard.indicator.editor.cancel"),maskClosable:!1,centered:!1},on:{ok:t.handleSave,cancel:t.handleCancel,afterClose:t.handleAfterClose}},[e("div",{staticClass:"editor-content"},[e("a-row",{staticClass:"editor-layout",class:{"mobile-layout":t.isMobile},attrs:{gutter:16}},[e("a-col",{staticClass:"code-editor-column",attrs:{span:24,xs:24,sm:24,md:24}},[e("div",{staticClass:"code-section"},[e("div",{staticClass:"section-header"},[e("div",{staticClass:"header-left"},[e("span",{staticClass:"section-title"},[t._v(t._s(t.$t("dashboard.indicator.editor.code")))])]),e("div",{staticClass:"section-actions"},[e("a-button",{staticStyle:{padding:"0 8px",color:"#52c41a","font-weight":"bold"},attrs:{type:"link",size:"small",loading:t.verifying},on:{click:t.handleVerifyCode}},[e("a-icon",{attrs:{type:"check-circle"}}),t._v(" "+t._s(t.$t("dashboard.indicator.editor.verifyCode"))+" ")],1),e("a-button",{staticStyle:{padding:"0"},attrs:{type:"link",size:"small"},on:{click:t.goToDocs}},[e("a-icon",{attrs:{type:"book"}}),t._v(" "+t._s(t.$t("dashboard.indicator.editor.guide"))+" ")],1)],1)]),e("a-alert",{staticStyle:{"margin-bottom":"12px"},attrs:{type:"info","show-icon":"",message:t.$t("dashboard.indicator.boundary.message"),description:t.$t("dashboard.indicator.boundary.indicatorRule")}}),e("div",{staticClass:"code-mode-split"},[e("a-row",{staticClass:"code-mode-row",attrs:{gutter:16}},[e("a-col",{staticClass:"code-pane",attrs:{xs:24,sm:24,md:18}},[e("div",{ref:"codeEditorContainer",staticClass:"code-editor-container"})]),e("a-col",{staticClass:"ai-pane",attrs:{xs:24,sm:24,md:6}},[e("div",{staticClass:"ai-panel"},[e("div",{staticClass:"ai-panel-title"},[e("a-icon",{attrs:{type:"robot"}}),e("span",[t._v(t._s(t.$t("dashboard.indicator.editor.aiGenerate")))])],1),e("a-textarea",{attrs:{placeholder:t.$t("dashboard.indicator.editor.aiPromptPlaceholder"),rows:12,"auto-size":{minRows:12,maxRows:20}},model:{value:t.aiPrompt,callback:function(e){t.aiPrompt=e},expression:"aiPrompt"}}),e("a-button",{staticStyle:{"margin-top":"10px"},attrs:{type:"primary",block:"",loading:t.aiGenerating,size:"large"},on:{click:t.handleAIGenerate}},[t._v(" "+t._s(t.$t("dashboard.indicator.editor.aiGenerateBtn"))+" ")])],1)])],1)],1)],1)])],1)],1),e("div",{staticClass:"editor-footer",attrs:{slot:"footer"},slot:"footer"},[e("a-button",{on:{click:t.handleCancel}},[t._v(" "+t._s(t.$t("dashboard.indicator.editor.cancel"))+" ")]),e("a-button",{attrs:{type:"primary",loading:t.saving},on:{click:t.handleSave}},[t._v(" "+t._s(t.$t("dashboard.indicator.editor.save"))+" ")])],1)])],1)},y=[],_=i(57532),b=(i(2892),i(27495),i(99449),i(25440),i(11392),i(15237)),x=i.n(b),w=(i(74806),i(55218),i(97923),i(50436),i(74053)),S=i.n(w),C=i(75314),k={name:"IndicatorEditor",props:{visible:{type:Boolean,default:!1},indicator:{type:Object,default:null},userId:{type:Number,default:null}},data:function(){return{saving:!1,codeEditor:null,aiPrompt:"",aiGenerating:!1,verifying:!1,isMobile:!1}},computed:{},watch:{visible:function(t){var e=this;t?this.$nextTick(function(){setTimeout(function(){!e.codeEditor&&e.$refs.codeEditorContainer&&e.initCodeEditor(),e.initFormData()},200)}):this.codeEditor&&this.codeEditor.refresh()},indicator:{handler:function(t){var e=this;t&&this.visible&&this.$nextTick(function(){setTimeout(function(){e.initFormData()},100)})},deep:!0}},mounted:function(){var t=this;this.checkMobile(),window.addEventListener("resize",this.checkMobile),this.visible&&this.$nextTick(function(){setTimeout(function(){t.initCodeEditor()},100)})},beforeDestroy:function(){if(window.removeEventListener("resize",this.checkMobile),this.codeEditor)try{if("function"===typeof this.codeEditor.toTextArea)this.codeEditor.toTextArea();else if("function"===typeof this.codeEditor.getWrapperElement){var t=this.codeEditor.getWrapperElement();t&&t.parentNode&&t.parentNode.removeChild(t)}}catch(e){}finally{this.codeEditor=null}},methods:{getDefaultIndicatorCode:function(){return'#Demo Code:\n#my_indicator_name = "My Buy/Sell Indicator"\n#my_indicator_description = "Buy/Sell only; execution is normalized in backend."\n\n#df = df.copy()\n#sma = df["close"].rolling(14).mean()\n#buy = (df["close"] > sma) & (df["close"].shift(1) <= sma.shift(1))\n#sell = (df["close"] < sma) & (df["close"].shift(1) >= sma.shift(1))\n#df["buy"] = buy.fillna(False).astype(bool)\n#df["sell"] = sell.fillna(False).astype(bool)\n\n#buy_marks = [df["low"].iloc[i] * 0.995 if df["buy"].iloc[i] else None for i in range(len(df))]\n#sell_marks = [df["high"].iloc[i] * 1.005 if df["sell"].iloc[i] else None for i in range(len(df))]\n\n#output = {\n# "name": my_indicator_name,\n# "plots": [],\n# "signals": [\n# {"type": "buy", "text": "B", "data": buy_marks, "color": "#00E676"},\n# {"type": "sell", "text": "S", "data": sell_marks, "color": "#FF5252"}\n# ]\n#}\n'},checkMobile:function(){this.isMobile=window.innerWidth<=768},goToDocs:function(){window.open("https://github.com/brokermr810/QuantDinger/blob/main/docs/STRATEGY_DEV_GUIDE.md","_blank")},handleVerifyCode:function(){var t=this,e=this.codeEditor?this.codeEditor.getValue():"";e&&e.trim()?(this.verifying=!0,(0,v.Ay)({url:"/api/indicator/verifyCode",method:"post",data:{code:e}}).then(function(e){if(1===e.code){var i=e.data||{};t.$message.success("".concat(t.$t("dashboard.indicator.editor.verifyCodeSuccess")," (").concat(i.plots_count||0," plots, ").concat(i.signals_count||0," signals)"))}else{var n=e.data||{};t.$error({title:t.$t("dashboard.indicator.editor.verifyCodeFailed"),width:600,content:function(t){return t("div",[t("p",{style:{fontWeight:"bold",color:"#ff4d4f"}},e.msg),n.details?t("pre",{style:{background:"#f5f5f5",padding:"8px",overflow:"auto",maxHeight:"300px",marginTop:"8px",fontSize:"12px",fontFamily:"monospace"}},n.details):null])}})}}).catch(function(e){t.$message.error("Request Failed: "+(e.message||"Unknown Error"))}).finally(function(){t.verifying=!1})):this.$message.warning(this.$t("dashboard.indicator.editor.verifyCodeEmpty"))},cleanMarkdownCodeBlocks:function(t){if(!t||"string"!==typeof t)return t;var e=t.trim(),i=/```/.test(e);return i?(e=e.replace(/^```[\w]*\s*\n?/i,""),e.startsWith("```")&&(e=e.replace(/^```\s*\n?/g,"")),e.endsWith("```")&&(e=e.replace(/\n?```\s*$/g,"")),e=e.replace(/^\s*```[\w]*\s*$/gm,""),e=e.replace(/^\s*```\s*$/gm,""),e=e.replace(/\n{3,}/g,"\n\n"),e=e.trim(),e):e},initFormData:function(){var t=this;if(this.visible){var e=this.indicator&&this.indicator.code||"";e&&String(e).trim()||(e=this.getDefaultIndicatorCode()),this.$nextTick(function(){setTimeout(function(){t.aiPrompt="",t.codeEditor&&(t.codeEditor.setValue(e),t.codeEditor.refresh())},50)})}},initCodeEditor:function(){var t=this;if(this.$refs.codeEditorContainer){if(this.codeEditor){try{if("function"===typeof this.codeEditor.toTextArea)this.codeEditor.toTextArea();else if("function"===typeof this.codeEditor.getWrapperElement){var e=this.codeEditor.getWrapperElement();e&&e.parentNode&&e.parentNode.removeChild(e)}}catch(i){}this.codeEditor=null}try{this.$refs.codeEditorContainer.innerHTML="",this.codeEditor=x()(this.$refs.codeEditorContainer,{value:function(){var e=t.indicator&&t.indicator.code||"";return e&&String(e).trim()?e:t.getDefaultIndicatorCode()}(),mode:"python",theme:"eclipse",lineNumbers:!0,lineWrapping:!0,indentUnit:4,indentWithTabs:!1,smartIndent:!0,matchBrackets:!0,autoCloseBrackets:!0,styleActiveLine:!0,foldGutter:!1,gutters:["CodeMirror-linenumbers"],tabSize:4,viewportMargin:1/0}),this.codeEditor.on("change",function(t){t.getValue()}),this.$nextTick(function(){t.codeEditor&&t.codeEditor.refresh()})}catch(n){}}},handleSave:function(){var t=this.codeEditor?this.codeEditor.getValue():"",e=t||"";e.trim()?(this.saving=!0,this.$emit("save",{id:this.indicator?this.indicator.id:0,code:e,userid:this.userId})):this.$message.warning(this.$t("dashboard.indicator.editor.codeRequired"))},handleCancel:function(){this.codeEditor&&this.codeEditor.setValue(""),this.$emit("cancel")},handleAfterClose:function(){var t=this;this.codeEditor&&this.$nextTick(function(){t.codeEditor&&t.codeEditor.refresh()}),this.aiPrompt=""},handleAIGenerate:function(){var t=this;return(0,c.A)((0,l.A)().m(function e(){var i,n,a,r,o,s,c,u,d,h,p,v,f,g,m,y,b,x,w,k,I,E,A,P,M;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.aiPrompt&&t.aiPrompt.trim()){e.n=1;break}return t.$message.warning(t.$t("dashboard.indicator.editor.aiPromptRequired")),e.a(2);case 1:return t.aiGenerating=!0,i="",t.codeEditor&&(i=t.codeEditor.getValue()||""),t.codeEditor&&(t.codeEditor.setValue("# AI generating...\n"),t.codeEditor.refresh()),n="",e.p=2,a="/api/indicator/aiGenerate",r=S().get(C.Xh),o={prompt:t.aiPrompt.trim()},i.trim()&&(o.existingCode=i.trim()),e.n=3,fetch(a,{method:"POST",headers:{"Content-Type":"application/json",Authorization:r?"Bearer ".concat(r):"","Access-Token":r||"",Token:r||""},body:JSON.stringify(o),credentials:"include"});case 3:if(s=e.v,s.ok){e.n=5;break}return e.n=4,s.text().catch(function(){return""});case 4:throw c=e.v,new Error(c||"HTTP error! status: ".concat(s.status));case 5:if(s.body&&"function"===typeof s.body.getReader){e.n=6;break}throw new Error("AI 服务未返回可读取的流(response.body 不存在)");case 6:u=s.body.getReader(),d=new TextDecoder,h="";case 7:return e.n=8,u.read();case 8:if(p=e.v,v=p.done,f=p.value,!v){e.n=9;break}return e.a(3,21);case 9:h+=d.decode(f,{stream:!0}),g=h.split("\n\n"),h=g.pop()||"",m=(0,_.A)(g),e.p=10,m.s();case 11:if((y=m.n()).done){e.n=17;break}if(b=y.value,b.trim()&&b.startsWith("data: ")){e.n=12;break}return e.a(3,16);case 12:if(x=b.substring(6),"[DONE]"!==x){e.n=13;break}return e.a(3,17);case 13:if(e.p=13,w=JSON.parse(x),!w.error){e.n=14;break}throw new Error(w.error);case 14:w.content&&(n+=w.content,k=t.cleanMarkdownCodeBlocks(n),t.codeEditor&&(t.codeEditor.setValue(k),I=t.codeEditor.lineCount(),t.codeEditor.setCursor({line:I-1,ch:0}),t.codeEditor.refresh())),e.n=16;break;case 15:e.p=15,e.v;case 16:e.n=11;break;case 17:e.n=19;break;case 18:e.p=18,P=e.v,m.e(P);case 19:return e.p=19,m.f(),e.f(19);case 20:e.n=7;break;case 21:t.codeEditor&&n?(E=t.cleanMarkdownCodeBlocks(n),t.codeEditor.setValue(E),t.codeEditor.refresh(),t.$message.success(t.$t("dashboard.indicator.editor.aiGenerateSuccess"))):n||t.$message.warning("未生成任何代码,请尝试更详细的提示词"),e.n=23;break;case 22:e.p=22,M=e.v,t.$message.error(M.message||t.$t("dashboard.indicator.editor.aiGenerateError")),n&&t.codeEditor&&(A=t.cleanMarkdownCodeBlocks(n),t.codeEditor.setValue(A));case 23:return e.p=23,t.aiGenerating=!1,e.f(23);case 24:return e.a(2)}},e,null,[[13,15],[10,18,19,20],[2,22,23,24]])}))()}}},I=k,E=i(845),A=(0,E.A)(I,m,y,!1,null,"4fea1865",null),P=A.exports,M=function(){var t=this,e=t._self._c;return e("div",{staticClass:"chart-left",class:{"theme-dark":"dark"===t.chartTheme}},[e("div",{staticClass:"chart-wrapper"},[e("div",{staticClass:"drawing-toolbar"},[t._l(t.drawingTools,function(i){return e("a-tooltip",{key:i.name,attrs:{title:i.title,placement:"right"}},[e("div",{staticClass:"drawing-tool-btn",class:{active:t.activeDrawingTool===i.name},on:{click:function(e){return t.selectDrawingTool(i.name)}}},[e("a-icon",{attrs:{type:i.icon}})],1)])}),e("a-divider",{attrs:{type:"vertical"}}),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.drawing.clearAll"),placement:"right"}},[e("div",{staticClass:"drawing-tool-btn",on:{click:t.clearAllDrawings}},[e("a-icon",{attrs:{type:"delete"}})],1)])],2),e("div",{staticClass:"chart-content-area"},[e("div",{staticClass:"indicator-toolbar"},t._l(t.indicatorButtons,function(i){return e("div",{key:i.id,staticClass:"indicator-btn",class:{active:t.isIndicatorActive(i.id)},attrs:{title:i.name},on:{click:function(e){return t.toggleIndicator(i)}}},[t._v(" "+t._s(i.shortName)+" ")])}),0),e("div",{staticClass:"kline-chart-container",attrs:{id:"kline-chart-container"}})]),t.loading?e("div",{staticClass:"chart-overlay"},[e("a-spin",{attrs:{size:"large"}},[e("a-icon",{staticStyle:{"font-size":"24px",color:"#13c2c2"},attrs:{slot:"indicator",type:"loading",spin:""},slot:"indicator"})],1)],1):t._e(),t.error?e("div",{staticClass:"chart-overlay"},[e("div",{staticClass:"error-box"},[e("a-icon",{staticStyle:{"font-size":"24px",color:"#ef5350","margin-bottom":"10px"},attrs:{type:"warning"}}),e("span",[t._v(t._s(t.error))]),e("a-button",{staticStyle:{"margin-top":"12px"},attrs:{type:"primary",size:"small",ghost:""},on:{click:t.handleRetry}},[t._v(" "+t._s(t.$t("dashboard.indicator.retry"))+" ")])],1)]):t._e(),t.pyodideLoadFailed?e("div",{staticClass:"chart-overlay pyodide-warning"},[e("div",{staticClass:"warning-box"},[e("a-icon",{staticStyle:{"font-size":"32px",color:"#faad14","margin-bottom":"12px"},attrs:{type:"warning"}}),e("div",{staticClass:"warning-title"},[t._v(t._s(t.$t("dashboard.indicator.warning.pyodideLoadFailed")))]),e("div",{staticClass:"warning-desc"},[t._v(t._s(t.$t("dashboard.indicator.warning.pyodideLoadFailedDesc")))])],1)]):t._e(),t.symbol||t.loading||t.error||t.pyodideLoadFailed?t._e():e("div",{staticClass:"chart-overlay initial-hint"},[e("div",{staticClass:"hint-box"},[e("a-icon",{staticStyle:{"font-size":"48px",color:"#1890ff","margin-bottom":"16px"},attrs:{type:"line-chart"}}),e("div",{staticClass:"hint-title"},[t._v(t._s(t.$t("dashboard.indicator.hint.selectSymbol")))]),e("div",{staticClass:"hint-desc"},[t._v(t._s(t.$t("dashboard.indicator.hint.selectSymbolDesc")))])],1)])])])},D=[],T=i(21560),B=i(26297),F=i(2403),R=(i(34782),i(26910),i(71761),function(t,e){return R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},R(t,e)});function L(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}R(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var N,O,z,V,W,H,$,Y,X,K=function(){return K=Object.assign||function(t){for(var e,i=1,n=arguments.length;i0&&a[a.length-1])&&(6===s[0]||2===s[0])){r=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Z(t,e){var i="function"===typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,a,r=i.call(t),o=[];try{while((void 0===e||e-- >0)&&!(n=r.next()).done)o.push(n.value)}catch(s){a={error:s}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(a)throw a.error}}return o}function q(t,e,i){if(i||2===arguments.length)for(var n,a=0,r=e.length;a1e9)return"".concat(+(e/1e9).toFixed(3),"B");if(e>1e6)return"".concat(+(e/1e6).toFixed(3),"M");if(e>1e3)return"".concat(+(e/1e3).toFixed(3),"K")}return"".concat(t)}function zt(t,e){var i="".concat(t);if(0===e.length)return i;if(i.includes(".")){var n=i.split(".");return"".concat(n[0].replace(/(\d)(?=(\d{3})+$)/g,function(t){return"".concat(t).concat(e)}),".").concat(n[1])}return i.replace(/(\d)(?=(\d{3})+$)/g,function(t){return"".concat(t).concat(e)})}function Vt(t,e){var i="".concat(t),n=new RegExp("\\.0{"+e+",}[1-9][0-9]*$");if(n.test(i)){var a=i.split("."),r=a[a.length-1],o=r.match(/0*/);if(At(o)){var s=o[0].length;return a[a.length-1]=r.replace(/0*/,"0{".concat(s,"}")),a.join(".")}}return i}function Wt(t){var e,i,n;return null!==(n=null===(i=null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView)||void 0===i?void 0:i.devicePixelRatio)&&void 0!==n?n:1}function Ht(t,e,i){return"".concat(null!==e&&void 0!==e?e:"normal"," ").concat(null!==t&&void 0!==t?t:12,"px ").concat(null!==i&&void 0!==i?i:"Helvetica Neue")}function $t(t,e,i,n){if(!At(Dt)){var a=document.createElement("canvas"),r=Wt(a);Dt=a.getContext("2d"),Dt.scale(r,r)}return Dt.font=Ht(e,i,n),Math.round(Dt.measureText(t).width)}(function(t){t["OnDataReady"]="onDataReady",t["OnZoom"]="onZoom",t["OnScroll"]="onScroll",t["OnVisibleRangeChange"]="onVisibleRangeChange",t["OnTooltipIconClick"]="onTooltipIconClick",t["OnCrosshairChange"]="onCrosshairChange",t["OnCandleBarClick"]="onCandleBarClick",t["OnPaneDrag"]="onPaneDrag"})(Tt||(Tt={}));var Yt,Xt,Kt=function(){function t(){this._callbacks=[]}return t.prototype.subscribe=function(t){var e,i=null!==(e=this._callbacks.indexOf(t))&&void 0!==e?e:-1;i<0&&this._callbacks.push(t)},t.prototype.unsubscribe=function(t){var e;if(kt(t)){var i=null!==(e=this._callbacks.indexOf(t))&&void 0!==e?e:-1;i>-1&&this._callbacks.splice(i,1)}else this._callbacks=[]},t.prototype.execute=function(t){this._callbacks.forEach(function(e){e(t)})},t.prototype.isEmpty=function(){return 0===this._callbacks.length},t}();function jt(t,e,i,n,a){var r,o=e.result,s=e.figures,l=e.styles,c=Rt(l,"circles",n.circles),u=c.length,d=Rt(l,"bars",n.bars),h=d.length,p=Rt(l,"lines",n.lines),v=p.length,f=0,g=0,m=0,y=0;s.forEach(function(s){var l;switch(s.type){case"circle":y=f;var _=c[f%u];r=K(K({},_),{color:_.noChangeColor}),f++;break;case"bar":y=g;var b=d[g%h];r=K(K({},b),{color:b.noChangeColor}),g++;break;case"line":y=m,r=p[m%v],m++;break}if(At(r)){var x={prev:{kLineData:t[i-1],indicatorData:o[i-1]},current:{kLineData:t[i],indicatorData:o[i]},next:{kLineData:t[i+1],indicatorData:o[i+1]}},w=null===(l=s.styles)||void 0===l?void 0:l.call(s,x,e,n);a(s,K(K({},r),w),y)}})}(function(t){t["Init"]="init",t["Forward"]="forward",t["Backward"]="backward"})(Yt||(Yt={})),function(t){t["Normal"]="normal",t["Price"]="price",t["Volume"]="volume"}(Xt||(Xt={}));var Ut,Gt=function(){function t(t){this.result=[],this._precisionFlag=!1;var e=t.name,i=t.shortName,n=t.series,a=t.calcParams,r=t.figures,o=t.precision,s=t.shouldOhlc,l=t.shouldFormatBigNumber,c=t.visible,u=t.zLevel,d=t.minValue,h=t.maxValue,p=t.styles,v=t.extendData,f=t.regenerateFigures,g=t.createTooltipDataSource,m=t.draw;this.name=e,this.shortName=null!==i&&void 0!==i?i:e,this.series=null!==n&&void 0!==n?n:Xt.Normal,this.precision=null!==o&&void 0!==o?o:4,this.calcParams=null!==a&&void 0!==a?a:[],this.figures=null!==r&&void 0!==r?r:[],this.shouldOhlc=null!==s&&void 0!==s&&s,this.shouldFormatBigNumber=null!==l&&void 0!==l&&l,this.visible=null===c||void 0===c||c,this.zLevel=null!==u&&void 0!==u?u:0,this.minValue=null!==d&&void 0!==d?d:null,this.maxValue=null!==h&&void 0!==h?h:null,this.styles=St(null!==p&&void 0!==p?p:{}),this.extendData=v,this.regenerateFigures=null!==f&&void 0!==f?f:null,this.createTooltipDataSource=null!==g&&void 0!==g?g:null,this.draw=null!==m&&void 0!==m?m:null}return t.prototype.setShortName=function(t){return this.shortName!==t&&(this.shortName=t,!0)},t.prototype.setSeries=function(t){return this.series!==t&&(this.series=t,!0)},t.prototype.setPrecision=function(t,e){var i=null!==e&&void 0!==e&&e,n=Math.floor(t);return!(!(n!==this.precision&&t>=0)||i&&(!i||this._precisionFlag))&&(this.precision=n,i||(this._precisionFlag=!0),!0)},t.prototype.setCalcParams=function(t){var e,i;return this.calcParams=t,this.figures=null!==(i=null===(e=this.regenerateFigures)||void 0===e?void 0:e.call(this,t))&&void 0!==i?i:this.figures,!0},t.prototype.setShouldOhlc=function(t){return this.shouldOhlc!==t&&(this.shouldOhlc=t,!0)},t.prototype.setShouldFormatBigNumber=function(t){return this.shouldFormatBigNumber!==t&&(this.shouldFormatBigNumber=t,!0)},t.prototype.setVisible=function(t){return this.visible!==t&&(this.visible=t,!0)},t.prototype.setZLevel=function(t){return this.zLevel!==t&&(this.zLevel=t,!0)},t.prototype.setStyles=function(t){return wt(this.styles,t),!0},t.prototype.setExtendData=function(t){return this.extendData!==t&&(this.extendData=t,!0)},t.prototype.setFigures=function(t){return this.figures!==t&&(this.figures=t,!0)},t.prototype.setMinValue=function(t){return this.minValue!==t&&(this.minValue=t,!0)},t.prototype.setMaxValue=function(t){return this.maxValue!==t&&(this.maxValue=t,!0)},t.prototype.setRegenerateFigures=function(t){return this.regenerateFigures!==t&&(this.regenerateFigures=t,!0)},t.prototype.setCreateTooltipDataSource=function(t){return this.createTooltipDataSource!==t&&(this.createTooltipDataSource=t,!0)},t.prototype.setDraw=function(t){return this.draw!==t&&(this.draw=t,!0)},t.prototype.calcIndicator=function(t){return j(this,void 0,void 0,function(){var e;return U(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.calc(t,this)];case 1:return e=i.sent(),this.result=e,[2,!0];case 2:return i.sent(),[2,!1];case 3:return[2]}})})},t.extend=function(e){var i=function(t){function i(){return t.call(this,e)||this}return L(i,t),i.prototype.calc=function(t,i){return e.calc(t,i)},i}(t);return i},t}();function Zt(){return["mouseClickEvent","mouseDoubleClickEvent","mouseRightClickEvent","tapEvent","doubleTapEvent","mouseDownEvent","touchStartEvent","mouseMoveEvent","touchMoveEvent"]}(function(t){t["Normal"]="normal",t["WeakMagnet"]="weak_magnet",t["StrongMagnet"]="strong_magnet"})(Ut||(Ut={}));var qt,Jt=1,Qt=-1,te="overlay_",ee="overlay_figure_",ie=function(){function t(t){this.currentStep=Jt,this.points=[],this._prevPressedPoint=null,this._prevPressedPoints=[];var e=t.mode,i=t.modeSensitivity,n=t.extendData,a=t.styles,r=t.name,o=t.totalStep,s=t.lock,l=t.visible,c=t.zLevel,u=t.needDefaultPointFigure,d=t.needDefaultXAxisFigure,h=t.needDefaultYAxisFigure,p=t.createPointFigures,v=t.createXAxisFigures,f=t.createYAxisFigures,g=t.performEventPressedMove,m=t.performEventMoveForDrawing,y=t.onDrawStart,_=t.onDrawing,b=t.onDrawEnd,x=t.onClick,w=t.onDoubleClick,S=t.onRightClick,C=t.onPressedMoveStart,k=t.onPressedMoving,I=t.onPressedMoveEnd,E=t.onMouseEnter,A=t.onMouseLeave,P=t.onRemoved,M=t.onSelected,D=t.onDeselected;this.name=r,this.totalStep=!Et(o)||o<2?1:o,this.lock=null!==s&&void 0!==s&&s,this.visible=null===l||void 0===l||l,this.zLevel=null!==c&&void 0!==c?c:0,this.needDefaultPointFigure=null!==u&&void 0!==u&&u,this.needDefaultXAxisFigure=null!==d&&void 0!==d&&d,this.needDefaultYAxisFigure=null!==h&&void 0!==h&&h,this.mode=null!==e&&void 0!==e?e:Ut.Normal,this.modeSensitivity=null!==i&&void 0!==i?i:8,this.extendData=n,this.styles=St(null!==a&&void 0!==a?a:{}),this.createPointFigures=null!==p&&void 0!==p?p:null,this.createXAxisFigures=null!==v&&void 0!==v?v:null,this.createYAxisFigures=null!==f&&void 0!==f?f:null,this.performEventPressedMove=null!==g&&void 0!==g?g:null,this.performEventMoveForDrawing=null!==m&&void 0!==m?m:null,this.onDrawStart=null!==y&&void 0!==y?y:null,this.onDrawing=null!==_&&void 0!==_?_:null,this.onDrawEnd=null!==b&&void 0!==b?b:null,this.onClick=null!==x&&void 0!==x?x:null,this.onDoubleClick=null!==w&&void 0!==w?w:null,this.onRightClick=null!==S&&void 0!==S?S:null,this.onPressedMoveStart=null!==C&&void 0!==C?C:null,this.onPressedMoving=null!==k&&void 0!==k?k:null,this.onPressedMoveEnd=null!==I&&void 0!==I?I:null,this.onMouseEnter=null!==E&&void 0!==E?E:null,this.onMouseLeave=null!==A&&void 0!==A?A:null,this.onRemoved=null!==P&&void 0!==P?P:null,this.onSelected=null!==M&&void 0!==M?M:null,this.onDeselected=null!==D&&void 0!==D?D:null}return t.prototype.setId=function(t){return!Mt(this.id)&&(this.id=t,!0)},t.prototype.setGroupId=function(t){return!Mt(this.groupId)&&(this.groupId=t,!0)},t.prototype.setPaneId=function(t){this.paneId=t},t.prototype.setExtendData=function(t){return t!==this.extendData&&(this.extendData=t,!0)},t.prototype.setStyles=function(t){return wt(this.styles,t),!0},t.prototype.setPoints=function(t){if(t.length>0){var e=void 0;if(this.points=q([],Z(t),!1),t.length>=this.totalStep-1?(this.currentStep=Qt,e=this.totalStep-1):(this.currentStep=t.length+1,e=t.length),null!==this.performEventMoveForDrawing)for(var i=0;is?n=r:a=r,o<=2)break}return n}function ve(t){var e=Math.floor(ye(t)),i=_e(e),n=t/i,a=0;return a=n<1.5?1:n<2.5?2:n<3.5?3:n<4.5?4:n<5.5?5:n<6.5?6:8,t=a*i,e>=-20?+t.toFixed(e<0?-e:0):t}function fe(t,e){null==e&&(e=10),e=Math.min(Math.max(0,e),20);var i=(+t).toFixed(e);return+i}function ge(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var a=e.indexOf(".");return a<0?0:e.length-1-a}function me(t,e,i){var n=[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER];return t.forEach(function(t){var a,r;n[0]=Math.max(null!==(a=t[e])&&void 0!==a?a:t,n[0]),n[1]=Math.min(null!==(r=t[i])&&void 0!==r?r:t,n[1])}),n}function ye(t){return Math.log(t)/Math.log(10)}function _e(t){return Math.pow(10,t)}function be(){return{from:0,to:0,realFrom:0,realTo:0}}var xe={MIN:1,MAX:50},we=8,Se=80,Ce=.88,ke=10,Ie=function(){function t(t){this._dateTimeFormat=this._buildDateTimeFormat(),this._zoomEnabled=!0,this._scrollEnabled=!0,this._totalBarSpace=0,this._barSpace=we,this._offsetRightDistance=Se,this._startLastBarRightSideDiffBarCount=0,this._scrollLimitRole=0,this._minVisibleBarCount={left:2,right:2},this._maxOffsetDistance={left:50,right:50},this._visibleRange=be(),this._chartStore=t,this._gapBarSpace=this._calcGapBarSpace(),this._lastBarRightSideDiffBarCount=this._offsetRightDistance/this._barSpace}return t.prototype._calcGapBarSpace=function(){var t;return this._barSpace>3?t=Math.floor(this._barSpace*Ce):(t=Math.floor(this._barSpace),t===this._barSpace&&t--),t%2===0&&t--,t=Math.max(1,t),t},t.prototype.adjustVisibleRange=function(){var t,e,i,n,a=this._chartStore.getDataList(),r=a.length,o=this._totalBarSpace/this._barSpace;1===this._scrollLimitRole?(i=(this._totalBarSpace-this._maxOffsetDistance.right)/this._barSpace,n=(this._totalBarSpace-this._maxOffsetDistance.left)/this._barSpace):(i=this._minVisibleBarCount.left,n=this._minVisibleBarCount.right),i=Math.max(0,i),n=Math.max(0,n);var s=o-Math.min(i,r);this._lastBarRightSideDiffBarCount>s&&(this._lastBarRightSideDiffBarCount=s);var l=-r+Math.min(n,r);this._lastBarRightSideDiffBarCountr&&(c=r);var d=Math.round(c-o)-1;d<0&&(d=0);var h=this._lastBarRightSideDiffBarCount>0?Math.round(r+this._lastBarRightSideDiffBarCount-o)-1:d;if(this._visibleRange={from:d,to:c,realFrom:h,realTo:u},this._chartStore.getActionStore().execute(Tt.OnVisibleRangeChange,this._visibleRange),this._chartStore.adjustVisibleDataList(),0===d){var p=a[0];this._chartStore.executeLoadMoreCallback(null!==(t=null===p||void 0===p?void 0:p.timestamp)&&void 0!==t?t:null),this._chartStore.executeLoadDataCallback({type:Yt.Forward,data:null!==p&&void 0!==p?p:null})}c===r&&this._chartStore.executeLoadDataCallback({type:Yt.Backward,data:null!==(e=a[r-1])&&void 0!==e?e:null})},t.prototype.getDateTimeFormat=function(){return this._dateTimeFormat},t.prototype._buildDateTimeFormat=function(t){var e={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};Mt(t)&&(e.timeZone=t);var i=null;try{i=new Intl.DateTimeFormat("en",e)}catch(n){_t("","","Timezone is error!!!")}return i},t.prototype.setTimezone=function(t){var e=this._buildDateTimeFormat(t);null!==e&&(this._dateTimeFormat=e)},t.prototype.getTimezone=function(){return this._dateTimeFormat.resolvedOptions().timeZone},t.prototype.getBarSpace=function(){return{bar:this._barSpace,halfBar:this._barSpace/2,gapBar:this._gapBarSpace,halfGapBar:Math.floor(this._gapBarSpace/2)}},t.prototype.setBarSpace=function(t,e){txe.MAX||this._barSpace===t||(this._barSpace=t,this._gapBarSpace=this._calcGapBarSpace(),null===e||void 0===e||e(),this.adjustVisibleRange(),this._chartStore.getTooltipStore().recalculateCrosshair(!0),this._chartStore.getChart().adjustPaneViewport(!1,!0,!0,!0))},t.prototype.setTotalBarSpace=function(t){return this._totalBarSpace!==t&&(this._totalBarSpace=t,this.adjustVisibleRange(),this._chartStore.getTooltipStore().recalculateCrosshair(!0)),this},t.prototype.setOffsetRightDistance=function(t,e){return this._offsetRightDistance=1===this._scrollLimitRole?Math.min(this._maxOffsetDistance.right,t):t,this._lastBarRightSideDiffBarCount=this._offsetRightDistance/this._barSpace,null!==e&&void 0!==e&&e&&(this.adjustVisibleRange(),this._chartStore.getTooltipStore().recalculateCrosshair(!0),this._chartStore.getChart().adjustPaneViewport(!1,!0,!0,!0)),this},t.prototype.resetOffsetRightDistance=function(){this.setOffsetRightDistance(this._offsetRightDistance)},t.prototype.getInitialOffsetRightDistance=function(){return this._offsetRightDistance},t.prototype.getOffsetRightDistance=function(){return Math.max(0,this._lastBarRightSideDiffBarCount*this._barSpace)},t.prototype.getLastBarRightSideDiffBarCount=function(){return this._lastBarRightSideDiffBarCount},t.prototype.setLastBarRightSideDiffBarCount=function(t){return this._lastBarRightSideDiffBarCount=t,this},t.prototype.setMaxOffsetLeftDistance=function(t){return this._scrollLimitRole=1,this._maxOffsetDistance.left=t,this},t.prototype.setMaxOffsetRightDistance=function(t){return this._scrollLimitRole=1,this._maxOffsetDistance.right=t,this},t.prototype.setLeftMinVisibleBarCount=function(t){return this._scrollLimitRole=0,this._minVisibleBarCount.left=t,this},t.prototype.setRightMinVisibleBarCount=function(t){return this._scrollLimitRole=0,this._minVisibleBarCount.right=t,this},t.prototype.getVisibleRange=function(){return this._visibleRange},t.prototype.startScroll=function(){this._startLastBarRightSideDiffBarCount=this._lastBarRightSideDiffBarCount},t.prototype.scroll=function(t){if(this._scrollEnabled){var e=t/this._barSpace,i=this._lastBarRightSideDiffBarCount*this._barSpace;this._lastBarRightSideDiffBarCount=this._startLastBarRightSideDiffBarCount-e,this.adjustVisibleRange(),this._chartStore.getTooltipStore().recalculateCrosshair(!0),this._chartStore.getChart().adjustPaneViewport(!1,!0,!0,!0);var n=Math.round(i-this._lastBarRightSideDiffBarCount*this._barSpace);0!==n&&this._chartStore.getActionStore().execute(Tt.OnScroll,{distance:n})}},t.prototype.getDataByDataIndex=function(t){var e;return null!==(e=this._chartStore.getDataList()[t])&&void 0!==e?e:null},t.prototype.coordinateToFloatIndex=function(t){var e=this._chartStore.getDataList().length,i=(this._totalBarSpace-t)/this._barSpace,n=e+this._lastBarRightSideDiffBarCount-i;return Math.round(1e6*n)/1e6},t.prototype.dataIndexToTimestamp=function(t){var e,i=this.getDataByDataIndex(t);return null!==(e=null===i||void 0===i?void 0:i.timestamp)&&void 0!==e?e:null},t.prototype.timestampToDataIndex=function(t){var e=this._chartStore.getDataList();return 0===e.length?0:pe(e,"timestamp",t)},t.prototype.dataIndexToCoordinate=function(t){var e=this._chartStore.getDataList().length,i=e+this._lastBarRightSideDiffBarCount-t;return Math.floor(this._totalBarSpace-(i-.5)*this._barSpace)},t.prototype.coordinateToDataIndex=function(t){return Math.ceil(this.coordinateToFloatIndex(t))-1},t.prototype.zoom=function(t,e){var i,n=this;if(this._zoomEnabled){var a=null!==e&&void 0!==e?e:null;if(!Et(null===a||void 0===a?void 0:a.x)){var r=this._chartStore.getTooltipStore().getCrosshair();a={x:null!==(i=null===r||void 0===r?void 0:r.x)&&void 0!==i?i:this._totalBarSpace/2}}var o=a.x,s=this.coordinateToFloatIndex(o),l=this._barSpace,c=this._barSpace+t*(this._barSpace/ke);this.setBarSpace(c,function(){n._lastBarRightSideDiffBarCount+=s-n.coordinateToFloatIndex(o)});var u=this._barSpace/l;1!==u&&this._chartStore.getActionStore().execute(Tt.OnZoom,{scale:u})}},t.prototype.setZoomEnabled=function(t){return this._zoomEnabled=t,this},t.prototype.getZoomEnabled=function(){return this._zoomEnabled},t.prototype.setScrollEnabled=function(t){return this._scrollEnabled=t,this},t.prototype.getScrollEnabled=function(){return this._scrollEnabled},t.prototype.clear=function(){this._visibleRange=be()},t}(),Ee={name:"AVP",shortName:"AVP",series:Xt.Price,precision:2,figures:[{key:"avp",title:"AVP: ",type:"line"}],calc:function(t){var e=0,i=0;return t.map(function(t){var n,a,r={},o=null!==(n=null===t||void 0===t?void 0:t.turnover)&&void 0!==n?n:0,s=null!==(a=null===t||void 0===t?void 0:t.volume)&&void 0!==a?a:0;return e+=o,i+=s,0!==i&&(r.avp=e/i),r})}},Ae={name:"AO",shortName:"AO",calcParams:[5,34],figures:[{key:"ao",title:"AO: ",type:"bar",baseValue:0,styles:function(t,e,i){var n,a,r,o,s,l=t.prev,c=t.current,u=null!==(a=null===(n=l.indicatorData)||void 0===n?void 0:n.ao)&&void 0!==a?a:Number.MIN_SAFE_INTEGER,d=null!==(o=null===(r=c.indicatorData)||void 0===r?void 0:r.ao)&&void 0!==o?o:Number.MIN_SAFE_INTEGER;s=d>u?Rt(e.styles,"bars[0].upColor",i.bars[0].upColor):Rt(e.styles,"bars[0].downColor",i.bars[0].downColor);var h=d>u?O.Stroke:O.Fill;return{color:s,style:h,borderColor:s}}}],calc:function(t,e){var i=e.calcParams,n=Math.max(i[0],i[1]),a=0,r=0,o=0,s=0;return t.map(function(e,l){var c={},u=(e.low+e.high)/2;if(a+=u,r+=u,l>=i[0]-1){o=a/i[0];var d=t[l-(i[0]-1)];a-=(d.low+d.high)/2}if(l>=i[1]-1){s=r/i[1];d=t[l-(i[1]-1)];r-=(d.low+d.high)/2}return l>=n-1&&(c.ao=o-s),c})}},Pe={name:"BIAS",shortName:"BIAS",calcParams:[6,12,24],figures:[{key:"bias1",title:"BIAS6: ",type:"line"},{key:"bias2",title:"BIAS12: ",type:"line"},{key:"bias3",title:"BIAS24: ",type:"line"}],regenerateFigures:function(t){return t.map(function(t,e){return{key:"bias".concat(e+1),title:"BIAS".concat(t,": "),type:"line"}})},calc:function(t,e){var i=e.calcParams,n=e.figures,a=[];return t.map(function(e,r){var o={},s=e.close;return i.forEach(function(e,l){var c;if(a[l]=(null!==(c=a[l])&&void 0!==c?c:0)+s,r>=e-1){var u=a[l]/i[l];o[n[l].key]=(s-u)/u*100,a[l]-=t[r-(e-1)].close}}),o})}};function Me(t,e){var i=t.length,n=0;return t.forEach(function(t){var i=t.close-e;n+=i*i}),n=Math.abs(n),Math.sqrt(n/i)}var De={name:"BOLL",shortName:"BOLL",series:Xt.Price,calcParams:[20,2],precision:2,shouldOhlc:!0,figures:[{key:"up",title:"UP: ",type:"line"},{key:"mid",title:"MID: ",type:"line"},{key:"dn",title:"DN: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=i[0]-1,a=0;return t.map(function(e,r){var o=e.close,s={};if(a+=o,r>=n){s.mid=a/i[0];var l=Me(t.slice(r-n,r+1),s.mid);s.up=s.mid+i[1]*l,s.dn=s.mid-i[1]*l,a-=t[r-n].close}return s})}},Te={name:"BRAR",shortName:"BRAR",calcParams:[26],figures:[{key:"br",title:"BR: ",type:"line"},{key:"ar",title:"AR: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=0,r=0,o=0;return t.map(function(e,s){var l,c,u={},d=e.high,h=e.low,p=e.open,v=(null!==(l=t[s-1])&&void 0!==l?l:e).close;if(r+=d-p,o+=p-h,n+=d-v,a+=v-h,s>=i[0]-1){u.ar=0!==o?r/o*100:0,u.br=0!==a?n/a*100:0;var f=t[s-(i[0]-1)],g=f.high,m=f.low,y=f.open,_=(null!==(c=t[s-i[0]])&&void 0!==c?c:t[s-(i[0]-1)]).close;n-=g-_,a-=_-m,r-=g-y,o-=y-m}return u})}},Be={name:"BBI",shortName:"BBI",series:Xt.Price,precision:2,calcParams:[3,6,12,24],shouldOhlc:!0,figures:[{key:"bbi",title:"BBI: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=Math.max.apply(Math,q([],Z(i),!1)),a=[],r=[];return t.map(function(e,o){var s={},l=e.close;if(i.forEach(function(e,i){var n;a[i]=(null!==(n=a[i])&&void 0!==n?n:0)+l,o>=e-1&&(r[i]=a[i]/e,a[i]-=t[o-(e-1)].close)}),o>=n-1){var c=0;r.forEach(function(t){c+=t}),s.bbi=c/4}return s})}},Fe={name:"CCI",shortName:"CCI",calcParams:[20],figures:[{key:"cci",title:"CCI: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=i[0]-1,a=0,r=[];return t.map(function(e,o){var s={},l=(e.high+e.low+e.close)/3;if(a+=l,r.push(l),o>=n){var c=a/i[0],u=r.slice(o-n,o+1),d=0;u.forEach(function(t){d+=Math.abs(t-c)});var h=d/i[0];s.cci=0!==h?(l-c)/h/.015:0;var p=(t[o-n].high+t[o-n].low+t[o-n].close)/3;a-=p}return s})}},Re={name:"CR",shortName:"CR",calcParams:[26,10,20,40,60],figures:[{key:"cr",title:"CR: ",type:"line"},{key:"ma1",title:"MA1: ",type:"line"},{key:"ma2",title:"MA2: ",type:"line"},{key:"ma3",title:"MA3: ",type:"line"},{key:"ma4",title:"MA4: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=Math.ceil(i[1]/2.5+1),a=Math.ceil(i[2]/2.5+1),r=Math.ceil(i[3]/2.5+1),o=Math.ceil(i[4]/2.5+1),s=0,l=[],c=0,u=[],d=0,h=[],p=0,v=[],f=[];return t.forEach(function(e,g){var m,y,_,b,x,w={},S=null!==(m=t[g-1])&&void 0!==m?m:e,C=(S.high+S.close+S.low+S.open)/4,k=Math.max(0,e.high-C),I=Math.max(0,C-e.low);g>=i[0]-1&&(w.cr=0!==I?k/I*100:0,s+=w.cr,c+=w.cr,d+=w.cr,p+=w.cr,g>=i[0]+i[1]-2&&(l.push(s/i[1]),g>=i[0]+i[1]+n-3&&(w.ma1=l[l.length-1-n]),s-=null!==(y=f[g-(i[1]-1)].cr)&&void 0!==y?y:0),g>=i[0]+i[2]-2&&(u.push(c/i[2]),g>=i[0]+i[2]+a-3&&(w.ma2=u[u.length-1-a]),c-=null!==(_=f[g-(i[2]-1)].cr)&&void 0!==_?_:0),g>=i[0]+i[3]-2&&(h.push(d/i[3]),g>=i[0]+i[3]+r-3&&(w.ma3=h[h.length-1-r]),d-=null!==(b=f[g-(i[3]-1)].cr)&&void 0!==b?b:0),g>=i[0]+i[4]-2&&(v.push(p/i[4]),g>=i[0]+i[4]+o-3&&(w.ma4=v[v.length-1-o]),p-=null!==(x=f[g-(i[4]-1)].cr)&&void 0!==x?x:0)),f.push(w)}),f}},Le={name:"DMA",shortName:"DMA",calcParams:[10,50,10],figures:[{key:"dma",title:"DMA: ",type:"line"},{key:"ama",title:"AMA: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=Math.max(i[0],i[1]),a=0,r=0,o=0,s=[];return t.forEach(function(e,l){var c,u={},d=e.close;a+=d,r+=d;var h=0,p=0;if(l>=i[0]-1&&(h=a/i[0],a-=t[l-(i[0]-1)].close),l>=i[1]-1&&(p=r/i[1],r-=t[l-(i[1]-1)].close),l>=n-1){var v=h-p;u.dma=v,o+=v,l>=n+i[2]-2&&(u.ama=o/i[2],o-=null!==(c=s[l-(i[2]-1)].dma)&&void 0!==c?c:0)}s.push(u)}),s}},Ne={name:"DMI",shortName:"DMI",calcParams:[14,6],figures:[{key:"pdi",title:"PDI: ",type:"line"},{key:"mdi",title:"MDI: ",type:"line"},{key:"adx",title:"ADX: ",type:"line"},{key:"adxr",title:"ADXR: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=0,r=0,o=0,s=0,l=0,c=0,u=0,d=[];return t.forEach(function(e,h){var p,v,f={},g=null!==(p=t[h-1])&&void 0!==p?p:e,m=g.close,y=e.high,_=e.low,b=y-_,x=Math.abs(y-m),w=Math.abs(m-_),S=y-g.high,C=g.low-_,k=Math.max(Math.max(b,x),w),I=S>0&&S>C?S:0,E=C>0&&C>S?C:0;if(n+=k,a+=I,r+=E,h>=i[0]-1){h>i[0]-1?(o=o-o/i[0]+k,s=s-s/i[0]+I,l=l-l/i[0]+E):(o=n,s=a,l=r);var A=0,P=0;0!==o&&(A=100*s/o,P=100*l/o),f.pdi=A,f.mdi=P;var M=0;P+A!==0&&(M=Math.abs(P-A)/(P+A)*100),c+=M,h>=2*i[0]-2&&(u=h>2*i[0]-2?(u*(i[0]-1)+M)/i[0]:c/i[0],f.adx=u,h>=2*i[0]+i[1]-3&&(f.adxr=((null!==(v=d[h-(i[1]-1)].adx)&&void 0!==v?v:0)+u)/2))}d.push(f)}),d}},Oe={name:"EMV",shortName:"EMV",calcParams:[14,9],figures:[{key:"emv",title:"EMV: ",type:"line"},{key:"maEmv",title:"MAEMV: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=[];return t.map(function(e,r){var o,s={};if(r>0){var l=t[r-1],c=e.high,u=e.low,d=null!==(o=e.volume)&&void 0!==o?o:0,h=(c+u)/2-(l.high+l.low)/2;if(0===d||c-u===0)s.emv=0;else{var p=d/1e8/(c-u);s.emv=h/p}n+=s.emv,a.push(s.emv),r>=i[0]&&(s.maEmv=n/i[0],n-=a[r-i[0]])}return s})}},ze={name:"EMA",shortName:"EMA",series:Xt.Price,calcParams:[6,12,20],precision:2,shouldOhlc:!0,figures:[{key:"ema1",title:"EMA6: ",type:"line"},{key:"ema2",title:"EMA12: ",type:"line"},{key:"ema3",title:"EMA20: ",type:"line"}],regenerateFigures:function(t){return t.map(function(t,e){return{key:"ema".concat(e+1),title:"EMA".concat(t,": "),type:"line"}})},calc:function(t,e){var i=e.calcParams,n=e.figures,a=0,r=[];return t.map(function(t,e){var o={},s=t.close;return a+=s,i.forEach(function(t,i){e>=t-1&&(r[i]=e>t-1?(2*s+(t-1)*r[i])/(t+1):a/t,o[n[i].key]=r[i])}),o})}},Ve={name:"MTM",shortName:"MTM",calcParams:[12,6],figures:[{key:"mtm",title:"MTM: ",type:"line"},{key:"maMtm",title:"MAMTM: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=[];return t.forEach(function(e,r){var o,s={};if(r>=i[0]){var l=e.close,c=t[r-i[0]].close;s.mtm=l-c,n+=s.mtm,r>=i[0]+i[1]-1&&(s.maMtm=n/i[1],n-=null!==(o=a[r-(i[1]-1)].mtm)&&void 0!==o?o:0)}a.push(s)}),a}},We={name:"MA",shortName:"MA",series:Xt.Price,calcParams:[5,10,30,60],precision:2,shouldOhlc:!0,figures:[{key:"ma5",title:"MA5: ",type:"line"},{key:"ma10",title:"MA10: ",type:"line"},{key:"ma30",title:"MA30: ",type:"line"},{key:"ma60",title:"MA60: ",type:"line"}],regenerateFigures:function(t){return t.map(function(t,e){return{key:"ma".concat(e+1),title:"MA".concat(t,": "),type:"line"}})},calc:function(t,e){var i=e.calcParams,n=e.figures,a=[];return t.map(function(e,r){var o={},s=e.close;return i.forEach(function(e,i){var l;a[i]=(null!==(l=a[i])&&void 0!==l?l:0)+s,r>=e-1&&(o[n[i].key]=a[i]/e,a[i]-=t[r-(e-1)].close)}),o})}},He={name:"MACD",shortName:"MACD",calcParams:[12,26,9],figures:[{key:"dif",title:"DIF: ",type:"line"},{key:"dea",title:"DEA: ",type:"line"},{key:"macd",title:"MACD: ",type:"bar",baseValue:0,styles:function(t,e,i){var n,a,r,o,s,l=t.prev,c=t.current,u=null!==(a=null===(n=l.indicatorData)||void 0===n?void 0:n.macd)&&void 0!==a?a:Number.MIN_SAFE_INTEGER,d=null!==(o=null===(r=c.indicatorData)||void 0===r?void 0:r.macd)&&void 0!==o?o:Number.MIN_SAFE_INTEGER;s=d>0?Rt(e.styles,"bars[0].upColor",i.bars[0].upColor):d<0?Rt(e.styles,"bars[0].downColor",i.bars[0].downColor):Rt(e.styles,"bars[0].noChangeColor",i.bars[0].noChangeColor);var h=u=a[0]-1&&(i=e>a[0]-1?(2*d+(a[0]-1)*i)/(a[0]+1):r/a[0]),e>=a[1]-1&&(n=e>a[1]-1?(2*d+(a[1]-1)*n)/(a[1]+1):r/a[1]),e>=c-1&&(o=i-n,u.dif=o,s+=o,e>=c+a[2]-2&&(l=e>c+a[2]-2?(2*o+l*(a[2]-1))/(a[2]+1):s/a[2],u.macd=2*(o-l),u.dea=l)),u})}},$e={name:"OBV",shortName:"OBV",calcParams:[30],figures:[{key:"obv",title:"OBV: ",type:"line"},{key:"maObv",title:"MAOBV: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=0,r=[];return t.forEach(function(e,o){var s,l,c,u,d=null!==(s=t[o-1])&&void 0!==s?s:e;e.closed.close&&(a+=null!==(c=e.volume)&&void 0!==c?c:0);var h={obv:a};n+=a,o>=i[0]-1&&(h.maObv=n/i[0],n-=null!==(u=r[o-(i[0]-1)].obv)&&void 0!==u?u:0),r.push(h)}),r}},Ye={name:"PVT",shortName:"PVT",figures:[{key:"pvt",title:"PVT: ",type:"line"}],calc:function(t){var e=0;return t.map(function(i,n){var a,r,o={},s=i.close,l=null!==(a=i.volume)&&void 0!==a?a:1,c=(null!==(r=t[n-1])&&void 0!==r?r:i).close,u=0,d=c*l;return 0!==d&&(u=(s-c)/d),e+=u,o.pvt=e,o})}},Xe={name:"PSY",shortName:"PSY",calcParams:[12,6],figures:[{key:"psy",title:"PSY: ",type:"line"},{key:"maPsy",title:"MAPSY: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=0,r=[],o=[];return t.forEach(function(e,s){var l,c,u={},d=(null!==(l=t[s-1])&&void 0!==l?l:e).close,h=e.close-d>0?1:0;r.push(h),n+=h,s>=i[0]-1&&(u.psy=n/i[0]*100,a+=u.psy,s>=i[0]+i[1]-2&&(u.maPsy=a/i[1],a-=null!==(c=o[s-(i[1]-1)].psy)&&void 0!==c?c:0),n-=r[s-(i[0]-1)]),o.push(u)}),o}},Ke={name:"ROC",shortName:"ROC",calcParams:[12,6],figures:[{key:"roc",title:"ROC: ",type:"line"},{key:"maRoc",title:"MAROC: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=[],a=0;return t.forEach(function(e,r){var o,s,l={};if(r>=i[0]-1){var c=e.close,u=(null!==(o=t[r-i[0]])&&void 0!==o?o:t[r-(i[0]-1)]).close;l.roc=0!==u?(c-u)/u*100:0,a+=l.roc,r>=i[0]-1+i[1]-1&&(l.maRoc=a/i[1],a-=null!==(s=n[r-(i[1]-1)].roc)&&void 0!==s?s:0)}n.push(l)}),n}},je={name:"RSI",shortName:"RSI",calcParams:[6,12,24],figures:[{key:"rsi1",title:"RSI1: ",type:"line"},{key:"rsi2",title:"RSI2: ",type:"line"},{key:"rsi3",title:"RSI3: ",type:"line"}],regenerateFigures:function(t){return t.map(function(t,e){var i=e+1;return{key:"rsi".concat(i),title:"RSI".concat(i,": "),type:"line"}})},calc:function(t,e){var i=e.calcParams,n=e.figures,a=[],r=[];return t.map(function(e,o){var s,l={},c=(null!==(s=t[o-1])&&void 0!==s?s:e).close,u=e.close-c;return i.forEach(function(e,i){var s,c,d;if(u>0?a[i]=(null!==(s=a[i])&&void 0!==s?s:0)+u:r[i]=(null!==(c=r[i])&&void 0!==c?c:0)+Math.abs(u),o>=e-1){0!==r[i]?l[n[i].key]=100-100/(1+a[i]/r[i]):l[n[i].key]=0;var h=t[o-(e-1)],p=null!==(d=t[o-e])&&void 0!==d?d:h,v=h.close-p.close;v>0?a[i]-=v:r[i]-=Math.abs(v)}}),l})}},Ue={name:"SMA",shortName:"SMA",series:Xt.Price,calcParams:[12,2],precision:2,figures:[{key:"sma",title:"SMA: ",type:"line"}],shouldOhlc:!0,calc:function(t,e){var i=e.calcParams,n=0,a=0;return t.map(function(t,e){var r={},o=t.close;return n+=o,e>=i[0]-1&&(a=e>i[0]-1?(o*i[1]+a*(i[0]-i[1]+1))/(i[0]+1):n/i[0],r.sma=a),r})}},Ge={name:"KDJ",shortName:"KDJ",calcParams:[9,3,3],figures:[{key:"k",title:"K: ",type:"line"},{key:"d",title:"D: ",type:"line"},{key:"j",title:"J: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=[];return t.forEach(function(e,a){var r,o,s,l,c={},u=e.close;if(a>=i[0]-1){var d=me(t.slice(a-(i[0]-1),a+1),"high","low"),h=d[0],p=d[1],v=h-p,f=(u-p)/(0===v?1:v)*100;c.k=((i[1]-1)*(null!==(o=null===(r=n[a-1])||void 0===r?void 0:r.k)&&void 0!==o?o:50)+f)/i[1],c.d=((i[2]-1)*(null!==(l=null===(s=n[a-1])||void 0===s?void 0:s.d)&&void 0!==l?l:50)+c.k)/i[2],c.j=3*c.k-2*c.d}n.push(c)}),n}},Ze={name:"SAR",shortName:"SAR",series:Xt.Price,calcParams:[2,2,20],precision:2,shouldOhlc:!0,figures:[{key:"sar",title:"SAR: ",type:"circle",styles:function(t,e,i){var n,a,r=t.current,o=null!==(a=null===(n=r.indicatorData)||void 0===n?void 0:n.sar)&&void 0!==a?a:Number.MIN_SAFE_INTEGER,s=r.kLineData,l=((null===s||void 0===s?void 0:s.high)+(null===s||void 0===s?void 0:s.low))/2,c=oe.low?(c=s,o=n,s=-100,l=!l):c>p&&(c=p)}else{(-100===s||s>h)&&(s=h,o=Math.min(o+a,r)),c=u+o*(s-u);var v=Math.max(t[Math.max(1,i)-1].high,d);c=r[0]-1&&(i=e>r[0]-1?(2*p+(r[0]-1)*i)/(r[0]+1):o/r[0],s+=i,e>=2*r[0]-2&&(n=e>2*r[0]-2?(2*i+(r[0]-1)*n)/(r[0]+1):s/r[0],l+=n,e>=3*r[0]-3))){var v=void 0,f=0;e>3*r[0]-3?(v=(2*n+(r[0]-1)*a)/(r[0]+1),f=(v-a)/a*100):v=l/r[0],a=v,h.trix=f,c+=f,e>=3*r[0]+r[1]-4&&(h.maTrix=c/r[1],c-=null!==(d=u[e-(r[1]-1)].trix)&&void 0!==d?d:0)}u.push(h)}),u}};function Je(){return{key:"volume",title:"VOLUME: ",type:"bar",baseValue:0,styles:function(t,e,i){var n=t.current.kLineData,a=Rt(e.styles,"bars[0].noChangeColor",i.bars[0].noChangeColor);return At(n)&&(n.close>n.open?a=Rt(e.styles,"bars[0].upColor",i.bars[0].upColor):n.close=e-1&&(l[n[i].key]=a[i]/e,a[i]-=null!==(c=t[r-(e-1)].volume)&&void 0!==c?c:0)}),l})}},ti={name:"VR",shortName:"VR",calcParams:[26,6],figures:[{key:"vr",title:"VR: ",type:"line"},{key:"maVr",title:"MAVR: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=0,r=0,o=0,s=[];return t.forEach(function(e,l){var c,u,d,h,p,v={},f=e.close,g=(null!==(c=t[l-1])&&void 0!==c?c:e).close,m=null!==(u=e.volume)&&void 0!==u?u:0;if(f>g?n+=m:f=i[0]-1){var y=r/2;v.vr=a+y===0?0:(n+y)/(a+y)*100,o+=v.vr,l>=i[0]+i[1]-2&&(v.maVr=o/i[1],o-=null!==(d=s[l-(i[1]-1)].vr)&&void 0!==d?d:0);var _=t[l-(i[0]-1)],b=null!==(h=t[l-i[0]])&&void 0!==h?h:_,x=_.close,w=null!==(p=_.volume)&&void 0!==p?p:0;x>b.close?n-=w:x=s){var l=me(t.slice(a-s,a+1),"high","low"),c=l[0],u=l[1],d=c-u;r[n[i].key]=0===d?0:(o-c)/d*100}}),r})}},ii={},ni=[Ee,Ae,Pe,De,Te,Be,Fe,Re,Le,Ne,Oe,ze,Ve,We,He,$e,Ye,Xe,Ke,je,Ue,Ge,Ze,qe,Qe,ti,ei];function ai(t){ii[t.name]=Gt.extend(t)}function ri(t){var e;return null!==(e=ii[t])&&void 0!==e?e:null}ni.forEach(function(t){ii[t.name]=Gt.extend(t)});var oi=function(){function t(t){this._instances=new Map,this._chartStore=t}return t.prototype._overrideInstance=function(t,e){var i=e.shortName,n=e.series,a=e.calcParams,r=e.precision,o=e.figures,s=e.minValue,l=e.maxValue,c=e.shouldOhlc,u=e.shouldFormatBigNumber,d=e.visible,h=e.zLevel,p=e.styles,v=e.extendData,f=e.regenerateFigures,g=e.createTooltipDataSource,m=e.draw,y=e.calc,_=!1;Mt(i)&&t.setShortName(i)&&(_=!0),At(n)&&t.setSeries(n)&&(_=!0);var b=!1;Ct(a)&&t.setCalcParams(a)&&(_=!0,b=!0),Ct(o)&&t.setFigures(o)&&(_=!0,b=!0),void 0!==s&&t.setMinValue(s)&&(_=!0),void 0!==l&&t.setMinValue(l)&&(_=!0),Et(r)&&t.setPrecision(r)&&(_=!0),Pt(c)&&t.setShouldOhlc(c)&&(_=!0),Pt(u)&&t.setShouldFormatBigNumber(u)&&(_=!0),Pt(d)&&t.setVisible(d)&&(_=!0);var x=!1;return Et(h)&&t.setZLevel(h)&&(_=!0,x=!0),At(p)&&t.setStyles(p)&&(_=!0),void 0!==v&&t.setExtendData(v)&&(_=!0,b=!0),void 0!==f&&t.setRegenerateFigures(f)&&(_=!0),void 0!==g&&t.setCreateTooltipDataSource(g)&&(_=!0),void 0!==m&&t.setDraw(m)&&(_=!0),kt(y)&&(t.calc=y,b=!0),[_,b,x]},t.prototype._sort=function(t){var e;Mt(t)?null===(e=this._instances.get(t))||void 0===e||e.sort(function(t,e){return t.zLevel-e.zLevel}):this._instances.forEach(function(t){t.sort(function(t,e){return t.zLevel-e.zLevel})})},t.prototype.addInstance=function(t,e,i){return j(this,void 0,void 0,function(){var n,a,r,o,s;return U(this,function(l){switch(l.label){case 0:return n=t.name,a=this._instances.get(e),At(a)?(r=a.find(function(t){return t.name===n}),At(r)?[4,Promise.reject(new Error("Duplicate indicators."))]:[3,2]):[3,2];case 1:return[2,l.sent()];case 2:return At(a)||(a=[]),o=ri(n),s=new o,this.synchronizeSeriesPrecision(s),this._overrideInstance(s,t),i||(a=[]),a.push(s),this._instances.set(e,a),this._sort(e),[4,s.calcIndicator(this._chartStore.getDataList())];case 3:return[2,l.sent()]}})})},t.prototype.getInstances=function(t){var e;return null!==(e=this._instances.get(t))&&void 0!==e?e:[]},t.prototype.removeInstance=function(t,e){var i,n=!1,a=this._instances.get(t);if(At(a)){if(Mt(e)){var r=a.findIndex(function(t){return t.name===e});r>-1&&(a.splice(r,1),n=!0)}else this._instances.set(t,[]),n=!0;0===(null===(i=this._instances.get(t))||void 0===i?void 0:i.length)&&this._instances.delete(t)}return n},t.prototype.hasInstances=function(t){return this._instances.has(t)},t.prototype.calcInstance=function(t,e){return j(this,void 0,void 0,function(){var i,n,a,r,o=this;return U(this,function(s){switch(s.label){case 0:return i=[],Mt(t)?Mt(e)?(n=this._instances.get(e),At(n)&&(a=n.find(function(e){return e.name===t}),At(a)&&i.push(a.calcIndicator(this._chartStore.getDataList())))):this._instances.forEach(function(e){var n=e.find(function(e){return e.name===t});At(n)&&i.push(n.calcIndicator(o._chartStore.getDataList()))}):this._instances.forEach(function(t){t.forEach(function(t){i.push(t.calcIndicator(o._chartStore.getDataList()))})}),[4,Promise.all(i)];case 1:return r=s.sent(),[2,r.includes(!0)]}})})},t.prototype.getInstanceByPaneId=function(t,e){var i,n,a=function(t){var e=new Map;return t.forEach(function(t){e.set(t.name,t)}),e};if(Mt(t)){var r=null!==(i=this._instances.get(t))&&void 0!==i?i:[];return Mt(e)?null!==(n=null===r||void 0===r?void 0:r.find(function(t){return t.name===e}))&&void 0!==n?n:null:a(r)}var o=new Map;return this._instances.forEach(function(t,e){o.set(e,a(t))}),o},t.prototype.synchronizeSeriesPrecision=function(t){var e=this._chartStore.getPrecision(),i=e.price,n=e.volume,a=function(t){switch(t.series){case Xt.Price:t.setPrecision(i,!0);break;case Xt.Volume:t.setPrecision(n,!0);break}};At(t)?a(t):this._instances.forEach(function(t){t.forEach(function(t){a(t)})})},t.prototype.override=function(t,e){return j(this,void 0,void 0,function(){var i,n,a,r,o,s,l,c=this;return U(this,function(u){switch(u.label){case 0:return i=t.name,n=new Map,null!==e?(a=this._instances.get(e),At(a)&&n.set(e,a)):n=this._instances,r=!1,o=[],s=!1,n.forEach(function(e){var n=e.find(function(t){return t.name===i});if(At(n)){var a=c._overrideInstance(n,t);a[2]&&(s=!0),a[1]?o.push(n.calcIndicator(c._chartStore.getDataList())):a[0]&&(r=!0)}}),s&&this._sort(),[4,Promise.all(o)];case 1:return l=u.sent(),[2,[r,l.includes(!0)]]}})})},t}(),si=function(){function t(t){this._crosshair={},this._activeIcon=null,this._chartStore=t}return t.prototype.setCrosshair=function(t,e){var i,n,a=null!==e&&void 0!==e?e:{},r=a.notInvalidate,o=a.notExecuteAction,s=this._chartStore.getDataList(),l=null!==t&&void 0!==t?t:{};Et(l.x)?(i=this._chartStore.getTimeScaleStore().coordinateToDataIndex(l.x),n=i<0?0:i>s.length-1?s.length-1:i):(i=s.length-1,n=i);var c=s[n],u=this._chartStore.getTimeScaleStore().dataIndexToCoordinate(i),d={x:this._crosshair.x,y:this._crosshair.y,paneId:this._crosshair.paneId};this._crosshair=K(K({},l),{realX:u,kLineData:c,realDataIndex:i,dataIndex:n}),d.x===l.x&&d.y===l.y&&d.paneId===l.paneId||(null===c||null!==o&&void 0!==o&&o||this._chartStore.getChart().crosshairChange(this._crosshair),null!==r&&void 0!==r&&r||this._chartStore.getChart().updatePane(1))},t.prototype.recalculateCrosshair=function(t){this.setCrosshair(this._crosshair,{notInvalidate:t})},t.prototype.getCrosshair=function(){return this._crosshair},t.prototype.setActiveIcon=function(t){this._activeIcon=null!==t&&void 0!==t?t:null},t.prototype.getActiveIcon=function(){return this._activeIcon},t.prototype.clear=function(){this.setCrosshair({},{notInvalidate:!0}),this.setActiveIcon()},t}(),li={name:"fibonacciLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e,i=t.coordinates,n=t.bounding,a=t.overlay,r=t.precision,o=t.thousandsSeparator,s=t.decimalFoldThreshold,l=t.yAxis,c=a.points;if(i.length>0){var u=null===(e=null===l||void 0===l?void 0:l.isInCandle())||void 0===e||e?r.price:r.excludePriceVolumeMax,d=[],h=[],p=0,v=n.width;if(i.length>1&&Et(c[0].value)&&Et(c[1].value)){var f=[1,.786,.618,.5,.382,.236,0],g=i[0].y-i[1].y,m=c[0].value-c[1].value;f.forEach(function(t){var e,n=i[1].y+g*t,a=Vt(zt(((null!==(e=c[1].value)&&void 0!==e?e:0)+m*t).toFixed(u),o),s);d.push({coordinates:[{x:p,y:n},{x:v,y:n}]}),h.push({x:p,y:n,text:"".concat(a," (").concat((100*t).toFixed(1),"%)"),baseline:"bottom"})})}return[{type:"line",attrs:d},{type:"text",isCheckEvent:!1,attrs:h}]}return[]}},ci={name:"horizontalRayLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates,i=t.bounding,n={x:0,y:e[0].y};return At(e[1])&&e[0].x-1)for(var a=n;a>-1;a--)if(this._children[a].dispatchEvent(t,e,i))return!0;return this.onEvent(t,e,i)},t.prototype.addChild=function(t){return this._children.push(t),this},t.prototype.clear=function(){this._children=[]},t}(),pi=2,vi=function(t){function e(e){var i=t.call(this)||this;return i.attrs=e.attrs,i.styles=e.styles,i}return L(e,t),e.prototype.checkEventOn=function(t){return this.checkEventOnImp(t,this.attrs,this.styles)},e.prototype.setAttrs=function(t){return this.attrs=t,this},e.prototype.setStyles=function(t){return this.styles=t,this},e.prototype.draw=function(t){this.drawImp(t,this.attrs,this.styles)},e.extend=function(t){var i=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return L(i,e),i.prototype.checkEventOnImp=function(e,i,n){return t.checkEventOn(e,i,n)},i.prototype.drawImp=function(e,i,n){t.draw(e,i,n)},i}(e);return i},e}(hi);function fi(t,e){var i=[];i=i.concat(e);for(var n=0;n1)for(var r=1;r0&&i<1?i:0:i?.5:0;if(a>0&&n>2){for(var r=e[0].x,o=e[0].y,s=1;s1&&(2!==i.length||i[0].x!==i[1].x&&i[0].y!==i[1].y?(t.save(),c%2===1&&t.translate(.5,.5),t.beginPath(),t.moveTo(i[0].x,i[0].y),_i(t,i,s),t.stroke(),t.closePath(),t.restore()):(t.beginPath(),i[0].x===i[1].x?(t.moveTo(i[0].x+v,i[0].y),t.lineTo(i[1].x+v,i[1].y)):(t.moveTo(i[0].x,i[0].y+v),t.lineTo(i[1].x,i[1].y+v)),t.stroke(),t.closePath()))})}var xi={name:"line",checkEventOn:fi,draw:function(t,e,i){bi(t,e,i)}};function wi(t,e,i){var n=null!==i&&void 0!==i?i:0,a=[];if(t.length>1)if(t[0].x===t[1].x){var r=0,o=e.height;if(a.push({coordinates:[{x:t[0].x,y:r},{x:t[0].x,y:o}]}),t.length>2){a.push({coordinates:[{x:t[2].x,y:r},{x:t[2].x,y:o}]});for(var s=t[0].x-t[2].x,l=0;l2){var f=t[2].y-p*t[2].x;a.push({coordinates:[{x:u,y:u*p+f},{x:d,y:d*p+f}]});for(s=v-f,l=0;l1){var i=void 0;return i=t[0].x===t[1].x&&t[0].y!==t[1].y?t[0].yt[1].x?{x:0,y:mi(t[0],t[1],{x:0,y:t[0].y})}:{x:e.width,y:mi(t[0],t[1],{x:e.width,y:t[0].y})},{coordinates:[t[0],i]}}return[]}var Ei={name:"rayLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates,i=t.bounding;return[{type:"line",attrs:Ii(e,i)}]}},Ai={name:"segment",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates;return 2===e.length?[{type:"line",attrs:{coordinates:e}}]:[]}},Pi={name:"straightLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates,i=t.bounding;return 2===e.length?e[0].x===e[1].x?[{type:"line",attrs:{coordinates:[{x:e[0].x,y:0},{x:e[0].x,y:i.height}]}}]:[{type:"line",attrs:{coordinates:[{x:0,y:mi(e[0],e[1],{x:0,y:e[0].y})},{x:i.width,y:mi(e[0],e[1],{x:i.width,y:e[0].y})}]}}]:[]}},Mi={name:"verticalRayLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates,i=t.bounding;if(2===e.length){var n={x:e[0].x,y:0};return e[0].y0&&l.set(e[0],n)};try{for(var u=G(this._instances),d=u.next();!d.done;d=u.next()){var h=d.value;c(h)}}catch(v){e={error:v}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(e)throw e.error}}this._instances=l}else this._instances.forEach(function(t,e){r.push(e),t.forEach(function(t){var e;null===(e=t.onRemoved)||void 0===e||e.call(t,{overlay:t})})}),this._instances.clear();if(r.length>0){var p=this._chartStore.getChart();r.forEach(function(t){p.updatePane(1,t)}),p.updatePane(1,Wi.X_AXIS)}},t.prototype.setPressedInstanceInfo=function(t){this._pressedInstanceInfo=t},t.prototype.getPressedInstanceInfo=function(){return this._pressedInstanceInfo},t.prototype.updatePointPosition=function(t,e){if(t>0){var i=this._chartStore.getDataList();this._instances.forEach(function(n){n.forEach(function(n){var a=n.points;a.forEach(function(n){if(!At(n.timestamp)&&At(n.dataIndex)){e===Yt.Forward&&(n.dataIndex=n.dataIndex+t);var a=i[n.dataIndex];n.timestamp=null===a||void 0===a?void 0:a.timestamp}})})})}},t.prototype.setHoverInstanceInfo=function(t,e){var i,n,a=this._hoverInstanceInfo,r=a.instance,o=a.figureType,s=a.figureKey,l=a.figureIndex;if(((null===r||void 0===r?void 0:r.id)!==(null===(i=t.instance)||void 0===i?void 0:i.id)||o!==t.figureType||l!==t.figureIndex)&&(this._hoverInstanceInfo=t,(null===r||void 0===r?void 0:r.id)!==(null===(n=t.instance)||void 0===n?void 0:n.id))){var c=!1,u=!1;null!==r&&(u=!0,kt(r.onMouseLeave)&&(r.onMouseLeave(K({overlay:r,figureKey:s,figureIndex:l},e)),c=!0)),null!==t.instance&&(u=!0,kt(t.instance.onMouseEnter)&&(t.instance.onMouseEnter(K({overlay:t.instance,figureKey:t.figureKey,figureIndex:t.figureIndex},e)),c=!0)),u&&this._sort(),c||this._chartStore.getChart().updatePane(1)}},t.prototype.getHoverInstanceInfo=function(){return this._hoverInstanceInfo},t.prototype.setClickInstanceInfo=function(t,e){var i,n,a,r,o,s,l,c,u,d=this._clickInstanceInfo,h=d.paneId,p=d.instance,v=d.figureType,f=d.figureKey,g=d.figureIndex;if(null!==(n=null===(i=t.instance)||void 0===i?void 0:i.isDrawing())&&void 0!==n&&n||null===(r=null===(a=t.instance)||void 0===a?void 0:a.onClick)||void 0===r||r.call(a,K({overlay:t.instance,figureKey:t.figureKey,figureIndex:t.figureIndex},e)),((null===p||void 0===p?void 0:p.id)!==(null===(o=t.instance)||void 0===o?void 0:o.id)||v!==t.figureType||g!==t.figureIndex)&&(this._clickInstanceInfo=t,(null===p||void 0===p?void 0:p.id)!==(null===(s=t.instance)||void 0===s?void 0:s.id))){null===(l=null===p||void 0===p?void 0:p.onDeselected)||void 0===l||l.call(p,K({overlay:p,figureKey:f,figureIndex:g},e)),null===(u=null===(c=t.instance)||void 0===c?void 0:c.onSelected)||void 0===u||u.call(c,K({overlay:t.instance,figureKey:t.figureKey,figureIndex:t.figureIndex},e));var m=this._chartStore.getChart();m.updatePane(1,t.paneId),h!==t.paneId&&m.updatePane(1,h),m.updatePane(1,Wi.X_AXIS)}},t.prototype.getClickInstanceInfo=function(){return this._clickInstanceInfo},t.prototype.isEmpty=function(){return 0===this._instances.size&&null===this._progressInstanceInfo},t.prototype.isDrawing=function(){var t,e;return null!==this._progressInstanceInfo&&null!==(e=null===(t=this._progressInstanceInfo)||void 0===t?void 0:t.instance.isDrawing())&&void 0!==e&&e},t}(),$i=function(){function t(){this._actions=new Map}return t.prototype.execute=function(t,e){var i;null===(i=this._actions.get(t))||void 0===i||i.execute(e)},t.prototype.subscribe=function(t,e){var i;this._actions.has(t)||this._actions.set(t,new Kt),null===(i=this._actions.get(t))||void 0===i||i.subscribe(e)},t.prototype.unsubscribe=function(t,e){var i=this._actions.get(t);At(i)&&(i.unsubscribe(e),i.isEmpty()&&this._actions.delete(t))},t.prototype.has=function(t){var e=this._actions.get(t);return At(e)&&!e.isEmpty()},t}(),Yi={grid:{horizontal:{color:"#EDEDED"},vertical:{color:"#EDEDED"}},candle:{priceMark:{high:{color:"#76808F"},low:{color:"#76808F"}},tooltip:{rect:{color:"#FEFEFE",borderColor:"#F2F3F5"},text:{color:"#76808F"}}},indicator:{tooltip:{text:{color:"#76808F"}}},xAxis:{axisLine:{color:"#DDDDDD"},tickText:{color:"#76808F"},tickLine:{color:"#DDDDDD"}},yAxis:{axisLine:{color:"#DDDDDD"},tickText:{color:"#76808F"},tickLine:{color:"#DDDDDD"}},separator:{color:"#DDDDDD"},crosshair:{horizontal:{line:{color:"#76808F"},text:{borderColor:"#686D76",backgroundColor:"#686D76"}},vertical:{line:{color:"#76808F"},text:{borderColor:"#686D76",backgroundColor:"#686D76"}}}},Xi={grid:{horizontal:{color:"#292929"},vertical:{color:"#292929"}},candle:{priceMark:{high:{color:"#929AA5"},low:{color:"#929AA5"}},tooltip:{rect:{color:"rgba(10, 10, 10, .6)",borderColor:"rgba(10, 10, 10, .6)"},text:{color:"#929AA5"}}},indicator:{tooltip:{text:{color:"#929AA5"}}},xAxis:{axisLine:{color:"#333333"},tickText:{color:"#929AA5"},tickLine:{color:"#333333"}},yAxis:{axisLine:{color:"#333333"},tickText:{color:"#929AA5"},tickLine:{color:"#333333"}},separator:{color:"#333333"},crosshair:{horizontal:{line:{color:"#929AA5"},text:{borderColor:"#373a40",backgroundColor:"#373a40"}},vertical:{line:{color:"#929AA5"},text:{borderColor:"#373a40",backgroundColor:"#373a40"}}}},Ki={light:Yi,dark:Xi};function ji(t){var e;return null!==(e=Ki[t])&&void 0!==e?e:null}var Ui=function(){function t(t,e){this._styles=gt(),this._customApi=ne(),this._locale=ae,this._precision={price:2,volume:0},this._thousandsSeparator=",",this._decimalFoldThreshold=3,this._dataList=[],this._loadMoreCallback=null,this._loadDataCallback=null,this._loading=!0,this._forwardMore=!0,this._backwardMore=!0,this._timeScaleStore=new Ie(this),this._indicatorStore=new oi(this),this._overlayStore=new Hi(this),this._tooltipStore=new si(this),this._actionStore=new $i,this._visibleDataList=[],this._chart=t,this.setOptions(e)}return t.prototype.adjustVisibleDataList=function(){this._visibleDataList=[];for(var t=this._timeScaleStore.getVisibleRange(),e=t.realFrom,i=t.realTo,n=e;n0&&(this._decimalFoldThreshold=u)}return this},t.prototype.getStyles=function(){return this._styles},t.prototype.getLocale=function(){return this._locale},t.prototype.getCustomApi=function(){return this._customApi},t.prototype.getThousandsSeparator=function(){return this._thousandsSeparator},t.prototype.getDecimalFoldThreshold=function(){return this._decimalFoldThreshold},t.prototype.getPrecision=function(){return this._precision},t.prototype.setPrecision=function(t){return this._precision=t,this._indicatorStore.synchronizeSeriesPrecision(),this},t.prototype.getDataList=function(){return this._dataList},t.prototype.getVisibleFirstData=function(){var t,e=this._timeScaleStore.getVisibleRange().from;return null!==(t=this._dataList[e])&&void 0!==t?t:null},t.prototype.getVisibleDataList=function(){return this._visibleDataList},t.prototype.addData=function(t,e,i){return j(this,void 0,void 0,function(){var n,a,r,o,s,l,c;return U(this,function(u){switch(u.label){case 0:if(n=!1,a=!1,r=0,Ct(t)){switch(r=t.length,e){case Yt.Init:this.clear(),this._dataList=t,this._forwardMore=null===i||void 0===i||i,this._timeScaleStore.resetOffsetRightDistance(),a=!0;break;case Yt.Backward:this._dataList=this._dataList.concat(t),this._backwardMore=null!==i&&void 0!==i&&i,a=r>0;break;case Yt.Forward:this._dataList=t.concat(this._dataList),this._forwardMore=null!==i&&void 0!==i&&i,a=r>0}this._loading=!1,n=!0}else o=this._dataList.length,s=t.timestamp,l=Rt(this._dataList[o-1],"timestamp",0),s>l?(this._dataList.push(t),c=this._timeScaleStore.getLastBarRightSideDiffBarCount(),c<0&&this._timeScaleStore.setLastBarRightSideDiffBarCount(--c),r=1,n=!0,a=!0):s===l&&(this._dataList[o-1]=t,n=!0,a=!0);if(!n)return[3,5];u.label=1;case 1:return u.trys.push([1,4,,5]),this._overlayStore.updatePointPosition(r,e),a?(this._timeScaleStore.adjustVisibleRange(),this._tooltipStore.recalculateCrosshair(!0),[4,this._indicatorStore.calcInstance()]):[3,3];case 2:u.sent(),this._chart.adjustPaneViewport(!1,!0,!0,!0),u.label=3;case 3:return this._actionStore.execute(Tt.OnDataReady),[3,5];case 4:return u.sent(),[3,5];case 5:return[2]}})})},t.prototype.setLoadMoreCallback=function(t){this._loadMoreCallback=t},t.prototype.executeLoadMoreCallback=function(t){this._forwardMore&&!this._loading&&At(this._loadMoreCallback)&&(this._loading=!0,this._loadMoreCallback(t))},t.prototype.setLoadDataCallback=function(t){this._loadDataCallback=t},t.prototype.executeLoadDataCallback=function(t){var e=this;if(!this._loading&&At(this._loadDataCallback)&&(this._forwardMore&&t.type===Yt.Forward||this._backwardMore&&t.type===Yt.Backward)){var i=function(i,n){e.addData(i,t.type,n).then(function(){}).catch(function(){})};this._loading=!0,this._loadDataCallback(K(K({},t),{callback:i}))}},t.prototype.clear=function(){this._forwardMore=!0,this._backwardMore=!0,this._loading=!0,this._dataList=[],this._visibleDataList=[],this._timeScaleStore.clear(),this._tooltipStore.clear()},t.prototype.getTimeScaleStore=function(){return this._timeScaleStore},t.prototype.getIndicatorStore=function(){return this._indicatorStore},t.prototype.getOverlayStore=function(){return this._overlayStore},t.prototype.getTooltipStore=function(){return this._tooltipStore},t.prototype.getActionStore=function(){return this._actionStore},t.prototype.getChart=function(){return this._chart},t}(),Gi={MAIN:"main",X_AXIS:"xAxis",Y_AXIS:"yAxis",SEPARATOR:"separator"},Zi=7;function qi(){return j(this,void 0,void 0,function(){return U(this,function(t){switch(t.label){case 0:return[4,new Promise(function(t){var e=new ResizeObserver(function(i){t(i.every(function(t){return"devicePixelContentBoxSize"in t})),e.disconnect()});e.observe(document.body,{box:"device-pixel-content-box"})}).catch(function(){return!1})];case 1:return[2,t.sent()]}})})}var Ji=function(){function t(t,e){var i=this;this._supportedDevicePixelContentBox=!1,this._width=0,this._height=0,this._pixelWidth=0,this._pixelHeight=0,this._nextPixelWidth=0,this._nextPixelHeight=0,this._requestAnimationId=re,this._mediaQueryListener=function(){var t=Wt(i._element);i._nextPixelWidth=Math.round(i._element.clientWidth*t),i._nextPixelHeight=Math.round(i._element.clientHeight*t),i._resetPixelRatio()},this._listener=e,this._element=he("canvas",t),this._ctx=this._element.getContext("2d",{willReadFrequently:!0}),qi().then(function(t){i._supportedDevicePixelContentBox=t,t?(i._resizeObserver=new ResizeObserver(function(t){var e,n=t.find(function(t){return t.target===i._element}),a=null===(e=null===n||void 0===n?void 0:n.devicePixelContentBoxSize)||void 0===e?void 0:e[0];At(a)&&(i._nextPixelWidth=a.inlineSize,i._nextPixelHeight=a.blockSize,i._pixelWidth===i._nextPixelWidth&&i._pixelHeight===i._nextPixelHeight||i._resetPixelRatio())}),i._resizeObserver.observe(i._element,{box:"device-pixel-content-box"})):(i._mediaQueryList=window.matchMedia("(resolution: ".concat(Wt(i._element),"dppx)")),i._mediaQueryList.addListener(i._mediaQueryListener))}).catch(function(t){return!1})}return t.prototype._resetPixelRatio=function(){var t=this;this._executeListener(function(){var e=t._element.clientWidth,i=t._element.clientHeight,n=t._nextPixelWidth/e,a=t._nextPixelHeight/i;t._width=e,t._height=i,t._pixelWidth=t._nextPixelWidth,t._pixelHeight=t._nextPixelHeight,t._element.width=t._nextPixelWidth,t._element.height=t._nextPixelHeight,t._ctx.scale(n,a)})},t.prototype._executeListener=function(t){var e=this;this._requestAnimationId===re&&(this._requestAnimationId=oe(function(){e._ctx.clearRect(0,0,e._width,e._height),null===t||void 0===t||t(),e._listener(),e._requestAnimationId=re}))},t.prototype.update=function(t,e){if(this._width!==t||this._height!==e){if(this._element.style.width="".concat(t,"px"),this._element.style.height="".concat(e,"px"),!this._supportedDevicePixelContentBox){var i=Wt(this._element);this._nextPixelWidth=Math.round(t*i),this._nextPixelHeight=Math.round(e*i),this._resetPixelRatio()}}else this._executeListener()},t.prototype.getElement=function(){return this._element},t.prototype.getContext=function(){return this._ctx},t.prototype.destroy=function(){At(this._resizeObserver)&&this._resizeObserver.unobserve(this._element),At(this._mediaQueryList)&&this._mediaQueryList.removeListener(this._mediaQueryListener)},t}();function Qi(t){var e={width:0,height:0,left:0,right:0,top:0,bottom:0};return At(t)&&wt(e,t),e}var tn=function(t){function e(e,i){var n=t.call(this)||this;return n._bounding=Qi(),n._pane=i,n._rootContainer=e,n._container=n.createContainer(),e.appendChild(n._container),n}return L(e,t),e.prototype.setBounding=function(t){return wt(this._bounding,t),this},e.prototype.getContainer=function(){return this._container},e.prototype.getBounding=function(){return this._bounding},e.prototype.getPane=function(){return this._pane},e.prototype.update=function(t){this.updateImp(this._container,this._bounding,null!==t&&void 0!==t?t:3)},e.prototype.destroy=function(){this._rootContainer.removeChild(this._container)},e}(hi),en=function(t){function e(e,i){var n=t.call(this,e,i)||this;n._mainCanvas=new Ji({position:"absolute",top:"0",left:"0",zIndex:"2",boxSizing:"border-box"},function(){n.updateMain(n._mainCanvas.getContext())}),n._overlayCanvas=new Ji({position:"absolute",top:"0",left:"0",zIndex:"2",boxSizing:"border-box"},function(){n.updateOverlay(n._overlayCanvas.getContext())});var a=n.getContainer();return a.appendChild(n._mainCanvas.getElement()),a.appendChild(n._overlayCanvas.getElement()),n}return L(e,t),e.prototype.createContainer=function(){return he("div",{margin:"0",padding:"0",position:"absolute",top:"0",overflow:"hidden",boxSizing:"border-box",zIndex:"1"})},e.prototype.updateImp=function(t,e,i){var n=e.width,a=e.height,r=e.left;t.style.left="".concat(r,"px");var o=i,s=t.clientWidth,l=t.clientHeight;switch(n===s&&a===l||(t.style.width="".concat(n,"px"),t.style.height="".concat(a,"px"),o=3),o){case 0:this._mainCanvas.update(n,a);break;case 1:this._overlayCanvas.update(n,a);break;case 3:case 4:this._mainCanvas.update(n,a),this._overlayCanvas.update(n,a);break}},e.prototype.destroy=function(){this._mainCanvas.destroy(),this._overlayCanvas.destroy()},e.prototype.getImage=function(t){var e=this.getBounding(),i=e.width,n=e.height,a=he("canvas",{width:"".concat(i,"px"),height:"".concat(n,"px"),boxSizing:"border-box"}),r=a.getContext("2d"),o=Wt(a);return a.width=i*o,a.height=n*o,r.scale(o,o),r.drawImage(this._mainCanvas.getElement(),0,0,i,n),t&&r.drawImage(this._overlayCanvas.getElement(),0,0,i,n),a},e}(tn);function nn(t){return"transparent"===t||"none"===t||/^[rR][gG][Bb][Aa]\(([\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\s]*,){3}[\s]*0[\s]*\)$/.test(t)||/^[hH][Ss][Ll][Aa]\(([\s]*(360|3[0-5][0-9]|[012]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,){2}([\s]*0[\s]*)\)$/.test(t)}function an(t,e){var i=[];i=i.concat(e);for(var n=0;ns*s))return!0}return!1}function rn(t,e,i){var n=[];n=n.concat(e);var a=i.style,r=void 0===a?O.Fill:a,o=i.color,s=void 0===o?"currentColor":o,l=i.borderSize,c=void 0===l?1:l,u=i.borderColor,d=void 0===u?"currentColor":u,h=i.borderStyle,p=void 0===h?N.Solid:h,v=i.borderDashedValue,f=void 0===v?[2,2]:v,g=(r===O.Fill||i.style===O.StrokeFill)&&(!Mt(s)||!nn(s));g&&(t.fillStyle=s,n.forEach(function(e){var i=e.x,n=e.y,a=e.r;t.beginPath(),t.arc(i,n,a,0,2*Math.PI),t.closePath(),t.fill()})),(r===O.Stroke||i.style===O.StrokeFill)&&c>0&&!nn(d)&&(t.strokeStyle=d,t.lineWidth=c,p===N.Dashed?t.setLineDash(f):t.setLineDash([]),n.forEach(function(e){var i=e.x,n=e.y,a=e.r;(!g||a>c)&&(t.beginPath(),t.arc(i,n,a,0,2*Math.PI),t.closePath(),t.stroke())}))}var on={name:"circle",checkEventOn:an,draw:function(t,e,i){rn(t,e,i)}};function sn(t,e){var i=[];i=i.concat(e);for(var n=0;nt.y!==r[s].y>t.y&&t.x<(r[s].x-r[o].x)*(t.y-r[o].y)/(r[s].y-r[o].y)+r[o].x&&(a=!a);if(a)return!0}return!1}function ln(t,e,i){var n=[];n=n.concat(e);var a=i.style,r=void 0===a?O.Fill:a,o=i.color,s=void 0===o?"currentColor":o,l=i.borderSize,c=void 0===l?1:l,u=i.borderColor,d=void 0===u?"currentColor":u,h=i.borderStyle,p=void 0===h?N.Solid:h,v=i.borderDashedValue,f=void 0===v?[2,2]:v;r!==O.Fill&&i.style!==O.StrokeFill||Mt(s)&&nn(s)||(t.fillStyle=s,n.forEach(function(e){var i=e.coordinates;t.beginPath(),t.moveTo(i[0].x,i[0].y);for(var n=1;n0&&!nn(d)&&(t.strokeStyle=d,t.lineWidth=c,p===N.Dashed?t.setLineDash(f):t.setLineDash([]),n.forEach(function(e){var i=e.coordinates;t.beginPath(),t.moveTo(i[0].x,i[0].y);for(var n=1;n=r&&t.x<=r+o&&t.y>=s&&t.y<=s+l)return!0}return!1}function dn(t,e,i){var n,a=[];a=a.concat(e);var r=i.style,o=void 0===r?O.Fill:r,s=i.color,l=void 0===s?"transparent":s,c=i.borderSize,u=void 0===c?1:c,d=i.borderColor,h=void 0===d?"transparent":d,p=i.borderStyle,v=void 0===p?N.Solid:p,f=i.borderRadius,g=void 0===f?0:f,m=i.borderDashedValue,y=void 0===m?[2,2]:m,_=null!==(n=t.roundRect)&&void 0!==n?n:t.rect,b=(o===O.Fill||i.style===O.StrokeFill)&&(!Mt(l)||!nn(l));if(b&&(t.fillStyle=l,a.forEach(function(e){var i=e.x,n=e.y,a=e.width,r=e.height;t.beginPath(),_.call(t,i,n,a,r,g),t.closePath(),t.fill()})),(o===O.Stroke||i.style===O.StrokeFill)&&u>0&&!nn(h)){t.strokeStyle=h,t.fillStyle=h,t.lineWidth=u,v===N.Dashed?t.setLineDash(y):t.setLineDash([]);var x=u%2===1?.5:0,w=Math.round(2*x);a.forEach(function(e){var i=e.x,n=e.y,a=e.width,r=e.height;a>2*u&&r>2*u?(t.beginPath(),_.call(t,i+x,n+x,a-w,r-w,g),t.closePath(),t.stroke()):b||t.fillRect(i,n,a,r)})}}var hn={name:"rect",checkEventOn:un,draw:function(t,e,i){dn(t,e,i)}};function pn(t,e){var i,n,a=e.size,r=void 0===a?12:a,o=e.paddingLeft,s=void 0===o?0:o,l=e.paddingTop,c=void 0===l?0:l,u=e.paddingRight,d=void 0===u?0:u,h=e.paddingBottom,p=void 0===h?0:h,v=e.weight,f=void 0===v?"normal":v,g=e.family,m=t.x,y=t.y,_=t.text,b=t.align,x=void 0===b?"left":b,w=t.baseline,S=void 0===w?"top":w,C=t.width,k=t.height,I=null!==C&&void 0!==C?C:s+$t(_,r,f,g)+d,E=null!==k&&void 0!==k?k:c+r+p;switch(x){case"left":case"start":i=m;break;case"right":case"end":i=m-I;break;default:i=m-I/2;break}switch(S){case"top":case"hanging":n=y;break;case"bottom":case"ideographic":case"alphabetic":n=y-E;break;default:n=y-E/2;break}return{x:i,y:n,width:I,height:E}}function vn(t,e,i){var n=[];n=n.concat(e);for(var a=0;a=o&&t.x<=o+l&&t.y>=s&&t.y<=s+c)return!0}return!1}function fn(t,e,i){var n=[];n=n.concat(e);var a=i.color,r=void 0===a?"currentColor":a,o=i.size,s=void 0===o?12:o,l=i.family,c=i.weight,u=i.paddingLeft,d=void 0===u?0:u,h=i.paddingTop,p=void 0===h?0:h,v=i.paddingRight,f=void 0===v?0:v,g=n.map(function(t){return pn(t,i)});dn(t,g,K(K({},i),{color:i.backgroundColor})),t.textAlign="left",t.textBaseline="top",t.font=Ht(s,c,l),t.fillStyle=r,n.forEach(function(e,i){var n=g[i];t.fillText(e.text,n.x+d,n.y+p,n.width-d-f)})}var gn={name:"text",checkEventOn:vn,draw:function(t,e,i){fn(t,e,i)}},mn=gn;function yn(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}function _n(t,e){var i=[];i=i.concat(e);for(var n=0;n=Math.min(l,u)-pi&&t.y<=Math.max(c,d)+pi&&t.y>=Math.min(c,d)-pi)return!0}}return!1}function bn(t,e,i){var n=[];n=n.concat(e);var a=i.style,r=void 0===a?N.Solid:a,o=i.size,s=void 0===o?1:o,l=i.color,c=void 0===l?"currentColor":l,u=i.dashedValue,d=void 0===u?[2,2]:u;t.lineWidth=s,t.strokeStyle=c,r===N.Dashed?t.setLineDash(d):t.setLineDash([]),n.forEach(function(e){var i=e.x,n=e.y,a=e.r,r=e.startAngle,o=e.endAngle;t.beginPath(),t.arc(i,n,a,r,o),t.stroke(),t.closePath()})}var xn={name:"arc",checkEventOn:_n,draw:function(t,e,i){bn(t,e,i)}},wn={},Sn=[on,xi,cn,hn,gn,mn,xn];function Cn(t){var e;return null!==(e=wn[t])&&void 0!==e?e:null}Sn.forEach(function(t){wn[t.name]=vi.extend(t)});var kn=function(t){function e(e){var i=t.call(this)||this;return i._widget=e,i}return L(e,t),e.prototype.getWidget=function(){return this._widget},e.prototype.createFigure=function(t,e){var i=Cn(t.name);if(null!==i){var n=new i(t);if(At(e)){for(var a in e)e.hasOwnProperty(a)&&n.registerEvent(a,e[a]);this.addChild(n)}return n}return null},e.prototype.draw=function(t){this.clear(),this.drawImp(t)},e}(hi),In=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.drawImp=function(t){var e,i,n=this.getWidget(),a=this.getWidget().getPane(),r=a.getChart(),o=n.getBounding(),s=r.getStyles().grid,l=s.show;if(l){t.save(),t.globalCompositeOperation="destination-over";var c=s.horizontal,u=c.show;if(u){var d=a.getAxisComponent(),h=d.getTicks().map(function(t){return{coordinates:[{x:0,y:t.coord},{x:o.width,y:t.coord}]}});null===(e=this.createFigure({name:"line",attrs:h,styles:c}))||void 0===e||e.draw(t)}var p=s.vertical,v=p.show;if(v){var f=r.getXAxisPane().getAxisComponent();h=f.getTicks().map(function(t){return{coordinates:[{x:t.coord,y:0},{x:t.coord,y:o.height}]}});null===(i=this.createFigure({name:"line",attrs:h,styles:p}))||void 0===i||i.draw(t)}t.restore()}},e}(kn),En=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.eachChildren=function(t){var e=this.getWidget().getPane(),i=e.getChart().getChartStore(),n=i.getVisibleDataList(),a=i.getTimeScaleStore().getBarSpace();n.forEach(function(e,i){t(e,a,i)})},e}(kn),An=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._boundCandleBarClickEvent=function(t){return function(){return e.getWidget().getPane().getChart().getChartStore().getActionStore().execute(Tt.OnCandleBarClick,t),!1}},e}return L(e,t),e.prototype.drawImp=function(t){var e=this,i=this.getWidget().getPane(),n=i.getId()===Wi.CANDLE,a=i.getChart().getChartStore(),r=this.getCandleBarOptions(a);if(null!==r){var o=0,s=0;if(r.type===$.Ohlc){var l=a.getTimeScaleStore().getBarSpace().gapBar;o=Math.min(Math.max(Math.round(.2*l),1),8),o>2&&o%2===1&&o--,s=Math.floor(s/2)}var c=i.getAxisComponent();this.eachChildren(function(i,a){var l=i.data,u=i.x;if(At(l)){var d=l.open,h=l.high,p=l.low,v=l.close,f=r.type,g=r.styles,m=[];v>d?(m[0]=g.upColor,m[1]=g.upBorderColor,m[2]=g.upWickColor):vd?e._createStrokeBar(u,b,a,m):e._createSolidBar(u,b,a,m);break;case $.CandleDownStroke:x=d>v?e._createStrokeBar(u,b,a,m):e._createSolidBar(u,b,a,m);break;case $.Ohlc:x=[{name:"rect",attrs:[{x:u-s,y:b[0],width:o,height:b[3]-b[0]},{x:u-a.halfGapBar,y:y+o>b[3]?b[3]-o:y,width:a.halfGapBar,height:o},{x:u+s,y:_+o>b[3]?b[3]-o:_,width:a.halfGapBar-s,height:o}],styles:{color:m[0]}}];break}x.forEach(function(a){var r,o;n&&(o={mouseClickEvent:e._boundCandleBarClickEvent(i)}),null===(r=e.createFigure(a,o))||void 0===r||r.draw(t)})}})}},e.prototype.getCandleBarOptions=function(t){var e=t.getStyles().candle;return{type:e.type,styles:e.bar}},e.prototype._createSolidBar=function(t,e,i,n){return[{name:"rect",attrs:{x:t,y:e[0],width:1,height:e[3]-e[0]},styles:{color:n[2]}},{name:"rect",attrs:{x:t-i.halfGapBar,y:e[1],width:i.gapBar,height:Math.max(1,e[2]-e[1])},styles:{style:O.StrokeFill,color:n[0],borderColor:n[1]}}]},e.prototype._createStrokeBar=function(t,e,i,n){return[{name:"rect",attrs:[{x:t,y:e[0],width:1,height:e[1]-e[0]},{x:t,y:e[2],width:1,height:e[3]-e[2]}],styles:{color:n[2]}},{name:"rect",attrs:{x:t-i.halfGapBar,y:e[1],width:i.gapBar,height:Math.max(1,e[2]-e[1])},styles:{style:O.Stroke,borderColor:n[1]}}]},e}(En),Pn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.getCandleBarOptions=function(t){var e,i,n=this.getWidget().getPane(),a=n.getAxisComponent();if(!a.isInCandle()){var r=t.getIndicatorStore().getInstances(n.getId());try{for(var o=G(r),s=o.next();!s.done;s=o.next()){var l=s.value;if(l.shouldOhlc&&l.visible){var c=l.styles,u=t.getStyles().indicator,d=Rt(c,"ohlc.upColor",u.ohlc.upColor),h=Rt(c,"ohlc.downColor",u.ohlc.downColor),p=Rt(c,"ohlc.noChangeColor",u.ohlc.noChangeColor);return{type:$.Ohlc,styles:{upColor:d,downColor:h,noChangeColor:p,upBorderColor:d,downBorderColor:h,noChangeBorderColor:p,upWickColor:d,downWickColor:h,noChangeWickColor:p}}}}}catch(v){e={error:v}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(e)throw e.error}}}return null},e.prototype.drawImp=function(e){var i=this;t.prototype.drawImp.call(this,e);var n=this.getWidget(),a=n.getPane(),r=a.getChart(),o=n.getBounding(),s=r.getXAxisPane().getAxisComponent(),l=a.getAxisComponent(),c=r.getChartStore(),u=c.getDataList(),d=c.getTimeScaleStore(),h=d.getVisibleRange(),p=c.getIndicatorStore().getInstances(a.getId()),v=c.getStyles().indicator;e.save(),p.forEach(function(t){var n;if(t.visible){t.zLevel<0?e.globalCompositeOperation="destination-over":e.globalCompositeOperation="source-over";var a=!1;if(null!==t.draw&&(e.save(),a=null!==(n=t.draw({ctx:e,kLineDataList:u,indicator:t,visibleRange:h,bounding:o,barSpace:d.getBarSpace(),defaultStyles:v,xAxis:s,yAxis:l}))&&void 0!==n&&n,e.restore()),!a){var r=t.result,c=[];i.eachChildren(function(n,a){var d,h,p,f=a.halfGapBar,g=n.dataIndex,m=n.x,y=s.convertToPixel(g-1),_=s.convertToPixel(g+1),b=null!==(d=r[g-1])&&void 0!==d?d:null,x=null!==(h=r[g])&&void 0!==h?h:null,w=null!==(p=r[g+1])&&void 0!==p?p:null,S={x:y},C={x:m},k={x:_};t.figures.forEach(function(t){var e=t.key,i=null===b||void 0===b?void 0:b[e];Et(i)&&(S[e]=l.convertToPixel(i));var n=null===x||void 0===x?void 0:x[e];Et(n)&&(C[e]=l.convertToPixel(n));var a=null===w||void 0===w?void 0:w[e];Et(a)&&(k[e]=l.convertToPixel(a))}),jt(u,t,g,v,function(t,n,r){var u,d,h;if(At(null===x||void 0===x?void 0:x[t.key])){var p=C[t.key],v=null===(u=t.attrs)||void 0===u?void 0:u.call(t,{data:{prev:b,current:x,next:w},coordinate:{prev:S,current:C,next:k},bounding:o,barSpace:a,xAxis:s,yAxis:l});if(!At(v))switch(t.type){case"circle":v={x:m,y:p,r:Math.max(1,f)};break;case"rect":case"bar":var g=null!==(d=t.baseValue)&&void 0!==d?d:l.getRange().from,y=l.convertToPixel(g),_=Math.abs(y-p);g!==(null===x||void 0===x?void 0:x[t.key])&&(_=Math.max(1,_));var I=void 0;I=p>y?y:p,v={x:m-f,y:I,width:Math.max(1,2*f),height:_};break;case"line":At(c[r])||(c[r]=[]),Et(C[t.key])&&Et(k[t.key])&&c[r].push({coordinates:[{x:C.x,y:C[t.key]},{x:k.x,y:k[t.key]}],styles:n});break}var E=t.type;At(v)&&"line"!==E&&(null===(h=i.createFigure({name:"bar"===E?"rect":E,attrs:v,styles:n}))||void 0===h||h.draw(e))}})}),c.forEach(function(t){if(t.length>1){for(var n=[{coordinates:[t[0].coordinates[0],t[0].coordinates[1]],styles:t[0].styles}],a=1;a0,C=x.length>0;if(S||C){var k=Z(p.classifyTooltipIcons(w),3),I=k[0],E=k[1],A=k[2];if(g=p.drawStandardTooltipIcons(t,a,I,m,e,r.name,c,g,d),S){var P=_;b.length>0&&(P="".concat(P).concat(b)),g=p.drawStandardTooltipLegends(t,[{title:{text:"",color:f.color},value:{text:P,color:f.color}}],m,c,g,d,f)}g=p.drawStandardTooltipIcons(t,a,E,m,e,r.name,c,g,d),C&&(g=p.drawStandardTooltipLegends(t,x,m,c,g,d,v.text)),g=p.drawStandardTooltipIcons(t,a,A,m,e,r.name,c,g,d),u=m.y+g}})}return u},e.prototype.drawStandardTooltipIcons=function(t,e,i,n,a,r,o,s,l){var c=this;if(i.length>0){var u=0,d=0;i.forEach(function(e){var i=e.marginLeft,n=void 0===i?0:i,a=e.marginTop,r=void 0===a?0:a,o=e.marginRight,s=void 0===o?0:o,l=e.marginBottom,c=void 0===l?0:l,h=e.paddingLeft,p=void 0===h?0:h,v=e.paddingTop,f=void 0===v?0:v,g=e.paddingRight,m=void 0===g?0:g,y=e.paddingBottom,_=void 0===y?0:y,b=e.size,x=e.fontFamily,w=e.icon;t.font=Ht(b,"normal",x),u+=n+p+t.measureText(w).width+m+s,d=Math.max(d,r+f+b+_+c)}),n.x+u>l?(n.x=o,n.y+=s,s=d):s=Math.max(s,d),i.forEach(function(i){var o,s=i.marginLeft,l=void 0===s?0:s,u=i.marginTop,d=void 0===u?0:u,h=i.marginRight,p=void 0===h?0:h,v=i.paddingLeft,f=void 0===v?0:v,g=i.paddingTop,m=void 0===g?0:g,y=i.paddingRight,_=void 0===y?0:y,b=i.paddingBottom,x=void 0===b?0:b,w=i.color,S=i.activeColor,C=i.size,k=i.fontFamily,I=i.icon,E=i.backgroundColor,A=i.activeBackgroundColor,P=(null===e||void 0===e?void 0:e.paneId)===a&&(null===e||void 0===e?void 0:e.indicatorName)===r&&(null===e||void 0===e?void 0:e.iconId)===i.id;null===(o=c.createFigure({name:"text",attrs:{text:I,x:n.x+l,y:n.y+d},styles:{paddingLeft:f,paddingTop:m,paddingRight:_,paddingBottom:x,color:P?S:w,size:C,family:k,backgroundColor:P?A:E}},{mouseClickEvent:c._boundIconClickEvent({paneId:a,indicatorName:r,iconId:i.id}),mouseMoveEvent:c._boundIconMouseMoveEvent({paneId:a,indicatorName:r,iconId:i.id})}))||void 0===o||o.draw(t),n.x+=l+f+t.measureText(I).width+_+p})}return s},e.prototype.drawStandardTooltipLegends=function(t,e,i,n,a,r,o){var s=this;if(e.length>0){var l=o.marginLeft,c=o.marginTop,u=o.marginRight,d=o.marginBottom,h=o.size,p=o.family,v=o.weight;t.font=Ht(h,v,p),e.forEach(function(e){var o,f,g=e.title,m=e.value,y=t.measureText(g.text).width,_=t.measureText(m.text).width,b=y+_,x=c+h+d;i.x+l+b+u>r?(i.x=n,i.y+=a,a=x):a=Math.max(a,x),g.text.length>0&&(null===(o=s.createFigure({name:"text",attrs:{x:i.x+l,y:i.y+c,text:g.text},styles:{color:g.color,size:h,family:p,weight:v}}))||void 0===o||o.draw(t)),null===(f=s.createFigure({name:"text",attrs:{x:i.x+l+y,y:i.y+c,text:m.text},styles:{color:m.color,size:h,family:p,weight:v}}))||void 0===f||f.draw(t),i.x+=l+b+u})}return a},e.prototype.isDrawTooltip=function(t,e){var i=e.showRule;return i===z.Always||i===z.FollowCross&&Mt(t.paneId)},e.prototype.getIndicatorTooltipData=function(t,e,i,n,a,r,o){var s,l,c=o.tooltip,u=c.showName?i.shortName:"",d="",h=i.calcParams;h.length>0&&c.showParams&&(d="(".concat(h.join(","),")"));var p={name:u,calcParamsText:d,values:[],icons:c.icons},v=e.dataIndex,f=null!==(s=i.result)&&void 0!==s?s:[],g=[];if(i.visible){var m=null!==(l=f[v])&&void 0!==l?l:{};jt(t,i,v,o,function(t,e){var o;if(Mt(t.title)){var s=e.color,l=null!==(o=m[t.key])&&void 0!==o?o:c.defaultValue;Et(l)&&(l=Nt(l,i.precision),i.shouldFormatBigNumber&&(l=n.formatBigNumber(l)),l=Vt(zt(l,a),r)),g.push({title:{text:t.title,color:s},value:{text:l,color:s}})}}),p.values=g}if(null!==i.createTooltipDataSource){var y=this.getWidget(),_=y.getPane(),b=_.getChart().getChartStore(),x=i.createTooltipDataSource({kLineDataList:t,indicator:i,visibleRange:b.getTimeScaleStore().getVisibleRange(),bounding:y.getBounding(),crosshair:e,defaultStyles:o,xAxis:_.getChart().getXAxisPane().getAxisComponent(),yAxis:_.getAxisComponent()}),w=x.name,S=x.calcParamsText,C=x.values,k=x.icons;if(Mt(w)&&c.showName&&(p.name=w),Mt(S)&&c.showParams&&(p.calcParamsText=S),At(k)&&(p.icons=k),At(C)&&i.visible){var I=[],E=o.tooltip.text.color;C.forEach(function(t){var e,o={text:"",color:E};It(t.title)?o=t.title:o.text=t.title;var s={text:"",color:E};if(It(t.value)?s=t.value:s.text=null!==(e=t.value)&&void 0!==e?e:c.defaultValue,Et(s.text)){var l=Nt(s.text,i.precision);i.shouldFormatBigNumber&&(l=n.formatBigNumber(l)),l=Vt(zt(l,a),r),s.text=l}I.push({title:o,value:s})}),p.values=I}}return p},e.prototype.classifyTooltipIcons=function(t){var e=[],i=[],n=[];return t.forEach(function(t){switch(t.position){case W.Left:e.push(t);break;case W.Middle:i.push(t);break;case W.Right:n.push(t);break}}),[e,i,n]},e}(kn),Tn=function(t){function e(e){var i=t.call(this,e)||this;return i._initEvent(),i}return L(e,t),e.prototype._initEvent=function(){var t=this,e=this.getWidget().getPane(),i=e.getId(),n=e.getChart().getChartStore().getOverlayStore();this.registerEvent("mouseMoveEvent",function(e){var a,r=n.getProgressInstanceInfo();if(null!==r){var o=r.instance,s=r.paneId;o.isStart()&&(n.updateProgressInstanceInfo(i),s=i);var l=o.points.length-1,c="".concat(ee,"point_").concat(l);return o.isDrawing()&&s===i&&(o.eventMoveForDrawing(t._coordinateToPoint(r.instance,e)),null===(a=o.onDrawing)||void 0===a||a.call(o,K({overlay:o,figureKey:c,figureIndex:l},e))),t._figureMouseMoveEvent(o,1,c,l,0)(e)}return n.setHoverInstanceInfo({paneId:i,instance:null,figureType:0,figureKey:"",figureIndex:-1,attrsIndex:-1},e),!1}).registerEvent("mouseClickEvent",function(e){var a,r,o=n.getProgressInstanceInfo();if(null!==o){var s=o.instance,l=o.paneId;s.isStart()&&(n.updateProgressInstanceInfo(i,!0),l=i);var c=s.points.length-1,u="".concat(ee,"point_").concat(c);return s.isDrawing()&&l===i&&(s.eventMoveForDrawing(t._coordinateToPoint(s,e)),null===(a=s.onDrawing)||void 0===a||a.call(s,K({overlay:s,figureKey:u,figureIndex:c},e)),s.nextStep(),s.isDrawing()||(n.progressInstanceComplete(),null===(r=s.onDrawEnd)||void 0===r||r.call(s,K({overlay:s,figureKey:u,figureIndex:c},e)))),t._figureMouseClickEvent(s,1,u,c,0)(e)}return n.setClickInstanceInfo({paneId:i,instance:null,figureType:0,figureKey:"",figureIndex:-1,attrsIndex:-1},e),!1}).registerEvent("mouseDoubleClickEvent",function(e){var a,r=n.getProgressInstanceInfo();if(null!==r){var o=r.instance,s=r.paneId;if(o.isDrawing()&&s===i&&(o.forceComplete(),!o.isDrawing())){n.progressInstanceComplete();var l=o.points.length-1,c="".concat(ee,"point_").concat(l);null===(a=o.onDrawEnd)||void 0===a||a.call(o,K({overlay:o,figureKey:c,figureIndex:l},e))}var u=o.points.length-1;return t._figureMouseClickEvent(o,1,"".concat(ee,"point_").concat(u),u,0)(e)}return!1}).registerEvent("mouseRightClickEvent",function(e){var i=n.getProgressInstanceInfo();if(null!==i){var a=i.instance;if(a.isDrawing()){var r=a.points.length-1;return t._figureMouseRightClickEvent(a,1,"".concat(ee,"point_").concat(r),r,0)(e)}}return!1}).registerEvent("mouseUpEvent",function(t){var e,a=n.getPressedInstanceInfo(),r=a.instance,o=a.figureIndex,s=a.figureKey;return null!==r&&(null===(e=r.onPressedMoveEnd)||void 0===e||e.call(r,K({overlay:r,figureKey:s,figureIndex:o},t))),n.setPressedInstanceInfo({paneId:i,instance:null,figureType:0,figureKey:"",figureIndex:-1,attrsIndex:-1}),!1}).registerEvent("pressedMouseMoveEvent",function(e){var i,a,r=n.getPressedInstanceInfo(),o=r.instance,s=r.figureType,l=r.figureIndex,c=r.figureKey;if(null!==o){if(!o.lock&&(null===(a=null===(i=o.onPressedMoving)||void 0===i?void 0:i.call(o,K({overlay:o,figureIndex:l,figureKey:c},e)))||void 0===a||!a)){var u=t._coordinateToPoint(o,e);1===s?o.eventPressedPointMove(u,l):o.eventPressedOtherMove(u,t.getWidget().getPane().getChart().getChartStore().getTimeScaleStore())}return!0}return!1})},e.prototype._createFigureEvents=function(t,e,i,n,a,r){var o;if(!t.isDrawing()){var s=[];if(At(r)&&(Pt(r)?r&&(s=Zt()):s=r),0===s.length)return{mouseMoveEvent:this._figureMouseMoveEvent(t,e,i,n,a),mouseDownEvent:this._figureMouseDownEvent(t,e,i,n,a),mouseClickEvent:this._figureMouseClickEvent(t,e,i,n,a),mouseRightClickEvent:this._figureMouseRightClickEvent(t,e,i,n,a),mouseDoubleClickEvent:this._figureMouseDoubleClickEvent(t,e,i,n,a)};o={},s.includes("mouseMoveEvent")||s.includes("touchMoveEvent")||(o.mouseMoveEvent=this._figureMouseMoveEvent(t,e,i,n,a)),s.includes("mouseDownEvent")||s.includes("touchStartEvent")||(o.mouseDownEvent=this._figureMouseDownEvent(t,e,i,n,a)),s.includes("mouseClickEvent")||s.includes("tapEvent")||(o.mouseClickEvent=this._figureMouseClickEvent(t,e,i,n,a)),s.includes("mouseDoubleClickEvent")||s.includes("doubleTapEvent")||(o.mouseDoubleClickEvent=this._figureMouseDoubleClickEvent(t,e,i,n,a)),s.includes("mouseRightClickEvent")||(o.mouseRightClickEvent=this._figureMouseRightClickEvent(t,e,i,n,a))}return o},e.prototype._figureMouseMoveEvent=function(t,e,i,n,a){var r=this;return function(o){var s=r.getWidget().getPane(),l=s.getChart().getChartStore().getOverlayStore();return l.setHoverInstanceInfo({paneId:s.getId(),instance:t,figureType:e,figureKey:i,figureIndex:n,attrsIndex:a},o),!0}},e.prototype._figureMouseDownEvent=function(t,e,i,n,a){var r=this;return function(o){var s,l=r.getWidget().getPane(),c=l.getId(),u=l.getChart().getChartStore().getOverlayStore();return t.startPressedMove(r._coordinateToPoint(t,o)),null===(s=t.onPressedMoveStart)||void 0===s||s.call(t,K({overlay:t,figureIndex:n,figureKey:i},o)),u.setPressedInstanceInfo({paneId:c,instance:t,figureType:e,figureKey:i,figureIndex:n,attrsIndex:a}),!0}},e.prototype._figureMouseClickEvent=function(t,e,i,n,a){var r=this;return function(o){var s=r.getWidget().getPane(),l=s.getId(),c=s.getChart().getChartStore().getOverlayStore();return c.setClickInstanceInfo({paneId:l,instance:t,figureType:e,figureKey:i,figureIndex:n,attrsIndex:a},o),!0}},e.prototype._figureMouseDoubleClickEvent=function(t,e,i,n,a){return function(e){var a;return null===(a=t.onDoubleClick)||void 0===a||a.call(t,K(K({},e),{figureIndex:n,figureKey:i,overlay:t})),!0}},e.prototype._figureMouseRightClickEvent=function(t,e,i,n,a){var r=this;return function(e){var a,o;if(null===(o=null===(a=t.onRightClick)||void 0===a?void 0:a.call(t,K({overlay:t,figureIndex:n,figureKey:i},e)))||void 0===o||!o){var s=r.getWidget().getPane(),l=s.getChart().getChartStore().getOverlayStore();l.removeInstance(t)}return!0}},e.prototype._coordinateToPoint=function(t,e){var i,n={},a=this.getWidget().getPane(),r=a.getChart(),o=a.getId(),s=r.getChartStore().getTimeScaleStore();if(this.coordinateToPointTimestampDataIndexFlag()){var l=r.getXAxisPane().getAxisComponent(),c=l.convertFromPixel(e.x),u=null!==(i=s.dataIndexToTimestamp(c))&&void 0!==i?i:void 0;n.dataIndex=c,n.timestamp=u}if(this.coordinateToPointValueFlag()){var d=a.getAxisComponent(),h=d.convertFromPixel(e.y);if(t.mode!==Ut.Normal&&o===Wi.CANDLE&&Et(n.dataIndex)){var p=s.getDataByDataIndex(n.dataIndex);if(null!==p){var v=t.modeSensitivity;if(h>p.high)if(t.mode===Ut.WeakMagnet){var f=d.convertToPixel(p.high),g=d.convertFromPixel(f-v);hg&&(h=p.low)}else h=p.low;else{var y=Math.max(p.open,p.close),_=Math.min(p.open,p.close);h=h>y?h-y0){var m=(new Array).concat(this.getFigures(e,g,i,n,a,s,l,r,c,u,d));this.drawFigures(t,e,m,c)}this.drawDefaultFigures(t,e,g,i,a,r,o,s,l,c,u,d,h,p)},e.prototype.drawFigures=function(t,e,i,n){var a=this;i.forEach(function(i,r){var o=i.type,s=i.styles,l=i.attrs,c=i.ignoreEvent,u=[].concat(l);u.forEach(function(l,u){var d,h,p,v=a._createFigureEvents(e,2,null!==(d=i.key)&&void 0!==d?d:"",r,u,c),f=K(K(K({},n[o]),null===(h=e.styles)||void 0===h?void 0:h[o]),s);null===(p=a.createFigure({name:o,attrs:l,styles:f},v))||void 0===p||p.draw(t)})})},e.prototype.getCompleteOverlays=function(t,e){return t.getInstances(e)},e.prototype.getProgressOverlay=function(t,e){return t.paneId===e?t.instance:null},e.prototype.getFigures=function(t,e,i,n,a,r,o,s,l,c,u){var d,h;return null!==(h=null===(d=t.createPointFigures)||void 0===d?void 0:d.call(t,{overlay:t,coordinates:e,bounding:i,barSpace:n,precision:a,thousandsSeparator:r,decimalFoldThreshold:o,dateTimeFormat:s,defaultStyles:l,xAxis:c,yAxis:u}))&&void 0!==h?h:[]},e.prototype.drawDefaultFigures=function(t,e,i,n,a,r,o,s,l,c,u,d,h,p){var v,f,g=this;if(e.needDefaultPointFigure&&((null===(v=h.instance)||void 0===v?void 0:v.id)===e.id&&0!==h.figureType||(null===(f=p.instance)||void 0===f?void 0:f.id)===e.id&&0!==p.figureType)){var m=e.styles,y=K(K({},c.point),null===m||void 0===m?void 0:m.point);i.forEach(function(i,n){var a,r,o,s=i.x,l=i.y,c=y.radius,u=y.color,d=y.borderColor,p=y.borderSize;(null===(a=h.instance)||void 0===a?void 0:a.id)===e.id&&1===h.figureType&&h.figureIndex===n&&(c=y.activeRadius,u=y.activeColor,d=y.activeBorderColor,p=y.activeBorderSize),null===(r=g.createFigure({name:"circle",attrs:{x:s,y:l,r:c+p},styles:{color:d}},g._createFigureEvents(e,1,"".concat(ee,"point_").concat(n),n,0)))||void 0===r||r.draw(t),null===(o=g.createFigure({name:"circle",attrs:{x:s,y:l,r:c},styles:{color:u}}))||void 0===o||o.draw(t)})}},e}(kn),Bn=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._gridView=new In(n),n._indicatorView=new Pn(n),n._crosshairLineView=new Mn(n),n._tooltipView=n.createTooltipView(),n._overlayView=new Tn(n),n.addChild(n._tooltipView),n.addChild(n._overlayView),n.getContainer().style.cursor="crosshair",n.registerEvent("mouseMoveEvent",function(){return i.getChart().getChartStore().getTooltipStore().setActiveIcon(),!1}),n}return L(e,t),e.prototype.getName=function(){return Gi.MAIN},e.prototype.updateMain=function(t){this.updateMainContent(t),this._indicatorView.draw(t),this._gridView.draw(t)},e.prototype.createTooltipView=function(){return new Dn(this)},e.prototype.updateMainContent=function(t){},e.prototype.updateOverlay=function(t){this._overlayView.draw(t),this._crosshairLineView.draw(t),this._tooltipView.draw(t)},e}(en),Fn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._ripplePoint=e.createFigure({name:"circle",attrs:{x:0,y:0,r:0},styles:{style:"fill"}}),e._animationFrameTime=0,e._animation=new le({iterationCount:1/0}).doFrame(function(t){e._animationFrameTime=t;var i=e.getWidget().getPane();i.getChart().updatePane(0,i.getId())}),e}return L(e,t),e.prototype.drawImp=function(t){var e,i,n,a=this.getWidget(),r=a.getPane(),o=r.getChart(),s=o.getDataList(),l=s.length-1,c=a.getBounding(),u=r.getAxisComponent(),d=o.getStyles().candle.area,h=[],p=Number.MAX_SAFE_INTEGER,v=Number.MIN_SAFE_INTEGER,f=null;if(this.eachChildren(function(t){var e=t.data,i=t.x,n=null===e||void 0===e?void 0:e[d.value];if(Et(n)){var a=u.convertToPixel(n);v===Number.MIN_SAFE_INTEGER&&(v=i),h.push({x:i,y:a}),p=Math.min(p,a),t.dataIndex===l&&(f={x:i,y:a})}}),h.length>0){null===(e=this.createFigure({name:"line",attrs:{coordinates:h},styles:{color:d.lineColor,size:d.lineSize,smooth:d.smooth}}))||void 0===e||e.draw(t);var g=d.backgroundColor,m=void 0;if(Ct(g)){var y=t.createLinearGradient(0,c.height,0,p);try{g.forEach(function(t){var e=t.offset,i=t.color;y.addColorStop(e,i)})}catch(x){}m=y}else m=g;t.fillStyle=m,t.beginPath(),t.moveTo(v,c.height),t.lineTo(h[0].x,h[0].y),_i(t,h,d.smooth),t.lineTo(h[h.length-1].x,c.height),t.closePath(),t.fill()}var _=d.point;if(_.show&&At(f)){null===(i=this.createFigure({name:"circle",attrs:{x:f.x,y:f.y,r:_.radius},styles:{style:"fill",color:_.color}}))||void 0===i||i.draw(t);var b=_.rippleRadius;_.animation&&(b=_.radius+this._animationFrameTime/_.animationDuration*(_.rippleRadius-_.radius),this._animation.setDuration(_.animationDuration).start()),null===(n=this._ripplePoint)||void 0===n||n.setAttrs({x:f.x,y:f.y,r:b}).setStyles({style:"fill",color:_.rippleColor}).draw(t)}else this.stopAnimation()},e.prototype.stopAnimation=function(){this._animation.stop()},e}(En),Rn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.drawImp=function(t){var e=this.getWidget(),i=e.getPane(),n=i.getChart().getChartStore(),a=n.getStyles().candle.priceMark,r=a.high,o=a.low;if(a.show&&(r.show||o.show)){var s=n.getThousandsSeparator(),l=n.getDecimalFoldThreshold(),c=n.getPrecision(),u=i.getAxisComponent(),d=Number.MIN_SAFE_INTEGER,h=0,p=Number.MAX_SAFE_INTEGER,v=0;this.eachChildren(function(t){var e=t.data,i=t.x;At(e)&&(de.low&&(p=e.low,v=i))});var f=u.convertToPixel(d),g=u.convertToPixel(p);r.show&&d!==Number.MIN_SAFE_INTEGER&&this._drawMark(t,Vt(zt(Nt(d,c.price),s),l),{x:h,y:f},fp/2?(l=d-5,c=l-a.textOffset,u="right"):(l=d+5,u="left",c=l+a.textOffset);var v=h+n[1];null===(o=this.createFigure({name:"line",attrs:{coordinates:[{x:d,y:h},{x:d,y:v},{x:l,y:v}]},styles:{color:a.color}}))||void 0===o||o.draw(t),null===(s=this.createFigure({name:"text",attrs:{x:c,y:v,text:e,align:u,baseline:"middle"},styles:{color:a.color,size:a.textSize,family:a.textFamily,weight:a.textWeight}}))||void 0===s||s.draw(t)},e}(En),Ln=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.drawImp=function(t){var e,i=this.getWidget(),n=i.getPane(),a=i.getBounding(),r=n.getChart().getChartStore(),o=r.getStyles().candle.priceMark,s=o.last,l=s.line;if(o.show&&s.show&&l.show){var c=n.getAxisComponent(),u=r.getDataList(),d=u[u.length-1];if(null!=d){var h=d.close,p=d.open,v=c.convertToNicePixel(h),f=void 0;f=h>p?s.upColor:h0&&(b=this.drawStandardTooltipLegends(t,S,x,d,b,p,_)),b=this.drawStandardTooltipIcons(t,a,E,x,i,"",d,b,p)}return x.y+b},e.prototype._drawRectTooltip=function(t,e,i,n,a,r,o,s,l,c,u,d,h,p,v,f){var g,m,y,_,b,x=this,w=f.candle,S=f.indicator,C=w.tooltip,k=S.tooltip;if(h||p){var I=null!==(g=r.dataIndex)&&void 0!==g?g:0,E=this._getCandleTooltipLegends({prev:null!==(m=e[I-1])&&void 0!==m?m:null,current:r.kLineData,next:null!==(y=e[I+1])&&void 0!==y?y:null},o,s,l,c,u,d,w),A=C.offsetLeft,P=C.offsetTop,M=C.offsetRight,D=C.offsetBottom,T=C.text,B=T.marginLeft,F=T.marginRight,R=T.marginTop,L=T.marginBottom,N=T.size,z=T.weight,V=T.family,W=C.rect,$=W.position,X=W.paddingLeft,K=W.paddingRight,j=W.paddingTop,U=W.paddingBottom,G=W.offsetLeft,Z=W.offsetRight,q=W.offsetTop,J=W.offsetBottom,Q=W.borderSize,tt=W.borderRadius,et=W.borderColor,it=W.color,nt=0,at=0,rt=0;h&&(t.font=Ht(N,z,V),E.forEach(function(e){var i=e.title,n=e.value,a="".concat(i.text).concat(n.text),r=t.measureText(a).width+B+F;nt=Math.max(nt,r)}),rt+=(L+R+N)*E.length);var ot=k.text,st=ot.marginLeft,lt=ot.marginRight,ct=ot.marginTop,ut=ot.marginBottom,dt=ot.size,ht=ot.weight,pt=ot.family,vt=[];if(p&&(t.font=Ht(dt,ht,pt),i.forEach(function(i){var n,a=null!==(n=x.getIndicatorTooltipData(e,r,i,c,u,d,S).values)&&void 0!==n?n:[];vt.push(a),a.forEach(function(e){var i=e.title,n=e.value,a="".concat(i.text).concat(n.text),r=t.measureText(a).width+st+lt;nt=Math.max(nt,r),rt+=ct+ut+dt})})),at+=nt,0!==at&&0!==rt){at+=2*Q+X+K,rt+=2*Q+j+U;var ft=n.width/2,gt=$===H.Pointer&&r.paneId===Wi.CANDLE,mt=(null!==(_=r.realX)&&void 0!==_?_:0)>ft,yt=0;if(gt){var _t=r.realX;yt=mt?_t-Z-at:_t+G}else mt?(yt=G+A,f.yAxis.inside&&f.yAxis.position===Y.Left&&(yt+=a.width)):(yt=n.width-Z-at-M,f.yAxis.inside&&f.yAxis.position===Y.Right&&(yt-=a.width));var bt=v+q;if(gt){var xt=r.y;bt=xt-rt/2,bt+rt>n.height-J-D&&(bt=n.height-J-rt-D),bt1){var c="{".concat(l[1],"}");o.text=o.text.replace(c,null!==(e=b[c])&&void 0!==e?e:p.defaultValue),"{change}"===c&&(o.color=0===m?s.priceMark.last.noChangeColor:m>0?s.priceMark.last.upColor:s.priceMark.last.downColor)}return{title:r,value:o}})},e}(Dn),Hn=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._candleBarView=new An(n),n._candleAreaView=new Fn(n),n._candleHighLowPriceView=new Rn(n),n._candleLastPriceLineView=new Ln(n),n.addChild(n._candleBarView),n}return L(e,t),e.prototype.updateMainContent=function(t){var e=this.getPane().getChart().getStyles().candle;e.type!==$.Area?(this._candleBarView.draw(t),this._candleHighLowPriceView.draw(t),this._candleAreaView.stopAnimation()):this._candleAreaView.draw(t),this._candleLastPriceLineView.draw(t)},e.prototype.createTooltipView=function(){return new Wn(this)},e}(Bn),$n=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.drawImp=function(t){var e,i,n=this,a=this.getWidget(),r=a.getPane(),o=a.getBounding(),s=r.getAxisComponent(),l=this.getAxisStyles(r.getChart().getStyles());if(l.show){l.axisLine.show&&(null===(e=this.createFigure({name:"line",attrs:this.createAxisLine(o,l),styles:l.axisLine}))||void 0===e||e.draw(t));var c=s.getTicks();if(l.tickLine.show){var u=this.createTickLines(c,o,l);u.forEach(function(e){var i;null===(i=n.createFigure({name:"line",attrs:e,styles:l.tickLine}))||void 0===i||i.draw(t)})}if(l.tickText.show){var d=this.createTickTexts(c,o,l);null===(i=this.createFigure({name:"text",attrs:d,styles:l.tickText}))||void 0===i||i.draw(t)}}},e}(kn),Yn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.getAxisStyles=function(t){return t.yAxis},e.prototype.createAxisLine=function(t,e){var i,n=this.getWidget().getPane().getAxisComponent(),a=e.axisLine.size;return i=n.isFromZero()?0:t.width-a,{coordinates:[{x:i,y:0},{x:i,y:t.height}]}},e.prototype.createTickLines=function(t,e,i){var n=this.getWidget().getPane().getAxisComponent(),a=i.axisLine,r=i.tickLine,o=0,s=0;return n.isFromZero()?(o=0,a.show&&(o+=a.size),s=o+r.length):(o=e.width,a.show&&(o-=a.size),s=o-r.length),t.map(function(t){return{coordinates:[{x:o,y:t.coord},{x:s,y:t.coord}]}})},e.prototype.createTickTexts=function(t,e,i){var n=this.getWidget().getPane().getAxisComponent(),a=i.axisLine,r=i.tickLine,o=i.tickText,s=0;n.isFromZero()?(s=o.marginStart,a.show&&(s+=a.size),r.show&&(s+=r.length)):(s=e.width-o.marginEnd,a.show&&(s-=a.size),r.show&&(s-=r.length));var l=this.getWidget().getPane().getAxisComponent().isFromZero()?"left":"right";return t.map(function(t){return{x:s,y:t.coord,text:t.text,align:l,baseline:"middle"}})},e}($n),Xn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.drawImp=function(t){var e,i=this.getWidget(),n=i.getPane(),a=i.getBounding(),r=n.getChart().getChartStore(),o=r.getStyles().candle.priceMark,s=o.last,l=s.text;if(o.show&&s.show&&l.show){var c=r.getPrecision(),u=n.getAxisComponent(),d=r.getDataList(),h=d[d.length-1];if(At(h)){var p=h.close,v=h.open,f=u.convertToNicePixel(p),g=void 0;g=p>v?s.upColor:p1&&p.unshift({type:"rect",attrs:{x:0,y:g,width:i.width,height:m-g},ignoreEvent:!0})}return p},e.prototype.getFigures=function(t,e,i,n,a,r,o,s,l,c,u){var d,h;return null!==(h=null===(d=t.createYAxisFigures)||void 0===d?void 0:d.call(t,{overlay:t,coordinates:e,bounding:i,barSpace:n,precision:a,thousandsSeparator:r,decimalFoldThreshold:o,dateTimeFormat:s,defaultStyles:l,xAxis:c,yAxis:u}))&&void 0!==h?h:[]},e}(Tn),Un=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.drawImp=function(t){var e,i=this.getWidget(),n=i.getPane(),a=i.getBounding(),r=i.getPane().getChart().getChartStore(),o=r.getTooltipStore().getCrosshair(),s=r.getStyles().crosshair;if(Mt(o.paneId)&&this.compare(o,n.getId())&&s.show){var l=this.getDirectionStyles(s),c=l.text;if(l.show&&c.show){var u=n.getAxisComponent(),d=this.getText(o,r,u);t.font=Ht(c.size,c.weight,c.family),null===(e=this.createFigure({name:"text",attrs:this.getTextAttrs(d,t.measureText(d).width,o,a,u,c),styles:c}))||void 0===e||e.draw(t)}}},e.prototype.compare=function(t,e){return t.paneId===e},e.prototype.getDirectionStyles=function(t){return t.horizontal},e.prototype.getText=function(t,e,i){var n,a=i,r=i.convertFromPixel(t.y);if(a.getType()===X.Percentage){var o=e.getVisibleFirstData();n="".concat(((r-o.close)/o.close*100).toFixed(2),"%")}else{var s=e.getIndicatorStore().getInstances(t.paneId),l=0,c=!1;a.isInCandle()?l=e.getPrecision().price:s.forEach(function(t){l=Math.max(t.precision,l),c||(c=t.shouldFormatBigNumber)}),n=Nt(r,l),c&&(n=e.getCustomApi().formatBigNumber(n))}return Vt(zt(n,e.getThousandsSeparator()),e.getDecimalFoldThreshold())},e.prototype.getTextAttrs=function(t,e,i,n,a,r){var o,s,l=a;return l.isFromZero()?(o=0,s="left"):(o=n.width,s="right"),{x:o,y:i.y,text:t,align:s,baseline:"middle"}},e}(kn),Gn=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._yAxisView=new Yn(n),n._candleLastPriceLabelView=new Xn(n),n._indicatorLastValueView=new Kn(n),n._overlayYAxisView=new jn(n),n._crosshairHorizontalLabelView=new Un(n),n.getContainer().style.cursor="ns-resize",n.addChild(n._overlayYAxisView),n}return L(e,t),e.prototype.getName=function(){return Gi.Y_AXIS},e.prototype.updateMain=function(t){this._yAxisView.draw(t),this.getPane().getAxisComponent().isInCandle()&&this._candleLastPriceLabelView.draw(t),this._indicatorLastValueView.draw(t)},e.prototype.updateOverlay=function(t){this._overlayYAxisView.draw(t),this._crosshairHorizontalLabelView.draw(t)},e}(en),Zn=function(){function t(t){this._range={from:0,to:0,range:0,realFrom:0,realTo:0,realRange:0},this._prevRange={from:0,to:0,range:0,realFrom:0,realTo:0,realRange:0},this._ticks=[],this._autoCalcTickFlag=!0,this._parent=t}return t.prototype.getParent=function(){return this._parent},t.prototype.buildTicks=function(t){if(this._autoCalcTickFlag&&(this._range=this.calcRange()),this._prevRange.from!==this._range.from||this._prevRange.to!==this._range.to||t){this._prevRange=this._range;var e=this.optimalTicks(this._calcTicks());return this._ticks=this.createTicks({range:this._range,bounding:this.getSelfBounding(),defaultTicks:e}),!0}return!1},t.prototype.getTicks=function(){return this._ticks},t.prototype.getScrollZoomEnabled=function(){var t;return null===(t=this.getParent().getOptions().axisOptions.scrollZoomEnabled)||void 0===t||t},t.prototype.setRange=function(t){this._autoCalcTickFlag=!1,this._range=t},t.prototype.getRange=function(){return this._range},t.prototype.setAutoCalcTickFlag=function(t){this._autoCalcTickFlag=t},t.prototype.getAutoCalcTickFlag=function(){return this._autoCalcTickFlag},t.prototype._calcTicks=function(){var t=this._range,e=t.realFrom,i=t.realTo,n=t.realRange,a=[];if(n>=0){var r=Z(this._calcTickInterval(n),2),o=r[0],s=r[1],l=fe(Math.ceil(e/o)*o,s),c=fe(Math.floor(i/o)*o,s),u=0,d=l;if(0!==o)while(d<=c){var h=d.toFixed(s);a[u]={text:h,coord:0,value:h},++u,d+=o}}return a},t.prototype._calcTickInterval=function(t){var e=ve(t/8),i=ge(e);return[e,i]},t}(),qn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.calcRange=function(){var t,e,i,n,a=this.getParent(),r=a.getChart(),o=r.getChartStore(),s=Number.MAX_SAFE_INTEGER,l=Number.MIN_SAFE_INTEGER,c=[],u=!1,d=Number.MAX_SAFE_INTEGER,h=Number.MIN_SAFE_INTEGER,p=Number.MAX_SAFE_INTEGER,v=o.getIndicatorStore().getInstances(a.getId());v.forEach(function(t){var e,i,n;u||(u=null!==(e=t.shouldOhlc)&&void 0!==e&&e),p=Math.min(p,t.precision),Et(t.minValue)&&(d=Math.min(d,t.minValue)),Et(t.maxValue)&&(h=Math.max(h,t.maxValue)),c.push({figures:null!==(i=t.figures)&&void 0!==i?i:[],result:null!==(n=t.result)&&void 0!==n?n:[]})});var f=4,g=this.isInCandle();if(g){var m=o.getPrecision().price;f=p!==Number.MAX_SAFE_INTEGER?Math.min(p,m):m}else p!==Number.MAX_SAFE_INTEGER&&(f=p);var y=o.getVisibleDataList(),_=r.getStyles().candle,b=_.type===$.Area,x=_.area.value,w=g&&!b||!g&&u;y.forEach(function(t){var e=t.dataIndex,i=t.data;if(At(i)&&(w&&(s=Math.min(s,i.low),l=Math.max(l,i.high)),g&&b)){var n=i[x];Et(n)&&(s=Math.min(s,n),l=Math.max(l,n))}c.forEach(function(t){var i,n=t.figures,a=t.result,r=null!==(i=a[e])&&void 0!==i?i:{};n.forEach(function(t){var e=r[t.key];Et(e)&&(s=Math.min(s,e),l=Math.max(l,e))})})}),s!==Number.MAX_SAFE_INTEGER&&l!==Number.MIN_SAFE_INTEGER?(s=Math.min(d,s),l=Math.max(h,l)):(s=0,l=10);var S,C=this.getType();switch(C){case X.Percentage:var k=o.getVisibleFirstData();At(k)&&Et(k.close)&&(s=(s-k.close)/k.close*100,l=(l-k.close)/k.close*100),S=Math.pow(10,-2);break;case X.Log:s=ye(s),l=ye(l),S=.05*_e(-f);break;default:S=_e(-f)}if(s===l||Math.abs(s-l)=1&&(M/=A);var D=null!==(n=null===P||void 0===P?void 0:P.bottom)&&void 0!==n?n:.1;D>=1&&(D/=A);var T,B,F,R=Math.abs(l-s);return s-=R*D,l+=R*M,R=Math.abs(l-s),C===X.Log?(T=_e(s),B=_e(l),F=Math.abs(B-T)):(T=s,B=l,F=R),{from:s,to:l,range:R,realFrom:T,realTo:B,realRange:F}},e.prototype._innerConvertToPixel=function(t){var e,i,n=null!==(i=null===(e=this.getParent().getYAxisWidget())||void 0===e?void 0:e.getBounding().height)&&void 0!==i?i:0,a=this.getRange(),r=a.from,o=a.range,s=(t-r)/o;return this.isReverse()?Math.round(s*n):Math.round((1-s)*n)},e.prototype.isInCandle=function(){return this.getParent().getId()===Wi.CANDLE},e.prototype.getType=function(){return this.isInCandle()?this.getParent().getChart().getStyles().yAxis.type:X.Normal},e.prototype.getPosition=function(){return this.getParent().getChart().getStyles().yAxis.position},e.prototype.isReverse=function(){return!!this.isInCandle()&&this.getParent().getChart().getStyles().yAxis.reverse},e.prototype.isFromZero=function(){var t=this.getParent().getChart().getStyles().yAxis,e=t.inside;return t.position===Y.Left&&e||t.position===Y.Right&&!e},e.prototype.optimalTicks=function(t){var e,i,n=this,a=this.getParent(),r=null!==(i=null===(e=a.getYAxisWidget())||void 0===e?void 0:e.getBounding().height)&&void 0!==i?i:0,o=a.getChart().getChartStore(),s=o.getCustomApi(),l=[],c=this.getType(),u=o.getIndicatorStore().getInstances(a.getId()),d=o.getThousandsSeparator(),h=o.getDecimalFoldThreshold(),p=0,v=!1;this.isInCandle()?p=o.getPrecision().price:u.forEach(function(t){p=Math.max(p,t.precision),v||(v=t.shouldFormatBigNumber)});var f,g=o.getStyles().xAxis.tickText.size;return t.forEach(function(t){var e,i=t.value,a=n._innerConvertToPixel(+i);switch(c){case X.Percentage:e="".concat(Nt(i,2),"%");break;case X.Log:a=n._innerConvertToPixel(ye(+i)),e=Nt(i,p);break;default:e=Nt(i,p),v&&(e=s.formatBigNumber(i));break}e=Vt(zt(e,d),h);var o=Et(f);a>g&&a2*g||!o)&&(l.push({text:e,coord:a,value:i}),f=a)}),l},e.prototype.getAutoSize=function(){var t=this.getParent(),e=t.getChart(),i=e.getStyles(),n=i.yAxis,a=n.size;if("auto"!==a)return a;var r=e.getChartStore(),o=r.getCustomApi(),s=0;if(n.show&&(n.axisLine.show&&(s+=n.axisLine.size),n.tickLine.show&&(s+=n.tickLine.length),n.tickText.show)){var l=0;this.getTicks().forEach(function(t){l=Math.max(l,$t(t.text,n.tickText.size,n.tickText.weight,n.tickText.family))}),s+=n.tickText.marginStart+n.tickText.marginEnd+l}var c=i.crosshair,u=0;if(c.show&&c.horizontal.show&&c.horizontal.text.show){var d=r.getIndicatorStore().getInstances(t.getId()),h=0,p=!1;d.forEach(function(t){h=Math.max(t.precision,h),p||(p=t.shouldFormatBigNumber)});var v=2;if(this.getType()!==X.Percentage)if(this.isInCandle()){var f=r.getPrecision().price,g=i.indicator.lastValueMark;v=g.show&&g.text.show?Math.max(h,f):f}else v=h;var m=Nt(this.getRange().to,v);p&&(m=o.formatBigNumber(m)),m=Vt(m,r.getDecimalFoldThreshold()),u+=c.horizontal.text.paddingLeft+c.horizontal.text.paddingRight+2*c.horizontal.text.borderSize+$t(m,c.horizontal.text.size,c.horizontal.text.weight,c.horizontal.text.family)}return Math.max(s,u)},e.prototype.getSelfBounding=function(){return this.getParent().getYAxisWidget().getBounding()},e.prototype.convertFromPixel=function(t){var e,i,n=null!==(i=null===(e=this.getParent().getYAxisWidget())||void 0===e?void 0:e.getBounding().height)&&void 0!==i?i:0,a=this.getRange(),r=a.from,o=a.range,s=this.isReverse()?t/n:1-t/n,l=s*o+r;switch(this.getType()){case X.Percentage:var c=this.getParent().getChart().getChartStore().getVisibleFirstData();return At(c)&&Et(c.close)?c.close*l/100+c.close:0;case X.Log:return _e(l);default:return l}},e.prototype.convertToRealValue=function(t){var e=t;return this.getType()===X.Log&&(e=_e(t)),e},e.prototype.convertToPixel=function(t){var e=t;switch(this.getType()){case X.Percentage:var i=this.getParent().getChart().getChartStore().getVisibleFirstData();At(i)&&Et(i.close)&&(e=(t-i.close)/i.close*100);break;case X.Log:e=ye(t);break;default:e=t}return this._innerConvertToPixel(e)},e.prototype.convertToNicePixel=function(t){var e,i,n=null!==(i=null===(e=this.getParent().getYAxisWidget())||void 0===e?void 0:e.getBounding().height)&&void 0!==i?i:0,a=this.convertToPixel(t);return Math.round(Math.max(.05*n,Math.min(a,.98*n)))},e.extend=function(t){var i=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return L(i,e),i.prototype.createTicks=function(e){return t.createTicks(e)},i}(e);return i},e}(Zn),Jn={name:"default",createTicks:function(t){var e=t.defaultTicks;return e}},Qn={default:qn.extend(Jn)};function ta(t){var e;return null!==(e=Qn[t])&&void 0!==e?e:Qn.default}var ea=function(){function t(t,e,i,n){this._bounding=Qi(),this._chart=i,this._id=n,this._init(t,e)}return t.prototype._init=function(t,e){this._rootContainer=t,this._container=he("div",{width:"100%",margin:"0",padding:"0",position:"relative",overflow:"hidden",boxSizing:"border-box"}),null!==e?t.insertBefore(this._container,e):t.appendChild(this._container)},t.prototype.getContainer=function(){return this._container},t.prototype.getId=function(){return this._id},t.prototype.getChart=function(){return this._chart},t.prototype.getBounding=function(){return this._bounding},t.prototype.update=function(t){this._bounding.height!==this._container.clientHeight&&(this._container.style.height="".concat(this._bounding.height,"px")),this.updateImp(null!==t&&void 0!==t?t:3,this._container,this._bounding)},t.prototype.destroy=function(){this._rootContainer.removeChild(this._container)},t}(),ia=function(t){function e(e,i,n,a,r){var o=t.call(this,e,i,n,a)||this;o._yAxisWidget=null,o._options={minHeight:zi,dragEnabled:!0,gap:{top:.2,bottom:.1},axisOptions:{name:"default",scrollZoomEnabled:!0}};var s=o.getContainer();return o._mainWidget=o.createMainWidget(s),o._yAxisWidget=o.createYAxisWidget(s),o.setOptions(r),o}return L(e,t),e.prototype.setOptions=function(t){var e,i,n,a,r,o=null===(e=t.axisOptions)||void 0===e?void 0:e.name;return(this._options.axisOptions.name!==o&&Mt(o)||!At(this._axis))&&(this._axis=this.createAxisComponent(null!==o&&void 0!==o?o:"default")),wt(this._options,t),this.getId()===Wi.X_AXIS?(a=this.getMainWidget().getContainer(),r="ew-resize"):(a=this.getYAxisWidget().getContainer(),r="ns-resize"),null===(n=null===(i=t.axisOptions)||void 0===i?void 0:i.scrollZoomEnabled)||void 0===n||n?a.style.cursor=r:a.style.cursor="default",this},e.prototype.getOptions=function(){return this._options},e.prototype.getAxisComponent=function(){return this._axis},e.prototype.setBounding=function(t,e,i){var n,a;wt(this.getBounding(),t);var r={};return At(t.height)&&(r.height=t.height),At(t.top)&&(r.top=t.top),this._mainWidget.setBounding(r),null===(n=this._yAxisWidget)||void 0===n||n.setBounding(r),At(e)&&this._mainWidget.setBounding(e),At(i)&&(null===(a=this._yAxisWidget)||void 0===a||a.setBounding(i)),this},e.prototype.getMainWidget=function(){return this._mainWidget},e.prototype.getYAxisWidget=function(){return this._yAxisWidget},e.prototype.updateImp=function(t){var e;this._mainWidget.update(t),null===(e=this._yAxisWidget)||void 0===e||e.update(t)},e.prototype.destroy=function(){var e;t.prototype.destroy.call(this),this._mainWidget.destroy(),null===(e=this._yAxisWidget)||void 0===e||e.destroy()},e.prototype.getImage=function(t){var e=this.getBounding(),i=e.width,n=e.height,a=he("canvas",{width:"".concat(i,"px"),height:"".concat(n,"px"),boxSizing:"border-box"}),r=a.getContext("2d"),o=Wt(a);a.width=i*o,a.height=n*o,r.scale(o,o);var s=this._mainWidget.getBounding();if(r.drawImage(this._mainWidget.getImage(t),s.left,0,s.width,s.height),null!==this._yAxisWidget){var l=this._yAxisWidget.getBounding();r.drawImage(this._yAxisWidget.getImage(t),l.left,0,l.width,l.height)}return a},e.prototype.createYAxisWidget=function(t){return null},e}(ea),na=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.createAxisComponent=function(t){var e=ta(null!==t&&void 0!==t?t:"default");return new e(this)},e.prototype.createMainWidget=function(t){return new Bn(t,this)},e.prototype.createYAxisWidget=function(t){return new Gn(t,this)},e}(ia),aa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.createMainWidget=function(t){return new Hn(t,this)},e}(na),ra=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.getAxisStyles=function(t){return t.xAxis},e.prototype.createAxisLine=function(t){return{coordinates:[{x:0,y:0},{x:t.width,y:0}]}},e.prototype.createTickLines=function(t,e,i){var n=i.tickLine,a=i.axisLine.size;return t.map(function(t){return{coordinates:[{x:t.coord,y:0},{x:t.coord,y:a+n.length}]}})},e.prototype.createTickTexts=function(t,e,i){var n=i.tickText,a=i.axisLine.size,r=i.tickLine.length;return t.map(function(t){return{x:t.coord,y:a+r+n.marginStart,text:t.text,align:"center",baseline:"top"}})},e}($n),oa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.coordinateToPointTimestampDataIndexFlag=function(){return!0},e.prototype.coordinateToPointValueFlag=function(){return!1},e.prototype.getCompleteOverlays=function(t){return t.getInstances()},e.prototype.getProgressOverlay=function(t){return t.instance},e.prototype.getDefaultFigures=function(t,e,i,n,a,r,o,s,l,c,u){var d,h=[];if(t.needDefaultXAxisFigure&&t.id===(null===(d=u.instance)||void 0===d?void 0:d.id)){var p=Number.MAX_SAFE_INTEGER,v=Number.MIN_SAFE_INTEGER;e.forEach(function(e,i){p=Math.min(p,e.x),v=Math.max(v,e.x);var n=t.points[i];if(Et(n.timestamp)){var o=r.formatDate(a,n.timestamp,"YYYY-MM-DD HH:mm",qt.Crosshair);h.push({type:"text",attrs:{x:e.x,y:0,text:o,align:"center"},ignoreEvent:!0})}}),e.length>1&&h.unshift({type:"rect",attrs:{x:p,y:0,width:v-p,height:i.height},ignoreEvent:!0})}return h},e.prototype.getFigures=function(t,e,i,n,a,r,o,s,l,c,u){var d,h;return null!==(h=null===(d=t.createXAxisFigures)||void 0===d?void 0:d.call(t,{overlay:t,coordinates:e,bounding:i,barSpace:n,precision:a,thousandsSeparator:r,decimalFoldThreshold:o,dateTimeFormat:s,defaultStyles:l,xAxis:c,yAxis:u}))&&void 0!==h?h:[]},e}(jn),sa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.compare=function(t){return At(t.kLineData)&&t.dataIndex===t.realDataIndex},e.prototype.getDirectionStyles=function(t){return t.vertical},e.prototype.getText=function(t,e){var i,n=null===(i=t.kLineData)||void 0===i?void 0:i.timestamp;return e.getCustomApi().formatDate(e.getTimeScaleStore().getDateTimeFormat(),n,"YYYY-MM-DD HH:mm",qt.Crosshair)},e.prototype.getTextAttrs=function(t,e,i,n,a,r){var o,s=i.realX,l="center";return s-e/2-r.paddingLeft<0?(o=0,l="left"):s+e/2+r.paddingRight>n.width?(o=n.width,l="right"):o=s,{x:o,y:0,text:t,align:l,baseline:"top"}},e}(Un),la=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._xAxisView=new ra(n),n._overlayXAxisView=new oa(n),n._crosshairVerticalLabelView=new sa(n),n.getContainer().style.cursor="ew-resize",n.addChild(n._overlayXAxisView),n}return L(e,t),e.prototype.getName=function(){return Gi.X_AXIS},e.prototype.updateMain=function(t){this._xAxisView.draw(t)},e.prototype.updateOverlay=function(t){this._overlayXAxisView.draw(t),this._crosshairVerticalLabelView.draw(t)},e}(en),ca=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.calcRange=function(){var t=this.getParent().getChart().getChartStore(),e=t.getTimeScaleStore().getVisibleRange(),i=e.from,n=e.to,a=i,r=n-1,o=n-i;return{from:a,to:r,range:o,realFrom:a,realTo:r,realRange:o}},e.prototype.optimalTicks=function(t){var e,i,n=this.getParent().getChart(),a=n.getChartStore(),r=a.getCustomApi().formatDate,o=[],s=t.length,l=a.getDataList();if(s>0){var c=a.getTimeScaleStore().getDateTimeFormat(),u=n.getStyles().xAxis.tickText,d=$t("00-00 00:00",u.size,u.weight,u.family),h=parseInt(t[0].value,10),p=this.convertToPixel(h),v=1;if(s>1){var f=parseInt(t[1].value,10),g=this.convertToPixel(f),m=Math.abs(g-p);me&&(t.apply(this,arguments),i=n)}}var fa=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._dragFlag=!1,n._dragStartY=0,n._topPaneHeight=0,n._bottomPaneHeight=0,n._pressedMouseMoveEvent=va(n._pressedTouchMouseMoveEvent,20),n.registerEvent("touchStartEvent",n._mouseDownEvent.bind(n)).registerEvent("touchMoveEvent",n._pressedMouseMoveEvent.bind(n)).registerEvent("touchEndEvent",n._mouseUpEvent.bind(n)).registerEvent("mouseDownEvent",n._mouseDownEvent.bind(n)).registerEvent("mouseUpEvent",n._mouseUpEvent.bind(n)).registerEvent("pressedMouseMoveEvent",n._pressedMouseMoveEvent.bind(n)).registerEvent("mouseEnterEvent",n._mouseEnterEvent.bind(n)).registerEvent("mouseLeaveEvent",n._mouseLeaveEvent.bind(n)),n}return L(e,t),e.prototype.getName=function(){return Gi.SEPARATOR},e.prototype.checkEventOn=function(){return!0},e.prototype._mouseDownEvent=function(t){this._dragFlag=!0,this._dragStartY=t.pageY;var e=this.getPane();return this._topPaneHeight=e.getTopPane().getBounding().height,this._bottomPaneHeight=e.getBottomPane().getBounding().height,!0},e.prototype._mouseUpEvent=function(){return this._dragFlag=!1,this._mouseLeaveEvent()},e.prototype._pressedTouchMouseMoveEvent=function(t){var e=t.pageY-this._dragStartY,i=this.getPane(),n=i.getTopPane(),a=i.getBottomPane(),r=e<0;if(null!==n&&(null===a||void 0===a?void 0:a.getOptions().dragEnabled)){var o=void 0,s=void 0,l=void 0,c=void 0;r?(o=n,s=a,l=this._topPaneHeight,c=this._bottomPaneHeight):(o=a,s=n,l=this._bottomPaneHeight,c=this._topPaneHeight);var u=o.getOptions().minHeight;if(l>u){var d=Math.max(l-Math.abs(e),u),h=l-d;o.setBounding({height:d}),s.setBounding({height:c+h});var p=i.getChart();p.getChartStore().getActionStore().execute(Tt.OnPaneDrag,{paneId:i.getId()}),p.adjustPaneViewport(!0,!0,!0,!0,!0)}}return!0},e.prototype._mouseEnterEvent=function(){var t,e=this.getPane(),i=e.getBottomPane();if(null!==(t=null===i||void 0===i?void 0:i.getOptions().dragEnabled)&&void 0!==t&&t){var n=e.getChart(),a=n.getStyles().separator;return this.getContainer().style.background=a.activeBackgroundColor,!0}return!1},e.prototype._mouseLeaveEvent=function(){return!this._dragFlag&&(this.getContainer().style.background="",!0)},e.prototype.createContainer=function(){return he("div",{width:"100%",height:"".concat(Zi,"px"),margin:"0",padding:"0",position:"absolute",top:"-3px",zIndex:"20",boxSizing:"border-box",cursor:"ns-resize"})},e.prototype.updateImp=function(t,e,i){if(4===i||2===i){var n=this.getPane().getChart().getStyles().separator;t.style.top="".concat(-Math.floor((Zi-n.size)/2),"px"),t.style.height="".concat(Zi,"px")}},e}(tn),ga=function(t){function e(e,i,n,a,r,o){var s=t.call(this,e,i,n,a)||this;return s.getContainer().style.overflow="",s._topPane=r,s._bottomPane=o,s._separatorWidget=new fa(s.getContainer(),s),s}return L(e,t),e.prototype.setBounding=function(t){return wt(this.getBounding(),t),this},e.prototype.getTopPane=function(){return this._topPane},e.prototype.setTopPane=function(t){return this._topPane=t,this},e.prototype.getBottomPane=function(){return this._bottomPane},e.prototype.setBottomPane=function(t){return this._bottomPane=t,this},e.prototype.getWidget=function(){return this._separatorWidget},e.prototype.getImage=function(t){var e=this.getBounding(),i=e.width,n=e.height,a=this.getChart().getStyles().separator,r=he("canvas",{width:"".concat(i,"px"),height:"".concat(n,"px"),boxSizing:"border-box"}),o=r.getContext("2d"),s=Wt(r);return r.width=i*s,r.height=n*s,o.scale(s,s),o.fillStyle=a.color,o.fillRect(0,0,i,n),r},e.prototype.updateImp=function(t,e,i){if(4===t||2===t){var n=this.getChart().getStyles().separator;e.style.backgroundColor=n.color,e.style.height="".concat(i.height,"px"),e.style.marginLeft="".concat(i.left,"px"),e.style.width="".concat(i.width,"px"),this._separatorWidget.update(t)}},e}(ea);function ma(){var t;return"undefined"!==typeof window&&(null!==(t=window.navigator.userAgent.toLowerCase().indexOf("firefox"))&&void 0!==t?t:-1)>-1}function ya(){return"undefined"!==typeof window&&/iPhone|iPad|iPod/.test(window.navigator.platform)}var _a,ba=10,xa=function(){function t(t,e,i){var n=this;this._clickCount=0,this._clickTimeoutId=null,this._clickCoordinate={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY},this._tapCount=0,this._tapTimeoutId=null,this._tapCoordinate={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY},this._longTapTimeoutId=null,this._longTapActive=!1,this._mouseMoveStartCoordinate=null,this._touchMoveStartCoordinate=null,this._touchMoveExceededManhattanDistance=!1,this._cancelClick=!1,this._cancelTap=!1,this._unsubscribeOutsideMouseEvents=null,this._unsubscribeOutsideTouchEvents=null,this._unsubscribeMobileSafariEvents=null,this._unsubscribeMousemove=null,this._unsubscribeMouseWheel=null,this._unsubscribeContextMenu=null,this._unsubscribeRootMouseEvents=null,this._unsubscribeRootTouchEvents=null,this._startPinchMiddleCoordinate=null,this._startPinchDistance=0,this._pinchPrevented=!1,this._preventTouchDragProcess=!1,this._mousePressed=!1,this._lastTouchEventTimeStamp=0,this._activeTouchId=null,this._acceptMouseLeave=!ya(),this._onFirefoxOutsideMouseUp=function(t){n._mouseUpHandler(t)},this._onMobileSafariDoubleClick=function(t){if(n._firesTouchEvents(t)){if(++n._tapCount,null!==n._tapTimeoutId&&n._tapCount>1){var e=n._mouseTouchMoveWithDownInfo(n._getCoordinate(t),n._tapCoordinate).manhattanDistance;e<30&&!n._cancelTap&&n._processEvent(n._makeCompatEvent(t),n._handler.doubleTapEvent),n._resetTapTimeout()}}else if(++n._clickCount,null!==n._clickTimeoutId&&n._clickCount>1){e=n._mouseTouchMoveWithDownInfo(n._getCoordinate(t),n._clickCoordinate).manhattanDistance;e<5&&!n._cancelClick&&n._processEvent(n._makeCompatEvent(t),n._handler.mouseDoubleClickEvent),n._resetClickTimeout()}},this._target=t,this._handler=e,this._options=i,this._init()}return t.prototype.destroy=function(){null!==this._unsubscribeOutsideMouseEvents&&(this._unsubscribeOutsideMouseEvents(),this._unsubscribeOutsideMouseEvents=null),null!==this._unsubscribeOutsideTouchEvents&&(this._unsubscribeOutsideTouchEvents(),this._unsubscribeOutsideTouchEvents=null),null!==this._unsubscribeMousemove&&(this._unsubscribeMousemove(),this._unsubscribeMousemove=null),null!==this._unsubscribeMouseWheel&&(this._unsubscribeMouseWheel(),this._unsubscribeMouseWheel=null),null!==this._unsubscribeContextMenu&&(this._unsubscribeContextMenu(),this._unsubscribeContextMenu=null),null!==this._unsubscribeRootMouseEvents&&(this._unsubscribeRootMouseEvents(),this._unsubscribeRootMouseEvents=null),null!==this._unsubscribeRootTouchEvents&&(this._unsubscribeRootTouchEvents(),this._unsubscribeRootTouchEvents=null),null!==this._unsubscribeMobileSafariEvents&&(this._unsubscribeMobileSafariEvents(),this._unsubscribeMobileSafariEvents=null),this._clearLongTapTimeout(),this._resetClickTimeout()},t.prototype._mouseEnterHandler=function(t){var e,i,n,a=this;null===(e=this._unsubscribeMousemove)||void 0===e||e.call(this),null===(i=this._unsubscribeMouseWheel)||void 0===i||i.call(this),null===(n=this._unsubscribeContextMenu)||void 0===n||n.call(this);var r=this._mouseMoveHandler.bind(this);this._unsubscribeMousemove=function(){a._target.removeEventListener("mousemove",r)},this._target.addEventListener("mousemove",r);var o=this._mouseWheelHandler.bind(this);this._unsubscribeMouseWheel=function(){a._target.removeEventListener("wheel",o)},this._target.addEventListener("wheel",o,{passive:!1});var s=this._contextMenuHandler.bind(this);this._unsubscribeContextMenu=function(){a._target.removeEventListener("contextmenu",s)},this._target.addEventListener("contextmenu",s,{passive:!1}),this._firesTouchEvents(t)||(this._processEvent(this._makeCompatEvent(t),this._handler.mouseEnterEvent),this._acceptMouseLeave=!0)},t.prototype._resetClickTimeout=function(){null!==this._clickTimeoutId&&clearTimeout(this._clickTimeoutId),this._clickCount=0,this._clickTimeoutId=null,this._clickCoordinate={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY}},t.prototype._resetTapTimeout=function(){null!==this._tapTimeoutId&&clearTimeout(this._tapTimeoutId),this._tapCount=0,this._tapTimeoutId=null,this._tapCoordinate={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY}},t.prototype._mouseMoveHandler=function(t){this._mousePressed||null!==this._touchMoveStartCoordinate||this._firesTouchEvents(t)||(this._processEvent(this._makeCompatEvent(t),this._handler.mouseMoveEvent),this._acceptMouseLeave=!0)},t.prototype._mouseWheelHandler=function(t){if(Math.abs(t.deltaX)>Math.abs(t.deltaY)){if(!At(this._handler.mouseWheelHortEvent))return;if(this._preventDefault(t),0===Math.abs(t.deltaX))return;this._handler.mouseWheelHortEvent(this._makeCompatEvent(t),-t.deltaX)}else{if(!At(this._handler.mouseWheelVertEvent))return;var e=-t.deltaY/100;if(0===e)return;switch(this._preventDefault(t),t.deltaMode){case t.DOM_DELTA_PAGE:e*=120;break;case t.DOM_DELTA_LINE:e*=32;break}if(0!==e){var i=Math.sign(e)*Math.min(1,Math.abs(e));this._handler.mouseWheelVertEvent(this._makeCompatEvent(t),i)}}},t.prototype._contextMenuHandler=function(t){this._preventDefault(t)},t.prototype._touchMoveHandler=function(t){var e=this._touchWithId(t.changedTouches,this._activeTouchId);if(null!==e&&(this._lastTouchEventTimeStamp=this._eventTimeStamp(t),null===this._startPinchMiddleCoordinate&&!this._preventTouchDragProcess)){this._pinchPrevented=!0;var i=this._mouseTouchMoveWithDownInfo(this._getCoordinate(e),this._touchMoveStartCoordinate),n=i.xOffset,a=i.yOffset,r=i.manhattanDistance;if(this._touchMoveExceededManhattanDistance||!(r<5)){if(!this._touchMoveExceededManhattanDistance){var o=.5*n,s=a>=o&&!this._options.treatVertDragAsPageScroll(),l=o>a&&!this._options.treatHorzDragAsPageScroll();s||l||(this._preventTouchDragProcess=!0),this._touchMoveExceededManhattanDistance=!0,this._cancelTap=!0,this._clearLongTapTimeout(),this._resetTapTimeout()}this._preventTouchDragProcess||this._processEvent(this._makeCompatEvent(t,e),this._handler.touchMoveEvent)}}},t.prototype._mouseMoveWithDownHandler=function(t){if(0===t.button){var e=this._mouseTouchMoveWithDownInfo(this._getCoordinate(t),this._mouseMoveStartCoordinate),i=e.manhattanDistance;i>=5&&(this._cancelClick=!0,this._resetClickTimeout()),this._cancelClick&&this._processEvent(this._makeCompatEvent(t),this._handler.pressedMouseMoveEvent)}},t.prototype._mouseTouchMoveWithDownInfo=function(t,e){var i=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y),a=i+n;return{xOffset:i,yOffset:n,manhattanDistance:a}},t.prototype._touchEndHandler=function(t){var e=this._touchWithId(t.changedTouches,this._activeTouchId);if(null===e&&0===t.touches.length&&(e=t.changedTouches[0]),null!==e){this._activeTouchId=null,this._lastTouchEventTimeStamp=this._eventTimeStamp(t),this._clearLongTapTimeout(),this._touchMoveStartCoordinate=null,null!==this._unsubscribeRootTouchEvents&&(this._unsubscribeRootTouchEvents(),this._unsubscribeRootTouchEvents=null);var i=this._makeCompatEvent(t,e);if(this._processEvent(i,this._handler.touchEndEvent),++this._tapCount,null!==this._tapTimeoutId&&this._tapCount>1){var n=this._mouseTouchMoveWithDownInfo(this._getCoordinate(e),this._tapCoordinate).manhattanDistance;n<30&&!this._cancelTap&&this._processEvent(i,this._handler.doubleTapEvent),this._resetTapTimeout()}else this._cancelTap||(this._processEvent(i,this._handler.tapEvent),At(this._handler.tapEvent)&&this._preventDefault(t));0===this._tapCount&&this._preventDefault(t),0===t.touches.length&&this._longTapActive&&(this._longTapActive=!1,this._preventDefault(t))}},t.prototype._mouseUpHandler=function(t){if(0===t.button){var e=this._makeCompatEvent(t);if(this._mouseMoveStartCoordinate=null,this._mousePressed=!1,null!==this._unsubscribeRootMouseEvents&&(this._unsubscribeRootMouseEvents(),this._unsubscribeRootMouseEvents=null),ma()){var i=this._target.ownerDocument.documentElement;i.removeEventListener("mouseleave",this._onFirefoxOutsideMouseUp)}if(!this._firesTouchEvents(t))if(this._processEvent(e,this._handler.mouseUpEvent),++this._clickCount,null!==this._clickTimeoutId&&this._clickCount>1){var n=this._mouseTouchMoveWithDownInfo(this._getCoordinate(t),this._clickCoordinate).manhattanDistance;n<5&&!this._cancelClick&&this._processEvent(e,this._handler.mouseDoubleClickEvent),this._resetClickTimeout()}else this._cancelClick||this._processEvent(e,this._handler.mouseClickEvent)}},t.prototype._clearLongTapTimeout=function(){null!==this._longTapTimeoutId&&(clearTimeout(this._longTapTimeoutId),this._longTapTimeoutId=null)},t.prototype._touchStartHandler=function(t){if(null===this._activeTouchId){var e=t.changedTouches[0];this._activeTouchId=e.identifier,this._lastTouchEventTimeStamp=this._eventTimeStamp(t);var i=this._target.ownerDocument.documentElement;this._cancelTap=!1,this._touchMoveExceededManhattanDistance=!1,this._preventTouchDragProcess=!1,this._touchMoveStartCoordinate=this._getCoordinate(e),null!==this._unsubscribeRootTouchEvents&&(this._unsubscribeRootTouchEvents(),this._unsubscribeRootTouchEvents=null);var n=this._touchMoveHandler.bind(this),a=this._touchEndHandler.bind(this);this._unsubscribeRootTouchEvents=function(){i.removeEventListener("touchmove",n),i.removeEventListener("touchend",a)},i.addEventListener("touchmove",n,{passive:!1}),i.addEventListener("touchend",a,{passive:!1}),this._clearLongTapTimeout(),this._longTapTimeoutId=setTimeout(this._longTapHandler.bind(this,t),500),this._processEvent(this._makeCompatEvent(t,e),this._handler.touchStartEvent),null===this._tapTimeoutId&&(this._tapCount=0,this._tapTimeoutId=setTimeout(this._resetTapTimeout.bind(this),500),this._tapCoordinate=this._getCoordinate(e))}},t.prototype._mouseDownHandler=function(t){if(2===t.button)return this._preventDefault(t),void this._processEvent(this._makeCompatEvent(t),this._handler.mouseRightClickEvent);if(0===t.button){var e=this._target.ownerDocument.documentElement;ma()&&e.addEventListener("mouseleave",this._onFirefoxOutsideMouseUp),this._cancelClick=!1,this._mouseMoveStartCoordinate=this._getCoordinate(t),null!==this._unsubscribeRootMouseEvents&&(this._unsubscribeRootMouseEvents(),this._unsubscribeRootMouseEvents=null);var i=this._mouseMoveWithDownHandler.bind(this),n=this._mouseUpHandler.bind(this);this._unsubscribeRootMouseEvents=function(){e.removeEventListener("mousemove",i),e.removeEventListener("mouseup",n)},e.addEventListener("mousemove",i),e.addEventListener("mouseup",n),this._mousePressed=!0,this._firesTouchEvents(t)||(this._processEvent(this._makeCompatEvent(t),this._handler.mouseDownEvent),null===this._clickTimeoutId&&(this._clickCount=0,this._clickTimeoutId=setTimeout(this._resetClickTimeout.bind(this),500),this._clickCoordinate=this._getCoordinate(t)))}},t.prototype._init=function(){var t=this;this._target.addEventListener("mouseenter",this._mouseEnterHandler.bind(this)),this._target.addEventListener("touchcancel",this._clearLongTapTimeout.bind(this));var e=this._target.ownerDocument,i=function(e){null!=t._handler.mouseDownOutsideEvent&&(e.composed&&t._target.contains(e.composedPath()[0])||null!==e.target&&t._target.contains(e.target)||t._handler.mouseDownOutsideEvent({x:0,y:0,pageX:0,pageY:0}))};this._unsubscribeOutsideTouchEvents=function(){e.removeEventListener("touchstart",i)},this._unsubscribeOutsideMouseEvents=function(){e.removeEventListener("mousedown",i)},e.addEventListener("mousedown",i),e.addEventListener("touchstart",i,{passive:!0}),ya()&&(this._unsubscribeMobileSafariEvents=function(){t._target.removeEventListener("dblclick",t._onMobileSafariDoubleClick)},this._target.addEventListener("dblclick",this._onMobileSafariDoubleClick)),this._target.addEventListener("mouseleave",this._mouseLeaveHandler.bind(this)),this._target.addEventListener("touchstart",this._touchStartHandler.bind(this),{passive:!0}),this._target.addEventListener("mousedown",function(t){if(1===t.button)return t.preventDefault(),!1}),this._target.addEventListener("mousedown",this._mouseDownHandler.bind(this)),this._initPinch(),this._target.addEventListener("touchmove",function(){},{passive:!1})},t.prototype._initPinch=function(){var t=this;(At(this._handler.pinchStartEvent)||At(this._handler.pinchEvent)||At(this._handler.pinchEndEvent))&&(this._target.addEventListener("touchstart",function(e){t._checkPinchState(e.touches)},{passive:!0}),this._target.addEventListener("touchmove",function(e){if(2===e.touches.length&&null!==t._startPinchMiddleCoordinate&&At(t._handler.pinchEvent)){var i=t._getTouchDistance(e.touches[0],e.touches[1]),n=i/t._startPinchDistance;t._handler.pinchEvent(K(K({},t._startPinchMiddleCoordinate),{pageX:0,pageY:0}),n),t._preventDefault(e)}},{passive:!1}),this._target.addEventListener("touchend",function(e){t._checkPinchState(e.touches)}))},t.prototype._checkPinchState=function(t){1===t.length&&(this._pinchPrevented=!1),2!==t.length||this._pinchPrevented||this._longTapActive?this._stopPinch():this._startPinch(t)},t.prototype._startPinch=function(t){var e,i=null!==(e=this._target.getBoundingClientRect())&&void 0!==e?e:{left:0,top:0};this._startPinchMiddleCoordinate={x:(t[0].clientX-i.left+(t[1].clientX-i.left))/2,y:(t[0].clientY-i.top+(t[1].clientY-i.top))/2},this._startPinchDistance=this._getTouchDistance(t[0],t[1]),At(this._handler.pinchStartEvent)&&this._handler.pinchStartEvent({x:0,y:0,pageX:0,pageY:0}),this._clearLongTapTimeout()},t.prototype._stopPinch=function(){null!==this._startPinchMiddleCoordinate&&(this._startPinchMiddleCoordinate=null,At(this._handler.pinchEndEvent)&&this._handler.pinchEndEvent({x:0,y:0,pageX:0,pageY:0}))},t.prototype._mouseLeaveHandler=function(t){var e,i,n;null===(e=this._unsubscribeMousemove)||void 0===e||e.call(this),null===(i=this._unsubscribeMouseWheel)||void 0===i||i.call(this),null===(n=this._unsubscribeContextMenu)||void 0===n||n.call(this),this._firesTouchEvents(t)||this._acceptMouseLeave&&(this._processEvent(this._makeCompatEvent(t),this._handler.mouseLeaveEvent),this._acceptMouseLeave=!ya())},t.prototype._longTapHandler=function(t){var e=this._touchWithId(t.touches,this._activeTouchId);null!==e&&(this._processEvent(this._makeCompatEvent(t,e),this._handler.longTapEvent),this._cancelTap=!0,this._longTapActive=!0)},t.prototype._firesTouchEvents=function(t){var e;return At(null===(e=t.sourceCapabilities)||void 0===e?void 0:e.firesTouchEvents)?t.sourceCapabilities.firesTouchEvents:this._eventTimeStamp(t)this._startScrollCoordinate.y-s.y){var d=s.x-this._startScrollCoordinate.x;c.getTimeScaleStore().scroll(d)}return!0;case Gi.X_AXIS:case Gi.Y_AXIS:var h=o.dispatchEvent("pressedMouseMoveEvent",s);return h&&(null===(n=s.preventDefault)||void 0===n||n.call(s),this._chart.updatePane(1)),h}}return!1},t.prototype.touchEndEvent=function(t){var e=this,i=this._findWidgetByEvent(t).widget;if(null!==i){var n=this._makeWidgetEvent(t,i),a=i.getName();switch(a){case Gi.MAIN:if(i.dispatchEvent("mouseUpEvent",n),null!==this._startScrollCoordinate){var r=(new Date).getTime()-this._flingStartTime,o=n.x-this._startScrollCoordinate.x,s=o/(r>0?r:1)*20;if(r<200&&Math.abs(s)>0){var l=this._chart.getChartStore().getTimeScaleStore(),c=function(){e._flingScrollRequestId=oe(function(){l.startScroll(),l.scroll(s),s*=.975,Math.abs(s)<1?null!==e._flingScrollRequestId&&(se(e._flingScrollRequestId),e._flingScrollRequestId=null):c()})};c()}}return!0;case Gi.X_AXIS:case Gi.Y_AXIS:var u=i.dispatchEvent("mouseUpEvent",n);u&&this._chart.updatePane(1)}}return!1},t.prototype.tapEvent=function(t){var e=this._findWidgetByEvent(t),i=e.pane,n=e.widget,a=!1;if(null!==n){var r=this._makeWidgetEvent(t,n),o=n.dispatchEvent("mouseClickEvent",r);if(n.getName()===Gi.MAIN){var s=this._makeWidgetEvent(t,n),l=this._chart.getChartStore(),c=l.getTooltipStore();o?(this._touchCancelCrosshair=!0,this._touchCoordinate=null,c.setCrosshair(void 0,{notInvalidate:!0}),a=!0):(this._touchCancelCrosshair||this._touchZoomed||(this._touchCoordinate={x:s.x,y:s.y},c.setCrosshair({x:s.x,y:s.y,paneId:null===i||void 0===i?void 0:i.getId()},{notInvalidate:!0}),a=!0),this._touchCancelCrosshair=!1)}(a||o)&&this._chart.updatePane(1)}return a},t.prototype.doubleTapEvent=function(t){return this.mouseDoubleClickEvent(t)},t.prototype.longTapEvent=function(t){var e=this._findWidgetByEvent(t),i=e.pane,n=e.widget;if(null!==n&&n.getName()===Gi.MAIN){var a=this._makeWidgetEvent(t,n);return this._touchCoordinate={x:a.x,y:a.y},this._chart.getChartStore().getTooltipStore().setCrosshair({x:a.x,y:a.y,paneId:null===i||void 0===i?void 0:i.getId()}),!0}return!1},t.prototype._findWidgetByEvent=function(t){var e,i,n,a,r=t.x,o=t.y,s=this._chart.getAllSeparatorPanes(),l=this._chart.getChartStore().getStyles().separator.size;try{for(var c=G(s),u=c.next();!u.done;u=c.next()){var d=Z(u.value,2),h=d[1],p=h.getBounding(),v=p.top-Math.round((Zi-l)/2);if(r>=p.left&&r<=p.left+p.width&&o>=v&&o<=v+Zi)return{pane:h,widget:h.getWidget()}}}catch(k){e={error:k}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(e)throw e.error}}var f=this._chart.getAllDrawPanes(),g=null;try{for(var m=G(f),y=m.next();!y.done;y=m.next()){var _=y.value;p=_.getBounding();if(r>=p.left&&r<=p.left+p.width&&o>=p.top&&o<=p.top+p.height){g=_;break}}}catch(I){n={error:I}}finally{try{y&&!y.done&&(a=m.return)&&a.call(m)}finally{if(n)throw n.error}}var b=null;if(null!==g){if(null===b){var x=g.getMainWidget(),w=x.getBounding();r>=w.left&&r<=w.left+w.width&&o>=w.top&&o<=w.top+w.height&&(b=x)}if(null===b){var S=g.getYAxisWidget();if(null!==S){var C=S.getBounding();r>=C.left&&r<=C.left+C.width&&o>=C.top&&o<=C.top+C.height&&(b=S)}}}return{pane:g,widget:b}},t.prototype._makeWidgetEvent=function(t,e){var i,n,a,r=null!==(i=null===e||void 0===e?void 0:e.getBounding())&&void 0!==i?i:null;return K(K({},t),{x:t.x-(null!==(n=null===r||void 0===r?void 0:r.left)&&void 0!==n?n:0),y:t.y-(null!==(a=null===r||void 0===r?void 0:r.top)&&void 0!==a?a:0)})},t.prototype.destroy=function(){this._container.removeEventListener("keydown",this._boundKeyBoardDownEvent),this._event.destroy()},t}();(function(t){t["Root"]="root",t["Main"]="main",t["YAxis"]="yAxis"})(_a||(_a={}));var Sa=function(){function t(t,e){this._drawPanes=[],this._separatorPanes=new Map,this._initContainer(t),this._chartEvent=new wa(this._chartContainer,this),this._chartStore=new Ui(this,e),this._initPanes(e),this.adjustPaneViewport(!0,!0,!0)}return t.prototype._initContainer=function(t){this._container=t,this._chartContainer=he("div",{position:"relative",width:"100%",outline:"none",borderStyle:"none",cursor:"crosshair",boxSizing:"border-box",userSelect:"none",webkitUserSelect:"none",msUserSelect:"none",MozUserSelect:"none",webkitTapHighlightColor:"transparent"}),this._chartContainer.tabIndex=1,t.appendChild(this._chartContainer)},t.prototype._initPanes=function(t){var e,i=this,n=null!==(e=null===t||void 0===t?void 0:t.layout)&&void 0!==e?e:[{type:"candle"}],a=!1,r=!1,o=function(t){if(!r){var e=i._createPane(pa,Wi.X_AXIS,null!==t&&void 0!==t?t:{});i._xAxisPane=e,r=!0}};n.forEach(function(t){var e,n,r;switch(t.type){case"candle":if(!a){var s=null!==(e=t.options)&&void 0!==e?e:{};wt(s,{id:Wi.CANDLE}),i._candlePane=i._createPane(aa,Wi.CANDLE,s);var l=null!==(n=t.content)&&void 0!==n?n:[];l.forEach(function(t){i.createIndicator(t,!0,s)}),a=!0}break;case"indicator":var c;l=null!==(r=t.content)&&void 0!==r?r:[];if(l.length>0)l.forEach(function(e){At(c)?i.createIndicator(e,!0,{id:c}):c=i.createIndicator(e,!0,t.options)});break;case"xAxis":o(t.options);break}}),o({position:"bottom"})},t.prototype._createPane=function(t,e,i){var n,a=null,r=null,o=null===i||void 0===i?void 0:i.position;switch(o){case"top":var s=this._drawPanes[0];At(s)&&(r=new t(this._chartContainer,s.getContainer(),this,e,null!==i&&void 0!==i?i:{}),a=0);break;case"bottom":break;default:for(var l=this._drawPanes.length-1;l>-1;l--){var c=this._drawPanes[l],u=this._drawPanes[l-1];if("bottom"===(null===c||void 0===c?void 0:c.getOptions().position)&&"bottom"!==(null===u||void 0===u?void 0:u.getOptions().position)){r=new t(this._chartContainer,c.getContainer(),this,e,null!==i&&void 0!==i?i:{}),a=l;break}}}if(At(r)||(r=new t(this._chartContainer,null,this,e,null!==i&&void 0!==i?i:{})),Et(a)?(this._drawPanes.splice(a,0,r),n=a):(this._drawPanes.push(r),n=this._drawPanes.length-1),r.getId()!==Wi.X_AXIS){var d=this._drawPanes[n+1];if(At(d)&&d.getId()===Wi.X_AXIS&&(d=this._drawPanes[n+2]),At(d)){var h=this._separatorPanes.get(d);At(h)?h.setTopPane(r):(h=new ga(this._chartContainer,d.getContainer(),this,"",r,d),this._separatorPanes.set(d,h))}var p=this._drawPanes[n-1];if(At(p)&&p.getId()===Wi.X_AXIS&&(p=this._drawPanes[n-2]),At(p)){h=new ga(this._chartContainer,r.getContainer(),this,"",p,r);this._separatorPanes.set(r,h)}}return r},t.prototype._measurePaneHeight=function(){var t,e=this,i=Math.floor(this._container.clientHeight),n=this._chartStore.getStyles().separator.size,a=this._xAxisPane.getAxisComponent().getAutoSize(),r=i-a-this._separatorPanes.size*n;r<0&&(r=0);var o=0;this._drawPanes.forEach(function(t){if(t.getId()!==Wi.CANDLE&&t.getId()!==Wi.X_AXIS){var e=t.getBounding().height,i=t.getOptions().minHeight;er?(o=r,e=Math.max(r-o,0)):o+=e,t.setBounding({height:e})}});var s=r-o;null===(t=this._candlePane)||void 0===t||t.setBounding({height:s}),this._xAxisPane.setBounding({height:a});var l=0;this._drawPanes.forEach(function(t){var i=e._separatorPanes.get(t);At(i)&&(i.setBounding({height:n,top:l}),l+=n),t.setBounding({top:l}),l+=t.getBounding().height})},t.prototype._measurePaneWidth=function(){var t=this,e=Math.floor(this._container.clientWidth),i=this._chartStore.getStyles(),n=i.yAxis,a=n.position===Y.Left,r=!n.inside,o=0,s=0,l=0,c=0;this._drawPanes.forEach(function(t){t.getId()!==Wi.X_AXIS&&(s=Math.max(s,t.getAxisComponent().getAutoSize()))}),s>e&&(s=e),r?(o=e-s,a?(l=0,c=s):(l=e-s,c=0)):(o=e,c=0,l=a?0:e-s),this._chartStore.getTimeScaleStore().setTotalBarSpace(o);var u,d={width:e},h={width:o,left:c},p={width:s,left:l},v=i.separator.fill;u=r&&!v?h:d,this._drawPanes.forEach(function(e){var i;null===(i=t._separatorPanes.get(e))||void 0===i||i.setBounding(u),e.setBounding(d,h,p)})},t.prototype._setPaneOptions=function(t,e){var i,n;if(Mt(t.id)){var a=this.getDrawPaneById(t.id),r=!1;if(null!==a){var o=e;if(t.id!==Wi.CANDLE&&Et(t.height)&&t.height>0){var s=Math.max(null!==(i=t.minHeight)&&void 0!==i?i:a.getOptions().minHeight,0),l=Math.max(s,t.height);a.setBounding({height:l}),o=!0,r=!0}(Mt(null===(n=t.axisOptions)||void 0===n?void 0:n.name)||At(t.gap))&&(o=!0),a.setOptions(t),o&&this.adjustPaneViewport(r,!0,!0,!0,!0)}}},t.prototype.getDrawPaneById=function(t){if(t===Wi.CANDLE)return this._candlePane;if(t===Wi.X_AXIS)return this._xAxisPane;var e=this._drawPanes.find(function(e){return e.getId()===t});return null!==e&&void 0!==e?e:null},t.prototype.getContainer=function(){return this._container},t.prototype.getChartStore=function(){return this._chartStore},t.prototype.getXAxisPane=function(){return this._xAxisPane},t.prototype.getAllDrawPanes=function(){return this._drawPanes},t.prototype.getAllSeparatorPanes=function(){return this._separatorPanes},t.prototype.adjustPaneViewport=function(t,e,i,n,a){t&&this._measurePaneHeight();var r=e,o=null!==n&&void 0!==n&&n,s=null!==a&&void 0!==a&&a;(o||s)&&this._drawPanes.forEach(function(t){var e=t.getAxisComponent().buildTicks(s);r||(r=e)}),r&&this._measurePaneWidth(),null!==i&&void 0!==i&&i&&(this._xAxisPane.getAxisComponent().buildTicks(!0),this.updatePane(4))},t.prototype.updatePane=function(t,e){if(At(e)){var i=this.getDrawPaneById(e);null===i||void 0===i||i.update(t)}else this._separatorPanes.forEach(function(e){e.update(t)}),this._drawPanes.forEach(function(e){e.update(t)})},t.prototype.crosshairChange=function(t){var e=this,i=this._chartStore.getActionStore();if(i.has(Tt.OnCrosshairChange)){var n={};this._drawPanes.forEach(function(i){var a=i.getId(),r={},o=e._chartStore.getIndicatorStore().getInstances(a);o.forEach(function(e){var i,n=e.result;r[e.name]=n[null!==(i=t.dataIndex)&&void 0!==i?i:n.length-1]}),n[a]=r}),Mt(t.paneId)&&i.execute(Tt.OnCrosshairChange,K(K({},t),{indicatorData:n}))}},t.prototype.getDom=function(t,e){var i,n;if(!Mt(t))return this._chartContainer;var a=this.getDrawPaneById(t);if(null!==a){var r=null!==e&&void 0!==e?e:_a.Root;switch(r){case _a.Root:return a.getContainer();case _a.Main:return a.getMainWidget().getContainer();case _a.YAxis:return null!==(n=null===(i=a.getYAxisWidget())||void 0===i?void 0:i.getContainer())&&void 0!==n?n:null}}return null},t.prototype.getSize=function(t,e){var i,n;if(!At(t))return{width:Math.floor(this._chartContainer.clientWidth),height:Math.floor(this._chartContainer.clientHeight),left:0,top:0,right:0,bottom:0};var a=this.getDrawPaneById(t);if(null!==a){var r=null!==e&&void 0!==e?e:_a.Root;switch(r){case _a.Root:return a.getBounding();case _a.Main:return a.getMainWidget().getBounding();case _a.YAxis:return null!==(n=null===(i=a.getYAxisWidget())||void 0===i?void 0:i.getBounding())&&void 0!==n?n:null}}return null},t.prototype.setStyles=function(t){var e,i,n;this._chartStore.setOptions({styles:t}),n=Mt(t)?ji(t):t,At(null===(e=null===n||void 0===n?void 0:n.yAxis)||void 0===e?void 0:e.type)&&(null===(i=this._candlePane)||void 0===i||i.getAxisComponent().setAutoCalcTickFlag(!0)),this.adjustPaneViewport(!0,!0,!0,!0,!0)},t.prototype.getStyles=function(){return this._chartStore.getStyles()},t.prototype.setLocale=function(t){this._chartStore.setOptions({locale:t}),this.adjustPaneViewport(!0,!0,!0,!0,!0)},t.prototype.getLocale=function(){return this._chartStore.getLocale()},t.prototype.setCustomApi=function(t){this._chartStore.setOptions({customApi:t}),this.adjustPaneViewport(!0,!0,!0,!0,!0)},t.prototype.setPriceVolumePrecision=function(t,e){this._chartStore.setPrecision({price:t,volume:e})},t.prototype.getPriceVolumePrecision=function(){return this._chartStore.getPrecision()},t.prototype.setTimezone=function(t){this._chartStore.setOptions({timezone:t}),this._xAxisPane.getAxisComponent().buildTicks(!0),this._xAxisPane.update(3)},t.prototype.getTimezone=function(){return this._chartStore.getTimeScaleStore().getTimezone()},t.prototype.setOffsetRightDistance=function(t){this._chartStore.getTimeScaleStore().setOffsetRightDistance(t,!0)},t.prototype.getOffsetRightDistance=function(){return this._chartStore.getTimeScaleStore().getOffsetRightDistance()},t.prototype.setMaxOffsetLeftDistance=function(t){t<0?_t("setMaxOffsetLeftDistance","distance","distance must greater than zero!!!"):this._chartStore.getTimeScaleStore().setMaxOffsetLeftDistance(t)},t.prototype.setMaxOffsetRightDistance=function(t){t<0?_t("setMaxOffsetRightDistance","distance","distance must greater than zero!!!"):this._chartStore.getTimeScaleStore().setMaxOffsetRightDistance(t)},t.prototype.setLeftMinVisibleBarCount=function(t){t<0?_t("setLeftMinVisibleBarCount","barCount","barCount must greater than zero!!!"):this._chartStore.getTimeScaleStore().setLeftMinVisibleBarCount(Math.ceil(t))},t.prototype.setRightMinVisibleBarCount=function(t){t<0?_t("setRightMinVisibleBarCount","barCount","barCount must greater than zero!!!"):this._chartStore.getTimeScaleStore().setRightMinVisibleBarCount(Math.ceil(t))},t.prototype.setBarSpace=function(t){this._chartStore.getTimeScaleStore().setBarSpace(t)},t.prototype.getBarSpace=function(){return this._chartStore.getTimeScaleStore().getBarSpace().bar},t.prototype.getVisibleRange=function(){return this._chartStore.getTimeScaleStore().getVisibleRange()},t.prototype.clearData=function(){this._chartStore.clear()},t.prototype.getDataList=function(){return this._chartStore.getDataList()},t.prototype.applyNewData=function(t,e,i){At(i)&&_t("applyNewData","","param `callback` has been deprecated since version 9.8.0, use `subscribeAction('onDataReady')` instead."),this._chartStore.addData(t,Yt.Init,e).then(function(){}).catch(function(){}).finally(function(){null===i||void 0===i||i()})},t.prototype.applyMoreData=function(t,e,i){_t("","","Api `applyMoreData` has been deprecated since version 9.8.0."),this._chartStore.addData(t,Yt.Forward,null===e||void 0===e||e).then(function(){}).catch(function(){}).finally(function(){null===i||void 0===i||i()})},t.prototype.updateData=function(t,e){At(e)&&_t("updateData","","param `callback` has been deprecated since version 9.8.0, use `subscribeAction('onDataReady')` instead."),this._chartStore.addData(t).then(function(){}).catch(function(){}).finally(function(){null===e||void 0===e||e()})},t.prototype.loadMore=function(t){_t("","","Api `loadMore` has been deprecated since version 9.8.0, use `setLoadDataCallback` instead."),this._chartStore.setLoadMoreCallback(t)},t.prototype.setLoadDataCallback=function(t){this._chartStore.setLoadDataCallback(t)},t.prototype.createIndicator=function(t,e,i,n){var a,r=this,o=Mt(t)?{name:t}:t;if(null===ri(o.name))return _t("createIndicator","value","indicator not supported, you may need to use registerIndicator to add one!!!"),null;var s=null===i||void 0===i?void 0:i.id,l=this.getDrawPaneById(null!==s&&void 0!==s?s:"");if(null!==l)this._chartStore.getIndicatorStore().addInstance(o,null!==s&&void 0!==s?s:"",null!==e&&void 0!==e&&e).then(function(t){var e;r._setPaneOptions(null!==i&&void 0!==i?i:{},null!==(e=l.getAxisComponent().buildTicks(!0))&&void 0!==e&&e)}).catch(function(t){});else{null!==s&&void 0!==s||(s=de(Wi.INDICATOR));var c=this._createPane(na,s,null!==i&&void 0!==i?i:{}),u=null!==(a=null===i||void 0===i?void 0:i.height)&&void 0!==a?a:Vi;c.setBounding({height:u}),this._chartStore.getIndicatorStore().addInstance(o,s,null!==e&&void 0!==e&&e).finally(function(){r.adjustPaneViewport(!0,!0,!0,!0,!0),null===n||void 0===n||n()})}return null!==s&&void 0!==s?s:null},t.prototype.overrideIndicator=function(t,e,i){var n=this;this._chartStore.getIndicatorStore().override(t,null!==e&&void 0!==e?e:null).then(function(t){var e=Z(t,2),a=e[0],r=e[1];(a||r)&&(n.adjustPaneViewport(!1,r,!0,r),null===i||void 0===i||i())}).catch(function(){})},t.prototype.getIndicatorByPaneId=function(t,e){return this._chartStore.getIndicatorStore().getInstanceByPaneId(t,e)},t.prototype.removeIndicator=function(t,e){var i,n,a,r=this._chartStore.getIndicatorStore(),o=r.removeInstance(t,e);if(o){var s=!1;if(t!==Wi.CANDLE&&!r.hasInstances(t)){var l=this.getDrawPaneById(t),c=this._drawPanes.findIndex(function(e){return e.getId()===t});if(null!==l){s=!0;var u=this._separatorPanes.get(l);if(At(u)){var d=null===u||void 0===u?void 0:u.getTopPane();try{for(var h=G(this._separatorPanes),p=h.next();!p.done;p=h.next()){var v=p.value;if(v[1].getTopPane().getId()===l.getId()){v[1].setTopPane(d);break}}}catch(g){i={error:g}}finally{try{p&&!p.done&&(n=h.return)&&n.call(h)}finally{if(i)throw i.error}}u.destroy(),this._separatorPanes.delete(l)}this._drawPanes.splice(c,1),l.destroy();var f=this._drawPanes[0];At(f)&&f.getId()===Wi.X_AXIS&&(f=this._drawPanes[1]),null===(a=this._separatorPanes.get(f))||void 0===a||a.destroy(),this._separatorPanes.delete(f)}}this.adjustPaneViewport(s,!0,!0,!0,!0)}},t.prototype.createOverlay=function(t,e){var i=[];if(Mt(t))i=[{name:t}];else if(Ct(t))i=t.map(function(t){return Mt(t)?{name:t}:t});else{var n=t;i=[n]}var a=!0;At(e)&&null!==this.getDrawPaneById(e)||(e=Wi.CANDLE,a=!1);var r=this._chartStore.getOverlayStore().addInstances(i,e,a);return Ct(t)?r:r[0]},t.prototype.getOverlayById=function(t){return this._chartStore.getOverlayStore().getInstanceById(t)},t.prototype.overrideOverlay=function(t){this._chartStore.getOverlayStore().override(t)},t.prototype.removeOverlay=function(t){var e;At(t)&&(e=Mt(t)?{id:t}:t),this._chartStore.getOverlayStore().removeInstance(e)},t.prototype.setPaneOptions=function(t){this._setPaneOptions(t,!1)},t.prototype.setZoomEnabled=function(t){this._chartStore.getTimeScaleStore().setZoomEnabled(t)},t.prototype.isZoomEnabled=function(){return this._chartStore.getTimeScaleStore().getZoomEnabled()},t.prototype.setScrollEnabled=function(t){this._chartStore.getTimeScaleStore().setScrollEnabled(t)},t.prototype.isScrollEnabled=function(){return this._chartStore.getTimeScaleStore().getScrollEnabled()},t.prototype.scrollByDistance=function(t,e){var i=Et(e)&&e>0?e:0,n=this._chartStore.getTimeScaleStore();if(n.startScroll(),i>0){var a=new le({duration:i});a.doFrame(function(e){var a=t*(e/i);n.scroll(a)}),a.start()}else n.scroll(t)},t.prototype.scrollToRealTime=function(t){var e=this._chartStore.getTimeScaleStore(),i=e.getBarSpace().bar,n=e.getLastBarRightSideDiffBarCount()-e.getInitialOffsetRightDistance()/i,a=n*i;this.scrollByDistance(a,t)},t.prototype.scrollToDataIndex=function(t,e){var i=this._chartStore.getTimeScaleStore(),n=(i.getLastBarRightSideDiffBarCount()+(this.getDataList().length-1-t))*i.getBarSpace().bar;this.scrollByDistance(n,e)},t.prototype.scrollToTimestamp=function(t,e){var i=pe(this.getDataList(),"timestamp",t);this.scrollToDataIndex(i,e)},t.prototype.zoomAtCoordinate=function(t,e,i){var n=Et(i)&&i>0?i:0,a=this._chartStore.getTimeScaleStore(),r=a.getBarSpace().bar,o=r*t,s=o-r;if(n>0){var l=0,c=new le({duration:n});c.doFrame(function(t){var i=s*(t/n),r=(i-l)/a.getBarSpace().bar*ke;a.zoom(r,e),l=i}),c.start()}else a.zoom(s/r*ke,e)},t.prototype.zoomAtDataIndex=function(t,e,i){var n=this._chartStore.getTimeScaleStore().dataIndexToCoordinate(e);this.zoomAtCoordinate(t,{x:n,y:0},i)},t.prototype.zoomAtTimestamp=function(t,e,i){var n=pe(this.getDataList(),"timestamp",e);this.zoomAtDataIndex(t,n,i)},t.prototype.convertToPixel=function(t,e){var i,n=e.paneId,a=void 0===n?Wi.CANDLE:n,r=e.absolute,o=void 0!==r&&r,s=[];if(a!==Wi.X_AXIS){var l=this.getDrawPaneById(a);if(null!==l){var c=this._chartStore.getTimeScaleStore(),u=l.getBounding(),d=(new Array).concat(t),h=this._xAxisPane.getAxisComponent(),p=l.getAxisComponent();s=d.map(function(t){var e={},i=t.dataIndex;if(Et(t.timestamp)&&(i=c.timestampToDataIndex(t.timestamp)),Et(i)&&(e.x=null===h||void 0===h?void 0:h.convertToPixel(i)),Et(t.value)){var n=null===p||void 0===p?void 0:p.convertToPixel(t.value);e.y=o?u.top+n:n}return e})}}return Ct(t)?s:null!==(i=s[0])&&void 0!==i?i:{}},t.prototype.convertFromPixel=function(t,e){var i,n=e.paneId,a=void 0===n?Wi.CANDLE:n,r=e.absolute,o=void 0!==r&&r,s=[];if(a!==Wi.X_AXIS){var l=this.getDrawPaneById(a);if(null!==l){var c=this._chartStore.getTimeScaleStore(),u=l.getBounding(),d=(new Array).concat(t),h=this._xAxisPane.getAxisComponent(),p=l.getAxisComponent();s=d.map(function(t){var e,i,n={};if(Et(t.x)){var a=null!==(e=null===h||void 0===h?void 0:h.convertFromPixel(t.x))&&void 0!==e?e:-1;n.dataIndex=a,n.timestamp=null!==(i=c.dataIndexToTimestamp(a))&&void 0!==i?i:void 0}if(Et(t.y)){var r=o?t.y-u.top:t.y;n.value=p.convertFromPixel(r)}return n})}}return Ct(t)?s:null!==(i=s[0])&&void 0!==i?i:{}},t.prototype.executeAction=function(t,e){var i;switch(t){case Tt.OnCrosshairChange:var n=K({},e);n.paneId=null!==(i=n.paneId)&&void 0!==i?i:Wi.CANDLE,this._chartStore.getTooltipStore().setCrosshair(n,{notExecuteAction:!0});break}},t.prototype.subscribeAction=function(t,e){this._chartStore.getActionStore().subscribe(t,e)},t.prototype.unsubscribeAction=function(t,e){this._chartStore.getActionStore().unsubscribe(t,e)},t.prototype.getConvertPictureUrl=function(t,e,i){var n=this,a=this._chartContainer.clientWidth,r=this._chartContainer.clientHeight,o=he("canvas",{width:"".concat(a,"px"),height:"".concat(r,"px"),boxSizing:"border-box"}),s=o.getContext("2d"),l=Wt(o);o.width=a*l,o.height=r*l,s.scale(l,l),s.fillStyle=null!==i&&void 0!==i?i:"#FFFFFF",s.fillRect(0,0,a,r);var c=null!==t&&void 0!==t&&t;return this._drawPanes.forEach(function(t){var e=n._separatorPanes.get(t);if(At(e)){var i=e.getBounding();s.drawImage(e.getImage(c),i.left,i.top,i.width,i.height)}var r=t.getBounding();s.drawImage(t.getImage(c),0,r.top,a,r.height)}),o.toDataURL("image/".concat(null!==e&&void 0!==e?e:"jpeg"))},t.prototype.resize=function(){this.adjustPaneViewport(!0,!0,!0,!0,!0)},t.prototype.destroy=function(){this._chartEvent.destroy(),this._drawPanes.forEach(function(t){t.destroy()}),this._drawPanes=[],this._separatorPanes.forEach(function(t){t.destroy()}),this._separatorPanes.clear(),this._container.removeChild(this._chartContainer)},t}(),Ca=new Map,ka=1;function Ia(t,e){var i;if(xt(),i=Mt(t)?document.getElementById(t):t,null===i)return bt("","","The chart cannot be initialized correctly. Please check the parameters. The chart container cannot be null and child elements need to be added!!!"),null;var n=Ca.get(i.id);if(At(n))return _t("","","The chart has been initialized on the dom!!!"),n;var a="k_line_chart_".concat(ka++);return n=new Sa(i,e),n.id=a,i.setAttribute("k-line-chart-id",a),Ca.set(a,n),n}var Ea=i(21396),Aa=i.n(Ea);function Pa(t,e,i,n){if(!t||!e||!i||!n)return t;try{var a=Aa().enc.Base64.parse(t),r=Aa().lib.WordArray.create(a.words.slice(0,4)),o=Aa().lib.WordArray.create(a.words.slice(4)),s=Aa().enc.Base64.parse(n),l=Aa().AES.decrypt({ciphertext:o},s,{iv:r,mode:Aa().mode.CBC,padding:Aa().pad.Pkcs7}),c=l.toString(Aa().enc.Utf8);return c||t}catch(u){return t}}function Ma(t,e){return Da.apply(this,arguments)}function Da(){return Da=(0,c.A)((0,l.A)().m(function t(e,i){var n,a;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e&&i){t.n=1;break}throw new Error("用户ID和指标ID不能为空");case 1:return t.p=1,t.n=2,(0,v.Ay)({url:"/api/indicator/getDecryptKey",method:"post",data:{userid:e,indicatorId:i}});case 2:if(n=t.v,1!==n.code||!n.data||!n.data.key){t.n=3;break}return t.a(2,n.data.key);case 3:throw new Error(n.msg||"获取解密密钥失败");case 4:t.n=6;break;case 5:throw t.p=5,a=t.v,new Error("无法获取解密密钥,请检查网络连接或联系管理员: "+(a.message||"未知错误"));case 6:return t.a(2)}},t,null,[[1,5]])})),Da.apply(this,arguments)}function Ta(t,e,i){return Ba.apply(this,arguments)}function Ba(){return Ba=(0,c.A)((0,l.A)().m(function t(e,i,n){var a;return(0,l.A)().w(function(t){while(1)switch(t.n){case 0:return t.n=1,Ma(i,n);case 1:return a=t.v,t.a(2,Pa(e,i,n,a))}},t)})),Ba.apply(this,arguments)}function Fa(t,e){if(1===e||!0===e)return!0;if(t&&t.length>100)try{var i=atob(t);if(i.length>50)return!0}catch(n){}return!1}var Ra={name:"KlineChart",props:{symbol:{type:String,default:""},market:{type:String,default:""},timeframe:{type:String,default:"1H"},theme:{type:String,default:"light"},activeIndicators:{type:Array,default:function(){return[]}},realtimeEnabled:{type:Boolean,default:!1},userId:{type:Number,default:null}},emits:["retry","price-change","load","indicator-toggle"],setup:function(t,e){var i=e.emit,n=(0,h.IJ)([]),a=(0,h.KR)(!1),r=(0,h.KR)(null),s=(0,h.KR)(!1),u=(0,h.KR)(!0),p=null,f=(0,h.KR)(!1),g=(0,h.IJ)(null),m=(0,h.KR)(t.theme||"light"),y=(0,h.KR)(null),b=(0,h.KR)(5e3),x=(0,h.KR)(!1),w=(0,h.KR)(1e4),S=(0,h.KR)(0),C=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(g.value){var e=Date.now(),i=Number(w.value||1e4);(t||!S.value||e-S.value>=i)&&(S.value=e,xt())}},k=(0,h.KR)([]),I=(0,h.KR)([]),E=(0,h.KR)([]),A=(0,h.KR)(null),P=(0,h.nI)(),M=P.proxy,D=(0,h.EW)(function(){return[{name:"line",title:M.$t("dashboard.indicator.drawing.line"),icon:"line"},{name:"horizontalLine",title:M.$t("dashboard.indicator.drawing.horizontalLine"),icon:"minus"},{name:"verticalLine",title:M.$t("dashboard.indicator.drawing.verticalLine"),icon:"column-width"},{name:"ray",title:M.$t("dashboard.indicator.drawing.ray"),icon:"arrow-right"},{name:"straightLine",title:M.$t("dashboard.indicator.drawing.straightLine"),icon:"menu"},{name:"parallelStraightLine",title:M.$t("dashboard.indicator.drawing.parallelLine"),icon:"menu"},{name:"priceLine",title:M.$t("dashboard.indicator.drawing.priceLine"),icon:"dollar"},{name:"priceChannelLine",title:M.$t("dashboard.indicator.drawing.priceChannel"),icon:"border"},{name:"fibonacciLine",title:M.$t("dashboard.indicator.drawing.fibonacciLine"),icon:"rise"},{name:"measure",title:M.$t("dashboard.indicator.drawing.measure"),icon:"drag"}]}),R=(0,h.KR)([{id:"sma",name:"SMA (简单移动平均)",shortName:"SMA",type:"line",defaultParams:{length:20}},{id:"ema",name:"EMA (指数移动平均)",shortName:"EMA",type:"line",defaultParams:{length:20}},{id:"rsi",name:"RSI (相对强弱)",shortName:"RSI",type:"line",defaultParams:{length:14}},{id:"macd",name:"MACD",shortName:"MACD",type:"macd",defaultParams:{fast:12,slow:26,signal:9}},{id:"bb",name:"布林带 (Bollinger Bands)",shortName:"BB",type:"band",defaultParams:{length:20,mult:2}},{id:"atr",name:"ATR (平均真实波幅)",shortName:"ATR",type:"line",defaultParams:{period:14}},{id:"cci",name:"CCI (商品通道指数)",shortName:"CCI",type:"line",defaultParams:{length:20}},{id:"williams",name:"Williams %R (威廉指标)",shortName:"W%R",type:"line",defaultParams:{length:14}},{id:"mfi",name:"MFI (资金流量指标)",shortName:"MFI",type:"line",defaultParams:{length:14}},{id:"adx",name:"ADX (平均趋向指数)",shortName:"ADX",type:"adx",defaultParams:{length:14}},{id:"obv",name:"OBV (能量潮)",shortName:"OBV",type:"line",defaultParams:{}},{id:"adosc",name:"ADOSC (积累/派发振荡器)",shortName:"ADOSC",type:"line",defaultParams:{fast:3,slow:10}},{id:"ad",name:"AD (积累/派发线)",shortName:"AD",type:"line",defaultParams:{}},{id:"kdj",name:"KDJ (随机指标)",shortName:"KDJ",type:"line",defaultParams:{period:9,k:3,d:3}}]),L=function(e){return t.activeIndicators.some(function(t){return t.id===e})},N=function(t){if(g.value){var e={line:"segment",horizontalLine:"horizontalStraightLine",verticalLine:"verticalStraightLine",ray:"rayLine",straightLine:"straightLine",parallelStraightLine:"parallelStraightLine",priceLine:"priceLine",priceChannelLine:"priceChannelLine",fibonacciLine:"fibonacciLine",measure:"priceRangeMeasure"},i=e[t]||t;if(A.value!==t){A.value=t;try{var n=["priceRangeMeasure"];if(n.includes(i)){if("function"!==typeof g.value.overrideOverlay)return void(A.value=null);g.value.overrideOverlay({name:i,lock:!1})}else{var a={name:i,lock:!1,extendData:{isDrawing:!0}},r=g.value.createOverlay(a);r?E.value.push(r):A.value=null}}catch(o){A.value=null}}else{A.value=null;try{"function"===typeof g.value.overrideOverlay&&g.value.overrideOverlay(null)}catch(s){}}}},O=function(){if(g.value)try{E.value.forEach(function(t){try{"function"===typeof g.value.removeOverlay?g.value.removeOverlay(t):"function"===typeof g.value.removeOverlayById&&g.value.removeOverlayById(t)}catch(e){}}),E.value=[],A.value=null,"function"===typeof g.value.overrideOverlay&&g.value.overrideOverlay(null)}catch(t){}},z=function(t){var e=L(t.id);if(e)i("indicator-toggle",{action:"remove",indicator:{id:t.id}});else{var n=(0,d.A)((0,d.A)({},t),{},{params:(0,d.A)({},t.defaultParams),calculate:null});i("indicator-toggle",{action:"add",indicator:n})}},V=(0,h.KR)(null),W=(0,h.KR)(!1),H=(0,h.KR)(!1),$=(0,h.KR)(!1),Y=(0,h.EW)(function(){return"dark"===m.value?{backgroundColor:"#141414",textColor:"#d1d4dc",textColorSecondary:"#787b86",borderColor:"#2a2a2a",gridLineColor:"#252525",gridLineColorDashed:"#363c4e",tooltipBg:"rgba(25, 27, 32, 0.95)",tooltipBorder:"#333",tooltipText:"#ccc",tooltipTextSecondary:"#888",axisLabelColor:"#787b86",splitAreaColor:["rgba(250,250,250,0.05)","rgba(200,200,200,0.02)"],dataZoomBorder:"#2a2a2a",dataZoomFiller:"rgba(41, 98, 255, 0.15)",dataZoomHandle:"#13c2c2",dataZoomText:"transparent",dataZoomBg:"#252525"}:{backgroundColor:"#fff",textColor:"#333",textColorSecondary:"#666",borderColor:"#e8e8e8",gridLineColor:"#e8e8e8",gridLineColorDashed:"#e8e8e8",tooltipBg:"rgba(255, 255, 255, 0.95)",tooltipBorder:"#e8e8e8",tooltipText:"#333",tooltipTextSecondary:"#666",axisLabelColor:"#666",splitAreaColor:["rgba(250,250,250,0.05)","rgba(200,200,200,0.02)"],dataZoomBorder:"#e8e8e8",dataZoomFiller:"rgba(24, 144, 255, 0.15)",dataZoomHandle:"#1890ff",dataZoomText:"#999",dataZoomBg:"#f0f2f5"}}),X=function(t){return"dark"===m.value?["#13c2c2","#e040fb","#ffeb3b","#00e676","#ff6d00","#9c27b0"][t%6]:["#13c2c2","#9c27b0","#f57c00","#1976d2","#c2185b","#7b1fa2"][t%6]},K=function(){return new Promise(function(t,e){if(window.pyodide)return V.value=window.pyodide,H.value=!0,void t(window.pyodide);W.value=!0;var i="0.25.0",n=function(t){return t&&t.endsWith("/")?t:t?t+"/":t},a="/assets/pyodide/v".concat(i,"/full/"),r="https://cdn.jsdelivr.net/pyodide/v".concat(i,"/full/"),o=n({NODE_ENV:"production",VUE_APP_API_BASE_URL:"/api",VUE_APP_PREVIEW:"false",BASE_URL:"/"}.VUE_APP_PYODIDE_LOCAL_BASE||a),s=n({NODE_ENV:"production",VUE_APP_API_BASE_URL:"/api",VUE_APP_PREVIEW:"false",BASE_URL:"/"}.VUE_APP_PYODIDE_CDN_BASE||r),u=({NODE_ENV:"production",VUE_APP_API_BASE_URL:"/api",VUE_APP_PREVIEW:"false",BASE_URL:"/"}.VUE_APP_PYODIDE_PREFER_CDN||"").toString().toLowerCase(),d=!u||("true"===u||"1"===u||"yes"===u),h=function(t){return new Promise(function(e,i){var n=document.querySelector('script[data-pyodide-src="'.concat(t,'"]'));if(n)return"function"===typeof window.loadPyodide?e():(n.addEventListener("load",function(){return e()},{once:!0}),void n.addEventListener("error",function(){return i(new Error("Pyodide 脚本加载失败"))},{once:!0}));var a=document.createElement("script");a.dataset.pyodideSrc=t,a.src=t,a.onload=function(){return e()},a.onerror=function(){return i(new Error("Pyodide 脚本加载失败"))},document.head.appendChild(a)})},p=function(){var e=(0,c.A)((0,l.A)().m(function e(i){return(0,l.A)().w(function(e){while(1)switch(e.n){case 0:if("function"===typeof window.loadPyodide){e.n=1;break}throw new Error("loadPyodide 函数未找到");case 1:return e.n=2,window.loadPyodide({indexURL:i});case 2:return window.pyodide=e.v,e.n=3,window.pyodide.loadPackage(["pandas","numpy"]);case 3:V.value=window.pyodide,H.value=!0,W.value=!1,t(window.pyodide);case 4:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}();(0,c.A)((0,l.A)().m(function t(){var e,i,n;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e=function(){var t=(0,c.A)((0,l.A)().m(function t(e){return(0,l.A)().w(function(t){while(1)switch(t.n){case 0:return t.n=1,h(e+"pyodide.js");case 1:return t.n=2,p(e);case 2:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),t.p=1,!d){t.n=3;break}return t.n=2,e(s);case 2:t.n=4;break;case 3:return t.n=4,e(o);case 4:t.n=9;break;case 5:return t.p=5,i=t.v,t.p=6,t.n=7,e(d?o:s);case 7:t.n=9;break;case 8:throw t.p=8,n=t.v,n||i;case 9:return t.a(2)}},t,null,[[6,8],[1,5]])}))().catch(function(t){W.value=!1,$.value=!0,e(t)})})},j=function(t){if(!t||"string"!==typeof t)return null;try{var e={},i=t.match(/(\w+)\s*=\s*(\d+\.?\d*)/g);return i&&i.forEach(function(t){var i=t.split("=");if(2===i.length){var n=i[0].trim(),a=parseFloat(i[1].trim());isNaN(a)||(e[n]=a)}}),{params:e,plots:[],success:!0}}catch(n){return{params:{},plots:[],success:!1}}},U=function(){var e=(0,c.A)((0,l.A)().m(function e(i,n){var a,r,s,c,u,d,h,p,v,f,g,m,y,_,b,x,w,S,C=arguments;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(a=C.length>2&&void 0!==C[2]?C[2]:{},r=C.length>3&&void 0!==C[3]?C[3]:{},H.value&&V.value){e.n=5;break}if(!W.value){e.n=4;break}s=0;case 1:if(!(W.value&&s<30)){e.n=4;break}return e.n=2,new Promise(function(t){return setTimeout(t,500)});case 2:if(s++,!H.value||!V.value){e.n=3;break}return e.a(3,4);case 3:e.n=1;break;case 4:if(H.value&&V.value){e.n=5;break}throw W.value?(W.value=!1,$.value=!0):$.value=!0,new Error("Python 引擎未就绪,请等待加载完成");case 5:if(e.p=5,c=i,u=r.is_encrypted||r.isEncrypted||0,!u&&!Fa(i,u)){e.n=11;break}if(d=r.user_id||r.userId||t.userId||a.userId,h=r.originalId||r.id||a.indicatorId,!d||!h){e.n=10;break}return e.p=6,e.n=7,Ta(c,d,h);case 7:c=e.v,e.n=9;break;case 8:throw e.p=8,x=e.v,new Error("代码解密失败,无法执行指标: "+(x.message||"未知错误"));case 9:e.n=11;break;case 10:throw new Error("缺少必要的解密参数(用户ID或指标ID),无法执行加密指标");case 11:return p=n.map(function(t){var e=t.timestamp||t.time;return e<1e10&&(e*=1e3),{time:Math.floor(e/1e3),open:parseFloat(t.open)||0,high:parseFloat(t.high)||0,low:parseFloat(t.low)||0,close:parseFloat(t.close)||0,volume:parseFloat(t.volume)||0}}),v=JSON.stringify(p),f=JSON.stringify(a||{}),g=v.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r"),m=f.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r"),y="\nimport json\nimport pandas as pd\nimport numpy as np\n\n# 递归清理 NaN 值的函数\ndef clean_nan(obj):\n if isinstance(obj, dict):\n return {k: clean_nan(v) for k, v in obj.items()}\n elif isinstance(obj, list):\n return [clean_nan(item) for item in obj]\n elif isinstance(obj, (pd.Series, np.ndarray)):\n return [None if (isinstance(x, float) and (np.isnan(x) or np.isinf(x))) else x for x in obj]\n elif isinstance(obj, (float, np.floating)):\n if np.isnan(obj) or np.isinf(obj):\n return None\n return float(obj)\n elif pd.isna(obj):\n return None\n else:\n return obj\n\n# 接收 JSON 数据\nraw_data = json.loads('".concat(g,"')\nparams = json.loads('").concat(m,"')\n\n# 将前端参数注入为指标代码可直接使用的变量(对齐回测/实盘执行环境)\n# 兼容多种命名(snake_case / camelCase)\ndef _get_param(key, default=None):\n if key in params:\n return params.get(key, default)\n # camelCase fallback\n camel = ''.join([key.split('_')[0]] + [p.capitalize() for p in key.split('_')[1:]])\n return params.get(camel, default)\n\ntry:\n leverage = float(_get_param('leverage', 1) or 1)\nexcept Exception:\n leverage = 1\n\ntrade_direction = _get_param('trade_direction', _get_param('tradeDirection', 'both')) or 'both'\n\ntry:\n initial_position = int(_get_param('initial_position', 0) or 0)\nexcept Exception:\n initial_position = 0\n\ntry:\n initial_avg_entry_price = float(_get_param('initial_avg_entry_price', 0.0) or 0.0)\nexcept Exception:\n initial_avg_entry_price = 0.0\n\ntry:\n initial_position_count = int(_get_param('initial_position_count', 0) or 0)\nexcept Exception:\n initial_position_count = 0\n\ntry:\n initial_last_add_price = float(_get_param('initial_last_add_price', 0.0) or 0.0)\nexcept Exception:\n initial_last_add_price = 0.0\n\ntry:\n initial_highest_price = float(_get_param('initial_highest_price', 0.0) or 0.0)\nexcept Exception:\n initial_highest_price = 0.0\n\n# 转换为 DataFrame\ndf = pd.DataFrame(raw_data)\n\n# 转换数据类型\ndf['open'] = df['open'].astype(float)\ndf['high'] = df['high'].astype(float)\ndf['low'] = df['low'].astype(float)\ndf['close'] = df['close'].astype(float)\ndf['volume'] = df['volume'].astype(float)\n\n# 用户代码(已解密)\n").concat(c,"\n\n# 构造输出(如果用户没有定义 output,则尝试从 result_json 获取)\nif 'output' not in locals():\n if 'result_json' in locals():\n output = json.loads(result_json)\n else:\n output = {\"plots\": []}\nelse:\n # 确保 output 是字典格式\n if isinstance(output, str):\n output = json.loads(output)\n\n# 清理 output 中的所有 NaN 值\noutput = clean_nan(output)\n\n# 返回 JSON 字符串\njson.dumps(output)\n"),e.n=12,V.value.runPythonAsync(y);case 12:if(_=e.v,_&&"string"===typeof _){e.n=13;break}throw new Error("Python 代码执行后未返回有效的 JSON 字符串,返回类型: ".concat((0,o.A)(_)));case 13:e.p=13,b=JSON.parse(_),e.n=15;break;case 14:throw e.p=14,w=e.v,new Error("JSON 解析失败: ".concat(w.message,"。可能是数据中包含 NaN 或其他无效值。"));case 15:if(b){e.n=16;break}return e.a(2,{plots:[],signals:[],calculatedVars:{}});case 16:return b.plots&&Array.isArray(b.plots)||(b.plots=[]),b.plots=b.plots.map(function(t){return t.data&&Array.isArray(t.data)&&(t.data=t.data.map(function(t){return null===t||void 0===t||"number"===typeof t&&isNaN(t)?null:t})),t}),b.signals&&Array.isArray(b.signals)&&(b.signals=b.signals.map(function(t){return t.data&&Array.isArray(t.data)&&(t.data=t.data.map(function(t){return null===t||void 0===t||"number"===typeof t&&isNaN(t)?null:t})),t})),b.calculatedVars||(b.calculatedVars={}),e.a(2,b);case 17:throw e.p=17,S=e.v,new Error("Python 执行失败: ".concat(S.message));case 18:return e.a(2)}},e,null,[[13,14],[6,8],[5,17]])}));return function(t,i){return e.apply(this,arguments)}}();function G(t,e){for(var i=[],n=0;nn-e+1){var c=(t[o-1].high+t[o-1].low+t[o-1].close)/3;s>c?a+=l:sp&&h>0?o.push(h):o.push(0),p>h&&p>0?s.push(p):s.push(0)}for(var v=[],f=[],g=[],m=0;m=e-1){var w=v[m],S=f[m],C=g[m];if(0===w?(i.push(0),n.push(0)):(i.push(S/w*100),n.push(C/w*100)),m>=e-1){var k=i[m]+n[m],I=0===k?0:Math.abs(i[m]-n[m])/k*100;if(m===e-1)a.push(I);else if(m===e){var E=Math.abs(i[m-1]-n[m-1])/(i[m-1]+n[m-1])*100;a.push((E+I)/2)}else a.push((a[m-1]*(e-1)+I)/e)}}}return{adx:a,plusDI:i,minusDI:n}}function nt(t){for(var e=[],i=0,n=0;nt[n-1].close?i+=t[n].volume:t[n].close255?12:7)},0),m=g+2*h,y=v+2*p,_=(null===(i=r.extendData)||void 0===i?void 0:i.side)||(null===(n=r.extendData)||void 0===n?void 0:n.type)||"buy",b="buy"===_,x=b?u:u-y,w=d,S=w,C=b?x:x+y;return[{type:"line",attrs:{coordinates:[{x:c,y:S},{x:c,y:C}]},styles:{style:"stroke",color:l,dashedValue:[2,2]},ignoreEvent:!0},{type:"circle",attrs:{x:c,y:w,r:4},styles:{style:"fill",color:l},ignoreEvent:!0},{type:"rect",attrs:{x:c-m/2,y:x,width:m,height:y,r:4},styles:{style:"fill",color:l,borderSize:0},ignoreEvent:!0},{type:"text",attrs:{x:c,y:x+y/2,text:f,align:"center",baseline:"middle"},styles:{color:"#ffffff",size:v,weight:"bold",backgroundColor:l,borderRadius:5},ignoreEvent:!0}]}}),Ni({name:"priceRangeMeasure",totalStep:2,lock:!1,needDefaultPointFigure:!1,needDefaultXAxisFigure:!1,needDefaultYAxisFigure:!1,createPointFigures:function(t){var e=t.coordinates,i=t.overlay,n=t.ctx;if(!e[0]||!e[1])return[];var a=i.points[0],r=i.points[1];if(!a||!r)return[];var o=a.value,s=r.value,l=s-o,c=l/o*100,u=a.timestamp,d=r.timestamp,h=Math.abs(d-u),p="",v=Math.floor(h/864e5),f=Math.floor(h%864e5/36e5),g=Math.floor(h%36e5/6e4),m=Math.floor(h%6e4/1e3);p=v>0?"".concat(v,"天").concat(f>0?f+"小时":""):f>0?"".concat(f,"小时").concat(g>0?g+"分钟":""):g>0?"".concat(g,"分钟"):"".concat(m,"秒");var y=0;try{if(n&&n.chart){var _=n.chart.getData();if(_&&Array.isArray(_)&&_.length>0){var b=_.findIndex(function(t){return Math.abs(t.timestamp-u)<1e3}),x=_.findIndex(function(t){return Math.abs(t.timestamp-d)<1e3});b>=0&&x>=0&&(y=Math.abs(x-b))}}}catch(z){}var w=c>=0?"+".concat(c.toFixed(2),"%"):"".concat(c.toFixed(2),"%"),S=l>=0?"+".concat(l.toFixed(2)):"".concat(l.toFixed(2)),C="".concat(w," ").concat(S);y>0?(C+=" (".concat(y,"根"),p&&(C+=" / ".concat(p)),C+=")"):p&&(C+=" (".concat(p,")"));var k=l>=0,I=k?"#0ecb81":"#f6465d",E=k?"#0ecb81":"#f6465d",A=k?"rgba(14, 203, 129, 0.1)":"rgba(246, 70, 93, 0.1)",P=e[0].x,M=e[0].y,D=e[1].x,T=e[1].y,B=(P+D)/2,F=(M+T)/2,R=-20,L=12,N=7*C.length+16,O=L+8;return[{type:"line",attrs:{coordinates:[{x:P,y:M},{x:D,y:T}]},styles:{style:"stroke",color:I,size:2,dashedValue:[4,4]},ignoreEvent:!1},{type:"circle",attrs:{x:P,y:M,r:4},styles:{style:"fill",color:I},ignoreEvent:!1},{type:"circle",attrs:{x:D,y:T,r:4},styles:{style:"fill",color:I},ignoreEvent:!1},{type:"rect",attrs:{x:B-N/2,y:F+R-O/2,width:N,height:O,r:4},styles:{style:"fill",color:A,borderSize:1,borderColor:I},ignoreEvent:!1},{type:"text",attrs:{x:B,y:F+R,text:C,align:"center",baseline:"middle"},styles:{color:E,size:L,weight:"bold"},ignoreEvent:!1}]}});var st=function(t){return t.map(function(t){var e=t.time||t.timestamp;return"string"===typeof e&&(e=parseInt(e)),e<1e10&&(e*=1e3),{timestamp:e,open:parseFloat(t.open),high:parseFloat(t.high),low:parseFloat(t.low),close:parseFloat(t.close),volume:parseFloat(t.volume||0)}}).filter(function(t){return t.timestamp&&!isNaN(t.open)&&!isNaN(t.high)&&!isNaN(t.low)&&!isNaN(t.close)}).sort(function(t,e){return t.timestamp-e.timestamp})},lt=function(t){if(t.length>0){var e=t[t.length-1];if(t.length>1){var n=t[t.length-2],a=e.close.toFixed(2),r=(e.close-n.close)/n.close*100;i("price-change",{price:a,change:r})}else{var o=e.close.toFixed(2);i("price-change",{price:o,change:0})}}},ct=function(t){return t.map(function(t){return{time:Math.floor(t.timestamp/1e3),open:t.open,high:t.high,low:t.low,close:t.close,volume:t.volume}})},ut=function(t,e,i){var n=new Date(1e3*t),a=new Date(1e3*e);switch(i){case"1m":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()&&n.getHours()===a.getHours()&&n.getMinutes()===a.getMinutes();case"5m":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()&&n.getHours()===a.getHours()&&Math.floor(n.getMinutes()/5)===Math.floor(a.getMinutes()/5);case"15m":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()&&n.getHours()===a.getHours()&&Math.floor(n.getMinutes()/15)===Math.floor(a.getMinutes()/15);case"30m":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()&&n.getHours()===a.getHours()&&Math.floor(n.getMinutes()/30)===Math.floor(a.getMinutes()/30);case"1H":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()&&n.getHours()===a.getHours();case"4H":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()&&Math.floor(n.getHours()/4)===Math.floor(a.getHours()/4);case"1D":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate();case"1W":var r=Math.floor((n.getTime()-new Date(n.getFullYear(),0,1).getTime())/6048e5),o=Math.floor((a.getTime()-new Date(a.getFullYear(),0,1).getTime())/6048e5);return n.getFullYear()===a.getFullYear()&&r===o;default:return t===e}},dt=function(){var e=(0,c.A)((0,l.A)().m(function e(){var i,o,s,c,d,p,f,m=arguments;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(i=m.length>0&&void 0!==m[0]&&m[0],t.symbol){e.n=1;break}return e.a(2);case 1:if(!a.value||i){e.n=2;break}return e.a(2);case 2:return a.value=!0,r.value=null,e.p=3,o=[],e.p=4,e.n=5,(0,v.Ay)({url:"/api/indicator/kline",method:"get",params:{market:t.market,symbol:t.symbol,timeframe:t.timeframe,limit:500}});case 5:if(s=e.v,1!==s.code||!s.data||!Array.isArray(s.data)){e.n=6;break}o=st(s.data),e.n=7;break;case 6:throw c=s.msg||"获取K线数据失败","tiingo_subscription"===s.hint&&(c=M.$t("dashboard.indicator.error.tiingoSubscription")||"Forex 1-minute data requires Tiingo paid subscription"),new Error(c);case 7:e.n=9;break;case 8:throw e.p=8,p=e.v,p;case 9:if(o&&0!==o.length){e.n=10;break}throw new Error("未获取到K线数据");case 10:n.value=o,u.value=!0,d=ct(o),lt(d),(0,h.dY)(function(){if(g.value){var e=n.value.filter(function(t){return t.timestamp&&!isNaN(t.open)&&!isNaN(t.high)&&!isNaN(t.low)&&!isNaN(t.close)});if(e.length>0&&g.value){try{g.value.applyNewData(e)}catch(i){g.value.applyNewData(e)}setTimeout(function(){g.value&&xt()},100)}}else mt();t.realtimeEnabled&&(gt(),ft())}),e.n=12;break;case 11:if(e.p=11,f=e.v,r.value=M.$t("dashboard.indicator.error.loadDataFailed")+": "+(f.message||M.$t("dashboard.indicator.error.loadDataFailedDesc")),n.value=[],g.value)try{g.value.applyNewData([])}catch(l){}case 12:return e.p=12,a.value=!1,e.f(12);case 13:return e.a(2)}},e,null,[[4,8],[3,11,12,13]])}));return function(){return e.apply(this,arguments)}}(),ht=function(){var e=(0,c.A)((0,l.A)().m(function e(i){return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.symbol&&n.value&&0!==n.value.length){e.n=1;break}return e.a(2);case 1:if(!s.value&&!p){e.n=6;break}if(!p){e.n=5;break}return e.p=2,e.n=3,p;case 3:e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2);case 6:if(u.value){e.n=7;break}return g.value&&"function"===typeof g.value.noMoreData&&g.value.noMoreData(),e.a(2);case 7:return s.value=!0,p=(0,c.A)((0,l.A)().m(function e(){var a,r,o,c,d,f;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.n=1,(0,h.dY)();case 1:return e.p=1,a=Math.floor(i/1e3),e.n=2,(0,v.Ay)({url:"/api/indicator/kline",method:"get",params:{market:t.market,symbol:t.symbol,timeframe:t.timeframe,limit:500,before_time:a}});case 2:if(r=e.v,1!==r.code||!r.data||!Array.isArray(r.data)){e.n=5;break}if(o=st(r.data),0!==o.length){e.n=3;break}return u.value=!1,g.value&&"function"===typeof g.value.noMoreData&&g.value.noMoreData(),e.a(2);case 3:if(c=o.filter(function(t){return t.timestamp0&&(a=st(i.data),r=(0,F.A)(n.value),a.length>0&&(o=Math.floor(a[a.length-1].timestamp/1e3),s=Math.floor(r[r.length-1].timestamp/1e3),ut(o,s,t.timeframe)?(c=r[r.length-1],u=a[a.length-1],r[r.length-1]={timestamp:c.timestamp,open:c.open,high:Math.max(c.high,u.high),low:Math.min(c.low,u.low),close:u.close,volume:u.volume},n.value=r,d=ct(n.value),lt(d),g.value&&"function"===typeof g.value.updateData?(h=n.value.length-1,g.value.updateData(r[h]),C(!1)):g.value&&(g.value.applyNewData(n.value),C(!1))):o>s&&(p=a.filter(function(e){var i=Math.floor(e.timestamp/1e3);return!r.some(function(e){var n=Math.floor(e.timestamp/1e3);return ut(i,n,t.timeframe)})}),p.length>0&&(n.value=[].concat((0,F.A)(r),(0,F.A)(p)),n.value.length>500&&(n.value=n.value.slice(-500)),f=ct(n.value),lt(f),g.value&&"function"===typeof g.value.applyMoreData?(g.value.applyMoreData(p),C(!0)):g.value&&(g.value.applyNewData(n.value),C(!0)))))),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[1,3]])}));return function(){return e.apply(this,arguments)}}(),ft=function(){y.value&&clearInterval(y.value);var e={"1m":5e3,"5m":1e4,"15m":15e3,"30m":3e4,"1H":6e4,"4H":3e5,"1D":6e5,"1W":18e5},i=e[t.timeframe]||1e4;b.value=Math.min(i,1e3),t.realtimeEnabled&&t.symbol&&n.value.length>0&&(y.value=setInterval(function(){!a.value&&t.symbol&&n.value&&n.value.length>0&&vt()},b.value))},gt=function(){y.value&&(clearInterval(y.value),y.value=null)},mt=function(){var t=document.getElementById("kline-chart-container");if(t)if(0!==t.clientWidth&&0!==t.clientHeight){if(g.value){try{g.value.destroy()}catch(y){}g.value=null}try{var e=document.getElementById("kline-chart-container");if(!e)throw new Error("容器元素不存在");try{g.value=Ia(e,{drawingBarVisible:!0,overlay:{visible:!0}})}catch(y){g.value=Ia(e)}if(g.value&&"function"===typeof g.value.setDrawingBarVisible?g.value.setDrawingBarVisible(!0):g.value&&"function"===typeof g.value.setDrawingBar?g.value.setDrawingBar(!0):g.value&&"function"===typeof g.value.enableDrawing&&g.value.enableDrawing(!0),!g.value)throw new Error("图表初始化失败:无法创建图表实例");if(g.value&&("function"===typeof g.value.setDrawingBarVisible&&g.value.setDrawingBarVisible(!0),"function"===typeof g.value.setDrawingBar&&g.value.setDrawingBar(!0),"function"===typeof g.value.enableDrawing&&g.value.enableDrawing(!0)),_t(),g.value&&"function"===typeof g.value.subscribeAction){if(g.value.subscribeAction("onOverlayCreated",function(t){if(A.value&&t&&t.id){var e={line:"segment",horizontalLine:"horizontalStraightLine",verticalLine:"verticalStraightLine",ray:"rayLine",straightLine:"straightLine",parallelStraightLine:"parallelStraightLine",priceLine:"priceLine",priceChannelLine:"priceChannelLine",fibonacciLine:"fibonacciLine",measure:"priceRangeMeasure"},i=e[A.value];if(!t.name||t.name===i||"priceRangeMeasure"===i){E.value.push(t.id),A.value=null;try{"function"===typeof g.value.overrideOverlay&&g.value.overrideOverlay(null)}catch(y){}}}}),"function"===typeof g.value.subscribeAction)try{g.value.subscribeAction("onOverlayComplete",function(t){A.value&&t&&t.id&&(E.value.push(t.id),A.value=null)})}catch(y){}g.value.subscribeAction("onOverlayRemoved",function(t){var e=E.value.indexOf(t);e>-1&&E.value.splice(e,1)})}if(g.value&&"function"===typeof g.value.subscribeAction){var i=null,a=!1;g.value.subscribeAction("onVisibleRangeChange",function(){var t=(0,c.A)((0,l.A)().m(function t(e){var r,o,c,d,h,v;return(0,l.A)().w(function(t){while(1)switch(t.n){case 0:if(!e||"number"!==typeof e.from){t.n=5;break}if(a){t.n=1;break}return i=e.from,a=!0,setTimeout(function(){f.value=!0},1e3),t.a(2);case 1:if(f.value){t.n=2;break}return i=e.from,t.a(2);case 2:if(!(s.value&&e.from<=0)){t.n=3;break}try{g.value&&"function"===typeof g.value.setVisibleRange&&(r=n.value.length,r>0&&(o=g.value.getVisibleRange(),o&&(c=Math.ceil((o.to-o.from)*r/100),d=.1,h=Math.min(100,d+c/r*100),g.value.setVisibleRange(d,h))))}catch(y){}return t.a(2);case 3:if(!(e.from<=5&&!s.value&&!p&&u.value&&f.value)){t.n=4;break}if(!(null!==i&&i>e.from)){t.n=4;break}if(!(n.value.length>0)){t.n=4;break}return v=n.value[0].timestamp,t.n=4,ht(v);case 4:i=e.from;case 5:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}())}if(n.value&&n.value.length>0){var o=n.value.filter(function(t){return t.timestamp&&!isNaN(t.open)&&!isNaN(t.high)&&!isNaN(t.low)&&!isNaN(t.close)});if(o.length>0){try{g.value.applyNewData(o)}catch(y){try{g.value.applyNewData(o)}catch(_){}}try{g.value.createIndicator("VOL",!1,{height:100,dragEnabled:!0})}catch(y){}(0,h.dY)(function(){xt()})}}window.addEventListener("resize",yt)}catch(r){r.value=M.$t("dashboard.indicator.error.chartInitFailed")+": "+(r.message||"未知错误")}}else{var d=0,v=10,m=function(){var t=document.getElementById("kline-chart-container");t&&t.clientWidth>0&&t.clientHeight>0?mt():d0&&t.clientHeight>0&&mt()}},_t=function(){if(g.value){var t=Y.value,e="dark"===m.value;g.value.setStyles({grid:{show:!0,horizontal:{show:!0,color:t.gridLineColor,style:"dashed",size:1},vertical:{show:!1}},candle:{priceMark:{show:!0,high:{show:!0,color:t.axisLabelColor},low:{show:!0,color:t.axisLabelColor}},tooltip:{showRule:"always",showType:"standard",labels:[M.$t("dashboard.indicator.tooltip.time"),M.$t("dashboard.indicator.tooltip.open"),M.$t("dashboard.indicator.tooltip.high"),M.$t("dashboard.indicator.tooltip.low"),M.$t("dashboard.indicator.tooltip.close"),M.$t("dashboard.indicator.tooltip.volume")],values:function(t){var e=new Date(t.timestamp);return["".concat(e.getFullYear(),"-").concat(e.getMonth()+1,"-").concat(e.getDate()," ").concat(e.getHours(),":").concat(e.getMinutes()),t.open.toFixed(2),t.high.toFixed(2),t.low.toFixed(2),t.close.toFixed(2),t.volume.toFixed(0)]}},bar:{upColor:e?"#0ecb81":"#13c2c2",downColor:e?"#f6465d":"#fa541c",noChangeColor:t.borderColor}},indicator:{tooltip:{showRule:"always",showType:"standard"}},xAxis:{show:!0,axisLine:{show:!0,color:t.borderColor}},yAxis:{show:!0,axisLine:{show:!1}},crosshair:{show:!0,horizontal:{show:!0,line:{show:!0,style:"dashed",color:t.gridLineColor,size:1}},vertical:{show:!0,line:{show:!0,style:"dashed",color:t.gridLineColor,size:1}}},watermark:{show:!1}})}},bt=function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2,r=arguments.length>5&&void 0!==arguments[5]&&arguments[5];try{var o={name:t,shortName:t,calc:e,figures:i,calcParams:n,precision:a,series:r?"price":"normal"};return ai(o),!0}catch(s){return!(!s.message||!s.message.includes("already registered"))}},xt=function(){var e=(0,c.A)((0,l.A)().m(function e(){var i,a,r,o;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!x.value){e.n=1;break}return e.a(2);case 1:if(g.value&&0!==n.value.length){e.n=2;break}return e.a(2);case 2:x.value=!0,e.p=3;try{I.value.length>0&&g.value&&(I.value.forEach(function(t){try{"function"===typeof g.value.removeOverlay?g.value.removeOverlay(t):"function"===typeof g.value.removeOverlayById&&g.value.removeOverlayById(t)}catch(e){}}),I.value=[])}catch(s){}try{k.value.length>0&&(k.value.forEach(function(t){var e="string"===typeof t?t:t.name,i="string"===typeof t?void 0:t.paneId;i?g.value.removeIndicator(i,e):(g.value.removeIndicator("candle_pane",e),g.value.removeIndicator(e))}),k.value=[])}catch(s){}i=ct(n.value),a=(0,l.A)().m(function e(){var n,a,r,s,c,u,d,h,p,v,f,m,y,b,x,w,S,C,E,A,P,M,D,T,R,L,N,O,z,V,H,Y,K,j,st,lt,ct,ut,dt,ht,pt,vt,ft,gt,mt,yt,_t,xt,wt,St,Ct,kt,It,Et,At,Pt,Mt,Dt,Tt,Bt,Ft,Rt,Lt,Nt,Ot,zt,Vt,Wt,Ht,$t,Yt,Xt,Kt,jt,Ut,Gt,Zt,qt,Jt,Qt,te,ee,ie,ne,ae,re,oe,se,le,ce,ue,de,he,pe,ve,fe,ge,me,ye,_e,be,xe,we,Se,Ce,ke,Ie,Ee,Ae,Pe,Me,De,Te,Be,Fe,Re,Le,Ne,Oe,ze,Ve,We,He,$e,Ye,Xe,Ke,je,Ue,Ge,Ze,qe,Je,Qe,ti,ei,ii,ni,ai,ri,oi,si,li,ci,ui,di,hi,pi,vi,fi,gi,mi,yi,_i;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(n=t.activeIndicators[o],e.p=1,"python"!==n.type){e.n=31;break}if(n.code){e.n=2;break}return e.a(2,0);case 2:if(e.p=2,!n.calculate||"function"!==typeof n.calculate){e.n=15;break}return e.n=3,n.calculate(i,n.params||{});case 3:if(a=e.v,r=[],a&&a.plots&&Array.isArray(a.plots)&&(r=(0,F.A)(a.plots)),!(a&&a.signals&&Array.isArray(a.signals))){e.n=14;break}s=(0,_.A)(a.signals),e.p=4,s.s();case 5:if((c=s.n()).done){e.n=11;break}if(u=c.value,!(u.data&&Array.isArray(u.data)&&u.data.length>0)){e.n=10;break}for(d=[],h=0;h0&&g.value){M=(0,_.A)(v);try{for(M.s();!(D=M.n()).done;){T=D.value;try{R=T.timestamp,R<1e10&&(R*=1e3),L=T.text,"function"===typeof g.value.createOverlay&&(N=g.value.createOverlay({name:"signalTag",points:[{timestamp:R,value:T.price},{timestamp:R,value:T.anchorPrice}],extendData:{text:L,color:T.color,side:T.side,action:T.action,price:T.price},lock:!0},"candle_pane"),N&&I.value.push(N))}catch(l){}}}catch(bi){M.e(bi)}finally{M.f()}}case 10:e.n=5;break;case 11:e.n=13;break;case 12:e.p=12,mi=e.v,s.e(mi);case 13:return e.p=13,s.f(),e.f(13);case 14:if(r.length>0&&(O=r.filter(function(t){return t.data&&Array.isArray(t.data)&&t.data.length>0}),O.length>0)){for(z=[],V={},H=0;H0)){e.n=23;break}for(xt=[],wt=0;wt0&&g.value){Lt=(0,_.A)(Ct);try{for(Lt.s();!(Nt=Lt.n()).done;){Ot=Nt.value;try{zt=Ot.timestamp,zt<1e10&&(zt*=1e3),Vt=Ot.text,"function"===typeof g.value.createOverlay&&(Wt=g.value.createOverlay({name:"signalTag",points:[{timestamp:zt,value:Ot.price},{timestamp:zt,value:Ot.anchorPrice}],extendData:{text:Vt,color:Ot.color,side:Ot.side,action:Ot.action,price:Ot.price},lock:!0},"candle_pane"),Wt&&I.value.push(Wt))}catch(l){}}}catch(bi){Lt.e(bi)}finally{Lt.f()}}case 23:e.n=18;break;case 24:e.n=26;break;case 25:e.p=25,yi=e.v,mt.e(yi);case 26:return e.p=26,mt.f(),e.f(26);case 27:if(gt.length>0&&(Ht=gt.filter(function(t){return t.data&&Array.isArray(t.data)&&t.data.length>0}),Ht.length>0)){for($t=[],Yt={},Xt=0;Xt0&&(0,h.dY)(function(){g.value&&xt()})},{deep:!0}),(0,h.wB)(function(){return t.realtimeEnabled},function(t){t?ft():gt()}),(0,h.sV)((0,c.A)((0,l.A)().m(function e(){return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.n=1,(0,h.dY)();case 1:return!t.theme||"dark"!==t.theme&&"light"!==t.theme||(m.value=t.theme),e.p=2,e.n=3,K();case 3:e.n=5;break;case 4:e.p=4,e.v,$.value=!0;case 5:(0,h.dY)(function(){setTimeout(function(){!g.value&&t.symbol&&mt()},300)});case 6:return e.a(2)}},e,null,[[2,4]])}))),(0,h.xo)(function(){gt(),g.value&&(g.value.destroy(),g.value=null),window.removeEventListener("resize",yt)}),{klineData:n,loading:a,error:r,loadingHistory:s,chartRef:g,chartTheme:m,themeConfig:Y,getIndicatorColor:X,handleRetry:wt,loadingPython:W,pythonReady:H,pyodideLoadFailed:$,formatKlineData:st,updatePricePanel:lt,isSameTimeframe:ut,loadKlineData:dt,loadMoreHistoryData:pt,updateKlineRealtime:vt,startRealtime:ft,stopRealtime:gt,initChart:mt,handleResize:yt,updateChartTheme:_t,updateIndicators:xt,executePythonStrategy:U,parsePythonStrategy:j,indicatorButtons:R,isIndicatorActive:L,toggleIndicator:z,drawingTools:D,activeDrawingTool:A,selectDrawingTool:N,clearAllDrawings:O}}},La=Ra,Na=(0,E.A)(La,M,D,!1,null,"58f93984",null),Oa=Na.exports,za=i(32945),Va={name:"DashboardIndicator",components:{IndicatorEditor:P,KlineChart:Oa,QuickTradePanel:za.A},computed:(0,d.A)((0,d.A)({},(0,p.aH)({navTheme:function(t){return t.app.theme}})),{},{chartTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme?"dark":"light"},isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme}}),setup:function(){var t=(0,h.nI)(),e=t||{},i=e.proxy,n=(0,h.KR)(1),a=(0,h.KR)(!1),p=(0,h.KR)(void 0),m=(0,h.KR)([]),y=(0,h.KR)([]),_=(0,h.KR)(!1),b=(0,h.KR)(""),x=(0,h.KR)(!1),w=(0,h.KR)(!1),S=(0,h.KR)(!1),C=(0,h.KR)(""),k=(0,h.KR)(""),I=(0,h.KR)([]),E=(0,h.KR)(!1),A=(0,h.KR)([]),P=(0,h.KR)(!1),M=(0,h.KR)(null),D=(0,h.KR)(null),T=(0,h.KR)([]),B=(0,h.KR)(!1),F=(0,h.KR)(!1),R=(0,h.KR)(""),L=(0,h.KR)(""),N=(0,h.KR)(0),O=(0,h.EW)(function(){return"crypto"===(Y.value||"").toLowerCase()}),z=function(){O.value?(R.value=$.value||"",N.value=parseFloat(X.value)||0,L.value="",F.value=!0):u.A.warning(i.$t("quickTrade.cryptoOnly"))},V=function(){u.A.success(i.$t("quickTrade.orderSuccess"))},W=function(t){t&&O.value&&(R.value=t)},H=function(){i&&i.$router&&i.$router.push("/indicator-community")},$=(0,h.KR)(""),Y=(0,h.KR)(""),X=(0,h.KR)("--"),K=(0,h.KR)(0),j=(0,h.EW)(function(){return K.value>0?"color-up":K.value<0?"color-down":""}),U=(0,h.KR)("1D"),G=(0,h.KR)([]),Z=(0,h.KR)(!1),q=[{id:"sma5",name:"SMA5 (5日均线)",shortName:"SMA5",type:"line",defaultParams:{length:5}},{id:"sma10",name:"SMA10 (10日均线)",shortName:"SMA10",type:"line",defaultParams:{length:10}},{id:"sma20",name:"SMA20 (20日均线)",shortName:"SMA20",type:"line",defaultParams:{length:20}},{id:"sma30",name:"SMA30 (30日均线)",shortName:"SMA30",type:"line",defaultParams:{length:30}}],J=[{id:"ema5",name:"EMA5 (5日指数均线)",shortName:"EMA5",type:"line",defaultParams:{length:5}},{id:"ema10",name:"EMA10 (10日指数均线)",shortName:"EMA10",type:"line",defaultParams:{length:10}},{id:"ema20",name:"EMA20 (20日指数均线)",shortName:"EMA20",type:"line",defaultParams:{length:20}},{id:"ema30",name:"EMA30 (30日指数均线)",shortName:"EMA30",type:"line",defaultParams:{length:30}}],Q=(0,h.KR)([]),tt=(0,h.KR)([]),et=(0,h.KR)(!1),it=(0,h.KR)(!1),nt=(0,h.KR)(null),at=(0,h.KR)(""),rt=(0,h.KR)([]),ot=(0,h.KR)({}),st=(0,h.KR)(!1),lt=(0,h.KR)({}),ct=(0,h.KR)(!1),ut=(0,h.KR)(!1),dt=(0,h.KR)(!1),ht=(0,h.KR)(null),pt=(0,h.KR)(!1),vt=(0,h.KR)(null),ft=(0,h.KR)(!1),gt=(0,h.KR)(null),mt=(0,h.KR)(!1),yt=(0,h.KR)(null),_t=(0,h.KR)(!1),bt=(0,h.KR)(null),xt=(0,h.KR)(!1),wt=(0,h.KR)(!1),St=(0,h.KR)("free"),Ct=(0,h.KR)(10),kt=(0,h.KR)(""),It=(0,h.KR)(!1),Et={price:[{required:!0,message:"请输入价格",trigger:"blur",type:"number"}]},At=(0,h.KR)(!1),Pt=function(t){var e=t.price,i=t.change;X.value=e,K.value=i},Mt=function(){},Dt=(0,h.KR)([]),Tt=(0,h.KR)([]),Bt=function(t){U.value=t},Ft=function(t){return t?Object.values(t).join(", "):""},Rt=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,i,r,o,s,c;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(a.value=!0,t.p=1,r=(0,h.nI)(),o=null===r||void 0===r||null===(e=r.proxy)||void 0===e?void 0:e.$store,s=(null===o||void 0===o||null===(i=o.getters)||void 0===i?void 0:i.userInfo)||{},!s||!s.email){t.n=2;break}return n.value=s.id,a.value=!1,Lt(),ae(),t.a(2);case 2:return t.n=3,(0,g.ug)();case 3:c=t.v,c&&1===c.code&&c.data&&(n.value=c.data.id,o&&o.commit("SET_INFO",c.data),Lt(),ae()),t.n=5;break;case 4:t.p=4,t.v;case 5:return t.p=5,a.value=!1,t.f(5);case 6:return t.a(2)}},t,null,[[1,4,5,6]])}));return function(){return t.apply(this,arguments)}}(),Lt=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,a;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(n.value){t.n=1;break}return t.a(2);case 1:return _.value=!0,t.p=2,t.n=3,(0,f.Qo)({userid:n.value});case 3:e=t.v,e&&1===e.code&&e.data&&(y.value=e.data.map(function(t){return(0,d.A)((0,d.A)({},t),{},{label:t.symbol+(t.name?" (".concat(t.name,")"):""),value:"".concat(t.market,":").concat(t.symbol)})}),Nt(),y.value.length>0&&!$.value&&(a=y.value[0],Y.value=a.market,$.value=a.symbol,p.value=a.value)),t.n=5;break;case 4:t.p=4,t.v,u.A.error(i.$t("dashboard.indicator.error.loadWatchlistFailed"));case 5:return t.p=5,_.value=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}));return function(){return t.apply(this,arguments)}}(),Nt=function(){b.value?m.value=y.value.filter(function(t){return t.symbol.toLowerCase().includes(b.value.toLowerCase())||t.name&&t.name.toLowerCase().includes(b.value.toLowerCase())}):m.value=y.value},Ot=function(t){b.value=t,0===y.value.length&&t&&(x.value=!0),Nt()},zt=function(t){x.value=t,t||(b.value="")},Vt=function(t){if("__empty_watchlist_hint__"!==t){if("__add_stock_option__"===t)return w.value=!0,void setTimeout(function(){p.value=void 0},0);var e=y.value.find(function(e){return e.value===t});if(e||(e=m.value.find(function(e){return e.value===t})),!e&&t.includes(":")){var i=t.split(":"),n=(0,s.A)(i,2),a=n[0],r=n[1];e={market:a,symbol:r,value:t}}e&&(Y.value=e.market,$.value=e.symbol,p.value=e.value)}},Wt=function(t,e){var i,n=(null===(i=e.componentOptions)||void 0===i||null===(i=i.propsData)||void 0===i?void 0:i.value)||"";return"__empty_watchlist_hint__"===n||"__add_stock_option__"===n||n.toLowerCase().includes(t.toLowerCase())},Ht=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return t.p=0,t.n=1,(0,f.iO)();case 1:e=t.v,e&&1===e.code&&e.data&&Array.isArray(e.data)?T.value=e.data.map(function(t){return{value:t.value,i18nKey:t.i18nKey||"dashboard.analysis.market.".concat(t.value)}}):e&&1===e.code&&e.data&&"object"===(0,o.A)(e.data)?T.value=Object.keys(e.data).map(function(t){return{value:t,i18nKey:"dashboard.analysis.market.".concat(t)}}):T.value=[{value:"USStock",i18nKey:"dashboard.analysis.market.USStock"},{value:"Crypto",i18nKey:"dashboard.analysis.market.Crypto"},{value:"Forex",i18nKey:"dashboard.analysis.market.Forex"},{value:"Futures",i18nKey:"dashboard.analysis.market.Futures"}],T.value.length>0&&!C.value&&(C.value=T.value[0].value),t.n=3;break;case 2:t.p=2,t.v,T.value=[{value:"USStock",i18nKey:"dashboard.analysis.market.USStock"},{value:"Crypto",i18nKey:"dashboard.analysis.market.Crypto"},{value:"Forex",i18nKey:"dashboard.analysis.market.Forex"},{value:"Futures",i18nKey:"dashboard.analysis.market.Futures"}];case 3:return t.a(2)}},t,null,[[0,2]])}));return function(){return t.apply(this,arguments)}}(),$t=function(){w.value=!1,M.value=null,k.value="",I.value=[],B.value=!1,C.value=T.value.length>0?T.value[0].value:""},Yt=function(t){C.value=t,k.value="",I.value=[],M.value=null,B.value=!1,Zt(t)},Xt=function(t){var e=t.target.value;if(k.value=e,D.value&&clearTimeout(D.value),!e||""===e.trim())return I.value=[],B.value=!1,void(M.value=null);D.value=setTimeout(function(){jt(e)},500)},Kt=function(t){t&&t.trim()&&(C.value?I.value.length>0||(B.value&&0===I.value.length?Ut():jt(t)):u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")))},jt=function(){var t=(0,c.A)((0,l.A)().m(function t(e){var n;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e&&""!==e.trim()){t.n=1;break}return I.value=[],B.value=!1,t.a(2);case 1:if(C.value){t.n=2;break}return u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")),t.a(2);case 2:return E.value=!0,B.value=!0,t.p=3,t.n=4,(0,f._3)({market:C.value,keyword:e.trim(),limit:20});case 4:n=t.v,n&&1===n.code&&n.data&&n.data.length>0?I.value=n.data:(I.value=[],M.value={market:C.value,symbol:e.trim().toUpperCase(),name:""}),t.n=6;break;case 5:t.p=5,t.v,I.value=[],M.value={market:C.value,symbol:e.trim().toUpperCase(),name:""};case 6:return t.p=6,E.value=!1,t.f(6);case 7:return t.a(2)}},t,null,[[3,5,6,7]])}));return function(e){return t.apply(this,arguments)}}(),Ut=function(){k.value&&k.value.trim()?C.value?M.value={market:C.value,symbol:k.value.trim().toUpperCase(),name:""}:u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")):u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseEnterSymbol"))},Gt=function(t){M.value={market:t.market,symbol:t.symbol,name:t.name||t.symbol}},Zt=function(){var t=(0,c.A)((0,l.A)().m(function t(e){var i;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e||(e=C.value||(T.value.length>0?T.value[0].value:"")),e){t.n=1;break}return t.a(2);case 1:return P.value=!0,t.p=2,t.n=3,(0,f.z6)({market:e,limit:10});case 3:i=t.v,i&&1===i.code&&i.data?A.value=i.data:A.value=[],t.n=5;break;case 4:t.p=4,t.v,A.value=[];case 5:return t.p=5,P.value=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}));return function(e){return t.apply(this,arguments)}}(),qt=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,a,r,o,s,c;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e="",a="",!M.value){t.n=1;break}e=M.value.market,a=M.value.symbol.toUpperCase(),t.n=4;break;case 1:if(!k.value||!k.value.trim()){t.n=3;break}if(C.value){t.n=2;break}return u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")),t.a(2);case 2:e=C.value,a=k.value.trim().toUpperCase(),t.n=4;break;case 3:return u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectOrEnterSymbol")),t.a(2);case 4:return S.value=!0,t.p=5,t.n=6,(0,f.dp)({userid:n.value,market:e,symbol:a});case 6:if(r=t.v,!r||1!==r.code){t.n=8;break}return u.A.success(i.$t("dashboard.analysis.message.addStockSuccess")),$t(),t.n=7,Lt();case 7:t.n=9;break;case 8:u.A.error((null===r||void 0===r?void 0:r.msg)||i.$t("dashboard.analysis.message.addStockFailed"));case 9:t.n=11;break;case 10:t.p=10,c=t.v,s=(null===c||void 0===c||null===(o=c.response)||void 0===o||null===(o=o.data)||void 0===o?void 0:o.msg)||(null===c||void 0===c?void 0:c.message)||i.$t("dashboard.analysis.message.addStockFailed"),u.A.error(s);case 11:return t.p=11,S.value=!1,t.f(11);case 12:return t.a(2)}},t,null,[[5,10,11,12]])}));return function(){return t.apply(this,arguments)}}(),Jt=function(t){if(!ie(t.id)){var e=t.params||t.defaultParams||{};G.value.push((0,d.A)((0,d.A)({},t),{},{id:t.id,params:(0,d.A)({},e)}))}},Qt=function(t){G.value=G.value.filter(function(e){return e.id!==t})},te=function(t){var e=t.action,i=t.indicator;if("add"===e){var n=(0,d.A)((0,d.A)({},i),{},{calculate:ee(i.id)});Jt(n)}else"remove"===e&&Qt(i.id)},ee=function(t){return null},ie=function(t){return"sma"===t?q.some(function(t){return G.value.some(function(e){return e.id===t.id})}):"ema"===t?J.some(function(t){return G.value.some(function(e){return e.id===t.id})}):G.value.some(function(e){return e.id===t})},ne=function(){var t=new Set;return q.forEach(function(e){return t.add(e.id)}),J.forEach(function(e){return t.add(e.id)}),G.value.filter(function(e){return!t.has(e.id)})},ae=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,i,a;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(n.value){t.n=1;break}return t.a(2);case 1:return et.value=!0,t.p=2,t.n=3,(0,v.Ay)({url:"/api/indicator/getIndicators",method:"get",params:{userid:n.value}});case 3:e=t.v,1===e.code&&e.data&&(i=e.data.filter(function(t){return!t.is_buy||0===t.is_buy||"0"===t.is_buy}),a=e.data.filter(function(t){return 1===t.is_buy||"1"===t.is_buy}),Q.value=i.map(function(t){return(0,d.A)((0,d.A)({},t),{},{type:"python",source:"custom"})}),tt.value=a.map(function(t){return(0,d.A)((0,d.A)({},t),{},{type:"python",source:"purchased"})})),t.n=5;break;case 4:t.p=4,t.v;case 5:return t.p=5,et.value=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}));return function(){return t.apply(this,arguments)}}(),re=(0,h.KR)(null),oe=function(){var t=(0,c.A)((0,l.A)().m(function t(e,n){var a,r,o,s,c,h,p,v,f;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(a="".concat(n,"-").concat(e.id),!ie(a)){t.n=1;break}return Qt(a),t.a(2);case 1:if(t.p=1,r=e.code||"",re.value){t.n=2;break}return u.A.error(i.$t("dashboard.indicator.error.chartNotReady")),t.a(2);case 2:if("function"===typeof re.value.parsePythonStrategy){t.n=3;break}return u.A.error(i.$t("dashboard.indicator.error.chartMethodNotReady")),t.a(2);case 3:if("function"===typeof re.value.executePythonStrategy){t.n=4;break}return u.A.error(i.$t("dashboard.indicator.error.chartExecuteNotReady")),t.a(2);case 4:if(o=re.value.parsePythonStrategy(r),o){t.n=5;break}return u.A.error(i.$t("dashboard.indicator.error.parseFailed")),t.a(2);case 5:s=e.userParams||{},c=r,h=(0,d.A)({},s),p={id:a,name:e.name,type:"python",code:c,description:e.description,parsed:o,userParams:h,originalId:e.id,user_id:e.user_id||e.userId,is_encrypted:e.is_encrypted||e.isEncrypted||0,calculate:function(t,i){return re.value.executePythonStrategy(c,t,(0,d.A)((0,d.A)({},i),h),{id:e.id,user_id:e.user_id||e.userId,is_encrypted:e.is_encrypted||e.isEncrypted||0})}},v=(0,d.A)((0,d.A)({},o.params),s),G.value.push((0,d.A)((0,d.A)({},p),{},{params:v})),t.n=7;break;case 6:t.p=6,f=t.v,u.A.error(i.$t("dashboard.indicator.error.addIndicatorFailed")+": "+(f.message||"未知错误"));case 7:return t.a(2)}},t,null,[[1,6]])}));return function(e,i){return t.apply(this,arguments)}}(),se=function(){var t=(0,c.A)((0,l.A)().m(function t(e,n){var a,r,o,s,c;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(a="".concat(n,"-").concat(e.id),!ie(a)){t.n=1;break}Qt(a),t.n=5;break;case 1:return t.p=1,st.value=!0,t.n=2,i.$http.get("/api/indicator/getIndicatorParams",{params:{indicator_id:e.id}});case 2:r=t.v,r&&1===r.code&&Array.isArray(r.data)&&r.data.length>0?(rt.value=r.data,o="".concat(n,"-").concat(e.id),s=lt.value[o],c={},r.data.forEach(function(t){var e=s&&void 0!==s[t.name]?s[t.name]:t.default;e="int"===t.type?parseInt(e)||0:"float"===t.type?parseFloat(e)||0:"bool"===t.type?!0===e||"true"===e||1===e||"1"===e:e||"",c[t.name]=e}),ot.value=c,nt.value=e,at.value=n,it.value=!0):oe(e,n),t.n=4;break;case 3:t.p=3,t.v,oe(e,n);case 4:return t.p=4,st.value=!1,t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}));return function(e,i){return t.apply(this,arguments)}}(),le=function(){if(nt.value){var t="".concat(at.value,"-").concat(nt.value.id);lt.value[t]=(0,d.A)({},ot.value);var e=(0,d.A)((0,d.A)({},nt.value),{},{userParams:(0,d.A)({},ot.value)});oe(e,at.value)}it.value=!1,nt.value=null,at.value=""},ce=function(){ue(),it.value=!1,setTimeout(function(){nt.value=null,at.value=""},100)},ue=function(){if(nt.value&&at.value){var t="".concat(at.value,"-").concat(nt.value.id);lt.value[t]=JSON.parse(JSON.stringify(ot.value))}},de=function(){ue()},he=function(t){var e=t.code,n=t.name;if(e&&e.trim())try{if(!re.value)return void u.A.error(i.$t("dashboard.indicator.error.chartNotReady"));if("function"!==typeof re.value.parsePythonStrategy)return void u.A.error(i.$t("dashboard.indicator.error.chartMethodNotReady"));if("function"!==typeof re.value.executePythonStrategy)return void u.A.error(i.$t("dashboard.indicator.error.chartExecuteNotReady"));var a=re.value.parsePythonStrategy(e);if(!a)return void u.A.error(i.$t("dashboard.indicator.error.parseFailedCheck"));var r={id:"temp-editor-indicator",name:n||"临时指标",type:"python",code:e,description:"",parsed:a,calculate:function(t,i){var n=e;return re.value.executePythonStrategy(n,t,i)}},o=G.value.findIndex(function(t){return"temp-editor-indicator"===t.id});o>=0&&G.value.splice(o,1),G.value.push((0,d.A)((0,d.A)({},r),{},{params:(0,d.A)({},a.params)})),u.A.success(i.$t("dashboard.indicator.success.runIndicator"))}catch(s){u.A.error(i.$t("dashboard.indicator.error.runIndicatorFailed")+": "+(s.message||"未知错误"))}else u.A.warning(i.$t("dashboard.indicator.warning.enterCode"))},pe=function(){ht.value=null,dt.value=!0},ve=function(t){ht.value=t,dt.value=!0},fe=function(){ct.value=!ct.value},ge=function(t){r.A.confirm({title:i.$t("dashboard.indicator.delete.confirmTitle"),content:i.$t("dashboard.indicator.delete.confirmContent",{name:t.name}),okText:i.$t("dashboard.indicator.delete.confirmOk"),okType:"danger",cancelText:i.$t("dashboard.indicator.delete.confirmCancel"),onOk:function(){var e=(0,c.A)((0,l.A)().m(function e(){var a,r,o;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,v.Ay)({url:"/api/indicator/deleteIndicator",method:"post",data:{id:t.id,userid:n.value}});case 1:if(a=e.v,1!==a.code){e.n=3;break}return u.A.success(i.$t("dashboard.indicator.delete.success")),r="custom-"+t.id,ie(r)&&Qt(r),e.n=2,ae();case 2:e.n=4;break;case 3:u.A.error(a.msg||i.$t("dashboard.indicator.delete.failed"));case 4:e.n=6;break;case 5:e.p=5,o=e.v,u.A.error(i.$t("dashboard.indicator.delete.failed")+": "+(o.message||"未知错误"));case 6:return e.a(2)}},e,null,[[0,5]])}));function a(){return e.apply(this,arguments)}return a}()})},me=function(t){i.$router.push({path:"/backtest-center",query:{tab:"indicator",indicator_id:String(t.id)}})},ye=function(t){i.$router.push({path:"/backtest-center",query:{tab:"indicator",indicator_id:String(t.id),view:"history"}})},_e=function(t){},be=function(t){bt.value=(0,d.A)({},t),St.value=t.pricing_type||"free",Ct.value=t.price||10,kt.value=t.description||"",It.value=!!t.vip_free,_t.value=!0},xe=function(t){i.$router.push({path:"/trading-assistant",query:{mode:"create",indicator_id:String(t.id),indicator_name:t.name||"",indicator_desc:t.description||""}})},we=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,a;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(n.value){t.n=1;break}return u.A.error(i.$t("dashboard.indicator.error.pleaseLogin")),t.a(2);case 1:return xt.value=!0,t.p=2,t.n=3,(0,v.Ay)({url:"/api/indicator/saveIndicator",method:"post",data:{userid:n.value,id:bt.value.id,code:bt.value.code,name:bt.value.name,description:kt.value,publishToCommunity:!0,pricingType:St.value,price:"paid"===St.value?Ct.value:0,vipFree:"paid"===St.value&&It.value}});case 3:if(e=t.v,1!==e.code){t.n=5;break}return u.A.success(i.$t("dashboard.indicator.publish.success")),_t.value=!1,bt.value=null,t.n=4,ae();case 4:t.n=6;break;case 5:u.A.error(e.msg||i.$t("dashboard.indicator.publish.failed"));case 6:t.n=8;break;case 7:t.p=7,a=t.v,u.A.error(i.$t("dashboard.indicator.publish.failed")+": "+(a.message||""));case 8:return t.p=8,xt.value=!1,t.f(8);case 9:return t.a(2)}},t,null,[[2,7,8,9]])}));return function(){return t.apply(this,arguments)}}(),Se=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(n.value&&bt.value){t.n=1;break}return t.a(2);case 1:return wt.value=!0,t.p=2,t.n=3,(0,v.Ay)({url:"/api/indicator/saveIndicator",method:"post",data:{userid:n.value,id:bt.value.id,code:bt.value.code,name:bt.value.name,description:bt.value.description,publishToCommunity:!1,pricingType:"free",price:0,vipFree:!1}});case 3:if(e=t.v,1!==e.code){t.n=5;break}return u.A.success(i.$t("dashboard.indicator.publish.unpublishSuccess")),_t.value=!1,bt.value=null,t.n=4,ae();case 4:t.n=6;break;case 5:u.A.error(e.msg||i.$t("dashboard.indicator.publish.unpublishFailed"));case 6:t.n=8;break;case 7:t.p=7,t.v,u.A.error(i.$t("dashboard.indicator.publish.unpublishFailed"));case 8:return t.p=8,wt.value=!1,t.f(8);case 9:return t.a(2)}},t,null,[[2,7,8,9]])}));return function(){return t.apply(this,arguments)}}(),Ce=function(){var t=(0,c.A)((0,l.A)().m(function t(e){var a,r,o;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(n.value){t.n=1;break}return u.A.error(i.$t("dashboard.indicator.error.pleaseLogin")),t.a(2);case 1:return a=i.$refs.indicatorEditor,a&&(a.saving=!0),t.p=2,t.n=3,(0,v.Ay)({url:"/api/indicator/saveIndicator",method:"post",data:{userid:n.value,id:e.id||0,code:e.code}});case 3:if(r=t.v,1!==r.code){t.n=5;break}return u.A.success(i.$t("dashboard.indicator.save.success")),dt.value=!1,ht.value=null,t.n=4,ae();case 4:t.n=6;break;case 5:u.A.error(r.msg||i.$t("dashboard.indicator.save.failed"));case 6:t.n=8;break;case 7:t.p=7,o=t.v,u.A.error(i.$t("dashboard.indicator.save.failed")+": "+(o.message||"未知错误"));case 8:return t.p=8,a&&(a.saving=!1),t.f(8);case 9:return t.a(2)}},t,null,[[2,7,8,9]])}));return function(e){return t.apply(this,arguments)}}(),ke=function(t){var e=t.end_time;if(1===e||"1"===e)return i.$t("dashboard.indicator.status.normalPermanent");if(!e||0===e)return i.$t("dashboard.indicator.status.normal");var n=Math.floor(Date.now()/1e3);return e0&&!C.value&&(C.value=T.value[0].value),C.value&&Zt(C.value)):(M.value=null,k.value="",I.value=[],B.value=!1,D.value&&(clearTimeout(D.value),D.value=null))}),(0,h.wB)(function(){return ot.value},function(t){if(it.value&&nt.value&&at.value){var e="".concat(at.value,"-").concat(nt.value.id);lt.value[e]=JSON.parse(JSON.stringify(t))}},{deep:!0,immediate:!1}),(0,h.wB)(it,function(t){t||ue()}),{userId:n,klineChart:re,searchSymbol:p,symbolSuggestions:m,watchlist:y,symbolSearchValue:b,symbolSearchOpen:x,currentSymbol:$,currentMarket:Y,currentPrice:X,priceChange:K,priceChangeClass:j,timeframe:U,loadingWatchlist:_,activeIndicators:G,trendIndicators:Dt,oscillatorIndicators:Tt,customIndicators:Q,purchasedIndicators:tt,loadingIndicators:et,realtimeEnabled:At,toggleRealtime:De,handleSymbolSearch:Ot,handleSymbolSelect:Vt,handleDropdownVisibleChange:zt,filterSymbolOption:Wt,getMarketName:Pe,getMarketColor:Me,setTimeframe:Bt,addIndicator:Jt,removeIndicator:Qt,isIndicatorActive:ie,loadIndicators:ae,addPythonIndicator:oe,toggleIndicator:se,getIndicatorStatus:ke,getIndicatorStatusIcon:Ie,getIndicatorStatusClass:Ee,getExpiryTimeText:Ae,formatParams:Ft,loadWatchlist:Lt,getCustomActiveIndicators:ne,showIndicatorEditor:dt,editingIndicator:ht,handleCreateIndicator:pe,handleRunIndicator:he,handleSaveIndicator:Ce,handleEditIndicator:ve,handleDeleteIndicator:ge,toggleCustomSection:fe,customSectionCollapsed:ct,purchasedSectionCollapsed:ut,handlePriceChange:Pt,handleChartRetry:Mt,handleIndicatorToggle:te,showParamsModal:it,pendingIndicator:nt,indicatorParams:rt,indicatorParamValues:ot,loadingParams:st,confirmIndicatorParams:le,cancelIndicatorParams:ce,handleParamsModalAfterClose:de,showBacktestModal:pt,backtestIndicator:vt,handleOpenBacktest:me,showBacktestHistoryDrawer:ft,backtestHistoryIndicator:gt,handleOpenBacktestHistory:ye,showBacktestRunViewer:mt,selectedBacktestRun:yt,handleViewBacktestRun:_e,showPublishModal:_t,publishIndicator:bt,publishing:xt,unpublishing:wt,publishPricingType:St,publishPrice:Ct,publishDescription:kt,publishVipFree:It,publishRules:Et,handlePublishIndicator:be,handleCreateStrategyFromIndicator:xe,handleConfirmPublish:we,handleUnpublish:Se,selectedSymbol:$,selectedMarket:Y,selectedTimeframe:U,isMobile:Z,showAddStockModal:w,addingStock:S,selectedMarketTab:C,symbolSearchKeyword:k,symbolSearchResults:I,searchingSymbols:E,hotSymbols:A,loadingHotSymbols:P,selectedSymbolForAdd:M,marketTypes:T,hasSearched:B,handleCloseAddStockModal:$t,handleMarketTabChange:Yt,handleSymbolSearchInput:Xt,handleSearchOrInput:Kt,searchSymbolsInModal:jt,selectSymbol:Gt,loadHotSymbols:Zt,handleAddStock:qt,handleDirectAdd:Ut,loadMarketTypes:Ht,showQuickTrade:F,qtSymbol:R,qtSide:L,qtPrice:N,isCryptoMarket:O,openQuickTrade:z,onQuickTradeSuccess:V,handleQuickTradeSymbolChange:W,goToIndicatorMarket:H}}},Wa=Va,Ha=(0,E.A)(Wa,n,a,!1,null,"6bd239a6",null),$a=Ha.exports},40955:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(80754),i(84636),i(39506),i(57165))})(0,function(t){return function(){var e=t,i=e.lib,n=i.BlockCipher,a=e.algo,r=[],o=[],s=[],l=[],c=[],u=[],d=[],h=[],p=[],v=[];(function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var i=0,n=0;for(e=0;e<256;e++){var a=n^n<<1^n<<2^n<<3^n<<4;a=a>>>8^255&a^99,r[i]=a,o[a]=i;var f=t[i],g=t[f],m=t[g],y=257*t[a]^16843008*a;s[i]=y<<24|y>>>8,l[i]=y<<16|y>>>16,c[i]=y<<8|y>>>24,u[i]=y;y=16843009*m^65537*g^257*f^16843008*i;d[a]=y<<24|y>>>8,h[a]=y<<16|y>>>16,p[a]=y<<8|y>>>24,v[a]=y,i?(i=f^t[t[t[m^f]]],n^=t[t[n]]):i=n=1}})();var f=[0,1,2,4,8,16,32,64,128,27,54],g=a.AES=n.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,i=t.sigBytes/4,n=this._nRounds=i+6,a=4*(n+1),o=this._keySchedule=[],s=0;s6&&s%i==4&&(u=r[u>>>24]<<24|r[u>>>16&255]<<16|r[u>>>8&255]<<8|r[255&u]):(u=u<<8|u>>>24,u=r[u>>>24]<<24|r[u>>>16&255]<<16|r[u>>>8&255]<<8|r[255&u],u^=f[s/i|0]<<24),o[s]=o[s-i]^u);for(var l=this._invKeySchedule=[],c=0;c>>24]]^h[r[u>>>16&255]]^p[r[u>>>8&255]]^v[r[255&u]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,s,l,c,u,r)},decryptBlock:function(t,e){var i=t[e+1];t[e+1]=t[e+3],t[e+3]=i,this._doCryptBlock(t,e,this._invKeySchedule,d,h,p,v,o);i=t[e+1];t[e+1]=t[e+3],t[e+3]=i},_doCryptBlock:function(t,e,i,n,a,r,o,s){for(var l=this._nRounds,c=t[e]^i[0],u=t[e+1]^i[1],d=t[e+2]^i[2],h=t[e+3]^i[3],p=4,v=1;v>>24]^a[u>>>16&255]^r[d>>>8&255]^o[255&h]^i[p++],g=n[u>>>24]^a[d>>>16&255]^r[h>>>8&255]^o[255&c]^i[p++],m=n[d>>>24]^a[h>>>16&255]^r[c>>>8&255]^o[255&u]^i[p++],y=n[h>>>24]^a[c>>>16&255]^r[u>>>8&255]^o[255&d]^i[p++];c=f,u=g,d=m,h=y}f=(s[c>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[255&h])^i[p++],g=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[h>>>8&255]<<8|s[255&c])^i[p++],m=(s[d>>>24]<<24|s[h>>>16&255]<<16|s[c>>>8&255]<<8|s[255&u])^i[p++],y=(s[h>>>24]<<24|s[c>>>16&255]<<16|s[u>>>8&255]<<8|s[255&d])^i[p++];t[e]=f,t[e+1]=g,t[e+2]=m,t[e+3]=y},keySize:8});e.AES=n._createHelper(g)}(),t.AES})},43128:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(80754),i(84636),i(39506),i(57165))})(0,function(t){return function(){var e=t,i=e.lib,n=i.BlockCipher,a=e.algo;const r=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],s=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var l={pbox:[],sbox:[]};function c(t,e){let i=e>>24&255,n=e>>16&255,a=e>>8&255,r=255&e,o=t.sbox[0][i]+t.sbox[1][n];return o^=t.sbox[2][a],o+=t.sbox[3][r],o}function u(t,e,i){let n,a=e,o=i;for(let s=0;s1;--s)a^=t.pbox[s],o=c(t,a)^o,n=a,a=o,o=n;return n=a,a=o,o=n,o^=t.pbox[1],a^=t.pbox[0],{left:a,right:o}}function h(t,e,i){for(let r=0;r<4;r++){t.sbox[r]=[];for(let e=0;e<256;e++)t.sbox[r][e]=s[r][e]}let n=0;for(let s=0;s=i&&(n=0);let a=0,l=0,c=0;for(let o=0;o>>2];t.sigBytes-=e}},m=(n.BlockCipher=d.extend({cfg:d.cfg.extend({mode:v,padding:g}),reset:function(){var t;d.reset.call(this);var e=this.cfg,i=e.iv,n=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=n.createEncryptor:(t=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,i&&i.words):(this._mode=t.call(n,this,i&&i.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4}),n.CipherParams=a.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),y=i.format={},_=y.OpenSSL={stringify:function(t){var e,i=t.ciphertext,n=t.salt;return e=n?r.create([1398893684,1701076831]).concat(n).concat(i):i,e.toString(l)},parse:function(t){var e,i=l.parse(t),n=i.words;return 1398893684==n[0]&&1701076831==n[1]&&(e=r.create(n.slice(2,4)),n.splice(0,4),i.sigBytes-=16),m.create({ciphertext:i,salt:e})}},b=n.SerializableCipher=a.extend({cfg:a.extend({format:_}),encrypt:function(t,e,i,n){n=this.cfg.extend(n);var a=t.createEncryptor(i,n),r=a.finalize(e),o=a.cfg;return m.create({ciphertext:r,key:i,iv:o.iv,algorithm:t,mode:o.mode,padding:o.padding,blockSize:t.blockSize,formatter:n.format})},decrypt:function(t,e,i,n){n=this.cfg.extend(n),e=this._parse(e,n.format);var a=t.createDecryptor(i,n).finalize(e.ciphertext);return a},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),x=i.kdf={},w=x.OpenSSL={execute:function(t,e,i,n,a){if(n||(n=r.random(8)),a)o=u.create({keySize:e+i,hasher:a}).compute(t,n);else var o=u.create({keySize:e+i}).compute(t,n);var s=r.create(o.words.slice(e),4*i);return o.sigBytes=4*e,m.create({key:o,iv:s,salt:n})}},S=n.PasswordBasedCipher=b.extend({cfg:b.cfg.extend({kdf:w}),encrypt:function(t,e,i,n){n=this.cfg.extend(n);var a=n.kdf.execute(i,t.keySize,t.ivSize,n.salt,n.hasher);n.iv=a.iv;var r=b.encrypt.call(this,t,e,a.key,n);return r.mixIn(a),r},decrypt:function(t,e,i,n){n=this.cfg.extend(n),e=this._parse(e,n.format);var a=n.kdf.execute(i,t.keySize,t.ivSize,e.salt,n.hasher);n.iv=a.iv;var r=b.decrypt.call(this,t,e,a.key,n);return r}})}()})},19021:function(t,e,i){(function(e,i){t.exports=i()})(0,function(){var t=t||function(t,e){var n;if("undefined"!==typeof window&&window.crypto&&(n=window.crypto),"undefined"!==typeof self&&self.crypto&&(n=self.crypto),"undefined"!==typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!==typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&"undefined"!==typeof i.g&&i.g.crypto&&(n=i.g.crypto),!n)try{n=i(50477)}catch(g){}var a=function(){if(n){if("function"===typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(g){}if("function"===typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(g){}}throw new Error("Native crypto module could not be used to get secure random number.")},r=Object.create||function(){function t(){}return function(e){var i;return t.prototype=e,i=new t,t.prototype=null,i}}(),o={},s=o.lib={},l=s.Base=function(){return{extend:function(t){var e=r(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=s.WordArray=l.extend({init:function(t,i){t=this.words=t||[],this.sigBytes=i!=e?i:4*t.length},toString:function(t){return(t||d).stringify(this)},concat:function(t){var e=this.words,i=t.words,n=this.sigBytes,a=t.sigBytes;if(this.clamp(),n%4)for(var r=0;r>>2]>>>24-r%4*8&255;e[n+r>>>2]|=o<<24-(n+r)%4*8}else for(var s=0;s>>2]=i[s>>>2];return this.sigBytes+=a,this},clamp:function(){var e=this.words,i=this.sigBytes;e[i>>>2]&=4294967295<<32-i%4*8,e.length=t.ceil(i/4)},clone:function(){var t=l.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],i=0;i>>2]>>>24-a%4*8&255;n.push((r>>>4).toString(16)),n.push((15&r).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,i=[],n=0;n>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new c.init(i,e/2)}},h=u.Latin1={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],a=0;a>>2]>>>24-a%4*8&255;n.push(String.fromCharCode(r))}return n.join("")},parse:function(t){for(var e=t.length,i=[],n=0;n>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new c.init(i,e)}},p=u.Utf8={stringify:function(t){try{return decodeURIComponent(escape(h.stringify(t)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(t){return h.parse(unescape(encodeURIComponent(t)))}},v=s.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=p.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var i,n=this._data,a=n.words,r=n.sigBytes,o=this.blockSize,s=4*o,l=r/s;l=e?t.ceil(l):t.max((0|l)-this._minBufferSize,0);var u=l*o,d=t.min(4*u,r);if(u){for(var h=0;h>>2]>>>24-r%4*8&255,s=e[r+1>>>2]>>>24-(r+1)%4*8&255,l=e[r+2>>>2]>>>24-(r+2)%4*8&255,c=o<<16|s<<8|l,u=0;u<4&&r+.75*u>>6*(3-u)&63));var d=n.charAt(64);if(d)while(a.length%4)a.push(d);return a.join("")},parse:function(t){var e=t.length,i=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var a=0;a>>6-o%4*2,c=s|l;a[r>>>2]|=c<<24-r%4*8,r++}return n.create(a,r)}}(),t.enc.Base64})},64725:function(t,e,i){(function(e,n){t.exports=n(i(19021))})(0,function(t){return function(){var e=t,i=e.lib,n=i.WordArray,a=e.enc;a.Base64url={stringify:function(t,e){void 0===e&&(e=!0);var i=t.words,n=t.sigBytes,a=e?this._safe_map:this._map;t.clamp();for(var r=[],o=0;o>>2]>>>24-o%4*8&255,l=i[o+1>>>2]>>>24-(o+1)%4*8&255,c=i[o+2>>>2]>>>24-(o+2)%4*8&255,u=s<<16|l<<8|c,d=0;d<4&&o+.75*d>>6*(3-d)&63));var h=a.charAt(64);if(h)while(r.length%4)r.push(h);return r.join("")},parse:function(t,e){void 0===e&&(e=!0);var i=t.length,n=e?this._safe_map:this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var o=0;o>>6-o%4*2,c=s|l;a[r>>>2]|=c<<24-r%4*8,r++}return n.create(a,r)}}(),t.enc.Base64url})},45503:function(t,e,i){(function(e,n){t.exports=n(i(19021))})(0,function(t){return function(){var e=t,i=e.lib,n=i.WordArray,a=e.enc;a.Utf16=a.Utf16BE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],a=0;a>>2]>>>16-a%4*8&65535;n.push(String.fromCharCode(r))}return n.join("")},parse:function(t){for(var e=t.length,i=[],a=0;a>>1]|=t.charCodeAt(a)<<16-a%2*16;return n.create(i,2*e)}};function r(t){return t<<8&4278255360|t>>>8&16711935}a.Utf16LE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],a=0;a>>2]>>>16-a%4*8&65535);n.push(String.fromCharCode(o))}return n.join("")},parse:function(t){for(var e=t.length,i=[],a=0;a>>1]|=r(t.charCodeAt(a)<<16-a%2*16);return n.create(i,2*e)}}}(),t.enc.Utf16})},39506:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(45471),i(51025))})(0,function(t){return function(){var e=t,i=e.lib,n=i.Base,a=i.WordArray,r=e.algo,o=r.MD5,s=r.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:o,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){var i,n=this.cfg,r=n.hasher.create(),o=a.create(),s=o.words,l=n.keySize,c=n.iterations;while(s.lengthn&&(e=t.finalize(e)),e.clamp();for(var a=this._oKey=e.clone(),o=this._iKey=e.clone(),s=a.words,l=o.words,c=0;c>>2]|=t[n]<<24-n%4*8;a.call(this,i,e)}else a.apply(this,arguments)};r.prototype=n}}(),t.lib.WordArray})},84636:function(t,e,i){(function(e,n){t.exports=n(i(19021))})(0,function(t){return function(e){var i=t,n=i.lib,a=n.WordArray,r=n.Hasher,o=i.algo,s=[];(function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0})();var l=o.MD5=r.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var i=0;i<16;i++){var n=e+i,a=t[n];t[n]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}var r=this._hash.words,o=t[e+0],l=t[e+1],p=t[e+2],v=t[e+3],f=t[e+4],g=t[e+5],m=t[e+6],y=t[e+7],_=t[e+8],b=t[e+9],x=t[e+10],w=t[e+11],S=t[e+12],C=t[e+13],k=t[e+14],I=t[e+15],E=r[0],A=r[1],P=r[2],M=r[3];E=c(E,A,P,M,o,7,s[0]),M=c(M,E,A,P,l,12,s[1]),P=c(P,M,E,A,p,17,s[2]),A=c(A,P,M,E,v,22,s[3]),E=c(E,A,P,M,f,7,s[4]),M=c(M,E,A,P,g,12,s[5]),P=c(P,M,E,A,m,17,s[6]),A=c(A,P,M,E,y,22,s[7]),E=c(E,A,P,M,_,7,s[8]),M=c(M,E,A,P,b,12,s[9]),P=c(P,M,E,A,x,17,s[10]),A=c(A,P,M,E,w,22,s[11]),E=c(E,A,P,M,S,7,s[12]),M=c(M,E,A,P,C,12,s[13]),P=c(P,M,E,A,k,17,s[14]),A=c(A,P,M,E,I,22,s[15]),E=u(E,A,P,M,l,5,s[16]),M=u(M,E,A,P,m,9,s[17]),P=u(P,M,E,A,w,14,s[18]),A=u(A,P,M,E,o,20,s[19]),E=u(E,A,P,M,g,5,s[20]),M=u(M,E,A,P,x,9,s[21]),P=u(P,M,E,A,I,14,s[22]),A=u(A,P,M,E,f,20,s[23]),E=u(E,A,P,M,b,5,s[24]),M=u(M,E,A,P,k,9,s[25]),P=u(P,M,E,A,v,14,s[26]),A=u(A,P,M,E,_,20,s[27]),E=u(E,A,P,M,C,5,s[28]),M=u(M,E,A,P,p,9,s[29]),P=u(P,M,E,A,y,14,s[30]),A=u(A,P,M,E,S,20,s[31]),E=d(E,A,P,M,g,4,s[32]),M=d(M,E,A,P,_,11,s[33]),P=d(P,M,E,A,w,16,s[34]),A=d(A,P,M,E,k,23,s[35]),E=d(E,A,P,M,l,4,s[36]),M=d(M,E,A,P,f,11,s[37]),P=d(P,M,E,A,y,16,s[38]),A=d(A,P,M,E,x,23,s[39]),E=d(E,A,P,M,C,4,s[40]),M=d(M,E,A,P,o,11,s[41]),P=d(P,M,E,A,v,16,s[42]),A=d(A,P,M,E,m,23,s[43]),E=d(E,A,P,M,b,4,s[44]),M=d(M,E,A,P,S,11,s[45]),P=d(P,M,E,A,I,16,s[46]),A=d(A,P,M,E,p,23,s[47]),E=h(E,A,P,M,o,6,s[48]),M=h(M,E,A,P,y,10,s[49]),P=h(P,M,E,A,k,15,s[50]),A=h(A,P,M,E,g,21,s[51]),E=h(E,A,P,M,S,6,s[52]),M=h(M,E,A,P,v,10,s[53]),P=h(P,M,E,A,x,15,s[54]),A=h(A,P,M,E,l,21,s[55]),E=h(E,A,P,M,_,6,s[56]),M=h(M,E,A,P,I,10,s[57]),P=h(P,M,E,A,m,15,s[58]),A=h(A,P,M,E,C,21,s[59]),E=h(E,A,P,M,f,6,s[60]),M=h(M,E,A,P,w,10,s[61]),P=h(P,M,E,A,p,15,s[62]),A=h(A,P,M,E,b,21,s[63]),r[0]=r[0]+E|0,r[1]=r[1]+A|0,r[2]=r[2]+P|0,r[3]=r[3]+M|0},_doFinalize:function(){var t=this._data,i=t.words,n=8*this._nDataBytes,a=8*t.sigBytes;i[a>>>5]|=128<<24-a%32;var r=e.floor(n/4294967296),o=n;i[15+(a+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),i[14+(a+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(i.length+1),this._process();for(var s=this._hash,l=s.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});function c(t,e,i,n,a,r,o){var s=t+(e&i|~e&n)+a+o;return(s<>>32-r)+e}function u(t,e,i,n,a,r,o){var s=t+(e&n|i&~n)+a+o;return(s<>>32-r)+e}function d(t,e,i,n,a,r,o){var s=t+(e^i^n)+a+o;return(s<>>32-r)+e}function h(t,e,i,n,a,r,o){var s=t+(i^(e|~n))+a+o;return(s<>>32-r)+e}i.MD5=r._createHelper(l),i.HmacMD5=r._createHmacHelper(l)}(Math),t.MD5})},82169:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.mode.CFB=function(){var e=t.lib.BlockCipherMode.extend();function i(t,e,i,n){var a,r=this._iv;r?(a=r.slice(0),this._iv=void 0):a=this._prevBlock,n.encryptBlock(a,0);for(var o=0;o1?e("div",{staticClass:"qt-pos-row"},[e("span",[t._v(t._s(t.$t("quickTrade.leverage")))]),e("span",[t._v(t._s(t.currentPosition.leverage)+"x")])]):t._e(),e("div",{staticClass:"qt-pos-row"},[e("span",[t._v(t._s(t.$t("quickTrade.unrealizedPnl")))]),e("span",{class:t.currentPosition.unrealized_pnl>=0?"qt-green":"qt-red"},[t._v(" $"+t._s(t.formatPrice(t.currentPosition.unrealized_pnl))+" ")])]),e("a-button",{staticStyle:{"margin-top":"8px"},attrs:{type:"danger",size:"small",block:"",ghost:"",loading:t.closingPosition},on:{click:t.handleClosePosition}},[t._v(" "+t._s(t.$t("quickTrade.closePosition"))+" ")])],1):e("div",{staticClass:"qt-position-empty"},[e("a-icon",{staticClass:"qt-empty-icon",attrs:{type:"inbox"}}),e("span",{staticClass:"qt-empty-desc"},[t._v(t._s(t.$t("quickTrade.noPositionHint")))])],1)]),t.recentTrades.length>0?e("div",{staticClass:"qt-history-section"},[e("a-collapse",{attrs:{bordered:!1,activeKey:t.historyCollapsed?[]:["history"]},on:{change:t.handleHistoryCollapse}},[e("a-collapse-panel",{key:"history",style:t.collapseStyle,attrs:{showArrow:!1}},[e("template",{slot:"header"},[e("div",{staticClass:"qt-section-header",staticStyle:{margin:"0",padding:"0"}},[e("a-icon",{attrs:{type:"history"}}),t._v(" "+t._s(t.$t("quickTrade.recentTrades"))+" "),e("span",{staticClass:"qt-history-count"},[t._v("("+t._s(t.recentTrades.length)+")")])],1)]),e("div",{staticClass:"qt-trade-list"},t._l(t.recentTrades,function(a){return e("div",{key:a.id,staticClass:"qt-trade-item"},[e("div",{staticClass:"qt-trade-main"},[e("a-tag",{attrs:{color:"buy"===a.side?"#52c41a":"#f5222d",size:"small"}},[t._v(" "+t._s("buy"===a.side?"LONG":"SHORT")+" ")]),e("span",{staticClass:"qt-trade-symbol"},[t._v(t._s(a.symbol))]),e("span",{staticClass:"qt-trade-amount"},[t._v("$"+t._s(t.formatPrice(a.amount)))])],1),e("div",{staticClass:"qt-trade-meta"},[e("a-tag",{attrs:{color:"filled"===a.status?"#52c41a":"failed"===a.status?"#f5222d":"#faad14",size:"small"}},[t._v(" "+t._s(a.status)+" ")]),e("span",{staticClass:"qt-trade-time"},[t._v(t._s(t.formatTime(a.created_at)))])],1)])}),0)],2)],1)],1):t._e()]),e("exchange-account-modal",{attrs:{visible:t.showAddExchangeModal},on:{"update:visible":function(e){t.showAddExchangeModal=e},success:t.onExchangeAccountSaved}})],1)},s=[],r=a(81127),n=a(56252),c=a(76338),l=(a(74423),a(95353)),o=a(42430),d=a(40011),u=a(75769);function p(t){return(0,u.Ay)({url:"/api/quick-trade/place-order",method:"post",data:t})}function m(t){return(0,u.Ay)({url:"/api/quick-trade/balance",method:"get",params:t})}function v(t){return(0,u.Ay)({url:"/api/quick-trade/position",method:"get",params:t})}function h(t){return(0,u.Ay)({url:"/api/quick-trade/history",method:"get",params:t})}function b(t){return(0,u.Ay)({url:"/api/quick-trade/close-position",method:"post",data:t})}var g=a(35038),f=a(505),y={name:"QuickTradePanel",components:{ExchangeAccountModal:d.A},props:{visible:{type:Boolean,default:!1},symbol:{type:String,default:""},presetSide:{type:String,default:""},presetPrice:{type:Number,default:0},source:{type:String,default:"manual"},marketType:{type:String,default:"swap"}},data:function(){return{credentials:[],selectedCredentialId:void 0,credLoading:!1,balanceLoading:!1,balance:{available:0,total:0},side:"buy",orderType:"market",limitPrice:0,amount:100,leverage:5,marginMode:"cross",tpPrice:null,slPrice:null,submitting:!1,closingPosition:!1,currentPrice:0,currentPosition:null,recentTrades:[],historyCollapsed:!1,currentSymbol:"",symbolSuggestions:[],symbolSearching:!1,symbolSearchTimer:null,userId:null,quickAmountPcts:[10,25,50,75,100],leverageMarks:{1:"1x",5:"5x",10:"10x",25:"25x",50:"50x",100:"100x",125:"125x"},pollTimer:null,showAddExchangeModal:!1}},computed:(0,c.A)((0,c.A)({},(0,l.aH)({navTheme:function(t){return t.app.theme}})),{},{isDark:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},isSwapMode:function(){return Number(this.leverage)>1},effectiveMarketType:function(){return this.isSwapMode?"swap":"spot"},priceStep:function(){return this.currentPrice>1e4?1:this.currentPrice>100?.1:this.currentPrice>1?.01:1e-4},pricePrecision:function(){return this.currentPrice>1e4?0:this.currentPrice>100?1:this.currentPrice>1?2:4},canSubmit:function(){return this.selectedCredentialId&&this.currentSymbol&&this.amount>0&&!this.submitting},priceChangeClass:function(){return""},collapseStyle:function(){return{background:"transparent",borderRadius:"4px",border:0,overflow:"hidden"}}}),watch:{visible:function(t){t?this.init():this.stopPolling()},symbol:function(t){t&&(this.currentSymbol=t)},currentSymbol:function(t){t&&(this.loadPrice(),this.selectedCredentialId&&this.loadPosition(),this.$emit("update:symbol",t))},selectedCredentialId:function(t){t&&this.currentSymbol&&this.loadPosition()},presetSide:function(t){t&&(this.side=t)},presetPrice:function(t){t>0&&(this.currentPrice=t,this.limitPrice=t)},leverage:function(){var t=this;this.isSwapMode||"sell"!==this.side||(this.side="buy"),this.$nextTick(function(){t.selectedCredentialId&&(t.loadBalance(),t.loadPosition())})}},methods:{setTradeSide:function(t){"sell"!==t||this.isSwapMode?this.side=t:this.$message.warning(this.$t("quickTrade.shortDisabledSpot"))},init:function(){var t=this;return(0,n.A)((0,r.A)().m(function e(){return(0,r.A)().w(function(e){while(1)switch(e.n){case 0:return t.currentSymbol=t.symbol||"",t.presetSide&&(t.side=t.presetSide),"spot"===t.marketType&&(t.leverage=1),t.presetPrice>0&&(t.currentPrice=t.presetPrice,t.limitPrice=t.presetPrice),e.n=1,t.loadCredentials();case 1:return e.n=2,t.loadUserInfo();case 2:return e.n=3,t.loadWatchlistSymbols();case 3:if(!t.currentSymbol){e.n=4;break}return e.n=4,t.loadPrice();case 4:if(!t.selectedCredentialId||!t.currentSymbol){e.n=5;break}return e.n=5,t.loadPosition();case 5:t.loadHistory(),t.startPolling();case 6:return e.a(2)}},e)}))()},loadUserInfo:function(){var t=this;return(0,n.A)((0,r.A)().m(function e(){var a,i,s,n;return(0,r.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(e.p=0,i=t.$store,s=(null===i||void 0===i||null===(a=i.getters)||void 0===a?void 0:a.userInfo)||{},!s||!s.id){e.n=1;break}return t.userId=s.id,e.a(2);case 1:return e.n=2,(0,f.ug)();case 2:n=e.v,n&&1===n.code&&n.data&&(t.userId=n.data.id,i&&i.commit("SET_INFO",n.data)),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[0,3]])}))()},loadWatchlistSymbols:function(){var t=this;return(0,n.A)((0,r.A)().m(function e(){var a,i;return(0,r.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.userId){e.n=2;break}return e.n=1,t.loadUserInfo();case 1:if(t.userId){e.n=2;break}return e.a(2);case 2:return e.p=2,e.n=3,(0,g.Qo)({userid:t.userId});case 3:a=e.v,a&&1===a.code&&a.data&&(i=(a.data||[]).filter(function(t){return"crypto"===(t.market||"").toLowerCase()}).map(function(t){return{value:t.symbol||"",symbol:t.symbol||"",name:t.name||""}}).filter(function(t){return t.value}),t.symbolSuggestions=i),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2)}},e,null,[[2,4]])}))()},handleSymbolSearch:function(t){var e=this;this.symbolSearchTimer&&clearTimeout(this.symbolSearchTimer),t&&""!==t.trim()?this.symbolSearchTimer=setTimeout((0,n.A)((0,r.A)().m(function a(){var i;return(0,r.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return e.symbolSearching=!0,a.p=1,a.n=2,(0,g._3)({market:"Crypto",keyword:t.trim(),limit:20});case 2:i=a.v,i&&1===i.code&&i.data?e.symbolSuggestions=(i.data.items||i.data||[]).map(function(t){return{value:t.symbol||"",symbol:t.symbol||"",name:t.name||""}}).filter(function(t){return t.value}):e.symbolSuggestions=[],a.n=4;break;case 3:a.p=3,a.v,e.symbolSuggestions=[];case 4:return a.p=4,e.symbolSearching=!1,a.f(4);case 5:return a.a(2)}},a,null,[[1,3,4,5]])})),300):this.loadWatchlistSymbols()},handleSymbolChange:function(t){t&&t!==this.currentSymbol&&(this.currentSymbol=t,this.loadPrice(),this.selectedCredentialId&&this.loadPosition(),this.$emit("update:symbol",t))},loadPrice:function(){var t=this;return(0,n.A)((0,r.A)().m(function e(){var a,i;return(0,r.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.currentSymbol){e.n=1;break}return t.currentPrice=0,e.a(2);case 1:return e.p=1,e.n=2,(0,u.Ay)({url:"/api/market/price",method:"get",params:{market:"Crypto",symbol:t.currentSymbol}});case 2:a=e.v,a&&1===a.code&&a.data&&(i=parseFloat(a.data.price||0),i>0&&(t.currentPrice=i,0!==t.limitPrice&&t.limitPrice!==t.presetPrice||(t.limitPrice=i))),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[1,3]])}))()},handleSymbolFocus:function(){0===this.symbolSuggestions.length&&this.loadWatchlistSymbols()},loadCredentials:function(){var t=this;return(0,n.A)((0,r.A)().m(function e(){var a,i,s;return(0,r.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.credLoading=!0,e.p=1,e.n=2,(0,o.IA)();case 2:a=e.v,1===a.code&&a.data&&(i=a.data.items||a.data||[],s=["ibkr","mt5"],t.credentials=i.filter(function(t){var e=(t.exchange_id||t.name||"").toLowerCase();return!s.includes(e)}),!t.selectedCredentialId&&t.credentials.length>0&&(t.selectedCredentialId=t.credentials[0].id,t.onCredentialChange(t.selectedCredentialId))),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.p=4,t.credLoading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},onExchangeAccountSaved:function(t){var e=this;return(0,n.A)((0,r.A)().m(function a(){var i,s;return(0,r.A)().w(function(a){while(1)switch(a.n){case 0:return i=e.selectedCredentialId,a.n=1,e.loadCredentials();case 1:if(s=t&&(t.id||t.credential_id),!s){a.n=3;break}return e.selectedCredentialId=s,a.n=2,e.onCredentialChange(s);case 2:a.n=4;break;case 3:if(i||1!==e.credentials.length){a.n=4;break}return e.selectedCredentialId=e.credentials[0].id,a.n=4,e.onCredentialChange(e.selectedCredentialId);case 4:return a.a(2)}},a)}))()},onCredentialChange:function(t){var e=this;return(0,n.A)((0,r.A)().m(function a(){return(0,r.A)().w(function(a){while(1)switch(a.n){case 0:return e.selectedCredentialId=t,a.n=1,e.loadBalance();case 1:return a.n=2,e.loadPosition();case 2:return a.a(2)}},a)}))()},loadBalance:function(){var t=this;return(0,n.A)((0,r.A)().m(function e(){var a,i;return(0,r.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.selectedCredentialId){e.n=1;break}return e.a(2);case 1:return t.balanceLoading=!0,e.p=2,e.n=3,m({credential_id:t.selectedCredentialId,market_type:t.effectiveMarketType});case 3:a=e.v,1===a.code&&a.data?t.balance=(0,c.A)({available:0,total:0},a.data):t.balance={available:0,total:0},e.n=5;break;case 4:e.p=4,i=e.v,t.balance={available:0,total:0,error:String(i.message||i)};case 5:return e.p=5,t.balanceLoading=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},loadPosition:function(){var t=this;return(0,n.A)((0,r.A)().m(function e(){var a;return(0,r.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.selectedCredentialId&&t.currentSymbol){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,v({credential_id:t.selectedCredentialId,symbol:t.currentSymbol,market_type:t.effectiveMarketType});case 2:if(a=e.v,!(1===a.code&&a.data&&a.data.positions&&a.data.positions.length>0)){e.n=3;break}return t.currentPosition=a.data.positions[0],e.a(2,!0);case 3:return t.currentPosition=null,e.a(2,!1);case 4:e.n=6;break;case 5:return e.p=5,e.v,t.currentPosition=null,e.a(2,!1);case 6:return e.a(2)}},e,null,[[1,5]])}))()},loadPositionWithRetry:function(){var t=arguments,e=this;return(0,n.A)((0,r.A)().m(function a(){var i,s,n,c;return(0,r.A)().w(function(a){while(1)switch(a.n){case 0:return i=t.length>0&&void 0!==t[0]?t[0]:3,s=t.length>1&&void 0!==t[1]?t[1]:2e3,a.n=1,e.loadPosition();case 1:if(n=a.v,!n){a.n=2;break}return a.a(2);case 2:c=0;case 3:if(!(c0&&(this.amount=Math.floor(this.balance.available*t/100*100)/100)},handleSubmit:function(){var t=this;return(0,n.A)((0,r.A)().m(function e(){var a,i,s;return(0,r.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.canSubmit){e.n=1;break}return e.a(2);case 1:return t.submitting=!0,e.p=2,a={credential_id:t.selectedCredentialId,symbol:t.currentSymbol,side:t.side,order_type:t.orderType,amount:t.amount,price:"limit"===t.orderType?t.limitPrice:0,leverage:t.isSwapMode?t.leverage:1,market_type:t.effectiveMarketType,margin_mode:t.isSwapMode?t.marginMode:void 0,tp_price:t.tpPrice||0,sl_price:t.slPrice||0,source:t.source},e.n=3,p(a);case 3:if(i=e.v,1!==i.code){e.n=7;break}return t.$emit("order-success",i.data),e.n=4,t.loadBalance();case 4:return e.n=5,t.loadHistory();case 5:return e.n=6,t.loadPositionWithRetry();case 6:e.n=8;break;case 7:t.$message.error(i.msg||t.$t("quickTrade.orderFailed"));case 8:e.n=10;break;case 9:e.p=9,s=e.v,t.$message.error(s.message||t.$t("quickTrade.orderFailed"));case 10:return e.p=10,t.submitting=!1,e.f(10);case 11:return e.a(2)}},e,null,[[2,9,10,11]])}))()},handleClosePosition:function(){var t=this;return(0,n.A)((0,r.A)().m(function e(){var a,i,s;return(0,r.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.currentPosition&&t.selectedCredentialId){e.n=1;break}return e.a(2);case 1:return t.closingPosition=!0,e.p=2,a={credential_id:t.selectedCredentialId,symbol:t.currentSymbol,market_type:t.effectiveMarketType,size:0,source:"manual"},e.n=3,b(a);case 3:if(i=e.v,1!==i.code){e.n=6;break}return t.$message.success(t.$t("quickTrade.positionClosed")),e.n=4,t.loadBalance();case 4:return e.n=5,t.loadHistory();case 5:t.currentPosition=null,setTimeout((0,n.A)((0,r.A)().m(function e(){return(0,r.A)().w(function(e){while(1)switch(e.n){case 0:return e.n=1,t.loadPosition();case 1:return e.a(2)}},e)})),2e3),e.n=7;break;case 6:t.$message.error(i.msg||t.$t("quickTrade.orderFailed"));case 7:e.n=9;break;case 8:e.p=8,s=e.v,t.$message.error(s.message||t.$t("quickTrade.orderFailed"));case 9:return e.p=9,t.closingPosition=!1,e.f(9);case 10:return e.a(2)}},e,null,[[2,8,9,10]])}))()},startPolling:function(){var t=this;this.stopPolling(),this.pollTimer=setInterval(function(){t.currentSymbol&&t.loadPrice(),t.selectedCredentialId&&t.currentSymbol&&(t.loadBalance(),t.loadPosition())},1e4)},stopPolling:function(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)},handleClose:function(){this.$emit("close"),this.$emit("update:visible",!1)},handleHistoryCollapse:function(t){this.historyCollapsed=!t.includes("history")},formatPrice:function(t){var e=parseFloat(t||0);return Math.abs(e)>=1e4?e.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0}):Math.abs(e)>=100?e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):Math.abs(e)>=1?e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:4}):e.toLocaleString("en-US",{minimumFractionDigits:4,maximumFractionDigits:6})},formatTime:function(t){if(!t)return"";var e=new Date(t),a=function(t){return String(t).padStart(2,"0")};return"".concat(a(e.getMonth()+1),"-").concat(a(e.getDate())," ").concat(a(e.getHours()),":").concat(a(e.getMinutes()))}},beforeDestroy:function(){this.stopPolling()}},_=y,k=a(845),q=(0,k.A)(_,i,s,!1,null,"75b64b85",null),C=q.exports}}]); \ No newline at end of file diff --git a/frontend/dist/js/593-legacy.c237259d.js b/frontend/dist/js/593-legacy.c237259d.js new file mode 100644 index 0000000..30b5d2f --- /dev/null +++ b/frontend/dist/js/593-legacy.c237259d.js @@ -0,0 +1 @@ +"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[593],{98593:function(t,e,a){a.r(e),a.d(e,{default:function(){return v}});var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"user-manage-page",class:{"theme-dark":t.isDarkTheme}},[e("div",{staticClass:"page-header"},[e("h2",{staticClass:"page-title"},[e("a-icon",{attrs:{type:"team"}}),e("span",[t._v(t._s(t.$t("userManage.title")||"User Management"))])],1),e("p",{staticClass:"page-desc"},[t._v(t._s(t.$t("userManage.description")||"Manage system users, roles and permissions"))])]),e("a-tabs",{staticClass:"manage-tabs",on:{change:t.handleTabChange},model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[e("a-tab-pane",{key:"users",attrs:{tab:t.$t("userManage.tabUsers")||"User Management"}},[e("div",{staticClass:"toolbar"},[e("div",{staticClass:"toolbar-left"},[e("a-button",{attrs:{type:"primary"},on:{click:t.showCreateModal}},[e("a-icon",{attrs:{type:"user-add"}}),t._v(" "+t._s(t.$t("userManage.createUser")||"Create User")+" ")],1),e("a-button",{on:{click:t.loadUsers}},[e("a-icon",{attrs:{type:"reload"}}),t._v(" "+t._s(t.$t("common.refresh")||"Refresh")+" ")],1)],1),e("div",{staticClass:"toolbar-right"},[e("a-input-search",{staticClass:"toolbar-search",attrs:{placeholder:t.$t("userManage.searchPlaceholder")||"Search by username/email",allowClear:""},on:{search:t.handleSearch,pressEnter:t.handleSearch},model:{value:t.searchKeyword,callback:function(e){t.searchKeyword=e},expression:"searchKeyword"}})],1)]),e("a-card",{staticClass:"user-table-card",attrs:{bordered:!1}},[e("a-table",{attrs:{columns:t.columns,dataSource:t.users,loading:t.loading,pagination:t.pagination,rowKey:function(t){return t.id},scroll:{x:1280}},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"status",fn:function(a){return[e("a-tag",{attrs:{color:"active"===a?"green":"red"}},[t._v(" "+t._s("active"===a?t.$t("userManage.active")||"Active":t.$t("userManage.disabled")||"Disabled")+" ")])]}},{key:"role",fn:function(a){return[e("a-tag",{attrs:{color:t.getRoleColor(a)}},[t._v(" "+t._s(t.getRoleLabel(a))+" ")])]}},{key:"last_login_at",fn:function(a){return[a?e("span",[t._v(t._s(t.formatTime(a)))]):e("span",{staticClass:"text-muted"},[t._v(t._s(t.$t("userManage.neverLogin")||"Never"))])]}},{key:"credits",fn:function(a){return[e("span",{staticClass:"credits-value"},[t._v(t._s(t.formatCredits(a)))])]}},{key:"vip_expires_at",fn:function(a){return[a&&t.isVipActive(a)?[e("a-tag",{attrs:{color:"gold"}},[e("a-icon",{attrs:{type:"crown"}}),t._v(" "+t._s(t.formatDate(a))+" ")],1)]:e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"action",fn:function(a,s){return[e("a-space",[e("a-tooltip",{attrs:{title:t.$t("common.edit")||"Edit"}},[e("a-button",{attrs:{type:"link",size:"small"},on:{click:function(e){return t.showEditModal(s)}}},[e("a-icon",{attrs:{type:"edit"}})],1)],1),e("a-tooltip",{attrs:{title:t.$t("userManage.adjustCredits")||"Adjust Credits"}},[e("a-button",{attrs:{type:"link",size:"small"},on:{click:function(e){return t.showCreditsModal(s)}}},[e("a-icon",{staticStyle:{color:"#722ed1"},attrs:{type:"wallet"}})],1)],1),e("a-tooltip",{attrs:{title:t.$t("userManage.setVip")||"Set VIP"}},[e("a-button",{attrs:{type:"link",size:"small"},on:{click:function(e){return t.showVipModal(s)}}},[e("a-icon",{staticStyle:{color:"#faad14"},attrs:{type:"crown"}})],1)],1),e("a-tooltip",{attrs:{title:t.$t("userManage.resetPassword")||"Reset Password"}},[e("a-button",{attrs:{type:"link",size:"small"},on:{click:function(e){return t.showResetPasswordModal(s)}}},[e("a-icon",{attrs:{type:"key"}})],1)],1),e("a-tooltip",{attrs:{title:t.$t("common.delete")||"Delete"}},[e("a-popconfirm",{attrs:{title:t.$t("userManage.confirmDelete")||"Are you sure to delete this user?"},on:{confirm:function(e){return t.handleDelete(s.id)}}},[e("a-button",{attrs:{type:"link",size:"small",disabled:s.id===t.currentUserId}},[e("a-icon",{staticStyle:{color:"#ff4d4f"},attrs:{type:"delete"}})],1)],1)],1)],1)]}}])})],1)],1),e("a-tab-pane",{key:"strategies",attrs:{tab:t.$t("systemOverview.tabTitle")||"System Overview"}},[t.strategySummary?e("div",{staticClass:"summary-cards"},[e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #667eea, #764ba2)"}},[e("a-icon",{attrs:{type:"fund"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.strategySummary.total_strategies||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("systemOverview.totalStrategies")||"Total Strategies"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #11998e, #38ef7d)"}},[e("a-icon",{attrs:{type:"play-circle"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.strategySummary.running_strategies||0))]),e("div",{staticClass:"summary-sub"},[t._v(" "+t._s(t.$t("systemOverview.live")||"实盘")+": "+t._s(t.strategySummary.running_live_strategies||0)+" / "+t._s(t.$t("systemOverview.signal")||"仅通知")+": "+t._s(t.strategySummary.running_signal_strategies||0)+" ")]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("systemOverview.runningStrategies")||"Running"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #f093fb, #f5576c)"}},[e("a-icon",{attrs:{type:"dollar"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.formatNumber(t.strategySummary.total_capital)))]),e("div",{staticClass:"summary-sub"},[t._v(" "+t._s(t.$t("systemOverview.live")||"实盘")+": "+t._s(t.formatNumber(t.strategySummary.live_capital))+" / "+t._s(t.$t("systemOverview.signal")||"仅通知")+": "+t._s(t.formatNumber(t.strategySummary.signal_capital))+" ")]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("systemOverview.totalCapital")||"Total Capital"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",style:{background:(t.strategySummary.total_pnl||0)>=0?"linear-gradient(135deg, #11998e, #38ef7d)":"linear-gradient(135deg, #ff416c, #ff4b2b)"}},[e("a-icon",{attrs:{type:"rise"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value",class:(t.strategySummary.total_pnl||0)>=0?"text-profit":"text-loss"},[t._v(" "+t._s(t.formatPnl(t.strategySummary.total_pnl))+" "),e("span",{staticClass:"roi-badge"},[t._v(t._s(t.strategySummary.total_roi||0)+"%")])]),e("div",{staticClass:"summary-sub"},[t._v(" "+t._s(t.$t("systemOverview.live")||"实盘")+": "+t._s(t.formatPnl(t.strategySummary.live_pnl))+" / "+t._s(t.$t("systemOverview.signal")||"仅通知")+": "+t._s(t.formatPnl(t.strategySummary.signal_pnl))+" ")]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("systemOverview.totalPnl")||"Total PnL"))])])])]):t._e(),e("div",{staticClass:"toolbar"},[e("div",{staticClass:"toolbar-left"},[e("a-button",{on:{click:t.loadSystemStrategies}},[e("a-icon",{attrs:{type:"reload"}}),t._v(" "+t._s(t.$t("common.refresh")||"Refresh")+" ")],1),e("a-select",{staticClass:"toolbar-select",on:{change:t.handleStrategyFilterChange},model:{value:t.strategyStatusFilter,callback:function(e){t.strategyStatusFilter=e},expression:"strategyStatusFilter"}},[e("a-select-option",{attrs:{value:"all"}},[t._v(t._s(t.$t("systemOverview.filterAll")||"All Status"))]),e("a-select-option",{attrs:{value:"running"}},[t._v(t._s(t.$t("systemOverview.filterRunning")||"Running"))]),e("a-select-option",{attrs:{value:"stopped"}},[t._v(t._s(t.$t("systemOverview.filterStopped")||"Stopped"))])],1),e("a-select",{staticClass:"toolbar-select",on:{change:t.handleStrategyExecutionFilterChange},model:{value:t.strategyExecutionFilter,callback:function(e){t.strategyExecutionFilter=e},expression:"strategyExecutionFilter"}},[e("a-select-option",{attrs:{value:"all"}},[t._v(t._s(t.$t("systemOverview.filterExecAll")||"All modes"))]),e("a-select-option",{attrs:{value:"live"}},[t._v(t._s(t.$t("systemOverview.live")||"Live"))]),e("a-select-option",{attrs:{value:"signal"}},[t._v(t._s(t.$t("systemOverview.signal")||"Signal"))])],1)],1),e("div",{staticClass:"toolbar-right"},[e("a-input-search",{staticClass:"toolbar-search",attrs:{placeholder:t.$t("systemOverview.searchPlaceholder")||"Search strategy/symbol/user",allowClear:""},on:{search:t.handleStrategySearch,pressEnter:t.handleStrategySearch},model:{value:t.strategySearchKeyword,callback:function(e){t.strategySearchKeyword=e},expression:"strategySearchKeyword"}})],1)]),e("a-card",{staticClass:"user-table-card",attrs:{bordered:!1}},[e("a-table",{attrs:{columns:t.strategyColumns,dataSource:t.systemStrategies,loading:t.strategyLoading,pagination:t.strategyPagination,rowKey:function(t){return t.id},scroll:{x:1920}},on:{change:t.handleStrategyTableChange},scopedSlots:t._u([{key:"strategyStatus",fn:function(a){return[e("span",{staticClass:"status-cell"},[e("span",{staticClass:"status-dot",class:"running"===a?"dot-running":"dot-stopped"}),e("span",{class:"running"===a?"status-running":"status-stopped"},[t._v(" "+t._s("running"===a?t.$t("systemOverview.running")||"Running":t.$t("systemOverview.stopped")||"Stopped")+" ")])])]}},{key:"userInfo",fn:function(a,s){return[e("a-tooltip",{attrs:{title:s.nickname||s.username||"-"}},[e("span",{staticClass:"user-cell"},[e("a-avatar",{style:{backgroundColor:t.getUserColor(s.user_id),fontSize:"11px",marginRight:"6px"},attrs:{size:"small"}},[t._v(" "+t._s((s.nickname||s.username||"?").charAt(0).toUpperCase())+" ")]),e("span",{staticClass:"user-name"},[t._v(t._s(t.truncate(s.nickname||s.username||"-",8)))])],1)])]}},{key:"symbolInfo",fn:function(a,s){return[e("div",[e("span",{staticClass:"symbol-text"},[t._v(t._s(s.symbol||"-"))]),"cross_sectional"===s.cs_strategy_type?e("a-tag",{staticStyle:{"margin-left":"4px"},attrs:{color:"purple",size:"small"}},[t._v("CS")]):t._e()],1),"cross_sectional"===s.cs_strategy_type&&s.symbol_list&&s.symbol_list.length?e("div",{staticClass:"symbol-count text-muted"},[t._v(" "+t._s(s.symbol_list.length)+" "+t._s(t.$t("systemOverview.symbols")||"symbols")+" ")]):t._e()]}},{key:"capitalInfo",fn:function(a){return[e("span",[t._v(t._s(t.formatNumber(a)))])]}},{key:"executionModeInfo",fn:function(a){return["live"===a?e("a-tag",{attrs:{color:"green",size:"small"}},[t._v(t._s(t.$t("systemOverview.live")||"Live"))]):"signal"===a?e("a-tag",{attrs:{color:"blue",size:"small"}},[t._v(t._s(t.$t("systemOverview.signal")||"Signal"))]):e("a-tag",{attrs:{size:"small"}},[t._v(t._s(a||"—"))])]}},{key:"equityInfo",fn:function(a,s){return["live"===s.execution_mode?e("span",[t._v(t._s(t.formatNumber(a||0)))]):e("span",{staticClass:"text-muted"},[t._v("—")])]}},{key:"pnlInfo",fn:function(a,s){return[e("div",{class:s.total_pnl>=0?"text-profit":"text-loss"},[e("span",{staticClass:"pnl-value"},[t._v(t._s(t.formatPnl(s.total_pnl)))]),e("span",{staticClass:"roi-text"},[t._v("("+t._s(s.roi>=0?"+":"")+t._s(s.roi)+"%)")])]),e("div",{staticClass:"pnl-detail text-muted"},[e("span",[t._v(t._s(t.$t("systemOverview.realized")||"Real")+": "+t._s(t.formatPnl(s.total_realized_pnl)))]),e("span",{staticStyle:{"margin-left":"8px"}},[t._v(t._s(t.$t("systemOverview.unrealized")||"Unreal")+": "+t._s(t.formatPnl(s.total_unrealized_pnl)))])])]}},{key:"positionInfo",fn:function(t,a){return[e("a-badge",{attrs:{count:a.position_count,numberStyle:{backgroundColor:a.position_count>0?"#52c41a":"#d9d9d9"}}})]}},{key:"tradeInfo",fn:function(a){return[e("span",[t._v(t._s(a||0))])]}},{key:"indicatorInfo",fn:function(a){return[a?e("a-tooltip",{attrs:{title:a}},[e("span",{staticClass:"indicator-name"},[t._v(t._s(t.truncate(a,16)))])]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"exchangeInfo",fn:function(a){return[a?e("span",{staticClass:"exchange-name"},[t._v(t._s(a))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"timeframeInfo",fn:function(a){return[a?e("a-tag",{attrs:{size:"small"}},[t._v(t._s(a))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"leverageInfo",fn:function(a){return[a>1?e("span",{staticStyle:{color:"#fa8c16","font-weight":"600"}},[t._v(t._s(a)+"x")]):e("span",[t._v(t._s(a||1)+"x")])]}},{key:"createdAtInfo",fn:function(a){return[a?e("span",[t._v(t._s(t.formatTime(a)))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"updatedAtInfo",fn:function(a){return[a?e("span",[t._v(t._s(t.formatTime(a)))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}}])})],1)],1),e("a-tab-pane",{key:"orders",attrs:{tab:t.$t("adminOrders.tabTitle")||"Order List"}},[t.orderSummary?e("div",{staticClass:"summary-cards"},[e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #667eea, #764ba2)"}},[e("a-icon",{attrs:{type:"file-text"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.orderSummary.total_orders||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminOrders.totalOrders")||"Total Orders"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #11998e, #38ef7d)"}},[e("a-icon",{attrs:{type:"check-circle"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.orderSummary.paid_orders||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminOrders.paidOrders")||"Paid"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #f093fb, #f5576c)"}},[e("a-icon",{attrs:{type:"clock-circle"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.orderSummary.pending_orders||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminOrders.pendingOrders")||"Pending"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #fa709a, #fee140)"}},[e("a-icon",{attrs:{type:"dollar"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.formatNumber(t.orderSummary.total_revenue))+" "),e("span",{staticStyle:{"font-size":"13px",color:"#999"}},[t._v("USDT")])]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminOrders.totalRevenue")||"Total Revenue"))])])])]):t._e(),e("div",{staticClass:"toolbar"},[e("div",{staticClass:"toolbar-left"},[e("a-button",{on:{click:t.loadOrders}},[e("a-icon",{attrs:{type:"reload"}}),t._v(" "+t._s(t.$t("common.refresh")||"Refresh")+" ")],1),e("a-select",{staticClass:"toolbar-select",on:{change:t.handleOrderFilterChange},model:{value:t.orderStatusFilter,callback:function(e){t.orderStatusFilter=e},expression:"orderStatusFilter"}},[e("a-select-option",{attrs:{value:"all"}},[t._v(t._s(t.$t("adminOrders.filterAll")||"All Status"))]),e("a-select-option",{attrs:{value:"pending"}},[t._v(t._s(t.$t("adminOrders.filterPending")||"Pending"))]),e("a-select-option",{attrs:{value:"paid"}},[t._v(t._s(t.$t("adminOrders.filterPaid")||"Paid"))]),e("a-select-option",{attrs:{value:"confirmed"}},[t._v(t._s(t.$t("adminOrders.filterConfirmed")||"Confirmed"))]),e("a-select-option",{attrs:{value:"expired"}},[t._v(t._s(t.$t("adminOrders.filterExpired")||"Expired"))])],1)],1),e("div",{staticClass:"toolbar-right"},[e("a-input-search",{staticClass:"toolbar-search",attrs:{placeholder:t.$t("adminOrders.searchPlaceholder")||"Search by username/email",allowClear:""},on:{search:t.handleOrderSearch,pressEnter:t.handleOrderSearch},model:{value:t.orderSearchKeyword,callback:function(e){t.orderSearchKeyword=e},expression:"orderSearchKeyword"}})],1)]),e("a-card",{staticClass:"user-table-card",attrs:{bordered:!1}},[e("a-table",{attrs:{columns:t.orderColumns,dataSource:t.orders,loading:t.orderLoading,pagination:t.orderPagination,rowKey:function(t){return t.order_type+"-"+t.id},scroll:{x:1400}},on:{change:t.handleOrderTableChange},scopedSlots:t._u([{key:"orderUserInfo",fn:function(a,s){return[e("a-tooltip",{attrs:{title:(s.nickname||s.username||"-")+" ("+(s.user_email||"")+")"}},[e("span",{staticClass:"user-cell"},[e("a-avatar",{style:{backgroundColor:t.getUserColor(s.user_id),fontSize:"11px",marginRight:"6px"},attrs:{size:"small"}},[t._v(" "+t._s((s.nickname||s.username||"?").charAt(0).toUpperCase())+" ")]),e("span",{staticClass:"user-name"},[t._v(t._s(t.truncate(s.nickname||s.username||"-",10)))])],1)])]}},{key:"orderTypeInfo",fn:function(a){return[e("a-tag",{attrs:{color:"usdt"===a?"green":"blue"}},[t._v(" "+t._s("usdt"===a?"USDT":"Mock")+" ")])]}},{key:"planInfo",fn:function(a){return[e("a-tag",{attrs:{color:"lifetime"===a?"gold":"yearly"===a?"purple":"cyan"}},[t._v(" "+t._s("lifetime"===a?t.$t("adminOrders.lifetime")||"Lifetime":"yearly"===a?t.$t("adminOrders.yearly")||"Yearly":t.$t("adminOrders.monthly")||"Monthly")+" ")])]}},{key:"amountInfo",fn:function(a,s){return[e("span",{staticStyle:{"font-weight":"600"}},[t._v(t._s(a))]),e("span",{staticClass:"text-muted",staticStyle:{"margin-left":"4px"}},[t._v(t._s(s.currency))])]}},{key:"orderStatusInfo",fn:function(a){return[e("a-tag",{attrs:{color:t.getOrderStatusColor(a)}},[t._v(t._s(t.getOrderStatusLabel(a)))])]}},{key:"chainInfo",fn:function(a){return[a?e("span",[t._v(t._s(a))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"addressInfo",fn:function(a){return[a?e("a-tooltip",{attrs:{title:a}},[e("span",{staticClass:"address-text"},[t._v(t._s(t.truncate(a,12)))])]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"txHashInfo",fn:function(a){return[a?e("a-tooltip",{attrs:{title:a}},[e("span",{staticClass:"hash-text"},[t._v(t._s(t.truncate(a,14)))])]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"orderCreatedAt",fn:function(a){return[a?e("span",[t._v(t._s(t.formatTime(a)))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}}])})],1)],1),e("a-tab-pane",{key:"aiStats",attrs:{tab:t.$t("adminAiStats.tabTitle")||"AI Analysis"}},[t.aiStatsSummary?e("div",{staticClass:"summary-cards"},[e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #667eea, #764ba2)"}},[e("a-icon",{attrs:{type:"thunderbolt"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.aiStatsSummary.total_analyses||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminAiStats.totalAnalyses")||"Total Analyses"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #11998e, #38ef7d)"}},[e("a-icon",{attrs:{type:"team"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.aiStatsSummary.unique_users||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminAiStats.activeUsers")||"Active Users"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #f093fb, #f5576c)"}},[e("a-icon",{attrs:{type:"stock"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.aiStatsSummary.unique_symbols||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminAiStats.uniqueSymbols")||"Symbols Analyzed"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #fa709a, #fee140)"}},[e("a-icon",{attrs:{type:"like"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(" "+t._s(t.aiStatsSummary.correct_count||0)+" "),e("span",{staticStyle:{"font-size":"13px",color:"#999"}},[t._v("/ "+t._s(t.aiStatsSummary.total_memory||0))])]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminAiStats.accuracy")||"Correct / Verified"))])])])]):t._e(),e("div",{staticClass:"toolbar"},[e("div",{staticClass:"toolbar-left"},[e("a-button",{on:{click:t.loadAiStats}},[e("a-icon",{attrs:{type:"reload"}}),t._v(" "+t._s(t.$t("common.refresh")||"Refresh")+" ")],1)],1),e("div",{staticClass:"toolbar-right"},[e("a-input-search",{staticClass:"toolbar-search",attrs:{placeholder:t.$t("adminAiStats.searchPlaceholder")||"Search by username",allowClear:""},on:{search:t.handleAiStatsSearch,pressEnter:t.handleAiStatsSearch},model:{value:t.aiStatsSearchKeyword,callback:function(e){t.aiStatsSearchKeyword=e},expression:"aiStatsSearchKeyword"}})],1)]),e("a-card",{staticClass:"user-table-card",staticStyle:{"margin-bottom":"20px"},attrs:{bordered:!1}},[e("h4",{staticClass:"section-card-title"},[e("a-icon",{staticClass:"section-card-title-icon",attrs:{type:"bar-chart"}}),t._v(" "+t._s(t.$t("adminAiStats.userStatsTitle")||"Per-User Statistics")+" ")],1),e("a-table",{attrs:{columns:t.aiUserColumns,dataSource:t.aiUserStats,loading:t.aiStatsLoading,pagination:t.aiStatsPagination,rowKey:function(t){return t.user_id},scroll:{x:960}},on:{change:t.handleAiStatsTableChange},scopedSlots:t._u([{key:"aiUserInfo",fn:function(a,s){return[e("a-tooltip",{attrs:{title:(s.nickname||s.username||"-")+" ("+(s.email||"")+")"}},[e("span",{staticClass:"user-cell"},[e("a-avatar",{style:{backgroundColor:t.getUserColor(s.user_id),fontSize:"11px",marginRight:"6px"},attrs:{size:"small"}},[t._v(" "+t._s((s.nickname||s.username||"?").charAt(0).toUpperCase())+" ")]),e("span",{staticClass:"user-name"},[t._v(t._s(t.truncate(s.nickname||s.username||"-",10)))])],1)])]}},{key:"analysisCountInfo",fn:function(a){return[e("span",{staticStyle:{"font-weight":"600",color:"#1890ff"}},[t._v(t._s(a||0))])]}},{key:"accuracyInfo",fn:function(a,s){return[e("span",{staticClass:"text-profit"},[t._v(t._s(s.correct||0))]),e("span",{staticClass:"text-muted"},[t._v(" / ")]),e("span",{staticClass:"text-loss"},[t._v(t._s(s.incorrect||0))])]}},{key:"feedbackInfo",fn:function(a,s){return[e("a-tooltip",{attrs:{title:(t.$t("adminAiStats.helpful")||"Helpful")+" / "+(t.$t("adminAiStats.notHelpful")||"Not Helpful")}},[e("span",{staticStyle:{color:"#52c41a"}},[e("a-icon",{attrs:{type:"like"}}),t._v(" "+t._s(s.helpful||0))],1),e("span",{staticClass:"text-muted"},[t._v(" / ")]),e("span",{staticStyle:{color:"#ff4d4f"}},[e("a-icon",{attrs:{type:"dislike"}}),t._v(" "+t._s(s.not_helpful||0))],1)])]}},{key:"lastAnalysisAt",fn:function(a){return[a?e("span",[t._v(t._s(t.formatTime(a)))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}}])})],1),e("a-card",{staticClass:"user-table-card",attrs:{bordered:!1}},[e("h4",{staticClass:"section-card-title"},[e("a-icon",{staticClass:"section-card-title-icon",attrs:{type:"history"}}),t._v(" "+t._s(t.$t("adminAiStats.recentTitle")||"Recent Analysis Records")+" ")],1),e("a-table",{attrs:{columns:t.aiRecentColumns,dataSource:t.aiRecentRecords,loading:t.aiStatsLoading,pagination:!1,rowKey:function(t){return t.id},scroll:{x:900},size:"small"},scopedSlots:t._u([{key:"recentUserInfo",fn:function(a,s){return[e("span",{staticClass:"user-cell"},[e("a-avatar",{style:{backgroundColor:t.getUserColor(s.user_id),fontSize:"11px",marginRight:"6px"},attrs:{size:"small"}},[t._v(" "+t._s((s.nickname||s.username||"?").charAt(0).toUpperCase())+" ")]),e("span",{staticClass:"user-name"},[t._v(t._s(t.truncate(s.nickname||s.username||"-",8)))])],1)]}},{key:"recentStatusInfo",fn:function(a){return[e("a-tag",{attrs:{color:"completed"===a?"green":"failed"===a?"red":"blue"}},[t._v(" "+t._s(a)+" ")])]}},{key:"recentCreatedAt",fn:function(a){return[a?e("span",[t._v(t._s(t.formatTime(a)))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}}])})],1)],1)],1),e("a-modal",{attrs:{"wrap-class-name":t.userManageModalWrapClass,title:t.isEdit?t.$t("userManage.editUser")||"Edit User":t.$t("userManage.createUser")||"Create User",confirmLoading:t.modalLoading},on:{ok:t.handleModalOk,cancel:t.handleModalCancel},model:{value:t.modalVisible,callback:function(e){t.modalVisible=e},expression:"modalVisible"}},[e("a-form",{attrs:{form:t.form,layout:"vertical"}},[e("a-form-item",{attrs:{label:t.$t("userManage.username")||"Username"}},[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["username",{rules:[{required:!t.isEdit,message:t.$t("userManage.usernameRequired")||"Please enter username"}]}],expression:"['username', {\n rules: [{ required: !isEdit, message: $t('userManage.usernameRequired') || 'Please enter username' }]\n }]"}],attrs:{disabled:t.isEdit,placeholder:t.$t("userManage.usernamePlaceholder")||"Enter username"}},[e("a-icon",{attrs:{slot:"prefix",type:"user"},slot:"prefix"})],1)],1),t.isEdit?t._e():e("a-form-item",{attrs:{label:t.$t("userManage.password")||"Password"}},[e("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["password",{rules:[{required:!0,message:t.$t("userManage.passwordRequired")||"Please enter password"},{min:6,message:t.$t("userManage.passwordMin")||"Password must be at least 6 characters"}]}],expression:"['password', {\n rules: [\n { required: true, message: $t('userManage.passwordRequired') || 'Please enter password' },\n { min: 6, message: $t('userManage.passwordMin') || 'Password must be at least 6 characters' }\n ]\n }]"}],attrs:{placeholder:t.$t("userManage.passwordPlaceholder")||"Enter password (min 6 characters)"}},[e("a-icon",{attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),e("a-form-item",{attrs:{label:t.$t("userManage.nickname")||"Nickname"}},[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["nickname"],expression:"['nickname']"}],attrs:{placeholder:t.$t("userManage.nicknamePlaceholder")||"Enter nickname"}},[e("a-icon",{attrs:{slot:"prefix",type:"smile"},slot:"prefix"})],1)],1),e("a-form-item",{attrs:{label:t.$t("userManage.email")||"Email"}},[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["email",{rules:[{type:"email",message:t.$t("userManage.emailInvalid")||"Invalid email format"}]}],expression:"['email', {\n rules: [{ type: 'email', message: $t('userManage.emailInvalid') || 'Invalid email format' }]\n }]"}],attrs:{placeholder:t.$t("userManage.emailPlaceholder")||"Enter email"}},[e("a-icon",{attrs:{slot:"prefix",type:"mail"},slot:"prefix"})],1)],1),e("a-form-item",{attrs:{label:t.$t("userManage.role")||"Role"}},[e("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["role",{initialValue:"user"}],expression:"['role', { initialValue: 'user' }]"}],attrs:{placeholder:t.$t("userManage.rolePlaceholder")||"Select role"}},t._l(t.roles,function(a){return e("a-select-option",{key:a.id,attrs:{value:a.id}},[t._v(" "+t._s(t.getRoleLabel(a.id))+" ")])}),1)],1),t.isEdit?e("a-form-item",{attrs:{label:t.$t("userManage.status")||"Status"}},[e("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:"active"}],expression:"['status', { initialValue: 'active' }]"}],attrs:{placeholder:t.$t("userManage.statusPlaceholder")||"Select status"}},[e("a-select-option",{attrs:{value:"active"}},[t._v(t._s(t.$t("userManage.active")||"Active"))]),e("a-select-option",{attrs:{value:"disabled"}},[t._v(t._s(t.$t("userManage.disabled")||"Disabled"))])],1)],1):t._e()],1)],1),e("a-modal",{attrs:{"wrap-class-name":t.userManageModalWrapClass,title:t.$t("userManage.resetPassword")||"Reset Password",confirmLoading:t.resetPasswordLoading},on:{ok:t.handleResetPassword},model:{value:t.resetPasswordVisible,callback:function(e){t.resetPasswordVisible=e},expression:"resetPasswordVisible"}},[e("a-form",{attrs:{form:t.resetPasswordForm,layout:"vertical"}},[e("a-alert",{staticStyle:{"margin-bottom":"16px"},attrs:{message:t.$t("userManage.resetPasswordWarning")||"This will reset the user's password",type:"warning",showIcon:""}}),e("a-form-item",{attrs:{label:t.$t("userManage.newPassword")||"New Password"}},[e("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["new_password",{rules:[{required:!0,message:t.$t("userManage.passwordRequired")||"Please enter new password"},{min:6,message:t.$t("userManage.passwordMin")||"Password must be at least 6 characters"}]}],expression:"['new_password', {\n rules: [\n { required: true, message: $t('userManage.passwordRequired') || 'Please enter new password' },\n { min: 6, message: $t('userManage.passwordMin') || 'Password must be at least 6 characters' }\n ]\n }]"}],attrs:{placeholder:t.$t("userManage.newPasswordPlaceholder")||"Enter new password"}},[e("a-icon",{attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1)],1)],1),e("a-modal",{attrs:{"wrap-class-name":t.userManageModalWrapClass,title:(t.$t("userManage.adjustCredits")||"Adjust Credits")+(t.creditsEditingUser?" - ".concat(t.creditsEditingUser.username):""),confirmLoading:t.creditsLoading},on:{ok:t.handleSetCredits},model:{value:t.creditsModalVisible,callback:function(e){t.creditsModalVisible=e},expression:"creditsModalVisible"}},[e("a-form",{attrs:{layout:"vertical"}},[t.creditsEditingUser?e("div",{staticClass:"current-credits-info"},[e("span",{staticClass:"label"},[t._v(t._s(t.$t("userManage.currentCredits")||"Current Credits")+":")]),e("span",{staticClass:"value"},[t._v(t._s(t.formatCredits(t.creditsEditingUser.credits)))])]):t._e(),e("a-form-item",{attrs:{label:t.$t("userManage.newCredits")||"New Credits"}},[e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,precision:2,placeholder:t.$t("userManage.enterCredits")||"Enter new credits amount"},model:{value:t.newCredits,callback:function(e){t.newCredits=e},expression:"newCredits"}})],1),e("a-form-item",{attrs:{label:t.$t("userManage.remark")||"Remark"}},[e("a-input",{attrs:{placeholder:t.$t("userManage.remarkPlaceholder")||"Optional remark"},model:{value:t.creditsRemark,callback:function(e){t.creditsRemark=e},expression:"creditsRemark"}})],1)],1)],1),e("a-modal",{attrs:{"wrap-class-name":t.userManageModalWrapClass,title:(t.$t("userManage.setVip")||"Set VIP")+(t.vipEditingUser?" - ".concat(t.vipEditingUser.username):""),confirmLoading:t.vipLoading},on:{ok:t.handleSetVip},model:{value:t.vipModalVisible,callback:function(e){t.vipModalVisible=e},expression:"vipModalVisible"}},[e("a-form",{attrs:{layout:"vertical"}},[t.vipEditingUser&&t.vipEditingUser.vip_expires_at?e("div",{staticClass:"current-vip-info"},[e("span",{staticClass:"label"},[t._v(t._s(t.$t("userManage.currentVip")||"Current VIP")+":")]),e("span",{staticClass:"value",class:t.isVipActive(t.vipEditingUser.vip_expires_at)?"active":"expired"},[t._v(" "+t._s(t.isVipActive(t.vipEditingUser.vip_expires_at)?(t.$t("userManage.vipActive")||"Active")+" (".concat(t.formatDate(t.vipEditingUser.vip_expires_at),")"):t.$t("userManage.vipExpired")||"Expired")+" ")])]):t._e(),e("a-form-item",{attrs:{label:t.$t("userManage.vipDays")||"VIP Days"}},[e("a-select",{staticStyle:{width:"100%"},model:{value:t.vipDays,callback:function(e){t.vipDays=e},expression:"vipDays"}},[e("a-select-option",{attrs:{value:0}},[t._v(t._s(t.$t("userManage.cancelVip")||"Cancel VIP"))]),e("a-select-option",{attrs:{value:7}},[t._v("7 "+t._s(t.$t("userManage.days")||"days"))]),e("a-select-option",{attrs:{value:30}},[t._v("30 "+t._s(t.$t("userManage.days")||"days"))]),e("a-select-option",{attrs:{value:90}},[t._v("90 "+t._s(t.$t("userManage.days")||"days"))]),e("a-select-option",{attrs:{value:180}},[t._v("180 "+t._s(t.$t("userManage.days")||"days"))]),e("a-select-option",{attrs:{value:365}},[t._v("365 "+t._s(t.$t("userManage.days")||"days"))]),e("a-select-option",{attrs:{value:-1}},[t._v(t._s(t.$t("userManage.customDate")||"Custom Date"))])],1)],1),-1===t.vipDays?e("a-form-item",{attrs:{label:t.$t("userManage.vipExpiresAt")||"VIP Expires At"}},[e("a-date-picker",{staticStyle:{width:"100%"},attrs:{showTime:"",format:"YYYY-MM-DD HH:mm:ss"},model:{value:t.vipCustomDate,callback:function(e){t.vipCustomDate=e},expression:"vipCustomDate"}})],1):t._e(),e("a-form-item",{attrs:{label:t.$t("userManage.remark")||"Remark"}},[e("a-input",{attrs:{placeholder:t.$t("userManage.remarkPlaceholder")||"Optional remark"},model:{value:t.vipRemark,callback:function(e){t.vipRemark=e},expression:"vipRemark"}})],1)],1)],1)],1)},r=[],i=a(81127),n=a(56252),o=a(76338),l=(a(2892),a(79432),a(84841)),d=a(55434),c=a(95353),u={name:"UserManage",mixins:[d.t],data:function(){return{activeTab:"users",loading:!1,users:[],roles:[],searchKeyword:"",pagination:{current:1,pageSize:10,total:0},modalVisible:!1,modalLoading:!1,isEdit:!1,editingUser:null,resetPasswordVisible:!1,resetPasswordLoading:!1,resetPasswordUserId:null,creditsModalVisible:!1,creditsLoading:!1,creditsEditingUser:null,newCredits:0,creditsRemark:"",vipModalVisible:!1,vipLoading:!1,vipEditingUser:null,vipDays:30,vipCustomDate:null,vipRemark:"",strategyLoading:!1,systemStrategies:[],strategySummary:null,strategyStatusFilter:"all",strategyExecutionFilter:"all",strategySortBy:"",strategySortOrder:"desc",strategySearchKeyword:"",strategyPagination:{current:1,pageSize:20,total:0},strategiesLoaded:!1,orderLoading:!1,orders:[],orderSummary:null,orderStatusFilter:"all",orderSearchKeyword:"",orderPagination:{current:1,pageSize:20,total:0},ordersLoaded:!1,aiStatsLoading:!1,aiUserStats:[],aiRecentRecords:[],aiStatsSummary:null,aiStatsSearchKeyword:"",aiStatsPagination:{current:1,pageSize:20,total:0},aiStatsLoaded:!1}},computed:(0,o.A)((0,o.A)({},(0,c.L8)(["userInfo"])),{},{isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},userManageModalWrapClass:function(){return this.isDarkTheme?"user-manage-modal user-manage-modal-dark":"user-manage-modal"},currentUserId:function(){var t;return null===(t=this.userInfo)||void 0===t?void 0:t.id},columns:function(){return[{title:"ID",dataIndex:"id",width:60},{title:this.$t("userManage.username")||"Username",dataIndex:"username",width:120},{title:this.$t("userManage.nickname")||"Nickname",dataIndex:"nickname",width:100},{title:this.$t("userManage.email")||"Email",dataIndex:"email",width:180},{title:this.$t("userManage.role")||"Role",dataIndex:"role",width:90,scopedSlots:{customRender:"role"}},{title:this.$t("userManage.credits")||"Credits",dataIndex:"credits",width:100,scopedSlots:{customRender:"credits"}},{title:"VIP",dataIndex:"vip_expires_at",width:120,scopedSlots:{customRender:"vip_expires_at"}},{title:this.$t("userManage.status")||"Status",dataIndex:"status",width:90,scopedSlots:{customRender:"status"}},{title:this.$t("userManage.lastLogin")||"Last Login",dataIndex:"last_login_at",width:150,scopedSlots:{customRender:"last_login_at"}},{title:this.$t("common.actions")||"Actions",dataIndex:"action",width:180,scopedSlots:{customRender:"action"}}]},strategyColumns:function(){var t=this,e=function(e){return t.strategySortBy===e&&("asc"===t.strategySortOrder?"ascend":"descend")};return[{title:"ID",dataIndex:"id",key:"id",width:72,fixed:"left",sorter:!0,sortOrder:e("id")},{title:this.$t("systemOverview.colUser")||"User",dataIndex:"username",key:"username",width:118,fixed:"left",scopedSlots:{customRender:"userInfo"}},{title:this.$t("systemOverview.colStrategy")||"Strategy",dataIndex:"strategy_name",key:"strategy_name",width:160,ellipsis:!0,sorter:!0,sortOrder:e("strategy_name")},{title:this.$t("systemOverview.colStatus")||"Status",dataIndex:"status",key:"status",width:108,scopedSlots:{customRender:"strategyStatus"},sorter:!0,sortOrder:e("status")},{title:this.$t("systemOverview.colExecutionMode")||"Mode",dataIndex:"execution_mode",key:"execution_mode",width:96,align:"center",scopedSlots:{customRender:"executionModeInfo"},sorter:!0,sortOrder:e("execution_mode")},{title:this.$t("systemOverview.colSymbol")||"Symbol",dataIndex:"symbol",key:"symbol",width:140,scopedSlots:{customRender:"symbolInfo"},sorter:!0,sortOrder:e("symbol")},{title:this.$t("systemOverview.colCapital")||"Capital",dataIndex:"initial_capital",key:"initial_capital",width:110,scopedSlots:{customRender:"capitalInfo"},sorter:!0,sortOrder:e("initial_capital")},{title:this.$t("systemOverview.colPositionEquity")||"Pos. equity",dataIndex:"total_equity",key:"total_equity",width:120,align:"right",scopedSlots:{customRender:"equityInfo"},sorter:!0,sortOrder:e("total_equity")},{title:this.$t("systemOverview.colPnl")||"PnL / ROI",dataIndex:"total_pnl",key:"total_pnl",width:200,scopedSlots:{customRender:"pnlInfo"},sorter:!0,sortOrder:e("total_pnl")},{title:this.$t("systemOverview.colPositions")||"Pos",dataIndex:"position_count",key:"position_count",width:76,align:"center",scopedSlots:{customRender:"positionInfo"},sorter:!0,sortOrder:e("position_count")},{title:this.$t("systemOverview.colTrades")||"Trades",dataIndex:"trade_count",key:"trade_count",width:88,align:"center",scopedSlots:{customRender:"tradeInfo"},sorter:!0,sortOrder:e("trade_count")},{title:this.$t("systemOverview.colIndicator")||"Indicator",dataIndex:"indicator_name",key:"indicator_name",width:130,scopedSlots:{customRender:"indicatorInfo"}},{title:this.$t("systemOverview.colExchange")||"Exchange",dataIndex:"exchange_name",key:"exchange_name",width:100,scopedSlots:{customRender:"exchangeInfo"}},{title:this.$t("systemOverview.colTimeframe")||"TF",dataIndex:"timeframe",key:"timeframe",width:70,align:"center",scopedSlots:{customRender:"timeframeInfo"}},{title:this.$t("systemOverview.colLeverage")||"Lev",dataIndex:"leverage",key:"leverage",width:70,align:"center",scopedSlots:{customRender:"leverageInfo"},sorter:!0,sortOrder:e("leverage")},{title:this.$t("systemOverview.colCreatedAt")||"Created",dataIndex:"created_at",key:"created_at",width:150,scopedSlots:{customRender:"createdAtInfo"},sorter:!0,sortOrder:e("created_at")},{title:this.$t("systemOverview.colUpdatedAt")||"Updated",dataIndex:"updated_at",key:"updated_at",width:150,scopedSlots:{customRender:"updatedAtInfo"},sorter:!0,sortOrder:e("updated_at")}]},orderColumns:function(){return[{title:this.$t("adminOrders.colUser")||"User",dataIndex:"username",width:120,scopedSlots:{customRender:"orderUserInfo"}},{title:this.$t("adminOrders.colType")||"Type",dataIndex:"order_type",width:80,scopedSlots:{customRender:"orderTypeInfo"}},{title:this.$t("adminOrders.colPlan")||"Plan",dataIndex:"plan",width:100,scopedSlots:{customRender:"planInfo"}},{title:this.$t("adminOrders.colAmount")||"Amount",dataIndex:"amount",width:120,scopedSlots:{customRender:"amountInfo"}},{title:this.$t("adminOrders.colStatus")||"Status",dataIndex:"status",width:100,scopedSlots:{customRender:"orderStatusInfo"}},{title:this.$t("adminOrders.colChain")||"Chain",dataIndex:"chain",width:80,scopedSlots:{customRender:"chainInfo"}},{title:this.$t("adminOrders.colAddress")||"Address",dataIndex:"address",width:140,scopedSlots:{customRender:"addressInfo"}},{title:this.$t("adminOrders.colTxHash")||"Tx Hash",dataIndex:"tx_hash",width:160,scopedSlots:{customRender:"txHashInfo"}},{title:this.$t("adminOrders.colCreatedAt")||"Created",dataIndex:"created_at",width:150,scopedSlots:{customRender:"orderCreatedAt"}}]},aiUserColumns:function(){return[{title:this.$t("adminAiStats.colUser")||"User",dataIndex:"username",width:140,scopedSlots:{customRender:"aiUserInfo"}},{title:this.$t("adminAiStats.colAnalysisCount")||"Analyses",dataIndex:"analysis_count",width:100,align:"center",scopedSlots:{customRender:"analysisCountInfo"},sorter:function(t,e){return t.analysis_count-e.analysis_count},defaultSortOrder:"descend"},{title:this.$t("adminAiStats.colSymbols")||"Symbols",dataIndex:"symbol_count",width:90,align:"center"},{title:this.$t("adminAiStats.colMarkets")||"Markets",dataIndex:"market_count",width:90,align:"center"},{title:this.$t("adminAiStats.colAccuracy")||"Correct / Wrong",dataIndex:"correct",width:130,align:"center",scopedSlots:{customRender:"accuracyInfo"}},{title:this.$t("adminAiStats.colFeedback")||"Feedback",dataIndex:"helpful",width:130,align:"center",scopedSlots:{customRender:"feedbackInfo"}},{title:this.$t("adminAiStats.colLastAnalysis")||"Last Analysis",dataIndex:"last_analysis_at",width:160,scopedSlots:{customRender:"lastAnalysisAt"}}]},aiRecentColumns:function(){return[{title:"ID",dataIndex:"id",width:60},{title:this.$t("adminAiStats.colUser")||"User",dataIndex:"username",width:120,scopedSlots:{customRender:"recentUserInfo"}},{title:this.$t("adminAiStats.colMarket")||"Market",dataIndex:"market",width:80},{title:this.$t("adminAiStats.colSymbol")||"Symbol",dataIndex:"symbol",width:120},{title:this.$t("adminAiStats.colModel")||"Model",dataIndex:"model",width:140,ellipsis:!0},{title:this.$t("adminAiStats.colStatus")||"Status",dataIndex:"status",width:100,scopedSlots:{customRender:"recentStatusInfo"}},{title:this.$t("adminAiStats.colCreatedAt")||"Time",dataIndex:"created_at",width:160,scopedSlots:{customRender:"recentCreatedAt"}}]}}),beforeCreate:function(){this.form=this.$form.createForm(this),this.resetPasswordForm=this.$form.createForm(this,{name:"resetPassword"})},mounted:function(){this.loadUsers(),this.loadRoles()},methods:{handleTabChange:function(t){"strategies"!==t||this.strategiesLoaded||this.loadSystemStrategies(),"orders"!==t||this.ordersLoaded||this.loadOrders(),"aiStats"!==t||this.aiStatsLoaded||this.loadAiStats()},loadSystemStrategies:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a,s;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.strategyLoading=!0,e.p=1,a={page:t.strategyPagination.current,page_size:t.strategyPagination.pageSize,status:"all"===t.strategyStatusFilter?"":t.strategyStatusFilter,execution_mode:"all"===t.strategyExecutionFilter?"":t.strategyExecutionFilter,search:t.strategySearchKeyword||""},t.strategySortBy&&(a.sort_by=t.strategySortBy,a.sort_order=t.strategySortOrder),e.n=2,(0,l.DK)(a);case 2:s=e.v,1===s.code?(t.systemStrategies=s.data.items||[],t.strategyPagination.total=s.data.total||0,t.strategySummary=s.data.summary||{},t.strategiesLoaded=!0):t.$message.error(s.msg||"Failed to load strategies"),e.n=4;break;case 3:e.p=3,e.v,t.$message.error("Failed to load system strategies");case 4:return e.p=4,t.strategyLoading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},handleStrategySearch:function(){this.strategyPagination.current=1,this.loadSystemStrategies()},handleStrategyFilterChange:function(){this.strategyPagination.current=1,this.loadSystemStrategies()},handleStrategyExecutionFilterChange:function(){this.strategyPagination.current=1,this.loadSystemStrategies()},handleStrategyTableChange:function(t,e,a){if(t&&(this.strategyPagination.current=t.current,this.strategyPagination.pageSize=t.pageSize),a&&Object.keys(a).length)if("ascend"===a.order||"descend"===a.order){var s=null!=a.columnKey?String(a.columnKey):String(a.field||"");this.strategySortBy=s,this.strategySortOrder="ascend"===a.order?"asc":"desc"}else this.strategySortBy="",this.strategySortOrder="desc";this.loadSystemStrategies()},getUserColor:function(t){var e=["#1890ff","#722ed1","#13c2c2","#fa8c16","#eb2f96","#52c41a","#2f54eb","#faad14"];return e[(t||0)%e.length]},formatNumber:function(t){return t||0===t?Number(t).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:2}):"0"},formatPnl:function(t){if(!t&&0!==t)return"0";var e=Number(t),a=e>=0?"+":"";return a+e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:4})},truncate:function(t,e){return t?t.length>e?t.substring(0,e)+"...":t:""},loadUsers:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.loading=!0,e.p=1,e.n=2,(0,l.aU)({page:t.pagination.current,page_size:t.pagination.pageSize,search:t.searchKeyword||""});case 2:a=e.v,1===a.code?(t.users=a.data.items||[],t.pagination.total=a.data.total||0):t.$message.error(a.msg||"Failed to load users"),e.n=4;break;case 3:e.p=3,e.v,t.$message.error("Failed to load users");case 4:return e.p=4,t.loading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},handleSearch:function(){this.pagination.current=1,this.loadUsers()},loadRoles:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,l.O0)();case 1:a=e.v,1===a.code&&(t.roles=a.data.roles||[]),e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}))()},handleTableChange:function(t){this.pagination.current=t.current,this.pagination.pageSize=t.pageSize,this.loadUsers()},showCreateModal:function(){var t=this;this.isEdit=!1,this.editingUser=null,this.modalVisible=!0,this.$nextTick(function(){t.form.resetFields()})},showEditModal:function(t){var e=this;this.isEdit=!0,this.editingUser=t,this.modalVisible=!0,this.$nextTick(function(){e.form.setFieldsValue({username:t.username,nickname:t.nickname,email:t.email,role:t.role,status:t.status})})},handleModalCancel:function(){this.modalVisible=!1,this.form.resetFields()},handleModalOk:function(){var t=this;this.form.validateFields(function(){var e=(0,n.A)((0,i.A)().m(function e(a,s){var r;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!a){e.n=1;break}return e.a(2);case 1:if(t.modalLoading=!0,e.p=2,!t.isEdit){e.n=4;break}return e.n=3,(0,l.TK)(t.editingUser.id,{nickname:s.nickname,email:s.email,role:s.role,status:s.status});case 3:r=e.v,e.n=6;break;case 4:return e.n=5,(0,l.kg)(s);case 5:r=e.v;case 6:1===r.code?(t.$message.success(r.msg||"Success"),t.modalVisible=!1,t.form.resetFields(),t.loadUsers()):t.$message.error(r.msg||"Operation failed"),e.n=8;break;case 7:e.p=7,e.v,t.$message.error("Operation failed");case 8:return e.p=8,t.modalLoading=!1,e.f(8);case 9:return e.a(2)}},e,null,[[2,7,8,9]])}));return function(t,a){return e.apply(this,arguments)}}())},handleDelete:function(t){var e=this;return(0,n.A)((0,i.A)().m(function a(){var s;return(0,i.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return a.p=0,a.n=1,(0,l.hG)(t);case 1:s=a.v,1===s.code?(e.$message.success(s.msg||"User deleted"),e.loadUsers()):e.$message.error(s.msg||"Delete failed"),a.n=3;break;case 2:a.p=2,a.v,e.$message.error("Delete failed");case 3:return a.a(2)}},a,null,[[0,2]])}))()},showResetPasswordModal:function(t){var e=this;this.resetPasswordUserId=t.id,this.resetPasswordVisible=!0,this.$nextTick(function(){e.resetPasswordForm.resetFields()})},handleResetPassword:function(){var t=this;this.resetPasswordForm.validateFields(function(){var e=(0,n.A)((0,i.A)().m(function e(a,s){var r;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!a){e.n=1;break}return e.a(2);case 1:return t.resetPasswordLoading=!0,e.p=2,e.n=3,(0,l.cw)({user_id:t.resetPasswordUserId,new_password:s.new_password});case 3:r=e.v,1===r.code?(t.$message.success(r.msg||"Password reset successfully"),t.resetPasswordVisible=!1,t.resetPasswordForm.resetFields()):t.$message.error(r.msg||"Reset failed"),e.n=5;break;case 4:e.p=4,e.v,t.$message.error("Reset failed");case 5:return e.p=5,t.resetPasswordLoading=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}));return function(t,a){return e.apply(this,arguments)}}())},getRoleColor:function(t){var e={admin:"red",manager:"orange",user:"blue",viewer:"default"};return e[t]||"default"},getRoleLabel:function(t){var e={admin:this.$t("userManage.roleAdmin")||"Admin",manager:this.$t("userManage.roleManager")||"Manager",user:this.$t("userManage.roleUser")||"User",viewer:this.$t("userManage.roleViewer")||"Viewer"};return e[t]||t},formatTime:function(t){if(!t)return"";var e=new Date("number"===typeof t?1e3*t:t);return e.toLocaleString()},formatCredits:function(t){return t||0===t?Number(t).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:2}):"0"},formatDate:function(t){if(!t)return"";var e=new Date(t);return e.toLocaleDateString()},isVipActive:function(t){return!!t&&new Date(t)>new Date},showCreditsModal:function(t){this.creditsEditingUser=t,this.newCredits=parseFloat(t.credits)||0,this.creditsRemark="",this.creditsModalVisible=!0},handleSetCredits:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!(t.newCredits<0)){e.n=1;break}return t.$message.error(t.$t("userManage.creditsNonNegative")||"Credits cannot be negative"),e.a(2);case 1:return t.creditsLoading=!0,e.p=2,e.n=3,(0,l.wq)({user_id:t.creditsEditingUser.id,credits:t.newCredits,remark:t.creditsRemark});case 3:a=e.v,1===a.code?(t.$message.success(a.msg||"Credits updated successfully"),t.creditsModalVisible=!1,t.loadUsers()):t.$message.error(a.msg||"Update failed"),e.n=5;break;case 4:e.p=4,e.v,t.$message.error("Update failed");case 5:return e.p=5,t.creditsLoading=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},showVipModal:function(t){this.vipEditingUser=t,this.vipDays=30,this.vipCustomDate=null,this.vipRemark="",this.vipModalVisible=!0},handleSetVip:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a,s;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(a={user_id:t.vipEditingUser.id,remark:t.vipRemark},-1!==t.vipDays){e.n=2;break}if(t.vipCustomDate){e.n=1;break}return t.$message.error(t.$t("userManage.selectDate")||"Please select a date"),e.a(2);case 1:a.vip_expires_at=t.vipCustomDate.toISOString(),e.n=3;break;case 2:a.vip_days=t.vipDays;case 3:return t.vipLoading=!0,e.p=4,e.n=5,(0,l.nY)(a);case 5:s=e.v,1===s.code?(t.$message.success(s.msg||"VIP status updated successfully"),t.vipModalVisible=!1,t.loadUsers()):t.$message.error(s.msg||"Update failed"),e.n=7;break;case 6:e.p=6,e.v,t.$message.error("Update failed");case 7:return e.p=7,t.vipLoading=!1,e.f(7);case 8:return e.a(2)}},e,null,[[4,6,7,8]])}))()},loadOrders:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.orderLoading=!0,e.p=1,e.n=2,(0,l.vi)({page:t.orderPagination.current,page_size:t.orderPagination.pageSize,status:"all"===t.orderStatusFilter?"":t.orderStatusFilter,search:t.orderSearchKeyword||""});case 2:a=e.v,1===a.code?(t.orders=a.data.items||[],t.orderPagination.total=a.data.total||0,t.orderSummary=a.data.summary||{},t.ordersLoaded=!0):t.$message.error(a.msg||"Failed to load orders"),e.n=4;break;case 3:e.p=3,e.v,t.$message.error("Failed to load orders");case 4:return e.p=4,t.orderLoading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},handleOrderSearch:function(){this.orderPagination.current=1,this.loadOrders()},handleOrderFilterChange:function(){this.orderPagination.current=1,this.loadOrders()},handleOrderTableChange:function(t){this.orderPagination.current=t.current,this.orderPagination.pageSize=t.pageSize,this.loadOrders()},getOrderStatusColor:function(t){var e={paid:"green",confirmed:"green",pending:"orange",expired:"grey",cancelled:"default",failed:"red"};return e[t]||"default"},getOrderStatusLabel:function(t){var e={paid:this.$t("adminOrders.statusPaid")||"Paid",confirmed:this.$t("adminOrders.statusConfirmed")||"Confirmed",pending:this.$t("adminOrders.statusPending")||"Pending",expired:this.$t("adminOrders.statusExpired")||"Expired",cancelled:this.$t("adminOrders.statusCancelled")||"Cancelled",failed:this.$t("adminOrders.statusFailed")||"Failed"};return e[t]||t},loadAiStats:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.aiStatsLoading=!0,e.p=1,e.n=2,(0,l.d$)({page:t.aiStatsPagination.current,page_size:t.aiStatsPagination.pageSize,search:t.aiStatsSearchKeyword||""});case 2:a=e.v,1===a.code?(t.aiUserStats=a.data.user_stats||[],t.aiRecentRecords=a.data.recent||[],t.aiStatsPagination.total=a.data.user_total||0,t.aiStatsSummary=a.data.summary||{},t.aiStatsLoaded=!0):t.$message.error(a.msg||"Failed to load AI stats"),e.n=4;break;case 3:e.p=3,e.v,t.$message.error("Failed to load AI stats");case 4:return e.p=4,t.aiStatsLoading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},handleAiStatsSearch:function(){this.aiStatsPagination.current=1,this.loadAiStats()},handleAiStatsTableChange:function(t){this.aiStatsPagination.current=t.current,this.aiStatsPagination.pageSize=t.pageSize,this.loadAiStats()}}},m=u,p=a(845),g=(0,p.A)(m,s,r,!1,null,"7a022132",null),v=g.exports},84841:function(t,e,a){a.d(e,{DK:function(){return _},E$:function(){return c},Gl:function(){return p},O0:function(){return d},TK:function(){return n},aU:function(){return r},cw:function(){return l},d$:function(){return w},hG:function(){return o},hl:function(){return g},kg:function(){return i},nY:function(){return h},r7:function(){return u},rx:function(){return y},v9:function(){return v},vF:function(){return m},vi:function(){return S},wq:function(){return f}});var s=a(75769);function r(t){return(0,s.Ay)({url:"/api/users/list",method:"get",params:t})}function i(t){return(0,s.Ay)({url:"/api/users/create",method:"post",data:t})}function n(t,e){return(0,s.Ay)({url:"/api/users/update",method:"put",params:{id:t},data:e})}function o(t){return(0,s.Ay)({url:"/api/users/delete",method:"delete",params:{id:t}})}function l(t){return(0,s.Ay)({url:"/api/users/reset-password",method:"post",data:t})}function d(){return(0,s.Ay)({url:"/api/users/roles",method:"get"})}function c(){return(0,s.Ay)({url:"/api/users/profile",method:"get"})}function u(t){return(0,s.Ay)({url:"/api/users/profile/update",method:"put",data:t})}function m(){return(0,s.Ay)({url:"/api/users/notification-settings",method:"get"})}function p(t){return(0,s.Ay)({url:"/api/users/notification-settings",method:"put",data:t})}function g(){return(0,s.Ay)({url:"/api/users/notification-settings/test",method:"post",data:{}})}function v(t){return(0,s.Ay)({url:"/api/users/my-credits-log",method:"get",params:t})}function y(t){return(0,s.Ay)({url:"/api/users/my-referrals",method:"get",params:t})}function f(t){return(0,s.Ay)({url:"/api/users/set-credits",method:"post",data:t})}function h(t){return(0,s.Ay)({url:"/api/users/set-vip",method:"post",data:t})}function _(t){return(0,s.Ay)({url:"/api/users/system-strategies",method:"get",params:t})}function S(t){return(0,s.Ay)({url:"/api/users/admin-orders",method:"get",params:t})}function w(t){return(0,s.Ay)({url:"/api/users/admin-ai-stats",method:"get",params:t})}}}]); \ No newline at end of file diff --git a/frontend/dist/js/593.fe3216c1.js b/frontend/dist/js/593.fe3216c1.js new file mode 100644 index 0000000..a4fe586 --- /dev/null +++ b/frontend/dist/js/593.fe3216c1.js @@ -0,0 +1 @@ +"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[593],{98593:function(t,e,a){a.r(e),a.d(e,{default:function(){return v}});var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"user-manage-page",class:{"theme-dark":t.isDarkTheme}},[e("div",{staticClass:"page-header"},[e("h2",{staticClass:"page-title"},[e("a-icon",{attrs:{type:"team"}}),e("span",[t._v(t._s(t.$t("userManage.title")||"User Management"))])],1),e("p",{staticClass:"page-desc"},[t._v(t._s(t.$t("userManage.description")||"Manage system users, roles and permissions"))])]),e("a-tabs",{staticClass:"manage-tabs",on:{change:t.handleTabChange},model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[e("a-tab-pane",{key:"users",attrs:{tab:t.$t("userManage.tabUsers")||"User Management"}},[e("div",{staticClass:"toolbar"},[e("div",{staticClass:"toolbar-left"},[e("a-button",{attrs:{type:"primary"},on:{click:t.showCreateModal}},[e("a-icon",{attrs:{type:"user-add"}}),t._v(" "+t._s(t.$t("userManage.createUser")||"Create User")+" ")],1),e("a-button",{on:{click:t.loadUsers}},[e("a-icon",{attrs:{type:"reload"}}),t._v(" "+t._s(t.$t("common.refresh")||"Refresh")+" ")],1)],1),e("div",{staticClass:"toolbar-right"},[e("a-input-search",{staticClass:"toolbar-search",attrs:{placeholder:t.$t("userManage.searchPlaceholder")||"Search by username/email",allowClear:""},on:{search:t.handleSearch,pressEnter:t.handleSearch},model:{value:t.searchKeyword,callback:function(e){t.searchKeyword=e},expression:"searchKeyword"}})],1)]),e("a-card",{staticClass:"user-table-card",attrs:{bordered:!1}},[e("a-table",{attrs:{columns:t.columns,dataSource:t.users,loading:t.loading,pagination:t.pagination,rowKey:function(t){return t.id},scroll:{x:1280}},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"status",fn:function(a){return[e("a-tag",{attrs:{color:"active"===a?"green":"red"}},[t._v(" "+t._s("active"===a?t.$t("userManage.active")||"Active":t.$t("userManage.disabled")||"Disabled")+" ")])]}},{key:"role",fn:function(a){return[e("a-tag",{attrs:{color:t.getRoleColor(a)}},[t._v(" "+t._s(t.getRoleLabel(a))+" ")])]}},{key:"last_login_at",fn:function(a){return[a?e("span",[t._v(t._s(t.formatTime(a)))]):e("span",{staticClass:"text-muted"},[t._v(t._s(t.$t("userManage.neverLogin")||"Never"))])]}},{key:"credits",fn:function(a){return[e("span",{staticClass:"credits-value"},[t._v(t._s(t.formatCredits(a)))])]}},{key:"vip_expires_at",fn:function(a){return[a&&t.isVipActive(a)?[e("a-tag",{attrs:{color:"gold"}},[e("a-icon",{attrs:{type:"crown"}}),t._v(" "+t._s(t.formatDate(a))+" ")],1)]:e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"action",fn:function(a,s){return[e("a-space",[e("a-tooltip",{attrs:{title:t.$t("common.edit")||"Edit"}},[e("a-button",{attrs:{type:"link",size:"small"},on:{click:function(e){return t.showEditModal(s)}}},[e("a-icon",{attrs:{type:"edit"}})],1)],1),e("a-tooltip",{attrs:{title:t.$t("userManage.adjustCredits")||"Adjust Credits"}},[e("a-button",{attrs:{type:"link",size:"small"},on:{click:function(e){return t.showCreditsModal(s)}}},[e("a-icon",{staticStyle:{color:"#722ed1"},attrs:{type:"wallet"}})],1)],1),e("a-tooltip",{attrs:{title:t.$t("userManage.setVip")||"Set VIP"}},[e("a-button",{attrs:{type:"link",size:"small"},on:{click:function(e){return t.showVipModal(s)}}},[e("a-icon",{staticStyle:{color:"#faad14"},attrs:{type:"crown"}})],1)],1),e("a-tooltip",{attrs:{title:t.$t("userManage.resetPassword")||"Reset Password"}},[e("a-button",{attrs:{type:"link",size:"small"},on:{click:function(e){return t.showResetPasswordModal(s)}}},[e("a-icon",{attrs:{type:"key"}})],1)],1),e("a-tooltip",{attrs:{title:t.$t("common.delete")||"Delete"}},[e("a-popconfirm",{attrs:{title:t.$t("userManage.confirmDelete")||"Are you sure to delete this user?"},on:{confirm:function(e){return t.handleDelete(s.id)}}},[e("a-button",{attrs:{type:"link",size:"small",disabled:s.id===t.currentUserId}},[e("a-icon",{staticStyle:{color:"#ff4d4f"},attrs:{type:"delete"}})],1)],1)],1)],1)]}}])})],1)],1),e("a-tab-pane",{key:"strategies",attrs:{tab:t.$t("systemOverview.tabTitle")||"System Overview"}},[t.strategySummary?e("div",{staticClass:"summary-cards"},[e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #667eea, #764ba2)"}},[e("a-icon",{attrs:{type:"fund"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.strategySummary.total_strategies||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("systemOverview.totalStrategies")||"Total Strategies"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #11998e, #38ef7d)"}},[e("a-icon",{attrs:{type:"play-circle"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.strategySummary.running_strategies||0))]),e("div",{staticClass:"summary-sub"},[t._v(" "+t._s(t.$t("systemOverview.live")||"实盘")+": "+t._s(t.strategySummary.running_live_strategies||0)+" / "+t._s(t.$t("systemOverview.signal")||"仅通知")+": "+t._s(t.strategySummary.running_signal_strategies||0)+" ")]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("systemOverview.runningStrategies")||"Running"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #f093fb, #f5576c)"}},[e("a-icon",{attrs:{type:"dollar"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.formatNumber(t.strategySummary.total_capital)))]),e("div",{staticClass:"summary-sub"},[t._v(" "+t._s(t.$t("systemOverview.live")||"实盘")+": "+t._s(t.formatNumber(t.strategySummary.live_capital))+" / "+t._s(t.$t("systemOverview.signal")||"仅通知")+": "+t._s(t.formatNumber(t.strategySummary.signal_capital))+" ")]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("systemOverview.totalCapital")||"Total Capital"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",style:{background:(t.strategySummary.total_pnl||0)>=0?"linear-gradient(135deg, #11998e, #38ef7d)":"linear-gradient(135deg, #ff416c, #ff4b2b)"}},[e("a-icon",{attrs:{type:"rise"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value",class:(t.strategySummary.total_pnl||0)>=0?"text-profit":"text-loss"},[t._v(" "+t._s(t.formatPnl(t.strategySummary.total_pnl))+" "),e("span",{staticClass:"roi-badge"},[t._v(t._s(t.strategySummary.total_roi||0)+"%")])]),e("div",{staticClass:"summary-sub"},[t._v(" "+t._s(t.$t("systemOverview.live")||"实盘")+": "+t._s(t.formatPnl(t.strategySummary.live_pnl))+" / "+t._s(t.$t("systemOverview.signal")||"仅通知")+": "+t._s(t.formatPnl(t.strategySummary.signal_pnl))+" ")]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("systemOverview.totalPnl")||"Total PnL"))])])])]):t._e(),e("div",{staticClass:"toolbar"},[e("div",{staticClass:"toolbar-left"},[e("a-button",{on:{click:t.loadSystemStrategies}},[e("a-icon",{attrs:{type:"reload"}}),t._v(" "+t._s(t.$t("common.refresh")||"Refresh")+" ")],1),e("a-select",{staticClass:"toolbar-select",on:{change:t.handleStrategyFilterChange},model:{value:t.strategyStatusFilter,callback:function(e){t.strategyStatusFilter=e},expression:"strategyStatusFilter"}},[e("a-select-option",{attrs:{value:"all"}},[t._v(t._s(t.$t("systemOverview.filterAll")||"All Status"))]),e("a-select-option",{attrs:{value:"running"}},[t._v(t._s(t.$t("systemOverview.filterRunning")||"Running"))]),e("a-select-option",{attrs:{value:"stopped"}},[t._v(t._s(t.$t("systemOverview.filterStopped")||"Stopped"))])],1),e("a-select",{staticClass:"toolbar-select",on:{change:t.handleStrategyExecutionFilterChange},model:{value:t.strategyExecutionFilter,callback:function(e){t.strategyExecutionFilter=e},expression:"strategyExecutionFilter"}},[e("a-select-option",{attrs:{value:"all"}},[t._v(t._s(t.$t("systemOverview.filterExecAll")||"All modes"))]),e("a-select-option",{attrs:{value:"live"}},[t._v(t._s(t.$t("systemOverview.live")||"Live"))]),e("a-select-option",{attrs:{value:"signal"}},[t._v(t._s(t.$t("systemOverview.signal")||"Signal"))])],1)],1),e("div",{staticClass:"toolbar-right"},[e("a-input-search",{staticClass:"toolbar-search",attrs:{placeholder:t.$t("systemOverview.searchPlaceholder")||"Search strategy/symbol/user",allowClear:""},on:{search:t.handleStrategySearch,pressEnter:t.handleStrategySearch},model:{value:t.strategySearchKeyword,callback:function(e){t.strategySearchKeyword=e},expression:"strategySearchKeyword"}})],1)]),e("a-card",{staticClass:"user-table-card",attrs:{bordered:!1}},[e("a-table",{attrs:{columns:t.strategyColumns,dataSource:t.systemStrategies,loading:t.strategyLoading,pagination:t.strategyPagination,rowKey:function(t){return t.id},scroll:{x:1920}},on:{change:t.handleStrategyTableChange},scopedSlots:t._u([{key:"strategyStatus",fn:function(a){return[e("span",{staticClass:"status-cell"},[e("span",{staticClass:"status-dot",class:"running"===a?"dot-running":"dot-stopped"}),e("span",{class:"running"===a?"status-running":"status-stopped"},[t._v(" "+t._s("running"===a?t.$t("systemOverview.running")||"Running":t.$t("systemOverview.stopped")||"Stopped")+" ")])])]}},{key:"userInfo",fn:function(a,s){return[e("a-tooltip",{attrs:{title:s.nickname||s.username||"-"}},[e("span",{staticClass:"user-cell"},[e("a-avatar",{style:{backgroundColor:t.getUserColor(s.user_id),fontSize:"11px",marginRight:"6px"},attrs:{size:"small"}},[t._v(" "+t._s((s.nickname||s.username||"?").charAt(0).toUpperCase())+" ")]),e("span",{staticClass:"user-name"},[t._v(t._s(t.truncate(s.nickname||s.username||"-",8)))])],1)])]}},{key:"symbolInfo",fn:function(a,s){return[e("div",[e("span",{staticClass:"symbol-text"},[t._v(t._s(s.symbol||"-"))]),"cross_sectional"===s.cs_strategy_type?e("a-tag",{staticStyle:{"margin-left":"4px"},attrs:{color:"purple",size:"small"}},[t._v("CS")]):t._e()],1),"cross_sectional"===s.cs_strategy_type&&s.symbol_list&&s.symbol_list.length?e("div",{staticClass:"symbol-count text-muted"},[t._v(" "+t._s(s.symbol_list.length)+" "+t._s(t.$t("systemOverview.symbols")||"symbols")+" ")]):t._e()]}},{key:"capitalInfo",fn:function(a){return[e("span",[t._v(t._s(t.formatNumber(a)))])]}},{key:"executionModeInfo",fn:function(a){return["live"===a?e("a-tag",{attrs:{color:"green",size:"small"}},[t._v(t._s(t.$t("systemOverview.live")||"Live"))]):"signal"===a?e("a-tag",{attrs:{color:"blue",size:"small"}},[t._v(t._s(t.$t("systemOverview.signal")||"Signal"))]):e("a-tag",{attrs:{size:"small"}},[t._v(t._s(a||"—"))])]}},{key:"equityInfo",fn:function(a,s){return["live"===s.execution_mode?e("span",[t._v(t._s(t.formatNumber(a||0)))]):e("span",{staticClass:"text-muted"},[t._v("—")])]}},{key:"pnlInfo",fn:function(a,s){return[e("div",{class:s.total_pnl>=0?"text-profit":"text-loss"},[e("span",{staticClass:"pnl-value"},[t._v(t._s(t.formatPnl(s.total_pnl)))]),e("span",{staticClass:"roi-text"},[t._v("("+t._s(s.roi>=0?"+":"")+t._s(s.roi)+"%)")])]),e("div",{staticClass:"pnl-detail text-muted"},[e("span",[t._v(t._s(t.$t("systemOverview.realized")||"Real")+": "+t._s(t.formatPnl(s.total_realized_pnl)))]),e("span",{staticStyle:{"margin-left":"8px"}},[t._v(t._s(t.$t("systemOverview.unrealized")||"Unreal")+": "+t._s(t.formatPnl(s.total_unrealized_pnl)))])])]}},{key:"positionInfo",fn:function(t,a){return[e("a-badge",{attrs:{count:a.position_count,numberStyle:{backgroundColor:a.position_count>0?"#52c41a":"#d9d9d9"}}})]}},{key:"tradeInfo",fn:function(a){return[e("span",[t._v(t._s(a||0))])]}},{key:"indicatorInfo",fn:function(a){return[a?e("a-tooltip",{attrs:{title:a}},[e("span",{staticClass:"indicator-name"},[t._v(t._s(t.truncate(a,16)))])]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"exchangeInfo",fn:function(a){return[a?e("span",{staticClass:"exchange-name"},[t._v(t._s(a))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"timeframeInfo",fn:function(a){return[a?e("a-tag",{attrs:{size:"small"}},[t._v(t._s(a))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"leverageInfo",fn:function(a){return[a>1?e("span",{staticStyle:{color:"#fa8c16","font-weight":"600"}},[t._v(t._s(a)+"x")]):e("span",[t._v(t._s(a||1)+"x")])]}},{key:"createdAtInfo",fn:function(a){return[a?e("span",[t._v(t._s(t.formatTime(a)))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"updatedAtInfo",fn:function(a){return[a?e("span",[t._v(t._s(t.formatTime(a)))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}}])})],1)],1),e("a-tab-pane",{key:"orders",attrs:{tab:t.$t("adminOrders.tabTitle")||"Order List"}},[t.orderSummary?e("div",{staticClass:"summary-cards"},[e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #667eea, #764ba2)"}},[e("a-icon",{attrs:{type:"file-text"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.orderSummary.total_orders||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminOrders.totalOrders")||"Total Orders"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #11998e, #38ef7d)"}},[e("a-icon",{attrs:{type:"check-circle"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.orderSummary.paid_orders||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminOrders.paidOrders")||"Paid"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #f093fb, #f5576c)"}},[e("a-icon",{attrs:{type:"clock-circle"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.orderSummary.pending_orders||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminOrders.pendingOrders")||"Pending"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #fa709a, #fee140)"}},[e("a-icon",{attrs:{type:"dollar"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.formatNumber(t.orderSummary.total_revenue))+" "),e("span",{staticStyle:{"font-size":"13px",color:"#999"}},[t._v("USDT")])]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminOrders.totalRevenue")||"Total Revenue"))])])])]):t._e(),e("div",{staticClass:"toolbar"},[e("div",{staticClass:"toolbar-left"},[e("a-button",{on:{click:t.loadOrders}},[e("a-icon",{attrs:{type:"reload"}}),t._v(" "+t._s(t.$t("common.refresh")||"Refresh")+" ")],1),e("a-select",{staticClass:"toolbar-select",on:{change:t.handleOrderFilterChange},model:{value:t.orderStatusFilter,callback:function(e){t.orderStatusFilter=e},expression:"orderStatusFilter"}},[e("a-select-option",{attrs:{value:"all"}},[t._v(t._s(t.$t("adminOrders.filterAll")||"All Status"))]),e("a-select-option",{attrs:{value:"pending"}},[t._v(t._s(t.$t("adminOrders.filterPending")||"Pending"))]),e("a-select-option",{attrs:{value:"paid"}},[t._v(t._s(t.$t("adminOrders.filterPaid")||"Paid"))]),e("a-select-option",{attrs:{value:"confirmed"}},[t._v(t._s(t.$t("adminOrders.filterConfirmed")||"Confirmed"))]),e("a-select-option",{attrs:{value:"expired"}},[t._v(t._s(t.$t("adminOrders.filterExpired")||"Expired"))])],1)],1),e("div",{staticClass:"toolbar-right"},[e("a-input-search",{staticClass:"toolbar-search",attrs:{placeholder:t.$t("adminOrders.searchPlaceholder")||"Search by username/email",allowClear:""},on:{search:t.handleOrderSearch,pressEnter:t.handleOrderSearch},model:{value:t.orderSearchKeyword,callback:function(e){t.orderSearchKeyword=e},expression:"orderSearchKeyword"}})],1)]),e("a-card",{staticClass:"user-table-card",attrs:{bordered:!1}},[e("a-table",{attrs:{columns:t.orderColumns,dataSource:t.orders,loading:t.orderLoading,pagination:t.orderPagination,rowKey:function(t){return t.order_type+"-"+t.id},scroll:{x:1400}},on:{change:t.handleOrderTableChange},scopedSlots:t._u([{key:"orderUserInfo",fn:function(a,s){return[e("a-tooltip",{attrs:{title:(s.nickname||s.username||"-")+" ("+(s.user_email||"")+")"}},[e("span",{staticClass:"user-cell"},[e("a-avatar",{style:{backgroundColor:t.getUserColor(s.user_id),fontSize:"11px",marginRight:"6px"},attrs:{size:"small"}},[t._v(" "+t._s((s.nickname||s.username||"?").charAt(0).toUpperCase())+" ")]),e("span",{staticClass:"user-name"},[t._v(t._s(t.truncate(s.nickname||s.username||"-",10)))])],1)])]}},{key:"orderTypeInfo",fn:function(a){return[e("a-tag",{attrs:{color:"usdt"===a?"green":"blue"}},[t._v(" "+t._s("usdt"===a?"USDT":"Mock")+" ")])]}},{key:"planInfo",fn:function(a){return[e("a-tag",{attrs:{color:"lifetime"===a?"gold":"yearly"===a?"purple":"cyan"}},[t._v(" "+t._s("lifetime"===a?t.$t("adminOrders.lifetime")||"Lifetime":"yearly"===a?t.$t("adminOrders.yearly")||"Yearly":t.$t("adminOrders.monthly")||"Monthly")+" ")])]}},{key:"amountInfo",fn:function(a,s){return[e("span",{staticStyle:{"font-weight":"600"}},[t._v(t._s(a))]),e("span",{staticClass:"text-muted",staticStyle:{"margin-left":"4px"}},[t._v(t._s(s.currency))])]}},{key:"orderStatusInfo",fn:function(a){return[e("a-tag",{attrs:{color:t.getOrderStatusColor(a)}},[t._v(t._s(t.getOrderStatusLabel(a)))])]}},{key:"chainInfo",fn:function(a){return[a?e("span",[t._v(t._s(a))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"addressInfo",fn:function(a){return[a?e("a-tooltip",{attrs:{title:a}},[e("span",{staticClass:"address-text"},[t._v(t._s(t.truncate(a,12)))])]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"txHashInfo",fn:function(a){return[a?e("a-tooltip",{attrs:{title:a}},[e("span",{staticClass:"hash-text"},[t._v(t._s(t.truncate(a,14)))])]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"orderCreatedAt",fn:function(a){return[a?e("span",[t._v(t._s(t.formatTime(a)))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}}])})],1)],1),e("a-tab-pane",{key:"aiStats",attrs:{tab:t.$t("adminAiStats.tabTitle")||"AI Analysis"}},[t.aiStatsSummary?e("div",{staticClass:"summary-cards"},[e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #667eea, #764ba2)"}},[e("a-icon",{attrs:{type:"thunderbolt"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.aiStatsSummary.total_analyses||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminAiStats.totalAnalyses")||"Total Analyses"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #11998e, #38ef7d)"}},[e("a-icon",{attrs:{type:"team"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.aiStatsSummary.unique_users||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminAiStats.activeUsers")||"Active Users"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #f093fb, #f5576c)"}},[e("a-icon",{attrs:{type:"stock"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.aiStatsSummary.unique_symbols||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminAiStats.uniqueSymbols")||"Symbols Analyzed"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #fa709a, #fee140)"}},[e("a-icon",{attrs:{type:"like"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(" "+t._s(t.aiStatsSummary.correct_count||0)+" "),e("span",{staticStyle:{"font-size":"13px",color:"#999"}},[t._v("/ "+t._s(t.aiStatsSummary.total_memory||0))])]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminAiStats.accuracy")||"Correct / Verified"))])])])]):t._e(),e("div",{staticClass:"toolbar"},[e("div",{staticClass:"toolbar-left"},[e("a-button",{on:{click:t.loadAiStats}},[e("a-icon",{attrs:{type:"reload"}}),t._v(" "+t._s(t.$t("common.refresh")||"Refresh")+" ")],1)],1),e("div",{staticClass:"toolbar-right"},[e("a-input-search",{staticClass:"toolbar-search",attrs:{placeholder:t.$t("adminAiStats.searchPlaceholder")||"Search by username",allowClear:""},on:{search:t.handleAiStatsSearch,pressEnter:t.handleAiStatsSearch},model:{value:t.aiStatsSearchKeyword,callback:function(e){t.aiStatsSearchKeyword=e},expression:"aiStatsSearchKeyword"}})],1)]),e("a-card",{staticClass:"user-table-card",staticStyle:{"margin-bottom":"20px"},attrs:{bordered:!1}},[e("h4",{staticClass:"section-card-title"},[e("a-icon",{staticClass:"section-card-title-icon",attrs:{type:"bar-chart"}}),t._v(" "+t._s(t.$t("adminAiStats.userStatsTitle")||"Per-User Statistics")+" ")],1),e("a-table",{attrs:{columns:t.aiUserColumns,dataSource:t.aiUserStats,loading:t.aiStatsLoading,pagination:t.aiStatsPagination,rowKey:function(t){return t.user_id},scroll:{x:960}},on:{change:t.handleAiStatsTableChange},scopedSlots:t._u([{key:"aiUserInfo",fn:function(a,s){return[e("a-tooltip",{attrs:{title:(s.nickname||s.username||"-")+" ("+(s.email||"")+")"}},[e("span",{staticClass:"user-cell"},[e("a-avatar",{style:{backgroundColor:t.getUserColor(s.user_id),fontSize:"11px",marginRight:"6px"},attrs:{size:"small"}},[t._v(" "+t._s((s.nickname||s.username||"?").charAt(0).toUpperCase())+" ")]),e("span",{staticClass:"user-name"},[t._v(t._s(t.truncate(s.nickname||s.username||"-",10)))])],1)])]}},{key:"analysisCountInfo",fn:function(a){return[e("span",{staticStyle:{"font-weight":"600",color:"#1890ff"}},[t._v(t._s(a||0))])]}},{key:"accuracyInfo",fn:function(a,s){return[e("span",{staticClass:"text-profit"},[t._v(t._s(s.correct||0))]),e("span",{staticClass:"text-muted"},[t._v(" / ")]),e("span",{staticClass:"text-loss"},[t._v(t._s(s.incorrect||0))])]}},{key:"feedbackInfo",fn:function(a,s){return[e("a-tooltip",{attrs:{title:(t.$t("adminAiStats.helpful")||"Helpful")+" / "+(t.$t("adminAiStats.notHelpful")||"Not Helpful")}},[e("span",{staticStyle:{color:"#52c41a"}},[e("a-icon",{attrs:{type:"like"}}),t._v(" "+t._s(s.helpful||0))],1),e("span",{staticClass:"text-muted"},[t._v(" / ")]),e("span",{staticStyle:{color:"#ff4d4f"}},[e("a-icon",{attrs:{type:"dislike"}}),t._v(" "+t._s(s.not_helpful||0))],1)])]}},{key:"lastAnalysisAt",fn:function(a){return[a?e("span",[t._v(t._s(t.formatTime(a)))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}}])})],1),e("a-card",{staticClass:"user-table-card",attrs:{bordered:!1}},[e("h4",{staticClass:"section-card-title"},[e("a-icon",{staticClass:"section-card-title-icon",attrs:{type:"history"}}),t._v(" "+t._s(t.$t("adminAiStats.recentTitle")||"Recent Analysis Records")+" ")],1),e("a-table",{attrs:{columns:t.aiRecentColumns,dataSource:t.aiRecentRecords,loading:t.aiStatsLoading,pagination:!1,rowKey:function(t){return t.id},scroll:{x:900},size:"small"},scopedSlots:t._u([{key:"recentUserInfo",fn:function(a,s){return[e("span",{staticClass:"user-cell"},[e("a-avatar",{style:{backgroundColor:t.getUserColor(s.user_id),fontSize:"11px",marginRight:"6px"},attrs:{size:"small"}},[t._v(" "+t._s((s.nickname||s.username||"?").charAt(0).toUpperCase())+" ")]),e("span",{staticClass:"user-name"},[t._v(t._s(t.truncate(s.nickname||s.username||"-",8)))])],1)]}},{key:"recentStatusInfo",fn:function(a){return[e("a-tag",{attrs:{color:"completed"===a?"green":"failed"===a?"red":"blue"}},[t._v(" "+t._s(a)+" ")])]}},{key:"recentCreatedAt",fn:function(a){return[a?e("span",[t._v(t._s(t.formatTime(a)))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}}])})],1)],1)],1),e("a-modal",{attrs:{"wrap-class-name":t.userManageModalWrapClass,title:t.isEdit?t.$t("userManage.editUser")||"Edit User":t.$t("userManage.createUser")||"Create User",confirmLoading:t.modalLoading},on:{ok:t.handleModalOk,cancel:t.handleModalCancel},model:{value:t.modalVisible,callback:function(e){t.modalVisible=e},expression:"modalVisible"}},[e("a-form",{attrs:{form:t.form,layout:"vertical"}},[e("a-form-item",{attrs:{label:t.$t("userManage.username")||"Username"}},[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["username",{rules:[{required:!t.isEdit,message:t.$t("userManage.usernameRequired")||"Please enter username"}]}],expression:"['username', {\n rules: [{ required: !isEdit, message: $t('userManage.usernameRequired') || 'Please enter username' }]\n }]"}],attrs:{disabled:t.isEdit,placeholder:t.$t("userManage.usernamePlaceholder")||"Enter username"}},[e("a-icon",{attrs:{slot:"prefix",type:"user"},slot:"prefix"})],1)],1),t.isEdit?t._e():e("a-form-item",{attrs:{label:t.$t("userManage.password")||"Password"}},[e("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["password",{rules:[{required:!0,message:t.$t("userManage.passwordRequired")||"Please enter password"},{min:6,message:t.$t("userManage.passwordMin")||"Password must be at least 6 characters"}]}],expression:"['password', {\n rules: [\n { required: true, message: $t('userManage.passwordRequired') || 'Please enter password' },\n { min: 6, message: $t('userManage.passwordMin') || 'Password must be at least 6 characters' }\n ]\n }]"}],attrs:{placeholder:t.$t("userManage.passwordPlaceholder")||"Enter password (min 6 characters)"}},[e("a-icon",{attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),e("a-form-item",{attrs:{label:t.$t("userManage.nickname")||"Nickname"}},[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["nickname"],expression:"['nickname']"}],attrs:{placeholder:t.$t("userManage.nicknamePlaceholder")||"Enter nickname"}},[e("a-icon",{attrs:{slot:"prefix",type:"smile"},slot:"prefix"})],1)],1),e("a-form-item",{attrs:{label:t.$t("userManage.email")||"Email"}},[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["email",{rules:[{type:"email",message:t.$t("userManage.emailInvalid")||"Invalid email format"}]}],expression:"['email', {\n rules: [{ type: 'email', message: $t('userManage.emailInvalid') || 'Invalid email format' }]\n }]"}],attrs:{placeholder:t.$t("userManage.emailPlaceholder")||"Enter email"}},[e("a-icon",{attrs:{slot:"prefix",type:"mail"},slot:"prefix"})],1)],1),e("a-form-item",{attrs:{label:t.$t("userManage.role")||"Role"}},[e("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["role",{initialValue:"user"}],expression:"['role', { initialValue: 'user' }]"}],attrs:{placeholder:t.$t("userManage.rolePlaceholder")||"Select role"}},t._l(t.roles,function(a){return e("a-select-option",{key:a.id,attrs:{value:a.id}},[t._v(" "+t._s(t.getRoleLabel(a.id))+" ")])}),1)],1),t.isEdit?e("a-form-item",{attrs:{label:t.$t("userManage.status")||"Status"}},[e("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:"active"}],expression:"['status', { initialValue: 'active' }]"}],attrs:{placeholder:t.$t("userManage.statusPlaceholder")||"Select status"}},[e("a-select-option",{attrs:{value:"active"}},[t._v(t._s(t.$t("userManage.active")||"Active"))]),e("a-select-option",{attrs:{value:"disabled"}},[t._v(t._s(t.$t("userManage.disabled")||"Disabled"))])],1)],1):t._e()],1)],1),e("a-modal",{attrs:{"wrap-class-name":t.userManageModalWrapClass,title:t.$t("userManage.resetPassword")||"Reset Password",confirmLoading:t.resetPasswordLoading},on:{ok:t.handleResetPassword},model:{value:t.resetPasswordVisible,callback:function(e){t.resetPasswordVisible=e},expression:"resetPasswordVisible"}},[e("a-form",{attrs:{form:t.resetPasswordForm,layout:"vertical"}},[e("a-alert",{staticStyle:{"margin-bottom":"16px"},attrs:{message:t.$t("userManage.resetPasswordWarning")||"This will reset the user's password",type:"warning",showIcon:""}}),e("a-form-item",{attrs:{label:t.$t("userManage.newPassword")||"New Password"}},[e("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["new_password",{rules:[{required:!0,message:t.$t("userManage.passwordRequired")||"Please enter new password"},{min:6,message:t.$t("userManage.passwordMin")||"Password must be at least 6 characters"}]}],expression:"['new_password', {\n rules: [\n { required: true, message: $t('userManage.passwordRequired') || 'Please enter new password' },\n { min: 6, message: $t('userManage.passwordMin') || 'Password must be at least 6 characters' }\n ]\n }]"}],attrs:{placeholder:t.$t("userManage.newPasswordPlaceholder")||"Enter new password"}},[e("a-icon",{attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1)],1)],1),e("a-modal",{attrs:{"wrap-class-name":t.userManageModalWrapClass,title:(t.$t("userManage.adjustCredits")||"Adjust Credits")+(t.creditsEditingUser?" - ".concat(t.creditsEditingUser.username):""),confirmLoading:t.creditsLoading},on:{ok:t.handleSetCredits},model:{value:t.creditsModalVisible,callback:function(e){t.creditsModalVisible=e},expression:"creditsModalVisible"}},[e("a-form",{attrs:{layout:"vertical"}},[t.creditsEditingUser?e("div",{staticClass:"current-credits-info"},[e("span",{staticClass:"label"},[t._v(t._s(t.$t("userManage.currentCredits")||"Current Credits")+":")]),e("span",{staticClass:"value"},[t._v(t._s(t.formatCredits(t.creditsEditingUser.credits)))])]):t._e(),e("a-form-item",{attrs:{label:t.$t("userManage.newCredits")||"New Credits"}},[e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,precision:2,placeholder:t.$t("userManage.enterCredits")||"Enter new credits amount"},model:{value:t.newCredits,callback:function(e){t.newCredits=e},expression:"newCredits"}})],1),e("a-form-item",{attrs:{label:t.$t("userManage.remark")||"Remark"}},[e("a-input",{attrs:{placeholder:t.$t("userManage.remarkPlaceholder")||"Optional remark"},model:{value:t.creditsRemark,callback:function(e){t.creditsRemark=e},expression:"creditsRemark"}})],1)],1)],1),e("a-modal",{attrs:{"wrap-class-name":t.userManageModalWrapClass,title:(t.$t("userManage.setVip")||"Set VIP")+(t.vipEditingUser?" - ".concat(t.vipEditingUser.username):""),confirmLoading:t.vipLoading},on:{ok:t.handleSetVip},model:{value:t.vipModalVisible,callback:function(e){t.vipModalVisible=e},expression:"vipModalVisible"}},[e("a-form",{attrs:{layout:"vertical"}},[t.vipEditingUser&&t.vipEditingUser.vip_expires_at?e("div",{staticClass:"current-vip-info"},[e("span",{staticClass:"label"},[t._v(t._s(t.$t("userManage.currentVip")||"Current VIP")+":")]),e("span",{staticClass:"value",class:t.isVipActive(t.vipEditingUser.vip_expires_at)?"active":"expired"},[t._v(" "+t._s(t.isVipActive(t.vipEditingUser.vip_expires_at)?(t.$t("userManage.vipActive")||"Active")+" (".concat(t.formatDate(t.vipEditingUser.vip_expires_at),")"):t.$t("userManage.vipExpired")||"Expired")+" ")])]):t._e(),e("a-form-item",{attrs:{label:t.$t("userManage.vipDays")||"VIP Days"}},[e("a-select",{staticStyle:{width:"100%"},model:{value:t.vipDays,callback:function(e){t.vipDays=e},expression:"vipDays"}},[e("a-select-option",{attrs:{value:0}},[t._v(t._s(t.$t("userManage.cancelVip")||"Cancel VIP"))]),e("a-select-option",{attrs:{value:7}},[t._v("7 "+t._s(t.$t("userManage.days")||"days"))]),e("a-select-option",{attrs:{value:30}},[t._v("30 "+t._s(t.$t("userManage.days")||"days"))]),e("a-select-option",{attrs:{value:90}},[t._v("90 "+t._s(t.$t("userManage.days")||"days"))]),e("a-select-option",{attrs:{value:180}},[t._v("180 "+t._s(t.$t("userManage.days")||"days"))]),e("a-select-option",{attrs:{value:365}},[t._v("365 "+t._s(t.$t("userManage.days")||"days"))]),e("a-select-option",{attrs:{value:-1}},[t._v(t._s(t.$t("userManage.customDate")||"Custom Date"))])],1)],1),-1===t.vipDays?e("a-form-item",{attrs:{label:t.$t("userManage.vipExpiresAt")||"VIP Expires At"}},[e("a-date-picker",{staticStyle:{width:"100%"},attrs:{showTime:"",format:"YYYY-MM-DD HH:mm:ss"},model:{value:t.vipCustomDate,callback:function(e){t.vipCustomDate=e},expression:"vipCustomDate"}})],1):t._e(),e("a-form-item",{attrs:{label:t.$t("userManage.remark")||"Remark"}},[e("a-input",{attrs:{placeholder:t.$t("userManage.remarkPlaceholder")||"Optional remark"},model:{value:t.vipRemark,callback:function(e){t.vipRemark=e},expression:"vipRemark"}})],1)],1)],1)],1)},r=[],i=a(81127),n=a(56252),o=a(76338),l=a(84841),d=a(55434),c=a(95353),u={name:"UserManage",mixins:[d.t],data:function(){return{activeTab:"users",loading:!1,users:[],roles:[],searchKeyword:"",pagination:{current:1,pageSize:10,total:0},modalVisible:!1,modalLoading:!1,isEdit:!1,editingUser:null,resetPasswordVisible:!1,resetPasswordLoading:!1,resetPasswordUserId:null,creditsModalVisible:!1,creditsLoading:!1,creditsEditingUser:null,newCredits:0,creditsRemark:"",vipModalVisible:!1,vipLoading:!1,vipEditingUser:null,vipDays:30,vipCustomDate:null,vipRemark:"",strategyLoading:!1,systemStrategies:[],strategySummary:null,strategyStatusFilter:"all",strategyExecutionFilter:"all",strategySortBy:"",strategySortOrder:"desc",strategySearchKeyword:"",strategyPagination:{current:1,pageSize:20,total:0},strategiesLoaded:!1,orderLoading:!1,orders:[],orderSummary:null,orderStatusFilter:"all",orderSearchKeyword:"",orderPagination:{current:1,pageSize:20,total:0},ordersLoaded:!1,aiStatsLoading:!1,aiUserStats:[],aiRecentRecords:[],aiStatsSummary:null,aiStatsSearchKeyword:"",aiStatsPagination:{current:1,pageSize:20,total:0},aiStatsLoaded:!1}},computed:(0,o.A)((0,o.A)({},(0,c.L8)(["userInfo"])),{},{isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},userManageModalWrapClass:function(){return this.isDarkTheme?"user-manage-modal user-manage-modal-dark":"user-manage-modal"},currentUserId:function(){var t;return null===(t=this.userInfo)||void 0===t?void 0:t.id},columns:function(){return[{title:"ID",dataIndex:"id",width:60},{title:this.$t("userManage.username")||"Username",dataIndex:"username",width:120},{title:this.$t("userManage.nickname")||"Nickname",dataIndex:"nickname",width:100},{title:this.$t("userManage.email")||"Email",dataIndex:"email",width:180},{title:this.$t("userManage.role")||"Role",dataIndex:"role",width:90,scopedSlots:{customRender:"role"}},{title:this.$t("userManage.credits")||"Credits",dataIndex:"credits",width:100,scopedSlots:{customRender:"credits"}},{title:"VIP",dataIndex:"vip_expires_at",width:120,scopedSlots:{customRender:"vip_expires_at"}},{title:this.$t("userManage.status")||"Status",dataIndex:"status",width:90,scopedSlots:{customRender:"status"}},{title:this.$t("userManage.lastLogin")||"Last Login",dataIndex:"last_login_at",width:150,scopedSlots:{customRender:"last_login_at"}},{title:this.$t("common.actions")||"Actions",dataIndex:"action",width:180,scopedSlots:{customRender:"action"}}]},strategyColumns:function(){var t=this,e=function(e){return t.strategySortBy===e&&("asc"===t.strategySortOrder?"ascend":"descend")};return[{title:"ID",dataIndex:"id",key:"id",width:72,fixed:"left",sorter:!0,sortOrder:e("id")},{title:this.$t("systemOverview.colUser")||"User",dataIndex:"username",key:"username",width:118,fixed:"left",scopedSlots:{customRender:"userInfo"}},{title:this.$t("systemOverview.colStrategy")||"Strategy",dataIndex:"strategy_name",key:"strategy_name",width:160,ellipsis:!0,sorter:!0,sortOrder:e("strategy_name")},{title:this.$t("systemOverview.colStatus")||"Status",dataIndex:"status",key:"status",width:108,scopedSlots:{customRender:"strategyStatus"},sorter:!0,sortOrder:e("status")},{title:this.$t("systemOverview.colExecutionMode")||"Mode",dataIndex:"execution_mode",key:"execution_mode",width:96,align:"center",scopedSlots:{customRender:"executionModeInfo"},sorter:!0,sortOrder:e("execution_mode")},{title:this.$t("systemOverview.colSymbol")||"Symbol",dataIndex:"symbol",key:"symbol",width:140,scopedSlots:{customRender:"symbolInfo"},sorter:!0,sortOrder:e("symbol")},{title:this.$t("systemOverview.colCapital")||"Capital",dataIndex:"initial_capital",key:"initial_capital",width:110,scopedSlots:{customRender:"capitalInfo"},sorter:!0,sortOrder:e("initial_capital")},{title:this.$t("systemOverview.colPositionEquity")||"Pos. equity",dataIndex:"total_equity",key:"total_equity",width:120,align:"right",scopedSlots:{customRender:"equityInfo"},sorter:!0,sortOrder:e("total_equity")},{title:this.$t("systemOverview.colPnl")||"PnL / ROI",dataIndex:"total_pnl",key:"total_pnl",width:200,scopedSlots:{customRender:"pnlInfo"},sorter:!0,sortOrder:e("total_pnl")},{title:this.$t("systemOverview.colPositions")||"Pos",dataIndex:"position_count",key:"position_count",width:76,align:"center",scopedSlots:{customRender:"positionInfo"},sorter:!0,sortOrder:e("position_count")},{title:this.$t("systemOverview.colTrades")||"Trades",dataIndex:"trade_count",key:"trade_count",width:88,align:"center",scopedSlots:{customRender:"tradeInfo"},sorter:!0,sortOrder:e("trade_count")},{title:this.$t("systemOverview.colIndicator")||"Indicator",dataIndex:"indicator_name",key:"indicator_name",width:130,scopedSlots:{customRender:"indicatorInfo"}},{title:this.$t("systemOverview.colExchange")||"Exchange",dataIndex:"exchange_name",key:"exchange_name",width:100,scopedSlots:{customRender:"exchangeInfo"}},{title:this.$t("systemOverview.colTimeframe")||"TF",dataIndex:"timeframe",key:"timeframe",width:70,align:"center",scopedSlots:{customRender:"timeframeInfo"}},{title:this.$t("systemOverview.colLeverage")||"Lev",dataIndex:"leverage",key:"leverage",width:70,align:"center",scopedSlots:{customRender:"leverageInfo"},sorter:!0,sortOrder:e("leverage")},{title:this.$t("systemOverview.colCreatedAt")||"Created",dataIndex:"created_at",key:"created_at",width:150,scopedSlots:{customRender:"createdAtInfo"},sorter:!0,sortOrder:e("created_at")},{title:this.$t("systemOverview.colUpdatedAt")||"Updated",dataIndex:"updated_at",key:"updated_at",width:150,scopedSlots:{customRender:"updatedAtInfo"},sorter:!0,sortOrder:e("updated_at")}]},orderColumns:function(){return[{title:this.$t("adminOrders.colUser")||"User",dataIndex:"username",width:120,scopedSlots:{customRender:"orderUserInfo"}},{title:this.$t("adminOrders.colType")||"Type",dataIndex:"order_type",width:80,scopedSlots:{customRender:"orderTypeInfo"}},{title:this.$t("adminOrders.colPlan")||"Plan",dataIndex:"plan",width:100,scopedSlots:{customRender:"planInfo"}},{title:this.$t("adminOrders.colAmount")||"Amount",dataIndex:"amount",width:120,scopedSlots:{customRender:"amountInfo"}},{title:this.$t("adminOrders.colStatus")||"Status",dataIndex:"status",width:100,scopedSlots:{customRender:"orderStatusInfo"}},{title:this.$t("adminOrders.colChain")||"Chain",dataIndex:"chain",width:80,scopedSlots:{customRender:"chainInfo"}},{title:this.$t("adminOrders.colAddress")||"Address",dataIndex:"address",width:140,scopedSlots:{customRender:"addressInfo"}},{title:this.$t("adminOrders.colTxHash")||"Tx Hash",dataIndex:"tx_hash",width:160,scopedSlots:{customRender:"txHashInfo"}},{title:this.$t("adminOrders.colCreatedAt")||"Created",dataIndex:"created_at",width:150,scopedSlots:{customRender:"orderCreatedAt"}}]},aiUserColumns:function(){return[{title:this.$t("adminAiStats.colUser")||"User",dataIndex:"username",width:140,scopedSlots:{customRender:"aiUserInfo"}},{title:this.$t("adminAiStats.colAnalysisCount")||"Analyses",dataIndex:"analysis_count",width:100,align:"center",scopedSlots:{customRender:"analysisCountInfo"},sorter:function(t,e){return t.analysis_count-e.analysis_count},defaultSortOrder:"descend"},{title:this.$t("adminAiStats.colSymbols")||"Symbols",dataIndex:"symbol_count",width:90,align:"center"},{title:this.$t("adminAiStats.colMarkets")||"Markets",dataIndex:"market_count",width:90,align:"center"},{title:this.$t("adminAiStats.colAccuracy")||"Correct / Wrong",dataIndex:"correct",width:130,align:"center",scopedSlots:{customRender:"accuracyInfo"}},{title:this.$t("adminAiStats.colFeedback")||"Feedback",dataIndex:"helpful",width:130,align:"center",scopedSlots:{customRender:"feedbackInfo"}},{title:this.$t("adminAiStats.colLastAnalysis")||"Last Analysis",dataIndex:"last_analysis_at",width:160,scopedSlots:{customRender:"lastAnalysisAt"}}]},aiRecentColumns:function(){return[{title:"ID",dataIndex:"id",width:60},{title:this.$t("adminAiStats.colUser")||"User",dataIndex:"username",width:120,scopedSlots:{customRender:"recentUserInfo"}},{title:this.$t("adminAiStats.colMarket")||"Market",dataIndex:"market",width:80},{title:this.$t("adminAiStats.colSymbol")||"Symbol",dataIndex:"symbol",width:120},{title:this.$t("adminAiStats.colModel")||"Model",dataIndex:"model",width:140,ellipsis:!0},{title:this.$t("adminAiStats.colStatus")||"Status",dataIndex:"status",width:100,scopedSlots:{customRender:"recentStatusInfo"}},{title:this.$t("adminAiStats.colCreatedAt")||"Time",dataIndex:"created_at",width:160,scopedSlots:{customRender:"recentCreatedAt"}}]}}),beforeCreate:function(){this.form=this.$form.createForm(this),this.resetPasswordForm=this.$form.createForm(this,{name:"resetPassword"})},mounted:function(){this.loadUsers(),this.loadRoles()},methods:{handleTabChange:function(t){"strategies"!==t||this.strategiesLoaded||this.loadSystemStrategies(),"orders"!==t||this.ordersLoaded||this.loadOrders(),"aiStats"!==t||this.aiStatsLoaded||this.loadAiStats()},loadSystemStrategies:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a,s;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.strategyLoading=!0,e.p=1,a={page:t.strategyPagination.current,page_size:t.strategyPagination.pageSize,status:"all"===t.strategyStatusFilter?"":t.strategyStatusFilter,execution_mode:"all"===t.strategyExecutionFilter?"":t.strategyExecutionFilter,search:t.strategySearchKeyword||""},t.strategySortBy&&(a.sort_by=t.strategySortBy,a.sort_order=t.strategySortOrder),e.n=2,(0,l.DK)(a);case 2:s=e.v,1===s.code?(t.systemStrategies=s.data.items||[],t.strategyPagination.total=s.data.total||0,t.strategySummary=s.data.summary||{},t.strategiesLoaded=!0):t.$message.error(s.msg||"Failed to load strategies"),e.n=4;break;case 3:e.p=3,e.v,t.$message.error("Failed to load system strategies");case 4:return e.p=4,t.strategyLoading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},handleStrategySearch:function(){this.strategyPagination.current=1,this.loadSystemStrategies()},handleStrategyFilterChange:function(){this.strategyPagination.current=1,this.loadSystemStrategies()},handleStrategyExecutionFilterChange:function(){this.strategyPagination.current=1,this.loadSystemStrategies()},handleStrategyTableChange:function(t,e,a){if(t&&(this.strategyPagination.current=t.current,this.strategyPagination.pageSize=t.pageSize),a&&Object.keys(a).length)if("ascend"===a.order||"descend"===a.order){var s=null!=a.columnKey?String(a.columnKey):String(a.field||"");this.strategySortBy=s,this.strategySortOrder="ascend"===a.order?"asc":"desc"}else this.strategySortBy="",this.strategySortOrder="desc";this.loadSystemStrategies()},getUserColor:function(t){var e=["#1890ff","#722ed1","#13c2c2","#fa8c16","#eb2f96","#52c41a","#2f54eb","#faad14"];return e[(t||0)%e.length]},formatNumber:function(t){return t||0===t?Number(t).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:2}):"0"},formatPnl:function(t){if(!t&&0!==t)return"0";var e=Number(t),a=e>=0?"+":"";return a+e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:4})},truncate:function(t,e){return t?t.length>e?t.substring(0,e)+"...":t:""},loadUsers:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.loading=!0,e.p=1,e.n=2,(0,l.aU)({page:t.pagination.current,page_size:t.pagination.pageSize,search:t.searchKeyword||""});case 2:a=e.v,1===a.code?(t.users=a.data.items||[],t.pagination.total=a.data.total||0):t.$message.error(a.msg||"Failed to load users"),e.n=4;break;case 3:e.p=3,e.v,t.$message.error("Failed to load users");case 4:return e.p=4,t.loading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},handleSearch:function(){this.pagination.current=1,this.loadUsers()},loadRoles:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,l.O0)();case 1:a=e.v,1===a.code&&(t.roles=a.data.roles||[]),e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}))()},handleTableChange:function(t){this.pagination.current=t.current,this.pagination.pageSize=t.pageSize,this.loadUsers()},showCreateModal:function(){var t=this;this.isEdit=!1,this.editingUser=null,this.modalVisible=!0,this.$nextTick(function(){t.form.resetFields()})},showEditModal:function(t){var e=this;this.isEdit=!0,this.editingUser=t,this.modalVisible=!0,this.$nextTick(function(){e.form.setFieldsValue({username:t.username,nickname:t.nickname,email:t.email,role:t.role,status:t.status})})},handleModalCancel:function(){this.modalVisible=!1,this.form.resetFields()},handleModalOk:function(){var t=this;this.form.validateFields(function(){var e=(0,n.A)((0,i.A)().m(function e(a,s){var r;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!a){e.n=1;break}return e.a(2);case 1:if(t.modalLoading=!0,e.p=2,!t.isEdit){e.n=4;break}return e.n=3,(0,l.TK)(t.editingUser.id,{nickname:s.nickname,email:s.email,role:s.role,status:s.status});case 3:r=e.v,e.n=6;break;case 4:return e.n=5,(0,l.kg)(s);case 5:r=e.v;case 6:1===r.code?(t.$message.success(r.msg||"Success"),t.modalVisible=!1,t.form.resetFields(),t.loadUsers()):t.$message.error(r.msg||"Operation failed"),e.n=8;break;case 7:e.p=7,e.v,t.$message.error("Operation failed");case 8:return e.p=8,t.modalLoading=!1,e.f(8);case 9:return e.a(2)}},e,null,[[2,7,8,9]])}));return function(t,a){return e.apply(this,arguments)}}())},handleDelete:function(t){var e=this;return(0,n.A)((0,i.A)().m(function a(){var s;return(0,i.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return a.p=0,a.n=1,(0,l.hG)(t);case 1:s=a.v,1===s.code?(e.$message.success(s.msg||"User deleted"),e.loadUsers()):e.$message.error(s.msg||"Delete failed"),a.n=3;break;case 2:a.p=2,a.v,e.$message.error("Delete failed");case 3:return a.a(2)}},a,null,[[0,2]])}))()},showResetPasswordModal:function(t){var e=this;this.resetPasswordUserId=t.id,this.resetPasswordVisible=!0,this.$nextTick(function(){e.resetPasswordForm.resetFields()})},handleResetPassword:function(){var t=this;this.resetPasswordForm.validateFields(function(){var e=(0,n.A)((0,i.A)().m(function e(a,s){var r;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!a){e.n=1;break}return e.a(2);case 1:return t.resetPasswordLoading=!0,e.p=2,e.n=3,(0,l.cw)({user_id:t.resetPasswordUserId,new_password:s.new_password});case 3:r=e.v,1===r.code?(t.$message.success(r.msg||"Password reset successfully"),t.resetPasswordVisible=!1,t.resetPasswordForm.resetFields()):t.$message.error(r.msg||"Reset failed"),e.n=5;break;case 4:e.p=4,e.v,t.$message.error("Reset failed");case 5:return e.p=5,t.resetPasswordLoading=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}));return function(t,a){return e.apply(this,arguments)}}())},getRoleColor:function(t){var e={admin:"red",manager:"orange",user:"blue",viewer:"default"};return e[t]||"default"},getRoleLabel:function(t){var e={admin:this.$t("userManage.roleAdmin")||"Admin",manager:this.$t("userManage.roleManager")||"Manager",user:this.$t("userManage.roleUser")||"User",viewer:this.$t("userManage.roleViewer")||"Viewer"};return e[t]||t},formatTime:function(t){if(!t)return"";var e=new Date("number"===typeof t?1e3*t:t);return e.toLocaleString()},formatCredits:function(t){return t||0===t?Number(t).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:2}):"0"},formatDate:function(t){if(!t)return"";var e=new Date(t);return e.toLocaleDateString()},isVipActive:function(t){return!!t&&new Date(t)>new Date},showCreditsModal:function(t){this.creditsEditingUser=t,this.newCredits=parseFloat(t.credits)||0,this.creditsRemark="",this.creditsModalVisible=!0},handleSetCredits:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!(t.newCredits<0)){e.n=1;break}return t.$message.error(t.$t("userManage.creditsNonNegative")||"Credits cannot be negative"),e.a(2);case 1:return t.creditsLoading=!0,e.p=2,e.n=3,(0,l.wq)({user_id:t.creditsEditingUser.id,credits:t.newCredits,remark:t.creditsRemark});case 3:a=e.v,1===a.code?(t.$message.success(a.msg||"Credits updated successfully"),t.creditsModalVisible=!1,t.loadUsers()):t.$message.error(a.msg||"Update failed"),e.n=5;break;case 4:e.p=4,e.v,t.$message.error("Update failed");case 5:return e.p=5,t.creditsLoading=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},showVipModal:function(t){this.vipEditingUser=t,this.vipDays=30,this.vipCustomDate=null,this.vipRemark="",this.vipModalVisible=!0},handleSetVip:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a,s;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(a={user_id:t.vipEditingUser.id,remark:t.vipRemark},-1!==t.vipDays){e.n=2;break}if(t.vipCustomDate){e.n=1;break}return t.$message.error(t.$t("userManage.selectDate")||"Please select a date"),e.a(2);case 1:a.vip_expires_at=t.vipCustomDate.toISOString(),e.n=3;break;case 2:a.vip_days=t.vipDays;case 3:return t.vipLoading=!0,e.p=4,e.n=5,(0,l.nY)(a);case 5:s=e.v,1===s.code?(t.$message.success(s.msg||"VIP status updated successfully"),t.vipModalVisible=!1,t.loadUsers()):t.$message.error(s.msg||"Update failed"),e.n=7;break;case 6:e.p=6,e.v,t.$message.error("Update failed");case 7:return e.p=7,t.vipLoading=!1,e.f(7);case 8:return e.a(2)}},e,null,[[4,6,7,8]])}))()},loadOrders:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.orderLoading=!0,e.p=1,e.n=2,(0,l.vi)({page:t.orderPagination.current,page_size:t.orderPagination.pageSize,status:"all"===t.orderStatusFilter?"":t.orderStatusFilter,search:t.orderSearchKeyword||""});case 2:a=e.v,1===a.code?(t.orders=a.data.items||[],t.orderPagination.total=a.data.total||0,t.orderSummary=a.data.summary||{},t.ordersLoaded=!0):t.$message.error(a.msg||"Failed to load orders"),e.n=4;break;case 3:e.p=3,e.v,t.$message.error("Failed to load orders");case 4:return e.p=4,t.orderLoading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},handleOrderSearch:function(){this.orderPagination.current=1,this.loadOrders()},handleOrderFilterChange:function(){this.orderPagination.current=1,this.loadOrders()},handleOrderTableChange:function(t){this.orderPagination.current=t.current,this.orderPagination.pageSize=t.pageSize,this.loadOrders()},getOrderStatusColor:function(t){var e={paid:"green",confirmed:"green",pending:"orange",expired:"grey",cancelled:"default",failed:"red"};return e[t]||"default"},getOrderStatusLabel:function(t){var e={paid:this.$t("adminOrders.statusPaid")||"Paid",confirmed:this.$t("adminOrders.statusConfirmed")||"Confirmed",pending:this.$t("adminOrders.statusPending")||"Pending",expired:this.$t("adminOrders.statusExpired")||"Expired",cancelled:this.$t("adminOrders.statusCancelled")||"Cancelled",failed:this.$t("adminOrders.statusFailed")||"Failed"};return e[t]||t},loadAiStats:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.aiStatsLoading=!0,e.p=1,e.n=2,(0,l.d$)({page:t.aiStatsPagination.current,page_size:t.aiStatsPagination.pageSize,search:t.aiStatsSearchKeyword||""});case 2:a=e.v,1===a.code?(t.aiUserStats=a.data.user_stats||[],t.aiRecentRecords=a.data.recent||[],t.aiStatsPagination.total=a.data.user_total||0,t.aiStatsSummary=a.data.summary||{},t.aiStatsLoaded=!0):t.$message.error(a.msg||"Failed to load AI stats"),e.n=4;break;case 3:e.p=3,e.v,t.$message.error("Failed to load AI stats");case 4:return e.p=4,t.aiStatsLoading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},handleAiStatsSearch:function(){this.aiStatsPagination.current=1,this.loadAiStats()},handleAiStatsTableChange:function(t){this.aiStatsPagination.current=t.current,this.aiStatsPagination.pageSize=t.pageSize,this.loadAiStats()}}},m=u,p=a(845),g=(0,p.A)(m,s,r,!1,null,"7a022132",null),v=g.exports},84841:function(t,e,a){a.d(e,{DK:function(){return _},E$:function(){return c},Gl:function(){return p},O0:function(){return d},TK:function(){return n},aU:function(){return r},cw:function(){return l},d$:function(){return w},hG:function(){return o},hl:function(){return g},kg:function(){return i},nY:function(){return h},r7:function(){return u},rx:function(){return y},v9:function(){return v},vF:function(){return m},vi:function(){return S},wq:function(){return f}});var s=a(75769);function r(t){return(0,s.Ay)({url:"/api/users/list",method:"get",params:t})}function i(t){return(0,s.Ay)({url:"/api/users/create",method:"post",data:t})}function n(t,e){return(0,s.Ay)({url:"/api/users/update",method:"put",params:{id:t},data:e})}function o(t){return(0,s.Ay)({url:"/api/users/delete",method:"delete",params:{id:t}})}function l(t){return(0,s.Ay)({url:"/api/users/reset-password",method:"post",data:t})}function d(){return(0,s.Ay)({url:"/api/users/roles",method:"get"})}function c(){return(0,s.Ay)({url:"/api/users/profile",method:"get"})}function u(t){return(0,s.Ay)({url:"/api/users/profile/update",method:"put",data:t})}function m(){return(0,s.Ay)({url:"/api/users/notification-settings",method:"get"})}function p(t){return(0,s.Ay)({url:"/api/users/notification-settings",method:"put",data:t})}function g(){return(0,s.Ay)({url:"/api/users/notification-settings/test",method:"post",data:{}})}function v(t){return(0,s.Ay)({url:"/api/users/my-credits-log",method:"get",params:t})}function y(t){return(0,s.Ay)({url:"/api/users/my-referrals",method:"get",params:t})}function f(t){return(0,s.Ay)({url:"/api/users/set-credits",method:"post",data:t})}function h(t){return(0,s.Ay)({url:"/api/users/set-vip",method:"post",data:t})}function _(t){return(0,s.Ay)({url:"/api/users/system-strategies",method:"get",params:t})}function S(t){return(0,s.Ay)({url:"/api/users/admin-orders",method:"get",params:t})}function w(t){return(0,s.Ay)({url:"/api/users/admin-ai-stats",method:"get",params:t})}}}]); \ No newline at end of file diff --git a/frontend/dist/js/605-legacy.11940272.js b/frontend/dist/js/605-legacy.11940272.js new file mode 100644 index 0000000..6fbba9c --- /dev/null +++ b/frontend/dist/js/605-legacy.11940272.js @@ -0,0 +1 @@ +"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[605],{61292:function(e,t,a){a.r(t),a.d(t,{default:function(){return h}});a(62010);var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"profile-page",class:{"theme-dark":e.isDarkTheme}},[t("div",{staticClass:"page-header"},[t("h2",{staticClass:"page-title"},[t("a-icon",{attrs:{type:"user"}}),t("span",[e._v(e._s(e.$t("profile.title")||"My Profile"))])],1),t("p",{staticClass:"page-desc"},[e._v(e._s(e.$t("profile.description")||"Manage your account settings and preferences"))])]),t("a-row",{staticClass:"profile-cards-row",attrs:{gutter:24}},[t("a-col",{staticClass:"profile-card-col",attrs:{xs:24,md:8}},[t("a-card",{staticClass:"profile-card",attrs:{bordered:!1}},[t("div",{staticClass:"avatar-section"},[t("a-avatar",{attrs:{size:100,src:e.profile.avatar||"/avatar2.jpg"}}),t("h3",{staticClass:"username"},[e._v(e._s(e.profile.nickname||e.profile.username))]),t("p",{staticClass:"user-role"},[t("a-tag",{attrs:{color:e.getRoleColor(e.profile.role)}},[e._v(" "+e._s(e.getRoleLabel(e.profile.role))+" ")]),e.isVip?t("a-tag",{attrs:{color:"gold"}},[t("a-icon",{attrs:{type:"crown"}}),e._v(" VIP ")],1):e._e()],1)],1),t("a-divider"),t("div",{staticClass:"profile-info"},[t("div",{staticClass:"info-item"},[t("a-icon",{attrs:{type:"user"}}),t("span",{staticClass:"label"},[e._v(e._s(e.$t("profile.username")||"Username")+":")]),t("span",{staticClass:"value"},[e._v(e._s(e.profile.username))])],1),t("div",{staticClass:"info-item"},[t("a-icon",{attrs:{type:"mail"}}),t("span",{staticClass:"label"},[e._v(e._s(e.$t("profile.email")||"Email")+":")]),t("span",{staticClass:"value"},[e._v(e._s(e.profile.email||"-"))])],1),t("div",{staticClass:"info-item"},[t("a-icon",{attrs:{type:"calendar"}}),t("span",{staticClass:"label"},[e._v(e._s(e.$t("profile.lastLogin")||"Last Login")+":")]),t("span",{staticClass:"value"},[e._v(e._s(e.formatTime(e.profile.last_login_at)||"-"))])],1)])],1)],1),t("a-col",{staticClass:"right-cards-col",attrs:{xs:24,md:16}},[t("a-row",{staticClass:"right-cards-row",attrs:{gutter:16}},[t("a-col",{attrs:{xs:24,md:12}},[t("a-card",{staticClass:"credits-card",attrs:{bordered:!1}},[t("div",{staticClass:"credits-header"},[t("h3",{staticClass:"credits-title"},[t("a-icon",{attrs:{type:"wallet"}}),e._v(" "+e._s(e.$t("profile.credits.title")||"我的积分")+" ")],1)]),t("div",{staticClass:"credits-body"},[t("div",{staticClass:"credits-amount"},[t("span",{staticClass:"amount-value"},[e._v(e._s(e.formatCredits(e.billing.credits)))]),t("span",{staticClass:"amount-label"},[e._v(e._s(e.$t("profile.credits.unit")||"积分"))])]),e.billing.vip_expires_at?t("div",{staticClass:"vip-status"},[t("a-icon",{style:{color:e.isVip?"#faad14":"#999"},attrs:{type:"crown"}}),e.isVip?t("span",{staticClass:"vip-active"},[e._v(" "+e._s(e.$t("profile.credits.vipExpires")||"VIP有效期至")+": "+e._s(e.formatDate(e.billing.vip_expires_at))+" ")]):t("span",{staticClass:"vip-expired"},[e._v(" "+e._s(e.$t("profile.credits.vipExpired")||"VIP已过期")+" ")])],1):e.billing.is_vip?e._e():t("div",{staticClass:"vip-status"},[t("span",{staticClass:"no-vip"},[e._v(e._s(e.$t("profile.credits.noVip")||"非VIP用户"))])])]),t("a-divider"),t("div",{staticClass:"credits-actions"},[t("a-button",{attrs:{type:"primary",icon:"shopping"},on:{click:e.handleRecharge}},[e._v(" "+e._s(e.$t("profile.credits.recharge")||"开通/充值")+" ")])],1),e.billing.billing_enabled?t("div",{staticClass:"credits-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.credits.hint")||"使用AI分析/回测/监控等功能会消耗积分;VIP仅可免费使用VIP免费指标。"))])],1):e._e()],1)],1),t("a-col",{attrs:{xs:24,md:12}},[t("a-card",{staticClass:"referral-card",attrs:{bordered:!1}},[t("div",{staticClass:"referral-header"},[t("h3",{staticClass:"referral-title"},[t("a-icon",{attrs:{type:"team"}}),e._v(" "+e._s(e.$t("profile.referral.title")||"邀请好友")+" ")],1)]),t("div",{staticClass:"referral-body"},[t("div",{staticClass:"referral-stats"},[t("div",{staticClass:"stat-item"},[t("span",{staticClass:"stat-value"},[e._v(e._s(e.referralData.total||0))]),t("span",{staticClass:"stat-label"},[e._v(e._s(e.$t("profile.referral.totalInvited")||"已邀请"))])]),e.referralData.referral_bonus>0?t("div",{staticClass:"stat-item"},[t("span",{staticClass:"stat-value"},[e._v("+"+e._s(e.referralData.referral_bonus))]),t("span",{staticClass:"stat-label"},[e._v(e._s(e.$t("profile.referral.bonusPerInvite")||"每邀请获得"))])]):e._e()]),t("a-divider",{staticStyle:{margin:"12px 0"}}),t("div",{staticClass:"referral-link-section"},[t("div",{staticClass:"link-label"},[e._v(e._s(e.$t("profile.referral.yourLink")||"您的邀请链接"))]),t("div",{staticClass:"link-box"},[t("a-input",{attrs:{value:e.referralLink,readonly:"",size:"small"}},[t("a-tooltip",{attrs:{slot:"suffix",title:e.$t("profile.referral.copyLink")||"复制链接"},slot:"suffix"},[t("a-icon",{staticStyle:{cursor:"pointer"},attrs:{type:"copy"},on:{click:e.copyReferralLink}})],1)],1)],1)]),e.referralData.register_bonus>0?t("div",{staticClass:"referral-hint"},[t("a-icon",{attrs:{type:"gift"}}),t("span",[e._v(e._s(e.$t("profile.referral.newUserBonus")||"新用户注册获得")+" "+e._s(e.referralData.register_bonus)+" "+e._s(e.$t("profile.credits.unit")||"积分"))])],1):e._e()],1)])],1)],1)],1)],1),t("a-row",{staticStyle:{"margin-top":"24px"},attrs:{gutter:24}},[t("a-col",{attrs:{xs:24}},[t("a-card",{staticClass:"edit-card",attrs:{bordered:!1}},[t("a-tabs",{model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[t("a-tab-pane",{key:"basic",attrs:{tab:e.$t("profile.basicInfo")||"Basic Info"}},[t("a-form",{staticClass:"profile-form",attrs:{form:e.profileForm,layout:"vertical"}},[t("a-form-item",{attrs:{label:e.$t("profile.nickname")||"Nickname"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["nickname",{initialValue:e.profile.nickname}],expression:"['nickname', { initialValue: profile.nickname }]"}],attrs:{placeholder:e.$t("profile.nicknamePlaceholder")||"Enter your nickname"}},[t("a-icon",{attrs:{slot:"prefix",type:"smile"},slot:"prefix"})],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.email")||"Email"}},[t("a-input",{attrs:{value:e.profile.email||"-",disabled:""}},[t("a-icon",{attrs:{slot:"prefix",type:"mail"},slot:"prefix"}),t("a-tooltip",{attrs:{slot:"suffix",title:e.$t("profile.emailCannotChange")||"Email cannot be changed after registration"},slot:"suffix"},[t("a-icon",{staticStyle:{color:"rgba(0,0,0,.45)"},attrs:{type:"info-circle"}})],1)],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.timezone")||"时区"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["timezone",{initialValue:e.profile.timezone||""}],expression:"['timezone', { initialValue: profile.timezone || '' }]"}],attrs:{placeholder:e.$t("profile.timezonePlaceholder")||"跟随浏览器/系统","show-search":"","allow-clear":"","option-filter-prop":"children"}},[t("a-select-option",{attrs:{value:""}},[e._v(" "+e._s(e.$t("profile.timezoneBrowser")||"跟随浏览器")+" ")]),e._l(e.timezoneIanaList,function(a){return t("a-select-option",{key:a,attrs:{value:a}},[e._v(" "+e._s(a)+" ")])})],2)],1),t("a-form-item",[t("a-button",{attrs:{type:"primary",loading:e.saving},on:{click:e.handleSaveProfile}},[t("a-icon",{attrs:{type:"save"}}),e._v(" "+e._s(e.$t("common.save")||"Save")+" ")],1)],1)],1)],1),t("a-tab-pane",{key:"password",attrs:{tab:e.$t("profile.changePassword")||"Change Password"}},[t("a-form",{staticClass:"password-form",attrs:{form:e.passwordForm,layout:"vertical"}},[t("a-alert",{staticStyle:{"margin-bottom":"24px"},attrs:{message:e.$t("profile.passwordHintNew")||"For security, email verification is required to change password. Password must be at least 8 characters with uppercase, lowercase, and number.",type:"info",showIcon:""}}),t("a-form-item",{attrs:{label:e.$t("profile.verificationCode")||"Verification Code"}},[t("a-row",{attrs:{gutter:12}},[t("a-col",{attrs:{span:16}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["code",{rules:[{required:!0,message:e.$t("profile.codeRequired")||"Please enter verification code"}]}],expression:"['code', {\n rules: [{ required: true, message: $t('profile.codeRequired') || 'Please enter verification code' }]\n }]"}],attrs:{placeholder:e.$t("profile.codePlaceholder")||"Enter verification code"}},[t("a-icon",{attrs:{slot:"prefix",type:"safety-certificate"},slot:"prefix"})],1)],1),t("a-col",{attrs:{span:8}},[t("a-button",{attrs:{block:"",loading:e.sendingPwdCode,disabled:e.sendingPwdCode||e.pwdCodeCountdown>0||!e.profile.email},on:{click:e.handleSendPwdCode}},[e._v(" "+e._s(e.pwdCodeCountdown>0?"".concat(e.pwdCodeCountdown,"s"):e.$t("profile.sendCode")||"Send Code")+" ")])],1)],1),e.profile.email?t("div",{staticClass:"email-hint"},[e._v(" "+e._s(e.$t("profile.codeWillSendTo")||"Code will be sent to")+": "+e._s(e.profile.email)+" ")]):t("div",{staticClass:"email-hint email-warning"},[e._v(" "+e._s(e.$t("profile.noEmailWarning")||"Please set your email first in Basic Info tab")+" ")])],1),t("a-form-item",{attrs:{label:e.$t("profile.newPassword")||"New Password"}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["new_password",{rules:[{required:!0,message:e.$t("profile.newPasswordRequired")||"Please enter new password"},{validator:e.validateNewPassword}]}],expression:"['new_password', {\n rules: [\n { required: true, message: $t('profile.newPasswordRequired') || 'Please enter new password' },\n { validator: validateNewPassword }\n ]\n }]"}],attrs:{placeholder:e.$t("profile.newPasswordPlaceholder")||"Enter new password"}},[t("a-icon",{attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.confirmPassword")||"Confirm Password"}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["confirm_password",{rules:[{required:!0,message:e.$t("profile.confirmPasswordRequired")||"Please confirm password"},{validator:e.validateConfirmPassword}]}],expression:"['confirm_password', {\n rules: [\n { required: true, message: $t('profile.confirmPasswordRequired') || 'Please confirm password' },\n { validator: validateConfirmPassword }\n ]\n }]"}],attrs:{placeholder:e.$t("profile.confirmPasswordPlaceholder")||"Confirm new password"}},[t("a-icon",{attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),t("a-form-item",[t("a-button",{attrs:{type:"primary",loading:e.changingPassword,disabled:!e.profile.email},on:{click:e.handleChangePassword}},[t("a-icon",{attrs:{type:"key"}}),e._v(" "+e._s(e.$t("profile.changePassword")||"Change Password")+" ")],1)],1)],1)],1),t("a-tab-pane",{key:"credits",attrs:{tab:e.$t("profile.creditsLog")||"消费记录"}},[t("a-table",{attrs:{columns:e.creditsLogColumns,dataSource:e.creditsLog,loading:e.creditsLogLoading,pagination:e.creditsLogPagination,rowKey:function(e){return e.id},size:"small"},on:{change:e.handleCreditsLogChange},scopedSlots:e._u([{key:"action",fn:function(a){return[t("a-tag",{attrs:{color:e.getActionColor(a)}},[e._v(" "+e._s(e.getActionLabel(a))+" ")])]}},{key:"amount",fn:function(a){return[t("span",{class:a>=0?"amount-positive":"amount-negative"},[e._v(" "+e._s(a>=0?"+":"")+e._s(a)+" ")])]}},{key:"created_at",fn:function(t){return[e._v(" "+e._s(e.formatCreditsLogTime(t))+" ")]}}])})],1),t("a-tab-pane",{key:"notifications",attrs:{tab:e.$t("profile.notifications.title")||"通知设置"}},[t("div",{staticClass:"notification-settings-form"},[t("a-alert",{staticStyle:{"margin-bottom":"24px"},attrs:{message:e.$t("profile.notifications.hint")||"配置您的默认通知方式,在创建资产监控和预警时将自动使用这些设置",type:"info",showIcon:""}}),t("a-form",{staticStyle:{"max-width":"600px"},attrs:{form:e.notificationForm,layout:"vertical"}},[t("a-form-item",{attrs:{label:e.$t("profile.notifications.defaultChannels")||"默认通知渠道"}},[t("a-checkbox-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["default_channels",{initialValue:e.notificationSettings.default_channels||["browser"]}],expression:"['default_channels', { initialValue: notificationSettings.default_channels || ['browser'] }]"}]},[t("a-row",{attrs:{gutter:16}},[t("a-col",{attrs:{span:8}},[t("a-checkbox",{attrs:{value:"browser"}},[t("a-icon",{attrs:{type:"bell"}}),e._v(" "+e._s(e.$t("profile.notifications.browser")||"站内通知")+" ")],1)],1),t("a-col",{attrs:{span:8}},[t("a-checkbox",{attrs:{value:"telegram"}},[t("a-icon",{attrs:{type:"send"}}),e._v(" Telegram ")],1)],1),t("a-col",{attrs:{span:8}},[t("a-checkbox",{attrs:{value:"email"}},[t("a-icon",{attrs:{type:"mail"}}),e._v(" "+e._s(e.$t("profile.notifications.email")||"邮件")+" ")],1)],1)],1),t("a-row",{staticStyle:{"margin-top":"8px"},attrs:{gutter:16}},[t("a-col",{attrs:{span:8}},[t("a-checkbox",{attrs:{value:"phone"}},[t("a-icon",{attrs:{type:"phone"}}),e._v(" "+e._s(e.$t("profile.notifications.phone")||"短信")+" ")],1)],1),t("a-col",{attrs:{span:8}},[t("a-checkbox",{attrs:{value:"discord"}},[t("a-icon",{attrs:{type:"message"}}),e._v(" Discord ")],1)],1),t("a-col",{attrs:{span:8}},[t("a-checkbox",{attrs:{value:"webhook"}},[t("a-icon",{attrs:{type:"api"}}),e._v(" Webhook ")],1)],1)],1)],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.telegramBotToken")||"Telegram Bot Token"}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["telegram_bot_token",{initialValue:e.notificationSettings.telegram_bot_token}],expression:"['telegram_bot_token', { initialValue: notificationSettings.telegram_bot_token }]"}],attrs:{placeholder:e.$t("profile.notifications.telegramBotTokenPlaceholder")||"请输入您的 Telegram Bot Token"}},[t("a-icon",{attrs:{slot:"prefix",type:"robot"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(" "+e._s(e.$t("profile.notifications.telegramBotTokenHint")||"通过 @BotFather 创建机器人获取 Token")+" "),t("a",{attrs:{href:"https://t.me/BotFather",target:"_blank",rel:"noopener noreferrer"}},[e._v("@BotFather")])])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.telegramChatId")||"Telegram Chat ID"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["telegram_chat_id",{initialValue:e.notificationSettings.telegram_chat_id}],expression:"['telegram_chat_id', { initialValue: notificationSettings.telegram_chat_id }]"}],attrs:{placeholder:e.$t("profile.notifications.telegramPlaceholder")||"请输入您的 Telegram Chat ID(如 123456789)"}},[t("a-icon",{attrs:{slot:"prefix",type:"message"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.notifications.telegramHint")||"发送 /start 给 @userinfobot 可获取您的 Chat ID"))])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.notifyEmail")||"通知邮箱"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["email",{initialValue:e.notificationSettings.email||e.profile.email}],expression:"['email', { initialValue: notificationSettings.email || profile.email }]"}],attrs:{placeholder:e.$t("profile.notifications.emailPlaceholder")||"接收通知的邮箱地址"}},[t("a-icon",{attrs:{slot:"prefix",type:"mail"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.notifications.emailHint")||"默认使用账户邮箱,可设置其他邮箱接收通知"))])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.phone")||"手机号(短信通知)"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["phone",{initialValue:e.notificationSettings.phone}],expression:"['phone', { initialValue: notificationSettings.phone }]"}],attrs:{placeholder:e.$t("profile.notifications.phonePlaceholder")||"请输入手机号(如 +8613800138000)"}},[t("a-icon",{attrs:{slot:"prefix",type:"phone"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.notifications.phoneHint")||"需要管理员配置 Twilio 服务后才能使用短信通知"))])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.discordWebhook")||"Discord Webhook"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["discord_webhook",{initialValue:e.notificationSettings.discord_webhook}],expression:"['discord_webhook', { initialValue: notificationSettings.discord_webhook }]"}],attrs:{placeholder:e.$t("profile.notifications.discordPlaceholder")||"https://discord.com/api/webhooks/..."}},[t("a-icon",{attrs:{slot:"prefix",type:"message"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.notifications.discordHint")||"在 Discord 服务器设置中创建 Webhook"))])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.webhookUrl")||"Webhook URL"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["webhook_url",{initialValue:e.notificationSettings.webhook_url}],expression:"['webhook_url', { initialValue: notificationSettings.webhook_url }]"}],attrs:{placeholder:e.$t("profile.notifications.webhookPlaceholder")||"https://your-server.com/webhook"}},[t("a-icon",{attrs:{slot:"prefix",type:"api"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.notifications.webhookHint")||"自定义 Webhook 地址,将以 POST JSON 方式推送通知"))])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.webhookToken")||"Webhook Token(可选)"}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["webhook_token",{initialValue:e.notificationSettings.webhook_token}],expression:"['webhook_token', { initialValue: notificationSettings.webhook_token }]"}],attrs:{placeholder:e.$t("profile.notifications.webhookTokenPlaceholder")||"用于验证请求的 Bearer Token"}},[t("a-icon",{attrs:{slot:"prefix",type:"key"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.notifications.webhookTokenHint")||"将作为 Authorization: Bearer Token 发送到 Webhook"))])],1)],1),t("a-form-item",[t("a-button",{attrs:{type:"primary",loading:e.savingNotifications},on:{click:e.handleSaveNotifications}},[t("a-icon",{attrs:{type:"save"}}),e._v(" "+e._s(e.$t("common.save")||"保存")+" ")],1),t("a-button",{staticStyle:{"margin-left":"12px"},attrs:{loading:e.testingNotification},on:{click:e.handleTestNotification}},[t("a-icon",{attrs:{type:"experiment"}}),e._v(" "+e._s(e.$t("profile.notifications.testBtn")||"发送测试通知")+" ")],1)],1)],1)],1)]),t("a-tab-pane",{key:"exchange",attrs:{tab:e.$t("profile.exchange.title")||"交易所配置"}},[t("div",{staticClass:"exchange-config-section"},[t("a-alert",{staticStyle:{"margin-bottom":"16px"},attrs:{message:e.$t("profile.exchange.hint"),type:"info",showIcon:""}}),t("div",{staticStyle:{"margin-bottom":"16px","text-align":"right"}},[t("a-button",{staticStyle:{"margin-right":"12px"},on:{click:e.openExchangeSignupModal}},[t("a-icon",{attrs:{type:"rocket"}}),e._v(" "+e._s(e.$t("profile.exchange.openAccount"))+" ")],1),t("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:e.openAddExchangeModal}},[e._v(" "+e._s(e.$t("profile.exchange.addAccount"))+" ")])],1),t("a-table",{attrs:{columns:e.exchangeColumns,dataSource:e.exchangeCredentials,loading:e.exchangeLoading,rowKey:function(e){return e.id},locale:{emptyText:e.$t("profile.exchange.noAccounts")||"暂无交易所账户,请点击上方按钮添加"},size:"small"},scopedSlots:e._u([{key:"exchange_id",fn:function(a,i){return[t("span",{staticStyle:{"text-transform":"capitalize","font-weight":"500"}},[e._v(e._s(e.getExchangeDisplayName(a)))]),i.enable_demo_trading?t("a-tag",{staticStyle:{"margin-left":"6px"},attrs:{color:"orange",size:"small"}},[e._v(" "+e._s(e.$t("profile.exchange.demoTag"))+" ")]):e._e()]}},{key:"api_key_hint",fn:function(a,i){return[t("span",{staticClass:"credential-hint"},[e._v(e._s(a||i.name||"-"))])]}},{key:"created_at",fn:function(t){return[e._v(" "+e._s(e.formatTime(t))+" ")]}},{key:"action",fn:function(a,i){return[t("a-popconfirm",{attrs:{title:e.$t("profile.exchange.deleteConfirm"),okText:e.$t("common.confirm"),cancelText:e.$t("common.cancel")},on:{confirm:function(t){return e.handleDeleteCredential(i.id)}}},[t("a-button",{attrs:{type:"danger",size:"small",ghost:"",icon:"delete"}},[e._v(" "+e._s(e.$t("common.delete"))+" ")])],1)]}}])})],1)]),t("a-tab-pane",{key:"referrals",attrs:{tab:e.$t("profile.referral.listTab")||"邀请列表"}},[t("a-table",{attrs:{columns:e.referralColumns,dataSource:e.referralData.list||[],loading:e.referralLoading,pagination:e.referralPagination,rowKey:function(e){return e.id},locale:{emptyText:e.$t("profile.referral.noReferrals")||"暂无邀请记录"},size:"small"},on:{change:e.handleReferralChange},scopedSlots:e._u([{key:"user",fn:function(a,i){return[t("div",{staticClass:"referral-user-cell"},[t("a-avatar",{attrs:{size:32,src:i.avatar||"/avatar2.jpg"}}),t("div",{staticClass:"user-info"},[t("span",{staticClass:"nickname"},[e._v(e._s(i.nickname||i.username))]),t("span",{staticClass:"username"},[e._v("@"+e._s(i.username))])])],1)]}},{key:"created_at",fn:function(t){return[e._v(" "+e._s(e.formatTime(t))+" ")]}}])})],1)],1)],1)],1)],1),t("exchange-account-modal",{attrs:{visible:e.showAddExchangeModal},on:{"update:visible":function(t){e.showAddExchangeModal=t},success:e.loadExchangeCredentials}}),t("a-modal",{attrs:{title:e.$t("profile.exchange.openAccountTitle"),visible:e.showExchangeSignupModal,"wrap-class-name":e.exchangeModalWrapClass,footer:null,width:"860px"},on:{cancel:function(t){e.showExchangeSignupModal=!1}}},[t("div",{staticClass:"exchange-signup-modal"},[t("div",{staticClass:"exchange-signup-promo"},[e._v(e._s(e.$t("profile.exchange.openAccountPromo")))]),t("div",{staticClass:"exchange-signup-grid"},e._l(e.exchangeSignupCards,function(a){return t("div",{key:a.id,staticClass:"exchange-signup-card"},[t("div",{staticClass:"exchange-signup-card__header"},[t("div",{staticClass:"exchange-signup-logo",style:{background:a.brandBg,color:a.brandColor}},[e._v(" "+e._s(a.short)+" ")]),t("div",{staticClass:"exchange-signup-meta"},[t("div",{staticClass:"exchange-signup-name"},[e._v(e._s(a.name))])])]),t("div",{staticClass:"exchange-signup-actions"},[t("a-button",{attrs:{type:"primary",block:"",disabled:!a.signupUrl},on:{click:function(t){return e.openExchangeSignupLink(a.signupUrl)}}},[e._v(" "+e._s(e.$t("profile.exchange.openAccountButton"))+" ")])],1)])}),0)])])],1)},r=[],n=a(81127),o=a(56252),s=(a(28706),a(2008),a(74423),a(48598),a(62062),a(2892),a(40150),a(79432),a(26099),a(27495),a(99449),a(21699),a(47764),a(25440),a(42762),a(62953),a(84841)),l=a(53003),c=a(42430),d=a(55434),f=a(75402),u={name:"Profile",components:{ExchangeAccountModal:f.A},mixins:[d.t],data:function(){return{loading:!1,saving:!1,changingPassword:!1,sendingPwdCode:!1,pwdCodeCountdown:0,pwdCodeTimer:null,activeTab:"basic",profile:{id:null,username:"",nickname:"",email:"",avatar:"",timezone:"",role:"user",last_login_at:null},timezoneIanaList:["UTC","Etc/UTC","Asia/Shanghai","Asia/Hong_Kong","Asia/Taipei","Asia/Tokyo","Asia/Seoul","Asia/Singapore","Asia/Dubai","Asia/Kolkata","Europe/London","Europe/Paris","Europe/Berlin","America/New_York","America/Chicago","America/Denver","America/Los_Angeles","America/Toronto","America/Sao_Paulo","Australia/Sydney","Pacific/Auckland"],creditsLog:[],creditsLogLoading:!1,creditsLogPagination:{current:1,pageSize:10,total:0},referralData:{list:[],total:0,referral_code:"",referral_bonus:0,register_bonus:0},referralLoading:!1,referralPagination:{current:1,pageSize:10,total:0},billing:{credits:0,is_vip:!1,vip_expires_at:null,billing_enabled:!1,feature_costs:{}},rechargeTelegramUrl:"https://t.me/your_support_bot",notificationSettings:{default_channels:["browser"],telegram_bot_token:"",telegram_chat_id:"",email:"",phone:"",discord_webhook:"",webhook_url:"",webhook_token:""},savingNotifications:!1,testingNotification:!1,exchangeCredentials:[],exchangeLoading:!1,showAddExchangeModal:!1,showExchangeSignupModal:!1,exchangeSignupCards:[{id:"binance",name:"Binance",short:"BN",brandBg:"rgba(243, 186, 47, 0.16)",brandColor:"#f0b90b",signupUrl:"https://www.bsmkweb.cc/register?ref=QUANTDINGER"},{id:"bitget",name:"Bitget",short:"BG",brandBg:"rgba(0, 193, 255, 0.14)",brandColor:"#00c1ff",signupUrl:"https://partner.hdmune.cn/bg/7r4xz8kd"},{id:"bybit",name:"Bybit",short:"BY",brandBg:"rgba(247, 166, 0, 0.14)",brandColor:"#f7a600",signupUrl:"https://partner.bybit.com/b/DINGER"},{id:"okx",name:"OKX",short:"OK",brandBg:"rgba(17, 24, 39, 0.08)",brandColor:"#111827",signupUrl:"https://www.xqmnobxky.com/join/QUANTDINGER"},{id:"gate",name:"Gate.io",short:"GT",brandBg:"rgba(42, 93, 255, 0.12)",brandColor:"#2a5dff",signupUrl:"https://www.gateport.company/share/DINGER"},{id:"htx",name:"HTX",short:"HX",brandBg:"rgba(22, 119, 255, 0.12)",brandColor:"#1677ff",signupUrl:"https://www.htx.com/invite/zh-cn/1f?invite_code=dinger"}]}},computed:{isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},exchangeModalWrapClass:function(){var e="profile-exchange-modal";return this.isDarkTheme?"".concat(e," ").concat(e,"--dark"):e},isVip:function(){if(!this.billing.vip_expires_at)return!1;var e=new Date(this.billing.vip_expires_at);return e>new Date},creditsLogColumns:function(){return[{title:this.$t("profile.creditsLog.time")||"时间",dataIndex:"created_at",width:160,scopedSlots:{customRender:"created_at"}},{title:this.$t("profile.creditsLog.action")||"类型",dataIndex:"action",width:100,scopedSlots:{customRender:"action"}},{title:this.$t("profile.creditsLog.amount")||"变动",dataIndex:"amount",width:100,scopedSlots:{customRender:"amount"}},{title:this.$t("profile.creditsLog.balance")||"余额",dataIndex:"balance_after",width:100},{title:this.$t("profile.creditsLog.remark")||"备注",dataIndex:"remark",ellipsis:!0}]},referralColumns:function(){return[{title:this.$t("profile.referral.user")||"用户",dataIndex:"username",scopedSlots:{customRender:"user"}},{title:this.$t("profile.referral.registerTime")||"注册时间",dataIndex:"created_at",width:180,scopedSlots:{customRender:"created_at"}}]},referralLink:function(){var e=window.location.origin+window.location.pathname,t=this.referralData.referral_code||this.profile.id;return"".concat(e,"#/user/login?ref=").concat(t)},exchangeColumns:function(){return[{title:this.$t("profile.exchange.colExchange")||"Exchange",dataIndex:"exchange_id",width:140,scopedSlots:{customRender:"exchange_id"}},{title:this.$t("profile.exchange.colName")||"Name",dataIndex:"name",width:140,customRender:function(e){return e||"-"}},{title:this.$t("profile.exchange.colHint")||"Connection Info",dataIndex:"api_key_hint",scopedSlots:{customRender:"api_key_hint"}},{title:this.$t("profile.exchange.colCreatedAt")||"Created At",dataIndex:"created_at",width:180,scopedSlots:{customRender:"created_at"}},{title:this.$t("profile.exchange.colActions")||"Actions",width:120,scopedSlots:{customRender:"action"}}]}},watch:{activeTab:function(e){"credits"===e&&0===this.creditsLog.length&&this.loadCreditsLog(),"referrals"!==e||this.referralData.list&&0!==this.referralData.list.length||this.loadReferrals(),"notifications"!==e||this.notificationSettings.telegram_chat_id||this.notificationSettings.discord_webhook||this.loadNotificationSettings(),"exchange"===e&&0===this.exchangeCredentials.length&&this.loadExchangeCredentials()}},beforeCreate:function(){this.profileForm=this.$form.createForm(this,{name:"profile"}),this.passwordForm=this.$form.createForm(this,{name:"password"}),this.notificationForm=this.$form.createForm(this,{name:"notification"})},mounted:function(){this.loadProfile(),this.loadReferrals()},beforeDestroy:function(){this.pwdCodeTimer&&clearInterval(this.pwdCodeTimer)},methods:{loadProfile:function(){var e=this;return(0,o.A)((0,n.A)().m(function t(){var a;return(0,n.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return e.loading=!0,t.p=1,t.n=2,(0,s.E$)();case 2:a=t.v,1===a.code?(e.profile=a.data,a.data.billing&&(e.billing=a.data.billing),a.data.notification_settings&&(e.notificationSettings={default_channels:a.data.notification_settings.default_channels||["browser"],telegram_bot_token:a.data.notification_settings.telegram_bot_token||"",telegram_chat_id:a.data.notification_settings.telegram_chat_id||"",email:a.data.notification_settings.email||a.data.email||"",phone:a.data.notification_settings.phone||"",discord_webhook:a.data.notification_settings.discord_webhook||"",webhook_url:a.data.notification_settings.webhook_url||"",webhook_token:a.data.notification_settings.webhook_token||""}),e.$nextTick(function(){e.profileForm.setFieldsValue({nickname:e.profile.nickname,email:e.profile.email,timezone:e.profile.timezone||""})})):e.$message.error(a.msg||"Failed to load profile"),t.n=4;break;case 3:t.p=3,t.v,e.$message.error("Failed to load profile");case 4:return t.p=4,e.loading=!1,t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}))()},loadRechargeUrl:function(){var e=this;return(0,o.A)((0,n.A)().m(function t(){var a;return(0,n.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if("admin"!==e.profile.role){t.n=4;break}return t.p=1,t.n=2,(0,l.YT)();case 2:a=t.v,1===a.code&&a.data&&a.data.billing&&(e.rechargeTelegramUrl=a.data.billing.RECHARGE_TELEGRAM_URL||e.rechargeTelegramUrl),t.n=4;break;case 3:t.p=3,t.v;case 4:return t.a(2)}},t,null,[[1,3]])}))()},handleRecharge:function(){this.$router.push("/billing")},formatCredits:function(e){return e||0===e?Number(e).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:2}):"0"},formatDate:function(e){if(!e)return"";var t=new Date(e);return t.toLocaleDateString()},handleSaveProfile:function(){var e=this;this.profileForm.validateFields(function(){var t=(0,o.A)((0,n.A)().m(function t(a,i){var r;return(0,n.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(!a){t.n=1;break}return t.a(2);case 1:return e.saving=!0,t.p=2,t.n=3,(0,s.r7)({nickname:i.nickname,timezone:null!=i.timezone?i.timezone:""});case 3:r=t.v,1===r.code?(e.$message.success(r.msg||"Profile updated successfully"),e.loadProfile(),e.$store.dispatch("FetchUserInfo").catch(function(){})):e.$message.error(r.msg||"Update failed"),t.n=5;break;case 4:t.p=4,t.v,e.$message.error("Update failed");case 5:return t.p=5,e.saving=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}));return function(e,a){return t.apply(this,arguments)}}())},validateConfirmPassword:function(e,t,a){var i=this.passwordForm.getFieldValue("new_password");t&&t!==i?a(this.$t("profile.passwordMismatch")||"Passwords do not match"):a()},handleSendPwdCode:function(){var e=this;return(0,o.A)((0,n.A)().m(function t(){var i,r,o,s,l;return(0,n.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e.profile.email){t.n=1;break}return e.$message.error(e.$t("profile.noEmailWarning")||"Please set your email first"),t.a(2);case 1:return e.sendingPwdCode=!0,t.p=2,t.n=3,a.e(824).then(a.bind(a,95824));case 3:return i=t.v,r=i.sendVerificationCode,t.n=4,r({email:e.profile.email,type:"change_password"});case 4:o=t.v,1===o.code?(e.$message.success(e.$t("profile.codeSent")||"Verification code sent"),e.startPwdCodeCountdown()):e.$message.error(o.msg||"Failed to send code"),t.n=6;break;case 5:t.p=5,l=t.v,e.$message.error((null===(s=l.response)||void 0===s||null===(s=s.data)||void 0===s?void 0:s.msg)||"Failed to send code");case 6:return t.p=6,e.sendingPwdCode=!1,t.f(6);case 7:return t.a(2)}},t,null,[[2,5,6,7]])}))()},startPwdCodeCountdown:function(){var e=this;this.pwdCodeCountdown=60,this.pwdCodeTimer=setInterval(function(){e.pwdCodeCountdown--,e.pwdCodeCountdown<=0&&(clearInterval(e.pwdCodeTimer),e.pwdCodeTimer=null)},1e3)},validateNewPassword:function(e,t,a){t?t.length<8?a(new Error(this.$t("user.register.pwdMinLength")||"At least 8 characters")):/[A-Z]/.test(t)?/[a-z]/.test(t)?/[0-9]/.test(t)?a():a(new Error(this.$t("user.register.pwdNumber")||"At least one number")):a(new Error(this.$t("user.register.pwdLowercase")||"At least one lowercase letter")):a(new Error(this.$t("user.register.pwdUppercase")||"At least one uppercase letter")):a()},handleChangePassword:function(){var e=this;this.passwordForm.validateFields(function(){var t=(0,o.A)((0,n.A)().m(function t(i,r){var o,s,l,c,d;return(0,n.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(!i){t.n=1;break}return t.a(2);case 1:return e.changingPassword=!0,t.p=2,t.n=3,a.e(824).then(a.bind(a,95824));case 3:return o=t.v,s=o.changePassword,t.n=4,s({code:r.code,new_password:r.new_password});case 4:l=t.v,1===l.code?(e.$message.success(l.msg||"Password changed successfully"),e.passwordForm.resetFields()):e.$message.error(l.msg||"Change password failed"),t.n=6;break;case 5:t.p=5,d=t.v,e.$message.error((null===(c=d.response)||void 0===c||null===(c=c.data)||void 0===c?void 0:c.msg)||"Change password failed");case 6:return t.p=6,e.changingPassword=!1,t.f(6);case 7:return t.a(2)}},t,null,[[2,5,6,7]])}));return function(e,a){return t.apply(this,arguments)}}())},getRoleColor:function(e){var t={admin:"red",manager:"orange",user:"blue",viewer:"default"};return t[e]||"default"},getRoleLabel:function(e){var t={admin:this.$t("userManage.roleAdmin")||"Admin",manager:this.$t("userManage.roleManager")||"Manager",user:this.$t("userManage.roleUser")||"User",viewer:this.$t("userManage.roleViewer")||"Viewer"};return t[e]||e},_profileDateTimeLocaleOptions:function(){var e=String(this.profile&&this.profile.timezone||"").trim();if(!e)return{};try{return Intl.DateTimeFormat(void 0,{timeZone:e}).format(new Date),{timeZone:e}}catch(t){return{}}},formatTime:function(e){if(!e)return"";var t=new Date("number"===typeof e?1e3*e:e);return Number.isNaN(t.getTime())?"":t.toLocaleString(void 0,this._profileDateTimeLocaleOptions())},formatCreditsLogTime:function(e){if(!e)return"";if("string"===typeof e){var t=e.trim();if(t.endsWith("Z")&&t.includes("T"))return t.replace("T"," ").replace("Z","")}return this.formatTime(e)},loadCreditsLog:function(){var e=this;return(0,o.A)((0,n.A)().m(function t(){var a;return(0,n.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return e.creditsLogLoading=!0,t.p=1,t.n=2,(0,s.v9)({page:e.creditsLogPagination.current,page_size:e.creditsLogPagination.pageSize});case 2:a=t.v,1===a.code&&(e.creditsLog=a.data.items||[],e.creditsLogPagination.total=a.data.total||0),t.n=4;break;case 3:t.p=3,t.v,e.$message.error("Failed to load credits log");case 4:return t.p=4,e.creditsLogLoading=!1,t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}))()},handleCreditsLogChange:function(e){this.creditsLogPagination.current=e.current,this.loadCreditsLog()},loadReferrals:function(){var e=this;return(0,o.A)((0,n.A)().m(function t(){var a;return(0,n.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return e.referralLoading=!0,t.p=1,t.n=2,(0,s.rx)({page:e.referralPagination.current,page_size:e.referralPagination.pageSize});case 2:a=t.v,1===a.code&&(e.referralData={list:a.data.list||[],total:a.data.total||0,referral_code:a.data.referral_code||"",referral_bonus:a.data.referral_bonus||0,register_bonus:a.data.register_bonus||0},e.referralPagination.total=a.data.total||0),t.n=4;break;case 3:t.p=3,t.v,e.$message.error("Failed to load referral data");case 4:return t.p=4,e.referralLoading=!1,t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}))()},handleReferralChange:function(e){this.referralPagination.current=e.current,this.loadReferrals()},copyReferralLink:function(){var e=this,t=this.referralLink;navigator.clipboard?navigator.clipboard.writeText(t).then(function(){e.$message.success(e.$t("profile.referral.linkCopied")||"邀请链接已复制")}).catch(function(){e.fallbackCopy(t)}):this.fallbackCopy(t)},fallbackCopy:function(e){var t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select();try{document.execCommand("copy"),this.$message.success(this.$t("profile.referral.linkCopied")||"邀请链接已复制")}catch(a){this.$message.error("Copy failed")}document.body.removeChild(t)},getActionColor:function(e){var t={consume:"red",recharge:"green",admin_adjust:"blue",refund:"orange",vip_grant:"gold",vip_revoke:"default",register_bonus:"cyan",referral_bonus:"purple",indicator_purchase:"volcano",indicator_sale:"lime"};return t[e]||"default"},getActionLabel:function(e){var t={consume:this.$t("profile.creditsLog.actionConsume")||"消费",recharge:this.$t("profile.creditsLog.actionRecharge")||"充值",admin_adjust:this.$t("profile.creditsLog.actionAdjust")||"调整",refund:this.$t("profile.creditsLog.actionRefund")||"退款",vip_grant:this.$t("profile.creditsLog.actionVipGrant")||"VIP授予",vip_revoke:this.$t("profile.creditsLog.actionVipRevoke")||"VIP取消",register_bonus:this.$t("profile.creditsLog.actionRegisterBonus")||"注册奖励",referral_bonus:this.$t("profile.creditsLog.actionReferralBonus")||"邀请奖励",indicator_purchase:this.$t("profile.creditsLog.actionIndicatorPurchase")||"购买指标",indicator_sale:this.$t("profile.creditsLog.actionIndicatorSale")||"出售指标"};return t[e]||e},loadExchangeCredentials:function(){var e=this;return(0,o.A)((0,n.A)().m(function t(){var a;return(0,n.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return e.exchangeLoading=!0,t.p=1,t.n=2,(0,c.IA)();case 2:a=t.v,1===a.code&&a.data&&(e.exchangeCredentials=a.data.items||[]),t.n=4;break;case 3:t.p=3,t.v,e.$message.error("Failed to load exchange accounts");case 4:return t.p=4,e.exchangeLoading=!1,t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}))()},openAddExchangeModal:function(){this.showAddExchangeModal=!0},openExchangeSignupModal:function(){this.showExchangeSignupModal=!0},openExternalLink:function(e){e&&window.open(e,"_blank")},openExchangeSignupLink:function(e){this.openExternalLink(e)},getExchangeDisplayName:function(e){var t={binance:"Binance",okx:"OKX",bitget:"Bitget",bybit:"Bybit",coinbaseexchange:"Coinbase",kraken:"Kraken",kucoin:"KuCoin",gate:"Gate.io",bitfinex:"Bitfinex",deepcoin:"Deepcoin",htx:"HTX",ibkr:"IBKR",mt5:"MetaTrader 5"};return t[e]||e},handleDeleteCredential:function(e){var t=this;return(0,o.A)((0,n.A)().m(function a(){var i;return(0,n.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return a.p=0,a.n=1,(0,c.kI)(e);case 1:i=a.v,1===i.code?(t.$message.success(t.$t("profile.exchange.deleteSuccess")),t.loadExchangeCredentials()):t.$message.error(i.msg||"Delete failed"),a.n=3;break;case 2:a.p=2,a.v,t.$message.error("Delete failed");case 3:return a.a(2)}},a,null,[[0,2]])}))()},loadNotificationSettings:function(){var e=this;return(0,o.A)((0,n.A)().m(function t(){var a;return(0,n.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return t.p=0,t.n=1,(0,s.vF)();case 1:a=t.v,1===a.code&&a.data&&(e.notificationSettings={default_channels:a.data.default_channels||["browser"],telegram_bot_token:a.data.telegram_bot_token||"",telegram_chat_id:a.data.telegram_chat_id||"",email:a.data.email||e.profile.email||"",phone:a.data.phone||"",discord_webhook:a.data.discord_webhook||"",webhook_url:a.data.webhook_url||"",webhook_token:a.data.webhook_token||""},e.$nextTick(function(){e.notificationForm.setFieldsValue({default_channels:e.notificationSettings.default_channels,telegram_bot_token:e.notificationSettings.telegram_bot_token,telegram_chat_id:e.notificationSettings.telegram_chat_id,email:e.notificationSettings.email,phone:e.notificationSettings.phone,discord_webhook:e.notificationSettings.discord_webhook,webhook_url:e.notificationSettings.webhook_url,webhook_token:e.notificationSettings.webhook_token})})),t.n=3;break;case 2:t.p=2,t.v;case 3:return t.a(2)}},t,null,[[0,2]])}))()},_mapNotifyTestError:function(e,t){var a=(t||"").trim();if("email"===e){if("missing_SMTP_HOST"===a)return this.$t("profile.notifications.errSmtpHost")||"email:服务器未配置发信 SMTP(管理员在「系统设置 → 邮件」或环境变量 SMTP_HOST/SMTP_USER 等)";if("missing_SMTP_FROM"===a)return this.$t("profile.notifications.errSmtpFrom")||"email:未配置发件人 SMTP_FROM(或 SMTP_USER)";if("missing_email_target"===a)return this.$t("profile.notifications.errEmailTarget")||"email:未填写通知邮箱且账号无邮箱"}return a?"".concat(e,": ").concat(a):""},handleSaveNotifications:function(){var e=this;this.notificationForm.validateFields(function(){var t=(0,o.A)((0,n.A)().m(function t(a,i){var r;return(0,n.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(!a){t.n=1;break}return t.a(2);case 1:return e.savingNotifications=!0,t.p=2,t.n=3,(0,s.Gl)({default_channels:i.default_channels||["browser"],telegram_bot_token:i.telegram_bot_token||"",telegram_chat_id:i.telegram_chat_id||"",email:i.email||"",phone:i.phone||"",discord_webhook:i.discord_webhook||"",webhook_url:i.webhook_url||"",webhook_token:i.webhook_token||""});case 3:r=t.v,1===r.code?(e.$message.success(e.$t("profile.notifications.saveSuccess")||"通知设置保存成功"),e.notificationSettings=r.data||e.notificationSettings):e.$message.error(r.msg||"保存失败"),t.n=5;break;case 4:t.p=4,t.v,e.$message.error("保存失败");case 5:return t.p=5,e.savingNotifications=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}));return function(e,a){return t.apply(this,arguments)}}())},handleTestNotification:function(){var e=this;return(0,o.A)((0,n.A)().m(function t(){var a,i,r,o,l,c,d;return(0,n.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(a=e.notificationForm.getFieldsValue(),i=a.default_channels||[],0!==i.length){t.n=1;break}return e.$message.warning(e.$t("profile.notifications.selectChannel")||"请至少选择一个通知渠道"),t.a(2);case 1:if(!i.includes("telegram")){t.n=3;break}if(a.telegram_bot_token){t.n=2;break}return e.$message.warning(e.$t("profile.notifications.fillTelegramToken")||"请填写 Telegram Bot Token"),t.a(2);case 2:if(a.telegram_chat_id){t.n=3;break}return e.$message.warning(e.$t("profile.notifications.fillTelegram")||"请填写 Telegram Chat ID"),t.a(2);case 3:if(!i.includes("email")||a.email){t.n=4;break}return e.$message.warning(e.$t("profile.notifications.fillEmail")||"请填写通知邮箱"),t.a(2);case 4:if(!i.includes("phone")||a.phone){t.n=5;break}return e.$message.warning(e.$t("profile.notifications.fillPhone")||"请填写手机号"),t.a(2);case 5:if(!i.includes("discord")||a.discord_webhook){t.n=6;break}return e.$message.warning(e.$t("profile.notifications.fillDiscord")||"请填写 Discord Webhook URL"),t.a(2);case 6:if(!i.includes("webhook")||a.webhook_url){t.n=7;break}return e.$message.warning(e.$t("profile.notifications.fillWebhook")||"请填写 Webhook URL"),t.a(2);case 7:return e.testingNotification=!0,t.p=8,t.n=9,(0,s.Gl)({default_channels:i,telegram_bot_token:a.telegram_bot_token||"",telegram_chat_id:a.telegram_chat_id||"",email:a.email||"",phone:a.phone||"",discord_webhook:a.discord_webhook||"",webhook_url:a.webhook_url||"",webhook_token:a.webhook_token||""});case 9:if(r=t.v,1===r.code){t.n=10;break}return e.$message.error(r.msg||"保存设置失败"),t.a(2);case 10:return t.n=11,(0,s.hl)();case 11:if(o=t.v,1===o.code){t.n=12;break}return e.$message.error(o.msg||e.$t("profile.notifications.testFailed")||"测试通知发送失败"),t.a(2);case 12:l=o.data&&o.data.results||{},c=Object.keys(l).filter(function(e){return!l[e].ok}),0===c.length?e.$message.success(e.$t("profile.notifications.testSent")||"测试通知已发送,请检查各渠道"):(d=c.map(function(t){var a=l[t]&&l[t].error||"",i=e._mapNotifyTestError(t,a);return i||(a?"".concat(t,": ").concat(a):t)}).join(";"),e.$message.warning((e.$t("profile.notifications.testPartial")||"部分渠道发送失败")+" — ".concat(d),8)),t.n=14;break;case 13:t.p=13,t.v,e.$message.error(e.$t("profile.notifications.testFailed")||"发送测试通知失败");case 14:return t.p=14,e.testingNotification=!1,t.f(14);case 15:return t.a(2)}},t,null,[[8,13,14,15]])}))()}}},p=u,m=a(845),g=(0,m.A)(p,i,r,!1,null,"2151383b",null),h=g.exports},53003:function(e,t,a){a.d(t,{DZ:function(){return o},YT:function(){return n},_d:function(){return s},lo:function(){return r}});a(76338);var i=a(75769);function r(){return(0,i.Ay)({url:"/api/settings/schema",method:"get"})}function n(){return(0,i.Ay)({url:"/api/settings/values",method:"get"})}function o(e){return(0,i.Ay)({url:"/api/settings/save",method:"post",data:e})}function s(){return(0,i.Ay)({url:"/api/settings/openrouter-balance",method:"get"})}},84841:function(e,t,a){a.d(t,{DK:function(){return w},E$:function(){return d},Gl:function(){return p},O0:function(){return c},TK:function(){return o},aU:function(){return r},cw:function(){return l},d$:function(){return k},hG:function(){return s},hl:function(){return m},kg:function(){return n},nY:function(){return v},r7:function(){return f},rx:function(){return h},v9:function(){return g},vF:function(){return u},vi:function(){return b},wq:function(){return _}});var i=a(75769);function r(e){return(0,i.Ay)({url:"/api/users/list",method:"get",params:e})}function n(e){return(0,i.Ay)({url:"/api/users/create",method:"post",data:e})}function o(e,t){return(0,i.Ay)({url:"/api/users/update",method:"put",params:{id:e},data:t})}function s(e){return(0,i.Ay)({url:"/api/users/delete",method:"delete",params:{id:e}})}function l(e){return(0,i.Ay)({url:"/api/users/reset-password",method:"post",data:e})}function c(){return(0,i.Ay)({url:"/api/users/roles",method:"get"})}function d(){return(0,i.Ay)({url:"/api/users/profile",method:"get"})}function f(e){return(0,i.Ay)({url:"/api/users/profile/update",method:"put",data:e})}function u(){return(0,i.Ay)({url:"/api/users/notification-settings",method:"get"})}function p(e){return(0,i.Ay)({url:"/api/users/notification-settings",method:"put",data:e})}function m(){return(0,i.Ay)({url:"/api/users/notification-settings/test",method:"post",data:{}})}function g(e){return(0,i.Ay)({url:"/api/users/my-credits-log",method:"get",params:e})}function h(e){return(0,i.Ay)({url:"/api/users/my-referrals",method:"get",params:e})}function _(e){return(0,i.Ay)({url:"/api/users/set-credits",method:"post",data:e})}function v(e){return(0,i.Ay)({url:"/api/users/set-vip",method:"post",data:e})}function w(e){return(0,i.Ay)({url:"/api/users/system-strategies",method:"get",params:e})}function b(e){return(0,i.Ay)({url:"/api/users/admin-orders",method:"get",params:e})}function k(e){return(0,i.Ay)({url:"/api/users/admin-ai-stats",method:"get",params:e})}}}]); \ No newline at end of file diff --git a/frontend/dist/js/843.be0077e1.js b/frontend/dist/js/755.1226be89.js similarity index 99% rename from frontend/dist/js/843.be0077e1.js rename to frontend/dist/js/755.1226be89.js index ff339ac..9b11b43 100644 --- a/frontend/dist/js/843.be0077e1.js +++ b/frontend/dist/js/755.1226be89.js @@ -1,4 +1,4 @@ -(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[843],{27077:function(t,e,i){"use strict";i.r(e),i.d(e,{default:function(){return $a}});var n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"chart-container",class:{"theme-dark":t.isDarkTheme}},[e("div",{staticClass:"chart-header"},[e("div",{staticClass:"header-top"},[e("div",{staticClass:"header-left"},[e("div",{staticClass:"search-section"},[e("a-select",{staticClass:"symbol-select",attrs:{"show-search":"",placeholder:t.$t("dashboard.indicator.selectSymbol"),dropdownClassName:"dark-dropdown","filter-option":t.filterSymbolOption,"not-found-content":null,open:t.symbolSearchOpen},on:{search:t.handleSymbolSearch,change:t.handleSymbolSelect,dropdownVisibleChange:t.handleDropdownVisibleChange},model:{value:t.searchSymbol,callback:function(e){t.searchSymbol=e},expression:"searchSymbol"}},[e("a-icon",{staticStyle:{color:"#999"},attrs:{slot:"suffixIcon",type:"search"},slot:"suffixIcon"}),t._l(t.symbolSuggestions,function(i){return e("a-select-option",{key:i.value,attrs:{value:i.value}},[e("div",{staticClass:"symbol-option"},[e("a-tag",{staticStyle:{"margin-right":"8px","margin-bottom":"0"},attrs:{color:t.getMarketColor(i.market)}},[t._v(" "+t._s(t.getMarketName(i.market))+" ")]),e("span",{staticClass:"symbol-name"},[t._v(t._s(i.symbol))]),i.name?e("span",{staticClass:"symbol-name-extra"},[t._v(t._s(i.name))]):t._e()],1)])}),e("a-select-option",{key:"add-stock-option",staticClass:"add-stock-option",attrs:{value:"__add_stock_option__"}},[e("div",{staticStyle:{width:"100%","text-align":"center",padding:"4px 0",color:"#1890ff",cursor:"pointer"}},[e("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"plus"}}),e("span",[t._v(t._s(t.$t("dashboard.analysis.watchlist.add")))])],1)])],2)],1),e("div",{staticClass:"timeframe-group"},t._l(["1m","5m","15m","30m","1H","4H","1D","1W"],function(i){return e("div",{key:i,staticClass:"timeframe-item",class:{active:t.timeframe===i},on:{click:function(e){return t.setTimeframe(i)}}},[t._v(" "+t._s(i)+" ")])}),0)]),t.currentSymbol?e("div",{staticClass:"current-symbol"},[e("div",{staticClass:"symbol-info"},[e("span",{staticClass:"symbol-label"},[t._v(t._s(t.currentSymbol))]),e("span",{staticClass:"market-tag"},[t._v(t._s(t.currentMarket))])]),e("div",{staticClass:"price-info",class:t.priceChangeClass},[e("span",{staticClass:"symbol-price"},[t._v(t._s(t.currentPrice))]),e("span",{staticClass:"symbol-change"},[t._v(" "+t._s(t.priceChange>0?"+":"")+t._s(t.priceChange.toFixed(2))+"% ")])]),t.isCryptoMarket?e("a-button",{staticClass:"qt-header-btn",attrs:{size:"small"},on:{click:t.openQuickTrade}},[e("a-icon",{attrs:{type:"thunderbolt",theme:"filled"}}),t._v(" "+t._s(t.$t("quickTrade.openPanel"))+" ")],1):t._e()],1):t._e()])]),e("div",{staticClass:"chart-content"},[e("div",{staticClass:"chart-main-row"},[t.currentSymbol?e("div",{staticClass:"mobile-symbol-price"},[e("div",{staticClass:"mobile-symbol-info"},[e("span",{staticClass:"mobile-market-tag"},[t._v(t._s(t.currentMarket))]),e("span",[t._v("-")]),e("span",{staticClass:"mobile-symbol-label"},[t._v(t._s(t.currentSymbol))])]),e("div",{staticClass:"mobile-price-info",class:t.priceChangeClass},[e("span",{staticClass:"mobile-symbol-price"},[t._v(t._s(t.currentPrice))]),e("span",{staticClass:"mobile-symbol-change"},[t._v(" "+t._s(t.priceChange>0?"+":"")+t._s(t.priceChange.toFixed(2))+"% ")])])]):t._e(),e("kline-chart",{ref:"klineChart",attrs:{symbol:t.currentSymbol,market:t.currentMarket,timeframe:t.timeframe,theme:t.chartTheme,activeIndicators:t.activeIndicators,realtimeEnabled:t.realtimeEnabled},on:{"price-change":t.handlePriceChange,retry:t.handleChartRetry,"indicator-toggle":t.handleIndicatorToggle}}),e("div",{staticClass:"chart-right"},[e("div",{staticClass:"indicators-panel"},[e("div",{staticClass:"panel-header"},[e("span",[t._v(t._s(t.$t("dashboard.indicator.panel.title")))]),e("div",{staticStyle:{display:"flex","align-items":"center","margin-left":"auto",gap:"8px"}},[t.isMobile?e("a-button",{staticClass:"mobile-header-create-btn",attrs:{type:"primary",size:"small",icon:"plus"},on:{click:t.handleCreateIndicator}},[t._v(" "+t._s(t.$t("dashboard.indicator.create"))+" ")]):t._e(),e("a-tooltip",{attrs:{title:t.realtimeEnabled?t.$t("dashboard.indicator.panel.realtimeOn"):t.$t("dashboard.indicator.panel.realtimeOff")}},[e("a-button",{staticClass:"realtime-toggle-btn",class:{active:t.realtimeEnabled},attrs:{type:"text"},on:{click:t.toggleRealtime}},[e("a-icon",{attrs:{type:t.realtimeEnabled?"sync":"pause-circle",spin:t.realtimeEnabled}})],1)],1)],1)]),e("div",{staticClass:"panel-body"},[t.isMobile?[e("div",{staticClass:"mobile-tab-content"},[e("div",{staticClass:"section-content custom-scrollbar"},[t._l(t.customIndicators,function(i){return e("div",{key:"custom-"+i.id,class:["indicator-card",{"indicator-active":t.isIndicatorActive("custom-"+i.id)}],on:{click:function(e){return t.toggleIndicator(i,"custom")}}},[e("div",{staticClass:"card-content"},[e("div",{staticClass:"card-header"},[e("span",{staticClass:"card-name"},[t._v(t._s(i.name))]),e("div",{staticClass:"card-actions"},[e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.action.edit")}},[e("a-icon",{staticClass:"action-icon edit-icon",attrs:{type:"edit"},on:{click:function(e){return e.stopPropagation(),t.handleEditIndicator(i)}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.action.delete")}},[e("a-icon",{staticClass:"action-icon delete-icon",attrs:{type:"delete"},on:{click:function(e){return e.stopPropagation(),t.handleDeleteIndicator(i)}}})],1),e("a-tooltip",{attrs:{title:t.isIndicatorActive("custom-"+i.id)?t.$t("dashboard.indicator.action.stop"):t.$t("dashboard.indicator.action.start")}},[e("a-icon",{class:["action-icon","toggle-icon",{active:t.isIndicatorActive("custom-"+i.id)}],attrs:{type:t.isIndicatorActive("custom-"+i.id)?"pause-circle":"play-circle"},on:{click:function(e){return e.stopPropagation(),t.toggleIndicator(i,"custom")}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.backtest.title")}},[e("a-icon",{staticClass:"action-icon backtest-icon",attrs:{type:"experiment"},on:{click:function(e){return e.stopPropagation(),t.handleOpenBacktest(i)}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.backtest.historyTitle")}},[e("a-icon",{staticClass:"action-icon backtest-history-icon",attrs:{type:"clock-circle"},on:{click:function(e){return e.stopPropagation(),t.handleOpenBacktestHistory(i)}}})],1),e("a-tooltip",{attrs:{title:i.publish_to_community?t.$t("dashboard.indicator.action.unpublish"):t.$t("dashboard.indicator.action.publish")}},[e("a-icon",{class:["action-icon","publish-icon",{published:i.publish_to_community}],attrs:{type:i.publish_to_community?"cloud":"cloud-upload"},on:{click:function(e){return e.stopPropagation(),t.handlePublishIndicator(i)}}})],1)],1)]),e("span",{staticClass:"card-desc"},[t._v(t._s(i.description||""))])])])}),0===t.customIndicators.length?e("div",{staticClass:"empty-indicators"},[e("a-icon",{attrs:{type:"info-circle"}}),e("span",[t._v(t._s(t.$t("dashboard.indicator.empty")))])],1):t._e()],2)])]:[e("div",{staticClass:"indicator-section",class:{"section-empty":0===t.customIndicators.length}},[e("div",{staticClass:"section-label"},[e("div",{staticClass:"section-label-left",on:{click:t.toggleCustomSection}},[e("a-icon",{staticClass:"collapse-icon",attrs:{type:t.customSectionCollapsed?"right":"down"}}),e("span",[t._v(t._s(t.$t("dashboard.indicator.section.myCreated"))+" ("+t._s(t.customIndicators.length)+")")])],1),e("a-button",{staticClass:"create-indicator-btn",attrs:{type:"primary",size:"small",icon:"plus"},on:{click:function(e){return e.stopPropagation(),t.handleCreateIndicator.apply(null,arguments)}}},[t._v(" "+t._s(t.$t("dashboard.indicator.create"))+" ")])],1),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.customSectionCollapsed,expression:"!customSectionCollapsed"}],staticClass:"section-content custom-scrollbar"},[t._l(t.customIndicators,function(i){return e("div",{key:"custom-"+i.id,class:["indicator-card",{"indicator-active":t.isIndicatorActive("custom-"+i.id)}],on:{click:function(e){return t.toggleIndicator(i,"custom")}}},[e("div",{staticClass:"card-content"},[e("div",{staticClass:"card-header"},[e("span",{staticClass:"card-name"},[t._v(t._s(i.name))]),e("div",{staticClass:"card-actions"},[e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.action.edit")}},[e("a-icon",{staticClass:"action-icon edit-icon",attrs:{type:"edit"},on:{click:function(e){return e.stopPropagation(),t.handleEditIndicator(i)}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.action.delete")}},[e("a-icon",{staticClass:"action-icon delete-icon",attrs:{type:"delete"},on:{click:function(e){return e.stopPropagation(),t.handleDeleteIndicator(i)}}})],1),e("a-tooltip",{attrs:{title:t.isIndicatorActive("custom-"+i.id)?t.$t("dashboard.indicator.action.stop"):t.$t("dashboard.indicator.action.start")}},[e("a-icon",{class:["action-icon","toggle-icon",{active:t.isIndicatorActive("custom-"+i.id)}],attrs:{type:t.isIndicatorActive("custom-"+i.id)?"pause-circle":"play-circle"},on:{click:function(e){return e.stopPropagation(),t.toggleIndicator(i,"custom")}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.backtest.title")}},[e("a-icon",{staticClass:"action-icon backtest-icon",attrs:{type:"experiment"},on:{click:function(e){return e.stopPropagation(),t.handleOpenBacktest(i)}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.backtest.historyTitle")}},[e("a-icon",{staticClass:"action-icon backtest-history-icon",attrs:{type:"clock-circle"},on:{click:function(e){return e.stopPropagation(),t.handleOpenBacktestHistory(i)}}})],1),e("a-tooltip",{attrs:{title:i.publish_to_community?t.$t("dashboard.indicator.action.unpublish"):t.$t("dashboard.indicator.action.publish")}},[e("a-icon",{class:["action-icon","publish-icon",{published:i.publish_to_community}],attrs:{type:i.publish_to_community?"cloud":"cloud-upload"},on:{click:function(e){return e.stopPropagation(),t.handlePublishIndicator(i)}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.action.createStrategy")}},[e("a-icon",{staticClass:"action-icon create-strategy-icon",attrs:{type:"rocket"},on:{click:function(e){return e.stopPropagation(),t.handleCreateStrategyFromIndicator(i)}}})],1)],1)]),e("span",{staticClass:"card-desc"},[t._v(t._s(i.description||""))])])])}),0===t.customIndicators.length?e("div",{staticClass:"empty-indicators"},[e("a-icon",{attrs:{type:"info-circle"}}),e("span",[t._v(t._s(t.$t("dashboard.indicator.empty")))])],1):t._e()],2)]),e("div",{staticClass:"indicator-section",class:{"section-empty":0===t.purchasedIndicators.length}},[e("div",{staticClass:"section-label"},[e("div",{staticClass:"section-label-left",on:{click:function(e){t.purchasedSectionCollapsed=!t.purchasedSectionCollapsed}}},[e("a-icon",{staticClass:"collapse-icon",attrs:{type:t.purchasedSectionCollapsed?"right":"down"}}),e("span",[t._v(t._s(t.$t("dashboard.indicator.section.purchased"))+" ("+t._s(t.purchasedIndicators.length)+")")])],1),e("a-button",{staticClass:"buy-indicator-btn",attrs:{type:"link",size:"small",icon:"shop"},on:{click:function(e){return e.stopPropagation(),t.goToIndicatorMarket.apply(null,arguments)}}},[t._v(" "+t._s(t.$t("menu.dashboard.community"))+" ")])],1),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.purchasedSectionCollapsed,expression:"!purchasedSectionCollapsed"}],staticClass:"section-content custom-scrollbar"},[t._l(t.purchasedIndicators,function(i){return e("div",{key:"purchased-"+i.id,class:["indicator-card","purchased-indicator",{"indicator-active":t.isIndicatorActive("purchased-"+i.id)}],on:{click:function(e){return t.toggleIndicator(i,"purchased")}}},[e("div",{staticClass:"card-content"},[e("div",{staticClass:"card-header"},[e("span",{staticClass:"card-name"},[e("a-icon",{staticClass:"purchased-icon",attrs:{type:"shopping"}}),t._v(" "+t._s(i.name)+" ")],1),e("div",{staticClass:"card-actions"},[e("a-tooltip",{attrs:{title:t.isIndicatorActive("purchased-"+i.id)?t.$t("dashboard.indicator.action.stop"):t.$t("dashboard.indicator.action.start")}},[e("a-icon",{class:["action-icon","toggle-icon",{active:t.isIndicatorActive("purchased-"+i.id)}],attrs:{type:t.isIndicatorActive("purchased-"+i.id)?"pause-circle":"play-circle"},on:{click:function(e){return e.stopPropagation(),t.toggleIndicator(i,"purchased")}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.backtest.title")}},[e("a-icon",{staticClass:"action-icon backtest-icon",attrs:{type:"experiment"},on:{click:function(e){return e.stopPropagation(),t.handleOpenBacktest(i)}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.backtest.historyTitle")}},[e("a-icon",{staticClass:"action-icon backtest-history-icon",attrs:{type:"clock-circle"},on:{click:function(e){return e.stopPropagation(),t.handleOpenBacktestHistory(i)}}})],1)],1)]),e("span",{staticClass:"card-desc"},[t._v(t._s(i.description||""))])])])}),0===t.purchasedIndicators.length?e("div",{staticClass:"empty-indicators"},[e("a-icon",{attrs:{type:"shopping"}}),e("span",[t._v(t._s(t.$t("dashboard.indicator.emptyPurchased")))])],1):t._e()],2)])]],2)])])],1),e("indicator-editor",{ref:"indicatorEditor",attrs:{visible:t.showIndicatorEditor,indicator:t.editingIndicator,userId:t.userId},on:{run:t.handleRunIndicator,save:t.handleSaveIndicator,cancel:function(e){t.showIndicatorEditor=!1,t.editingIndicator=null}}}),e("a-modal",{attrs:{visible:t.showParamsModal,title:t.$t("dashboard.indicator.paramsConfig.title"),confirmLoading:t.loadingParams,width:500,maskClosable:!1,keyboard:!1},on:{ok:t.confirmIndicatorParams,cancel:t.cancelIndicatorParams,afterClose:t.handleParamsModalAfterClose}},[t.pendingIndicator?e("div",{staticClass:"params-config-modal"},[e("div",{staticClass:"indicator-info"},[e("span",{staticClass:"indicator-name"},[t._v(t._s(t.pendingIndicator.name))])]),e("a-divider"),t.indicatorParams.length>0?e("div",{staticClass:"params-form"},t._l(t.indicatorParams,function(i){return e("div",{key:i.name,staticClass:"param-item"},[e("div",{staticClass:"param-header"},[e("label",{staticClass:"param-label"},[t._v(t._s(i.name))]),i.description?e("a-tooltip",{attrs:{title:i.description}},[e("a-icon",{staticStyle:{color:"#999","margin-left":"4px"},attrs:{type:"question-circle"}})],1):t._e()],1),"int"===i.type?e("a-input-number",{staticStyle:{width:"100%"},attrs:{precision:0},model:{value:t.indicatorParamValues[i.name],callback:function(e){t.$set(t.indicatorParamValues,i.name,e)},expression:"indicatorParamValues[param.name]"}}):"float"===i.type?e("a-input-number",{staticStyle:{width:"100%"},attrs:{precision:4},model:{value:t.indicatorParamValues[i.name],callback:function(e){t.$set(t.indicatorParamValues,i.name,e)},expression:"indicatorParamValues[param.name]"}}):"bool"===i.type?e("a-switch",{model:{value:t.indicatorParamValues[i.name],callback:function(e){t.$set(t.indicatorParamValues,i.name,e)},expression:"indicatorParamValues[param.name]"}}):e("a-input",{model:{value:t.indicatorParamValues[i.name],callback:function(e){t.$set(t.indicatorParamValues,i.name,e)},expression:"indicatorParamValues[param.name]"}})],1)}),0):e("a-empty",{attrs:{description:t.$t("dashboard.indicator.paramsConfig.noParams")}})],1):t._e()]),e("a-modal",{attrs:{title:t.publishIndicator&&t.publishIndicator.publish_to_community?t.$t("dashboard.indicator.publish.editTitle"):t.$t("dashboard.indicator.publish.title"),visible:t.showPublishModal,confirmLoading:t.publishing,width:"500px",okText:t.publishIndicator&&t.publishIndicator.publish_to_community?t.$t("dashboard.indicator.publish.update"):t.$t("dashboard.indicator.publish.confirm"),cancelText:t.$t("common.cancel")},on:{ok:t.handleConfirmPublish,cancel:function(e){t.showPublishModal=!1,t.publishIndicator=null}}},[e("a-form-model",{ref:"publishForm",attrs:{model:t.publishForm,rules:t.publishRules,layout:"vertical"}},[e("a-alert",{staticStyle:{"margin-bottom":"16px"},attrs:{type:"info","show-icon":"",message:t.$t("dashboard.indicator.publish.hint")}}),e("a-form-model-item",{attrs:{label:t.$t("dashboard.indicator.publish.pricingType"),prop:"pricingType"}},[e("a-radio-group",{model:{value:t.publishPricingType,callback:function(e){t.publishPricingType=e},expression:"publishPricingType"}},[e("a-radio",{attrs:{value:"free"}},[t._v(t._s(t.$t("dashboard.indicator.publish.free")))]),e("a-radio",{attrs:{value:"paid"}},[t._v(t._s(t.$t("dashboard.indicator.publish.paid")))])],1)],1),"paid"===t.publishPricingType?e("a-form-model-item",{attrs:{label:t.$t("dashboard.indicator.publish.price"),prop:"price"}},[e("a-input-number",{staticStyle:{width:"200px"},attrs:{min:1,max:1e4,precision:0},model:{value:t.publishPrice,callback:function(e){t.publishPrice=e},expression:"publishPrice"}}),e("span",{staticStyle:{"margin-left":"8px"}},[t._v(t._s(t.$t("community.credits")))])],1):t._e(),"paid"===t.publishPricingType?e("a-form-model-item",{attrs:{label:t.$t("dashboard.indicator.publish.vipFree")}},[e("a-switch",{model:{value:t.publishVipFree,callback:function(e){t.publishVipFree=e},expression:"publishVipFree"}}),e("div",{staticStyle:{"margin-top":"6px",color:"rgba(0,0,0,0.45)","font-size":"12px"}},[t._v(" "+t._s(t.$t("dashboard.indicator.publish.vipFreeHint"))+" ")])],1):t._e(),e("a-form-model-item",{attrs:{label:t.$t("dashboard.indicator.publish.description"),prop:"description"}},[e("a-textarea",{attrs:{placeholder:t.$t("dashboard.indicator.publish.descriptionPlaceholder"),rows:4,maxLength:500},model:{value:t.publishDescription,callback:function(e){t.publishDescription=e},expression:"publishDescription"}})],1),t.publishIndicator&&t.publishIndicator.publish_to_community?e("div",{staticStyle:{"margin-top":"16px"}},[e("a-button",{attrs:{type:"danger",ghost:"",loading:t.unpublishing},on:{click:t.handleUnpublish}},[e("a-icon",{attrs:{type:"close-circle"}}),t._v(" "+t._s(t.$t("dashboard.indicator.publish.unpublish"))+" ")],1)],1):t._e()],1)],1),e("a-modal",{attrs:{title:t.$t("dashboard.analysis.modal.addStock.title"),visible:t.showAddStockModal,confirmLoading:t.addingStock,width:"600px",okText:t.$t("dashboard.analysis.modal.addStock.confirm"),cancelText:t.$t("dashboard.analysis.modal.addStock.cancel")},on:{ok:t.handleAddStock,cancel:t.handleCloseAddStockModal}},[e("div",{staticClass:"add-stock-modal-content"},[e("a-tabs",{staticClass:"market-tabs",on:{change:t.handleMarketTabChange},model:{value:t.selectedMarketTab,callback:function(e){t.selectedMarketTab=e},expression:"selectedMarketTab"}},t._l(t.marketTypes,function(i){return e("a-tab-pane",{key:i.value,attrs:{tab:t.$t(i.i18nKey||"dashboard.analysis.market.".concat(i.value))}})}),1),e("div",{staticClass:"symbol-search-section"},[e("a-input-search",{attrs:{placeholder:t.$t("dashboard.analysis.modal.addStock.searchOrInputPlaceholder"),loading:t.searchingSymbols,size:"large","allow-clear":""},on:{search:t.handleSearchOrInput,change:t.handleSymbolSearchInput},model:{value:t.symbolSearchKeyword,callback:function(e){t.symbolSearchKeyword=e},expression:"symbolSearchKeyword"}},[e("a-button",{attrs:{slot:"enterButton",type:"primary",icon:"search"},slot:"enterButton"},[t._v(" "+t._s(t.$t("dashboard.analysis.modal.addStock.search"))+" ")])],1)],1),t.symbolSearchResults.length>0?e("div",{staticClass:"search-results-section"},[e("div",{staticClass:"section-title"},[e("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"search"}}),t._v(" "+t._s(t.$t("dashboard.analysis.modal.addStock.searchResults"))+" ")],1),e("a-list",{staticClass:"symbol-list",attrs:{"data-source":t.symbolSearchResults,loading:t.searchingSymbols,size:"small"},scopedSlots:t._u([{key:"renderItem",fn:function(i){return e("a-list-item",{staticClass:"symbol-list-item",on:{click:function(e){return t.selectSymbol(i)}}},[e("a-list-item-meta",[e("template",{slot:"title"},[e("div",{staticClass:"symbol-item-content"},[e("span",{staticClass:"symbol-code"},[t._v(t._s(i.symbol))]),e("span",{staticClass:"symbol-name"},[t._v(t._s(i.name))]),i.exchange?e("a-tag",{staticStyle:{"margin-left":"8px"},attrs:{size:"small",color:"blue"}},[t._v(" "+t._s(i.exchange)+" ")]):t._e()],1)])],2)],1)}}],null,!1,1074844145)})],1):t._e(),e("div",{staticClass:"hot-symbols-section"},[e("div",{staticClass:"section-title"},[e("a-icon",{staticStyle:{color:"#ff4d4f","margin-right":"4px"},attrs:{type:"fire"}}),t._v(" "+t._s(t.$t("dashboard.analysis.modal.addStock.hotSymbols"))+" ")],1),e("a-spin",{attrs:{spinning:t.loadingHotSymbols}},[t.hotSymbols.length>0?e("a-list",{staticClass:"symbol-list",attrs:{"data-source":t.hotSymbols,size:"small"},scopedSlots:t._u([{key:"renderItem",fn:function(i){return e("a-list-item",{staticClass:"symbol-list-item",on:{click:function(e){return t.selectSymbol(i)}}},[e("a-list-item-meta",[e("template",{slot:"title"},[e("div",{staticClass:"symbol-item-content"},[e("span",{staticClass:"symbol-code"},[t._v(t._s(i.symbol))]),e("span",{staticClass:"symbol-name"},[t._v(t._s(i.name))]),i.exchange?e("a-tag",{staticStyle:{"margin-left":"8px"},attrs:{size:"small",color:"orange"}},[t._v(" "+t._s(i.exchange)+" ")]):t._e()],1)])],2)],1)}}],null,!1,2177647935)}):e("a-empty",{attrs:{description:t.$t("dashboard.analysis.modal.addStock.noHotSymbols"),image:!1}})],1)],1),t.selectedSymbolForAdd?e("div",{staticClass:"selected-symbol-section"},[e("a-alert",{attrs:{message:t.$t("dashboard.analysis.modal.addStock.selectedSymbol"),type:"info","show-icon":"",closable:""},on:{close:function(e){t.selectedSymbolForAdd=null}}},[e("template",{slot:"description"},[e("div",{staticClass:"selected-symbol-info"},[e("a-tag",{staticStyle:{"margin-right":"8px"},attrs:{color:t.getMarketColor(t.selectedSymbolForAdd.market)}},[t._v(" "+t._s(t.$t("dashboard.analysis.market.".concat(t.selectedSymbolForAdd.market)))+" ")]),e("strong",[t._v(t._s(t.selectedSymbolForAdd.symbol))]),t.selectedSymbolForAdd.name?e("span",{staticStyle:{color:"#999","margin-left":"8px"}},[t._v(t._s(t.selectedSymbolForAdd.name))]):e("span",{staticStyle:{color:"#999","margin-left":"8px","font-style":"italic"}},[t._v(t._s(t.$t("dashboard.analysis.modal.addStock.nameWillBeFetched")))])],1)])],2)],1):t._e()],1)])],1),e("a-tooltip",{attrs:{title:t.$t("quickTrade.openPanel"),placement:"left"}},[!t.showQuickTrade&&t.currentSymbol&&t.isCryptoMarket?e("div",{staticClass:"qt-floating-btn",on:{click:t.openQuickTrade}},[e("a-icon",{attrs:{type:"thunderbolt",theme:"filled"}})],1):t._e()]),e("quick-trade-panel",{attrs:{visible:t.showQuickTrade,symbol:t.qtSymbol,"preset-side":t.qtSide,"preset-price":t.qtPrice,source:"indicator","market-type":"swap"},on:{close:function(e){t.showQuickTrade=!1},"order-success":t.onQuickTradeSuccess,"update:symbol":t.handleQuickTradeSymbolChange}})],1)},a=[],r=(i(62621),i(43898)),o=i(44735),s=i(15863),l=i(81127),c=i(56252),u=(i(6011),i(18787)),d=i(76338),h=(i(74423),i(85471)),p=i(95353),v=i(75769),f=i(35038),g=i(505),m=function(){var t=this,e=t._self._c;return e("div",[e("a-modal",{staticClass:"indicator-editor-modal",style:t.isMobile?{top:0,paddingBottom:0}:{top:"2%"},attrs:{title:t.$t("dashboard.indicator.editor.title"),visible:t.visible,width:t.isMobile?"100%":"95vw",confirmLoading:t.saving,okText:t.$t("dashboard.indicator.editor.save"),cancelText:t.$t("dashboard.indicator.editor.cancel"),maskClosable:!1,centered:!1},on:{ok:t.handleSave,cancel:t.handleCancel,afterClose:t.handleAfterClose}},[e("div",{staticClass:"editor-content"},[e("a-row",{staticClass:"editor-layout",class:{"mobile-layout":t.isMobile},attrs:{gutter:16}},[e("a-col",{staticClass:"code-editor-column",attrs:{span:24,xs:24,sm:24,md:24}},[e("div",{staticClass:"code-section"},[e("div",{staticClass:"section-header"},[e("div",{staticClass:"header-left"},[e("span",{staticClass:"section-title"},[t._v(t._s(t.$t("dashboard.indicator.editor.code")))])]),e("div",{staticClass:"section-actions"},[e("a-button",{staticStyle:{padding:"0 8px",color:"#52c41a","font-weight":"bold"},attrs:{type:"link",size:"small",loading:t.verifying},on:{click:t.handleVerifyCode}},[e("a-icon",{attrs:{type:"check-circle"}}),t._v(" "+t._s(t.$t("dashboard.indicator.editor.verifyCode"))+" ")],1),e("a-button",{staticStyle:{padding:"0"},attrs:{type:"link",size:"small"},on:{click:t.goToDocs}},[e("a-icon",{attrs:{type:"book"}}),t._v(" "+t._s(t.$t("dashboard.indicator.editor.guide"))+" ")],1)],1)]),e("a-alert",{staticStyle:{"margin-bottom":"12px"},attrs:{type:"info","show-icon":"",message:t.$t("dashboard.indicator.boundary.message"),description:t.$t("dashboard.indicator.boundary.indicatorRule")}}),e("div",{staticClass:"code-mode-split"},[e("a-row",{staticClass:"code-mode-row",attrs:{gutter:16}},[e("a-col",{staticClass:"code-pane",attrs:{xs:24,sm:24,md:18}},[e("div",{ref:"codeEditorContainer",staticClass:"code-editor-container"})]),e("a-col",{staticClass:"ai-pane",attrs:{xs:24,sm:24,md:6}},[e("div",{staticClass:"ai-panel"},[e("div",{staticClass:"ai-panel-title"},[e("a-icon",{attrs:{type:"robot"}}),e("span",[t._v(t._s(t.$t("dashboard.indicator.editor.aiGenerate")))])],1),e("a-textarea",{attrs:{placeholder:t.$t("dashboard.indicator.editor.aiPromptPlaceholder"),rows:12,"auto-size":{minRows:12,maxRows:20}},model:{value:t.aiPrompt,callback:function(e){t.aiPrompt=e},expression:"aiPrompt"}}),e("a-button",{staticStyle:{"margin-top":"10px"},attrs:{type:"primary",block:"",loading:t.aiGenerating,size:"large"},on:{click:t.handleAIGenerate}},[t._v(" "+t._s(t.$t("dashboard.indicator.editor.aiGenerateBtn"))+" ")])],1)])],1)],1)],1)])],1)],1),e("div",{staticClass:"editor-footer",attrs:{slot:"footer"},slot:"footer"},[e("a-button",{on:{click:t.handleCancel}},[t._v(" "+t._s(t.$t("dashboard.indicator.editor.cancel"))+" ")]),e("a-button",{attrs:{type:"primary",loading:t.saving},on:{click:t.handleSave}},[t._v(" "+t._s(t.$t("dashboard.indicator.editor.save"))+" ")])],1)])],1)},y=[],_=i(57532),b=i(15237),x=i.n(b),w=(i(74806),i(55218),i(97923),i(50436),i(74053)),S=i.n(w),C=i(75314),k={name:"IndicatorEditor",props:{visible:{type:Boolean,default:!1},indicator:{type:Object,default:null},userId:{type:Number,default:null}},data:function(){return{saving:!1,codeEditor:null,aiPrompt:"",aiGenerating:!1,verifying:!1,isMobile:!1}},computed:{},watch:{visible:function(t){var e=this;t?this.$nextTick(function(){setTimeout(function(){!e.codeEditor&&e.$refs.codeEditorContainer&&e.initCodeEditor(),e.initFormData()},200)}):this.codeEditor&&this.codeEditor.refresh()},indicator:{handler:function(t){var e=this;t&&this.visible&&this.$nextTick(function(){setTimeout(function(){e.initFormData()},100)})},deep:!0}},mounted:function(){var t=this;this.checkMobile(),window.addEventListener("resize",this.checkMobile),this.visible&&this.$nextTick(function(){setTimeout(function(){t.initCodeEditor()},100)})},beforeDestroy:function(){if(window.removeEventListener("resize",this.checkMobile),this.codeEditor)try{if("function"===typeof this.codeEditor.toTextArea)this.codeEditor.toTextArea();else if("function"===typeof this.codeEditor.getWrapperElement){var t=this.codeEditor.getWrapperElement();t&&t.parentNode&&t.parentNode.removeChild(t)}}catch(e){}finally{this.codeEditor=null}},methods:{getDefaultIndicatorCode:function(){return'#Demo Code:\n#my_indicator_name = "My Buy/Sell Indicator"\n#my_indicator_description = "Buy/Sell only; execution is normalized in backend."\n\n#df = df.copy()\n#sma = df["close"].rolling(14).mean()\n#buy = (df["close"] > sma) & (df["close"].shift(1) <= sma.shift(1))\n#sell = (df["close"] < sma) & (df["close"].shift(1) >= sma.shift(1))\n#df["buy"] = buy.fillna(False).astype(bool)\n#df["sell"] = sell.fillna(False).astype(bool)\n\n#buy_marks = [df["low"].iloc[i] * 0.995 if df["buy"].iloc[i] else None for i in range(len(df))]\n#sell_marks = [df["high"].iloc[i] * 1.005 if df["sell"].iloc[i] else None for i in range(len(df))]\n\n#output = {\n# "name": my_indicator_name,\n# "plots": [],\n# "signals": [\n# {"type": "buy", "text": "B", "data": buy_marks, "color": "#00E676"},\n# {"type": "sell", "text": "S", "data": sell_marks, "color": "#FF5252"}\n# ]\n#}\n'},checkMobile:function(){this.isMobile=window.innerWidth<=768},goToDocs:function(){window.open("https://github.com/brokermr810/QuantDinger/blob/main/docs/STRATEGY_DEV_GUIDE.md","_blank")},handleVerifyCode:function(){var t=this,e=this.codeEditor?this.codeEditor.getValue():"";e&&e.trim()?(this.verifying=!0,(0,v.Ay)({url:"/api/indicator/verifyCode",method:"post",data:{code:e}}).then(function(e){if(1===e.code){var i=e.data||{};t.$message.success("".concat(t.$t("dashboard.indicator.editor.verifyCodeSuccess")," (").concat(i.plots_count||0," plots, ").concat(i.signals_count||0," signals)"))}else{var n=e.data||{};t.$error({title:t.$t("dashboard.indicator.editor.verifyCodeFailed"),width:600,content:function(t){return t("div",[t("p",{style:{fontWeight:"bold",color:"#ff4d4f"}},e.msg),n.details?t("pre",{style:{background:"#f5f5f5",padding:"8px",overflow:"auto",maxHeight:"300px",marginTop:"8px",fontSize:"12px",fontFamily:"monospace"}},n.details):null])}})}}).catch(function(e){t.$message.error("Request Failed: "+(e.message||"Unknown Error"))}).finally(function(){t.verifying=!1})):this.$message.warning(this.$t("dashboard.indicator.editor.verifyCodeEmpty"))},cleanMarkdownCodeBlocks:function(t){if(!t||"string"!==typeof t)return t;var e=t.trim(),i=/```/.test(e);return i?(e=e.replace(/^```[\w]*\s*\n?/i,""),e.startsWith("```")&&(e=e.replace(/^```\s*\n?/g,"")),e.endsWith("```")&&(e=e.replace(/\n?```\s*$/g,"")),e=e.replace(/^\s*```[\w]*\s*$/gm,""),e=e.replace(/^\s*```\s*$/gm,""),e=e.replace(/\n{3,}/g,"\n\n"),e=e.trim(),e):e},initFormData:function(){var t=this;if(this.visible){var e=this.indicator&&this.indicator.code||"";e&&String(e).trim()||(e=this.getDefaultIndicatorCode()),this.$nextTick(function(){setTimeout(function(){t.aiPrompt="",t.codeEditor&&(t.codeEditor.setValue(e),t.codeEditor.refresh())},50)})}},initCodeEditor:function(){var t=this;if(this.$refs.codeEditorContainer){if(this.codeEditor){try{if("function"===typeof this.codeEditor.toTextArea)this.codeEditor.toTextArea();else if("function"===typeof this.codeEditor.getWrapperElement){var e=this.codeEditor.getWrapperElement();e&&e.parentNode&&e.parentNode.removeChild(e)}}catch(i){}this.codeEditor=null}try{this.$refs.codeEditorContainer.innerHTML="",this.codeEditor=x()(this.$refs.codeEditorContainer,{value:function(){var e=t.indicator&&t.indicator.code||"";return e&&String(e).trim()?e:t.getDefaultIndicatorCode()}(),mode:"python",theme:"eclipse",lineNumbers:!0,lineWrapping:!0,indentUnit:4,indentWithTabs:!1,smartIndent:!0,matchBrackets:!0,autoCloseBrackets:!0,styleActiveLine:!0,foldGutter:!1,gutters:["CodeMirror-linenumbers"],tabSize:4,viewportMargin:1/0}),this.codeEditor.on("change",function(t){t.getValue()}),this.$nextTick(function(){t.codeEditor&&t.codeEditor.refresh()})}catch(n){}}},handleSave:function(){var t=this.codeEditor?this.codeEditor.getValue():"",e=t||"";e.trim()?(this.saving=!0,this.$emit("save",{id:this.indicator?this.indicator.id:0,code:e,userid:this.userId})):this.$message.warning(this.$t("dashboard.indicator.editor.codeRequired"))},handleCancel:function(){this.codeEditor&&this.codeEditor.setValue(""),this.$emit("cancel")},handleAfterClose:function(){var t=this;this.codeEditor&&this.$nextTick(function(){t.codeEditor&&t.codeEditor.refresh()}),this.aiPrompt=""},handleAIGenerate:function(){var t=this;return(0,c.A)((0,l.A)().m(function e(){var i,n,a,r,o,s,c,u,d,h,p,v,f,g,m,y,b,x,w,k,I,E,A,P,M;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.aiPrompt&&t.aiPrompt.trim()){e.n=1;break}return t.$message.warning(t.$t("dashboard.indicator.editor.aiPromptRequired")),e.a(2);case 1:return t.aiGenerating=!0,i="",t.codeEditor&&(i=t.codeEditor.getValue()||""),t.codeEditor&&(t.codeEditor.setValue("# AI generating...\n"),t.codeEditor.refresh()),n="",e.p=2,a="/api/indicator/aiGenerate",r=S().get(C.Xh),o={prompt:t.aiPrompt.trim()},i.trim()&&(o.existingCode=i.trim()),e.n=3,fetch(a,{method:"POST",headers:{"Content-Type":"application/json",Authorization:r?"Bearer ".concat(r):"","Access-Token":r||"",Token:r||""},body:JSON.stringify(o),credentials:"include"});case 3:if(s=e.v,s.ok){e.n=5;break}return e.n=4,s.text().catch(function(){return""});case 4:throw c=e.v,new Error(c||"HTTP error! status: ".concat(s.status));case 5:if(s.body&&"function"===typeof s.body.getReader){e.n=6;break}throw new Error("AI 服务未返回可读取的流(response.body 不存在)");case 6:u=s.body.getReader(),d=new TextDecoder,h="";case 7:return e.n=8,u.read();case 8:if(p=e.v,v=p.done,f=p.value,!v){e.n=9;break}return e.a(3,21);case 9:h+=d.decode(f,{stream:!0}),g=h.split("\n\n"),h=g.pop()||"",m=(0,_.A)(g),e.p=10,m.s();case 11:if((y=m.n()).done){e.n=17;break}if(b=y.value,b.trim()&&b.startsWith("data: ")){e.n=12;break}return e.a(3,16);case 12:if(x=b.substring(6),"[DONE]"!==x){e.n=13;break}return e.a(3,17);case 13:if(e.p=13,w=JSON.parse(x),!w.error){e.n=14;break}throw new Error(w.error);case 14:w.content&&(n+=w.content,k=t.cleanMarkdownCodeBlocks(n),t.codeEditor&&(t.codeEditor.setValue(k),I=t.codeEditor.lineCount(),t.codeEditor.setCursor({line:I-1,ch:0}),t.codeEditor.refresh())),e.n=16;break;case 15:e.p=15,e.v;case 16:e.n=11;break;case 17:e.n=19;break;case 18:e.p=18,P=e.v,m.e(P);case 19:return e.p=19,m.f(),e.f(19);case 20:e.n=7;break;case 21:t.codeEditor&&n?(E=t.cleanMarkdownCodeBlocks(n),t.codeEditor.setValue(E),t.codeEditor.refresh(),t.$message.success(t.$t("dashboard.indicator.editor.aiGenerateSuccess"))):n||t.$message.warning("未生成任何代码,请尝试更详细的提示词"),e.n=23;break;case 22:e.p=22,M=e.v,t.$message.error(M.message||t.$t("dashboard.indicator.editor.aiGenerateError")),n&&t.codeEditor&&(A=t.cleanMarkdownCodeBlocks(n),t.codeEditor.setValue(A));case 23:return e.p=23,t.aiGenerating=!1,e.f(23);case 24:return e.a(2)}},e,null,[[13,15],[10,18,19,20],[2,22,23,24]])}))()}}},I=k,E=i(845),A=(0,E.A)(I,m,y,!1,null,"4fea1865",null),P=A.exports,M=function(){var t=this,e=t._self._c;return e("div",{staticClass:"chart-left",class:{"theme-dark":"dark"===t.chartTheme}},[e("div",{staticClass:"chart-wrapper"},[e("div",{staticClass:"drawing-toolbar"},[t._l(t.drawingTools,function(i){return e("a-tooltip",{key:i.name,attrs:{title:i.title,placement:"right"}},[e("div",{staticClass:"drawing-tool-btn",class:{active:t.activeDrawingTool===i.name},on:{click:function(e){return t.selectDrawingTool(i.name)}}},[e("a-icon",{attrs:{type:i.icon}})],1)])}),e("a-divider",{attrs:{type:"vertical"}}),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.drawing.clearAll"),placement:"right"}},[e("div",{staticClass:"drawing-tool-btn",on:{click:t.clearAllDrawings}},[e("a-icon",{attrs:{type:"delete"}})],1)])],2),e("div",{staticClass:"chart-content-area"},[e("div",{staticClass:"indicator-toolbar"},t._l(t.indicatorButtons,function(i){return e("div",{key:i.id,staticClass:"indicator-btn",class:{active:t.isIndicatorActive(i.id)},attrs:{title:i.name},on:{click:function(e){return t.toggleIndicator(i)}}},[t._v(" "+t._s(i.shortName)+" ")])}),0),e("div",{staticClass:"kline-chart-container",attrs:{id:"kline-chart-container"}})]),t.loading?e("div",{staticClass:"chart-overlay"},[e("a-spin",{attrs:{size:"large"}},[e("a-icon",{staticStyle:{"font-size":"24px",color:"#13c2c2"},attrs:{slot:"indicator",type:"loading",spin:""},slot:"indicator"})],1)],1):t._e(),t.error?e("div",{staticClass:"chart-overlay"},[e("div",{staticClass:"error-box"},[e("a-icon",{staticStyle:{"font-size":"24px",color:"#ef5350","margin-bottom":"10px"},attrs:{type:"warning"}}),e("span",[t._v(t._s(t.error))]),e("a-button",{staticStyle:{"margin-top":"12px"},attrs:{type:"primary",size:"small",ghost:""},on:{click:t.handleRetry}},[t._v(" "+t._s(t.$t("dashboard.indicator.retry"))+" ")])],1)]):t._e(),t.pyodideLoadFailed?e("div",{staticClass:"chart-overlay pyodide-warning"},[e("div",{staticClass:"warning-box"},[e("a-icon",{staticStyle:{"font-size":"32px",color:"#faad14","margin-bottom":"12px"},attrs:{type:"warning"}}),e("div",{staticClass:"warning-title"},[t._v(t._s(t.$t("dashboard.indicator.warning.pyodideLoadFailed")))]),e("div",{staticClass:"warning-desc"},[t._v(t._s(t.$t("dashboard.indicator.warning.pyodideLoadFailedDesc")))])],1)]):t._e(),t.symbol||t.loading||t.error||t.pyodideLoadFailed?t._e():e("div",{staticClass:"chart-overlay initial-hint"},[e("div",{staticClass:"hint-box"},[e("a-icon",{staticStyle:{"font-size":"48px",color:"#1890ff","margin-bottom":"16px"},attrs:{type:"line-chart"}}),e("div",{staticClass:"hint-title"},[t._v(t._s(t.$t("dashboard.indicator.hint.selectSymbol")))]),e("div",{staticClass:"hint-desc"},[t._v(t._s(t.$t("dashboard.indicator.hint.selectSymbolDesc")))])],1)])])])},D=[],T=i(21560),B=i(26297),F=i(2403),R=function(t,e){return R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},R(t,e)};function L(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}R(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var N,O,z,V,W,H,$,Y,X,K=function(){return K=Object.assign||function(t){for(var e,i=1,n=arguments.length;i0&&a[a.length-1])&&(6===s[0]||2===s[0])){r=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Z(t,e){var i="function"===typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,a,r=i.call(t),o=[];try{while((void 0===e||e-- >0)&&!(n=r.next()).done)o.push(n.value)}catch(s){a={error:s}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(a)throw a.error}}return o}function q(t,e,i){if(i||2===arguments.length)for(var n,a=0,r=e.length;a1e9)return"".concat(+(e/1e9).toFixed(3),"B");if(e>1e6)return"".concat(+(e/1e6).toFixed(3),"M");if(e>1e3)return"".concat(+(e/1e3).toFixed(3),"K")}return"".concat(t)}function zt(t,e){var i="".concat(t);if(0===e.length)return i;if(i.includes(".")){var n=i.split(".");return"".concat(n[0].replace(/(\d)(?=(\d{3})+$)/g,function(t){return"".concat(t).concat(e)}),".").concat(n[1])}return i.replace(/(\d)(?=(\d{3})+$)/g,function(t){return"".concat(t).concat(e)})}function Vt(t,e){var i="".concat(t),n=new RegExp("\\.0{"+e+",}[1-9][0-9]*$");if(n.test(i)){var a=i.split("."),r=a[a.length-1],o=r.match(/0*/);if(At(o)){var s=o[0].length;return a[a.length-1]=r.replace(/0*/,"0{".concat(s,"}")),a.join(".")}}return i}function Wt(t){var e,i,n;return null!==(n=null===(i=null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView)||void 0===i?void 0:i.devicePixelRatio)&&void 0!==n?n:1}function Ht(t,e,i){return"".concat(null!==e&&void 0!==e?e:"normal"," ").concat(null!==t&&void 0!==t?t:12,"px ").concat(null!==i&&void 0!==i?i:"Helvetica Neue")}function $t(t,e,i,n){if(!At(Dt)){var a=document.createElement("canvas"),r=Wt(a);Dt=a.getContext("2d"),Dt.scale(r,r)}return Dt.font=Ht(e,i,n),Math.round(Dt.measureText(t).width)}(function(t){t["OnDataReady"]="onDataReady",t["OnZoom"]="onZoom",t["OnScroll"]="onScroll",t["OnVisibleRangeChange"]="onVisibleRangeChange",t["OnTooltipIconClick"]="onTooltipIconClick",t["OnCrosshairChange"]="onCrosshairChange",t["OnCandleBarClick"]="onCandleBarClick",t["OnPaneDrag"]="onPaneDrag"})(Tt||(Tt={}));var Yt,Xt,Kt=function(){function t(){this._callbacks=[]}return t.prototype.subscribe=function(t){var e,i=null!==(e=this._callbacks.indexOf(t))&&void 0!==e?e:-1;i<0&&this._callbacks.push(t)},t.prototype.unsubscribe=function(t){var e;if(kt(t)){var i=null!==(e=this._callbacks.indexOf(t))&&void 0!==e?e:-1;i>-1&&this._callbacks.splice(i,1)}else this._callbacks=[]},t.prototype.execute=function(t){this._callbacks.forEach(function(e){e(t)})},t.prototype.isEmpty=function(){return 0===this._callbacks.length},t}();function jt(t,e,i,n,a){var r,o=e.result,s=e.figures,l=e.styles,c=Rt(l,"circles",n.circles),u=c.length,d=Rt(l,"bars",n.bars),h=d.length,p=Rt(l,"lines",n.lines),v=p.length,f=0,g=0,m=0,y=0;s.forEach(function(s){var l;switch(s.type){case"circle":y=f;var _=c[f%u];r=K(K({},_),{color:_.noChangeColor}),f++;break;case"bar":y=g;var b=d[g%h];r=K(K({},b),{color:b.noChangeColor}),g++;break;case"line":y=m,r=p[m%v],m++;break}if(At(r)){var x={prev:{kLineData:t[i-1],indicatorData:o[i-1]},current:{kLineData:t[i],indicatorData:o[i]},next:{kLineData:t[i+1],indicatorData:o[i+1]}},w=null===(l=s.styles)||void 0===l?void 0:l.call(s,x,e,n);a(s,K(K({},r),w),y)}})}(function(t){t["Init"]="init",t["Forward"]="forward",t["Backward"]="backward"})(Yt||(Yt={})),function(t){t["Normal"]="normal",t["Price"]="price",t["Volume"]="volume"}(Xt||(Xt={}));var Ut,Gt=function(){function t(t){this.result=[],this._precisionFlag=!1;var e=t.name,i=t.shortName,n=t.series,a=t.calcParams,r=t.figures,o=t.precision,s=t.shouldOhlc,l=t.shouldFormatBigNumber,c=t.visible,u=t.zLevel,d=t.minValue,h=t.maxValue,p=t.styles,v=t.extendData,f=t.regenerateFigures,g=t.createTooltipDataSource,m=t.draw;this.name=e,this.shortName=null!==i&&void 0!==i?i:e,this.series=null!==n&&void 0!==n?n:Xt.Normal,this.precision=null!==o&&void 0!==o?o:4,this.calcParams=null!==a&&void 0!==a?a:[],this.figures=null!==r&&void 0!==r?r:[],this.shouldOhlc=null!==s&&void 0!==s&&s,this.shouldFormatBigNumber=null!==l&&void 0!==l&&l,this.visible=null===c||void 0===c||c,this.zLevel=null!==u&&void 0!==u?u:0,this.minValue=null!==d&&void 0!==d?d:null,this.maxValue=null!==h&&void 0!==h?h:null,this.styles=St(null!==p&&void 0!==p?p:{}),this.extendData=v,this.regenerateFigures=null!==f&&void 0!==f?f:null,this.createTooltipDataSource=null!==g&&void 0!==g?g:null,this.draw=null!==m&&void 0!==m?m:null}return t.prototype.setShortName=function(t){return this.shortName!==t&&(this.shortName=t,!0)},t.prototype.setSeries=function(t){return this.series!==t&&(this.series=t,!0)},t.prototype.setPrecision=function(t,e){var i=null!==e&&void 0!==e&&e,n=Math.floor(t);return!(!(n!==this.precision&&t>=0)||i&&(!i||this._precisionFlag))&&(this.precision=n,i||(this._precisionFlag=!0),!0)},t.prototype.setCalcParams=function(t){var e,i;return this.calcParams=t,this.figures=null!==(i=null===(e=this.regenerateFigures)||void 0===e?void 0:e.call(this,t))&&void 0!==i?i:this.figures,!0},t.prototype.setShouldOhlc=function(t){return this.shouldOhlc!==t&&(this.shouldOhlc=t,!0)},t.prototype.setShouldFormatBigNumber=function(t){return this.shouldFormatBigNumber!==t&&(this.shouldFormatBigNumber=t,!0)},t.prototype.setVisible=function(t){return this.visible!==t&&(this.visible=t,!0)},t.prototype.setZLevel=function(t){return this.zLevel!==t&&(this.zLevel=t,!0)},t.prototype.setStyles=function(t){return wt(this.styles,t),!0},t.prototype.setExtendData=function(t){return this.extendData!==t&&(this.extendData=t,!0)},t.prototype.setFigures=function(t){return this.figures!==t&&(this.figures=t,!0)},t.prototype.setMinValue=function(t){return this.minValue!==t&&(this.minValue=t,!0)},t.prototype.setMaxValue=function(t){return this.maxValue!==t&&(this.maxValue=t,!0)},t.prototype.setRegenerateFigures=function(t){return this.regenerateFigures!==t&&(this.regenerateFigures=t,!0)},t.prototype.setCreateTooltipDataSource=function(t){return this.createTooltipDataSource!==t&&(this.createTooltipDataSource=t,!0)},t.prototype.setDraw=function(t){return this.draw!==t&&(this.draw=t,!0)},t.prototype.calcIndicator=function(t){return j(this,void 0,void 0,function(){var e;return U(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.calc(t,this)];case 1:return e=i.sent(),this.result=e,[2,!0];case 2:return i.sent(),[2,!1];case 3:return[2]}})})},t.extend=function(e){var i=function(t){function i(){return t.call(this,e)||this}return L(i,t),i.prototype.calc=function(t,i){return e.calc(t,i)},i}(t);return i},t}();function Zt(){return["mouseClickEvent","mouseDoubleClickEvent","mouseRightClickEvent","tapEvent","doubleTapEvent","mouseDownEvent","touchStartEvent","mouseMoveEvent","touchMoveEvent"]}(function(t){t["Normal"]="normal",t["WeakMagnet"]="weak_magnet",t["StrongMagnet"]="strong_magnet"})(Ut||(Ut={}));var qt,Jt=1,Qt=-1,te="overlay_",ee="overlay_figure_",ie=function(){function t(t){this.currentStep=Jt,this.points=[],this._prevPressedPoint=null,this._prevPressedPoints=[];var e=t.mode,i=t.modeSensitivity,n=t.extendData,a=t.styles,r=t.name,o=t.totalStep,s=t.lock,l=t.visible,c=t.zLevel,u=t.needDefaultPointFigure,d=t.needDefaultXAxisFigure,h=t.needDefaultYAxisFigure,p=t.createPointFigures,v=t.createXAxisFigures,f=t.createYAxisFigures,g=t.performEventPressedMove,m=t.performEventMoveForDrawing,y=t.onDrawStart,_=t.onDrawing,b=t.onDrawEnd,x=t.onClick,w=t.onDoubleClick,S=t.onRightClick,C=t.onPressedMoveStart,k=t.onPressedMoving,I=t.onPressedMoveEnd,E=t.onMouseEnter,A=t.onMouseLeave,P=t.onRemoved,M=t.onSelected,D=t.onDeselected;this.name=r,this.totalStep=!Et(o)||o<2?1:o,this.lock=null!==s&&void 0!==s&&s,this.visible=null===l||void 0===l||l,this.zLevel=null!==c&&void 0!==c?c:0,this.needDefaultPointFigure=null!==u&&void 0!==u&&u,this.needDefaultXAxisFigure=null!==d&&void 0!==d&&d,this.needDefaultYAxisFigure=null!==h&&void 0!==h&&h,this.mode=null!==e&&void 0!==e?e:Ut.Normal,this.modeSensitivity=null!==i&&void 0!==i?i:8,this.extendData=n,this.styles=St(null!==a&&void 0!==a?a:{}),this.createPointFigures=null!==p&&void 0!==p?p:null,this.createXAxisFigures=null!==v&&void 0!==v?v:null,this.createYAxisFigures=null!==f&&void 0!==f?f:null,this.performEventPressedMove=null!==g&&void 0!==g?g:null,this.performEventMoveForDrawing=null!==m&&void 0!==m?m:null,this.onDrawStart=null!==y&&void 0!==y?y:null,this.onDrawing=null!==_&&void 0!==_?_:null,this.onDrawEnd=null!==b&&void 0!==b?b:null,this.onClick=null!==x&&void 0!==x?x:null,this.onDoubleClick=null!==w&&void 0!==w?w:null,this.onRightClick=null!==S&&void 0!==S?S:null,this.onPressedMoveStart=null!==C&&void 0!==C?C:null,this.onPressedMoving=null!==k&&void 0!==k?k:null,this.onPressedMoveEnd=null!==I&&void 0!==I?I:null,this.onMouseEnter=null!==E&&void 0!==E?E:null,this.onMouseLeave=null!==A&&void 0!==A?A:null,this.onRemoved=null!==P&&void 0!==P?P:null,this.onSelected=null!==M&&void 0!==M?M:null,this.onDeselected=null!==D&&void 0!==D?D:null}return t.prototype.setId=function(t){return!Mt(this.id)&&(this.id=t,!0)},t.prototype.setGroupId=function(t){return!Mt(this.groupId)&&(this.groupId=t,!0)},t.prototype.setPaneId=function(t){this.paneId=t},t.prototype.setExtendData=function(t){return t!==this.extendData&&(this.extendData=t,!0)},t.prototype.setStyles=function(t){return wt(this.styles,t),!0},t.prototype.setPoints=function(t){if(t.length>0){var e=void 0;if(this.points=q([],Z(t),!1),t.length>=this.totalStep-1?(this.currentStep=Qt,e=this.totalStep-1):(this.currentStep=t.length+1,e=t.length),null!==this.performEventMoveForDrawing)for(var i=0;is?n=r:a=r,o<=2)break}return n}function ve(t){var e=Math.floor(ye(t)),i=_e(e),n=t/i,a=0;return a=n<1.5?1:n<2.5?2:n<3.5?3:n<4.5?4:n<5.5?5:n<6.5?6:8,t=a*i,e>=-20?+t.toFixed(e<0?-e:0):t}function fe(t,e){null==e&&(e=10),e=Math.min(Math.max(0,e),20);var i=(+t).toFixed(e);return+i}function ge(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var a=e.indexOf(".");return a<0?0:e.length-1-a}function me(t,e,i){var n=[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER];return t.forEach(function(t){var a,r;n[0]=Math.max(null!==(a=t[e])&&void 0!==a?a:t,n[0]),n[1]=Math.min(null!==(r=t[i])&&void 0!==r?r:t,n[1])}),n}function ye(t){return Math.log(t)/Math.log(10)}function _e(t){return Math.pow(10,t)}function be(){return{from:0,to:0,realFrom:0,realTo:0}}var xe={MIN:1,MAX:50},we=8,Se=80,Ce=.88,ke=10,Ie=function(){function t(t){this._dateTimeFormat=this._buildDateTimeFormat(),this._zoomEnabled=!0,this._scrollEnabled=!0,this._totalBarSpace=0,this._barSpace=we,this._offsetRightDistance=Se,this._startLastBarRightSideDiffBarCount=0,this._scrollLimitRole=0,this._minVisibleBarCount={left:2,right:2},this._maxOffsetDistance={left:50,right:50},this._visibleRange=be(),this._chartStore=t,this._gapBarSpace=this._calcGapBarSpace(),this._lastBarRightSideDiffBarCount=this._offsetRightDistance/this._barSpace}return t.prototype._calcGapBarSpace=function(){var t;return this._barSpace>3?t=Math.floor(this._barSpace*Ce):(t=Math.floor(this._barSpace),t===this._barSpace&&t--),t%2===0&&t--,t=Math.max(1,t),t},t.prototype.adjustVisibleRange=function(){var t,e,i,n,a=this._chartStore.getDataList(),r=a.length,o=this._totalBarSpace/this._barSpace;1===this._scrollLimitRole?(i=(this._totalBarSpace-this._maxOffsetDistance.right)/this._barSpace,n=(this._totalBarSpace-this._maxOffsetDistance.left)/this._barSpace):(i=this._minVisibleBarCount.left,n=this._minVisibleBarCount.right),i=Math.max(0,i),n=Math.max(0,n);var s=o-Math.min(i,r);this._lastBarRightSideDiffBarCount>s&&(this._lastBarRightSideDiffBarCount=s);var l=-r+Math.min(n,r);this._lastBarRightSideDiffBarCountr&&(c=r);var d=Math.round(c-o)-1;d<0&&(d=0);var h=this._lastBarRightSideDiffBarCount>0?Math.round(r+this._lastBarRightSideDiffBarCount-o)-1:d;if(this._visibleRange={from:d,to:c,realFrom:h,realTo:u},this._chartStore.getActionStore().execute(Tt.OnVisibleRangeChange,this._visibleRange),this._chartStore.adjustVisibleDataList(),0===d){var p=a[0];this._chartStore.executeLoadMoreCallback(null!==(t=null===p||void 0===p?void 0:p.timestamp)&&void 0!==t?t:null),this._chartStore.executeLoadDataCallback({type:Yt.Forward,data:null!==p&&void 0!==p?p:null})}c===r&&this._chartStore.executeLoadDataCallback({type:Yt.Backward,data:null!==(e=a[r-1])&&void 0!==e?e:null})},t.prototype.getDateTimeFormat=function(){return this._dateTimeFormat},t.prototype._buildDateTimeFormat=function(t){var e={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};Mt(t)&&(e.timeZone=t);var i=null;try{i=new Intl.DateTimeFormat("en",e)}catch(n){_t("","","Timezone is error!!!")}return i},t.prototype.setTimezone=function(t){var e=this._buildDateTimeFormat(t);null!==e&&(this._dateTimeFormat=e)},t.prototype.getTimezone=function(){return this._dateTimeFormat.resolvedOptions().timeZone},t.prototype.getBarSpace=function(){return{bar:this._barSpace,halfBar:this._barSpace/2,gapBar:this._gapBarSpace,halfGapBar:Math.floor(this._gapBarSpace/2)}},t.prototype.setBarSpace=function(t,e){txe.MAX||this._barSpace===t||(this._barSpace=t,this._gapBarSpace=this._calcGapBarSpace(),null===e||void 0===e||e(),this.adjustVisibleRange(),this._chartStore.getTooltipStore().recalculateCrosshair(!0),this._chartStore.getChart().adjustPaneViewport(!1,!0,!0,!0))},t.prototype.setTotalBarSpace=function(t){return this._totalBarSpace!==t&&(this._totalBarSpace=t,this.adjustVisibleRange(),this._chartStore.getTooltipStore().recalculateCrosshair(!0)),this},t.prototype.setOffsetRightDistance=function(t,e){return this._offsetRightDistance=1===this._scrollLimitRole?Math.min(this._maxOffsetDistance.right,t):t,this._lastBarRightSideDiffBarCount=this._offsetRightDistance/this._barSpace,null!==e&&void 0!==e&&e&&(this.adjustVisibleRange(),this._chartStore.getTooltipStore().recalculateCrosshair(!0),this._chartStore.getChart().adjustPaneViewport(!1,!0,!0,!0)),this},t.prototype.resetOffsetRightDistance=function(){this.setOffsetRightDistance(this._offsetRightDistance)},t.prototype.getInitialOffsetRightDistance=function(){return this._offsetRightDistance},t.prototype.getOffsetRightDistance=function(){return Math.max(0,this._lastBarRightSideDiffBarCount*this._barSpace)},t.prototype.getLastBarRightSideDiffBarCount=function(){return this._lastBarRightSideDiffBarCount},t.prototype.setLastBarRightSideDiffBarCount=function(t){return this._lastBarRightSideDiffBarCount=t,this},t.prototype.setMaxOffsetLeftDistance=function(t){return this._scrollLimitRole=1,this._maxOffsetDistance.left=t,this},t.prototype.setMaxOffsetRightDistance=function(t){return this._scrollLimitRole=1,this._maxOffsetDistance.right=t,this},t.prototype.setLeftMinVisibleBarCount=function(t){return this._scrollLimitRole=0,this._minVisibleBarCount.left=t,this},t.prototype.setRightMinVisibleBarCount=function(t){return this._scrollLimitRole=0,this._minVisibleBarCount.right=t,this},t.prototype.getVisibleRange=function(){return this._visibleRange},t.prototype.startScroll=function(){this._startLastBarRightSideDiffBarCount=this._lastBarRightSideDiffBarCount},t.prototype.scroll=function(t){if(this._scrollEnabled){var e=t/this._barSpace,i=this._lastBarRightSideDiffBarCount*this._barSpace;this._lastBarRightSideDiffBarCount=this._startLastBarRightSideDiffBarCount-e,this.adjustVisibleRange(),this._chartStore.getTooltipStore().recalculateCrosshair(!0),this._chartStore.getChart().adjustPaneViewport(!1,!0,!0,!0);var n=Math.round(i-this._lastBarRightSideDiffBarCount*this._barSpace);0!==n&&this._chartStore.getActionStore().execute(Tt.OnScroll,{distance:n})}},t.prototype.getDataByDataIndex=function(t){var e;return null!==(e=this._chartStore.getDataList()[t])&&void 0!==e?e:null},t.prototype.coordinateToFloatIndex=function(t){var e=this._chartStore.getDataList().length,i=(this._totalBarSpace-t)/this._barSpace,n=e+this._lastBarRightSideDiffBarCount-i;return Math.round(1e6*n)/1e6},t.prototype.dataIndexToTimestamp=function(t){var e,i=this.getDataByDataIndex(t);return null!==(e=null===i||void 0===i?void 0:i.timestamp)&&void 0!==e?e:null},t.prototype.timestampToDataIndex=function(t){var e=this._chartStore.getDataList();return 0===e.length?0:pe(e,"timestamp",t)},t.prototype.dataIndexToCoordinate=function(t){var e=this._chartStore.getDataList().length,i=e+this._lastBarRightSideDiffBarCount-t;return Math.floor(this._totalBarSpace-(i-.5)*this._barSpace)},t.prototype.coordinateToDataIndex=function(t){return Math.ceil(this.coordinateToFloatIndex(t))-1},t.prototype.zoom=function(t,e){var i,n=this;if(this._zoomEnabled){var a=null!==e&&void 0!==e?e:null;if(!Et(null===a||void 0===a?void 0:a.x)){var r=this._chartStore.getTooltipStore().getCrosshair();a={x:null!==(i=null===r||void 0===r?void 0:r.x)&&void 0!==i?i:this._totalBarSpace/2}}var o=a.x,s=this.coordinateToFloatIndex(o),l=this._barSpace,c=this._barSpace+t*(this._barSpace/ke);this.setBarSpace(c,function(){n._lastBarRightSideDiffBarCount+=s-n.coordinateToFloatIndex(o)});var u=this._barSpace/l;1!==u&&this._chartStore.getActionStore().execute(Tt.OnZoom,{scale:u})}},t.prototype.setZoomEnabled=function(t){return this._zoomEnabled=t,this},t.prototype.getZoomEnabled=function(){return this._zoomEnabled},t.prototype.setScrollEnabled=function(t){return this._scrollEnabled=t,this},t.prototype.getScrollEnabled=function(){return this._scrollEnabled},t.prototype.clear=function(){this._visibleRange=be()},t}(),Ee={name:"AVP",shortName:"AVP",series:Xt.Price,precision:2,figures:[{key:"avp",title:"AVP: ",type:"line"}],calc:function(t){var e=0,i=0;return t.map(function(t){var n,a,r={},o=null!==(n=null===t||void 0===t?void 0:t.turnover)&&void 0!==n?n:0,s=null!==(a=null===t||void 0===t?void 0:t.volume)&&void 0!==a?a:0;return e+=o,i+=s,0!==i&&(r.avp=e/i),r})}},Ae={name:"AO",shortName:"AO",calcParams:[5,34],figures:[{key:"ao",title:"AO: ",type:"bar",baseValue:0,styles:function(t,e,i){var n,a,r,o,s,l=t.prev,c=t.current,u=null!==(a=null===(n=l.indicatorData)||void 0===n?void 0:n.ao)&&void 0!==a?a:Number.MIN_SAFE_INTEGER,d=null!==(o=null===(r=c.indicatorData)||void 0===r?void 0:r.ao)&&void 0!==o?o:Number.MIN_SAFE_INTEGER;s=d>u?Rt(e.styles,"bars[0].upColor",i.bars[0].upColor):Rt(e.styles,"bars[0].downColor",i.bars[0].downColor);var h=d>u?O.Stroke:O.Fill;return{color:s,style:h,borderColor:s}}}],calc:function(t,e){var i=e.calcParams,n=Math.max(i[0],i[1]),a=0,r=0,o=0,s=0;return t.map(function(e,l){var c={},u=(e.low+e.high)/2;if(a+=u,r+=u,l>=i[0]-1){o=a/i[0];var d=t[l-(i[0]-1)];a-=(d.low+d.high)/2}if(l>=i[1]-1){s=r/i[1];d=t[l-(i[1]-1)];r-=(d.low+d.high)/2}return l>=n-1&&(c.ao=o-s),c})}},Pe={name:"BIAS",shortName:"BIAS",calcParams:[6,12,24],figures:[{key:"bias1",title:"BIAS6: ",type:"line"},{key:"bias2",title:"BIAS12: ",type:"line"},{key:"bias3",title:"BIAS24: ",type:"line"}],regenerateFigures:function(t){return t.map(function(t,e){return{key:"bias".concat(e+1),title:"BIAS".concat(t,": "),type:"line"}})},calc:function(t,e){var i=e.calcParams,n=e.figures,a=[];return t.map(function(e,r){var o={},s=e.close;return i.forEach(function(e,l){var c;if(a[l]=(null!==(c=a[l])&&void 0!==c?c:0)+s,r>=e-1){var u=a[l]/i[l];o[n[l].key]=(s-u)/u*100,a[l]-=t[r-(e-1)].close}}),o})}};function Me(t,e){var i=t.length,n=0;return t.forEach(function(t){var i=t.close-e;n+=i*i}),n=Math.abs(n),Math.sqrt(n/i)}var De={name:"BOLL",shortName:"BOLL",series:Xt.Price,calcParams:[20,2],precision:2,shouldOhlc:!0,figures:[{key:"up",title:"UP: ",type:"line"},{key:"mid",title:"MID: ",type:"line"},{key:"dn",title:"DN: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=i[0]-1,a=0;return t.map(function(e,r){var o=e.close,s={};if(a+=o,r>=n){s.mid=a/i[0];var l=Me(t.slice(r-n,r+1),s.mid);s.up=s.mid+i[1]*l,s.dn=s.mid-i[1]*l,a-=t[r-n].close}return s})}},Te={name:"BRAR",shortName:"BRAR",calcParams:[26],figures:[{key:"br",title:"BR: ",type:"line"},{key:"ar",title:"AR: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=0,r=0,o=0;return t.map(function(e,s){var l,c,u={},d=e.high,h=e.low,p=e.open,v=(null!==(l=t[s-1])&&void 0!==l?l:e).close;if(r+=d-p,o+=p-h,n+=d-v,a+=v-h,s>=i[0]-1){u.ar=0!==o?r/o*100:0,u.br=0!==a?n/a*100:0;var f=t[s-(i[0]-1)],g=f.high,m=f.low,y=f.open,_=(null!==(c=t[s-i[0]])&&void 0!==c?c:t[s-(i[0]-1)]).close;n-=g-_,a-=_-m,r-=g-y,o-=y-m}return u})}},Be={name:"BBI",shortName:"BBI",series:Xt.Price,precision:2,calcParams:[3,6,12,24],shouldOhlc:!0,figures:[{key:"bbi",title:"BBI: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=Math.max.apply(Math,q([],Z(i),!1)),a=[],r=[];return t.map(function(e,o){var s={},l=e.close;if(i.forEach(function(e,i){var n;a[i]=(null!==(n=a[i])&&void 0!==n?n:0)+l,o>=e-1&&(r[i]=a[i]/e,a[i]-=t[o-(e-1)].close)}),o>=n-1){var c=0;r.forEach(function(t){c+=t}),s.bbi=c/4}return s})}},Fe={name:"CCI",shortName:"CCI",calcParams:[20],figures:[{key:"cci",title:"CCI: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=i[0]-1,a=0,r=[];return t.map(function(e,o){var s={},l=(e.high+e.low+e.close)/3;if(a+=l,r.push(l),o>=n){var c=a/i[0],u=r.slice(o-n,o+1),d=0;u.forEach(function(t){d+=Math.abs(t-c)});var h=d/i[0];s.cci=0!==h?(l-c)/h/.015:0;var p=(t[o-n].high+t[o-n].low+t[o-n].close)/3;a-=p}return s})}},Re={name:"CR",shortName:"CR",calcParams:[26,10,20,40,60],figures:[{key:"cr",title:"CR: ",type:"line"},{key:"ma1",title:"MA1: ",type:"line"},{key:"ma2",title:"MA2: ",type:"line"},{key:"ma3",title:"MA3: ",type:"line"},{key:"ma4",title:"MA4: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=Math.ceil(i[1]/2.5+1),a=Math.ceil(i[2]/2.5+1),r=Math.ceil(i[3]/2.5+1),o=Math.ceil(i[4]/2.5+1),s=0,l=[],c=0,u=[],d=0,h=[],p=0,v=[],f=[];return t.forEach(function(e,g){var m,y,_,b,x,w={},S=null!==(m=t[g-1])&&void 0!==m?m:e,C=(S.high+S.close+S.low+S.open)/4,k=Math.max(0,e.high-C),I=Math.max(0,C-e.low);g>=i[0]-1&&(w.cr=0!==I?k/I*100:0,s+=w.cr,c+=w.cr,d+=w.cr,p+=w.cr,g>=i[0]+i[1]-2&&(l.push(s/i[1]),g>=i[0]+i[1]+n-3&&(w.ma1=l[l.length-1-n]),s-=null!==(y=f[g-(i[1]-1)].cr)&&void 0!==y?y:0),g>=i[0]+i[2]-2&&(u.push(c/i[2]),g>=i[0]+i[2]+a-3&&(w.ma2=u[u.length-1-a]),c-=null!==(_=f[g-(i[2]-1)].cr)&&void 0!==_?_:0),g>=i[0]+i[3]-2&&(h.push(d/i[3]),g>=i[0]+i[3]+r-3&&(w.ma3=h[h.length-1-r]),d-=null!==(b=f[g-(i[3]-1)].cr)&&void 0!==b?b:0),g>=i[0]+i[4]-2&&(v.push(p/i[4]),g>=i[0]+i[4]+o-3&&(w.ma4=v[v.length-1-o]),p-=null!==(x=f[g-(i[4]-1)].cr)&&void 0!==x?x:0)),f.push(w)}),f}},Le={name:"DMA",shortName:"DMA",calcParams:[10,50,10],figures:[{key:"dma",title:"DMA: ",type:"line"},{key:"ama",title:"AMA: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=Math.max(i[0],i[1]),a=0,r=0,o=0,s=[];return t.forEach(function(e,l){var c,u={},d=e.close;a+=d,r+=d;var h=0,p=0;if(l>=i[0]-1&&(h=a/i[0],a-=t[l-(i[0]-1)].close),l>=i[1]-1&&(p=r/i[1],r-=t[l-(i[1]-1)].close),l>=n-1){var v=h-p;u.dma=v,o+=v,l>=n+i[2]-2&&(u.ama=o/i[2],o-=null!==(c=s[l-(i[2]-1)].dma)&&void 0!==c?c:0)}s.push(u)}),s}},Ne={name:"DMI",shortName:"DMI",calcParams:[14,6],figures:[{key:"pdi",title:"PDI: ",type:"line"},{key:"mdi",title:"MDI: ",type:"line"},{key:"adx",title:"ADX: ",type:"line"},{key:"adxr",title:"ADXR: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=0,r=0,o=0,s=0,l=0,c=0,u=0,d=[];return t.forEach(function(e,h){var p,v,f={},g=null!==(p=t[h-1])&&void 0!==p?p:e,m=g.close,y=e.high,_=e.low,b=y-_,x=Math.abs(y-m),w=Math.abs(m-_),S=y-g.high,C=g.low-_,k=Math.max(Math.max(b,x),w),I=S>0&&S>C?S:0,E=C>0&&C>S?C:0;if(n+=k,a+=I,r+=E,h>=i[0]-1){h>i[0]-1?(o=o-o/i[0]+k,s=s-s/i[0]+I,l=l-l/i[0]+E):(o=n,s=a,l=r);var A=0,P=0;0!==o&&(A=100*s/o,P=100*l/o),f.pdi=A,f.mdi=P;var M=0;P+A!==0&&(M=Math.abs(P-A)/(P+A)*100),c+=M,h>=2*i[0]-2&&(u=h>2*i[0]-2?(u*(i[0]-1)+M)/i[0]:c/i[0],f.adx=u,h>=2*i[0]+i[1]-3&&(f.adxr=((null!==(v=d[h-(i[1]-1)].adx)&&void 0!==v?v:0)+u)/2))}d.push(f)}),d}},Oe={name:"EMV",shortName:"EMV",calcParams:[14,9],figures:[{key:"emv",title:"EMV: ",type:"line"},{key:"maEmv",title:"MAEMV: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=[];return t.map(function(e,r){var o,s={};if(r>0){var l=t[r-1],c=e.high,u=e.low,d=null!==(o=e.volume)&&void 0!==o?o:0,h=(c+u)/2-(l.high+l.low)/2;if(0===d||c-u===0)s.emv=0;else{var p=d/1e8/(c-u);s.emv=h/p}n+=s.emv,a.push(s.emv),r>=i[0]&&(s.maEmv=n/i[0],n-=a[r-i[0]])}return s})}},ze={name:"EMA",shortName:"EMA",series:Xt.Price,calcParams:[6,12,20],precision:2,shouldOhlc:!0,figures:[{key:"ema1",title:"EMA6: ",type:"line"},{key:"ema2",title:"EMA12: ",type:"line"},{key:"ema3",title:"EMA20: ",type:"line"}],regenerateFigures:function(t){return t.map(function(t,e){return{key:"ema".concat(e+1),title:"EMA".concat(t,": "),type:"line"}})},calc:function(t,e){var i=e.calcParams,n=e.figures,a=0,r=[];return t.map(function(t,e){var o={},s=t.close;return a+=s,i.forEach(function(t,i){e>=t-1&&(r[i]=e>t-1?(2*s+(t-1)*r[i])/(t+1):a/t,o[n[i].key]=r[i])}),o})}},Ve={name:"MTM",shortName:"MTM",calcParams:[12,6],figures:[{key:"mtm",title:"MTM: ",type:"line"},{key:"maMtm",title:"MAMTM: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=[];return t.forEach(function(e,r){var o,s={};if(r>=i[0]){var l=e.close,c=t[r-i[0]].close;s.mtm=l-c,n+=s.mtm,r>=i[0]+i[1]-1&&(s.maMtm=n/i[1],n-=null!==(o=a[r-(i[1]-1)].mtm)&&void 0!==o?o:0)}a.push(s)}),a}},We={name:"MA",shortName:"MA",series:Xt.Price,calcParams:[5,10,30,60],precision:2,shouldOhlc:!0,figures:[{key:"ma5",title:"MA5: ",type:"line"},{key:"ma10",title:"MA10: ",type:"line"},{key:"ma30",title:"MA30: ",type:"line"},{key:"ma60",title:"MA60: ",type:"line"}],regenerateFigures:function(t){return t.map(function(t,e){return{key:"ma".concat(e+1),title:"MA".concat(t,": "),type:"line"}})},calc:function(t,e){var i=e.calcParams,n=e.figures,a=[];return t.map(function(e,r){var o={},s=e.close;return i.forEach(function(e,i){var l;a[i]=(null!==(l=a[i])&&void 0!==l?l:0)+s,r>=e-1&&(o[n[i].key]=a[i]/e,a[i]-=t[r-(e-1)].close)}),o})}},He={name:"MACD",shortName:"MACD",calcParams:[12,26,9],figures:[{key:"dif",title:"DIF: ",type:"line"},{key:"dea",title:"DEA: ",type:"line"},{key:"macd",title:"MACD: ",type:"bar",baseValue:0,styles:function(t,e,i){var n,a,r,o,s,l=t.prev,c=t.current,u=null!==(a=null===(n=l.indicatorData)||void 0===n?void 0:n.macd)&&void 0!==a?a:Number.MIN_SAFE_INTEGER,d=null!==(o=null===(r=c.indicatorData)||void 0===r?void 0:r.macd)&&void 0!==o?o:Number.MIN_SAFE_INTEGER;s=d>0?Rt(e.styles,"bars[0].upColor",i.bars[0].upColor):d<0?Rt(e.styles,"bars[0].downColor",i.bars[0].downColor):Rt(e.styles,"bars[0].noChangeColor",i.bars[0].noChangeColor);var h=u=a[0]-1&&(i=e>a[0]-1?(2*d+(a[0]-1)*i)/(a[0]+1):r/a[0]),e>=a[1]-1&&(n=e>a[1]-1?(2*d+(a[1]-1)*n)/(a[1]+1):r/a[1]),e>=c-1&&(o=i-n,u.dif=o,s+=o,e>=c+a[2]-2&&(l=e>c+a[2]-2?(2*o+l*(a[2]-1))/(a[2]+1):s/a[2],u.macd=2*(o-l),u.dea=l)),u})}},$e={name:"OBV",shortName:"OBV",calcParams:[30],figures:[{key:"obv",title:"OBV: ",type:"line"},{key:"maObv",title:"MAOBV: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=0,r=[];return t.forEach(function(e,o){var s,l,c,u,d=null!==(s=t[o-1])&&void 0!==s?s:e;e.closed.close&&(a+=null!==(c=e.volume)&&void 0!==c?c:0);var h={obv:a};n+=a,o>=i[0]-1&&(h.maObv=n/i[0],n-=null!==(u=r[o-(i[0]-1)].obv)&&void 0!==u?u:0),r.push(h)}),r}},Ye={name:"PVT",shortName:"PVT",figures:[{key:"pvt",title:"PVT: ",type:"line"}],calc:function(t){var e=0;return t.map(function(i,n){var a,r,o={},s=i.close,l=null!==(a=i.volume)&&void 0!==a?a:1,c=(null!==(r=t[n-1])&&void 0!==r?r:i).close,u=0,d=c*l;return 0!==d&&(u=(s-c)/d),e+=u,o.pvt=e,o})}},Xe={name:"PSY",shortName:"PSY",calcParams:[12,6],figures:[{key:"psy",title:"PSY: ",type:"line"},{key:"maPsy",title:"MAPSY: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=0,r=[],o=[];return t.forEach(function(e,s){var l,c,u={},d=(null!==(l=t[s-1])&&void 0!==l?l:e).close,h=e.close-d>0?1:0;r.push(h),n+=h,s>=i[0]-1&&(u.psy=n/i[0]*100,a+=u.psy,s>=i[0]+i[1]-2&&(u.maPsy=a/i[1],a-=null!==(c=o[s-(i[1]-1)].psy)&&void 0!==c?c:0),n-=r[s-(i[0]-1)]),o.push(u)}),o}},Ke={name:"ROC",shortName:"ROC",calcParams:[12,6],figures:[{key:"roc",title:"ROC: ",type:"line"},{key:"maRoc",title:"MAROC: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=[],a=0;return t.forEach(function(e,r){var o,s,l={};if(r>=i[0]-1){var c=e.close,u=(null!==(o=t[r-i[0]])&&void 0!==o?o:t[r-(i[0]-1)]).close;l.roc=0!==u?(c-u)/u*100:0,a+=l.roc,r>=i[0]-1+i[1]-1&&(l.maRoc=a/i[1],a-=null!==(s=n[r-(i[1]-1)].roc)&&void 0!==s?s:0)}n.push(l)}),n}},je={name:"RSI",shortName:"RSI",calcParams:[6,12,24],figures:[{key:"rsi1",title:"RSI1: ",type:"line"},{key:"rsi2",title:"RSI2: ",type:"line"},{key:"rsi3",title:"RSI3: ",type:"line"}],regenerateFigures:function(t){return t.map(function(t,e){var i=e+1;return{key:"rsi".concat(i),title:"RSI".concat(i,": "),type:"line"}})},calc:function(t,e){var i=e.calcParams,n=e.figures,a=[],r=[];return t.map(function(e,o){var s,l={},c=(null!==(s=t[o-1])&&void 0!==s?s:e).close,u=e.close-c;return i.forEach(function(e,i){var s,c,d;if(u>0?a[i]=(null!==(s=a[i])&&void 0!==s?s:0)+u:r[i]=(null!==(c=r[i])&&void 0!==c?c:0)+Math.abs(u),o>=e-1){0!==r[i]?l[n[i].key]=100-100/(1+a[i]/r[i]):l[n[i].key]=0;var h=t[o-(e-1)],p=null!==(d=t[o-e])&&void 0!==d?d:h,v=h.close-p.close;v>0?a[i]-=v:r[i]-=Math.abs(v)}}),l})}},Ue={name:"SMA",shortName:"SMA",series:Xt.Price,calcParams:[12,2],precision:2,figures:[{key:"sma",title:"SMA: ",type:"line"}],shouldOhlc:!0,calc:function(t,e){var i=e.calcParams,n=0,a=0;return t.map(function(t,e){var r={},o=t.close;return n+=o,e>=i[0]-1&&(a=e>i[0]-1?(o*i[1]+a*(i[0]-i[1]+1))/(i[0]+1):n/i[0],r.sma=a),r})}},Ge={name:"KDJ",shortName:"KDJ",calcParams:[9,3,3],figures:[{key:"k",title:"K: ",type:"line"},{key:"d",title:"D: ",type:"line"},{key:"j",title:"J: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=[];return t.forEach(function(e,a){var r,o,s,l,c={},u=e.close;if(a>=i[0]-1){var d=me(t.slice(a-(i[0]-1),a+1),"high","low"),h=d[0],p=d[1],v=h-p,f=(u-p)/(0===v?1:v)*100;c.k=((i[1]-1)*(null!==(o=null===(r=n[a-1])||void 0===r?void 0:r.k)&&void 0!==o?o:50)+f)/i[1],c.d=((i[2]-1)*(null!==(l=null===(s=n[a-1])||void 0===s?void 0:s.d)&&void 0!==l?l:50)+c.k)/i[2],c.j=3*c.k-2*c.d}n.push(c)}),n}},Ze={name:"SAR",shortName:"SAR",series:Xt.Price,calcParams:[2,2,20],precision:2,shouldOhlc:!0,figures:[{key:"sar",title:"SAR: ",type:"circle",styles:function(t,e,i){var n,a,r=t.current,o=null!==(a=null===(n=r.indicatorData)||void 0===n?void 0:n.sar)&&void 0!==a?a:Number.MIN_SAFE_INTEGER,s=r.kLineData,l=((null===s||void 0===s?void 0:s.high)+(null===s||void 0===s?void 0:s.low))/2,c=oe.low?(c=s,o=n,s=-100,l=!l):c>p&&(c=p)}else{(-100===s||s>h)&&(s=h,o=Math.min(o+a,r)),c=u+o*(s-u);var v=Math.max(t[Math.max(1,i)-1].high,d);c=r[0]-1&&(i=e>r[0]-1?(2*p+(r[0]-1)*i)/(r[0]+1):o/r[0],s+=i,e>=2*r[0]-2&&(n=e>2*r[0]-2?(2*i+(r[0]-1)*n)/(r[0]+1):s/r[0],l+=n,e>=3*r[0]-3))){var v=void 0,f=0;e>3*r[0]-3?(v=(2*n+(r[0]-1)*a)/(r[0]+1),f=(v-a)/a*100):v=l/r[0],a=v,h.trix=f,c+=f,e>=3*r[0]+r[1]-4&&(h.maTrix=c/r[1],c-=null!==(d=u[e-(r[1]-1)].trix)&&void 0!==d?d:0)}u.push(h)}),u}};function Je(){return{key:"volume",title:"VOLUME: ",type:"bar",baseValue:0,styles:function(t,e,i){var n=t.current.kLineData,a=Rt(e.styles,"bars[0].noChangeColor",i.bars[0].noChangeColor);return At(n)&&(n.close>n.open?a=Rt(e.styles,"bars[0].upColor",i.bars[0].upColor):n.close=e-1&&(l[n[i].key]=a[i]/e,a[i]-=null!==(c=t[r-(e-1)].volume)&&void 0!==c?c:0)}),l})}},ti={name:"VR",shortName:"VR",calcParams:[26,6],figures:[{key:"vr",title:"VR: ",type:"line"},{key:"maVr",title:"MAVR: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=0,r=0,o=0,s=[];return t.forEach(function(e,l){var c,u,d,h,p,v={},f=e.close,g=(null!==(c=t[l-1])&&void 0!==c?c:e).close,m=null!==(u=e.volume)&&void 0!==u?u:0;if(f>g?n+=m:f=i[0]-1){var y=r/2;v.vr=a+y===0?0:(n+y)/(a+y)*100,o+=v.vr,l>=i[0]+i[1]-2&&(v.maVr=o/i[1],o-=null!==(d=s[l-(i[1]-1)].vr)&&void 0!==d?d:0);var _=t[l-(i[0]-1)],b=null!==(h=t[l-i[0]])&&void 0!==h?h:_,x=_.close,w=null!==(p=_.volume)&&void 0!==p?p:0;x>b.close?n-=w:x=s){var l=me(t.slice(a-s,a+1),"high","low"),c=l[0],u=l[1],d=c-u;r[n[i].key]=0===d?0:(o-c)/d*100}}),r})}},ii={},ni=[Ee,Ae,Pe,De,Te,Be,Fe,Re,Le,Ne,Oe,ze,Ve,We,He,$e,Ye,Xe,Ke,je,Ue,Ge,Ze,qe,Qe,ti,ei];function ai(t){ii[t.name]=Gt.extend(t)}function ri(t){var e;return null!==(e=ii[t])&&void 0!==e?e:null}ni.forEach(function(t){ii[t.name]=Gt.extend(t)});var oi=function(){function t(t){this._instances=new Map,this._chartStore=t}return t.prototype._overrideInstance=function(t,e){var i=e.shortName,n=e.series,a=e.calcParams,r=e.precision,o=e.figures,s=e.minValue,l=e.maxValue,c=e.shouldOhlc,u=e.shouldFormatBigNumber,d=e.visible,h=e.zLevel,p=e.styles,v=e.extendData,f=e.regenerateFigures,g=e.createTooltipDataSource,m=e.draw,y=e.calc,_=!1;Mt(i)&&t.setShortName(i)&&(_=!0),At(n)&&t.setSeries(n)&&(_=!0);var b=!1;Ct(a)&&t.setCalcParams(a)&&(_=!0,b=!0),Ct(o)&&t.setFigures(o)&&(_=!0,b=!0),void 0!==s&&t.setMinValue(s)&&(_=!0),void 0!==l&&t.setMinValue(l)&&(_=!0),Et(r)&&t.setPrecision(r)&&(_=!0),Pt(c)&&t.setShouldOhlc(c)&&(_=!0),Pt(u)&&t.setShouldFormatBigNumber(u)&&(_=!0),Pt(d)&&t.setVisible(d)&&(_=!0);var x=!1;return Et(h)&&t.setZLevel(h)&&(_=!0,x=!0),At(p)&&t.setStyles(p)&&(_=!0),void 0!==v&&t.setExtendData(v)&&(_=!0,b=!0),void 0!==f&&t.setRegenerateFigures(f)&&(_=!0),void 0!==g&&t.setCreateTooltipDataSource(g)&&(_=!0),void 0!==m&&t.setDraw(m)&&(_=!0),kt(y)&&(t.calc=y,b=!0),[_,b,x]},t.prototype._sort=function(t){var e;Mt(t)?null===(e=this._instances.get(t))||void 0===e||e.sort(function(t,e){return t.zLevel-e.zLevel}):this._instances.forEach(function(t){t.sort(function(t,e){return t.zLevel-e.zLevel})})},t.prototype.addInstance=function(t,e,i){return j(this,void 0,void 0,function(){var n,a,r,o,s;return U(this,function(l){switch(l.label){case 0:return n=t.name,a=this._instances.get(e),At(a)?(r=a.find(function(t){return t.name===n}),At(r)?[4,Promise.reject(new Error("Duplicate indicators."))]:[3,2]):[3,2];case 1:return[2,l.sent()];case 2:return At(a)||(a=[]),o=ri(n),s=new o,this.synchronizeSeriesPrecision(s),this._overrideInstance(s,t),i||(a=[]),a.push(s),this._instances.set(e,a),this._sort(e),[4,s.calcIndicator(this._chartStore.getDataList())];case 3:return[2,l.sent()]}})})},t.prototype.getInstances=function(t){var e;return null!==(e=this._instances.get(t))&&void 0!==e?e:[]},t.prototype.removeInstance=function(t,e){var i,n=!1,a=this._instances.get(t);if(At(a)){if(Mt(e)){var r=a.findIndex(function(t){return t.name===e});r>-1&&(a.splice(r,1),n=!0)}else this._instances.set(t,[]),n=!0;0===(null===(i=this._instances.get(t))||void 0===i?void 0:i.length)&&this._instances.delete(t)}return n},t.prototype.hasInstances=function(t){return this._instances.has(t)},t.prototype.calcInstance=function(t,e){return j(this,void 0,void 0,function(){var i,n,a,r,o=this;return U(this,function(s){switch(s.label){case 0:return i=[],Mt(t)?Mt(e)?(n=this._instances.get(e),At(n)&&(a=n.find(function(e){return e.name===t}),At(a)&&i.push(a.calcIndicator(this._chartStore.getDataList())))):this._instances.forEach(function(e){var n=e.find(function(e){return e.name===t});At(n)&&i.push(n.calcIndicator(o._chartStore.getDataList()))}):this._instances.forEach(function(t){t.forEach(function(t){i.push(t.calcIndicator(o._chartStore.getDataList()))})}),[4,Promise.all(i)];case 1:return r=s.sent(),[2,r.includes(!0)]}})})},t.prototype.getInstanceByPaneId=function(t,e){var i,n,a=function(t){var e=new Map;return t.forEach(function(t){e.set(t.name,t)}),e};if(Mt(t)){var r=null!==(i=this._instances.get(t))&&void 0!==i?i:[];return Mt(e)?null!==(n=null===r||void 0===r?void 0:r.find(function(t){return t.name===e}))&&void 0!==n?n:null:a(r)}var o=new Map;return this._instances.forEach(function(t,e){o.set(e,a(t))}),o},t.prototype.synchronizeSeriesPrecision=function(t){var e=this._chartStore.getPrecision(),i=e.price,n=e.volume,a=function(t){switch(t.series){case Xt.Price:t.setPrecision(i,!0);break;case Xt.Volume:t.setPrecision(n,!0);break}};At(t)?a(t):this._instances.forEach(function(t){t.forEach(function(t){a(t)})})},t.prototype.override=function(t,e){return j(this,void 0,void 0,function(){var i,n,a,r,o,s,l,c=this;return U(this,function(u){switch(u.label){case 0:return i=t.name,n=new Map,null!==e?(a=this._instances.get(e),At(a)&&n.set(e,a)):n=this._instances,r=!1,o=[],s=!1,n.forEach(function(e){var n=e.find(function(t){return t.name===i});if(At(n)){var a=c._overrideInstance(n,t);a[2]&&(s=!0),a[1]?o.push(n.calcIndicator(c._chartStore.getDataList())):a[0]&&(r=!0)}}),s&&this._sort(),[4,Promise.all(o)];case 1:return l=u.sent(),[2,[r,l.includes(!0)]]}})})},t}(),si=function(){function t(t){this._crosshair={},this._activeIcon=null,this._chartStore=t}return t.prototype.setCrosshair=function(t,e){var i,n,a=null!==e&&void 0!==e?e:{},r=a.notInvalidate,o=a.notExecuteAction,s=this._chartStore.getDataList(),l=null!==t&&void 0!==t?t:{};Et(l.x)?(i=this._chartStore.getTimeScaleStore().coordinateToDataIndex(l.x),n=i<0?0:i>s.length-1?s.length-1:i):(i=s.length-1,n=i);var c=s[n],u=this._chartStore.getTimeScaleStore().dataIndexToCoordinate(i),d={x:this._crosshair.x,y:this._crosshair.y,paneId:this._crosshair.paneId};this._crosshair=K(K({},l),{realX:u,kLineData:c,realDataIndex:i,dataIndex:n}),d.x===l.x&&d.y===l.y&&d.paneId===l.paneId||(null===c||null!==o&&void 0!==o&&o||this._chartStore.getChart().crosshairChange(this._crosshair),null!==r&&void 0!==r&&r||this._chartStore.getChart().updatePane(1))},t.prototype.recalculateCrosshair=function(t){this.setCrosshair(this._crosshair,{notInvalidate:t})},t.prototype.getCrosshair=function(){return this._crosshair},t.prototype.setActiveIcon=function(t){this._activeIcon=null!==t&&void 0!==t?t:null},t.prototype.getActiveIcon=function(){return this._activeIcon},t.prototype.clear=function(){this.setCrosshair({},{notInvalidate:!0}),this.setActiveIcon()},t}(),li={name:"fibonacciLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e,i=t.coordinates,n=t.bounding,a=t.overlay,r=t.precision,o=t.thousandsSeparator,s=t.decimalFoldThreshold,l=t.yAxis,c=a.points;if(i.length>0){var u=null===(e=null===l||void 0===l?void 0:l.isInCandle())||void 0===e||e?r.price:r.excludePriceVolumeMax,d=[],h=[],p=0,v=n.width;if(i.length>1&&Et(c[0].value)&&Et(c[1].value)){var f=[1,.786,.618,.5,.382,.236,0],g=i[0].y-i[1].y,m=c[0].value-c[1].value;f.forEach(function(t){var e,n=i[1].y+g*t,a=Vt(zt(((null!==(e=c[1].value)&&void 0!==e?e:0)+m*t).toFixed(u),o),s);d.push({coordinates:[{x:p,y:n},{x:v,y:n}]}),h.push({x:p,y:n,text:"".concat(a," (").concat((100*t).toFixed(1),"%)"),baseline:"bottom"})})}return[{type:"line",attrs:d},{type:"text",isCheckEvent:!1,attrs:h}]}return[]}},ci={name:"horizontalRayLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates,i=t.bounding,n={x:0,y:e[0].y};return At(e[1])&&e[0].x-1)for(var a=n;a>-1;a--)if(this._children[a].dispatchEvent(t,e,i))return!0;return this.onEvent(t,e,i)},t.prototype.addChild=function(t){return this._children.push(t),this},t.prototype.clear=function(){this._children=[]},t}(),pi=2,vi=function(t){function e(e){var i=t.call(this)||this;return i.attrs=e.attrs,i.styles=e.styles,i}return L(e,t),e.prototype.checkEventOn=function(t){return this.checkEventOnImp(t,this.attrs,this.styles)},e.prototype.setAttrs=function(t){return this.attrs=t,this},e.prototype.setStyles=function(t){return this.styles=t,this},e.prototype.draw=function(t){this.drawImp(t,this.attrs,this.styles)},e.extend=function(t){var i=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return L(i,e),i.prototype.checkEventOnImp=function(e,i,n){return t.checkEventOn(e,i,n)},i.prototype.drawImp=function(e,i,n){t.draw(e,i,n)},i}(e);return i},e}(hi);function fi(t,e){var i=[];i=i.concat(e);for(var n=0;n1)for(var r=1;r0&&i<1?i:0:i?.5:0;if(a>0&&n>2){for(var r=e[0].x,o=e[0].y,s=1;s1&&(2!==i.length||i[0].x!==i[1].x&&i[0].y!==i[1].y?(t.save(),c%2===1&&t.translate(.5,.5),t.beginPath(),t.moveTo(i[0].x,i[0].y),_i(t,i,s),t.stroke(),t.closePath(),t.restore()):(t.beginPath(),i[0].x===i[1].x?(t.moveTo(i[0].x+v,i[0].y),t.lineTo(i[1].x+v,i[1].y)):(t.moveTo(i[0].x,i[0].y+v),t.lineTo(i[1].x,i[1].y+v)),t.stroke(),t.closePath()))})}var xi={name:"line",checkEventOn:fi,draw:function(t,e,i){bi(t,e,i)}};function wi(t,e,i){var n=null!==i&&void 0!==i?i:0,a=[];if(t.length>1)if(t[0].x===t[1].x){var r=0,o=e.height;if(a.push({coordinates:[{x:t[0].x,y:r},{x:t[0].x,y:o}]}),t.length>2){a.push({coordinates:[{x:t[2].x,y:r},{x:t[2].x,y:o}]});for(var s=t[0].x-t[2].x,l=0;l2){var f=t[2].y-p*t[2].x;a.push({coordinates:[{x:u,y:u*p+f},{x:d,y:d*p+f}]});for(s=v-f,l=0;l1){var i=void 0;return i=t[0].x===t[1].x&&t[0].y!==t[1].y?t[0].yt[1].x?{x:0,y:mi(t[0],t[1],{x:0,y:t[0].y})}:{x:e.width,y:mi(t[0],t[1],{x:e.width,y:t[0].y})},{coordinates:[t[0],i]}}return[]}var Ei={name:"rayLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates,i=t.bounding;return[{type:"line",attrs:Ii(e,i)}]}},Ai={name:"segment",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates;return 2===e.length?[{type:"line",attrs:{coordinates:e}}]:[]}},Pi={name:"straightLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates,i=t.bounding;return 2===e.length?e[0].x===e[1].x?[{type:"line",attrs:{coordinates:[{x:e[0].x,y:0},{x:e[0].x,y:i.height}]}}]:[{type:"line",attrs:{coordinates:[{x:0,y:mi(e[0],e[1],{x:0,y:e[0].y})},{x:i.width,y:mi(e[0],e[1],{x:i.width,y:e[0].y})}]}}]:[]}},Mi={name:"verticalRayLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates,i=t.bounding;if(2===e.length){var n={x:e[0].x,y:0};return e[0].y0&&l.set(e[0],n)};try{for(var u=G(this._instances),d=u.next();!d.done;d=u.next()){var h=d.value;c(h)}}catch(v){e={error:v}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(e)throw e.error}}this._instances=l}else this._instances.forEach(function(t,e){r.push(e),t.forEach(function(t){var e;null===(e=t.onRemoved)||void 0===e||e.call(t,{overlay:t})})}),this._instances.clear();if(r.length>0){var p=this._chartStore.getChart();r.forEach(function(t){p.updatePane(1,t)}),p.updatePane(1,Wi.X_AXIS)}},t.prototype.setPressedInstanceInfo=function(t){this._pressedInstanceInfo=t},t.prototype.getPressedInstanceInfo=function(){return this._pressedInstanceInfo},t.prototype.updatePointPosition=function(t,e){if(t>0){var i=this._chartStore.getDataList();this._instances.forEach(function(n){n.forEach(function(n){var a=n.points;a.forEach(function(n){if(!At(n.timestamp)&&At(n.dataIndex)){e===Yt.Forward&&(n.dataIndex=n.dataIndex+t);var a=i[n.dataIndex];n.timestamp=null===a||void 0===a?void 0:a.timestamp}})})})}},t.prototype.setHoverInstanceInfo=function(t,e){var i,n,a=this._hoverInstanceInfo,r=a.instance,o=a.figureType,s=a.figureKey,l=a.figureIndex;if(((null===r||void 0===r?void 0:r.id)!==(null===(i=t.instance)||void 0===i?void 0:i.id)||o!==t.figureType||l!==t.figureIndex)&&(this._hoverInstanceInfo=t,(null===r||void 0===r?void 0:r.id)!==(null===(n=t.instance)||void 0===n?void 0:n.id))){var c=!1,u=!1;null!==r&&(u=!0,kt(r.onMouseLeave)&&(r.onMouseLeave(K({overlay:r,figureKey:s,figureIndex:l},e)),c=!0)),null!==t.instance&&(u=!0,kt(t.instance.onMouseEnter)&&(t.instance.onMouseEnter(K({overlay:t.instance,figureKey:t.figureKey,figureIndex:t.figureIndex},e)),c=!0)),u&&this._sort(),c||this._chartStore.getChart().updatePane(1)}},t.prototype.getHoverInstanceInfo=function(){return this._hoverInstanceInfo},t.prototype.setClickInstanceInfo=function(t,e){var i,n,a,r,o,s,l,c,u,d=this._clickInstanceInfo,h=d.paneId,p=d.instance,v=d.figureType,f=d.figureKey,g=d.figureIndex;if(null!==(n=null===(i=t.instance)||void 0===i?void 0:i.isDrawing())&&void 0!==n&&n||null===(r=null===(a=t.instance)||void 0===a?void 0:a.onClick)||void 0===r||r.call(a,K({overlay:t.instance,figureKey:t.figureKey,figureIndex:t.figureIndex},e)),((null===p||void 0===p?void 0:p.id)!==(null===(o=t.instance)||void 0===o?void 0:o.id)||v!==t.figureType||g!==t.figureIndex)&&(this._clickInstanceInfo=t,(null===p||void 0===p?void 0:p.id)!==(null===(s=t.instance)||void 0===s?void 0:s.id))){null===(l=null===p||void 0===p?void 0:p.onDeselected)||void 0===l||l.call(p,K({overlay:p,figureKey:f,figureIndex:g},e)),null===(u=null===(c=t.instance)||void 0===c?void 0:c.onSelected)||void 0===u||u.call(c,K({overlay:t.instance,figureKey:t.figureKey,figureIndex:t.figureIndex},e));var m=this._chartStore.getChart();m.updatePane(1,t.paneId),h!==t.paneId&&m.updatePane(1,h),m.updatePane(1,Wi.X_AXIS)}},t.prototype.getClickInstanceInfo=function(){return this._clickInstanceInfo},t.prototype.isEmpty=function(){return 0===this._instances.size&&null===this._progressInstanceInfo},t.prototype.isDrawing=function(){var t,e;return null!==this._progressInstanceInfo&&null!==(e=null===(t=this._progressInstanceInfo)||void 0===t?void 0:t.instance.isDrawing())&&void 0!==e&&e},t}(),$i=function(){function t(){this._actions=new Map}return t.prototype.execute=function(t,e){var i;null===(i=this._actions.get(t))||void 0===i||i.execute(e)},t.prototype.subscribe=function(t,e){var i;this._actions.has(t)||this._actions.set(t,new Kt),null===(i=this._actions.get(t))||void 0===i||i.subscribe(e)},t.prototype.unsubscribe=function(t,e){var i=this._actions.get(t);At(i)&&(i.unsubscribe(e),i.isEmpty()&&this._actions.delete(t))},t.prototype.has=function(t){var e=this._actions.get(t);return At(e)&&!e.isEmpty()},t}(),Yi={grid:{horizontal:{color:"#EDEDED"},vertical:{color:"#EDEDED"}},candle:{priceMark:{high:{color:"#76808F"},low:{color:"#76808F"}},tooltip:{rect:{color:"#FEFEFE",borderColor:"#F2F3F5"},text:{color:"#76808F"}}},indicator:{tooltip:{text:{color:"#76808F"}}},xAxis:{axisLine:{color:"#DDDDDD"},tickText:{color:"#76808F"},tickLine:{color:"#DDDDDD"}},yAxis:{axisLine:{color:"#DDDDDD"},tickText:{color:"#76808F"},tickLine:{color:"#DDDDDD"}},separator:{color:"#DDDDDD"},crosshair:{horizontal:{line:{color:"#76808F"},text:{borderColor:"#686D76",backgroundColor:"#686D76"}},vertical:{line:{color:"#76808F"},text:{borderColor:"#686D76",backgroundColor:"#686D76"}}}},Xi={grid:{horizontal:{color:"#292929"},vertical:{color:"#292929"}},candle:{priceMark:{high:{color:"#929AA5"},low:{color:"#929AA5"}},tooltip:{rect:{color:"rgba(10, 10, 10, .6)",borderColor:"rgba(10, 10, 10, .6)"},text:{color:"#929AA5"}}},indicator:{tooltip:{text:{color:"#929AA5"}}},xAxis:{axisLine:{color:"#333333"},tickText:{color:"#929AA5"},tickLine:{color:"#333333"}},yAxis:{axisLine:{color:"#333333"},tickText:{color:"#929AA5"},tickLine:{color:"#333333"}},separator:{color:"#333333"},crosshair:{horizontal:{line:{color:"#929AA5"},text:{borderColor:"#373a40",backgroundColor:"#373a40"}},vertical:{line:{color:"#929AA5"},text:{borderColor:"#373a40",backgroundColor:"#373a40"}}}},Ki={light:Yi,dark:Xi};function ji(t){var e;return null!==(e=Ki[t])&&void 0!==e?e:null}var Ui=function(){function t(t,e){this._styles=gt(),this._customApi=ne(),this._locale=ae,this._precision={price:2,volume:0},this._thousandsSeparator=",",this._decimalFoldThreshold=3,this._dataList=[],this._loadMoreCallback=null,this._loadDataCallback=null,this._loading=!0,this._forwardMore=!0,this._backwardMore=!0,this._timeScaleStore=new Ie(this),this._indicatorStore=new oi(this),this._overlayStore=new Hi(this),this._tooltipStore=new si(this),this._actionStore=new $i,this._visibleDataList=[],this._chart=t,this.setOptions(e)}return t.prototype.adjustVisibleDataList=function(){this._visibleDataList=[];for(var t=this._timeScaleStore.getVisibleRange(),e=t.realFrom,i=t.realTo,n=e;n0&&(this._decimalFoldThreshold=u)}return this},t.prototype.getStyles=function(){return this._styles},t.prototype.getLocale=function(){return this._locale},t.prototype.getCustomApi=function(){return this._customApi},t.prototype.getThousandsSeparator=function(){return this._thousandsSeparator},t.prototype.getDecimalFoldThreshold=function(){return this._decimalFoldThreshold},t.prototype.getPrecision=function(){return this._precision},t.prototype.setPrecision=function(t){return this._precision=t,this._indicatorStore.synchronizeSeriesPrecision(),this},t.prototype.getDataList=function(){return this._dataList},t.prototype.getVisibleFirstData=function(){var t,e=this._timeScaleStore.getVisibleRange().from;return null!==(t=this._dataList[e])&&void 0!==t?t:null},t.prototype.getVisibleDataList=function(){return this._visibleDataList},t.prototype.addData=function(t,e,i){return j(this,void 0,void 0,function(){var n,a,r,o,s,l,c;return U(this,function(u){switch(u.label){case 0:if(n=!1,a=!1,r=0,Ct(t)){switch(r=t.length,e){case Yt.Init:this.clear(),this._dataList=t,this._forwardMore=null===i||void 0===i||i,this._timeScaleStore.resetOffsetRightDistance(),a=!0;break;case Yt.Backward:this._dataList=this._dataList.concat(t),this._backwardMore=null!==i&&void 0!==i&&i,a=r>0;break;case Yt.Forward:this._dataList=t.concat(this._dataList),this._forwardMore=null!==i&&void 0!==i&&i,a=r>0}this._loading=!1,n=!0}else o=this._dataList.length,s=t.timestamp,l=Rt(this._dataList[o-1],"timestamp",0),s>l?(this._dataList.push(t),c=this._timeScaleStore.getLastBarRightSideDiffBarCount(),c<0&&this._timeScaleStore.setLastBarRightSideDiffBarCount(--c),r=1,n=!0,a=!0):s===l&&(this._dataList[o-1]=t,n=!0,a=!0);if(!n)return[3,5];u.label=1;case 1:return u.trys.push([1,4,,5]),this._overlayStore.updatePointPosition(r,e),a?(this._timeScaleStore.adjustVisibleRange(),this._tooltipStore.recalculateCrosshair(!0),[4,this._indicatorStore.calcInstance()]):[3,3];case 2:u.sent(),this._chart.adjustPaneViewport(!1,!0,!0,!0),u.label=3;case 3:return this._actionStore.execute(Tt.OnDataReady),[3,5];case 4:return u.sent(),[3,5];case 5:return[2]}})})},t.prototype.setLoadMoreCallback=function(t){this._loadMoreCallback=t},t.prototype.executeLoadMoreCallback=function(t){this._forwardMore&&!this._loading&&At(this._loadMoreCallback)&&(this._loading=!0,this._loadMoreCallback(t))},t.prototype.setLoadDataCallback=function(t){this._loadDataCallback=t},t.prototype.executeLoadDataCallback=function(t){var e=this;if(!this._loading&&At(this._loadDataCallback)&&(this._forwardMore&&t.type===Yt.Forward||this._backwardMore&&t.type===Yt.Backward)){var i=function(i,n){e.addData(i,t.type,n).then(function(){}).catch(function(){})};this._loading=!0,this._loadDataCallback(K(K({},t),{callback:i}))}},t.prototype.clear=function(){this._forwardMore=!0,this._backwardMore=!0,this._loading=!0,this._dataList=[],this._visibleDataList=[],this._timeScaleStore.clear(),this._tooltipStore.clear()},t.prototype.getTimeScaleStore=function(){return this._timeScaleStore},t.prototype.getIndicatorStore=function(){return this._indicatorStore},t.prototype.getOverlayStore=function(){return this._overlayStore},t.prototype.getTooltipStore=function(){return this._tooltipStore},t.prototype.getActionStore=function(){return this._actionStore},t.prototype.getChart=function(){return this._chart},t}(),Gi={MAIN:"main",X_AXIS:"xAxis",Y_AXIS:"yAxis",SEPARATOR:"separator"},Zi=7;function qi(){return j(this,void 0,void 0,function(){return U(this,function(t){switch(t.label){case 0:return[4,new Promise(function(t){var e=new ResizeObserver(function(i){t(i.every(function(t){return"devicePixelContentBoxSize"in t})),e.disconnect()});e.observe(document.body,{box:"device-pixel-content-box"})}).catch(function(){return!1})];case 1:return[2,t.sent()]}})})}var Ji=function(){function t(t,e){var i=this;this._supportedDevicePixelContentBox=!1,this._width=0,this._height=0,this._pixelWidth=0,this._pixelHeight=0,this._nextPixelWidth=0,this._nextPixelHeight=0,this._requestAnimationId=re,this._mediaQueryListener=function(){var t=Wt(i._element);i._nextPixelWidth=Math.round(i._element.clientWidth*t),i._nextPixelHeight=Math.round(i._element.clientHeight*t),i._resetPixelRatio()},this._listener=e,this._element=he("canvas",t),this._ctx=this._element.getContext("2d",{willReadFrequently:!0}),qi().then(function(t){i._supportedDevicePixelContentBox=t,t?(i._resizeObserver=new ResizeObserver(function(t){var e,n=t.find(function(t){return t.target===i._element}),a=null===(e=null===n||void 0===n?void 0:n.devicePixelContentBoxSize)||void 0===e?void 0:e[0];At(a)&&(i._nextPixelWidth=a.inlineSize,i._nextPixelHeight=a.blockSize,i._pixelWidth===i._nextPixelWidth&&i._pixelHeight===i._nextPixelHeight||i._resetPixelRatio())}),i._resizeObserver.observe(i._element,{box:"device-pixel-content-box"})):(i._mediaQueryList=window.matchMedia("(resolution: ".concat(Wt(i._element),"dppx)")),i._mediaQueryList.addListener(i._mediaQueryListener))}).catch(function(t){return!1})}return t.prototype._resetPixelRatio=function(){var t=this;this._executeListener(function(){var e=t._element.clientWidth,i=t._element.clientHeight,n=t._nextPixelWidth/e,a=t._nextPixelHeight/i;t._width=e,t._height=i,t._pixelWidth=t._nextPixelWidth,t._pixelHeight=t._nextPixelHeight,t._element.width=t._nextPixelWidth,t._element.height=t._nextPixelHeight,t._ctx.scale(n,a)})},t.prototype._executeListener=function(t){var e=this;this._requestAnimationId===re&&(this._requestAnimationId=oe(function(){e._ctx.clearRect(0,0,e._width,e._height),null===t||void 0===t||t(),e._listener(),e._requestAnimationId=re}))},t.prototype.update=function(t,e){if(this._width!==t||this._height!==e){if(this._element.style.width="".concat(t,"px"),this._element.style.height="".concat(e,"px"),!this._supportedDevicePixelContentBox){var i=Wt(this._element);this._nextPixelWidth=Math.round(t*i),this._nextPixelHeight=Math.round(e*i),this._resetPixelRatio()}}else this._executeListener()},t.prototype.getElement=function(){return this._element},t.prototype.getContext=function(){return this._ctx},t.prototype.destroy=function(){At(this._resizeObserver)&&this._resizeObserver.unobserve(this._element),At(this._mediaQueryList)&&this._mediaQueryList.removeListener(this._mediaQueryListener)},t}();function Qi(t){var e={width:0,height:0,left:0,right:0,top:0,bottom:0};return At(t)&&wt(e,t),e}var tn=function(t){function e(e,i){var n=t.call(this)||this;return n._bounding=Qi(),n._pane=i,n._rootContainer=e,n._container=n.createContainer(),e.appendChild(n._container),n}return L(e,t),e.prototype.setBounding=function(t){return wt(this._bounding,t),this},e.prototype.getContainer=function(){return this._container},e.prototype.getBounding=function(){return this._bounding},e.prototype.getPane=function(){return this._pane},e.prototype.update=function(t){this.updateImp(this._container,this._bounding,null!==t&&void 0!==t?t:3)},e.prototype.destroy=function(){this._rootContainer.removeChild(this._container)},e}(hi),en=function(t){function e(e,i){var n=t.call(this,e,i)||this;n._mainCanvas=new Ji({position:"absolute",top:"0",left:"0",zIndex:"2",boxSizing:"border-box"},function(){n.updateMain(n._mainCanvas.getContext())}),n._overlayCanvas=new Ji({position:"absolute",top:"0",left:"0",zIndex:"2",boxSizing:"border-box"},function(){n.updateOverlay(n._overlayCanvas.getContext())});var a=n.getContainer();return a.appendChild(n._mainCanvas.getElement()),a.appendChild(n._overlayCanvas.getElement()),n}return L(e,t),e.prototype.createContainer=function(){return he("div",{margin:"0",padding:"0",position:"absolute",top:"0",overflow:"hidden",boxSizing:"border-box",zIndex:"1"})},e.prototype.updateImp=function(t,e,i){var n=e.width,a=e.height,r=e.left;t.style.left="".concat(r,"px");var o=i,s=t.clientWidth,l=t.clientHeight;switch(n===s&&a===l||(t.style.width="".concat(n,"px"),t.style.height="".concat(a,"px"),o=3),o){case 0:this._mainCanvas.update(n,a);break;case 1:this._overlayCanvas.update(n,a);break;case 3:case 4:this._mainCanvas.update(n,a),this._overlayCanvas.update(n,a);break}},e.prototype.destroy=function(){this._mainCanvas.destroy(),this._overlayCanvas.destroy()},e.prototype.getImage=function(t){var e=this.getBounding(),i=e.width,n=e.height,a=he("canvas",{width:"".concat(i,"px"),height:"".concat(n,"px"),boxSizing:"border-box"}),r=a.getContext("2d"),o=Wt(a);return a.width=i*o,a.height=n*o,r.scale(o,o),r.drawImage(this._mainCanvas.getElement(),0,0,i,n),t&&r.drawImage(this._overlayCanvas.getElement(),0,0,i,n),a},e}(tn);function nn(t){return"transparent"===t||"none"===t||/^[rR][gG][Bb][Aa]\(([\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\s]*,){3}[\s]*0[\s]*\)$/.test(t)||/^[hH][Ss][Ll][Aa]\(([\s]*(360|3[0-5][0-9]|[012]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,){2}([\s]*0[\s]*)\)$/.test(t)}function an(t,e){var i=[];i=i.concat(e);for(var n=0;ns*s))return!0}return!1}function rn(t,e,i){var n=[];n=n.concat(e);var a=i.style,r=void 0===a?O.Fill:a,o=i.color,s=void 0===o?"currentColor":o,l=i.borderSize,c=void 0===l?1:l,u=i.borderColor,d=void 0===u?"currentColor":u,h=i.borderStyle,p=void 0===h?N.Solid:h,v=i.borderDashedValue,f=void 0===v?[2,2]:v,g=(r===O.Fill||i.style===O.StrokeFill)&&(!Mt(s)||!nn(s));g&&(t.fillStyle=s,n.forEach(function(e){var i=e.x,n=e.y,a=e.r;t.beginPath(),t.arc(i,n,a,0,2*Math.PI),t.closePath(),t.fill()})),(r===O.Stroke||i.style===O.StrokeFill)&&c>0&&!nn(d)&&(t.strokeStyle=d,t.lineWidth=c,p===N.Dashed?t.setLineDash(f):t.setLineDash([]),n.forEach(function(e){var i=e.x,n=e.y,a=e.r;(!g||a>c)&&(t.beginPath(),t.arc(i,n,a,0,2*Math.PI),t.closePath(),t.stroke())}))}var on={name:"circle",checkEventOn:an,draw:function(t,e,i){rn(t,e,i)}};function sn(t,e){var i=[];i=i.concat(e);for(var n=0;nt.y!==r[s].y>t.y&&t.x<(r[s].x-r[o].x)*(t.y-r[o].y)/(r[s].y-r[o].y)+r[o].x&&(a=!a);if(a)return!0}return!1}function ln(t,e,i){var n=[];n=n.concat(e);var a=i.style,r=void 0===a?O.Fill:a,o=i.color,s=void 0===o?"currentColor":o,l=i.borderSize,c=void 0===l?1:l,u=i.borderColor,d=void 0===u?"currentColor":u,h=i.borderStyle,p=void 0===h?N.Solid:h,v=i.borderDashedValue,f=void 0===v?[2,2]:v;r!==O.Fill&&i.style!==O.StrokeFill||Mt(s)&&nn(s)||(t.fillStyle=s,n.forEach(function(e){var i=e.coordinates;t.beginPath(),t.moveTo(i[0].x,i[0].y);for(var n=1;n0&&!nn(d)&&(t.strokeStyle=d,t.lineWidth=c,p===N.Dashed?t.setLineDash(f):t.setLineDash([]),n.forEach(function(e){var i=e.coordinates;t.beginPath(),t.moveTo(i[0].x,i[0].y);for(var n=1;n=r&&t.x<=r+o&&t.y>=s&&t.y<=s+l)return!0}return!1}function dn(t,e,i){var n,a=[];a=a.concat(e);var r=i.style,o=void 0===r?O.Fill:r,s=i.color,l=void 0===s?"transparent":s,c=i.borderSize,u=void 0===c?1:c,d=i.borderColor,h=void 0===d?"transparent":d,p=i.borderStyle,v=void 0===p?N.Solid:p,f=i.borderRadius,g=void 0===f?0:f,m=i.borderDashedValue,y=void 0===m?[2,2]:m,_=null!==(n=t.roundRect)&&void 0!==n?n:t.rect,b=(o===O.Fill||i.style===O.StrokeFill)&&(!Mt(l)||!nn(l));if(b&&(t.fillStyle=l,a.forEach(function(e){var i=e.x,n=e.y,a=e.width,r=e.height;t.beginPath(),_.call(t,i,n,a,r,g),t.closePath(),t.fill()})),(o===O.Stroke||i.style===O.StrokeFill)&&u>0&&!nn(h)){t.strokeStyle=h,t.fillStyle=h,t.lineWidth=u,v===N.Dashed?t.setLineDash(y):t.setLineDash([]);var x=u%2===1?.5:0,w=Math.round(2*x);a.forEach(function(e){var i=e.x,n=e.y,a=e.width,r=e.height;a>2*u&&r>2*u?(t.beginPath(),_.call(t,i+x,n+x,a-w,r-w,g),t.closePath(),t.stroke()):b||t.fillRect(i,n,a,r)})}}var hn={name:"rect",checkEventOn:un,draw:function(t,e,i){dn(t,e,i)}};function pn(t,e){var i,n,a=e.size,r=void 0===a?12:a,o=e.paddingLeft,s=void 0===o?0:o,l=e.paddingTop,c=void 0===l?0:l,u=e.paddingRight,d=void 0===u?0:u,h=e.paddingBottom,p=void 0===h?0:h,v=e.weight,f=void 0===v?"normal":v,g=e.family,m=t.x,y=t.y,_=t.text,b=t.align,x=void 0===b?"left":b,w=t.baseline,S=void 0===w?"top":w,C=t.width,k=t.height,I=null!==C&&void 0!==C?C:s+$t(_,r,f,g)+d,E=null!==k&&void 0!==k?k:c+r+p;switch(x){case"left":case"start":i=m;break;case"right":case"end":i=m-I;break;default:i=m-I/2;break}switch(S){case"top":case"hanging":n=y;break;case"bottom":case"ideographic":case"alphabetic":n=y-E;break;default:n=y-E/2;break}return{x:i,y:n,width:I,height:E}}function vn(t,e,i){var n=[];n=n.concat(e);for(var a=0;a=o&&t.x<=o+l&&t.y>=s&&t.y<=s+c)return!0}return!1}function fn(t,e,i){var n=[];n=n.concat(e);var a=i.color,r=void 0===a?"currentColor":a,o=i.size,s=void 0===o?12:o,l=i.family,c=i.weight,u=i.paddingLeft,d=void 0===u?0:u,h=i.paddingTop,p=void 0===h?0:h,v=i.paddingRight,f=void 0===v?0:v,g=n.map(function(t){return pn(t,i)});dn(t,g,K(K({},i),{color:i.backgroundColor})),t.textAlign="left",t.textBaseline="top",t.font=Ht(s,c,l),t.fillStyle=r,n.forEach(function(e,i){var n=g[i];t.fillText(e.text,n.x+d,n.y+p,n.width-d-f)})}var gn={name:"text",checkEventOn:vn,draw:function(t,e,i){fn(t,e,i)}},mn=gn;function yn(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}function _n(t,e){var i=[];i=i.concat(e);for(var n=0;n=Math.min(l,u)-pi&&t.y<=Math.max(c,d)+pi&&t.y>=Math.min(c,d)-pi)return!0}}return!1}function bn(t,e,i){var n=[];n=n.concat(e);var a=i.style,r=void 0===a?N.Solid:a,o=i.size,s=void 0===o?1:o,l=i.color,c=void 0===l?"currentColor":l,u=i.dashedValue,d=void 0===u?[2,2]:u;t.lineWidth=s,t.strokeStyle=c,r===N.Dashed?t.setLineDash(d):t.setLineDash([]),n.forEach(function(e){var i=e.x,n=e.y,a=e.r,r=e.startAngle,o=e.endAngle;t.beginPath(),t.arc(i,n,a,r,o),t.stroke(),t.closePath()})}var xn={name:"arc",checkEventOn:_n,draw:function(t,e,i){bn(t,e,i)}},wn={},Sn=[on,xi,cn,hn,gn,mn,xn];function Cn(t){var e;return null!==(e=wn[t])&&void 0!==e?e:null}Sn.forEach(function(t){wn[t.name]=vi.extend(t)});var kn=function(t){function e(e){var i=t.call(this)||this;return i._widget=e,i}return L(e,t),e.prototype.getWidget=function(){return this._widget},e.prototype.createFigure=function(t,e){var i=Cn(t.name);if(null!==i){var n=new i(t);if(At(e)){for(var a in e)e.hasOwnProperty(a)&&n.registerEvent(a,e[a]);this.addChild(n)}return n}return null},e.prototype.draw=function(t){this.clear(),this.drawImp(t)},e}(hi),In=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.drawImp=function(t){var e,i,n=this.getWidget(),a=this.getWidget().getPane(),r=a.getChart(),o=n.getBounding(),s=r.getStyles().grid,l=s.show;if(l){t.save(),t.globalCompositeOperation="destination-over";var c=s.horizontal,u=c.show;if(u){var d=a.getAxisComponent(),h=d.getTicks().map(function(t){return{coordinates:[{x:0,y:t.coord},{x:o.width,y:t.coord}]}});null===(e=this.createFigure({name:"line",attrs:h,styles:c}))||void 0===e||e.draw(t)}var p=s.vertical,v=p.show;if(v){var f=r.getXAxisPane().getAxisComponent();h=f.getTicks().map(function(t){return{coordinates:[{x:t.coord,y:0},{x:t.coord,y:o.height}]}});null===(i=this.createFigure({name:"line",attrs:h,styles:p}))||void 0===i||i.draw(t)}t.restore()}},e}(kn),En=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.eachChildren=function(t){var e=this.getWidget().getPane(),i=e.getChart().getChartStore(),n=i.getVisibleDataList(),a=i.getTimeScaleStore().getBarSpace();n.forEach(function(e,i){t(e,a,i)})},e}(kn),An=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._boundCandleBarClickEvent=function(t){return function(){return e.getWidget().getPane().getChart().getChartStore().getActionStore().execute(Tt.OnCandleBarClick,t),!1}},e}return L(e,t),e.prototype.drawImp=function(t){var e=this,i=this.getWidget().getPane(),n=i.getId()===Wi.CANDLE,a=i.getChart().getChartStore(),r=this.getCandleBarOptions(a);if(null!==r){var o=0,s=0;if(r.type===$.Ohlc){var l=a.getTimeScaleStore().getBarSpace().gapBar;o=Math.min(Math.max(Math.round(.2*l),1),8),o>2&&o%2===1&&o--,s=Math.floor(s/2)}var c=i.getAxisComponent();this.eachChildren(function(i,a){var l=i.data,u=i.x;if(At(l)){var d=l.open,h=l.high,p=l.low,v=l.close,f=r.type,g=r.styles,m=[];v>d?(m[0]=g.upColor,m[1]=g.upBorderColor,m[2]=g.upWickColor):vd?e._createStrokeBar(u,b,a,m):e._createSolidBar(u,b,a,m);break;case $.CandleDownStroke:x=d>v?e._createStrokeBar(u,b,a,m):e._createSolidBar(u,b,a,m);break;case $.Ohlc:x=[{name:"rect",attrs:[{x:u-s,y:b[0],width:o,height:b[3]-b[0]},{x:u-a.halfGapBar,y:y+o>b[3]?b[3]-o:y,width:a.halfGapBar,height:o},{x:u+s,y:_+o>b[3]?b[3]-o:_,width:a.halfGapBar-s,height:o}],styles:{color:m[0]}}];break}x.forEach(function(a){var r,o;n&&(o={mouseClickEvent:e._boundCandleBarClickEvent(i)}),null===(r=e.createFigure(a,o))||void 0===r||r.draw(t)})}})}},e.prototype.getCandleBarOptions=function(t){var e=t.getStyles().candle;return{type:e.type,styles:e.bar}},e.prototype._createSolidBar=function(t,e,i,n){return[{name:"rect",attrs:{x:t,y:e[0],width:1,height:e[3]-e[0]},styles:{color:n[2]}},{name:"rect",attrs:{x:t-i.halfGapBar,y:e[1],width:i.gapBar,height:Math.max(1,e[2]-e[1])},styles:{style:O.StrokeFill,color:n[0],borderColor:n[1]}}]},e.prototype._createStrokeBar=function(t,e,i,n){return[{name:"rect",attrs:[{x:t,y:e[0],width:1,height:e[1]-e[0]},{x:t,y:e[2],width:1,height:e[3]-e[2]}],styles:{color:n[2]}},{name:"rect",attrs:{x:t-i.halfGapBar,y:e[1],width:i.gapBar,height:Math.max(1,e[2]-e[1])},styles:{style:O.Stroke,borderColor:n[1]}}]},e}(En),Pn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.getCandleBarOptions=function(t){var e,i,n=this.getWidget().getPane(),a=n.getAxisComponent();if(!a.isInCandle()){var r=t.getIndicatorStore().getInstances(n.getId());try{for(var o=G(r),s=o.next();!s.done;s=o.next()){var l=s.value;if(l.shouldOhlc&&l.visible){var c=l.styles,u=t.getStyles().indicator,d=Rt(c,"ohlc.upColor",u.ohlc.upColor),h=Rt(c,"ohlc.downColor",u.ohlc.downColor),p=Rt(c,"ohlc.noChangeColor",u.ohlc.noChangeColor);return{type:$.Ohlc,styles:{upColor:d,downColor:h,noChangeColor:p,upBorderColor:d,downBorderColor:h,noChangeBorderColor:p,upWickColor:d,downWickColor:h,noChangeWickColor:p}}}}}catch(v){e={error:v}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(e)throw e.error}}}return null},e.prototype.drawImp=function(e){var i=this;t.prototype.drawImp.call(this,e);var n=this.getWidget(),a=n.getPane(),r=a.getChart(),o=n.getBounding(),s=r.getXAxisPane().getAxisComponent(),l=a.getAxisComponent(),c=r.getChartStore(),u=c.getDataList(),d=c.getTimeScaleStore(),h=d.getVisibleRange(),p=c.getIndicatorStore().getInstances(a.getId()),v=c.getStyles().indicator;e.save(),p.forEach(function(t){var n;if(t.visible){t.zLevel<0?e.globalCompositeOperation="destination-over":e.globalCompositeOperation="source-over";var a=!1;if(null!==t.draw&&(e.save(),a=null!==(n=t.draw({ctx:e,kLineDataList:u,indicator:t,visibleRange:h,bounding:o,barSpace:d.getBarSpace(),defaultStyles:v,xAxis:s,yAxis:l}))&&void 0!==n&&n,e.restore()),!a){var r=t.result,c=[];i.eachChildren(function(n,a){var d,h,p,f=a.halfGapBar,g=n.dataIndex,m=n.x,y=s.convertToPixel(g-1),_=s.convertToPixel(g+1),b=null!==(d=r[g-1])&&void 0!==d?d:null,x=null!==(h=r[g])&&void 0!==h?h:null,w=null!==(p=r[g+1])&&void 0!==p?p:null,S={x:y},C={x:m},k={x:_};t.figures.forEach(function(t){var e=t.key,i=null===b||void 0===b?void 0:b[e];Et(i)&&(S[e]=l.convertToPixel(i));var n=null===x||void 0===x?void 0:x[e];Et(n)&&(C[e]=l.convertToPixel(n));var a=null===w||void 0===w?void 0:w[e];Et(a)&&(k[e]=l.convertToPixel(a))}),jt(u,t,g,v,function(t,n,r){var u,d,h;if(At(null===x||void 0===x?void 0:x[t.key])){var p=C[t.key],v=null===(u=t.attrs)||void 0===u?void 0:u.call(t,{data:{prev:b,current:x,next:w},coordinate:{prev:S,current:C,next:k},bounding:o,barSpace:a,xAxis:s,yAxis:l});if(!At(v))switch(t.type){case"circle":v={x:m,y:p,r:Math.max(1,f)};break;case"rect":case"bar":var g=null!==(d=t.baseValue)&&void 0!==d?d:l.getRange().from,y=l.convertToPixel(g),_=Math.abs(y-p);g!==(null===x||void 0===x?void 0:x[t.key])&&(_=Math.max(1,_));var I=void 0;I=p>y?y:p,v={x:m-f,y:I,width:Math.max(1,2*f),height:_};break;case"line":At(c[r])||(c[r]=[]),Et(C[t.key])&&Et(k[t.key])&&c[r].push({coordinates:[{x:C.x,y:C[t.key]},{x:k.x,y:k[t.key]}],styles:n});break}var E=t.type;At(v)&&"line"!==E&&(null===(h=i.createFigure({name:"bar"===E?"rect":E,attrs:v,styles:n}))||void 0===h||h.draw(e))}})}),c.forEach(function(t){if(t.length>1){for(var n=[{coordinates:[t[0].coordinates[0],t[0].coordinates[1]],styles:t[0].styles}],a=1;a0,C=x.length>0;if(S||C){var k=Z(p.classifyTooltipIcons(w),3),I=k[0],E=k[1],A=k[2];if(g=p.drawStandardTooltipIcons(t,a,I,m,e,r.name,c,g,d),S){var P=_;b.length>0&&(P="".concat(P).concat(b)),g=p.drawStandardTooltipLegends(t,[{title:{text:"",color:f.color},value:{text:P,color:f.color}}],m,c,g,d,f)}g=p.drawStandardTooltipIcons(t,a,E,m,e,r.name,c,g,d),C&&(g=p.drawStandardTooltipLegends(t,x,m,c,g,d,v.text)),g=p.drawStandardTooltipIcons(t,a,A,m,e,r.name,c,g,d),u=m.y+g}})}return u},e.prototype.drawStandardTooltipIcons=function(t,e,i,n,a,r,o,s,l){var c=this;if(i.length>0){var u=0,d=0;i.forEach(function(e){var i=e.marginLeft,n=void 0===i?0:i,a=e.marginTop,r=void 0===a?0:a,o=e.marginRight,s=void 0===o?0:o,l=e.marginBottom,c=void 0===l?0:l,h=e.paddingLeft,p=void 0===h?0:h,v=e.paddingTop,f=void 0===v?0:v,g=e.paddingRight,m=void 0===g?0:g,y=e.paddingBottom,_=void 0===y?0:y,b=e.size,x=e.fontFamily,w=e.icon;t.font=Ht(b,"normal",x),u+=n+p+t.measureText(w).width+m+s,d=Math.max(d,r+f+b+_+c)}),n.x+u>l?(n.x=o,n.y+=s,s=d):s=Math.max(s,d),i.forEach(function(i){var o,s=i.marginLeft,l=void 0===s?0:s,u=i.marginTop,d=void 0===u?0:u,h=i.marginRight,p=void 0===h?0:h,v=i.paddingLeft,f=void 0===v?0:v,g=i.paddingTop,m=void 0===g?0:g,y=i.paddingRight,_=void 0===y?0:y,b=i.paddingBottom,x=void 0===b?0:b,w=i.color,S=i.activeColor,C=i.size,k=i.fontFamily,I=i.icon,E=i.backgroundColor,A=i.activeBackgroundColor,P=(null===e||void 0===e?void 0:e.paneId)===a&&(null===e||void 0===e?void 0:e.indicatorName)===r&&(null===e||void 0===e?void 0:e.iconId)===i.id;null===(o=c.createFigure({name:"text",attrs:{text:I,x:n.x+l,y:n.y+d},styles:{paddingLeft:f,paddingTop:m,paddingRight:_,paddingBottom:x,color:P?S:w,size:C,family:k,backgroundColor:P?A:E}},{mouseClickEvent:c._boundIconClickEvent({paneId:a,indicatorName:r,iconId:i.id}),mouseMoveEvent:c._boundIconMouseMoveEvent({paneId:a,indicatorName:r,iconId:i.id})}))||void 0===o||o.draw(t),n.x+=l+f+t.measureText(I).width+_+p})}return s},e.prototype.drawStandardTooltipLegends=function(t,e,i,n,a,r,o){var s=this;if(e.length>0){var l=o.marginLeft,c=o.marginTop,u=o.marginRight,d=o.marginBottom,h=o.size,p=o.family,v=o.weight;t.font=Ht(h,v,p),e.forEach(function(e){var o,f,g=e.title,m=e.value,y=t.measureText(g.text).width,_=t.measureText(m.text).width,b=y+_,x=c+h+d;i.x+l+b+u>r?(i.x=n,i.y+=a,a=x):a=Math.max(a,x),g.text.length>0&&(null===(o=s.createFigure({name:"text",attrs:{x:i.x+l,y:i.y+c,text:g.text},styles:{color:g.color,size:h,family:p,weight:v}}))||void 0===o||o.draw(t)),null===(f=s.createFigure({name:"text",attrs:{x:i.x+l+y,y:i.y+c,text:m.text},styles:{color:m.color,size:h,family:p,weight:v}}))||void 0===f||f.draw(t),i.x+=l+b+u})}return a},e.prototype.isDrawTooltip=function(t,e){var i=e.showRule;return i===z.Always||i===z.FollowCross&&Mt(t.paneId)},e.prototype.getIndicatorTooltipData=function(t,e,i,n,a,r,o){var s,l,c=o.tooltip,u=c.showName?i.shortName:"",d="",h=i.calcParams;h.length>0&&c.showParams&&(d="(".concat(h.join(","),")"));var p={name:u,calcParamsText:d,values:[],icons:c.icons},v=e.dataIndex,f=null!==(s=i.result)&&void 0!==s?s:[],g=[];if(i.visible){var m=null!==(l=f[v])&&void 0!==l?l:{};jt(t,i,v,o,function(t,e){var o;if(Mt(t.title)){var s=e.color,l=null!==(o=m[t.key])&&void 0!==o?o:c.defaultValue;Et(l)&&(l=Nt(l,i.precision),i.shouldFormatBigNumber&&(l=n.formatBigNumber(l)),l=Vt(zt(l,a),r)),g.push({title:{text:t.title,color:s},value:{text:l,color:s}})}}),p.values=g}if(null!==i.createTooltipDataSource){var y=this.getWidget(),_=y.getPane(),b=_.getChart().getChartStore(),x=i.createTooltipDataSource({kLineDataList:t,indicator:i,visibleRange:b.getTimeScaleStore().getVisibleRange(),bounding:y.getBounding(),crosshair:e,defaultStyles:o,xAxis:_.getChart().getXAxisPane().getAxisComponent(),yAxis:_.getAxisComponent()}),w=x.name,S=x.calcParamsText,C=x.values,k=x.icons;if(Mt(w)&&c.showName&&(p.name=w),Mt(S)&&c.showParams&&(p.calcParamsText=S),At(k)&&(p.icons=k),At(C)&&i.visible){var I=[],E=o.tooltip.text.color;C.forEach(function(t){var e,o={text:"",color:E};It(t.title)?o=t.title:o.text=t.title;var s={text:"",color:E};if(It(t.value)?s=t.value:s.text=null!==(e=t.value)&&void 0!==e?e:c.defaultValue,Et(s.text)){var l=Nt(s.text,i.precision);i.shouldFormatBigNumber&&(l=n.formatBigNumber(l)),l=Vt(zt(l,a),r),s.text=l}I.push({title:o,value:s})}),p.values=I}}return p},e.prototype.classifyTooltipIcons=function(t){var e=[],i=[],n=[];return t.forEach(function(t){switch(t.position){case W.Left:e.push(t);break;case W.Middle:i.push(t);break;case W.Right:n.push(t);break}}),[e,i,n]},e}(kn),Tn=function(t){function e(e){var i=t.call(this,e)||this;return i._initEvent(),i}return L(e,t),e.prototype._initEvent=function(){var t=this,e=this.getWidget().getPane(),i=e.getId(),n=e.getChart().getChartStore().getOverlayStore();this.registerEvent("mouseMoveEvent",function(e){var a,r=n.getProgressInstanceInfo();if(null!==r){var o=r.instance,s=r.paneId;o.isStart()&&(n.updateProgressInstanceInfo(i),s=i);var l=o.points.length-1,c="".concat(ee,"point_").concat(l);return o.isDrawing()&&s===i&&(o.eventMoveForDrawing(t._coordinateToPoint(r.instance,e)),null===(a=o.onDrawing)||void 0===a||a.call(o,K({overlay:o,figureKey:c,figureIndex:l},e))),t._figureMouseMoveEvent(o,1,c,l,0)(e)}return n.setHoverInstanceInfo({paneId:i,instance:null,figureType:0,figureKey:"",figureIndex:-1,attrsIndex:-1},e),!1}).registerEvent("mouseClickEvent",function(e){var a,r,o=n.getProgressInstanceInfo();if(null!==o){var s=o.instance,l=o.paneId;s.isStart()&&(n.updateProgressInstanceInfo(i,!0),l=i);var c=s.points.length-1,u="".concat(ee,"point_").concat(c);return s.isDrawing()&&l===i&&(s.eventMoveForDrawing(t._coordinateToPoint(s,e)),null===(a=s.onDrawing)||void 0===a||a.call(s,K({overlay:s,figureKey:u,figureIndex:c},e)),s.nextStep(),s.isDrawing()||(n.progressInstanceComplete(),null===(r=s.onDrawEnd)||void 0===r||r.call(s,K({overlay:s,figureKey:u,figureIndex:c},e)))),t._figureMouseClickEvent(s,1,u,c,0)(e)}return n.setClickInstanceInfo({paneId:i,instance:null,figureType:0,figureKey:"",figureIndex:-1,attrsIndex:-1},e),!1}).registerEvent("mouseDoubleClickEvent",function(e){var a,r=n.getProgressInstanceInfo();if(null!==r){var o=r.instance,s=r.paneId;if(o.isDrawing()&&s===i&&(o.forceComplete(),!o.isDrawing())){n.progressInstanceComplete();var l=o.points.length-1,c="".concat(ee,"point_").concat(l);null===(a=o.onDrawEnd)||void 0===a||a.call(o,K({overlay:o,figureKey:c,figureIndex:l},e))}var u=o.points.length-1;return t._figureMouseClickEvent(o,1,"".concat(ee,"point_").concat(u),u,0)(e)}return!1}).registerEvent("mouseRightClickEvent",function(e){var i=n.getProgressInstanceInfo();if(null!==i){var a=i.instance;if(a.isDrawing()){var r=a.points.length-1;return t._figureMouseRightClickEvent(a,1,"".concat(ee,"point_").concat(r),r,0)(e)}}return!1}).registerEvent("mouseUpEvent",function(t){var e,a=n.getPressedInstanceInfo(),r=a.instance,o=a.figureIndex,s=a.figureKey;return null!==r&&(null===(e=r.onPressedMoveEnd)||void 0===e||e.call(r,K({overlay:r,figureKey:s,figureIndex:o},t))),n.setPressedInstanceInfo({paneId:i,instance:null,figureType:0,figureKey:"",figureIndex:-1,attrsIndex:-1}),!1}).registerEvent("pressedMouseMoveEvent",function(e){var i,a,r=n.getPressedInstanceInfo(),o=r.instance,s=r.figureType,l=r.figureIndex,c=r.figureKey;if(null!==o){if(!o.lock&&(null===(a=null===(i=o.onPressedMoving)||void 0===i?void 0:i.call(o,K({overlay:o,figureIndex:l,figureKey:c},e)))||void 0===a||!a)){var u=t._coordinateToPoint(o,e);1===s?o.eventPressedPointMove(u,l):o.eventPressedOtherMove(u,t.getWidget().getPane().getChart().getChartStore().getTimeScaleStore())}return!0}return!1})},e.prototype._createFigureEvents=function(t,e,i,n,a,r){var o;if(!t.isDrawing()){var s=[];if(At(r)&&(Pt(r)?r&&(s=Zt()):s=r),0===s.length)return{mouseMoveEvent:this._figureMouseMoveEvent(t,e,i,n,a),mouseDownEvent:this._figureMouseDownEvent(t,e,i,n,a),mouseClickEvent:this._figureMouseClickEvent(t,e,i,n,a),mouseRightClickEvent:this._figureMouseRightClickEvent(t,e,i,n,a),mouseDoubleClickEvent:this._figureMouseDoubleClickEvent(t,e,i,n,a)};o={},s.includes("mouseMoveEvent")||s.includes("touchMoveEvent")||(o.mouseMoveEvent=this._figureMouseMoveEvent(t,e,i,n,a)),s.includes("mouseDownEvent")||s.includes("touchStartEvent")||(o.mouseDownEvent=this._figureMouseDownEvent(t,e,i,n,a)),s.includes("mouseClickEvent")||s.includes("tapEvent")||(o.mouseClickEvent=this._figureMouseClickEvent(t,e,i,n,a)),s.includes("mouseDoubleClickEvent")||s.includes("doubleTapEvent")||(o.mouseDoubleClickEvent=this._figureMouseDoubleClickEvent(t,e,i,n,a)),s.includes("mouseRightClickEvent")||(o.mouseRightClickEvent=this._figureMouseRightClickEvent(t,e,i,n,a))}return o},e.prototype._figureMouseMoveEvent=function(t,e,i,n,a){var r=this;return function(o){var s=r.getWidget().getPane(),l=s.getChart().getChartStore().getOverlayStore();return l.setHoverInstanceInfo({paneId:s.getId(),instance:t,figureType:e,figureKey:i,figureIndex:n,attrsIndex:a},o),!0}},e.prototype._figureMouseDownEvent=function(t,e,i,n,a){var r=this;return function(o){var s,l=r.getWidget().getPane(),c=l.getId(),u=l.getChart().getChartStore().getOverlayStore();return t.startPressedMove(r._coordinateToPoint(t,o)),null===(s=t.onPressedMoveStart)||void 0===s||s.call(t,K({overlay:t,figureIndex:n,figureKey:i},o)),u.setPressedInstanceInfo({paneId:c,instance:t,figureType:e,figureKey:i,figureIndex:n,attrsIndex:a}),!0}},e.prototype._figureMouseClickEvent=function(t,e,i,n,a){var r=this;return function(o){var s=r.getWidget().getPane(),l=s.getId(),c=s.getChart().getChartStore().getOverlayStore();return c.setClickInstanceInfo({paneId:l,instance:t,figureType:e,figureKey:i,figureIndex:n,attrsIndex:a},o),!0}},e.prototype._figureMouseDoubleClickEvent=function(t,e,i,n,a){return function(e){var a;return null===(a=t.onDoubleClick)||void 0===a||a.call(t,K(K({},e),{figureIndex:n,figureKey:i,overlay:t})),!0}},e.prototype._figureMouseRightClickEvent=function(t,e,i,n,a){var r=this;return function(e){var a,o;if(null===(o=null===(a=t.onRightClick)||void 0===a?void 0:a.call(t,K({overlay:t,figureIndex:n,figureKey:i},e)))||void 0===o||!o){var s=r.getWidget().getPane(),l=s.getChart().getChartStore().getOverlayStore();l.removeInstance(t)}return!0}},e.prototype._coordinateToPoint=function(t,e){var i,n={},a=this.getWidget().getPane(),r=a.getChart(),o=a.getId(),s=r.getChartStore().getTimeScaleStore();if(this.coordinateToPointTimestampDataIndexFlag()){var l=r.getXAxisPane().getAxisComponent(),c=l.convertFromPixel(e.x),u=null!==(i=s.dataIndexToTimestamp(c))&&void 0!==i?i:void 0;n.dataIndex=c,n.timestamp=u}if(this.coordinateToPointValueFlag()){var d=a.getAxisComponent(),h=d.convertFromPixel(e.y);if(t.mode!==Ut.Normal&&o===Wi.CANDLE&&Et(n.dataIndex)){var p=s.getDataByDataIndex(n.dataIndex);if(null!==p){var v=t.modeSensitivity;if(h>p.high)if(t.mode===Ut.WeakMagnet){var f=d.convertToPixel(p.high),g=d.convertFromPixel(f-v);hg&&(h=p.low)}else h=p.low;else{var y=Math.max(p.open,p.close),_=Math.min(p.open,p.close);h=h>y?h-y0){var m=(new Array).concat(this.getFigures(e,g,i,n,a,s,l,r,c,u,d));this.drawFigures(t,e,m,c)}this.drawDefaultFigures(t,e,g,i,a,r,o,s,l,c,u,d,h,p)},e.prototype.drawFigures=function(t,e,i,n){var a=this;i.forEach(function(i,r){var o=i.type,s=i.styles,l=i.attrs,c=i.ignoreEvent,u=[].concat(l);u.forEach(function(l,u){var d,h,p,v=a._createFigureEvents(e,2,null!==(d=i.key)&&void 0!==d?d:"",r,u,c),f=K(K(K({},n[o]),null===(h=e.styles)||void 0===h?void 0:h[o]),s);null===(p=a.createFigure({name:o,attrs:l,styles:f},v))||void 0===p||p.draw(t)})})},e.prototype.getCompleteOverlays=function(t,e){return t.getInstances(e)},e.prototype.getProgressOverlay=function(t,e){return t.paneId===e?t.instance:null},e.prototype.getFigures=function(t,e,i,n,a,r,o,s,l,c,u){var d,h;return null!==(h=null===(d=t.createPointFigures)||void 0===d?void 0:d.call(t,{overlay:t,coordinates:e,bounding:i,barSpace:n,precision:a,thousandsSeparator:r,decimalFoldThreshold:o,dateTimeFormat:s,defaultStyles:l,xAxis:c,yAxis:u}))&&void 0!==h?h:[]},e.prototype.drawDefaultFigures=function(t,e,i,n,a,r,o,s,l,c,u,d,h,p){var v,f,g=this;if(e.needDefaultPointFigure&&((null===(v=h.instance)||void 0===v?void 0:v.id)===e.id&&0!==h.figureType||(null===(f=p.instance)||void 0===f?void 0:f.id)===e.id&&0!==p.figureType)){var m=e.styles,y=K(K({},c.point),null===m||void 0===m?void 0:m.point);i.forEach(function(i,n){var a,r,o,s=i.x,l=i.y,c=y.radius,u=y.color,d=y.borderColor,p=y.borderSize;(null===(a=h.instance)||void 0===a?void 0:a.id)===e.id&&1===h.figureType&&h.figureIndex===n&&(c=y.activeRadius,u=y.activeColor,d=y.activeBorderColor,p=y.activeBorderSize),null===(r=g.createFigure({name:"circle",attrs:{x:s,y:l,r:c+p},styles:{color:d}},g._createFigureEvents(e,1,"".concat(ee,"point_").concat(n),n,0)))||void 0===r||r.draw(t),null===(o=g.createFigure({name:"circle",attrs:{x:s,y:l,r:c},styles:{color:u}}))||void 0===o||o.draw(t)})}},e}(kn),Bn=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._gridView=new In(n),n._indicatorView=new Pn(n),n._crosshairLineView=new Mn(n),n._tooltipView=n.createTooltipView(),n._overlayView=new Tn(n),n.addChild(n._tooltipView),n.addChild(n._overlayView),n.getContainer().style.cursor="crosshair",n.registerEvent("mouseMoveEvent",function(){return i.getChart().getChartStore().getTooltipStore().setActiveIcon(),!1}),n}return L(e,t),e.prototype.getName=function(){return Gi.MAIN},e.prototype.updateMain=function(t){this.updateMainContent(t),this._indicatorView.draw(t),this._gridView.draw(t)},e.prototype.createTooltipView=function(){return new Dn(this)},e.prototype.updateMainContent=function(t){},e.prototype.updateOverlay=function(t){this._overlayView.draw(t),this._crosshairLineView.draw(t),this._tooltipView.draw(t)},e}(en),Fn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._ripplePoint=e.createFigure({name:"circle",attrs:{x:0,y:0,r:0},styles:{style:"fill"}}),e._animationFrameTime=0,e._animation=new le({iterationCount:1/0}).doFrame(function(t){e._animationFrameTime=t;var i=e.getWidget().getPane();i.getChart().updatePane(0,i.getId())}),e}return L(e,t),e.prototype.drawImp=function(t){var e,i,n,a=this.getWidget(),r=a.getPane(),o=r.getChart(),s=o.getDataList(),l=s.length-1,c=a.getBounding(),u=r.getAxisComponent(),d=o.getStyles().candle.area,h=[],p=Number.MAX_SAFE_INTEGER,v=Number.MIN_SAFE_INTEGER,f=null;if(this.eachChildren(function(t){var e=t.data,i=t.x,n=null===e||void 0===e?void 0:e[d.value];if(Et(n)){var a=u.convertToPixel(n);v===Number.MIN_SAFE_INTEGER&&(v=i),h.push({x:i,y:a}),p=Math.min(p,a),t.dataIndex===l&&(f={x:i,y:a})}}),h.length>0){null===(e=this.createFigure({name:"line",attrs:{coordinates:h},styles:{color:d.lineColor,size:d.lineSize,smooth:d.smooth}}))||void 0===e||e.draw(t);var g=d.backgroundColor,m=void 0;if(Ct(g)){var y=t.createLinearGradient(0,c.height,0,p);try{g.forEach(function(t){var e=t.offset,i=t.color;y.addColorStop(e,i)})}catch(x){}m=y}else m=g;t.fillStyle=m,t.beginPath(),t.moveTo(v,c.height),t.lineTo(h[0].x,h[0].y),_i(t,h,d.smooth),t.lineTo(h[h.length-1].x,c.height),t.closePath(),t.fill()}var _=d.point;if(_.show&&At(f)){null===(i=this.createFigure({name:"circle",attrs:{x:f.x,y:f.y,r:_.radius},styles:{style:"fill",color:_.color}}))||void 0===i||i.draw(t);var b=_.rippleRadius;_.animation&&(b=_.radius+this._animationFrameTime/_.animationDuration*(_.rippleRadius-_.radius),this._animation.setDuration(_.animationDuration).start()),null===(n=this._ripplePoint)||void 0===n||n.setAttrs({x:f.x,y:f.y,r:b}).setStyles({style:"fill",color:_.rippleColor}).draw(t)}else this.stopAnimation()},e.prototype.stopAnimation=function(){this._animation.stop()},e}(En),Rn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.drawImp=function(t){var e=this.getWidget(),i=e.getPane(),n=i.getChart().getChartStore(),a=n.getStyles().candle.priceMark,r=a.high,o=a.low;if(a.show&&(r.show||o.show)){var s=n.getThousandsSeparator(),l=n.getDecimalFoldThreshold(),c=n.getPrecision(),u=i.getAxisComponent(),d=Number.MIN_SAFE_INTEGER,h=0,p=Number.MAX_SAFE_INTEGER,v=0;this.eachChildren(function(t){var e=t.data,i=t.x;At(e)&&(de.low&&(p=e.low,v=i))});var f=u.convertToPixel(d),g=u.convertToPixel(p);r.show&&d!==Number.MIN_SAFE_INTEGER&&this._drawMark(t,Vt(zt(Nt(d,c.price),s),l),{x:h,y:f},fp/2?(l=d-5,c=l-a.textOffset,u="right"):(l=d+5,u="left",c=l+a.textOffset);var v=h+n[1];null===(o=this.createFigure({name:"line",attrs:{coordinates:[{x:d,y:h},{x:d,y:v},{x:l,y:v}]},styles:{color:a.color}}))||void 0===o||o.draw(t),null===(s=this.createFigure({name:"text",attrs:{x:c,y:v,text:e,align:u,baseline:"middle"},styles:{color:a.color,size:a.textSize,family:a.textFamily,weight:a.textWeight}}))||void 0===s||s.draw(t)},e}(En),Ln=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.drawImp=function(t){var e,i=this.getWidget(),n=i.getPane(),a=i.getBounding(),r=n.getChart().getChartStore(),o=r.getStyles().candle.priceMark,s=o.last,l=s.line;if(o.show&&s.show&&l.show){var c=n.getAxisComponent(),u=r.getDataList(),d=u[u.length-1];if(null!=d){var h=d.close,p=d.open,v=c.convertToNicePixel(h),f=void 0;f=h>p?s.upColor:h0&&(b=this.drawStandardTooltipLegends(t,S,x,d,b,p,_)),b=this.drawStandardTooltipIcons(t,a,E,x,i,"",d,b,p)}return x.y+b},e.prototype._drawRectTooltip=function(t,e,i,n,a,r,o,s,l,c,u,d,h,p,v,f){var g,m,y,_,b,x=this,w=f.candle,S=f.indicator,C=w.tooltip,k=S.tooltip;if(h||p){var I=null!==(g=r.dataIndex)&&void 0!==g?g:0,E=this._getCandleTooltipLegends({prev:null!==(m=e[I-1])&&void 0!==m?m:null,current:r.kLineData,next:null!==(y=e[I+1])&&void 0!==y?y:null},o,s,l,c,u,d,w),A=C.offsetLeft,P=C.offsetTop,M=C.offsetRight,D=C.offsetBottom,T=C.text,B=T.marginLeft,F=T.marginRight,R=T.marginTop,L=T.marginBottom,N=T.size,z=T.weight,V=T.family,W=C.rect,$=W.position,X=W.paddingLeft,K=W.paddingRight,j=W.paddingTop,U=W.paddingBottom,G=W.offsetLeft,Z=W.offsetRight,q=W.offsetTop,J=W.offsetBottom,Q=W.borderSize,tt=W.borderRadius,et=W.borderColor,it=W.color,nt=0,at=0,rt=0;h&&(t.font=Ht(N,z,V),E.forEach(function(e){var i=e.title,n=e.value,a="".concat(i.text).concat(n.text),r=t.measureText(a).width+B+F;nt=Math.max(nt,r)}),rt+=(L+R+N)*E.length);var ot=k.text,st=ot.marginLeft,lt=ot.marginRight,ct=ot.marginTop,ut=ot.marginBottom,dt=ot.size,ht=ot.weight,pt=ot.family,vt=[];if(p&&(t.font=Ht(dt,ht,pt),i.forEach(function(i){var n,a=null!==(n=x.getIndicatorTooltipData(e,r,i,c,u,d,S).values)&&void 0!==n?n:[];vt.push(a),a.forEach(function(e){var i=e.title,n=e.value,a="".concat(i.text).concat(n.text),r=t.measureText(a).width+st+lt;nt=Math.max(nt,r),rt+=ct+ut+dt})})),at+=nt,0!==at&&0!==rt){at+=2*Q+X+K,rt+=2*Q+j+U;var ft=n.width/2,gt=$===H.Pointer&&r.paneId===Wi.CANDLE,mt=(null!==(_=r.realX)&&void 0!==_?_:0)>ft,yt=0;if(gt){var _t=r.realX;yt=mt?_t-Z-at:_t+G}else mt?(yt=G+A,f.yAxis.inside&&f.yAxis.position===Y.Left&&(yt+=a.width)):(yt=n.width-Z-at-M,f.yAxis.inside&&f.yAxis.position===Y.Right&&(yt-=a.width));var bt=v+q;if(gt){var xt=r.y;bt=xt-rt/2,bt+rt>n.height-J-D&&(bt=n.height-J-rt-D),bt1){var c="{".concat(l[1],"}");o.text=o.text.replace(c,null!==(e=b[c])&&void 0!==e?e:p.defaultValue),"{change}"===c&&(o.color=0===m?s.priceMark.last.noChangeColor:m>0?s.priceMark.last.upColor:s.priceMark.last.downColor)}return{title:r,value:o}})},e}(Dn),Hn=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._candleBarView=new An(n),n._candleAreaView=new Fn(n),n._candleHighLowPriceView=new Rn(n),n._candleLastPriceLineView=new Ln(n),n.addChild(n._candleBarView),n}return L(e,t),e.prototype.updateMainContent=function(t){var e=this.getPane().getChart().getStyles().candle;e.type!==$.Area?(this._candleBarView.draw(t),this._candleHighLowPriceView.draw(t),this._candleAreaView.stopAnimation()):this._candleAreaView.draw(t),this._candleLastPriceLineView.draw(t)},e.prototype.createTooltipView=function(){return new Wn(this)},e}(Bn),$n=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.drawImp=function(t){var e,i,n=this,a=this.getWidget(),r=a.getPane(),o=a.getBounding(),s=r.getAxisComponent(),l=this.getAxisStyles(r.getChart().getStyles());if(l.show){l.axisLine.show&&(null===(e=this.createFigure({name:"line",attrs:this.createAxisLine(o,l),styles:l.axisLine}))||void 0===e||e.draw(t));var c=s.getTicks();if(l.tickLine.show){var u=this.createTickLines(c,o,l);u.forEach(function(e){var i;null===(i=n.createFigure({name:"line",attrs:e,styles:l.tickLine}))||void 0===i||i.draw(t)})}if(l.tickText.show){var d=this.createTickTexts(c,o,l);null===(i=this.createFigure({name:"text",attrs:d,styles:l.tickText}))||void 0===i||i.draw(t)}}},e}(kn),Yn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.getAxisStyles=function(t){return t.yAxis},e.prototype.createAxisLine=function(t,e){var i,n=this.getWidget().getPane().getAxisComponent(),a=e.axisLine.size;return i=n.isFromZero()?0:t.width-a,{coordinates:[{x:i,y:0},{x:i,y:t.height}]}},e.prototype.createTickLines=function(t,e,i){var n=this.getWidget().getPane().getAxisComponent(),a=i.axisLine,r=i.tickLine,o=0,s=0;return n.isFromZero()?(o=0,a.show&&(o+=a.size),s=o+r.length):(o=e.width,a.show&&(o-=a.size),s=o-r.length),t.map(function(t){return{coordinates:[{x:o,y:t.coord},{x:s,y:t.coord}]}})},e.prototype.createTickTexts=function(t,e,i){var n=this.getWidget().getPane().getAxisComponent(),a=i.axisLine,r=i.tickLine,o=i.tickText,s=0;n.isFromZero()?(s=o.marginStart,a.show&&(s+=a.size),r.show&&(s+=r.length)):(s=e.width-o.marginEnd,a.show&&(s-=a.size),r.show&&(s-=r.length));var l=this.getWidget().getPane().getAxisComponent().isFromZero()?"left":"right";return t.map(function(t){return{x:s,y:t.coord,text:t.text,align:l,baseline:"middle"}})},e}($n),Xn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.drawImp=function(t){var e,i=this.getWidget(),n=i.getPane(),a=i.getBounding(),r=n.getChart().getChartStore(),o=r.getStyles().candle.priceMark,s=o.last,l=s.text;if(o.show&&s.show&&l.show){var c=r.getPrecision(),u=n.getAxisComponent(),d=r.getDataList(),h=d[d.length-1];if(At(h)){var p=h.close,v=h.open,f=u.convertToNicePixel(p),g=void 0;g=p>v?s.upColor:p1&&p.unshift({type:"rect",attrs:{x:0,y:g,width:i.width,height:m-g},ignoreEvent:!0})}return p},e.prototype.getFigures=function(t,e,i,n,a,r,o,s,l,c,u){var d,h;return null!==(h=null===(d=t.createYAxisFigures)||void 0===d?void 0:d.call(t,{overlay:t,coordinates:e,bounding:i,barSpace:n,precision:a,thousandsSeparator:r,decimalFoldThreshold:o,dateTimeFormat:s,defaultStyles:l,xAxis:c,yAxis:u}))&&void 0!==h?h:[]},e}(Tn),Un=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.drawImp=function(t){var e,i=this.getWidget(),n=i.getPane(),a=i.getBounding(),r=i.getPane().getChart().getChartStore(),o=r.getTooltipStore().getCrosshair(),s=r.getStyles().crosshair;if(Mt(o.paneId)&&this.compare(o,n.getId())&&s.show){var l=this.getDirectionStyles(s),c=l.text;if(l.show&&c.show){var u=n.getAxisComponent(),d=this.getText(o,r,u);t.font=Ht(c.size,c.weight,c.family),null===(e=this.createFigure({name:"text",attrs:this.getTextAttrs(d,t.measureText(d).width,o,a,u,c),styles:c}))||void 0===e||e.draw(t)}}},e.prototype.compare=function(t,e){return t.paneId===e},e.prototype.getDirectionStyles=function(t){return t.horizontal},e.prototype.getText=function(t,e,i){var n,a=i,r=i.convertFromPixel(t.y);if(a.getType()===X.Percentage){var o=e.getVisibleFirstData();n="".concat(((r-o.close)/o.close*100).toFixed(2),"%")}else{var s=e.getIndicatorStore().getInstances(t.paneId),l=0,c=!1;a.isInCandle()?l=e.getPrecision().price:s.forEach(function(t){l=Math.max(t.precision,l),c||(c=t.shouldFormatBigNumber)}),n=Nt(r,l),c&&(n=e.getCustomApi().formatBigNumber(n))}return Vt(zt(n,e.getThousandsSeparator()),e.getDecimalFoldThreshold())},e.prototype.getTextAttrs=function(t,e,i,n,a,r){var o,s,l=a;return l.isFromZero()?(o=0,s="left"):(o=n.width,s="right"),{x:o,y:i.y,text:t,align:s,baseline:"middle"}},e}(kn),Gn=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._yAxisView=new Yn(n),n._candleLastPriceLabelView=new Xn(n),n._indicatorLastValueView=new Kn(n),n._overlayYAxisView=new jn(n),n._crosshairHorizontalLabelView=new Un(n),n.getContainer().style.cursor="ns-resize",n.addChild(n._overlayYAxisView),n}return L(e,t),e.prototype.getName=function(){return Gi.Y_AXIS},e.prototype.updateMain=function(t){this._yAxisView.draw(t),this.getPane().getAxisComponent().isInCandle()&&this._candleLastPriceLabelView.draw(t),this._indicatorLastValueView.draw(t)},e.prototype.updateOverlay=function(t){this._overlayYAxisView.draw(t),this._crosshairHorizontalLabelView.draw(t)},e}(en),Zn=function(){function t(t){this._range={from:0,to:0,range:0,realFrom:0,realTo:0,realRange:0},this._prevRange={from:0,to:0,range:0,realFrom:0,realTo:0,realRange:0},this._ticks=[],this._autoCalcTickFlag=!0,this._parent=t}return t.prototype.getParent=function(){return this._parent},t.prototype.buildTicks=function(t){if(this._autoCalcTickFlag&&(this._range=this.calcRange()),this._prevRange.from!==this._range.from||this._prevRange.to!==this._range.to||t){this._prevRange=this._range;var e=this.optimalTicks(this._calcTicks());return this._ticks=this.createTicks({range:this._range,bounding:this.getSelfBounding(),defaultTicks:e}),!0}return!1},t.prototype.getTicks=function(){return this._ticks},t.prototype.getScrollZoomEnabled=function(){var t;return null===(t=this.getParent().getOptions().axisOptions.scrollZoomEnabled)||void 0===t||t},t.prototype.setRange=function(t){this._autoCalcTickFlag=!1,this._range=t},t.prototype.getRange=function(){return this._range},t.prototype.setAutoCalcTickFlag=function(t){this._autoCalcTickFlag=t},t.prototype.getAutoCalcTickFlag=function(){return this._autoCalcTickFlag},t.prototype._calcTicks=function(){var t=this._range,e=t.realFrom,i=t.realTo,n=t.realRange,a=[];if(n>=0){var r=Z(this._calcTickInterval(n),2),o=r[0],s=r[1],l=fe(Math.ceil(e/o)*o,s),c=fe(Math.floor(i/o)*o,s),u=0,d=l;if(0!==o)while(d<=c){var h=d.toFixed(s);a[u]={text:h,coord:0,value:h},++u,d+=o}}return a},t.prototype._calcTickInterval=function(t){var e=ve(t/8),i=ge(e);return[e,i]},t}(),qn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.calcRange=function(){var t,e,i,n,a=this.getParent(),r=a.getChart(),o=r.getChartStore(),s=Number.MAX_SAFE_INTEGER,l=Number.MIN_SAFE_INTEGER,c=[],u=!1,d=Number.MAX_SAFE_INTEGER,h=Number.MIN_SAFE_INTEGER,p=Number.MAX_SAFE_INTEGER,v=o.getIndicatorStore().getInstances(a.getId());v.forEach(function(t){var e,i,n;u||(u=null!==(e=t.shouldOhlc)&&void 0!==e&&e),p=Math.min(p,t.precision),Et(t.minValue)&&(d=Math.min(d,t.minValue)),Et(t.maxValue)&&(h=Math.max(h,t.maxValue)),c.push({figures:null!==(i=t.figures)&&void 0!==i?i:[],result:null!==(n=t.result)&&void 0!==n?n:[]})});var f=4,g=this.isInCandle();if(g){var m=o.getPrecision().price;f=p!==Number.MAX_SAFE_INTEGER?Math.min(p,m):m}else p!==Number.MAX_SAFE_INTEGER&&(f=p);var y=o.getVisibleDataList(),_=r.getStyles().candle,b=_.type===$.Area,x=_.area.value,w=g&&!b||!g&&u;y.forEach(function(t){var e=t.dataIndex,i=t.data;if(At(i)&&(w&&(s=Math.min(s,i.low),l=Math.max(l,i.high)),g&&b)){var n=i[x];Et(n)&&(s=Math.min(s,n),l=Math.max(l,n))}c.forEach(function(t){var i,n=t.figures,a=t.result,r=null!==(i=a[e])&&void 0!==i?i:{};n.forEach(function(t){var e=r[t.key];Et(e)&&(s=Math.min(s,e),l=Math.max(l,e))})})}),s!==Number.MAX_SAFE_INTEGER&&l!==Number.MIN_SAFE_INTEGER?(s=Math.min(d,s),l=Math.max(h,l)):(s=0,l=10);var S,C=this.getType();switch(C){case X.Percentage:var k=o.getVisibleFirstData();At(k)&&Et(k.close)&&(s=(s-k.close)/k.close*100,l=(l-k.close)/k.close*100),S=Math.pow(10,-2);break;case X.Log:s=ye(s),l=ye(l),S=.05*_e(-f);break;default:S=_e(-f)}if(s===l||Math.abs(s-l)=1&&(M/=A);var D=null!==(n=null===P||void 0===P?void 0:P.bottom)&&void 0!==n?n:.1;D>=1&&(D/=A);var T,B,F,R=Math.abs(l-s);return s-=R*D,l+=R*M,R=Math.abs(l-s),C===X.Log?(T=_e(s),B=_e(l),F=Math.abs(B-T)):(T=s,B=l,F=R),{from:s,to:l,range:R,realFrom:T,realTo:B,realRange:F}},e.prototype._innerConvertToPixel=function(t){var e,i,n=null!==(i=null===(e=this.getParent().getYAxisWidget())||void 0===e?void 0:e.getBounding().height)&&void 0!==i?i:0,a=this.getRange(),r=a.from,o=a.range,s=(t-r)/o;return this.isReverse()?Math.round(s*n):Math.round((1-s)*n)},e.prototype.isInCandle=function(){return this.getParent().getId()===Wi.CANDLE},e.prototype.getType=function(){return this.isInCandle()?this.getParent().getChart().getStyles().yAxis.type:X.Normal},e.prototype.getPosition=function(){return this.getParent().getChart().getStyles().yAxis.position},e.prototype.isReverse=function(){return!!this.isInCandle()&&this.getParent().getChart().getStyles().yAxis.reverse},e.prototype.isFromZero=function(){var t=this.getParent().getChart().getStyles().yAxis,e=t.inside;return t.position===Y.Left&&e||t.position===Y.Right&&!e},e.prototype.optimalTicks=function(t){var e,i,n=this,a=this.getParent(),r=null!==(i=null===(e=a.getYAxisWidget())||void 0===e?void 0:e.getBounding().height)&&void 0!==i?i:0,o=a.getChart().getChartStore(),s=o.getCustomApi(),l=[],c=this.getType(),u=o.getIndicatorStore().getInstances(a.getId()),d=o.getThousandsSeparator(),h=o.getDecimalFoldThreshold(),p=0,v=!1;this.isInCandle()?p=o.getPrecision().price:u.forEach(function(t){p=Math.max(p,t.precision),v||(v=t.shouldFormatBigNumber)});var f,g=o.getStyles().xAxis.tickText.size;return t.forEach(function(t){var e,i=t.value,a=n._innerConvertToPixel(+i);switch(c){case X.Percentage:e="".concat(Nt(i,2),"%");break;case X.Log:a=n._innerConvertToPixel(ye(+i)),e=Nt(i,p);break;default:e=Nt(i,p),v&&(e=s.formatBigNumber(i));break}e=Vt(zt(e,d),h);var o=Et(f);a>g&&a2*g||!o)&&(l.push({text:e,coord:a,value:i}),f=a)}),l},e.prototype.getAutoSize=function(){var t=this.getParent(),e=t.getChart(),i=e.getStyles(),n=i.yAxis,a=n.size;if("auto"!==a)return a;var r=e.getChartStore(),o=r.getCustomApi(),s=0;if(n.show&&(n.axisLine.show&&(s+=n.axisLine.size),n.tickLine.show&&(s+=n.tickLine.length),n.tickText.show)){var l=0;this.getTicks().forEach(function(t){l=Math.max(l,$t(t.text,n.tickText.size,n.tickText.weight,n.tickText.family))}),s+=n.tickText.marginStart+n.tickText.marginEnd+l}var c=i.crosshair,u=0;if(c.show&&c.horizontal.show&&c.horizontal.text.show){var d=r.getIndicatorStore().getInstances(t.getId()),h=0,p=!1;d.forEach(function(t){h=Math.max(t.precision,h),p||(p=t.shouldFormatBigNumber)});var v=2;if(this.getType()!==X.Percentage)if(this.isInCandle()){var f=r.getPrecision().price,g=i.indicator.lastValueMark;v=g.show&&g.text.show?Math.max(h,f):f}else v=h;var m=Nt(this.getRange().to,v);p&&(m=o.formatBigNumber(m)),m=Vt(m,r.getDecimalFoldThreshold()),u+=c.horizontal.text.paddingLeft+c.horizontal.text.paddingRight+2*c.horizontal.text.borderSize+$t(m,c.horizontal.text.size,c.horizontal.text.weight,c.horizontal.text.family)}return Math.max(s,u)},e.prototype.getSelfBounding=function(){return this.getParent().getYAxisWidget().getBounding()},e.prototype.convertFromPixel=function(t){var e,i,n=null!==(i=null===(e=this.getParent().getYAxisWidget())||void 0===e?void 0:e.getBounding().height)&&void 0!==i?i:0,a=this.getRange(),r=a.from,o=a.range,s=this.isReverse()?t/n:1-t/n,l=s*o+r;switch(this.getType()){case X.Percentage:var c=this.getParent().getChart().getChartStore().getVisibleFirstData();return At(c)&&Et(c.close)?c.close*l/100+c.close:0;case X.Log:return _e(l);default:return l}},e.prototype.convertToRealValue=function(t){var e=t;return this.getType()===X.Log&&(e=_e(t)),e},e.prototype.convertToPixel=function(t){var e=t;switch(this.getType()){case X.Percentage:var i=this.getParent().getChart().getChartStore().getVisibleFirstData();At(i)&&Et(i.close)&&(e=(t-i.close)/i.close*100);break;case X.Log:e=ye(t);break;default:e=t}return this._innerConvertToPixel(e)},e.prototype.convertToNicePixel=function(t){var e,i,n=null!==(i=null===(e=this.getParent().getYAxisWidget())||void 0===e?void 0:e.getBounding().height)&&void 0!==i?i:0,a=this.convertToPixel(t);return Math.round(Math.max(.05*n,Math.min(a,.98*n)))},e.extend=function(t){var i=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return L(i,e),i.prototype.createTicks=function(e){return t.createTicks(e)},i}(e);return i},e}(Zn),Jn={name:"default",createTicks:function(t){var e=t.defaultTicks;return e}},Qn={default:qn.extend(Jn)};function ta(t){var e;return null!==(e=Qn[t])&&void 0!==e?e:Qn.default}var ea=function(){function t(t,e,i,n){this._bounding=Qi(),this._chart=i,this._id=n,this._init(t,e)}return t.prototype._init=function(t,e){this._rootContainer=t,this._container=he("div",{width:"100%",margin:"0",padding:"0",position:"relative",overflow:"hidden",boxSizing:"border-box"}),null!==e?t.insertBefore(this._container,e):t.appendChild(this._container)},t.prototype.getContainer=function(){return this._container},t.prototype.getId=function(){return this._id},t.prototype.getChart=function(){return this._chart},t.prototype.getBounding=function(){return this._bounding},t.prototype.update=function(t){this._bounding.height!==this._container.clientHeight&&(this._container.style.height="".concat(this._bounding.height,"px")),this.updateImp(null!==t&&void 0!==t?t:3,this._container,this._bounding)},t.prototype.destroy=function(){this._rootContainer.removeChild(this._container)},t}(),ia=function(t){function e(e,i,n,a,r){var o=t.call(this,e,i,n,a)||this;o._yAxisWidget=null,o._options={minHeight:zi,dragEnabled:!0,gap:{top:.2,bottom:.1},axisOptions:{name:"default",scrollZoomEnabled:!0}};var s=o.getContainer();return o._mainWidget=o.createMainWidget(s),o._yAxisWidget=o.createYAxisWidget(s),o.setOptions(r),o}return L(e,t),e.prototype.setOptions=function(t){var e,i,n,a,r,o=null===(e=t.axisOptions)||void 0===e?void 0:e.name;return(this._options.axisOptions.name!==o&&Mt(o)||!At(this._axis))&&(this._axis=this.createAxisComponent(null!==o&&void 0!==o?o:"default")),wt(this._options,t),this.getId()===Wi.X_AXIS?(a=this.getMainWidget().getContainer(),r="ew-resize"):(a=this.getYAxisWidget().getContainer(),r="ns-resize"),null===(n=null===(i=t.axisOptions)||void 0===i?void 0:i.scrollZoomEnabled)||void 0===n||n?a.style.cursor=r:a.style.cursor="default",this},e.prototype.getOptions=function(){return this._options},e.prototype.getAxisComponent=function(){return this._axis},e.prototype.setBounding=function(t,e,i){var n,a;wt(this.getBounding(),t);var r={};return At(t.height)&&(r.height=t.height),At(t.top)&&(r.top=t.top),this._mainWidget.setBounding(r),null===(n=this._yAxisWidget)||void 0===n||n.setBounding(r),At(e)&&this._mainWidget.setBounding(e),At(i)&&(null===(a=this._yAxisWidget)||void 0===a||a.setBounding(i)),this},e.prototype.getMainWidget=function(){return this._mainWidget},e.prototype.getYAxisWidget=function(){return this._yAxisWidget},e.prototype.updateImp=function(t){var e;this._mainWidget.update(t),null===(e=this._yAxisWidget)||void 0===e||e.update(t)},e.prototype.destroy=function(){var e;t.prototype.destroy.call(this),this._mainWidget.destroy(),null===(e=this._yAxisWidget)||void 0===e||e.destroy()},e.prototype.getImage=function(t){var e=this.getBounding(),i=e.width,n=e.height,a=he("canvas",{width:"".concat(i,"px"),height:"".concat(n,"px"),boxSizing:"border-box"}),r=a.getContext("2d"),o=Wt(a);a.width=i*o,a.height=n*o,r.scale(o,o);var s=this._mainWidget.getBounding();if(r.drawImage(this._mainWidget.getImage(t),s.left,0,s.width,s.height),null!==this._yAxisWidget){var l=this._yAxisWidget.getBounding();r.drawImage(this._yAxisWidget.getImage(t),l.left,0,l.width,l.height)}return a},e.prototype.createYAxisWidget=function(t){return null},e}(ea),na=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.createAxisComponent=function(t){var e=ta(null!==t&&void 0!==t?t:"default");return new e(this)},e.prototype.createMainWidget=function(t){return new Bn(t,this)},e.prototype.createYAxisWidget=function(t){return new Gn(t,this)},e}(ia),aa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.createMainWidget=function(t){return new Hn(t,this)},e}(na),ra=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.getAxisStyles=function(t){return t.xAxis},e.prototype.createAxisLine=function(t){return{coordinates:[{x:0,y:0},{x:t.width,y:0}]}},e.prototype.createTickLines=function(t,e,i){var n=i.tickLine,a=i.axisLine.size;return t.map(function(t){return{coordinates:[{x:t.coord,y:0},{x:t.coord,y:a+n.length}]}})},e.prototype.createTickTexts=function(t,e,i){var n=i.tickText,a=i.axisLine.size,r=i.tickLine.length;return t.map(function(t){return{x:t.coord,y:a+r+n.marginStart,text:t.text,align:"center",baseline:"top"}})},e}($n),oa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.coordinateToPointTimestampDataIndexFlag=function(){return!0},e.prototype.coordinateToPointValueFlag=function(){return!1},e.prototype.getCompleteOverlays=function(t){return t.getInstances()},e.prototype.getProgressOverlay=function(t){return t.instance},e.prototype.getDefaultFigures=function(t,e,i,n,a,r,o,s,l,c,u){var d,h=[];if(t.needDefaultXAxisFigure&&t.id===(null===(d=u.instance)||void 0===d?void 0:d.id)){var p=Number.MAX_SAFE_INTEGER,v=Number.MIN_SAFE_INTEGER;e.forEach(function(e,i){p=Math.min(p,e.x),v=Math.max(v,e.x);var n=t.points[i];if(Et(n.timestamp)){var o=r.formatDate(a,n.timestamp,"YYYY-MM-DD HH:mm",qt.Crosshair);h.push({type:"text",attrs:{x:e.x,y:0,text:o,align:"center"},ignoreEvent:!0})}}),e.length>1&&h.unshift({type:"rect",attrs:{x:p,y:0,width:v-p,height:i.height},ignoreEvent:!0})}return h},e.prototype.getFigures=function(t,e,i,n,a,r,o,s,l,c,u){var d,h;return null!==(h=null===(d=t.createXAxisFigures)||void 0===d?void 0:d.call(t,{overlay:t,coordinates:e,bounding:i,barSpace:n,precision:a,thousandsSeparator:r,decimalFoldThreshold:o,dateTimeFormat:s,defaultStyles:l,xAxis:c,yAxis:u}))&&void 0!==h?h:[]},e}(jn),sa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.compare=function(t){return At(t.kLineData)&&t.dataIndex===t.realDataIndex},e.prototype.getDirectionStyles=function(t){return t.vertical},e.prototype.getText=function(t,e){var i,n=null===(i=t.kLineData)||void 0===i?void 0:i.timestamp;return e.getCustomApi().formatDate(e.getTimeScaleStore().getDateTimeFormat(),n,"YYYY-MM-DD HH:mm",qt.Crosshair)},e.prototype.getTextAttrs=function(t,e,i,n,a,r){var o,s=i.realX,l="center";return s-e/2-r.paddingLeft<0?(o=0,l="left"):s+e/2+r.paddingRight>n.width?(o=n.width,l="right"):o=s,{x:o,y:0,text:t,align:l,baseline:"top"}},e}(Un),la=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._xAxisView=new ra(n),n._overlayXAxisView=new oa(n),n._crosshairVerticalLabelView=new sa(n),n.getContainer().style.cursor="ew-resize",n.addChild(n._overlayXAxisView),n}return L(e,t),e.prototype.getName=function(){return Gi.X_AXIS},e.prototype.updateMain=function(t){this._xAxisView.draw(t)},e.prototype.updateOverlay=function(t){this._overlayXAxisView.draw(t),this._crosshairVerticalLabelView.draw(t)},e}(en),ca=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.calcRange=function(){var t=this.getParent().getChart().getChartStore(),e=t.getTimeScaleStore().getVisibleRange(),i=e.from,n=e.to,a=i,r=n-1,o=n-i;return{from:a,to:r,range:o,realFrom:a,realTo:r,realRange:o}},e.prototype.optimalTicks=function(t){var e,i,n=this.getParent().getChart(),a=n.getChartStore(),r=a.getCustomApi().formatDate,o=[],s=t.length,l=a.getDataList();if(s>0){var c=a.getTimeScaleStore().getDateTimeFormat(),u=n.getStyles().xAxis.tickText,d=$t("00-00 00:00",u.size,u.weight,u.family),h=parseInt(t[0].value,10),p=this.convertToPixel(h),v=1;if(s>1){var f=parseInt(t[1].value,10),g=this.convertToPixel(f),m=Math.abs(g-p);me&&(t.apply(this,arguments),i=n)}}var fa=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._dragFlag=!1,n._dragStartY=0,n._topPaneHeight=0,n._bottomPaneHeight=0,n._pressedMouseMoveEvent=va(n._pressedTouchMouseMoveEvent,20),n.registerEvent("touchStartEvent",n._mouseDownEvent.bind(n)).registerEvent("touchMoveEvent",n._pressedMouseMoveEvent.bind(n)).registerEvent("touchEndEvent",n._mouseUpEvent.bind(n)).registerEvent("mouseDownEvent",n._mouseDownEvent.bind(n)).registerEvent("mouseUpEvent",n._mouseUpEvent.bind(n)).registerEvent("pressedMouseMoveEvent",n._pressedMouseMoveEvent.bind(n)).registerEvent("mouseEnterEvent",n._mouseEnterEvent.bind(n)).registerEvent("mouseLeaveEvent",n._mouseLeaveEvent.bind(n)),n}return L(e,t),e.prototype.getName=function(){return Gi.SEPARATOR},e.prototype.checkEventOn=function(){return!0},e.prototype._mouseDownEvent=function(t){this._dragFlag=!0,this._dragStartY=t.pageY;var e=this.getPane();return this._topPaneHeight=e.getTopPane().getBounding().height,this._bottomPaneHeight=e.getBottomPane().getBounding().height,!0},e.prototype._mouseUpEvent=function(){return this._dragFlag=!1,this._mouseLeaveEvent()},e.prototype._pressedTouchMouseMoveEvent=function(t){var e=t.pageY-this._dragStartY,i=this.getPane(),n=i.getTopPane(),a=i.getBottomPane(),r=e<0;if(null!==n&&(null===a||void 0===a?void 0:a.getOptions().dragEnabled)){var o=void 0,s=void 0,l=void 0,c=void 0;r?(o=n,s=a,l=this._topPaneHeight,c=this._bottomPaneHeight):(o=a,s=n,l=this._bottomPaneHeight,c=this._topPaneHeight);var u=o.getOptions().minHeight;if(l>u){var d=Math.max(l-Math.abs(e),u),h=l-d;o.setBounding({height:d}),s.setBounding({height:c+h});var p=i.getChart();p.getChartStore().getActionStore().execute(Tt.OnPaneDrag,{paneId:i.getId()}),p.adjustPaneViewport(!0,!0,!0,!0,!0)}}return!0},e.prototype._mouseEnterEvent=function(){var t,e=this.getPane(),i=e.getBottomPane();if(null!==(t=null===i||void 0===i?void 0:i.getOptions().dragEnabled)&&void 0!==t&&t){var n=e.getChart(),a=n.getStyles().separator;return this.getContainer().style.background=a.activeBackgroundColor,!0}return!1},e.prototype._mouseLeaveEvent=function(){return!this._dragFlag&&(this.getContainer().style.background="",!0)},e.prototype.createContainer=function(){return he("div",{width:"100%",height:"".concat(Zi,"px"),margin:"0",padding:"0",position:"absolute",top:"-3px",zIndex:"20",boxSizing:"border-box",cursor:"ns-resize"})},e.prototype.updateImp=function(t,e,i){if(4===i||2===i){var n=this.getPane().getChart().getStyles().separator;t.style.top="".concat(-Math.floor((Zi-n.size)/2),"px"),t.style.height="".concat(Zi,"px")}},e}(tn),ga=function(t){function e(e,i,n,a,r,o){var s=t.call(this,e,i,n,a)||this;return s.getContainer().style.overflow="",s._topPane=r,s._bottomPane=o,s._separatorWidget=new fa(s.getContainer(),s),s}return L(e,t),e.prototype.setBounding=function(t){return wt(this.getBounding(),t),this},e.prototype.getTopPane=function(){return this._topPane},e.prototype.setTopPane=function(t){return this._topPane=t,this},e.prototype.getBottomPane=function(){return this._bottomPane},e.prototype.setBottomPane=function(t){return this._bottomPane=t,this},e.prototype.getWidget=function(){return this._separatorWidget},e.prototype.getImage=function(t){var e=this.getBounding(),i=e.width,n=e.height,a=this.getChart().getStyles().separator,r=he("canvas",{width:"".concat(i,"px"),height:"".concat(n,"px"),boxSizing:"border-box"}),o=r.getContext("2d"),s=Wt(r);return r.width=i*s,r.height=n*s,o.scale(s,s),o.fillStyle=a.color,o.fillRect(0,0,i,n),r},e.prototype.updateImp=function(t,e,i){if(4===t||2===t){var n=this.getChart().getStyles().separator;e.style.backgroundColor=n.color,e.style.height="".concat(i.height,"px"),e.style.marginLeft="".concat(i.left,"px"),e.style.width="".concat(i.width,"px"),this._separatorWidget.update(t)}},e}(ea);function ma(){var t;return"undefined"!==typeof window&&(null!==(t=window.navigator.userAgent.toLowerCase().indexOf("firefox"))&&void 0!==t?t:-1)>-1}function ya(){return"undefined"!==typeof window&&/iPhone|iPad|iPod/.test(window.navigator.platform)}var _a,ba=10,xa=function(){function t(t,e,i){var n=this;this._clickCount=0,this._clickTimeoutId=null,this._clickCoordinate={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY},this._tapCount=0,this._tapTimeoutId=null,this._tapCoordinate={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY},this._longTapTimeoutId=null,this._longTapActive=!1,this._mouseMoveStartCoordinate=null,this._touchMoveStartCoordinate=null,this._touchMoveExceededManhattanDistance=!1,this._cancelClick=!1,this._cancelTap=!1,this._unsubscribeOutsideMouseEvents=null,this._unsubscribeOutsideTouchEvents=null,this._unsubscribeMobileSafariEvents=null,this._unsubscribeMousemove=null,this._unsubscribeMouseWheel=null,this._unsubscribeContextMenu=null,this._unsubscribeRootMouseEvents=null,this._unsubscribeRootTouchEvents=null,this._startPinchMiddleCoordinate=null,this._startPinchDistance=0,this._pinchPrevented=!1,this._preventTouchDragProcess=!1,this._mousePressed=!1,this._lastTouchEventTimeStamp=0,this._activeTouchId=null,this._acceptMouseLeave=!ya(),this._onFirefoxOutsideMouseUp=function(t){n._mouseUpHandler(t)},this._onMobileSafariDoubleClick=function(t){if(n._firesTouchEvents(t)){if(++n._tapCount,null!==n._tapTimeoutId&&n._tapCount>1){var e=n._mouseTouchMoveWithDownInfo(n._getCoordinate(t),n._tapCoordinate).manhattanDistance;e<30&&!n._cancelTap&&n._processEvent(n._makeCompatEvent(t),n._handler.doubleTapEvent),n._resetTapTimeout()}}else if(++n._clickCount,null!==n._clickTimeoutId&&n._clickCount>1){e=n._mouseTouchMoveWithDownInfo(n._getCoordinate(t),n._clickCoordinate).manhattanDistance;e<5&&!n._cancelClick&&n._processEvent(n._makeCompatEvent(t),n._handler.mouseDoubleClickEvent),n._resetClickTimeout()}},this._target=t,this._handler=e,this._options=i,this._init()}return t.prototype.destroy=function(){null!==this._unsubscribeOutsideMouseEvents&&(this._unsubscribeOutsideMouseEvents(),this._unsubscribeOutsideMouseEvents=null),null!==this._unsubscribeOutsideTouchEvents&&(this._unsubscribeOutsideTouchEvents(),this._unsubscribeOutsideTouchEvents=null),null!==this._unsubscribeMousemove&&(this._unsubscribeMousemove(),this._unsubscribeMousemove=null),null!==this._unsubscribeMouseWheel&&(this._unsubscribeMouseWheel(),this._unsubscribeMouseWheel=null),null!==this._unsubscribeContextMenu&&(this._unsubscribeContextMenu(),this._unsubscribeContextMenu=null),null!==this._unsubscribeRootMouseEvents&&(this._unsubscribeRootMouseEvents(),this._unsubscribeRootMouseEvents=null),null!==this._unsubscribeRootTouchEvents&&(this._unsubscribeRootTouchEvents(),this._unsubscribeRootTouchEvents=null),null!==this._unsubscribeMobileSafariEvents&&(this._unsubscribeMobileSafariEvents(),this._unsubscribeMobileSafariEvents=null),this._clearLongTapTimeout(),this._resetClickTimeout()},t.prototype._mouseEnterHandler=function(t){var e,i,n,a=this;null===(e=this._unsubscribeMousemove)||void 0===e||e.call(this),null===(i=this._unsubscribeMouseWheel)||void 0===i||i.call(this),null===(n=this._unsubscribeContextMenu)||void 0===n||n.call(this);var r=this._mouseMoveHandler.bind(this);this._unsubscribeMousemove=function(){a._target.removeEventListener("mousemove",r)},this._target.addEventListener("mousemove",r);var o=this._mouseWheelHandler.bind(this);this._unsubscribeMouseWheel=function(){a._target.removeEventListener("wheel",o)},this._target.addEventListener("wheel",o,{passive:!1});var s=this._contextMenuHandler.bind(this);this._unsubscribeContextMenu=function(){a._target.removeEventListener("contextmenu",s)},this._target.addEventListener("contextmenu",s,{passive:!1}),this._firesTouchEvents(t)||(this._processEvent(this._makeCompatEvent(t),this._handler.mouseEnterEvent),this._acceptMouseLeave=!0)},t.prototype._resetClickTimeout=function(){null!==this._clickTimeoutId&&clearTimeout(this._clickTimeoutId),this._clickCount=0,this._clickTimeoutId=null,this._clickCoordinate={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY}},t.prototype._resetTapTimeout=function(){null!==this._tapTimeoutId&&clearTimeout(this._tapTimeoutId),this._tapCount=0,this._tapTimeoutId=null,this._tapCoordinate={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY}},t.prototype._mouseMoveHandler=function(t){this._mousePressed||null!==this._touchMoveStartCoordinate||this._firesTouchEvents(t)||(this._processEvent(this._makeCompatEvent(t),this._handler.mouseMoveEvent),this._acceptMouseLeave=!0)},t.prototype._mouseWheelHandler=function(t){if(Math.abs(t.deltaX)>Math.abs(t.deltaY)){if(!At(this._handler.mouseWheelHortEvent))return;if(this._preventDefault(t),0===Math.abs(t.deltaX))return;this._handler.mouseWheelHortEvent(this._makeCompatEvent(t),-t.deltaX)}else{if(!At(this._handler.mouseWheelVertEvent))return;var e=-t.deltaY/100;if(0===e)return;switch(this._preventDefault(t),t.deltaMode){case t.DOM_DELTA_PAGE:e*=120;break;case t.DOM_DELTA_LINE:e*=32;break}if(0!==e){var i=Math.sign(e)*Math.min(1,Math.abs(e));this._handler.mouseWheelVertEvent(this._makeCompatEvent(t),i)}}},t.prototype._contextMenuHandler=function(t){this._preventDefault(t)},t.prototype._touchMoveHandler=function(t){var e=this._touchWithId(t.changedTouches,this._activeTouchId);if(null!==e&&(this._lastTouchEventTimeStamp=this._eventTimeStamp(t),null===this._startPinchMiddleCoordinate&&!this._preventTouchDragProcess)){this._pinchPrevented=!0;var i=this._mouseTouchMoveWithDownInfo(this._getCoordinate(e),this._touchMoveStartCoordinate),n=i.xOffset,a=i.yOffset,r=i.manhattanDistance;if(this._touchMoveExceededManhattanDistance||!(r<5)){if(!this._touchMoveExceededManhattanDistance){var o=.5*n,s=a>=o&&!this._options.treatVertDragAsPageScroll(),l=o>a&&!this._options.treatHorzDragAsPageScroll();s||l||(this._preventTouchDragProcess=!0),this._touchMoveExceededManhattanDistance=!0,this._cancelTap=!0,this._clearLongTapTimeout(),this._resetTapTimeout()}this._preventTouchDragProcess||this._processEvent(this._makeCompatEvent(t,e),this._handler.touchMoveEvent)}}},t.prototype._mouseMoveWithDownHandler=function(t){if(0===t.button){var e=this._mouseTouchMoveWithDownInfo(this._getCoordinate(t),this._mouseMoveStartCoordinate),i=e.manhattanDistance;i>=5&&(this._cancelClick=!0,this._resetClickTimeout()),this._cancelClick&&this._processEvent(this._makeCompatEvent(t),this._handler.pressedMouseMoveEvent)}},t.prototype._mouseTouchMoveWithDownInfo=function(t,e){var i=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y),a=i+n;return{xOffset:i,yOffset:n,manhattanDistance:a}},t.prototype._touchEndHandler=function(t){var e=this._touchWithId(t.changedTouches,this._activeTouchId);if(null===e&&0===t.touches.length&&(e=t.changedTouches[0]),null!==e){this._activeTouchId=null,this._lastTouchEventTimeStamp=this._eventTimeStamp(t),this._clearLongTapTimeout(),this._touchMoveStartCoordinate=null,null!==this._unsubscribeRootTouchEvents&&(this._unsubscribeRootTouchEvents(),this._unsubscribeRootTouchEvents=null);var i=this._makeCompatEvent(t,e);if(this._processEvent(i,this._handler.touchEndEvent),++this._tapCount,null!==this._tapTimeoutId&&this._tapCount>1){var n=this._mouseTouchMoveWithDownInfo(this._getCoordinate(e),this._tapCoordinate).manhattanDistance;n<30&&!this._cancelTap&&this._processEvent(i,this._handler.doubleTapEvent),this._resetTapTimeout()}else this._cancelTap||(this._processEvent(i,this._handler.tapEvent),At(this._handler.tapEvent)&&this._preventDefault(t));0===this._tapCount&&this._preventDefault(t),0===t.touches.length&&this._longTapActive&&(this._longTapActive=!1,this._preventDefault(t))}},t.prototype._mouseUpHandler=function(t){if(0===t.button){var e=this._makeCompatEvent(t);if(this._mouseMoveStartCoordinate=null,this._mousePressed=!1,null!==this._unsubscribeRootMouseEvents&&(this._unsubscribeRootMouseEvents(),this._unsubscribeRootMouseEvents=null),ma()){var i=this._target.ownerDocument.documentElement;i.removeEventListener("mouseleave",this._onFirefoxOutsideMouseUp)}if(!this._firesTouchEvents(t))if(this._processEvent(e,this._handler.mouseUpEvent),++this._clickCount,null!==this._clickTimeoutId&&this._clickCount>1){var n=this._mouseTouchMoveWithDownInfo(this._getCoordinate(t),this._clickCoordinate).manhattanDistance;n<5&&!this._cancelClick&&this._processEvent(e,this._handler.mouseDoubleClickEvent),this._resetClickTimeout()}else this._cancelClick||this._processEvent(e,this._handler.mouseClickEvent)}},t.prototype._clearLongTapTimeout=function(){null!==this._longTapTimeoutId&&(clearTimeout(this._longTapTimeoutId),this._longTapTimeoutId=null)},t.prototype._touchStartHandler=function(t){if(null===this._activeTouchId){var e=t.changedTouches[0];this._activeTouchId=e.identifier,this._lastTouchEventTimeStamp=this._eventTimeStamp(t);var i=this._target.ownerDocument.documentElement;this._cancelTap=!1,this._touchMoveExceededManhattanDistance=!1,this._preventTouchDragProcess=!1,this._touchMoveStartCoordinate=this._getCoordinate(e),null!==this._unsubscribeRootTouchEvents&&(this._unsubscribeRootTouchEvents(),this._unsubscribeRootTouchEvents=null);var n=this._touchMoveHandler.bind(this),a=this._touchEndHandler.bind(this);this._unsubscribeRootTouchEvents=function(){i.removeEventListener("touchmove",n),i.removeEventListener("touchend",a)},i.addEventListener("touchmove",n,{passive:!1}),i.addEventListener("touchend",a,{passive:!1}),this._clearLongTapTimeout(),this._longTapTimeoutId=setTimeout(this._longTapHandler.bind(this,t),500),this._processEvent(this._makeCompatEvent(t,e),this._handler.touchStartEvent),null===this._tapTimeoutId&&(this._tapCount=0,this._tapTimeoutId=setTimeout(this._resetTapTimeout.bind(this),500),this._tapCoordinate=this._getCoordinate(e))}},t.prototype._mouseDownHandler=function(t){if(2===t.button)return this._preventDefault(t),void this._processEvent(this._makeCompatEvent(t),this._handler.mouseRightClickEvent);if(0===t.button){var e=this._target.ownerDocument.documentElement;ma()&&e.addEventListener("mouseleave",this._onFirefoxOutsideMouseUp),this._cancelClick=!1,this._mouseMoveStartCoordinate=this._getCoordinate(t),null!==this._unsubscribeRootMouseEvents&&(this._unsubscribeRootMouseEvents(),this._unsubscribeRootMouseEvents=null);var i=this._mouseMoveWithDownHandler.bind(this),n=this._mouseUpHandler.bind(this);this._unsubscribeRootMouseEvents=function(){e.removeEventListener("mousemove",i),e.removeEventListener("mouseup",n)},e.addEventListener("mousemove",i),e.addEventListener("mouseup",n),this._mousePressed=!0,this._firesTouchEvents(t)||(this._processEvent(this._makeCompatEvent(t),this._handler.mouseDownEvent),null===this._clickTimeoutId&&(this._clickCount=0,this._clickTimeoutId=setTimeout(this._resetClickTimeout.bind(this),500),this._clickCoordinate=this._getCoordinate(t)))}},t.prototype._init=function(){var t=this;this._target.addEventListener("mouseenter",this._mouseEnterHandler.bind(this)),this._target.addEventListener("touchcancel",this._clearLongTapTimeout.bind(this));var e=this._target.ownerDocument,i=function(e){null!=t._handler.mouseDownOutsideEvent&&(e.composed&&t._target.contains(e.composedPath()[0])||null!==e.target&&t._target.contains(e.target)||t._handler.mouseDownOutsideEvent({x:0,y:0,pageX:0,pageY:0}))};this._unsubscribeOutsideTouchEvents=function(){e.removeEventListener("touchstart",i)},this._unsubscribeOutsideMouseEvents=function(){e.removeEventListener("mousedown",i)},e.addEventListener("mousedown",i),e.addEventListener("touchstart",i,{passive:!0}),ya()&&(this._unsubscribeMobileSafariEvents=function(){t._target.removeEventListener("dblclick",t._onMobileSafariDoubleClick)},this._target.addEventListener("dblclick",this._onMobileSafariDoubleClick)),this._target.addEventListener("mouseleave",this._mouseLeaveHandler.bind(this)),this._target.addEventListener("touchstart",this._touchStartHandler.bind(this),{passive:!0}),this._target.addEventListener("mousedown",function(t){if(1===t.button)return t.preventDefault(),!1}),this._target.addEventListener("mousedown",this._mouseDownHandler.bind(this)),this._initPinch(),this._target.addEventListener("touchmove",function(){},{passive:!1})},t.prototype._initPinch=function(){var t=this;(At(this._handler.pinchStartEvent)||At(this._handler.pinchEvent)||At(this._handler.pinchEndEvent))&&(this._target.addEventListener("touchstart",function(e){t._checkPinchState(e.touches)},{passive:!0}),this._target.addEventListener("touchmove",function(e){if(2===e.touches.length&&null!==t._startPinchMiddleCoordinate&&At(t._handler.pinchEvent)){var i=t._getTouchDistance(e.touches[0],e.touches[1]),n=i/t._startPinchDistance;t._handler.pinchEvent(K(K({},t._startPinchMiddleCoordinate),{pageX:0,pageY:0}),n),t._preventDefault(e)}},{passive:!1}),this._target.addEventListener("touchend",function(e){t._checkPinchState(e.touches)}))},t.prototype._checkPinchState=function(t){1===t.length&&(this._pinchPrevented=!1),2!==t.length||this._pinchPrevented||this._longTapActive?this._stopPinch():this._startPinch(t)},t.prototype._startPinch=function(t){var e,i=null!==(e=this._target.getBoundingClientRect())&&void 0!==e?e:{left:0,top:0};this._startPinchMiddleCoordinate={x:(t[0].clientX-i.left+(t[1].clientX-i.left))/2,y:(t[0].clientY-i.top+(t[1].clientY-i.top))/2},this._startPinchDistance=this._getTouchDistance(t[0],t[1]),At(this._handler.pinchStartEvent)&&this._handler.pinchStartEvent({x:0,y:0,pageX:0,pageY:0}),this._clearLongTapTimeout()},t.prototype._stopPinch=function(){null!==this._startPinchMiddleCoordinate&&(this._startPinchMiddleCoordinate=null,At(this._handler.pinchEndEvent)&&this._handler.pinchEndEvent({x:0,y:0,pageX:0,pageY:0}))},t.prototype._mouseLeaveHandler=function(t){var e,i,n;null===(e=this._unsubscribeMousemove)||void 0===e||e.call(this),null===(i=this._unsubscribeMouseWheel)||void 0===i||i.call(this),null===(n=this._unsubscribeContextMenu)||void 0===n||n.call(this),this._firesTouchEvents(t)||this._acceptMouseLeave&&(this._processEvent(this._makeCompatEvent(t),this._handler.mouseLeaveEvent),this._acceptMouseLeave=!ya())},t.prototype._longTapHandler=function(t){var e=this._touchWithId(t.touches,this._activeTouchId);null!==e&&(this._processEvent(this._makeCompatEvent(t,e),this._handler.longTapEvent),this._cancelTap=!0,this._longTapActive=!0)},t.prototype._firesTouchEvents=function(t){var e;return At(null===(e=t.sourceCapabilities)||void 0===e?void 0:e.firesTouchEvents)?t.sourceCapabilities.firesTouchEvents:this._eventTimeStamp(t)this._startScrollCoordinate.y-s.y){var d=s.x-this._startScrollCoordinate.x;c.getTimeScaleStore().scroll(d)}return!0;case Gi.X_AXIS:case Gi.Y_AXIS:var h=o.dispatchEvent("pressedMouseMoveEvent",s);return h&&(null===(n=s.preventDefault)||void 0===n||n.call(s),this._chart.updatePane(1)),h}}return!1},t.prototype.touchEndEvent=function(t){var e=this,i=this._findWidgetByEvent(t).widget;if(null!==i){var n=this._makeWidgetEvent(t,i),a=i.getName();switch(a){case Gi.MAIN:if(i.dispatchEvent("mouseUpEvent",n),null!==this._startScrollCoordinate){var r=(new Date).getTime()-this._flingStartTime,o=n.x-this._startScrollCoordinate.x,s=o/(r>0?r:1)*20;if(r<200&&Math.abs(s)>0){var l=this._chart.getChartStore().getTimeScaleStore(),c=function(){e._flingScrollRequestId=oe(function(){l.startScroll(),l.scroll(s),s*=.975,Math.abs(s)<1?null!==e._flingScrollRequestId&&(se(e._flingScrollRequestId),e._flingScrollRequestId=null):c()})};c()}}return!0;case Gi.X_AXIS:case Gi.Y_AXIS:var u=i.dispatchEvent("mouseUpEvent",n);u&&this._chart.updatePane(1)}}return!1},t.prototype.tapEvent=function(t){var e=this._findWidgetByEvent(t),i=e.pane,n=e.widget,a=!1;if(null!==n){var r=this._makeWidgetEvent(t,n),o=n.dispatchEvent("mouseClickEvent",r);if(n.getName()===Gi.MAIN){var s=this._makeWidgetEvent(t,n),l=this._chart.getChartStore(),c=l.getTooltipStore();o?(this._touchCancelCrosshair=!0,this._touchCoordinate=null,c.setCrosshair(void 0,{notInvalidate:!0}),a=!0):(this._touchCancelCrosshair||this._touchZoomed||(this._touchCoordinate={x:s.x,y:s.y},c.setCrosshair({x:s.x,y:s.y,paneId:null===i||void 0===i?void 0:i.getId()},{notInvalidate:!0}),a=!0),this._touchCancelCrosshair=!1)}(a||o)&&this._chart.updatePane(1)}return a},t.prototype.doubleTapEvent=function(t){return this.mouseDoubleClickEvent(t)},t.prototype.longTapEvent=function(t){var e=this._findWidgetByEvent(t),i=e.pane,n=e.widget;if(null!==n&&n.getName()===Gi.MAIN){var a=this._makeWidgetEvent(t,n);return this._touchCoordinate={x:a.x,y:a.y},this._chart.getChartStore().getTooltipStore().setCrosshair({x:a.x,y:a.y,paneId:null===i||void 0===i?void 0:i.getId()}),!0}return!1},t.prototype._findWidgetByEvent=function(t){var e,i,n,a,r=t.x,o=t.y,s=this._chart.getAllSeparatorPanes(),l=this._chart.getChartStore().getStyles().separator.size;try{for(var c=G(s),u=c.next();!u.done;u=c.next()){var d=Z(u.value,2),h=d[1],p=h.getBounding(),v=p.top-Math.round((Zi-l)/2);if(r>=p.left&&r<=p.left+p.width&&o>=v&&o<=v+Zi)return{pane:h,widget:h.getWidget()}}}catch(k){e={error:k}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(e)throw e.error}}var f=this._chart.getAllDrawPanes(),g=null;try{for(var m=G(f),y=m.next();!y.done;y=m.next()){var _=y.value;p=_.getBounding();if(r>=p.left&&r<=p.left+p.width&&o>=p.top&&o<=p.top+p.height){g=_;break}}}catch(I){n={error:I}}finally{try{y&&!y.done&&(a=m.return)&&a.call(m)}finally{if(n)throw n.error}}var b=null;if(null!==g){if(null===b){var x=g.getMainWidget(),w=x.getBounding();r>=w.left&&r<=w.left+w.width&&o>=w.top&&o<=w.top+w.height&&(b=x)}if(null===b){var S=g.getYAxisWidget();if(null!==S){var C=S.getBounding();r>=C.left&&r<=C.left+C.width&&o>=C.top&&o<=C.top+C.height&&(b=S)}}}return{pane:g,widget:b}},t.prototype._makeWidgetEvent=function(t,e){var i,n,a,r=null!==(i=null===e||void 0===e?void 0:e.getBounding())&&void 0!==i?i:null;return K(K({},t),{x:t.x-(null!==(n=null===r||void 0===r?void 0:r.left)&&void 0!==n?n:0),y:t.y-(null!==(a=null===r||void 0===r?void 0:r.top)&&void 0!==a?a:0)})},t.prototype.destroy=function(){this._container.removeEventListener("keydown",this._boundKeyBoardDownEvent),this._event.destroy()},t}();(function(t){t["Root"]="root",t["Main"]="main",t["YAxis"]="yAxis"})(_a||(_a={}));var Sa=function(){function t(t,e){this._drawPanes=[],this._separatorPanes=new Map,this._initContainer(t),this._chartEvent=new wa(this._chartContainer,this),this._chartStore=new Ui(this,e),this._initPanes(e),this.adjustPaneViewport(!0,!0,!0)}return t.prototype._initContainer=function(t){this._container=t,this._chartContainer=he("div",{position:"relative",width:"100%",outline:"none",borderStyle:"none",cursor:"crosshair",boxSizing:"border-box",userSelect:"none",webkitUserSelect:"none",msUserSelect:"none",MozUserSelect:"none",webkitTapHighlightColor:"transparent"}),this._chartContainer.tabIndex=1,t.appendChild(this._chartContainer)},t.prototype._initPanes=function(t){var e,i=this,n=null!==(e=null===t||void 0===t?void 0:t.layout)&&void 0!==e?e:[{type:"candle"}],a=!1,r=!1,o=function(t){if(!r){var e=i._createPane(pa,Wi.X_AXIS,null!==t&&void 0!==t?t:{});i._xAxisPane=e,r=!0}};n.forEach(function(t){var e,n,r;switch(t.type){case"candle":if(!a){var s=null!==(e=t.options)&&void 0!==e?e:{};wt(s,{id:Wi.CANDLE}),i._candlePane=i._createPane(aa,Wi.CANDLE,s);var l=null!==(n=t.content)&&void 0!==n?n:[];l.forEach(function(t){i.createIndicator(t,!0,s)}),a=!0}break;case"indicator":var c;l=null!==(r=t.content)&&void 0!==r?r:[];if(l.length>0)l.forEach(function(e){At(c)?i.createIndicator(e,!0,{id:c}):c=i.createIndicator(e,!0,t.options)});break;case"xAxis":o(t.options);break}}),o({position:"bottom"})},t.prototype._createPane=function(t,e,i){var n,a=null,r=null,o=null===i||void 0===i?void 0:i.position;switch(o){case"top":var s=this._drawPanes[0];At(s)&&(r=new t(this._chartContainer,s.getContainer(),this,e,null!==i&&void 0!==i?i:{}),a=0);break;case"bottom":break;default:for(var l=this._drawPanes.length-1;l>-1;l--){var c=this._drawPanes[l],u=this._drawPanes[l-1];if("bottom"===(null===c||void 0===c?void 0:c.getOptions().position)&&"bottom"!==(null===u||void 0===u?void 0:u.getOptions().position)){r=new t(this._chartContainer,c.getContainer(),this,e,null!==i&&void 0!==i?i:{}),a=l;break}}}if(At(r)||(r=new t(this._chartContainer,null,this,e,null!==i&&void 0!==i?i:{})),Et(a)?(this._drawPanes.splice(a,0,r),n=a):(this._drawPanes.push(r),n=this._drawPanes.length-1),r.getId()!==Wi.X_AXIS){var d=this._drawPanes[n+1];if(At(d)&&d.getId()===Wi.X_AXIS&&(d=this._drawPanes[n+2]),At(d)){var h=this._separatorPanes.get(d);At(h)?h.setTopPane(r):(h=new ga(this._chartContainer,d.getContainer(),this,"",r,d),this._separatorPanes.set(d,h))}var p=this._drawPanes[n-1];if(At(p)&&p.getId()===Wi.X_AXIS&&(p=this._drawPanes[n-2]),At(p)){h=new ga(this._chartContainer,r.getContainer(),this,"",p,r);this._separatorPanes.set(r,h)}}return r},t.prototype._measurePaneHeight=function(){var t,e=this,i=Math.floor(this._container.clientHeight),n=this._chartStore.getStyles().separator.size,a=this._xAxisPane.getAxisComponent().getAutoSize(),r=i-a-this._separatorPanes.size*n;r<0&&(r=0);var o=0;this._drawPanes.forEach(function(t){if(t.getId()!==Wi.CANDLE&&t.getId()!==Wi.X_AXIS){var e=t.getBounding().height,i=t.getOptions().minHeight;er?(o=r,e=Math.max(r-o,0)):o+=e,t.setBounding({height:e})}});var s=r-o;null===(t=this._candlePane)||void 0===t||t.setBounding({height:s}),this._xAxisPane.setBounding({height:a});var l=0;this._drawPanes.forEach(function(t){var i=e._separatorPanes.get(t);At(i)&&(i.setBounding({height:n,top:l}),l+=n),t.setBounding({top:l}),l+=t.getBounding().height})},t.prototype._measurePaneWidth=function(){var t=this,e=Math.floor(this._container.clientWidth),i=this._chartStore.getStyles(),n=i.yAxis,a=n.position===Y.Left,r=!n.inside,o=0,s=0,l=0,c=0;this._drawPanes.forEach(function(t){t.getId()!==Wi.X_AXIS&&(s=Math.max(s,t.getAxisComponent().getAutoSize()))}),s>e&&(s=e),r?(o=e-s,a?(l=0,c=s):(l=e-s,c=0)):(o=e,c=0,l=a?0:e-s),this._chartStore.getTimeScaleStore().setTotalBarSpace(o);var u,d={width:e},h={width:o,left:c},p={width:s,left:l},v=i.separator.fill;u=r&&!v?h:d,this._drawPanes.forEach(function(e){var i;null===(i=t._separatorPanes.get(e))||void 0===i||i.setBounding(u),e.setBounding(d,h,p)})},t.prototype._setPaneOptions=function(t,e){var i,n;if(Mt(t.id)){var a=this.getDrawPaneById(t.id),r=!1;if(null!==a){var o=e;if(t.id!==Wi.CANDLE&&Et(t.height)&&t.height>0){var s=Math.max(null!==(i=t.minHeight)&&void 0!==i?i:a.getOptions().minHeight,0),l=Math.max(s,t.height);a.setBounding({height:l}),o=!0,r=!0}(Mt(null===(n=t.axisOptions)||void 0===n?void 0:n.name)||At(t.gap))&&(o=!0),a.setOptions(t),o&&this.adjustPaneViewport(r,!0,!0,!0,!0)}}},t.prototype.getDrawPaneById=function(t){if(t===Wi.CANDLE)return this._candlePane;if(t===Wi.X_AXIS)return this._xAxisPane;var e=this._drawPanes.find(function(e){return e.getId()===t});return null!==e&&void 0!==e?e:null},t.prototype.getContainer=function(){return this._container},t.prototype.getChartStore=function(){return this._chartStore},t.prototype.getXAxisPane=function(){return this._xAxisPane},t.prototype.getAllDrawPanes=function(){return this._drawPanes},t.prototype.getAllSeparatorPanes=function(){return this._separatorPanes},t.prototype.adjustPaneViewport=function(t,e,i,n,a){t&&this._measurePaneHeight();var r=e,o=null!==n&&void 0!==n&&n,s=null!==a&&void 0!==a&&a;(o||s)&&this._drawPanes.forEach(function(t){var e=t.getAxisComponent().buildTicks(s);r||(r=e)}),r&&this._measurePaneWidth(),null!==i&&void 0!==i&&i&&(this._xAxisPane.getAxisComponent().buildTicks(!0),this.updatePane(4))},t.prototype.updatePane=function(t,e){if(At(e)){var i=this.getDrawPaneById(e);null===i||void 0===i||i.update(t)}else this._separatorPanes.forEach(function(e){e.update(t)}),this._drawPanes.forEach(function(e){e.update(t)})},t.prototype.crosshairChange=function(t){var e=this,i=this._chartStore.getActionStore();if(i.has(Tt.OnCrosshairChange)){var n={};this._drawPanes.forEach(function(i){var a=i.getId(),r={},o=e._chartStore.getIndicatorStore().getInstances(a);o.forEach(function(e){var i,n=e.result;r[e.name]=n[null!==(i=t.dataIndex)&&void 0!==i?i:n.length-1]}),n[a]=r}),Mt(t.paneId)&&i.execute(Tt.OnCrosshairChange,K(K({},t),{indicatorData:n}))}},t.prototype.getDom=function(t,e){var i,n;if(!Mt(t))return this._chartContainer;var a=this.getDrawPaneById(t);if(null!==a){var r=null!==e&&void 0!==e?e:_a.Root;switch(r){case _a.Root:return a.getContainer();case _a.Main:return a.getMainWidget().getContainer();case _a.YAxis:return null!==(n=null===(i=a.getYAxisWidget())||void 0===i?void 0:i.getContainer())&&void 0!==n?n:null}}return null},t.prototype.getSize=function(t,e){var i,n;if(!At(t))return{width:Math.floor(this._chartContainer.clientWidth),height:Math.floor(this._chartContainer.clientHeight),left:0,top:0,right:0,bottom:0};var a=this.getDrawPaneById(t);if(null!==a){var r=null!==e&&void 0!==e?e:_a.Root;switch(r){case _a.Root:return a.getBounding();case _a.Main:return a.getMainWidget().getBounding();case _a.YAxis:return null!==(n=null===(i=a.getYAxisWidget())||void 0===i?void 0:i.getBounding())&&void 0!==n?n:null}}return null},t.prototype.setStyles=function(t){var e,i,n;this._chartStore.setOptions({styles:t}),n=Mt(t)?ji(t):t,At(null===(e=null===n||void 0===n?void 0:n.yAxis)||void 0===e?void 0:e.type)&&(null===(i=this._candlePane)||void 0===i||i.getAxisComponent().setAutoCalcTickFlag(!0)),this.adjustPaneViewport(!0,!0,!0,!0,!0)},t.prototype.getStyles=function(){return this._chartStore.getStyles()},t.prototype.setLocale=function(t){this._chartStore.setOptions({locale:t}),this.adjustPaneViewport(!0,!0,!0,!0,!0)},t.prototype.getLocale=function(){return this._chartStore.getLocale()},t.prototype.setCustomApi=function(t){this._chartStore.setOptions({customApi:t}),this.adjustPaneViewport(!0,!0,!0,!0,!0)},t.prototype.setPriceVolumePrecision=function(t,e){this._chartStore.setPrecision({price:t,volume:e})},t.prototype.getPriceVolumePrecision=function(){return this._chartStore.getPrecision()},t.prototype.setTimezone=function(t){this._chartStore.setOptions({timezone:t}),this._xAxisPane.getAxisComponent().buildTicks(!0),this._xAxisPane.update(3)},t.prototype.getTimezone=function(){return this._chartStore.getTimeScaleStore().getTimezone()},t.prototype.setOffsetRightDistance=function(t){this._chartStore.getTimeScaleStore().setOffsetRightDistance(t,!0)},t.prototype.getOffsetRightDistance=function(){return this._chartStore.getTimeScaleStore().getOffsetRightDistance()},t.prototype.setMaxOffsetLeftDistance=function(t){t<0?_t("setMaxOffsetLeftDistance","distance","distance must greater than zero!!!"):this._chartStore.getTimeScaleStore().setMaxOffsetLeftDistance(t)},t.prototype.setMaxOffsetRightDistance=function(t){t<0?_t("setMaxOffsetRightDistance","distance","distance must greater than zero!!!"):this._chartStore.getTimeScaleStore().setMaxOffsetRightDistance(t)},t.prototype.setLeftMinVisibleBarCount=function(t){t<0?_t("setLeftMinVisibleBarCount","barCount","barCount must greater than zero!!!"):this._chartStore.getTimeScaleStore().setLeftMinVisibleBarCount(Math.ceil(t))},t.prototype.setRightMinVisibleBarCount=function(t){t<0?_t("setRightMinVisibleBarCount","barCount","barCount must greater than zero!!!"):this._chartStore.getTimeScaleStore().setRightMinVisibleBarCount(Math.ceil(t))},t.prototype.setBarSpace=function(t){this._chartStore.getTimeScaleStore().setBarSpace(t)},t.prototype.getBarSpace=function(){return this._chartStore.getTimeScaleStore().getBarSpace().bar},t.prototype.getVisibleRange=function(){return this._chartStore.getTimeScaleStore().getVisibleRange()},t.prototype.clearData=function(){this._chartStore.clear()},t.prototype.getDataList=function(){return this._chartStore.getDataList()},t.prototype.applyNewData=function(t,e,i){At(i)&&_t("applyNewData","","param `callback` has been deprecated since version 9.8.0, use `subscribeAction('onDataReady')` instead."),this._chartStore.addData(t,Yt.Init,e).then(function(){}).catch(function(){}).finally(function(){null===i||void 0===i||i()})},t.prototype.applyMoreData=function(t,e,i){_t("","","Api `applyMoreData` has been deprecated since version 9.8.0."),this._chartStore.addData(t,Yt.Forward,null===e||void 0===e||e).then(function(){}).catch(function(){}).finally(function(){null===i||void 0===i||i()})},t.prototype.updateData=function(t,e){At(e)&&_t("updateData","","param `callback` has been deprecated since version 9.8.0, use `subscribeAction('onDataReady')` instead."),this._chartStore.addData(t).then(function(){}).catch(function(){}).finally(function(){null===e||void 0===e||e()})},t.prototype.loadMore=function(t){_t("","","Api `loadMore` has been deprecated since version 9.8.0, use `setLoadDataCallback` instead."),this._chartStore.setLoadMoreCallback(t)},t.prototype.setLoadDataCallback=function(t){this._chartStore.setLoadDataCallback(t)},t.prototype.createIndicator=function(t,e,i,n){var a,r=this,o=Mt(t)?{name:t}:t;if(null===ri(o.name))return _t("createIndicator","value","indicator not supported, you may need to use registerIndicator to add one!!!"),null;var s=null===i||void 0===i?void 0:i.id,l=this.getDrawPaneById(null!==s&&void 0!==s?s:"");if(null!==l)this._chartStore.getIndicatorStore().addInstance(o,null!==s&&void 0!==s?s:"",null!==e&&void 0!==e&&e).then(function(t){var e;r._setPaneOptions(null!==i&&void 0!==i?i:{},null!==(e=l.getAxisComponent().buildTicks(!0))&&void 0!==e&&e)}).catch(function(t){});else{null!==s&&void 0!==s||(s=de(Wi.INDICATOR));var c=this._createPane(na,s,null!==i&&void 0!==i?i:{}),u=null!==(a=null===i||void 0===i?void 0:i.height)&&void 0!==a?a:Vi;c.setBounding({height:u}),this._chartStore.getIndicatorStore().addInstance(o,s,null!==e&&void 0!==e&&e).finally(function(){r.adjustPaneViewport(!0,!0,!0,!0,!0),null===n||void 0===n||n()})}return null!==s&&void 0!==s?s:null},t.prototype.overrideIndicator=function(t,e,i){var n=this;this._chartStore.getIndicatorStore().override(t,null!==e&&void 0!==e?e:null).then(function(t){var e=Z(t,2),a=e[0],r=e[1];(a||r)&&(n.adjustPaneViewport(!1,r,!0,r),null===i||void 0===i||i())}).catch(function(){})},t.prototype.getIndicatorByPaneId=function(t,e){return this._chartStore.getIndicatorStore().getInstanceByPaneId(t,e)},t.prototype.removeIndicator=function(t,e){var i,n,a,r=this._chartStore.getIndicatorStore(),o=r.removeInstance(t,e);if(o){var s=!1;if(t!==Wi.CANDLE&&!r.hasInstances(t)){var l=this.getDrawPaneById(t),c=this._drawPanes.findIndex(function(e){return e.getId()===t});if(null!==l){s=!0;var u=this._separatorPanes.get(l);if(At(u)){var d=null===u||void 0===u?void 0:u.getTopPane();try{for(var h=G(this._separatorPanes),p=h.next();!p.done;p=h.next()){var v=p.value;if(v[1].getTopPane().getId()===l.getId()){v[1].setTopPane(d);break}}}catch(g){i={error:g}}finally{try{p&&!p.done&&(n=h.return)&&n.call(h)}finally{if(i)throw i.error}}u.destroy(),this._separatorPanes.delete(l)}this._drawPanes.splice(c,1),l.destroy();var f=this._drawPanes[0];At(f)&&f.getId()===Wi.X_AXIS&&(f=this._drawPanes[1]),null===(a=this._separatorPanes.get(f))||void 0===a||a.destroy(),this._separatorPanes.delete(f)}}this.adjustPaneViewport(s,!0,!0,!0,!0)}},t.prototype.createOverlay=function(t,e){var i=[];if(Mt(t))i=[{name:t}];else if(Ct(t))i=t.map(function(t){return Mt(t)?{name:t}:t});else{var n=t;i=[n]}var a=!0;At(e)&&null!==this.getDrawPaneById(e)||(e=Wi.CANDLE,a=!1);var r=this._chartStore.getOverlayStore().addInstances(i,e,a);return Ct(t)?r:r[0]},t.prototype.getOverlayById=function(t){return this._chartStore.getOverlayStore().getInstanceById(t)},t.prototype.overrideOverlay=function(t){this._chartStore.getOverlayStore().override(t)},t.prototype.removeOverlay=function(t){var e;At(t)&&(e=Mt(t)?{id:t}:t),this._chartStore.getOverlayStore().removeInstance(e)},t.prototype.setPaneOptions=function(t){this._setPaneOptions(t,!1)},t.prototype.setZoomEnabled=function(t){this._chartStore.getTimeScaleStore().setZoomEnabled(t)},t.prototype.isZoomEnabled=function(){return this._chartStore.getTimeScaleStore().getZoomEnabled()},t.prototype.setScrollEnabled=function(t){this._chartStore.getTimeScaleStore().setScrollEnabled(t)},t.prototype.isScrollEnabled=function(){return this._chartStore.getTimeScaleStore().getScrollEnabled()},t.prototype.scrollByDistance=function(t,e){var i=Et(e)&&e>0?e:0,n=this._chartStore.getTimeScaleStore();if(n.startScroll(),i>0){var a=new le({duration:i});a.doFrame(function(e){var a=t*(e/i);n.scroll(a)}),a.start()}else n.scroll(t)},t.prototype.scrollToRealTime=function(t){var e=this._chartStore.getTimeScaleStore(),i=e.getBarSpace().bar,n=e.getLastBarRightSideDiffBarCount()-e.getInitialOffsetRightDistance()/i,a=n*i;this.scrollByDistance(a,t)},t.prototype.scrollToDataIndex=function(t,e){var i=this._chartStore.getTimeScaleStore(),n=(i.getLastBarRightSideDiffBarCount()+(this.getDataList().length-1-t))*i.getBarSpace().bar;this.scrollByDistance(n,e)},t.prototype.scrollToTimestamp=function(t,e){var i=pe(this.getDataList(),"timestamp",t);this.scrollToDataIndex(i,e)},t.prototype.zoomAtCoordinate=function(t,e,i){var n=Et(i)&&i>0?i:0,a=this._chartStore.getTimeScaleStore(),r=a.getBarSpace().bar,o=r*t,s=o-r;if(n>0){var l=0,c=new le({duration:n});c.doFrame(function(t){var i=s*(t/n),r=(i-l)/a.getBarSpace().bar*ke;a.zoom(r,e),l=i}),c.start()}else a.zoom(s/r*ke,e)},t.prototype.zoomAtDataIndex=function(t,e,i){var n=this._chartStore.getTimeScaleStore().dataIndexToCoordinate(e);this.zoomAtCoordinate(t,{x:n,y:0},i)},t.prototype.zoomAtTimestamp=function(t,e,i){var n=pe(this.getDataList(),"timestamp",e);this.zoomAtDataIndex(t,n,i)},t.prototype.convertToPixel=function(t,e){var i,n=e.paneId,a=void 0===n?Wi.CANDLE:n,r=e.absolute,o=void 0!==r&&r,s=[];if(a!==Wi.X_AXIS){var l=this.getDrawPaneById(a);if(null!==l){var c=this._chartStore.getTimeScaleStore(),u=l.getBounding(),d=(new Array).concat(t),h=this._xAxisPane.getAxisComponent(),p=l.getAxisComponent();s=d.map(function(t){var e={},i=t.dataIndex;if(Et(t.timestamp)&&(i=c.timestampToDataIndex(t.timestamp)),Et(i)&&(e.x=null===h||void 0===h?void 0:h.convertToPixel(i)),Et(t.value)){var n=null===p||void 0===p?void 0:p.convertToPixel(t.value);e.y=o?u.top+n:n}return e})}}return Ct(t)?s:null!==(i=s[0])&&void 0!==i?i:{}},t.prototype.convertFromPixel=function(t,e){var i,n=e.paneId,a=void 0===n?Wi.CANDLE:n,r=e.absolute,o=void 0!==r&&r,s=[];if(a!==Wi.X_AXIS){var l=this.getDrawPaneById(a);if(null!==l){var c=this._chartStore.getTimeScaleStore(),u=l.getBounding(),d=(new Array).concat(t),h=this._xAxisPane.getAxisComponent(),p=l.getAxisComponent();s=d.map(function(t){var e,i,n={};if(Et(t.x)){var a=null!==(e=null===h||void 0===h?void 0:h.convertFromPixel(t.x))&&void 0!==e?e:-1;n.dataIndex=a,n.timestamp=null!==(i=c.dataIndexToTimestamp(a))&&void 0!==i?i:void 0}if(Et(t.y)){var r=o?t.y-u.top:t.y;n.value=p.convertFromPixel(r)}return n})}}return Ct(t)?s:null!==(i=s[0])&&void 0!==i?i:{}},t.prototype.executeAction=function(t,e){var i;switch(t){case Tt.OnCrosshairChange:var n=K({},e);n.paneId=null!==(i=n.paneId)&&void 0!==i?i:Wi.CANDLE,this._chartStore.getTooltipStore().setCrosshair(n,{notExecuteAction:!0});break}},t.prototype.subscribeAction=function(t,e){this._chartStore.getActionStore().subscribe(t,e)},t.prototype.unsubscribeAction=function(t,e){this._chartStore.getActionStore().unsubscribe(t,e)},t.prototype.getConvertPictureUrl=function(t,e,i){var n=this,a=this._chartContainer.clientWidth,r=this._chartContainer.clientHeight,o=he("canvas",{width:"".concat(a,"px"),height:"".concat(r,"px"),boxSizing:"border-box"}),s=o.getContext("2d"),l=Wt(o);o.width=a*l,o.height=r*l,s.scale(l,l),s.fillStyle=null!==i&&void 0!==i?i:"#FFFFFF",s.fillRect(0,0,a,r);var c=null!==t&&void 0!==t&&t;return this._drawPanes.forEach(function(t){var e=n._separatorPanes.get(t);if(At(e)){var i=e.getBounding();s.drawImage(e.getImage(c),i.left,i.top,i.width,i.height)}var r=t.getBounding();s.drawImage(t.getImage(c),0,r.top,a,r.height)}),o.toDataURL("image/".concat(null!==e&&void 0!==e?e:"jpeg"))},t.prototype.resize=function(){this.adjustPaneViewport(!0,!0,!0,!0,!0)},t.prototype.destroy=function(){this._chartEvent.destroy(),this._drawPanes.forEach(function(t){t.destroy()}),this._drawPanes=[],this._separatorPanes.forEach(function(t){t.destroy()}),this._separatorPanes.clear(),this._container.removeChild(this._chartContainer)},t}(),Ca=new Map,ka=1;function Ia(t,e){var i;if(xt(),i=Mt(t)?document.getElementById(t):t,null===i)return bt("","","The chart cannot be initialized correctly. Please check the parameters. The chart container cannot be null and child elements need to be added!!!"),null;var n=Ca.get(i.id);if(At(n))return _t("","","The chart has been initialized on the dom!!!"),n;var a="k_line_chart_".concat(ka++);return n=new Sa(i,e),n.id=a,i.setAttribute("k-line-chart-id",a),Ca.set(a,n),n}var Ea=i(21396),Aa=i.n(Ea);function Pa(t,e,i,n){if(!t||!e||!i||!n)return t;try{var a=Aa().enc.Base64.parse(t),r=Aa().lib.WordArray.create(a.words.slice(0,4)),o=Aa().lib.WordArray.create(a.words.slice(4)),s=Aa().enc.Base64.parse(n),l=Aa().AES.decrypt({ciphertext:o},s,{iv:r,mode:Aa().mode.CBC,padding:Aa().pad.Pkcs7}),c=l.toString(Aa().enc.Utf8);return c||t}catch(u){return t}}function Ma(t,e){return Da.apply(this,arguments)}function Da(){return Da=(0,c.A)((0,l.A)().m(function t(e,i){var n,a;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e&&i){t.n=1;break}throw new Error("用户ID和指标ID不能为空");case 1:return t.p=1,t.n=2,(0,v.Ay)({url:"/api/indicator/getDecryptKey",method:"post",data:{userid:e,indicatorId:i}});case 2:if(n=t.v,1!==n.code||!n.data||!n.data.key){t.n=3;break}return t.a(2,n.data.key);case 3:throw new Error(n.msg||"获取解密密钥失败");case 4:t.n=6;break;case 5:throw t.p=5,a=t.v,new Error("无法获取解密密钥,请检查网络连接或联系管理员: "+(a.message||"未知错误"));case 6:return t.a(2)}},t,null,[[1,5]])})),Da.apply(this,arguments)}function Ta(t,e,i){return Ba.apply(this,arguments)}function Ba(){return Ba=(0,c.A)((0,l.A)().m(function t(e,i,n){var a;return(0,l.A)().w(function(t){while(1)switch(t.n){case 0:return t.n=1,Ma(i,n);case 1:return a=t.v,t.a(2,Pa(e,i,n,a))}},t)})),Ba.apply(this,arguments)}function Fa(t,e){if(1===e||!0===e)return!0;if(t&&t.length>100)try{var i=atob(t);if(i.length>50)return!0}catch(n){}return!1}var Ra={name:"KlineChart",props:{symbol:{type:String,default:""},market:{type:String,default:""},timeframe:{type:String,default:"1H"},theme:{type:String,default:"light"},activeIndicators:{type:Array,default:function(){return[]}},realtimeEnabled:{type:Boolean,default:!1},userId:{type:Number,default:null}},emits:["retry","price-change","load","indicator-toggle"],setup:function(t,e){var i=e.emit,n=(0,h.IJ)([]),a=(0,h.KR)(!1),r=(0,h.KR)(null),s=(0,h.KR)(!1),u=(0,h.KR)(!0),p=null,f=(0,h.KR)(!1),g=(0,h.IJ)(null),m=(0,h.KR)(t.theme||"light"),y=(0,h.KR)(null),b=(0,h.KR)(5e3),x=(0,h.KR)(!1),w=(0,h.KR)(1e4),S=(0,h.KR)(0),C=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(g.value){var e=Date.now(),i=Number(w.value||1e4);(t||!S.value||e-S.value>=i)&&(S.value=e,xt())}},k=(0,h.KR)([]),I=(0,h.KR)([]),E=(0,h.KR)([]),A=(0,h.KR)(null),P=(0,h.nI)(),M=P.proxy,D=(0,h.EW)(function(){return[{name:"line",title:M.$t("dashboard.indicator.drawing.line"),icon:"line"},{name:"horizontalLine",title:M.$t("dashboard.indicator.drawing.horizontalLine"),icon:"minus"},{name:"verticalLine",title:M.$t("dashboard.indicator.drawing.verticalLine"),icon:"column-width"},{name:"ray",title:M.$t("dashboard.indicator.drawing.ray"),icon:"arrow-right"},{name:"straightLine",title:M.$t("dashboard.indicator.drawing.straightLine"),icon:"menu"},{name:"parallelStraightLine",title:M.$t("dashboard.indicator.drawing.parallelLine"),icon:"menu"},{name:"priceLine",title:M.$t("dashboard.indicator.drawing.priceLine"),icon:"dollar"},{name:"priceChannelLine",title:M.$t("dashboard.indicator.drawing.priceChannel"),icon:"border"},{name:"fibonacciLine",title:M.$t("dashboard.indicator.drawing.fibonacciLine"),icon:"rise"},{name:"measure",title:M.$t("dashboard.indicator.drawing.measure"),icon:"drag"}]}),R=(0,h.KR)([{id:"sma",name:"SMA (简单移动平均)",shortName:"SMA",type:"line",defaultParams:{length:20}},{id:"ema",name:"EMA (指数移动平均)",shortName:"EMA",type:"line",defaultParams:{length:20}},{id:"rsi",name:"RSI (相对强弱)",shortName:"RSI",type:"line",defaultParams:{length:14}},{id:"macd",name:"MACD",shortName:"MACD",type:"macd",defaultParams:{fast:12,slow:26,signal:9}},{id:"bb",name:"布林带 (Bollinger Bands)",shortName:"BB",type:"band",defaultParams:{length:20,mult:2}},{id:"atr",name:"ATR (平均真实波幅)",shortName:"ATR",type:"line",defaultParams:{period:14}},{id:"cci",name:"CCI (商品通道指数)",shortName:"CCI",type:"line",defaultParams:{length:20}},{id:"williams",name:"Williams %R (威廉指标)",shortName:"W%R",type:"line",defaultParams:{length:14}},{id:"mfi",name:"MFI (资金流量指标)",shortName:"MFI",type:"line",defaultParams:{length:14}},{id:"adx",name:"ADX (平均趋向指数)",shortName:"ADX",type:"adx",defaultParams:{length:14}},{id:"obv",name:"OBV (能量潮)",shortName:"OBV",type:"line",defaultParams:{}},{id:"adosc",name:"ADOSC (积累/派发振荡器)",shortName:"ADOSC",type:"line",defaultParams:{fast:3,slow:10}},{id:"ad",name:"AD (积累/派发线)",shortName:"AD",type:"line",defaultParams:{}},{id:"kdj",name:"KDJ (随机指标)",shortName:"KDJ",type:"line",defaultParams:{period:9,k:3,d:3}}]),L=function(e){return t.activeIndicators.some(function(t){return t.id===e})},N=function(t){if(g.value){var e={line:"segment",horizontalLine:"horizontalStraightLine",verticalLine:"verticalStraightLine",ray:"rayLine",straightLine:"straightLine",parallelStraightLine:"parallelStraightLine",priceLine:"priceLine",priceChannelLine:"priceChannelLine",fibonacciLine:"fibonacciLine",measure:"priceRangeMeasure"},i=e[t]||t;if(A.value!==t){A.value=t;try{var n=["priceRangeMeasure"];if(n.includes(i)){if("function"!==typeof g.value.overrideOverlay)return void(A.value=null);g.value.overrideOverlay({name:i,lock:!1})}else{var a={name:i,lock:!1,extendData:{isDrawing:!0}},r=g.value.createOverlay(a);r?E.value.push(r):A.value=null}}catch(o){A.value=null}}else{A.value=null;try{"function"===typeof g.value.overrideOverlay&&g.value.overrideOverlay(null)}catch(s){}}}},O=function(){if(g.value)try{E.value.forEach(function(t){try{"function"===typeof g.value.removeOverlay?g.value.removeOverlay(t):"function"===typeof g.value.removeOverlayById&&g.value.removeOverlayById(t)}catch(e){}}),E.value=[],A.value=null,"function"===typeof g.value.overrideOverlay&&g.value.overrideOverlay(null)}catch(t){}},z=function(t){var e=L(t.id);if(e)i("indicator-toggle",{action:"remove",indicator:{id:t.id}});else{var n=(0,d.A)((0,d.A)({},t),{},{params:(0,d.A)({},t.defaultParams),calculate:null});i("indicator-toggle",{action:"add",indicator:n})}},V=(0,h.KR)(null),W=(0,h.KR)(!1),H=(0,h.KR)(!1),$=(0,h.KR)(!1),Y=(0,h.EW)(function(){return"dark"===m.value?{backgroundColor:"#141414",textColor:"#d1d4dc",textColorSecondary:"#787b86",borderColor:"#2a2a2a",gridLineColor:"#252525",gridLineColorDashed:"#363c4e",tooltipBg:"rgba(25, 27, 32, 0.95)",tooltipBorder:"#333",tooltipText:"#ccc",tooltipTextSecondary:"#888",axisLabelColor:"#787b86",splitAreaColor:["rgba(250,250,250,0.05)","rgba(200,200,200,0.02)"],dataZoomBorder:"#2a2a2a",dataZoomFiller:"rgba(41, 98, 255, 0.15)",dataZoomHandle:"#13c2c2",dataZoomText:"transparent",dataZoomBg:"#252525"}:{backgroundColor:"#fff",textColor:"#333",textColorSecondary:"#666",borderColor:"#e8e8e8",gridLineColor:"#e8e8e8",gridLineColorDashed:"#e8e8e8",tooltipBg:"rgba(255, 255, 255, 0.95)",tooltipBorder:"#e8e8e8",tooltipText:"#333",tooltipTextSecondary:"#666",axisLabelColor:"#666",splitAreaColor:["rgba(250,250,250,0.05)","rgba(200,200,200,0.02)"],dataZoomBorder:"#e8e8e8",dataZoomFiller:"rgba(24, 144, 255, 0.15)",dataZoomHandle:"#1890ff",dataZoomText:"#999",dataZoomBg:"#f0f2f5"}}),X=function(t){return"dark"===m.value?["#13c2c2","#e040fb","#ffeb3b","#00e676","#ff6d00","#9c27b0"][t%6]:["#13c2c2","#9c27b0","#f57c00","#1976d2","#c2185b","#7b1fa2"][t%6]},K=function(){return new Promise(function(t,e){if(window.pyodide)return V.value=window.pyodide,H.value=!0,void t(window.pyodide);W.value=!0;var i="0.25.0",n=function(t){return t&&t.endsWith("/")?t:t?t+"/":t},a="/assets/pyodide/v".concat(i,"/full/"),r="https://cdn.jsdelivr.net/pyodide/v".concat(i,"/full/"),o=n({NODE_ENV:"production",VUE_APP_API_BASE_URL:"/api",VUE_APP_PREVIEW:"false",BASE_URL:"/"}.VUE_APP_PYODIDE_LOCAL_BASE||a),s=n({NODE_ENV:"production",VUE_APP_API_BASE_URL:"/api",VUE_APP_PREVIEW:"false",BASE_URL:"/"}.VUE_APP_PYODIDE_CDN_BASE||r),u=({NODE_ENV:"production",VUE_APP_API_BASE_URL:"/api",VUE_APP_PREVIEW:"false",BASE_URL:"/"}.VUE_APP_PYODIDE_PREFER_CDN||"").toString().toLowerCase(),d=!u||("true"===u||"1"===u||"yes"===u),h=function(t){return new Promise(function(e,i){var n=document.querySelector('script[data-pyodide-src="'.concat(t,'"]'));if(n)return"function"===typeof window.loadPyodide?e():(n.addEventListener("load",function(){return e()},{once:!0}),void n.addEventListener("error",function(){return i(new Error("Pyodide 脚本加载失败"))},{once:!0}));var a=document.createElement("script");a.dataset.pyodideSrc=t,a.src=t,a.onload=function(){return e()},a.onerror=function(){return i(new Error("Pyodide 脚本加载失败"))},document.head.appendChild(a)})},p=function(){var e=(0,c.A)((0,l.A)().m(function e(i){return(0,l.A)().w(function(e){while(1)switch(e.n){case 0:if("function"===typeof window.loadPyodide){e.n=1;break}throw new Error("loadPyodide 函数未找到");case 1:return e.n=2,window.loadPyodide({indexURL:i});case 2:return window.pyodide=e.v,e.n=3,window.pyodide.loadPackage(["pandas","numpy"]);case 3:V.value=window.pyodide,H.value=!0,W.value=!1,t(window.pyodide);case 4:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}();(0,c.A)((0,l.A)().m(function t(){var e,i,n;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e=function(){var t=(0,c.A)((0,l.A)().m(function t(e){return(0,l.A)().w(function(t){while(1)switch(t.n){case 0:return t.n=1,h(e+"pyodide.js");case 1:return t.n=2,p(e);case 2:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),t.p=1,!d){t.n=3;break}return t.n=2,e(s);case 2:t.n=4;break;case 3:return t.n=4,e(o);case 4:t.n=9;break;case 5:return t.p=5,i=t.v,t.p=6,t.n=7,e(d?o:s);case 7:t.n=9;break;case 8:throw t.p=8,n=t.v,n||i;case 9:return t.a(2)}},t,null,[[6,8],[1,5]])}))().catch(function(t){W.value=!1,$.value=!0,e(t)})})},j=function(t){if(!t||"string"!==typeof t)return null;try{var e={},i=t.match(/(\w+)\s*=\s*(\d+\.?\d*)/g);return i&&i.forEach(function(t){var i=t.split("=");if(2===i.length){var n=i[0].trim(),a=parseFloat(i[1].trim());isNaN(a)||(e[n]=a)}}),{params:e,plots:[],success:!0}}catch(n){return{params:{},plots:[],success:!1}}},U=function(){var e=(0,c.A)((0,l.A)().m(function e(i,n){var a,r,s,c,u,d,h,p,v,f,g,m,y,_,b,x,w,S,C=arguments;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(a=C.length>2&&void 0!==C[2]?C[2]:{},r=C.length>3&&void 0!==C[3]?C[3]:{},H.value&&V.value){e.n=5;break}if(!W.value){e.n=4;break}s=0;case 1:if(!(W.value&&s<30)){e.n=4;break}return e.n=2,new Promise(function(t){return setTimeout(t,500)});case 2:if(s++,!H.value||!V.value){e.n=3;break}return e.a(3,4);case 3:e.n=1;break;case 4:if(H.value&&V.value){e.n=5;break}throw W.value?(W.value=!1,$.value=!0):$.value=!0,new Error("Python 引擎未就绪,请等待加载完成");case 5:if(e.p=5,c=i,u=r.is_encrypted||r.isEncrypted||0,!u&&!Fa(i,u)){e.n=11;break}if(d=r.user_id||r.userId||t.userId||a.userId,h=r.originalId||r.id||a.indicatorId,!d||!h){e.n=10;break}return e.p=6,e.n=7,Ta(c,d,h);case 7:c=e.v,e.n=9;break;case 8:throw e.p=8,x=e.v,new Error("代码解密失败,无法执行指标: "+(x.message||"未知错误"));case 9:e.n=11;break;case 10:throw new Error("缺少必要的解密参数(用户ID或指标ID),无法执行加密指标");case 11:return p=n.map(function(t){var e=t.timestamp||t.time;return e<1e10&&(e*=1e3),{time:Math.floor(e/1e3),open:parseFloat(t.open)||0,high:parseFloat(t.high)||0,low:parseFloat(t.low)||0,close:parseFloat(t.close)||0,volume:parseFloat(t.volume)||0}}),v=JSON.stringify(p),f=JSON.stringify(a||{}),g=v.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r"),m=f.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r"),y="\nimport json\nimport pandas as pd\nimport numpy as np\n\n# 递归清理 NaN 值的函数\ndef clean_nan(obj):\n if isinstance(obj, dict):\n return {k: clean_nan(v) for k, v in obj.items()}\n elif isinstance(obj, list):\n return [clean_nan(item) for item in obj]\n elif isinstance(obj, (pd.Series, np.ndarray)):\n return [None if (isinstance(x, float) and (np.isnan(x) or np.isinf(x))) else x for x in obj]\n elif isinstance(obj, (float, np.floating)):\n if np.isnan(obj) or np.isinf(obj):\n return None\n return float(obj)\n elif pd.isna(obj):\n return None\n else:\n return obj\n\n# 接收 JSON 数据\nraw_data = json.loads('".concat(g,"')\nparams = json.loads('").concat(m,"')\n\n# 将前端参数注入为指标代码可直接使用的变量(对齐回测/实盘执行环境)\n# 兼容多种命名(snake_case / camelCase)\ndef _get_param(key, default=None):\n if key in params:\n return params.get(key, default)\n # camelCase fallback\n camel = ''.join([key.split('_')[0]] + [p.capitalize() for p in key.split('_')[1:]])\n return params.get(camel, default)\n\ntry:\n leverage = float(_get_param('leverage', 1) or 1)\nexcept Exception:\n leverage = 1\n\ntrade_direction = _get_param('trade_direction', _get_param('tradeDirection', 'both')) or 'both'\n\ntry:\n initial_position = int(_get_param('initial_position', 0) or 0)\nexcept Exception:\n initial_position = 0\n\ntry:\n initial_avg_entry_price = float(_get_param('initial_avg_entry_price', 0.0) or 0.0)\nexcept Exception:\n initial_avg_entry_price = 0.0\n\ntry:\n initial_position_count = int(_get_param('initial_position_count', 0) or 0)\nexcept Exception:\n initial_position_count = 0\n\ntry:\n initial_last_add_price = float(_get_param('initial_last_add_price', 0.0) or 0.0)\nexcept Exception:\n initial_last_add_price = 0.0\n\ntry:\n initial_highest_price = float(_get_param('initial_highest_price', 0.0) or 0.0)\nexcept Exception:\n initial_highest_price = 0.0\n\n# 转换为 DataFrame\ndf = pd.DataFrame(raw_data)\n\n# 转换数据类型\ndf['open'] = df['open'].astype(float)\ndf['high'] = df['high'].astype(float)\ndf['low'] = df['low'].astype(float)\ndf['close'] = df['close'].astype(float)\ndf['volume'] = df['volume'].astype(float)\n\n# 用户代码(已解密)\n").concat(c,"\n\n# 构造输出(如果用户没有定义 output,则尝试从 result_json 获取)\nif 'output' not in locals():\n if 'result_json' in locals():\n output = json.loads(result_json)\n else:\n output = {\"plots\": []}\nelse:\n # 确保 output 是字典格式\n if isinstance(output, str):\n output = json.loads(output)\n\n# 清理 output 中的所有 NaN 值\noutput = clean_nan(output)\n\n# 返回 JSON 字符串\njson.dumps(output)\n"),e.n=12,V.value.runPythonAsync(y);case 12:if(_=e.v,_&&"string"===typeof _){e.n=13;break}throw new Error("Python 代码执行后未返回有效的 JSON 字符串,返回类型: ".concat((0,o.A)(_)));case 13:e.p=13,b=JSON.parse(_),e.n=15;break;case 14:throw e.p=14,w=e.v,new Error("JSON 解析失败: ".concat(w.message,"。可能是数据中包含 NaN 或其他无效值。"));case 15:if(b){e.n=16;break}return e.a(2,{plots:[],signals:[],calculatedVars:{}});case 16:return b.plots&&Array.isArray(b.plots)||(b.plots=[]),b.plots=b.plots.map(function(t){return t.data&&Array.isArray(t.data)&&(t.data=t.data.map(function(t){return null===t||void 0===t||"number"===typeof t&&isNaN(t)?null:t})),t}),b.signals&&Array.isArray(b.signals)&&(b.signals=b.signals.map(function(t){return t.data&&Array.isArray(t.data)&&(t.data=t.data.map(function(t){return null===t||void 0===t||"number"===typeof t&&isNaN(t)?null:t})),t})),b.calculatedVars||(b.calculatedVars={}),e.a(2,b);case 17:throw e.p=17,S=e.v,new Error("Python 执行失败: ".concat(S.message));case 18:return e.a(2)}},e,null,[[13,14],[6,8],[5,17]])}));return function(t,i){return e.apply(this,arguments)}}();function G(t,e){for(var i=[],n=0;nn-e+1){var c=(t[o-1].high+t[o-1].low+t[o-1].close)/3;s>c?a+=l:sp&&h>0?o.push(h):o.push(0),p>h&&p>0?s.push(p):s.push(0)}for(var v=[],f=[],g=[],m=0;m=e-1){var w=v[m],S=f[m],C=g[m];if(0===w?(i.push(0),n.push(0)):(i.push(S/w*100),n.push(C/w*100)),m>=e-1){var k=i[m]+n[m],I=0===k?0:Math.abs(i[m]-n[m])/k*100;if(m===e-1)a.push(I);else if(m===e){var E=Math.abs(i[m-1]-n[m-1])/(i[m-1]+n[m-1])*100;a.push((E+I)/2)}else a.push((a[m-1]*(e-1)+I)/e)}}}return{adx:a,plusDI:i,minusDI:n}}function nt(t){for(var e=[],i=0,n=0;nt[n-1].close?i+=t[n].volume:t[n].close255?12:7)},0),m=g+2*h,y=v+2*p,_=(null===(i=r.extendData)||void 0===i?void 0:i.side)||(null===(n=r.extendData)||void 0===n?void 0:n.type)||"buy",b="buy"===_,x=b?u:u-y,w=d,S=w,C=b?x:x+y;return[{type:"line",attrs:{coordinates:[{x:c,y:S},{x:c,y:C}]},styles:{style:"stroke",color:l,dashedValue:[2,2]},ignoreEvent:!0},{type:"circle",attrs:{x:c,y:w,r:4},styles:{style:"fill",color:l},ignoreEvent:!0},{type:"rect",attrs:{x:c-m/2,y:x,width:m,height:y,r:4},styles:{style:"fill",color:l,borderSize:0},ignoreEvent:!0},{type:"text",attrs:{x:c,y:x+y/2,text:f,align:"center",baseline:"middle"},styles:{color:"#ffffff",size:v,weight:"bold",backgroundColor:l,borderRadius:5},ignoreEvent:!0}]}}),Ni({name:"priceRangeMeasure",totalStep:2,lock:!1,needDefaultPointFigure:!1,needDefaultXAxisFigure:!1,needDefaultYAxisFigure:!1,createPointFigures:function(t){var e=t.coordinates,i=t.overlay,n=t.ctx;if(!e[0]||!e[1])return[];var a=i.points[0],r=i.points[1];if(!a||!r)return[];var o=a.value,s=r.value,l=s-o,c=l/o*100,u=a.timestamp,d=r.timestamp,h=Math.abs(d-u),p="",v=Math.floor(h/864e5),f=Math.floor(h%864e5/36e5),g=Math.floor(h%36e5/6e4),m=Math.floor(h%6e4/1e3);p=v>0?"".concat(v,"天").concat(f>0?f+"小时":""):f>0?"".concat(f,"小时").concat(g>0?g+"分钟":""):g>0?"".concat(g,"分钟"):"".concat(m,"秒");var y=0;try{if(n&&n.chart){var _=n.chart.getData();if(_&&Array.isArray(_)&&_.length>0){var b=_.findIndex(function(t){return Math.abs(t.timestamp-u)<1e3}),x=_.findIndex(function(t){return Math.abs(t.timestamp-d)<1e3});b>=0&&x>=0&&(y=Math.abs(x-b))}}}catch(z){}var w=c>=0?"+".concat(c.toFixed(2),"%"):"".concat(c.toFixed(2),"%"),S=l>=0?"+".concat(l.toFixed(2)):"".concat(l.toFixed(2)),C="".concat(w," ").concat(S);y>0?(C+=" (".concat(y,"根"),p&&(C+=" / ".concat(p)),C+=")"):p&&(C+=" (".concat(p,")"));var k=l>=0,I=k?"#0ecb81":"#f6465d",E=k?"#0ecb81":"#f6465d",A=k?"rgba(14, 203, 129, 0.1)":"rgba(246, 70, 93, 0.1)",P=e[0].x,M=e[0].y,D=e[1].x,T=e[1].y,B=(P+D)/2,F=(M+T)/2,R=-20,L=12,N=7*C.length+16,O=L+8;return[{type:"line",attrs:{coordinates:[{x:P,y:M},{x:D,y:T}]},styles:{style:"stroke",color:I,size:2,dashedValue:[4,4]},ignoreEvent:!1},{type:"circle",attrs:{x:P,y:M,r:4},styles:{style:"fill",color:I},ignoreEvent:!1},{type:"circle",attrs:{x:D,y:T,r:4},styles:{style:"fill",color:I},ignoreEvent:!1},{type:"rect",attrs:{x:B-N/2,y:F+R-O/2,width:N,height:O,r:4},styles:{style:"fill",color:A,borderSize:1,borderColor:I},ignoreEvent:!1},{type:"text",attrs:{x:B,y:F+R,text:C,align:"center",baseline:"middle"},styles:{color:E,size:L,weight:"bold"},ignoreEvent:!1}]}});var st=function(t){return t.map(function(t){var e=t.time||t.timestamp;return"string"===typeof e&&(e=parseInt(e)),e<1e10&&(e*=1e3),{timestamp:e,open:parseFloat(t.open),high:parseFloat(t.high),low:parseFloat(t.low),close:parseFloat(t.close),volume:parseFloat(t.volume||0)}}).filter(function(t){return t.timestamp&&!isNaN(t.open)&&!isNaN(t.high)&&!isNaN(t.low)&&!isNaN(t.close)}).sort(function(t,e){return t.timestamp-e.timestamp})},lt=function(t){if(t.length>0){var e=t[t.length-1];if(t.length>1){var n=t[t.length-2],a=e.close.toFixed(2),r=(e.close-n.close)/n.close*100;i("price-change",{price:a,change:r})}else{var o=e.close.toFixed(2);i("price-change",{price:o,change:0})}}},ct=function(t){return t.map(function(t){return{time:Math.floor(t.timestamp/1e3),open:t.open,high:t.high,low:t.low,close:t.close,volume:t.volume}})},ut=function(t,e,i){var n=new Date(1e3*t),a=new Date(1e3*e);switch(i){case"1m":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()&&n.getHours()===a.getHours()&&n.getMinutes()===a.getMinutes();case"5m":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()&&n.getHours()===a.getHours()&&Math.floor(n.getMinutes()/5)===Math.floor(a.getMinutes()/5);case"15m":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()&&n.getHours()===a.getHours()&&Math.floor(n.getMinutes()/15)===Math.floor(a.getMinutes()/15);case"30m":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()&&n.getHours()===a.getHours()&&Math.floor(n.getMinutes()/30)===Math.floor(a.getMinutes()/30);case"1H":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()&&n.getHours()===a.getHours();case"4H":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()&&Math.floor(n.getHours()/4)===Math.floor(a.getHours()/4);case"1D":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate();case"1W":var r=Math.floor((n.getTime()-new Date(n.getFullYear(),0,1).getTime())/6048e5),o=Math.floor((a.getTime()-new Date(a.getFullYear(),0,1).getTime())/6048e5);return n.getFullYear()===a.getFullYear()&&r===o;default:return t===e}},dt=function(){var e=(0,c.A)((0,l.A)().m(function e(){var i,o,s,c,d,p,f,m=arguments;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(i=m.length>0&&void 0!==m[0]&&m[0],t.symbol){e.n=1;break}return e.a(2);case 1:if(!a.value||i){e.n=2;break}return e.a(2);case 2:return a.value=!0,r.value=null,e.p=3,o=[],e.p=4,e.n=5,(0,v.Ay)({url:"/api/indicator/kline",method:"get",params:{market:t.market,symbol:t.symbol,timeframe:t.timeframe,limit:500}});case 5:if(s=e.v,1!==s.code||!s.data||!Array.isArray(s.data)){e.n=6;break}o=st(s.data),e.n=7;break;case 6:throw c=s.msg||"获取K线数据失败","tiingo_subscription"===s.hint&&(c=M.$t("dashboard.indicator.error.tiingoSubscription")||"Forex 1-minute data requires Tiingo paid subscription"),new Error(c);case 7:e.n=9;break;case 8:throw e.p=8,p=e.v,p;case 9:if(o&&0!==o.length){e.n=10;break}throw new Error("未获取到K线数据");case 10:n.value=o,u.value=!0,d=ct(o),lt(d),(0,h.dY)(function(){if(g.value){var e=n.value.filter(function(t){return t.timestamp&&!isNaN(t.open)&&!isNaN(t.high)&&!isNaN(t.low)&&!isNaN(t.close)});if(e.length>0&&g.value){try{g.value.applyNewData(e)}catch(i){g.value.applyNewData(e)}setTimeout(function(){g.value&&xt()},100)}}else mt();t.realtimeEnabled&&(gt(),ft())}),e.n=12;break;case 11:if(e.p=11,f=e.v,r.value=M.$t("dashboard.indicator.error.loadDataFailed")+": "+(f.message||M.$t("dashboard.indicator.error.loadDataFailedDesc")),n.value=[],g.value)try{g.value.applyNewData([])}catch(l){}case 12:return e.p=12,a.value=!1,e.f(12);case 13:return e.a(2)}},e,null,[[4,8],[3,11,12,13]])}));return function(){return e.apply(this,arguments)}}(),ht=function(){var e=(0,c.A)((0,l.A)().m(function e(i){return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.symbol&&n.value&&0!==n.value.length){e.n=1;break}return e.a(2);case 1:if(!s.value&&!p){e.n=6;break}if(!p){e.n=5;break}return e.p=2,e.n=3,p;case 3:e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2);case 6:if(u.value){e.n=7;break}return g.value&&"function"===typeof g.value.noMoreData&&g.value.noMoreData(),e.a(2);case 7:return s.value=!0,p=(0,c.A)((0,l.A)().m(function e(){var a,r,o,c,d,f;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.n=1,(0,h.dY)();case 1:return e.p=1,a=Math.floor(i/1e3),e.n=2,(0,v.Ay)({url:"/api/indicator/kline",method:"get",params:{market:t.market,symbol:t.symbol,timeframe:t.timeframe,limit:500,before_time:a}});case 2:if(r=e.v,1!==r.code||!r.data||!Array.isArray(r.data)){e.n=5;break}if(o=st(r.data),0!==o.length){e.n=3;break}return u.value=!1,g.value&&"function"===typeof g.value.noMoreData&&g.value.noMoreData(),e.a(2);case 3:if(c=o.filter(function(t){return t.timestamp0&&(a=st(i.data),r=(0,F.A)(n.value),a.length>0&&(o=Math.floor(a[a.length-1].timestamp/1e3),s=Math.floor(r[r.length-1].timestamp/1e3),ut(o,s,t.timeframe)?(c=r[r.length-1],u=a[a.length-1],r[r.length-1]={timestamp:c.timestamp,open:c.open,high:Math.max(c.high,u.high),low:Math.min(c.low,u.low),close:u.close,volume:u.volume},n.value=r,d=ct(n.value),lt(d),g.value&&"function"===typeof g.value.updateData?(h=n.value.length-1,g.value.updateData(r[h]),C(!1)):g.value&&(g.value.applyNewData(n.value),C(!1))):o>s&&(p=a.filter(function(e){var i=Math.floor(e.timestamp/1e3);return!r.some(function(e){var n=Math.floor(e.timestamp/1e3);return ut(i,n,t.timeframe)})}),p.length>0&&(n.value=[].concat((0,F.A)(r),(0,F.A)(p)),n.value.length>500&&(n.value=n.value.slice(-500)),f=ct(n.value),lt(f),g.value&&"function"===typeof g.value.applyMoreData?(g.value.applyMoreData(p),C(!0)):g.value&&(g.value.applyNewData(n.value),C(!0)))))),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[1,3]])}));return function(){return e.apply(this,arguments)}}(),ft=function(){y.value&&clearInterval(y.value);var e={"1m":5e3,"5m":1e4,"15m":15e3,"30m":3e4,"1H":6e4,"4H":3e5,"1D":6e5,"1W":18e5},i=e[t.timeframe]||1e4;b.value=Math.min(i,1e3),t.realtimeEnabled&&t.symbol&&n.value.length>0&&(y.value=setInterval(function(){!a.value&&t.symbol&&n.value&&n.value.length>0&&vt()},b.value))},gt=function(){y.value&&(clearInterval(y.value),y.value=null)},mt=function(){var t=document.getElementById("kline-chart-container");if(t)if(0!==t.clientWidth&&0!==t.clientHeight){if(g.value){try{g.value.destroy()}catch(y){}g.value=null}try{var e=document.getElementById("kline-chart-container");if(!e)throw new Error("容器元素不存在");try{g.value=Ia(e,{drawingBarVisible:!0,overlay:{visible:!0}})}catch(y){g.value=Ia(e)}if(g.value&&"function"===typeof g.value.setDrawingBarVisible?g.value.setDrawingBarVisible(!0):g.value&&"function"===typeof g.value.setDrawingBar?g.value.setDrawingBar(!0):g.value&&"function"===typeof g.value.enableDrawing&&g.value.enableDrawing(!0),!g.value)throw new Error("图表初始化失败:无法创建图表实例");if(g.value&&("function"===typeof g.value.setDrawingBarVisible&&g.value.setDrawingBarVisible(!0),"function"===typeof g.value.setDrawingBar&&g.value.setDrawingBar(!0),"function"===typeof g.value.enableDrawing&&g.value.enableDrawing(!0)),_t(),g.value&&"function"===typeof g.value.subscribeAction){if(g.value.subscribeAction("onOverlayCreated",function(t){if(A.value&&t&&t.id){var e={line:"segment",horizontalLine:"horizontalStraightLine",verticalLine:"verticalStraightLine",ray:"rayLine",straightLine:"straightLine",parallelStraightLine:"parallelStraightLine",priceLine:"priceLine",priceChannelLine:"priceChannelLine",fibonacciLine:"fibonacciLine",measure:"priceRangeMeasure"},i=e[A.value];if(!t.name||t.name===i||"priceRangeMeasure"===i){E.value.push(t.id),A.value=null;try{"function"===typeof g.value.overrideOverlay&&g.value.overrideOverlay(null)}catch(y){}}}}),"function"===typeof g.value.subscribeAction)try{g.value.subscribeAction("onOverlayComplete",function(t){A.value&&t&&t.id&&(E.value.push(t.id),A.value=null)})}catch(y){}g.value.subscribeAction("onOverlayRemoved",function(t){var e=E.value.indexOf(t);e>-1&&E.value.splice(e,1)})}if(g.value&&"function"===typeof g.value.subscribeAction){var i=null,a=!1;g.value.subscribeAction("onVisibleRangeChange",function(){var t=(0,c.A)((0,l.A)().m(function t(e){var r,o,c,d,h,v;return(0,l.A)().w(function(t){while(1)switch(t.n){case 0:if(!e||"number"!==typeof e.from){t.n=5;break}if(a){t.n=1;break}return i=e.from,a=!0,setTimeout(function(){f.value=!0},1e3),t.a(2);case 1:if(f.value){t.n=2;break}return i=e.from,t.a(2);case 2:if(!(s.value&&e.from<=0)){t.n=3;break}try{g.value&&"function"===typeof g.value.setVisibleRange&&(r=n.value.length,r>0&&(o=g.value.getVisibleRange(),o&&(c=Math.ceil((o.to-o.from)*r/100),d=.1,h=Math.min(100,d+c/r*100),g.value.setVisibleRange(d,h))))}catch(y){}return t.a(2);case 3:if(!(e.from<=5&&!s.value&&!p&&u.value&&f.value)){t.n=4;break}if(!(null!==i&&i>e.from)){t.n=4;break}if(!(n.value.length>0)){t.n=4;break}return v=n.value[0].timestamp,t.n=4,ht(v);case 4:i=e.from;case 5:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}())}if(n.value&&n.value.length>0){var o=n.value.filter(function(t){return t.timestamp&&!isNaN(t.open)&&!isNaN(t.high)&&!isNaN(t.low)&&!isNaN(t.close)});if(o.length>0){try{g.value.applyNewData(o)}catch(y){try{g.value.applyNewData(o)}catch(_){}}try{g.value.createIndicator("VOL",!1,{height:100,dragEnabled:!0})}catch(y){}(0,h.dY)(function(){xt()})}}window.addEventListener("resize",yt)}catch(r){r.value=M.$t("dashboard.indicator.error.chartInitFailed")+": "+(r.message||"未知错误")}}else{var d=0,v=10,m=function(){var t=document.getElementById("kline-chart-container");t&&t.clientWidth>0&&t.clientHeight>0?mt():d0&&t.clientHeight>0&&mt()}},_t=function(){if(g.value){var t=Y.value,e="dark"===m.value;g.value.setStyles({grid:{show:!0,horizontal:{show:!0,color:t.gridLineColor,style:"dashed",size:1},vertical:{show:!1}},candle:{priceMark:{show:!0,high:{show:!0,color:t.axisLabelColor},low:{show:!0,color:t.axisLabelColor}},tooltip:{showRule:"always",showType:"standard",labels:[M.$t("dashboard.indicator.tooltip.time"),M.$t("dashboard.indicator.tooltip.open"),M.$t("dashboard.indicator.tooltip.high"),M.$t("dashboard.indicator.tooltip.low"),M.$t("dashboard.indicator.tooltip.close"),M.$t("dashboard.indicator.tooltip.volume")],values:function(t){var e=new Date(t.timestamp);return["".concat(e.getFullYear(),"-").concat(e.getMonth()+1,"-").concat(e.getDate()," ").concat(e.getHours(),":").concat(e.getMinutes()),t.open.toFixed(2),t.high.toFixed(2),t.low.toFixed(2),t.close.toFixed(2),t.volume.toFixed(0)]}},bar:{upColor:e?"#0ecb81":"#13c2c2",downColor:e?"#f6465d":"#fa541c",noChangeColor:t.borderColor}},indicator:{tooltip:{showRule:"always",showType:"standard"}},xAxis:{show:!0,axisLine:{show:!0,color:t.borderColor}},yAxis:{show:!0,axisLine:{show:!1}},crosshair:{show:!0,horizontal:{show:!0,line:{show:!0,style:"dashed",color:t.gridLineColor,size:1}},vertical:{show:!0,line:{show:!0,style:"dashed",color:t.gridLineColor,size:1}}},watermark:{show:!1}})}},bt=function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2,r=arguments.length>5&&void 0!==arguments[5]&&arguments[5];try{var o={name:t,shortName:t,calc:e,figures:i,calcParams:n,precision:a,series:r?"price":"normal"};return ai(o),!0}catch(s){return!(!s.message||!s.message.includes("already registered"))}},xt=function(){var e=(0,c.A)((0,l.A)().m(function e(){var i,a,r,o;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!x.value){e.n=1;break}return e.a(2);case 1:if(g.value&&0!==n.value.length){e.n=2;break}return e.a(2);case 2:x.value=!0,e.p=3;try{I.value.length>0&&g.value&&(I.value.forEach(function(t){try{"function"===typeof g.value.removeOverlay?g.value.removeOverlay(t):"function"===typeof g.value.removeOverlayById&&g.value.removeOverlayById(t)}catch(e){}}),I.value=[])}catch(s){}try{k.value.length>0&&(k.value.forEach(function(t){var e="string"===typeof t?t:t.name,i="string"===typeof t?void 0:t.paneId;i?g.value.removeIndicator(i,e):(g.value.removeIndicator("candle_pane",e),g.value.removeIndicator(e))}),k.value=[])}catch(s){}i=ct(n.value),a=(0,l.A)().m(function e(){var n,a,r,s,c,u,d,h,p,v,f,m,y,b,x,w,S,C,E,A,P,M,D,T,R,L,N,O,z,V,H,Y,K,j,st,lt,ct,ut,dt,ht,pt,vt,ft,gt,mt,yt,_t,xt,wt,St,Ct,kt,It,Et,At,Pt,Mt,Dt,Tt,Bt,Ft,Rt,Lt,Nt,Ot,zt,Vt,Wt,Ht,$t,Yt,Xt,Kt,jt,Ut,Gt,Zt,qt,Jt,Qt,te,ee,ie,ne,ae,re,oe,se,le,ce,ue,de,he,pe,ve,fe,ge,me,ye,_e,be,xe,we,Se,Ce,ke,Ie,Ee,Ae,Pe,Me,De,Te,Be,Fe,Re,Le,Ne,Oe,ze,Ve,We,He,$e,Ye,Xe,Ke,je,Ue,Ge,Ze,qe,Je,Qe,ti,ei,ii,ni,ai,ri,oi,si,li,ci,ui,di,hi,pi,vi,fi,gi,mi,yi,_i;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(n=t.activeIndicators[o],e.p=1,"python"!==n.type){e.n=31;break}if(n.code){e.n=2;break}return e.a(2,0);case 2:if(e.p=2,!n.calculate||"function"!==typeof n.calculate){e.n=15;break}return e.n=3,n.calculate(i,n.params||{});case 3:if(a=e.v,r=[],a&&a.plots&&Array.isArray(a.plots)&&(r=(0,F.A)(a.plots)),!(a&&a.signals&&Array.isArray(a.signals))){e.n=14;break}s=(0,_.A)(a.signals),e.p=4,s.s();case 5:if((c=s.n()).done){e.n=11;break}if(u=c.value,!(u.data&&Array.isArray(u.data)&&u.data.length>0)){e.n=10;break}for(d=[],h=0;h0&&g.value){M=(0,_.A)(v);try{for(M.s();!(D=M.n()).done;){T=D.value;try{R=T.timestamp,R<1e10&&(R*=1e3),L=T.text,"function"===typeof g.value.createOverlay&&(N=g.value.createOverlay({name:"signalTag",points:[{timestamp:R,value:T.price},{timestamp:R,value:T.anchorPrice}],extendData:{text:L,color:T.color,side:T.side,action:T.action,price:T.price},lock:!0},"candle_pane"),N&&I.value.push(N))}catch(l){}}}catch(bi){M.e(bi)}finally{M.f()}}case 10:e.n=5;break;case 11:e.n=13;break;case 12:e.p=12,mi=e.v,s.e(mi);case 13:return e.p=13,s.f(),e.f(13);case 14:if(r.length>0&&(O=r.filter(function(t){return t.data&&Array.isArray(t.data)&&t.data.length>0}),O.length>0)){for(z=[],V={},H=0;H0)){e.n=23;break}for(xt=[],wt=0;wt0&&g.value){Lt=(0,_.A)(Ct);try{for(Lt.s();!(Nt=Lt.n()).done;){Ot=Nt.value;try{zt=Ot.timestamp,zt<1e10&&(zt*=1e3),Vt=Ot.text,"function"===typeof g.value.createOverlay&&(Wt=g.value.createOverlay({name:"signalTag",points:[{timestamp:zt,value:Ot.price},{timestamp:zt,value:Ot.anchorPrice}],extendData:{text:Vt,color:Ot.color,side:Ot.side,action:Ot.action,price:Ot.price},lock:!0},"candle_pane"),Wt&&I.value.push(Wt))}catch(l){}}}catch(bi){Lt.e(bi)}finally{Lt.f()}}case 23:e.n=18;break;case 24:e.n=26;break;case 25:e.p=25,yi=e.v,mt.e(yi);case 26:return e.p=26,mt.f(),e.f(26);case 27:if(gt.length>0&&(Ht=gt.filter(function(t){return t.data&&Array.isArray(t.data)&&t.data.length>0}),Ht.length>0)){for($t=[],Yt={},Xt=0;Xt0&&(0,h.dY)(function(){g.value&&xt()})},{deep:!0}),(0,h.wB)(function(){return t.realtimeEnabled},function(t){t?ft():gt()}),(0,h.sV)((0,c.A)((0,l.A)().m(function e(){return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.n=1,(0,h.dY)();case 1:return!t.theme||"dark"!==t.theme&&"light"!==t.theme||(m.value=t.theme),e.p=2,e.n=3,K();case 3:e.n=5;break;case 4:e.p=4,e.v,$.value=!0;case 5:(0,h.dY)(function(){setTimeout(function(){!g.value&&t.symbol&&mt()},300)});case 6:return e.a(2)}},e,null,[[2,4]])}))),(0,h.xo)(function(){gt(),g.value&&(g.value.destroy(),g.value=null),window.removeEventListener("resize",yt)}),{klineData:n,loading:a,error:r,loadingHistory:s,chartRef:g,chartTheme:m,themeConfig:Y,getIndicatorColor:X,handleRetry:wt,loadingPython:W,pythonReady:H,pyodideLoadFailed:$,formatKlineData:st,updatePricePanel:lt,isSameTimeframe:ut,loadKlineData:dt,loadMoreHistoryData:pt,updateKlineRealtime:vt,startRealtime:ft,stopRealtime:gt,initChart:mt,handleResize:yt,updateChartTheme:_t,updateIndicators:xt,executePythonStrategy:U,parsePythonStrategy:j,indicatorButtons:R,isIndicatorActive:L,toggleIndicator:z,drawingTools:D,activeDrawingTool:A,selectDrawingTool:N,clearAllDrawings:O}}},La=Ra,Na=(0,E.A)(La,M,D,!1,null,"58f93984",null),Oa=Na.exports,za=i(90371),Va={name:"DashboardIndicator",components:{IndicatorEditor:P,KlineChart:Oa,QuickTradePanel:za.A},computed:(0,d.A)((0,d.A)({},(0,p.aH)({navTheme:function(t){return t.app.theme}})),{},{chartTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme?"dark":"light"},isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme}}),setup:function(){var t=(0,h.nI)(),e=t||{},i=e.proxy,n=(0,h.KR)(1),a=(0,h.KR)(!1),p=(0,h.KR)(void 0),m=(0,h.KR)([]),y=(0,h.KR)([]),_=(0,h.KR)(!1),b=(0,h.KR)(""),x=(0,h.KR)(!1),w=(0,h.KR)(!1),S=(0,h.KR)(!1),C=(0,h.KR)(""),k=(0,h.KR)(""),I=(0,h.KR)([]),E=(0,h.KR)(!1),A=(0,h.KR)([]),P=(0,h.KR)(!1),M=(0,h.KR)(null),D=(0,h.KR)(null),T=(0,h.KR)([]),B=(0,h.KR)(!1),F=(0,h.KR)(!1),R=(0,h.KR)(""),L=(0,h.KR)(""),N=(0,h.KR)(0),O=(0,h.EW)(function(){return"crypto"===(Y.value||"").toLowerCase()}),z=function(){O.value?(R.value=$.value||"",N.value=parseFloat(X.value)||0,L.value="",F.value=!0):u.A.warning(i.$t("quickTrade.cryptoOnly"))},V=function(){u.A.success(i.$t("quickTrade.orderSuccess"))},W=function(t){t&&O.value&&(R.value=t)},H=function(){i&&i.$router&&i.$router.push("/indicator-community")},$=(0,h.KR)(""),Y=(0,h.KR)(""),X=(0,h.KR)("--"),K=(0,h.KR)(0),j=(0,h.EW)(function(){return K.value>0?"color-up":K.value<0?"color-down":""}),U=(0,h.KR)("1D"),G=(0,h.KR)([]),Z=(0,h.KR)(!1),q=[{id:"sma5",name:"SMA5 (5日均线)",shortName:"SMA5",type:"line",defaultParams:{length:5}},{id:"sma10",name:"SMA10 (10日均线)",shortName:"SMA10",type:"line",defaultParams:{length:10}},{id:"sma20",name:"SMA20 (20日均线)",shortName:"SMA20",type:"line",defaultParams:{length:20}},{id:"sma30",name:"SMA30 (30日均线)",shortName:"SMA30",type:"line",defaultParams:{length:30}}],J=[{id:"ema5",name:"EMA5 (5日指数均线)",shortName:"EMA5",type:"line",defaultParams:{length:5}},{id:"ema10",name:"EMA10 (10日指数均线)",shortName:"EMA10",type:"line",defaultParams:{length:10}},{id:"ema20",name:"EMA20 (20日指数均线)",shortName:"EMA20",type:"line",defaultParams:{length:20}},{id:"ema30",name:"EMA30 (30日指数均线)",shortName:"EMA30",type:"line",defaultParams:{length:30}}],Q=(0,h.KR)([]),tt=(0,h.KR)([]),et=(0,h.KR)(!1),it=(0,h.KR)(!1),nt=(0,h.KR)(null),at=(0,h.KR)(""),rt=(0,h.KR)([]),ot=(0,h.KR)({}),st=(0,h.KR)(!1),lt=(0,h.KR)({}),ct=(0,h.KR)(!1),ut=(0,h.KR)(!1),dt=(0,h.KR)(!1),ht=(0,h.KR)(null),pt=(0,h.KR)(!1),vt=(0,h.KR)(null),ft=(0,h.KR)(!1),gt=(0,h.KR)(null),mt=(0,h.KR)(!1),yt=(0,h.KR)(null),_t=(0,h.KR)(!1),bt=(0,h.KR)(null),xt=(0,h.KR)(!1),wt=(0,h.KR)(!1),St=(0,h.KR)("free"),Ct=(0,h.KR)(10),kt=(0,h.KR)(""),It=(0,h.KR)(!1),Et={price:[{required:!0,message:"请输入价格",trigger:"blur",type:"number"}]},At=(0,h.KR)(!1),Pt=function(t){var e=t.price,i=t.change;X.value=e,K.value=i},Mt=function(){},Dt=(0,h.KR)([]),Tt=(0,h.KR)([]),Bt=function(t){U.value=t},Ft=function(t){return t?Object.values(t).join(", "):""},Rt=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,i,r,o,s,c;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(a.value=!0,t.p=1,r=(0,h.nI)(),o=null===r||void 0===r||null===(e=r.proxy)||void 0===e?void 0:e.$store,s=(null===o||void 0===o||null===(i=o.getters)||void 0===i?void 0:i.userInfo)||{},!s||!s.email){t.n=2;break}return n.value=s.id,a.value=!1,Lt(),ae(),t.a(2);case 2:return t.n=3,(0,g.ug)();case 3:c=t.v,c&&1===c.code&&c.data&&(n.value=c.data.id,o&&o.commit("SET_INFO",c.data),Lt(),ae()),t.n=5;break;case 4:t.p=4,t.v;case 5:return t.p=5,a.value=!1,t.f(5);case 6:return t.a(2)}},t,null,[[1,4,5,6]])}));return function(){return t.apply(this,arguments)}}(),Lt=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,a;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(n.value){t.n=1;break}return t.a(2);case 1:return _.value=!0,t.p=2,t.n=3,(0,f.Qo)({userid:n.value});case 3:e=t.v,e&&1===e.code&&e.data&&(y.value=e.data.map(function(t){return(0,d.A)((0,d.A)({},t),{},{label:t.symbol+(t.name?" (".concat(t.name,")"):""),value:"".concat(t.market,":").concat(t.symbol)})}),Nt(),y.value.length>0&&!$.value&&(a=y.value[0],Y.value=a.market,$.value=a.symbol,p.value=a.value)),t.n=5;break;case 4:t.p=4,t.v,u.A.error(i.$t("dashboard.indicator.error.loadWatchlistFailed"));case 5:return t.p=5,_.value=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}));return function(){return t.apply(this,arguments)}}(),Nt=function(){b.value?m.value=y.value.filter(function(t){return t.symbol.toLowerCase().includes(b.value.toLowerCase())||t.name&&t.name.toLowerCase().includes(b.value.toLowerCase())}):m.value=y.value},Ot=function(t){b.value=t,0===y.value.length&&t&&(x.value=!0),Nt()},zt=function(t){x.value=t,t||(b.value="")},Vt=function(t){if("__empty_watchlist_hint__"!==t){if("__add_stock_option__"===t)return w.value=!0,void setTimeout(function(){p.value=void 0},0);var e=y.value.find(function(e){return e.value===t});if(e||(e=m.value.find(function(e){return e.value===t})),!e&&t.includes(":")){var i=t.split(":"),n=(0,s.A)(i,2),a=n[0],r=n[1];e={market:a,symbol:r,value:t}}e&&(Y.value=e.market,$.value=e.symbol,p.value=e.value)}},Wt=function(t,e){var i,n=(null===(i=e.componentOptions)||void 0===i||null===(i=i.propsData)||void 0===i?void 0:i.value)||"";return"__empty_watchlist_hint__"===n||"__add_stock_option__"===n||n.toLowerCase().includes(t.toLowerCase())},Ht=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return t.p=0,t.n=1,(0,f.iO)();case 1:e=t.v,e&&1===e.code&&e.data&&Array.isArray(e.data)?T.value=e.data.map(function(t){return{value:t.value,i18nKey:t.i18nKey||"dashboard.analysis.market.".concat(t.value)}}):e&&1===e.code&&e.data&&"object"===(0,o.A)(e.data)?T.value=Object.keys(e.data).map(function(t){return{value:t,i18nKey:"dashboard.analysis.market.".concat(t)}}):T.value=[{value:"USStock",i18nKey:"dashboard.analysis.market.USStock"},{value:"Crypto",i18nKey:"dashboard.analysis.market.Crypto"},{value:"Forex",i18nKey:"dashboard.analysis.market.Forex"},{value:"Futures",i18nKey:"dashboard.analysis.market.Futures"}],T.value.length>0&&!C.value&&(C.value=T.value[0].value),t.n=3;break;case 2:t.p=2,t.v,T.value=[{value:"USStock",i18nKey:"dashboard.analysis.market.USStock"},{value:"Crypto",i18nKey:"dashboard.analysis.market.Crypto"},{value:"Forex",i18nKey:"dashboard.analysis.market.Forex"},{value:"Futures",i18nKey:"dashboard.analysis.market.Futures"}];case 3:return t.a(2)}},t,null,[[0,2]])}));return function(){return t.apply(this,arguments)}}(),$t=function(){w.value=!1,M.value=null,k.value="",I.value=[],B.value=!1,C.value=T.value.length>0?T.value[0].value:""},Yt=function(t){C.value=t,k.value="",I.value=[],M.value=null,B.value=!1,Zt(t)},Xt=function(t){var e=t.target.value;if(k.value=e,D.value&&clearTimeout(D.value),!e||""===e.trim())return I.value=[],B.value=!1,void(M.value=null);D.value=setTimeout(function(){jt(e)},500)},Kt=function(t){t&&t.trim()&&(C.value?I.value.length>0||(B.value&&0===I.value.length?Ut():jt(t)):u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")))},jt=function(){var t=(0,c.A)((0,l.A)().m(function t(e){var n;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e&&""!==e.trim()){t.n=1;break}return I.value=[],B.value=!1,t.a(2);case 1:if(C.value){t.n=2;break}return u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")),t.a(2);case 2:return E.value=!0,B.value=!0,t.p=3,t.n=4,(0,f._3)({market:C.value,keyword:e.trim(),limit:20});case 4:n=t.v,n&&1===n.code&&n.data&&n.data.length>0?I.value=n.data:(I.value=[],M.value={market:C.value,symbol:e.trim().toUpperCase(),name:""}),t.n=6;break;case 5:t.p=5,t.v,I.value=[],M.value={market:C.value,symbol:e.trim().toUpperCase(),name:""};case 6:return t.p=6,E.value=!1,t.f(6);case 7:return t.a(2)}},t,null,[[3,5,6,7]])}));return function(e){return t.apply(this,arguments)}}(),Ut=function(){k.value&&k.value.trim()?C.value?M.value={market:C.value,symbol:k.value.trim().toUpperCase(),name:""}:u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")):u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseEnterSymbol"))},Gt=function(t){M.value={market:t.market,symbol:t.symbol,name:t.name||t.symbol}},Zt=function(){var t=(0,c.A)((0,l.A)().m(function t(e){var i;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e||(e=C.value||(T.value.length>0?T.value[0].value:"")),e){t.n=1;break}return t.a(2);case 1:return P.value=!0,t.p=2,t.n=3,(0,f.z6)({market:e,limit:10});case 3:i=t.v,i&&1===i.code&&i.data?A.value=i.data:A.value=[],t.n=5;break;case 4:t.p=4,t.v,A.value=[];case 5:return t.p=5,P.value=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}));return function(e){return t.apply(this,arguments)}}(),qt=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,a,r,o,s,c;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e="",a="",!M.value){t.n=1;break}e=M.value.market,a=M.value.symbol.toUpperCase(),t.n=4;break;case 1:if(!k.value||!k.value.trim()){t.n=3;break}if(C.value){t.n=2;break}return u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")),t.a(2);case 2:e=C.value,a=k.value.trim().toUpperCase(),t.n=4;break;case 3:return u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectOrEnterSymbol")),t.a(2);case 4:return S.value=!0,t.p=5,t.n=6,(0,f.dp)({userid:n.value,market:e,symbol:a});case 6:if(r=t.v,!r||1!==r.code){t.n=8;break}return u.A.success(i.$t("dashboard.analysis.message.addStockSuccess")),$t(),t.n=7,Lt();case 7:t.n=9;break;case 8:u.A.error((null===r||void 0===r?void 0:r.msg)||i.$t("dashboard.analysis.message.addStockFailed"));case 9:t.n=11;break;case 10:t.p=10,c=t.v,s=(null===c||void 0===c||null===(o=c.response)||void 0===o||null===(o=o.data)||void 0===o?void 0:o.msg)||(null===c||void 0===c?void 0:c.message)||i.$t("dashboard.analysis.message.addStockFailed"),u.A.error(s);case 11:return t.p=11,S.value=!1,t.f(11);case 12:return t.a(2)}},t,null,[[5,10,11,12]])}));return function(){return t.apply(this,arguments)}}(),Jt=function(t){if(!ie(t.id)){var e=t.params||t.defaultParams||{};G.value.push((0,d.A)((0,d.A)({},t),{},{id:t.id,params:(0,d.A)({},e)}))}},Qt=function(t){G.value=G.value.filter(function(e){return e.id!==t})},te=function(t){var e=t.action,i=t.indicator;if("add"===e){var n=(0,d.A)((0,d.A)({},i),{},{calculate:ee(i.id)});Jt(n)}else"remove"===e&&Qt(i.id)},ee=function(t){return null},ie=function(t){return"sma"===t?q.some(function(t){return G.value.some(function(e){return e.id===t.id})}):"ema"===t?J.some(function(t){return G.value.some(function(e){return e.id===t.id})}):G.value.some(function(e){return e.id===t})},ne=function(){var t=new Set;return q.forEach(function(e){return t.add(e.id)}),J.forEach(function(e){return t.add(e.id)}),G.value.filter(function(e){return!t.has(e.id)})},ae=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,i,a;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(n.value){t.n=1;break}return t.a(2);case 1:return et.value=!0,t.p=2,t.n=3,(0,v.Ay)({url:"/api/indicator/getIndicators",method:"get",params:{userid:n.value}});case 3:e=t.v,1===e.code&&e.data&&(i=e.data.filter(function(t){return!t.is_buy||0===t.is_buy||"0"===t.is_buy}),a=e.data.filter(function(t){return 1===t.is_buy||"1"===t.is_buy}),Q.value=i.map(function(t){return(0,d.A)((0,d.A)({},t),{},{type:"python",source:"custom"})}),tt.value=a.map(function(t){return(0,d.A)((0,d.A)({},t),{},{type:"python",source:"purchased"})})),t.n=5;break;case 4:t.p=4,t.v;case 5:return t.p=5,et.value=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}));return function(){return t.apply(this,arguments)}}(),re=(0,h.KR)(null),oe=function(){var t=(0,c.A)((0,l.A)().m(function t(e,n){var a,r,o,s,c,h,p,v,f;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(a="".concat(n,"-").concat(e.id),!ie(a)){t.n=1;break}return Qt(a),t.a(2);case 1:if(t.p=1,r=e.code||"",re.value){t.n=2;break}return u.A.error(i.$t("dashboard.indicator.error.chartNotReady")),t.a(2);case 2:if("function"===typeof re.value.parsePythonStrategy){t.n=3;break}return u.A.error(i.$t("dashboard.indicator.error.chartMethodNotReady")),t.a(2);case 3:if("function"===typeof re.value.executePythonStrategy){t.n=4;break}return u.A.error(i.$t("dashboard.indicator.error.chartExecuteNotReady")),t.a(2);case 4:if(o=re.value.parsePythonStrategy(r),o){t.n=5;break}return u.A.error(i.$t("dashboard.indicator.error.parseFailed")),t.a(2);case 5:s=e.userParams||{},c=r,h=(0,d.A)({},s),p={id:a,name:e.name,type:"python",code:c,description:e.description,parsed:o,userParams:h,originalId:e.id,user_id:e.user_id||e.userId,is_encrypted:e.is_encrypted||e.isEncrypted||0,calculate:function(t,i){return re.value.executePythonStrategy(c,t,(0,d.A)((0,d.A)({},i),h),{id:e.id,user_id:e.user_id||e.userId,is_encrypted:e.is_encrypted||e.isEncrypted||0})}},v=(0,d.A)((0,d.A)({},o.params),s),G.value.push((0,d.A)((0,d.A)({},p),{},{params:v})),t.n=7;break;case 6:t.p=6,f=t.v,u.A.error(i.$t("dashboard.indicator.error.addIndicatorFailed")+": "+(f.message||"未知错误"));case 7:return t.a(2)}},t,null,[[1,6]])}));return function(e,i){return t.apply(this,arguments)}}(),se=function(){var t=(0,c.A)((0,l.A)().m(function t(e,n){var a,r,o,s,c;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(a="".concat(n,"-").concat(e.id),!ie(a)){t.n=1;break}Qt(a),t.n=5;break;case 1:return t.p=1,st.value=!0,t.n=2,i.$http.get("/api/indicator/getIndicatorParams",{params:{indicator_id:e.id}});case 2:r=t.v,r&&1===r.code&&Array.isArray(r.data)&&r.data.length>0?(rt.value=r.data,o="".concat(n,"-").concat(e.id),s=lt.value[o],c={},r.data.forEach(function(t){var e=s&&void 0!==s[t.name]?s[t.name]:t.default;e="int"===t.type?parseInt(e)||0:"float"===t.type?parseFloat(e)||0:"bool"===t.type?!0===e||"true"===e||1===e||"1"===e:e||"",c[t.name]=e}),ot.value=c,nt.value=e,at.value=n,it.value=!0):oe(e,n),t.n=4;break;case 3:t.p=3,t.v,oe(e,n);case 4:return t.p=4,st.value=!1,t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}));return function(e,i){return t.apply(this,arguments)}}(),le=function(){if(nt.value){var t="".concat(at.value,"-").concat(nt.value.id);lt.value[t]=(0,d.A)({},ot.value);var e=(0,d.A)((0,d.A)({},nt.value),{},{userParams:(0,d.A)({},ot.value)});oe(e,at.value)}it.value=!1,nt.value=null,at.value=""},ce=function(){ue(),it.value=!1,setTimeout(function(){nt.value=null,at.value=""},100)},ue=function(){if(nt.value&&at.value){var t="".concat(at.value,"-").concat(nt.value.id);lt.value[t]=JSON.parse(JSON.stringify(ot.value))}},de=function(){ue()},he=function(t){var e=t.code,n=t.name;if(e&&e.trim())try{if(!re.value)return void u.A.error(i.$t("dashboard.indicator.error.chartNotReady"));if("function"!==typeof re.value.parsePythonStrategy)return void u.A.error(i.$t("dashboard.indicator.error.chartMethodNotReady"));if("function"!==typeof re.value.executePythonStrategy)return void u.A.error(i.$t("dashboard.indicator.error.chartExecuteNotReady"));var a=re.value.parsePythonStrategy(e);if(!a)return void u.A.error(i.$t("dashboard.indicator.error.parseFailedCheck"));var r={id:"temp-editor-indicator",name:n||"临时指标",type:"python",code:e,description:"",parsed:a,calculate:function(t,i){var n=e;return re.value.executePythonStrategy(n,t,i)}},o=G.value.findIndex(function(t){return"temp-editor-indicator"===t.id});o>=0&&G.value.splice(o,1),G.value.push((0,d.A)((0,d.A)({},r),{},{params:(0,d.A)({},a.params)})),u.A.success(i.$t("dashboard.indicator.success.runIndicator"))}catch(s){u.A.error(i.$t("dashboard.indicator.error.runIndicatorFailed")+": "+(s.message||"未知错误"))}else u.A.warning(i.$t("dashboard.indicator.warning.enterCode"))},pe=function(){ht.value=null,dt.value=!0},ve=function(t){ht.value=t,dt.value=!0},fe=function(){ct.value=!ct.value},ge=function(t){r.A.confirm({title:i.$t("dashboard.indicator.delete.confirmTitle"),content:i.$t("dashboard.indicator.delete.confirmContent",{name:t.name}),okText:i.$t("dashboard.indicator.delete.confirmOk"),okType:"danger",cancelText:i.$t("dashboard.indicator.delete.confirmCancel"),onOk:function(){var e=(0,c.A)((0,l.A)().m(function e(){var a,r,o;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,v.Ay)({url:"/api/indicator/deleteIndicator",method:"post",data:{id:t.id,userid:n.value}});case 1:if(a=e.v,1!==a.code){e.n=3;break}return u.A.success(i.$t("dashboard.indicator.delete.success")),r="custom-"+t.id,ie(r)&&Qt(r),e.n=2,ae();case 2:e.n=4;break;case 3:u.A.error(a.msg||i.$t("dashboard.indicator.delete.failed"));case 4:e.n=6;break;case 5:e.p=5,o=e.v,u.A.error(i.$t("dashboard.indicator.delete.failed")+": "+(o.message||"未知错误"));case 6:return e.a(2)}},e,null,[[0,5]])}));function a(){return e.apply(this,arguments)}return a}()})},me=function(t){i.$router.push({path:"/backtest-center",query:{tab:"indicator",indicator_id:String(t.id)}})},ye=function(t){i.$router.push({path:"/backtest-center",query:{tab:"indicator",indicator_id:String(t.id),view:"history"}})},_e=function(t){},be=function(t){bt.value=(0,d.A)({},t),St.value=t.pricing_type||"free",Ct.value=t.price||10,kt.value=t.description||"",It.value=!!t.vip_free,_t.value=!0},xe=function(t){i.$router.push({path:"/trading-assistant",query:{mode:"create",indicator_id:String(t.id),indicator_name:t.name||"",indicator_desc:t.description||""}})},we=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,a;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(n.value){t.n=1;break}return u.A.error(i.$t("dashboard.indicator.error.pleaseLogin")),t.a(2);case 1:return xt.value=!0,t.p=2,t.n=3,(0,v.Ay)({url:"/api/indicator/saveIndicator",method:"post",data:{userid:n.value,id:bt.value.id,code:bt.value.code,name:bt.value.name,description:kt.value,publishToCommunity:!0,pricingType:St.value,price:"paid"===St.value?Ct.value:0,vipFree:"paid"===St.value&&It.value}});case 3:if(e=t.v,1!==e.code){t.n=5;break}return u.A.success(i.$t("dashboard.indicator.publish.success")),_t.value=!1,bt.value=null,t.n=4,ae();case 4:t.n=6;break;case 5:u.A.error(e.msg||i.$t("dashboard.indicator.publish.failed"));case 6:t.n=8;break;case 7:t.p=7,a=t.v,u.A.error(i.$t("dashboard.indicator.publish.failed")+": "+(a.message||""));case 8:return t.p=8,xt.value=!1,t.f(8);case 9:return t.a(2)}},t,null,[[2,7,8,9]])}));return function(){return t.apply(this,arguments)}}(),Se=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(n.value&&bt.value){t.n=1;break}return t.a(2);case 1:return wt.value=!0,t.p=2,t.n=3,(0,v.Ay)({url:"/api/indicator/saveIndicator",method:"post",data:{userid:n.value,id:bt.value.id,code:bt.value.code,name:bt.value.name,description:bt.value.description,publishToCommunity:!1,pricingType:"free",price:0,vipFree:!1}});case 3:if(e=t.v,1!==e.code){t.n=5;break}return u.A.success(i.$t("dashboard.indicator.publish.unpublishSuccess")),_t.value=!1,bt.value=null,t.n=4,ae();case 4:t.n=6;break;case 5:u.A.error(e.msg||i.$t("dashboard.indicator.publish.unpublishFailed"));case 6:t.n=8;break;case 7:t.p=7,t.v,u.A.error(i.$t("dashboard.indicator.publish.unpublishFailed"));case 8:return t.p=8,wt.value=!1,t.f(8);case 9:return t.a(2)}},t,null,[[2,7,8,9]])}));return function(){return t.apply(this,arguments)}}(),Ce=function(){var t=(0,c.A)((0,l.A)().m(function t(e){var a,r,o;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(n.value){t.n=1;break}return u.A.error(i.$t("dashboard.indicator.error.pleaseLogin")),t.a(2);case 1:return a=i.$refs.indicatorEditor,a&&(a.saving=!0),t.p=2,t.n=3,(0,v.Ay)({url:"/api/indicator/saveIndicator",method:"post",data:{userid:n.value,id:e.id||0,code:e.code}});case 3:if(r=t.v,1!==r.code){t.n=5;break}return u.A.success(i.$t("dashboard.indicator.save.success")),dt.value=!1,ht.value=null,t.n=4,ae();case 4:t.n=6;break;case 5:u.A.error(r.msg||i.$t("dashboard.indicator.save.failed"));case 6:t.n=8;break;case 7:t.p=7,o=t.v,u.A.error(i.$t("dashboard.indicator.save.failed")+": "+(o.message||"未知错误"));case 8:return t.p=8,a&&(a.saving=!1),t.f(8);case 9:return t.a(2)}},t,null,[[2,7,8,9]])}));return function(e){return t.apply(this,arguments)}}(),ke=function(t){var e=t.end_time;if(1===e||"1"===e)return i.$t("dashboard.indicator.status.normalPermanent");if(!e||0===e)return i.$t("dashboard.indicator.status.normal");var n=Math.floor(Date.now()/1e3);return e0&&!C.value&&(C.value=T.value[0].value),C.value&&Zt(C.value)):(M.value=null,k.value="",I.value=[],B.value=!1,D.value&&(clearTimeout(D.value),D.value=null))}),(0,h.wB)(function(){return ot.value},function(t){if(it.value&&nt.value&&at.value){var e="".concat(at.value,"-").concat(nt.value.id);lt.value[e]=JSON.parse(JSON.stringify(t))}},{deep:!0,immediate:!1}),(0,h.wB)(it,function(t){t||ue()}),{userId:n,klineChart:re,searchSymbol:p,symbolSuggestions:m,watchlist:y,symbolSearchValue:b,symbolSearchOpen:x,currentSymbol:$,currentMarket:Y,currentPrice:X,priceChange:K,priceChangeClass:j,timeframe:U,loadingWatchlist:_,activeIndicators:G,trendIndicators:Dt,oscillatorIndicators:Tt,customIndicators:Q,purchasedIndicators:tt,loadingIndicators:et,realtimeEnabled:At,toggleRealtime:De,handleSymbolSearch:Ot,handleSymbolSelect:Vt,handleDropdownVisibleChange:zt,filterSymbolOption:Wt,getMarketName:Pe,getMarketColor:Me,setTimeframe:Bt,addIndicator:Jt,removeIndicator:Qt,isIndicatorActive:ie,loadIndicators:ae,addPythonIndicator:oe,toggleIndicator:se,getIndicatorStatus:ke,getIndicatorStatusIcon:Ie,getIndicatorStatusClass:Ee,getExpiryTimeText:Ae,formatParams:Ft,loadWatchlist:Lt,getCustomActiveIndicators:ne,showIndicatorEditor:dt,editingIndicator:ht,handleCreateIndicator:pe,handleRunIndicator:he,handleSaveIndicator:Ce,handleEditIndicator:ve,handleDeleteIndicator:ge,toggleCustomSection:fe,customSectionCollapsed:ct,purchasedSectionCollapsed:ut,handlePriceChange:Pt,handleChartRetry:Mt,handleIndicatorToggle:te,showParamsModal:it,pendingIndicator:nt,indicatorParams:rt,indicatorParamValues:ot,loadingParams:st,confirmIndicatorParams:le,cancelIndicatorParams:ce,handleParamsModalAfterClose:de,showBacktestModal:pt,backtestIndicator:vt,handleOpenBacktest:me,showBacktestHistoryDrawer:ft,backtestHistoryIndicator:gt,handleOpenBacktestHistory:ye,showBacktestRunViewer:mt,selectedBacktestRun:yt,handleViewBacktestRun:_e,showPublishModal:_t,publishIndicator:bt,publishing:xt,unpublishing:wt,publishPricingType:St,publishPrice:Ct,publishDescription:kt,publishVipFree:It,publishRules:Et,handlePublishIndicator:be,handleCreateStrategyFromIndicator:xe,handleConfirmPublish:we,handleUnpublish:Se,selectedSymbol:$,selectedMarket:Y,selectedTimeframe:U,isMobile:Z,showAddStockModal:w,addingStock:S,selectedMarketTab:C,symbolSearchKeyword:k,symbolSearchResults:I,searchingSymbols:E,hotSymbols:A,loadingHotSymbols:P,selectedSymbolForAdd:M,marketTypes:T,hasSearched:B,handleCloseAddStockModal:$t,handleMarketTabChange:Yt,handleSymbolSearchInput:Xt,handleSearchOrInput:Kt,searchSymbolsInModal:jt,selectSymbol:Gt,loadHotSymbols:Zt,handleAddStock:qt,handleDirectAdd:Ut,loadMarketTypes:Ht,showQuickTrade:F,qtSymbol:R,qtSide:L,qtPrice:N,isCryptoMarket:O,openQuickTrade:z,onQuickTradeSuccess:V,handleQuickTradeSymbolChange:W,goToIndicatorMarket:H}}},Wa=Va,Ha=(0,E.A)(Wa,n,a,!1,null,"6bd239a6",null),$a=Ha.exports},40955:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(80754),i(84636),i(39506),i(57165))})(0,function(t){return function(){var e=t,i=e.lib,n=i.BlockCipher,a=e.algo,r=[],o=[],s=[],l=[],c=[],u=[],d=[],h=[],p=[],v=[];(function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var i=0,n=0;for(e=0;e<256;e++){var a=n^n<<1^n<<2^n<<3^n<<4;a=a>>>8^255&a^99,r[i]=a,o[a]=i;var f=t[i],g=t[f],m=t[g],y=257*t[a]^16843008*a;s[i]=y<<24|y>>>8,l[i]=y<<16|y>>>16,c[i]=y<<8|y>>>24,u[i]=y;y=16843009*m^65537*g^257*f^16843008*i;d[a]=y<<24|y>>>8,h[a]=y<<16|y>>>16,p[a]=y<<8|y>>>24,v[a]=y,i?(i=f^t[t[t[m^f]]],n^=t[t[n]]):i=n=1}})();var f=[0,1,2,4,8,16,32,64,128,27,54],g=a.AES=n.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,i=t.sigBytes/4,n=this._nRounds=i+6,a=4*(n+1),o=this._keySchedule=[],s=0;s6&&s%i==4&&(u=r[u>>>24]<<24|r[u>>>16&255]<<16|r[u>>>8&255]<<8|r[255&u]):(u=u<<8|u>>>24,u=r[u>>>24]<<24|r[u>>>16&255]<<16|r[u>>>8&255]<<8|r[255&u],u^=f[s/i|0]<<24),o[s]=o[s-i]^u);for(var l=this._invKeySchedule=[],c=0;c>>24]]^h[r[u>>>16&255]]^p[r[u>>>8&255]]^v[r[255&u]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,s,l,c,u,r)},decryptBlock:function(t,e){var i=t[e+1];t[e+1]=t[e+3],t[e+3]=i,this._doCryptBlock(t,e,this._invKeySchedule,d,h,p,v,o);i=t[e+1];t[e+1]=t[e+3],t[e+3]=i},_doCryptBlock:function(t,e,i,n,a,r,o,s){for(var l=this._nRounds,c=t[e]^i[0],u=t[e+1]^i[1],d=t[e+2]^i[2],h=t[e+3]^i[3],p=4,v=1;v>>24]^a[u>>>16&255]^r[d>>>8&255]^o[255&h]^i[p++],g=n[u>>>24]^a[d>>>16&255]^r[h>>>8&255]^o[255&c]^i[p++],m=n[d>>>24]^a[h>>>16&255]^r[c>>>8&255]^o[255&u]^i[p++],y=n[h>>>24]^a[c>>>16&255]^r[u>>>8&255]^o[255&d]^i[p++];c=f,u=g,d=m,h=y}f=(s[c>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[255&h])^i[p++],g=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[h>>>8&255]<<8|s[255&c])^i[p++],m=(s[d>>>24]<<24|s[h>>>16&255]<<16|s[c>>>8&255]<<8|s[255&u])^i[p++],y=(s[h>>>24]<<24|s[c>>>16&255]<<16|s[u>>>8&255]<<8|s[255&d])^i[p++];t[e]=f,t[e+1]=g,t[e+2]=m,t[e+3]=y},keySize:8});e.AES=n._createHelper(g)}(),t.AES})},43128:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(80754),i(84636),i(39506),i(57165))})(0,function(t){return function(){var e=t,i=e.lib,n=i.BlockCipher,a=e.algo;const r=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],s=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var l={pbox:[],sbox:[]};function c(t,e){let i=e>>24&255,n=e>>16&255,a=e>>8&255,r=255&e,o=t.sbox[0][i]+t.sbox[1][n];return o^=t.sbox[2][a],o+=t.sbox[3][r],o}function u(t,e,i){let n,a=e,o=i;for(let s=0;s1;--s)a^=t.pbox[s],o=c(t,a)^o,n=a,a=o,o=n;return n=a,a=o,o=n,o^=t.pbox[1],a^=t.pbox[0],{left:a,right:o}}function h(t,e,i){for(let r=0;r<4;r++){t.sbox[r]=[];for(let e=0;e<256;e++)t.sbox[r][e]=s[r][e]}let n=0;for(let s=0;s=i&&(n=0);let a=0,l=0,c=0;for(let o=0;o>>2];t.sigBytes-=e}},m=(n.BlockCipher=d.extend({cfg:d.cfg.extend({mode:v,padding:g}),reset:function(){var t;d.reset.call(this);var e=this.cfg,i=e.iv,n=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=n.createEncryptor:(t=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,i&&i.words):(this._mode=t.call(n,this,i&&i.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4}),n.CipherParams=a.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),y=i.format={},_=y.OpenSSL={stringify:function(t){var e,i=t.ciphertext,n=t.salt;return e=n?r.create([1398893684,1701076831]).concat(n).concat(i):i,e.toString(l)},parse:function(t){var e,i=l.parse(t),n=i.words;return 1398893684==n[0]&&1701076831==n[1]&&(e=r.create(n.slice(2,4)),n.splice(0,4),i.sigBytes-=16),m.create({ciphertext:i,salt:e})}},b=n.SerializableCipher=a.extend({cfg:a.extend({format:_}),encrypt:function(t,e,i,n){n=this.cfg.extend(n);var a=t.createEncryptor(i,n),r=a.finalize(e),o=a.cfg;return m.create({ciphertext:r,key:i,iv:o.iv,algorithm:t,mode:o.mode,padding:o.padding,blockSize:t.blockSize,formatter:n.format})},decrypt:function(t,e,i,n){n=this.cfg.extend(n),e=this._parse(e,n.format);var a=t.createDecryptor(i,n).finalize(e.ciphertext);return a},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),x=i.kdf={},w=x.OpenSSL={execute:function(t,e,i,n,a){if(n||(n=r.random(8)),a)o=u.create({keySize:e+i,hasher:a}).compute(t,n);else var o=u.create({keySize:e+i}).compute(t,n);var s=r.create(o.words.slice(e),4*i);return o.sigBytes=4*e,m.create({key:o,iv:s,salt:n})}},S=n.PasswordBasedCipher=b.extend({cfg:b.cfg.extend({kdf:w}),encrypt:function(t,e,i,n){n=this.cfg.extend(n);var a=n.kdf.execute(i,t.keySize,t.ivSize,n.salt,n.hasher);n.iv=a.iv;var r=b.encrypt.call(this,t,e,a.key,n);return r.mixIn(a),r},decrypt:function(t,e,i,n){n=this.cfg.extend(n),e=this._parse(e,n.format);var a=n.kdf.execute(i,t.keySize,t.ivSize,e.salt,n.hasher);n.iv=a.iv;var r=b.decrypt.call(this,t,e,a.key,n);return r}})}()})},19021:function(t,e,i){(function(e,i){t.exports=i()})(0,function(){var t=t||function(t,e){var n;if("undefined"!==typeof window&&window.crypto&&(n=window.crypto),"undefined"!==typeof self&&self.crypto&&(n=self.crypto),"undefined"!==typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!==typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&"undefined"!==typeof i.g&&i.g.crypto&&(n=i.g.crypto),!n)try{n=i(50477)}catch(g){}var a=function(){if(n){if("function"===typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(g){}if("function"===typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(g){}}throw new Error("Native crypto module could not be used to get secure random number.")},r=Object.create||function(){function t(){}return function(e){var i;return t.prototype=e,i=new t,t.prototype=null,i}}(),o={},s=o.lib={},l=s.Base=function(){return{extend:function(t){var e=r(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=s.WordArray=l.extend({init:function(t,i){t=this.words=t||[],this.sigBytes=i!=e?i:4*t.length},toString:function(t){return(t||d).stringify(this)},concat:function(t){var e=this.words,i=t.words,n=this.sigBytes,a=t.sigBytes;if(this.clamp(),n%4)for(var r=0;r>>2]>>>24-r%4*8&255;e[n+r>>>2]|=o<<24-(n+r)%4*8}else for(var s=0;s>>2]=i[s>>>2];return this.sigBytes+=a,this},clamp:function(){var e=this.words,i=this.sigBytes;e[i>>>2]&=4294967295<<32-i%4*8,e.length=t.ceil(i/4)},clone:function(){var t=l.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],i=0;i>>2]>>>24-a%4*8&255;n.push((r>>>4).toString(16)),n.push((15&r).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,i=[],n=0;n>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new c.init(i,e/2)}},h=u.Latin1={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],a=0;a>>2]>>>24-a%4*8&255;n.push(String.fromCharCode(r))}return n.join("")},parse:function(t){for(var e=t.length,i=[],n=0;n>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new c.init(i,e)}},p=u.Utf8={stringify:function(t){try{return decodeURIComponent(escape(h.stringify(t)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(t){return h.parse(unescape(encodeURIComponent(t)))}},v=s.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=p.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var i,n=this._data,a=n.words,r=n.sigBytes,o=this.blockSize,s=4*o,l=r/s;l=e?t.ceil(l):t.max((0|l)-this._minBufferSize,0);var u=l*o,d=t.min(4*u,r);if(u){for(var h=0;h>>2]>>>24-r%4*8&255,s=e[r+1>>>2]>>>24-(r+1)%4*8&255,l=e[r+2>>>2]>>>24-(r+2)%4*8&255,c=o<<16|s<<8|l,u=0;u<4&&r+.75*u>>6*(3-u)&63));var d=n.charAt(64);if(d)while(a.length%4)a.push(d);return a.join("")},parse:function(t){var e=t.length,i=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var a=0;a>>6-o%4*2,c=s|l;a[r>>>2]|=c<<24-r%4*8,r++}return n.create(a,r)}}(),t.enc.Base64})},64725:function(t,e,i){(function(e,n){t.exports=n(i(19021))})(0,function(t){return function(){var e=t,i=e.lib,n=i.WordArray,a=e.enc;a.Base64url={stringify:function(t,e){void 0===e&&(e=!0);var i=t.words,n=t.sigBytes,a=e?this._safe_map:this._map;t.clamp();for(var r=[],o=0;o>>2]>>>24-o%4*8&255,l=i[o+1>>>2]>>>24-(o+1)%4*8&255,c=i[o+2>>>2]>>>24-(o+2)%4*8&255,u=s<<16|l<<8|c,d=0;d<4&&o+.75*d>>6*(3-d)&63));var h=a.charAt(64);if(h)while(r.length%4)r.push(h);return r.join("")},parse:function(t,e){void 0===e&&(e=!0);var i=t.length,n=e?this._safe_map:this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var o=0;o>>6-o%4*2,c=s|l;a[r>>>2]|=c<<24-r%4*8,r++}return n.create(a,r)}}(),t.enc.Base64url})},45503:function(t,e,i){(function(e,n){t.exports=n(i(19021))})(0,function(t){return function(){var e=t,i=e.lib,n=i.WordArray,a=e.enc;a.Utf16=a.Utf16BE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],a=0;a>>2]>>>16-a%4*8&65535;n.push(String.fromCharCode(r))}return n.join("")},parse:function(t){for(var e=t.length,i=[],a=0;a>>1]|=t.charCodeAt(a)<<16-a%2*16;return n.create(i,2*e)}};function r(t){return t<<8&4278255360|t>>>8&16711935}a.Utf16LE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],a=0;a>>2]>>>16-a%4*8&65535);n.push(String.fromCharCode(o))}return n.join("")},parse:function(t){for(var e=t.length,i=[],a=0;a>>1]|=r(t.charCodeAt(a)<<16-a%2*16);return n.create(i,2*e)}}}(),t.enc.Utf16})},39506:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(45471),i(51025))})(0,function(t){return function(){var e=t,i=e.lib,n=i.Base,a=i.WordArray,r=e.algo,o=r.MD5,s=r.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:o,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){var i,n=this.cfg,r=n.hasher.create(),o=a.create(),s=o.words,l=n.keySize,c=n.iterations;while(s.lengthn&&(e=t.finalize(e)),e.clamp();for(var a=this._oKey=e.clone(),o=this._iKey=e.clone(),s=a.words,l=o.words,c=0;c>>2]|=t[n]<<24-n%4*8;a.call(this,i,e)}else a.apply(this,arguments)};r.prototype=n}}(),t.lib.WordArray})},84636:function(t,e,i){(function(e,n){t.exports=n(i(19021))})(0,function(t){return function(e){var i=t,n=i.lib,a=n.WordArray,r=n.Hasher,o=i.algo,s=[];(function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0})();var l=o.MD5=r.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var i=0;i<16;i++){var n=e+i,a=t[n];t[n]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}var r=this._hash.words,o=t[e+0],l=t[e+1],p=t[e+2],v=t[e+3],f=t[e+4],g=t[e+5],m=t[e+6],y=t[e+7],_=t[e+8],b=t[e+9],x=t[e+10],w=t[e+11],S=t[e+12],C=t[e+13],k=t[e+14],I=t[e+15],E=r[0],A=r[1],P=r[2],M=r[3];E=c(E,A,P,M,o,7,s[0]),M=c(M,E,A,P,l,12,s[1]),P=c(P,M,E,A,p,17,s[2]),A=c(A,P,M,E,v,22,s[3]),E=c(E,A,P,M,f,7,s[4]),M=c(M,E,A,P,g,12,s[5]),P=c(P,M,E,A,m,17,s[6]),A=c(A,P,M,E,y,22,s[7]),E=c(E,A,P,M,_,7,s[8]),M=c(M,E,A,P,b,12,s[9]),P=c(P,M,E,A,x,17,s[10]),A=c(A,P,M,E,w,22,s[11]),E=c(E,A,P,M,S,7,s[12]),M=c(M,E,A,P,C,12,s[13]),P=c(P,M,E,A,k,17,s[14]),A=c(A,P,M,E,I,22,s[15]),E=u(E,A,P,M,l,5,s[16]),M=u(M,E,A,P,m,9,s[17]),P=u(P,M,E,A,w,14,s[18]),A=u(A,P,M,E,o,20,s[19]),E=u(E,A,P,M,g,5,s[20]),M=u(M,E,A,P,x,9,s[21]),P=u(P,M,E,A,I,14,s[22]),A=u(A,P,M,E,f,20,s[23]),E=u(E,A,P,M,b,5,s[24]),M=u(M,E,A,P,k,9,s[25]),P=u(P,M,E,A,v,14,s[26]),A=u(A,P,M,E,_,20,s[27]),E=u(E,A,P,M,C,5,s[28]),M=u(M,E,A,P,p,9,s[29]),P=u(P,M,E,A,y,14,s[30]),A=u(A,P,M,E,S,20,s[31]),E=d(E,A,P,M,g,4,s[32]),M=d(M,E,A,P,_,11,s[33]),P=d(P,M,E,A,w,16,s[34]),A=d(A,P,M,E,k,23,s[35]),E=d(E,A,P,M,l,4,s[36]),M=d(M,E,A,P,f,11,s[37]),P=d(P,M,E,A,y,16,s[38]),A=d(A,P,M,E,x,23,s[39]),E=d(E,A,P,M,C,4,s[40]),M=d(M,E,A,P,o,11,s[41]),P=d(P,M,E,A,v,16,s[42]),A=d(A,P,M,E,m,23,s[43]),E=d(E,A,P,M,b,4,s[44]),M=d(M,E,A,P,S,11,s[45]),P=d(P,M,E,A,I,16,s[46]),A=d(A,P,M,E,p,23,s[47]),E=h(E,A,P,M,o,6,s[48]),M=h(M,E,A,P,y,10,s[49]),P=h(P,M,E,A,k,15,s[50]),A=h(A,P,M,E,g,21,s[51]),E=h(E,A,P,M,S,6,s[52]),M=h(M,E,A,P,v,10,s[53]),P=h(P,M,E,A,x,15,s[54]),A=h(A,P,M,E,l,21,s[55]),E=h(E,A,P,M,_,6,s[56]),M=h(M,E,A,P,I,10,s[57]),P=h(P,M,E,A,m,15,s[58]),A=h(A,P,M,E,C,21,s[59]),E=h(E,A,P,M,f,6,s[60]),M=h(M,E,A,P,w,10,s[61]),P=h(P,M,E,A,p,15,s[62]),A=h(A,P,M,E,b,21,s[63]),r[0]=r[0]+E|0,r[1]=r[1]+A|0,r[2]=r[2]+P|0,r[3]=r[3]+M|0},_doFinalize:function(){var t=this._data,i=t.words,n=8*this._nDataBytes,a=8*t.sigBytes;i[a>>>5]|=128<<24-a%32;var r=e.floor(n/4294967296),o=n;i[15+(a+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),i[14+(a+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(i.length+1),this._process();for(var s=this._hash,l=s.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});function c(t,e,i,n,a,r,o){var s=t+(e&i|~e&n)+a+o;return(s<>>32-r)+e}function u(t,e,i,n,a,r,o){var s=t+(e&n|i&~n)+a+o;return(s<>>32-r)+e}function d(t,e,i,n,a,r,o){var s=t+(e^i^n)+a+o;return(s<>>32-r)+e}function h(t,e,i,n,a,r,o){var s=t+(i^(e|~n))+a+o;return(s<>>32-r)+e}i.MD5=r._createHelper(l),i.HmacMD5=r._createHmacHelper(l)}(Math),t.MD5})},82169:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.mode.CFB=function(){var e=t.lib.BlockCipherMode.extend();function i(t,e,i,n){var a,r=this._iv;r?(a=r.slice(0),this._iv=void 0):a=this._prevBlock,n.encryptBlock(a,0);for(var o=0;o0?"+":"")+t._s(t.priceChange.toFixed(2))+"% ")])]),t.isCryptoMarket?e("a-button",{staticClass:"qt-header-btn",attrs:{size:"small"},on:{click:t.openQuickTrade}},[e("a-icon",{attrs:{type:"thunderbolt",theme:"filled"}}),t._v(" "+t._s(t.$t("quickTrade.openPanel"))+" ")],1):t._e()],1):t._e()])]),e("div",{staticClass:"chart-content"},[e("div",{staticClass:"chart-main-row"},[t.currentSymbol?e("div",{staticClass:"mobile-symbol-price"},[e("div",{staticClass:"mobile-symbol-info"},[e("span",{staticClass:"mobile-market-tag"},[t._v(t._s(t.currentMarket))]),e("span",[t._v("-")]),e("span",{staticClass:"mobile-symbol-label"},[t._v(t._s(t.currentSymbol))])]),e("div",{staticClass:"mobile-price-info",class:t.priceChangeClass},[e("span",{staticClass:"mobile-symbol-price"},[t._v(t._s(t.currentPrice))]),e("span",{staticClass:"mobile-symbol-change"},[t._v(" "+t._s(t.priceChange>0?"+":"")+t._s(t.priceChange.toFixed(2))+"% ")])])]):t._e(),e("kline-chart",{ref:"klineChart",attrs:{symbol:t.currentSymbol,market:t.currentMarket,timeframe:t.timeframe,theme:t.chartTheme,activeIndicators:t.activeIndicators,realtimeEnabled:t.realtimeEnabled},on:{"price-change":t.handlePriceChange,retry:t.handleChartRetry,"indicator-toggle":t.handleIndicatorToggle}}),e("div",{staticClass:"chart-right"},[e("div",{staticClass:"indicators-panel"},[e("div",{staticClass:"panel-header"},[e("span",[t._v(t._s(t.$t("dashboard.indicator.panel.title")))]),e("div",{staticStyle:{display:"flex","align-items":"center","margin-left":"auto",gap:"8px"}},[t.isMobile?e("a-button",{staticClass:"mobile-header-create-btn",attrs:{type:"primary",size:"small",icon:"plus"},on:{click:t.handleCreateIndicator}},[t._v(" "+t._s(t.$t("dashboard.indicator.create"))+" ")]):t._e(),e("a-tooltip",{attrs:{title:t.realtimeEnabled?t.$t("dashboard.indicator.panel.realtimeOn"):t.$t("dashboard.indicator.panel.realtimeOff")}},[e("a-button",{staticClass:"realtime-toggle-btn",class:{active:t.realtimeEnabled},attrs:{type:"text"},on:{click:t.toggleRealtime}},[e("a-icon",{attrs:{type:t.realtimeEnabled?"sync":"pause-circle",spin:t.realtimeEnabled}})],1)],1)],1)]),e("div",{staticClass:"panel-body"},[t.isMobile?[e("div",{staticClass:"mobile-tab-content"},[e("div",{staticClass:"section-content custom-scrollbar"},[t._l(t.customIndicators,function(i){return e("div",{key:"custom-"+i.id,class:["indicator-card",{"indicator-active":t.isIndicatorActive("custom-"+i.id)}],on:{click:function(e){return t.toggleIndicator(i,"custom")}}},[e("div",{staticClass:"card-content"},[e("div",{staticClass:"card-header"},[e("span",{staticClass:"card-name"},[t._v(t._s(i.name))]),e("div",{staticClass:"card-actions"},[e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.action.edit")}},[e("a-icon",{staticClass:"action-icon edit-icon",attrs:{type:"edit"},on:{click:function(e){return e.stopPropagation(),t.handleEditIndicator(i)}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.action.delete")}},[e("a-icon",{staticClass:"action-icon delete-icon",attrs:{type:"delete"},on:{click:function(e){return e.stopPropagation(),t.handleDeleteIndicator(i)}}})],1),e("a-tooltip",{attrs:{title:t.isIndicatorActive("custom-"+i.id)?t.$t("dashboard.indicator.action.stop"):t.$t("dashboard.indicator.action.start")}},[e("a-icon",{class:["action-icon","toggle-icon",{active:t.isIndicatorActive("custom-"+i.id)}],attrs:{type:t.isIndicatorActive("custom-"+i.id)?"pause-circle":"play-circle"},on:{click:function(e){return e.stopPropagation(),t.toggleIndicator(i,"custom")}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.backtest.title")}},[e("a-icon",{staticClass:"action-icon backtest-icon",attrs:{type:"experiment"},on:{click:function(e){return e.stopPropagation(),t.handleOpenBacktest(i)}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.backtest.historyTitle")}},[e("a-icon",{staticClass:"action-icon backtest-history-icon",attrs:{type:"clock-circle"},on:{click:function(e){return e.stopPropagation(),t.handleOpenBacktestHistory(i)}}})],1),e("a-tooltip",{attrs:{title:i.publish_to_community?t.$t("dashboard.indicator.action.unpublish"):t.$t("dashboard.indicator.action.publish")}},[e("a-icon",{class:["action-icon","publish-icon",{published:i.publish_to_community}],attrs:{type:i.publish_to_community?"cloud":"cloud-upload"},on:{click:function(e){return e.stopPropagation(),t.handlePublishIndicator(i)}}})],1)],1)]),e("span",{staticClass:"card-desc"},[t._v(t._s(i.description||""))])])])}),0===t.customIndicators.length?e("div",{staticClass:"empty-indicators"},[e("a-icon",{attrs:{type:"info-circle"}}),e("span",[t._v(t._s(t.$t("dashboard.indicator.empty")))])],1):t._e()],2)])]:[e("div",{staticClass:"indicator-section",class:{"section-empty":0===t.customIndicators.length}},[e("div",{staticClass:"section-label"},[e("div",{staticClass:"section-label-left",on:{click:t.toggleCustomSection}},[e("a-icon",{staticClass:"collapse-icon",attrs:{type:t.customSectionCollapsed?"right":"down"}}),e("span",[t._v(t._s(t.$t("dashboard.indicator.section.myCreated"))+" ("+t._s(t.customIndicators.length)+")")])],1),e("a-button",{staticClass:"create-indicator-btn",attrs:{type:"primary",size:"small",icon:"plus"},on:{click:function(e){return e.stopPropagation(),t.handleCreateIndicator.apply(null,arguments)}}},[t._v(" "+t._s(t.$t("dashboard.indicator.create"))+" ")])],1),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.customSectionCollapsed,expression:"!customSectionCollapsed"}],staticClass:"section-content custom-scrollbar"},[t._l(t.customIndicators,function(i){return e("div",{key:"custom-"+i.id,class:["indicator-card",{"indicator-active":t.isIndicatorActive("custom-"+i.id)}],on:{click:function(e){return t.toggleIndicator(i,"custom")}}},[e("div",{staticClass:"card-content"},[e("div",{staticClass:"card-header"},[e("span",{staticClass:"card-name"},[t._v(t._s(i.name))]),e("div",{staticClass:"card-actions"},[e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.action.edit")}},[e("a-icon",{staticClass:"action-icon edit-icon",attrs:{type:"edit"},on:{click:function(e){return e.stopPropagation(),t.handleEditIndicator(i)}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.action.delete")}},[e("a-icon",{staticClass:"action-icon delete-icon",attrs:{type:"delete"},on:{click:function(e){return e.stopPropagation(),t.handleDeleteIndicator(i)}}})],1),e("a-tooltip",{attrs:{title:t.isIndicatorActive("custom-"+i.id)?t.$t("dashboard.indicator.action.stop"):t.$t("dashboard.indicator.action.start")}},[e("a-icon",{class:["action-icon","toggle-icon",{active:t.isIndicatorActive("custom-"+i.id)}],attrs:{type:t.isIndicatorActive("custom-"+i.id)?"pause-circle":"play-circle"},on:{click:function(e){return e.stopPropagation(),t.toggleIndicator(i,"custom")}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.backtest.title")}},[e("a-icon",{staticClass:"action-icon backtest-icon",attrs:{type:"experiment"},on:{click:function(e){return e.stopPropagation(),t.handleOpenBacktest(i)}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.backtest.historyTitle")}},[e("a-icon",{staticClass:"action-icon backtest-history-icon",attrs:{type:"clock-circle"},on:{click:function(e){return e.stopPropagation(),t.handleOpenBacktestHistory(i)}}})],1),e("a-tooltip",{attrs:{title:i.publish_to_community?t.$t("dashboard.indicator.action.unpublish"):t.$t("dashboard.indicator.action.publish")}},[e("a-icon",{class:["action-icon","publish-icon",{published:i.publish_to_community}],attrs:{type:i.publish_to_community?"cloud":"cloud-upload"},on:{click:function(e){return e.stopPropagation(),t.handlePublishIndicator(i)}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.action.createStrategy")}},[e("a-icon",{staticClass:"action-icon create-strategy-icon",attrs:{type:"rocket"},on:{click:function(e){return e.stopPropagation(),t.handleCreateStrategyFromIndicator(i)}}})],1)],1)]),e("span",{staticClass:"card-desc"},[t._v(t._s(i.description||""))])])])}),0===t.customIndicators.length?e("div",{staticClass:"empty-indicators"},[e("a-icon",{attrs:{type:"info-circle"}}),e("span",[t._v(t._s(t.$t("dashboard.indicator.empty")))])],1):t._e()],2)]),e("div",{staticClass:"indicator-section",class:{"section-empty":0===t.purchasedIndicators.length}},[e("div",{staticClass:"section-label"},[e("div",{staticClass:"section-label-left",on:{click:function(e){t.purchasedSectionCollapsed=!t.purchasedSectionCollapsed}}},[e("a-icon",{staticClass:"collapse-icon",attrs:{type:t.purchasedSectionCollapsed?"right":"down"}}),e("span",[t._v(t._s(t.$t("dashboard.indicator.section.purchased"))+" ("+t._s(t.purchasedIndicators.length)+")")])],1),e("a-button",{staticClass:"buy-indicator-btn",attrs:{type:"link",size:"small",icon:"shop"},on:{click:function(e){return e.stopPropagation(),t.goToIndicatorMarket.apply(null,arguments)}}},[t._v(" "+t._s(t.$t("menu.dashboard.community"))+" ")])],1),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.purchasedSectionCollapsed,expression:"!purchasedSectionCollapsed"}],staticClass:"section-content custom-scrollbar"},[t._l(t.purchasedIndicators,function(i){return e("div",{key:"purchased-"+i.id,class:["indicator-card","purchased-indicator",{"indicator-active":t.isIndicatorActive("purchased-"+i.id)}],on:{click:function(e){return t.toggleIndicator(i,"purchased")}}},[e("div",{staticClass:"card-content"},[e("div",{staticClass:"card-header"},[e("span",{staticClass:"card-name"},[e("a-icon",{staticClass:"purchased-icon",attrs:{type:"shopping"}}),t._v(" "+t._s(i.name)+" ")],1),e("div",{staticClass:"card-actions"},[e("a-tooltip",{attrs:{title:t.isIndicatorActive("purchased-"+i.id)?t.$t("dashboard.indicator.action.stop"):t.$t("dashboard.indicator.action.start")}},[e("a-icon",{class:["action-icon","toggle-icon",{active:t.isIndicatorActive("purchased-"+i.id)}],attrs:{type:t.isIndicatorActive("purchased-"+i.id)?"pause-circle":"play-circle"},on:{click:function(e){return e.stopPropagation(),t.toggleIndicator(i,"purchased")}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.backtest.title")}},[e("a-icon",{staticClass:"action-icon backtest-icon",attrs:{type:"experiment"},on:{click:function(e){return e.stopPropagation(),t.handleOpenBacktest(i)}}})],1),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.backtest.historyTitle")}},[e("a-icon",{staticClass:"action-icon backtest-history-icon",attrs:{type:"clock-circle"},on:{click:function(e){return e.stopPropagation(),t.handleOpenBacktestHistory(i)}}})],1)],1)]),e("span",{staticClass:"card-desc"},[t._v(t._s(i.description||""))])])])}),0===t.purchasedIndicators.length?e("div",{staticClass:"empty-indicators"},[e("a-icon",{attrs:{type:"shopping"}}),e("span",[t._v(t._s(t.$t("dashboard.indicator.emptyPurchased")))])],1):t._e()],2)])]],2)])])],1),e("indicator-editor",{ref:"indicatorEditor",attrs:{visible:t.showIndicatorEditor,indicator:t.editingIndicator,userId:t.userId},on:{run:t.handleRunIndicator,save:t.handleSaveIndicator,cancel:function(e){t.showIndicatorEditor=!1,t.editingIndicator=null}}}),e("a-modal",{attrs:{visible:t.showParamsModal,title:t.$t("dashboard.indicator.paramsConfig.title"),confirmLoading:t.loadingParams,width:500,maskClosable:!1,keyboard:!1},on:{ok:t.confirmIndicatorParams,cancel:t.cancelIndicatorParams,afterClose:t.handleParamsModalAfterClose}},[t.pendingIndicator?e("div",{staticClass:"params-config-modal"},[e("div",{staticClass:"indicator-info"},[e("span",{staticClass:"indicator-name"},[t._v(t._s(t.pendingIndicator.name))])]),e("a-divider"),t.indicatorParams.length>0?e("div",{staticClass:"params-form"},t._l(t.indicatorParams,function(i){return e("div",{key:i.name,staticClass:"param-item"},[e("div",{staticClass:"param-header"},[e("label",{staticClass:"param-label"},[t._v(t._s(i.name))]),i.description?e("a-tooltip",{attrs:{title:i.description}},[e("a-icon",{staticStyle:{color:"#999","margin-left":"4px"},attrs:{type:"question-circle"}})],1):t._e()],1),"int"===i.type?e("a-input-number",{staticStyle:{width:"100%"},attrs:{precision:0},model:{value:t.indicatorParamValues[i.name],callback:function(e){t.$set(t.indicatorParamValues,i.name,e)},expression:"indicatorParamValues[param.name]"}}):"float"===i.type?e("a-input-number",{staticStyle:{width:"100%"},attrs:{precision:4},model:{value:t.indicatorParamValues[i.name],callback:function(e){t.$set(t.indicatorParamValues,i.name,e)},expression:"indicatorParamValues[param.name]"}}):"bool"===i.type?e("a-switch",{model:{value:t.indicatorParamValues[i.name],callback:function(e){t.$set(t.indicatorParamValues,i.name,e)},expression:"indicatorParamValues[param.name]"}}):e("a-input",{model:{value:t.indicatorParamValues[i.name],callback:function(e){t.$set(t.indicatorParamValues,i.name,e)},expression:"indicatorParamValues[param.name]"}})],1)}),0):e("a-empty",{attrs:{description:t.$t("dashboard.indicator.paramsConfig.noParams")}})],1):t._e()]),e("a-modal",{attrs:{title:t.publishIndicator&&t.publishIndicator.publish_to_community?t.$t("dashboard.indicator.publish.editTitle"):t.$t("dashboard.indicator.publish.title"),visible:t.showPublishModal,confirmLoading:t.publishing,width:"500px",okText:t.publishIndicator&&t.publishIndicator.publish_to_community?t.$t("dashboard.indicator.publish.update"):t.$t("dashboard.indicator.publish.confirm"),cancelText:t.$t("common.cancel")},on:{ok:t.handleConfirmPublish,cancel:function(e){t.showPublishModal=!1,t.publishIndicator=null}}},[e("a-form-model",{ref:"publishForm",attrs:{model:t.publishForm,rules:t.publishRules,layout:"vertical"}},[e("a-alert",{staticStyle:{"margin-bottom":"16px"},attrs:{type:"info","show-icon":"",message:t.$t("dashboard.indicator.publish.hint")}}),e("a-form-model-item",{attrs:{label:t.$t("dashboard.indicator.publish.pricingType"),prop:"pricingType"}},[e("a-radio-group",{model:{value:t.publishPricingType,callback:function(e){t.publishPricingType=e},expression:"publishPricingType"}},[e("a-radio",{attrs:{value:"free"}},[t._v(t._s(t.$t("dashboard.indicator.publish.free")))]),e("a-radio",{attrs:{value:"paid"}},[t._v(t._s(t.$t("dashboard.indicator.publish.paid")))])],1)],1),"paid"===t.publishPricingType?e("a-form-model-item",{attrs:{label:t.$t("dashboard.indicator.publish.price"),prop:"price"}},[e("a-input-number",{staticStyle:{width:"200px"},attrs:{min:1,max:1e4,precision:0},model:{value:t.publishPrice,callback:function(e){t.publishPrice=e},expression:"publishPrice"}}),e("span",{staticStyle:{"margin-left":"8px"}},[t._v(t._s(t.$t("community.credits")))])],1):t._e(),"paid"===t.publishPricingType?e("a-form-model-item",{attrs:{label:t.$t("dashboard.indicator.publish.vipFree")}},[e("a-switch",{model:{value:t.publishVipFree,callback:function(e){t.publishVipFree=e},expression:"publishVipFree"}}),e("div",{staticStyle:{"margin-top":"6px",color:"rgba(0,0,0,0.45)","font-size":"12px"}},[t._v(" "+t._s(t.$t("dashboard.indicator.publish.vipFreeHint"))+" ")])],1):t._e(),e("a-form-model-item",{attrs:{label:t.$t("dashboard.indicator.publish.description"),prop:"description"}},[e("a-textarea",{attrs:{placeholder:t.$t("dashboard.indicator.publish.descriptionPlaceholder"),rows:4,maxLength:500},model:{value:t.publishDescription,callback:function(e){t.publishDescription=e},expression:"publishDescription"}})],1),t.publishIndicator&&t.publishIndicator.publish_to_community?e("div",{staticStyle:{"margin-top":"16px"}},[e("a-button",{attrs:{type:"danger",ghost:"",loading:t.unpublishing},on:{click:t.handleUnpublish}},[e("a-icon",{attrs:{type:"close-circle"}}),t._v(" "+t._s(t.$t("dashboard.indicator.publish.unpublish"))+" ")],1)],1):t._e()],1)],1),e("a-modal",{attrs:{title:t.$t("dashboard.analysis.modal.addStock.title"),visible:t.showAddStockModal,confirmLoading:t.addingStock,width:"600px",okText:t.$t("dashboard.analysis.modal.addStock.confirm"),cancelText:t.$t("dashboard.analysis.modal.addStock.cancel")},on:{ok:t.handleAddStock,cancel:t.handleCloseAddStockModal}},[e("div",{staticClass:"add-stock-modal-content"},[e("a-tabs",{staticClass:"market-tabs",on:{change:t.handleMarketTabChange},model:{value:t.selectedMarketTab,callback:function(e){t.selectedMarketTab=e},expression:"selectedMarketTab"}},t._l(t.marketTypes,function(i){return e("a-tab-pane",{key:i.value,attrs:{tab:t.$t(i.i18nKey||"dashboard.analysis.market.".concat(i.value))}})}),1),e("div",{staticClass:"symbol-search-section"},[e("a-input-search",{attrs:{placeholder:t.$t("dashboard.analysis.modal.addStock.searchOrInputPlaceholder"),loading:t.searchingSymbols,size:"large","allow-clear":""},on:{search:t.handleSearchOrInput,change:t.handleSymbolSearchInput},model:{value:t.symbolSearchKeyword,callback:function(e){t.symbolSearchKeyword=e},expression:"symbolSearchKeyword"}},[e("a-button",{attrs:{slot:"enterButton",type:"primary",icon:"search"},slot:"enterButton"},[t._v(" "+t._s(t.$t("dashboard.analysis.modal.addStock.search"))+" ")])],1)],1),t.symbolSearchResults.length>0?e("div",{staticClass:"search-results-section"},[e("div",{staticClass:"section-title"},[e("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"search"}}),t._v(" "+t._s(t.$t("dashboard.analysis.modal.addStock.searchResults"))+" ")],1),e("a-list",{staticClass:"symbol-list",attrs:{"data-source":t.symbolSearchResults,loading:t.searchingSymbols,size:"small"},scopedSlots:t._u([{key:"renderItem",fn:function(i){return e("a-list-item",{staticClass:"symbol-list-item",on:{click:function(e){return t.selectSymbol(i)}}},[e("a-list-item-meta",[e("template",{slot:"title"},[e("div",{staticClass:"symbol-item-content"},[e("span",{staticClass:"symbol-code"},[t._v(t._s(i.symbol))]),e("span",{staticClass:"symbol-name"},[t._v(t._s(i.name))]),i.exchange?e("a-tag",{staticStyle:{"margin-left":"8px"},attrs:{size:"small",color:"blue"}},[t._v(" "+t._s(i.exchange)+" ")]):t._e()],1)])],2)],1)}}],null,!1,1074844145)})],1):t._e(),e("div",{staticClass:"hot-symbols-section"},[e("div",{staticClass:"section-title"},[e("a-icon",{staticStyle:{color:"#ff4d4f","margin-right":"4px"},attrs:{type:"fire"}}),t._v(" "+t._s(t.$t("dashboard.analysis.modal.addStock.hotSymbols"))+" ")],1),e("a-spin",{attrs:{spinning:t.loadingHotSymbols}},[t.hotSymbols.length>0?e("a-list",{staticClass:"symbol-list",attrs:{"data-source":t.hotSymbols,size:"small"},scopedSlots:t._u([{key:"renderItem",fn:function(i){return e("a-list-item",{staticClass:"symbol-list-item",on:{click:function(e){return t.selectSymbol(i)}}},[e("a-list-item-meta",[e("template",{slot:"title"},[e("div",{staticClass:"symbol-item-content"},[e("span",{staticClass:"symbol-code"},[t._v(t._s(i.symbol))]),e("span",{staticClass:"symbol-name"},[t._v(t._s(i.name))]),i.exchange?e("a-tag",{staticStyle:{"margin-left":"8px"},attrs:{size:"small",color:"orange"}},[t._v(" "+t._s(i.exchange)+" ")]):t._e()],1)])],2)],1)}}],null,!1,2177647935)}):e("a-empty",{attrs:{description:t.$t("dashboard.analysis.modal.addStock.noHotSymbols"),image:!1}})],1)],1),t.selectedSymbolForAdd?e("div",{staticClass:"selected-symbol-section"},[e("a-alert",{attrs:{message:t.$t("dashboard.analysis.modal.addStock.selectedSymbol"),type:"info","show-icon":"",closable:""},on:{close:function(e){t.selectedSymbolForAdd=null}}},[e("template",{slot:"description"},[e("div",{staticClass:"selected-symbol-info"},[e("a-tag",{staticStyle:{"margin-right":"8px"},attrs:{color:t.getMarketColor(t.selectedSymbolForAdd.market)}},[t._v(" "+t._s(t.$t("dashboard.analysis.market.".concat(t.selectedSymbolForAdd.market)))+" ")]),e("strong",[t._v(t._s(t.selectedSymbolForAdd.symbol))]),t.selectedSymbolForAdd.name?e("span",{staticStyle:{color:"#999","margin-left":"8px"}},[t._v(t._s(t.selectedSymbolForAdd.name))]):e("span",{staticStyle:{color:"#999","margin-left":"8px","font-style":"italic"}},[t._v(t._s(t.$t("dashboard.analysis.modal.addStock.nameWillBeFetched")))])],1)])],2)],1):t._e()],1)])],1),e("a-tooltip",{attrs:{title:t.$t("quickTrade.openPanel"),placement:"left"}},[!t.showQuickTrade&&t.currentSymbol&&t.isCryptoMarket?e("div",{staticClass:"qt-floating-btn",on:{click:t.openQuickTrade}},[e("a-icon",{attrs:{type:"thunderbolt",theme:"filled"}})],1):t._e()]),e("quick-trade-panel",{attrs:{visible:t.showQuickTrade,symbol:t.qtSymbol,"preset-side":t.qtSide,"preset-price":t.qtPrice,source:"indicator","market-type":"swap"},on:{close:function(e){t.showQuickTrade=!1},"order-success":t.onQuickTradeSuccess,"update:symbol":t.handleQuickTradeSymbolChange}})],1)},a=[],r=(i(62621),i(43898)),o=i(44735),s=i(15863),l=i(81127),c=i(56252),u=(i(6011),i(18787)),d=i(76338),h=(i(74423),i(85471)),p=i(95353),v=i(75769),f=i(35038),g=i(505),m=function(){var t=this,e=t._self._c;return e("div",[e("a-modal",{staticClass:"indicator-editor-modal",style:t.isMobile?{top:0,paddingBottom:0}:{top:"2%"},attrs:{title:t.$t("dashboard.indicator.editor.title"),visible:t.visible,width:t.isMobile?"100%":"95vw",confirmLoading:t.saving,okText:t.$t("dashboard.indicator.editor.save"),cancelText:t.$t("dashboard.indicator.editor.cancel"),maskClosable:!1,centered:!1},on:{ok:t.handleSave,cancel:t.handleCancel,afterClose:t.handleAfterClose}},[e("div",{staticClass:"editor-content"},[e("a-row",{staticClass:"editor-layout",class:{"mobile-layout":t.isMobile},attrs:{gutter:16}},[e("a-col",{staticClass:"code-editor-column",attrs:{span:24,xs:24,sm:24,md:24}},[e("div",{staticClass:"code-section"},[e("div",{staticClass:"section-header"},[e("div",{staticClass:"header-left"},[e("span",{staticClass:"section-title"},[t._v(t._s(t.$t("dashboard.indicator.editor.code")))])]),e("div",{staticClass:"section-actions"},[e("a-button",{staticStyle:{padding:"0 8px",color:"#52c41a","font-weight":"bold"},attrs:{type:"link",size:"small",loading:t.verifying},on:{click:t.handleVerifyCode}},[e("a-icon",{attrs:{type:"check-circle"}}),t._v(" "+t._s(t.$t("dashboard.indicator.editor.verifyCode"))+" ")],1),e("a-button",{staticStyle:{padding:"0"},attrs:{type:"link",size:"small"},on:{click:t.goToDocs}},[e("a-icon",{attrs:{type:"book"}}),t._v(" "+t._s(t.$t("dashboard.indicator.editor.guide"))+" ")],1)],1)]),e("a-alert",{staticStyle:{"margin-bottom":"12px"},attrs:{type:"info","show-icon":"",message:t.$t("dashboard.indicator.boundary.message"),description:t.$t("dashboard.indicator.boundary.indicatorRule")}}),e("div",{staticClass:"code-mode-split"},[e("a-row",{staticClass:"code-mode-row",attrs:{gutter:16}},[e("a-col",{staticClass:"code-pane",attrs:{xs:24,sm:24,md:18}},[e("div",{ref:"codeEditorContainer",staticClass:"code-editor-container"})]),e("a-col",{staticClass:"ai-pane",attrs:{xs:24,sm:24,md:6}},[e("div",{staticClass:"ai-panel"},[e("div",{staticClass:"ai-panel-title"},[e("a-icon",{attrs:{type:"robot"}}),e("span",[t._v(t._s(t.$t("dashboard.indicator.editor.aiGenerate")))])],1),e("a-textarea",{attrs:{placeholder:t.$t("dashboard.indicator.editor.aiPromptPlaceholder"),rows:12,"auto-size":{minRows:12,maxRows:20}},model:{value:t.aiPrompt,callback:function(e){t.aiPrompt=e},expression:"aiPrompt"}}),e("a-button",{staticStyle:{"margin-top":"10px"},attrs:{type:"primary",block:"",loading:t.aiGenerating,size:"large"},on:{click:t.handleAIGenerate}},[t._v(" "+t._s(t.$t("dashboard.indicator.editor.aiGenerateBtn"))+" ")])],1)])],1)],1)],1)])],1)],1),e("div",{staticClass:"editor-footer",attrs:{slot:"footer"},slot:"footer"},[e("a-button",{on:{click:t.handleCancel}},[t._v(" "+t._s(t.$t("dashboard.indicator.editor.cancel"))+" ")]),e("a-button",{attrs:{type:"primary",loading:t.saving},on:{click:t.handleSave}},[t._v(" "+t._s(t.$t("dashboard.indicator.editor.save"))+" ")])],1)])],1)},y=[],_=i(57532),b=i(15237),x=i.n(b),w=(i(74806),i(55218),i(97923),i(50436),i(74053)),S=i.n(w),C=i(75314),k={name:"IndicatorEditor",props:{visible:{type:Boolean,default:!1},indicator:{type:Object,default:null},userId:{type:Number,default:null}},data:function(){return{saving:!1,codeEditor:null,aiPrompt:"",aiGenerating:!1,verifying:!1,isMobile:!1}},computed:{},watch:{visible:function(t){var e=this;t?this.$nextTick(function(){setTimeout(function(){!e.codeEditor&&e.$refs.codeEditorContainer&&e.initCodeEditor(),e.initFormData()},200)}):this.codeEditor&&this.codeEditor.refresh()},indicator:{handler:function(t){var e=this;t&&this.visible&&this.$nextTick(function(){setTimeout(function(){e.initFormData()},100)})},deep:!0}},mounted:function(){var t=this;this.checkMobile(),window.addEventListener("resize",this.checkMobile),this.visible&&this.$nextTick(function(){setTimeout(function(){t.initCodeEditor()},100)})},beforeDestroy:function(){if(window.removeEventListener("resize",this.checkMobile),this.codeEditor)try{if("function"===typeof this.codeEditor.toTextArea)this.codeEditor.toTextArea();else if("function"===typeof this.codeEditor.getWrapperElement){var t=this.codeEditor.getWrapperElement();t&&t.parentNode&&t.parentNode.removeChild(t)}}catch(e){}finally{this.codeEditor=null}},methods:{getDefaultIndicatorCode:function(){return'#Demo Code:\n#my_indicator_name = "My Buy/Sell Indicator"\n#my_indicator_description = "Buy/Sell only; execution is normalized in backend."\n\n#df = df.copy()\n#sma = df["close"].rolling(14).mean()\n#buy = (df["close"] > sma) & (df["close"].shift(1) <= sma.shift(1))\n#sell = (df["close"] < sma) & (df["close"].shift(1) >= sma.shift(1))\n#df["buy"] = buy.fillna(False).astype(bool)\n#df["sell"] = sell.fillna(False).astype(bool)\n\n#buy_marks = [df["low"].iloc[i] * 0.995 if df["buy"].iloc[i] else None for i in range(len(df))]\n#sell_marks = [df["high"].iloc[i] * 1.005 if df["sell"].iloc[i] else None for i in range(len(df))]\n\n#output = {\n# "name": my_indicator_name,\n# "plots": [],\n# "signals": [\n# {"type": "buy", "text": "B", "data": buy_marks, "color": "#00E676"},\n# {"type": "sell", "text": "S", "data": sell_marks, "color": "#FF5252"}\n# ]\n#}\n'},checkMobile:function(){this.isMobile=window.innerWidth<=768},goToDocs:function(){window.open("https://github.com/brokermr810/QuantDinger/blob/main/docs/STRATEGY_DEV_GUIDE.md","_blank")},handleVerifyCode:function(){var t=this,e=this.codeEditor?this.codeEditor.getValue():"";e&&e.trim()?(this.verifying=!0,(0,v.Ay)({url:"/api/indicator/verifyCode",method:"post",data:{code:e}}).then(function(e){if(1===e.code){var i=e.data||{};t.$message.success("".concat(t.$t("dashboard.indicator.editor.verifyCodeSuccess")," (").concat(i.plots_count||0," plots, ").concat(i.signals_count||0," signals)"))}else{var n=e.data||{};t.$error({title:t.$t("dashboard.indicator.editor.verifyCodeFailed"),width:600,content:function(t){return t("div",[t("p",{style:{fontWeight:"bold",color:"#ff4d4f"}},e.msg),n.details?t("pre",{style:{background:"#f5f5f5",padding:"8px",overflow:"auto",maxHeight:"300px",marginTop:"8px",fontSize:"12px",fontFamily:"monospace"}},n.details):null])}})}}).catch(function(e){t.$message.error("Request Failed: "+(e.message||"Unknown Error"))}).finally(function(){t.verifying=!1})):this.$message.warning(this.$t("dashboard.indicator.editor.verifyCodeEmpty"))},cleanMarkdownCodeBlocks:function(t){if(!t||"string"!==typeof t)return t;var e=t.trim(),i=/```/.test(e);return i?(e=e.replace(/^```[\w]*\s*\n?/i,""),e.startsWith("```")&&(e=e.replace(/^```\s*\n?/g,"")),e.endsWith("```")&&(e=e.replace(/\n?```\s*$/g,"")),e=e.replace(/^\s*```[\w]*\s*$/gm,""),e=e.replace(/^\s*```\s*$/gm,""),e=e.replace(/\n{3,}/g,"\n\n"),e=e.trim(),e):e},initFormData:function(){var t=this;if(this.visible){var e=this.indicator&&this.indicator.code||"";e&&String(e).trim()||(e=this.getDefaultIndicatorCode()),this.$nextTick(function(){setTimeout(function(){t.aiPrompt="",t.codeEditor&&(t.codeEditor.setValue(e),t.codeEditor.refresh())},50)})}},initCodeEditor:function(){var t=this;if(this.$refs.codeEditorContainer){if(this.codeEditor){try{if("function"===typeof this.codeEditor.toTextArea)this.codeEditor.toTextArea();else if("function"===typeof this.codeEditor.getWrapperElement){var e=this.codeEditor.getWrapperElement();e&&e.parentNode&&e.parentNode.removeChild(e)}}catch(i){}this.codeEditor=null}try{this.$refs.codeEditorContainer.innerHTML="",this.codeEditor=x()(this.$refs.codeEditorContainer,{value:function(){var e=t.indicator&&t.indicator.code||"";return e&&String(e).trim()?e:t.getDefaultIndicatorCode()}(),mode:"python",theme:"eclipse",lineNumbers:!0,lineWrapping:!0,indentUnit:4,indentWithTabs:!1,smartIndent:!0,matchBrackets:!0,autoCloseBrackets:!0,styleActiveLine:!0,foldGutter:!1,gutters:["CodeMirror-linenumbers"],tabSize:4,viewportMargin:1/0}),this.codeEditor.on("change",function(t){t.getValue()}),this.$nextTick(function(){t.codeEditor&&t.codeEditor.refresh()})}catch(n){}}},handleSave:function(){var t=this.codeEditor?this.codeEditor.getValue():"",e=t||"";e.trim()?(this.saving=!0,this.$emit("save",{id:this.indicator?this.indicator.id:0,code:e,userid:this.userId})):this.$message.warning(this.$t("dashboard.indicator.editor.codeRequired"))},handleCancel:function(){this.codeEditor&&this.codeEditor.setValue(""),this.$emit("cancel")},handleAfterClose:function(){var t=this;this.codeEditor&&this.$nextTick(function(){t.codeEditor&&t.codeEditor.refresh()}),this.aiPrompt=""},handleAIGenerate:function(){var t=this;return(0,c.A)((0,l.A)().m(function e(){var i,n,a,r,o,s,c,u,d,h,p,v,f,g,m,y,b,x,w,k,I,E,A,P,M;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.aiPrompt&&t.aiPrompt.trim()){e.n=1;break}return t.$message.warning(t.$t("dashboard.indicator.editor.aiPromptRequired")),e.a(2);case 1:return t.aiGenerating=!0,i="",t.codeEditor&&(i=t.codeEditor.getValue()||""),t.codeEditor&&(t.codeEditor.setValue("# AI generating...\n"),t.codeEditor.refresh()),n="",e.p=2,a="/api/indicator/aiGenerate",r=S().get(C.Xh),o={prompt:t.aiPrompt.trim()},i.trim()&&(o.existingCode=i.trim()),e.n=3,fetch(a,{method:"POST",headers:{"Content-Type":"application/json",Authorization:r?"Bearer ".concat(r):"","Access-Token":r||"",Token:r||""},body:JSON.stringify(o),credentials:"include"});case 3:if(s=e.v,s.ok){e.n=5;break}return e.n=4,s.text().catch(function(){return""});case 4:throw c=e.v,new Error(c||"HTTP error! status: ".concat(s.status));case 5:if(s.body&&"function"===typeof s.body.getReader){e.n=6;break}throw new Error("AI 服务未返回可读取的流(response.body 不存在)");case 6:u=s.body.getReader(),d=new TextDecoder,h="";case 7:return e.n=8,u.read();case 8:if(p=e.v,v=p.done,f=p.value,!v){e.n=9;break}return e.a(3,21);case 9:h+=d.decode(f,{stream:!0}),g=h.split("\n\n"),h=g.pop()||"",m=(0,_.A)(g),e.p=10,m.s();case 11:if((y=m.n()).done){e.n=17;break}if(b=y.value,b.trim()&&b.startsWith("data: ")){e.n=12;break}return e.a(3,16);case 12:if(x=b.substring(6),"[DONE]"!==x){e.n=13;break}return e.a(3,17);case 13:if(e.p=13,w=JSON.parse(x),!w.error){e.n=14;break}throw new Error(w.error);case 14:w.content&&(n+=w.content,k=t.cleanMarkdownCodeBlocks(n),t.codeEditor&&(t.codeEditor.setValue(k),I=t.codeEditor.lineCount(),t.codeEditor.setCursor({line:I-1,ch:0}),t.codeEditor.refresh())),e.n=16;break;case 15:e.p=15,e.v;case 16:e.n=11;break;case 17:e.n=19;break;case 18:e.p=18,P=e.v,m.e(P);case 19:return e.p=19,m.f(),e.f(19);case 20:e.n=7;break;case 21:t.codeEditor&&n?(E=t.cleanMarkdownCodeBlocks(n),t.codeEditor.setValue(E),t.codeEditor.refresh(),t.$message.success(t.$t("dashboard.indicator.editor.aiGenerateSuccess"))):n||t.$message.warning("未生成任何代码,请尝试更详细的提示词"),e.n=23;break;case 22:e.p=22,M=e.v,t.$message.error(M.message||t.$t("dashboard.indicator.editor.aiGenerateError")),n&&t.codeEditor&&(A=t.cleanMarkdownCodeBlocks(n),t.codeEditor.setValue(A));case 23:return e.p=23,t.aiGenerating=!1,e.f(23);case 24:return e.a(2)}},e,null,[[13,15],[10,18,19,20],[2,22,23,24]])}))()}}},I=k,E=i(845),A=(0,E.A)(I,m,y,!1,null,"4fea1865",null),P=A.exports,M=function(){var t=this,e=t._self._c;return e("div",{staticClass:"chart-left",class:{"theme-dark":"dark"===t.chartTheme}},[e("div",{staticClass:"chart-wrapper"},[e("div",{staticClass:"drawing-toolbar"},[t._l(t.drawingTools,function(i){return e("a-tooltip",{key:i.name,attrs:{title:i.title,placement:"right"}},[e("div",{staticClass:"drawing-tool-btn",class:{active:t.activeDrawingTool===i.name},on:{click:function(e){return t.selectDrawingTool(i.name)}}},[e("a-icon",{attrs:{type:i.icon}})],1)])}),e("a-divider",{attrs:{type:"vertical"}}),e("a-tooltip",{attrs:{title:t.$t("dashboard.indicator.drawing.clearAll"),placement:"right"}},[e("div",{staticClass:"drawing-tool-btn",on:{click:t.clearAllDrawings}},[e("a-icon",{attrs:{type:"delete"}})],1)])],2),e("div",{staticClass:"chart-content-area"},[e("div",{staticClass:"indicator-toolbar"},t._l(t.indicatorButtons,function(i){return e("div",{key:i.id,staticClass:"indicator-btn",class:{active:t.isIndicatorActive(i.id)},attrs:{title:i.name},on:{click:function(e){return t.toggleIndicator(i)}}},[t._v(" "+t._s(i.shortName)+" ")])}),0),e("div",{staticClass:"kline-chart-container",attrs:{id:"kline-chart-container"}})]),t.loading?e("div",{staticClass:"chart-overlay"},[e("a-spin",{attrs:{size:"large"}},[e("a-icon",{staticStyle:{"font-size":"24px",color:"#13c2c2"},attrs:{slot:"indicator",type:"loading",spin:""},slot:"indicator"})],1)],1):t._e(),t.error?e("div",{staticClass:"chart-overlay"},[e("div",{staticClass:"error-box"},[e("a-icon",{staticStyle:{"font-size":"24px",color:"#ef5350","margin-bottom":"10px"},attrs:{type:"warning"}}),e("span",[t._v(t._s(t.error))]),e("a-button",{staticStyle:{"margin-top":"12px"},attrs:{type:"primary",size:"small",ghost:""},on:{click:t.handleRetry}},[t._v(" "+t._s(t.$t("dashboard.indicator.retry"))+" ")])],1)]):t._e(),t.pyodideLoadFailed?e("div",{staticClass:"chart-overlay pyodide-warning"},[e("div",{staticClass:"warning-box"},[e("a-icon",{staticStyle:{"font-size":"32px",color:"#faad14","margin-bottom":"12px"},attrs:{type:"warning"}}),e("div",{staticClass:"warning-title"},[t._v(t._s(t.$t("dashboard.indicator.warning.pyodideLoadFailed")))]),e("div",{staticClass:"warning-desc"},[t._v(t._s(t.$t("dashboard.indicator.warning.pyodideLoadFailedDesc")))])],1)]):t._e(),t.symbol||t.loading||t.error||t.pyodideLoadFailed?t._e():e("div",{staticClass:"chart-overlay initial-hint"},[e("div",{staticClass:"hint-box"},[e("a-icon",{staticStyle:{"font-size":"48px",color:"#1890ff","margin-bottom":"16px"},attrs:{type:"line-chart"}}),e("div",{staticClass:"hint-title"},[t._v(t._s(t.$t("dashboard.indicator.hint.selectSymbol")))]),e("div",{staticClass:"hint-desc"},[t._v(t._s(t.$t("dashboard.indicator.hint.selectSymbolDesc")))])],1)])])])},D=[],T=i(21560),B=i(26297),F=i(2403),R=function(t,e){return R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},R(t,e)};function L(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}R(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var N,O,z,V,W,H,$,Y,X,K=function(){return K=Object.assign||function(t){for(var e,i=1,n=arguments.length;i0&&a[a.length-1])&&(6===s[0]||2===s[0])){r=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Z(t,e){var i="function"===typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,a,r=i.call(t),o=[];try{while((void 0===e||e-- >0)&&!(n=r.next()).done)o.push(n.value)}catch(s){a={error:s}}finally{try{n&&!n.done&&(i=r["return"])&&i.call(r)}finally{if(a)throw a.error}}return o}function q(t,e,i){if(i||2===arguments.length)for(var n,a=0,r=e.length;a1e9)return"".concat(+(e/1e9).toFixed(3),"B");if(e>1e6)return"".concat(+(e/1e6).toFixed(3),"M");if(e>1e3)return"".concat(+(e/1e3).toFixed(3),"K")}return"".concat(t)}function zt(t,e){var i="".concat(t);if(0===e.length)return i;if(i.includes(".")){var n=i.split(".");return"".concat(n[0].replace(/(\d)(?=(\d{3})+$)/g,function(t){return"".concat(t).concat(e)}),".").concat(n[1])}return i.replace(/(\d)(?=(\d{3})+$)/g,function(t){return"".concat(t).concat(e)})}function Vt(t,e){var i="".concat(t),n=new RegExp("\\.0{"+e+",}[1-9][0-9]*$");if(n.test(i)){var a=i.split("."),r=a[a.length-1],o=r.match(/0*/);if(At(o)){var s=o[0].length;return a[a.length-1]=r.replace(/0*/,"0{".concat(s,"}")),a.join(".")}}return i}function Wt(t){var e,i,n;return null!==(n=null===(i=null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView)||void 0===i?void 0:i.devicePixelRatio)&&void 0!==n?n:1}function Ht(t,e,i){return"".concat(null!==e&&void 0!==e?e:"normal"," ").concat(null!==t&&void 0!==t?t:12,"px ").concat(null!==i&&void 0!==i?i:"Helvetica Neue")}function $t(t,e,i,n){if(!At(Dt)){var a=document.createElement("canvas"),r=Wt(a);Dt=a.getContext("2d"),Dt.scale(r,r)}return Dt.font=Ht(e,i,n),Math.round(Dt.measureText(t).width)}(function(t){t["OnDataReady"]="onDataReady",t["OnZoom"]="onZoom",t["OnScroll"]="onScroll",t["OnVisibleRangeChange"]="onVisibleRangeChange",t["OnTooltipIconClick"]="onTooltipIconClick",t["OnCrosshairChange"]="onCrosshairChange",t["OnCandleBarClick"]="onCandleBarClick",t["OnPaneDrag"]="onPaneDrag"})(Tt||(Tt={}));var Yt,Xt,Kt=function(){function t(){this._callbacks=[]}return t.prototype.subscribe=function(t){var e,i=null!==(e=this._callbacks.indexOf(t))&&void 0!==e?e:-1;i<0&&this._callbacks.push(t)},t.prototype.unsubscribe=function(t){var e;if(kt(t)){var i=null!==(e=this._callbacks.indexOf(t))&&void 0!==e?e:-1;i>-1&&this._callbacks.splice(i,1)}else this._callbacks=[]},t.prototype.execute=function(t){this._callbacks.forEach(function(e){e(t)})},t.prototype.isEmpty=function(){return 0===this._callbacks.length},t}();function jt(t,e,i,n,a){var r,o=e.result,s=e.figures,l=e.styles,c=Rt(l,"circles",n.circles),u=c.length,d=Rt(l,"bars",n.bars),h=d.length,p=Rt(l,"lines",n.lines),v=p.length,f=0,g=0,m=0,y=0;s.forEach(function(s){var l;switch(s.type){case"circle":y=f;var _=c[f%u];r=K(K({},_),{color:_.noChangeColor}),f++;break;case"bar":y=g;var b=d[g%h];r=K(K({},b),{color:b.noChangeColor}),g++;break;case"line":y=m,r=p[m%v],m++;break}if(At(r)){var x={prev:{kLineData:t[i-1],indicatorData:o[i-1]},current:{kLineData:t[i],indicatorData:o[i]},next:{kLineData:t[i+1],indicatorData:o[i+1]}},w=null===(l=s.styles)||void 0===l?void 0:l.call(s,x,e,n);a(s,K(K({},r),w),y)}})}(function(t){t["Init"]="init",t["Forward"]="forward",t["Backward"]="backward"})(Yt||(Yt={})),function(t){t["Normal"]="normal",t["Price"]="price",t["Volume"]="volume"}(Xt||(Xt={}));var Ut,Gt=function(){function t(t){this.result=[],this._precisionFlag=!1;var e=t.name,i=t.shortName,n=t.series,a=t.calcParams,r=t.figures,o=t.precision,s=t.shouldOhlc,l=t.shouldFormatBigNumber,c=t.visible,u=t.zLevel,d=t.minValue,h=t.maxValue,p=t.styles,v=t.extendData,f=t.regenerateFigures,g=t.createTooltipDataSource,m=t.draw;this.name=e,this.shortName=null!==i&&void 0!==i?i:e,this.series=null!==n&&void 0!==n?n:Xt.Normal,this.precision=null!==o&&void 0!==o?o:4,this.calcParams=null!==a&&void 0!==a?a:[],this.figures=null!==r&&void 0!==r?r:[],this.shouldOhlc=null!==s&&void 0!==s&&s,this.shouldFormatBigNumber=null!==l&&void 0!==l&&l,this.visible=null===c||void 0===c||c,this.zLevel=null!==u&&void 0!==u?u:0,this.minValue=null!==d&&void 0!==d?d:null,this.maxValue=null!==h&&void 0!==h?h:null,this.styles=St(null!==p&&void 0!==p?p:{}),this.extendData=v,this.regenerateFigures=null!==f&&void 0!==f?f:null,this.createTooltipDataSource=null!==g&&void 0!==g?g:null,this.draw=null!==m&&void 0!==m?m:null}return t.prototype.setShortName=function(t){return this.shortName!==t&&(this.shortName=t,!0)},t.prototype.setSeries=function(t){return this.series!==t&&(this.series=t,!0)},t.prototype.setPrecision=function(t,e){var i=null!==e&&void 0!==e&&e,n=Math.floor(t);return!(!(n!==this.precision&&t>=0)||i&&(!i||this._precisionFlag))&&(this.precision=n,i||(this._precisionFlag=!0),!0)},t.prototype.setCalcParams=function(t){var e,i;return this.calcParams=t,this.figures=null!==(i=null===(e=this.regenerateFigures)||void 0===e?void 0:e.call(this,t))&&void 0!==i?i:this.figures,!0},t.prototype.setShouldOhlc=function(t){return this.shouldOhlc!==t&&(this.shouldOhlc=t,!0)},t.prototype.setShouldFormatBigNumber=function(t){return this.shouldFormatBigNumber!==t&&(this.shouldFormatBigNumber=t,!0)},t.prototype.setVisible=function(t){return this.visible!==t&&(this.visible=t,!0)},t.prototype.setZLevel=function(t){return this.zLevel!==t&&(this.zLevel=t,!0)},t.prototype.setStyles=function(t){return wt(this.styles,t),!0},t.prototype.setExtendData=function(t){return this.extendData!==t&&(this.extendData=t,!0)},t.prototype.setFigures=function(t){return this.figures!==t&&(this.figures=t,!0)},t.prototype.setMinValue=function(t){return this.minValue!==t&&(this.minValue=t,!0)},t.prototype.setMaxValue=function(t){return this.maxValue!==t&&(this.maxValue=t,!0)},t.prototype.setRegenerateFigures=function(t){return this.regenerateFigures!==t&&(this.regenerateFigures=t,!0)},t.prototype.setCreateTooltipDataSource=function(t){return this.createTooltipDataSource!==t&&(this.createTooltipDataSource=t,!0)},t.prototype.setDraw=function(t){return this.draw!==t&&(this.draw=t,!0)},t.prototype.calcIndicator=function(t){return j(this,void 0,void 0,function(){var e;return U(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.calc(t,this)];case 1:return e=i.sent(),this.result=e,[2,!0];case 2:return i.sent(),[2,!1];case 3:return[2]}})})},t.extend=function(e){var i=function(t){function i(){return t.call(this,e)||this}return L(i,t),i.prototype.calc=function(t,i){return e.calc(t,i)},i}(t);return i},t}();function Zt(){return["mouseClickEvent","mouseDoubleClickEvent","mouseRightClickEvent","tapEvent","doubleTapEvent","mouseDownEvent","touchStartEvent","mouseMoveEvent","touchMoveEvent"]}(function(t){t["Normal"]="normal",t["WeakMagnet"]="weak_magnet",t["StrongMagnet"]="strong_magnet"})(Ut||(Ut={}));var qt,Jt=1,Qt=-1,te="overlay_",ee="overlay_figure_",ie=function(){function t(t){this.currentStep=Jt,this.points=[],this._prevPressedPoint=null,this._prevPressedPoints=[];var e=t.mode,i=t.modeSensitivity,n=t.extendData,a=t.styles,r=t.name,o=t.totalStep,s=t.lock,l=t.visible,c=t.zLevel,u=t.needDefaultPointFigure,d=t.needDefaultXAxisFigure,h=t.needDefaultYAxisFigure,p=t.createPointFigures,v=t.createXAxisFigures,f=t.createYAxisFigures,g=t.performEventPressedMove,m=t.performEventMoveForDrawing,y=t.onDrawStart,_=t.onDrawing,b=t.onDrawEnd,x=t.onClick,w=t.onDoubleClick,S=t.onRightClick,C=t.onPressedMoveStart,k=t.onPressedMoving,I=t.onPressedMoveEnd,E=t.onMouseEnter,A=t.onMouseLeave,P=t.onRemoved,M=t.onSelected,D=t.onDeselected;this.name=r,this.totalStep=!Et(o)||o<2?1:o,this.lock=null!==s&&void 0!==s&&s,this.visible=null===l||void 0===l||l,this.zLevel=null!==c&&void 0!==c?c:0,this.needDefaultPointFigure=null!==u&&void 0!==u&&u,this.needDefaultXAxisFigure=null!==d&&void 0!==d&&d,this.needDefaultYAxisFigure=null!==h&&void 0!==h&&h,this.mode=null!==e&&void 0!==e?e:Ut.Normal,this.modeSensitivity=null!==i&&void 0!==i?i:8,this.extendData=n,this.styles=St(null!==a&&void 0!==a?a:{}),this.createPointFigures=null!==p&&void 0!==p?p:null,this.createXAxisFigures=null!==v&&void 0!==v?v:null,this.createYAxisFigures=null!==f&&void 0!==f?f:null,this.performEventPressedMove=null!==g&&void 0!==g?g:null,this.performEventMoveForDrawing=null!==m&&void 0!==m?m:null,this.onDrawStart=null!==y&&void 0!==y?y:null,this.onDrawing=null!==_&&void 0!==_?_:null,this.onDrawEnd=null!==b&&void 0!==b?b:null,this.onClick=null!==x&&void 0!==x?x:null,this.onDoubleClick=null!==w&&void 0!==w?w:null,this.onRightClick=null!==S&&void 0!==S?S:null,this.onPressedMoveStart=null!==C&&void 0!==C?C:null,this.onPressedMoving=null!==k&&void 0!==k?k:null,this.onPressedMoveEnd=null!==I&&void 0!==I?I:null,this.onMouseEnter=null!==E&&void 0!==E?E:null,this.onMouseLeave=null!==A&&void 0!==A?A:null,this.onRemoved=null!==P&&void 0!==P?P:null,this.onSelected=null!==M&&void 0!==M?M:null,this.onDeselected=null!==D&&void 0!==D?D:null}return t.prototype.setId=function(t){return!Mt(this.id)&&(this.id=t,!0)},t.prototype.setGroupId=function(t){return!Mt(this.groupId)&&(this.groupId=t,!0)},t.prototype.setPaneId=function(t){this.paneId=t},t.prototype.setExtendData=function(t){return t!==this.extendData&&(this.extendData=t,!0)},t.prototype.setStyles=function(t){return wt(this.styles,t),!0},t.prototype.setPoints=function(t){if(t.length>0){var e=void 0;if(this.points=q([],Z(t),!1),t.length>=this.totalStep-1?(this.currentStep=Qt,e=this.totalStep-1):(this.currentStep=t.length+1,e=t.length),null!==this.performEventMoveForDrawing)for(var i=0;is?n=r:a=r,o<=2)break}return n}function ve(t){var e=Math.floor(ye(t)),i=_e(e),n=t/i,a=0;return a=n<1.5?1:n<2.5?2:n<3.5?3:n<4.5?4:n<5.5?5:n<6.5?6:8,t=a*i,e>=-20?+t.toFixed(e<0?-e:0):t}function fe(t,e){null==e&&(e=10),e=Math.min(Math.max(0,e),20);var i=(+t).toFixed(e);return+i}function ge(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var a=e.indexOf(".");return a<0?0:e.length-1-a}function me(t,e,i){var n=[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER];return t.forEach(function(t){var a,r;n[0]=Math.max(null!==(a=t[e])&&void 0!==a?a:t,n[0]),n[1]=Math.min(null!==(r=t[i])&&void 0!==r?r:t,n[1])}),n}function ye(t){return Math.log(t)/Math.log(10)}function _e(t){return Math.pow(10,t)}function be(){return{from:0,to:0,realFrom:0,realTo:0}}var xe={MIN:1,MAX:50},we=8,Se=80,Ce=.88,ke=10,Ie=function(){function t(t){this._dateTimeFormat=this._buildDateTimeFormat(),this._zoomEnabled=!0,this._scrollEnabled=!0,this._totalBarSpace=0,this._barSpace=we,this._offsetRightDistance=Se,this._startLastBarRightSideDiffBarCount=0,this._scrollLimitRole=0,this._minVisibleBarCount={left:2,right:2},this._maxOffsetDistance={left:50,right:50},this._visibleRange=be(),this._chartStore=t,this._gapBarSpace=this._calcGapBarSpace(),this._lastBarRightSideDiffBarCount=this._offsetRightDistance/this._barSpace}return t.prototype._calcGapBarSpace=function(){var t;return this._barSpace>3?t=Math.floor(this._barSpace*Ce):(t=Math.floor(this._barSpace),t===this._barSpace&&t--),t%2===0&&t--,t=Math.max(1,t),t},t.prototype.adjustVisibleRange=function(){var t,e,i,n,a=this._chartStore.getDataList(),r=a.length,o=this._totalBarSpace/this._barSpace;1===this._scrollLimitRole?(i=(this._totalBarSpace-this._maxOffsetDistance.right)/this._barSpace,n=(this._totalBarSpace-this._maxOffsetDistance.left)/this._barSpace):(i=this._minVisibleBarCount.left,n=this._minVisibleBarCount.right),i=Math.max(0,i),n=Math.max(0,n);var s=o-Math.min(i,r);this._lastBarRightSideDiffBarCount>s&&(this._lastBarRightSideDiffBarCount=s);var l=-r+Math.min(n,r);this._lastBarRightSideDiffBarCountr&&(c=r);var d=Math.round(c-o)-1;d<0&&(d=0);var h=this._lastBarRightSideDiffBarCount>0?Math.round(r+this._lastBarRightSideDiffBarCount-o)-1:d;if(this._visibleRange={from:d,to:c,realFrom:h,realTo:u},this._chartStore.getActionStore().execute(Tt.OnVisibleRangeChange,this._visibleRange),this._chartStore.adjustVisibleDataList(),0===d){var p=a[0];this._chartStore.executeLoadMoreCallback(null!==(t=null===p||void 0===p?void 0:p.timestamp)&&void 0!==t?t:null),this._chartStore.executeLoadDataCallback({type:Yt.Forward,data:null!==p&&void 0!==p?p:null})}c===r&&this._chartStore.executeLoadDataCallback({type:Yt.Backward,data:null!==(e=a[r-1])&&void 0!==e?e:null})},t.prototype.getDateTimeFormat=function(){return this._dateTimeFormat},t.prototype._buildDateTimeFormat=function(t){var e={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};Mt(t)&&(e.timeZone=t);var i=null;try{i=new Intl.DateTimeFormat("en",e)}catch(n){_t("","","Timezone is error!!!")}return i},t.prototype.setTimezone=function(t){var e=this._buildDateTimeFormat(t);null!==e&&(this._dateTimeFormat=e)},t.prototype.getTimezone=function(){return this._dateTimeFormat.resolvedOptions().timeZone},t.prototype.getBarSpace=function(){return{bar:this._barSpace,halfBar:this._barSpace/2,gapBar:this._gapBarSpace,halfGapBar:Math.floor(this._gapBarSpace/2)}},t.prototype.setBarSpace=function(t,e){txe.MAX||this._barSpace===t||(this._barSpace=t,this._gapBarSpace=this._calcGapBarSpace(),null===e||void 0===e||e(),this.adjustVisibleRange(),this._chartStore.getTooltipStore().recalculateCrosshair(!0),this._chartStore.getChart().adjustPaneViewport(!1,!0,!0,!0))},t.prototype.setTotalBarSpace=function(t){return this._totalBarSpace!==t&&(this._totalBarSpace=t,this.adjustVisibleRange(),this._chartStore.getTooltipStore().recalculateCrosshair(!0)),this},t.prototype.setOffsetRightDistance=function(t,e){return this._offsetRightDistance=1===this._scrollLimitRole?Math.min(this._maxOffsetDistance.right,t):t,this._lastBarRightSideDiffBarCount=this._offsetRightDistance/this._barSpace,null!==e&&void 0!==e&&e&&(this.adjustVisibleRange(),this._chartStore.getTooltipStore().recalculateCrosshair(!0),this._chartStore.getChart().adjustPaneViewport(!1,!0,!0,!0)),this},t.prototype.resetOffsetRightDistance=function(){this.setOffsetRightDistance(this._offsetRightDistance)},t.prototype.getInitialOffsetRightDistance=function(){return this._offsetRightDistance},t.prototype.getOffsetRightDistance=function(){return Math.max(0,this._lastBarRightSideDiffBarCount*this._barSpace)},t.prototype.getLastBarRightSideDiffBarCount=function(){return this._lastBarRightSideDiffBarCount},t.prototype.setLastBarRightSideDiffBarCount=function(t){return this._lastBarRightSideDiffBarCount=t,this},t.prototype.setMaxOffsetLeftDistance=function(t){return this._scrollLimitRole=1,this._maxOffsetDistance.left=t,this},t.prototype.setMaxOffsetRightDistance=function(t){return this._scrollLimitRole=1,this._maxOffsetDistance.right=t,this},t.prototype.setLeftMinVisibleBarCount=function(t){return this._scrollLimitRole=0,this._minVisibleBarCount.left=t,this},t.prototype.setRightMinVisibleBarCount=function(t){return this._scrollLimitRole=0,this._minVisibleBarCount.right=t,this},t.prototype.getVisibleRange=function(){return this._visibleRange},t.prototype.startScroll=function(){this._startLastBarRightSideDiffBarCount=this._lastBarRightSideDiffBarCount},t.prototype.scroll=function(t){if(this._scrollEnabled){var e=t/this._barSpace,i=this._lastBarRightSideDiffBarCount*this._barSpace;this._lastBarRightSideDiffBarCount=this._startLastBarRightSideDiffBarCount-e,this.adjustVisibleRange(),this._chartStore.getTooltipStore().recalculateCrosshair(!0),this._chartStore.getChart().adjustPaneViewport(!1,!0,!0,!0);var n=Math.round(i-this._lastBarRightSideDiffBarCount*this._barSpace);0!==n&&this._chartStore.getActionStore().execute(Tt.OnScroll,{distance:n})}},t.prototype.getDataByDataIndex=function(t){var e;return null!==(e=this._chartStore.getDataList()[t])&&void 0!==e?e:null},t.prototype.coordinateToFloatIndex=function(t){var e=this._chartStore.getDataList().length,i=(this._totalBarSpace-t)/this._barSpace,n=e+this._lastBarRightSideDiffBarCount-i;return Math.round(1e6*n)/1e6},t.prototype.dataIndexToTimestamp=function(t){var e,i=this.getDataByDataIndex(t);return null!==(e=null===i||void 0===i?void 0:i.timestamp)&&void 0!==e?e:null},t.prototype.timestampToDataIndex=function(t){var e=this._chartStore.getDataList();return 0===e.length?0:pe(e,"timestamp",t)},t.prototype.dataIndexToCoordinate=function(t){var e=this._chartStore.getDataList().length,i=e+this._lastBarRightSideDiffBarCount-t;return Math.floor(this._totalBarSpace-(i-.5)*this._barSpace)},t.prototype.coordinateToDataIndex=function(t){return Math.ceil(this.coordinateToFloatIndex(t))-1},t.prototype.zoom=function(t,e){var i,n=this;if(this._zoomEnabled){var a=null!==e&&void 0!==e?e:null;if(!Et(null===a||void 0===a?void 0:a.x)){var r=this._chartStore.getTooltipStore().getCrosshair();a={x:null!==(i=null===r||void 0===r?void 0:r.x)&&void 0!==i?i:this._totalBarSpace/2}}var o=a.x,s=this.coordinateToFloatIndex(o),l=this._barSpace,c=this._barSpace+t*(this._barSpace/ke);this.setBarSpace(c,function(){n._lastBarRightSideDiffBarCount+=s-n.coordinateToFloatIndex(o)});var u=this._barSpace/l;1!==u&&this._chartStore.getActionStore().execute(Tt.OnZoom,{scale:u})}},t.prototype.setZoomEnabled=function(t){return this._zoomEnabled=t,this},t.prototype.getZoomEnabled=function(){return this._zoomEnabled},t.prototype.setScrollEnabled=function(t){return this._scrollEnabled=t,this},t.prototype.getScrollEnabled=function(){return this._scrollEnabled},t.prototype.clear=function(){this._visibleRange=be()},t}(),Ee={name:"AVP",shortName:"AVP",series:Xt.Price,precision:2,figures:[{key:"avp",title:"AVP: ",type:"line"}],calc:function(t){var e=0,i=0;return t.map(function(t){var n,a,r={},o=null!==(n=null===t||void 0===t?void 0:t.turnover)&&void 0!==n?n:0,s=null!==(a=null===t||void 0===t?void 0:t.volume)&&void 0!==a?a:0;return e+=o,i+=s,0!==i&&(r.avp=e/i),r})}},Ae={name:"AO",shortName:"AO",calcParams:[5,34],figures:[{key:"ao",title:"AO: ",type:"bar",baseValue:0,styles:function(t,e,i){var n,a,r,o,s,l=t.prev,c=t.current,u=null!==(a=null===(n=l.indicatorData)||void 0===n?void 0:n.ao)&&void 0!==a?a:Number.MIN_SAFE_INTEGER,d=null!==(o=null===(r=c.indicatorData)||void 0===r?void 0:r.ao)&&void 0!==o?o:Number.MIN_SAFE_INTEGER;s=d>u?Rt(e.styles,"bars[0].upColor",i.bars[0].upColor):Rt(e.styles,"bars[0].downColor",i.bars[0].downColor);var h=d>u?O.Stroke:O.Fill;return{color:s,style:h,borderColor:s}}}],calc:function(t,e){var i=e.calcParams,n=Math.max(i[0],i[1]),a=0,r=0,o=0,s=0;return t.map(function(e,l){var c={},u=(e.low+e.high)/2;if(a+=u,r+=u,l>=i[0]-1){o=a/i[0];var d=t[l-(i[0]-1)];a-=(d.low+d.high)/2}if(l>=i[1]-1){s=r/i[1];d=t[l-(i[1]-1)];r-=(d.low+d.high)/2}return l>=n-1&&(c.ao=o-s),c})}},Pe={name:"BIAS",shortName:"BIAS",calcParams:[6,12,24],figures:[{key:"bias1",title:"BIAS6: ",type:"line"},{key:"bias2",title:"BIAS12: ",type:"line"},{key:"bias3",title:"BIAS24: ",type:"line"}],regenerateFigures:function(t){return t.map(function(t,e){return{key:"bias".concat(e+1),title:"BIAS".concat(t,": "),type:"line"}})},calc:function(t,e){var i=e.calcParams,n=e.figures,a=[];return t.map(function(e,r){var o={},s=e.close;return i.forEach(function(e,l){var c;if(a[l]=(null!==(c=a[l])&&void 0!==c?c:0)+s,r>=e-1){var u=a[l]/i[l];o[n[l].key]=(s-u)/u*100,a[l]-=t[r-(e-1)].close}}),o})}};function Me(t,e){var i=t.length,n=0;return t.forEach(function(t){var i=t.close-e;n+=i*i}),n=Math.abs(n),Math.sqrt(n/i)}var De={name:"BOLL",shortName:"BOLL",series:Xt.Price,calcParams:[20,2],precision:2,shouldOhlc:!0,figures:[{key:"up",title:"UP: ",type:"line"},{key:"mid",title:"MID: ",type:"line"},{key:"dn",title:"DN: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=i[0]-1,a=0;return t.map(function(e,r){var o=e.close,s={};if(a+=o,r>=n){s.mid=a/i[0];var l=Me(t.slice(r-n,r+1),s.mid);s.up=s.mid+i[1]*l,s.dn=s.mid-i[1]*l,a-=t[r-n].close}return s})}},Te={name:"BRAR",shortName:"BRAR",calcParams:[26],figures:[{key:"br",title:"BR: ",type:"line"},{key:"ar",title:"AR: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=0,r=0,o=0;return t.map(function(e,s){var l,c,u={},d=e.high,h=e.low,p=e.open,v=(null!==(l=t[s-1])&&void 0!==l?l:e).close;if(r+=d-p,o+=p-h,n+=d-v,a+=v-h,s>=i[0]-1){u.ar=0!==o?r/o*100:0,u.br=0!==a?n/a*100:0;var f=t[s-(i[0]-1)],g=f.high,m=f.low,y=f.open,_=(null!==(c=t[s-i[0]])&&void 0!==c?c:t[s-(i[0]-1)]).close;n-=g-_,a-=_-m,r-=g-y,o-=y-m}return u})}},Be={name:"BBI",shortName:"BBI",series:Xt.Price,precision:2,calcParams:[3,6,12,24],shouldOhlc:!0,figures:[{key:"bbi",title:"BBI: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=Math.max.apply(Math,q([],Z(i),!1)),a=[],r=[];return t.map(function(e,o){var s={},l=e.close;if(i.forEach(function(e,i){var n;a[i]=(null!==(n=a[i])&&void 0!==n?n:0)+l,o>=e-1&&(r[i]=a[i]/e,a[i]-=t[o-(e-1)].close)}),o>=n-1){var c=0;r.forEach(function(t){c+=t}),s.bbi=c/4}return s})}},Fe={name:"CCI",shortName:"CCI",calcParams:[20],figures:[{key:"cci",title:"CCI: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=i[0]-1,a=0,r=[];return t.map(function(e,o){var s={},l=(e.high+e.low+e.close)/3;if(a+=l,r.push(l),o>=n){var c=a/i[0],u=r.slice(o-n,o+1),d=0;u.forEach(function(t){d+=Math.abs(t-c)});var h=d/i[0];s.cci=0!==h?(l-c)/h/.015:0;var p=(t[o-n].high+t[o-n].low+t[o-n].close)/3;a-=p}return s})}},Re={name:"CR",shortName:"CR",calcParams:[26,10,20,40,60],figures:[{key:"cr",title:"CR: ",type:"line"},{key:"ma1",title:"MA1: ",type:"line"},{key:"ma2",title:"MA2: ",type:"line"},{key:"ma3",title:"MA3: ",type:"line"},{key:"ma4",title:"MA4: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=Math.ceil(i[1]/2.5+1),a=Math.ceil(i[2]/2.5+1),r=Math.ceil(i[3]/2.5+1),o=Math.ceil(i[4]/2.5+1),s=0,l=[],c=0,u=[],d=0,h=[],p=0,v=[],f=[];return t.forEach(function(e,g){var m,y,_,b,x,w={},S=null!==(m=t[g-1])&&void 0!==m?m:e,C=(S.high+S.close+S.low+S.open)/4,k=Math.max(0,e.high-C),I=Math.max(0,C-e.low);g>=i[0]-1&&(w.cr=0!==I?k/I*100:0,s+=w.cr,c+=w.cr,d+=w.cr,p+=w.cr,g>=i[0]+i[1]-2&&(l.push(s/i[1]),g>=i[0]+i[1]+n-3&&(w.ma1=l[l.length-1-n]),s-=null!==(y=f[g-(i[1]-1)].cr)&&void 0!==y?y:0),g>=i[0]+i[2]-2&&(u.push(c/i[2]),g>=i[0]+i[2]+a-3&&(w.ma2=u[u.length-1-a]),c-=null!==(_=f[g-(i[2]-1)].cr)&&void 0!==_?_:0),g>=i[0]+i[3]-2&&(h.push(d/i[3]),g>=i[0]+i[3]+r-3&&(w.ma3=h[h.length-1-r]),d-=null!==(b=f[g-(i[3]-1)].cr)&&void 0!==b?b:0),g>=i[0]+i[4]-2&&(v.push(p/i[4]),g>=i[0]+i[4]+o-3&&(w.ma4=v[v.length-1-o]),p-=null!==(x=f[g-(i[4]-1)].cr)&&void 0!==x?x:0)),f.push(w)}),f}},Le={name:"DMA",shortName:"DMA",calcParams:[10,50,10],figures:[{key:"dma",title:"DMA: ",type:"line"},{key:"ama",title:"AMA: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=Math.max(i[0],i[1]),a=0,r=0,o=0,s=[];return t.forEach(function(e,l){var c,u={},d=e.close;a+=d,r+=d;var h=0,p=0;if(l>=i[0]-1&&(h=a/i[0],a-=t[l-(i[0]-1)].close),l>=i[1]-1&&(p=r/i[1],r-=t[l-(i[1]-1)].close),l>=n-1){var v=h-p;u.dma=v,o+=v,l>=n+i[2]-2&&(u.ama=o/i[2],o-=null!==(c=s[l-(i[2]-1)].dma)&&void 0!==c?c:0)}s.push(u)}),s}},Ne={name:"DMI",shortName:"DMI",calcParams:[14,6],figures:[{key:"pdi",title:"PDI: ",type:"line"},{key:"mdi",title:"MDI: ",type:"line"},{key:"adx",title:"ADX: ",type:"line"},{key:"adxr",title:"ADXR: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=0,r=0,o=0,s=0,l=0,c=0,u=0,d=[];return t.forEach(function(e,h){var p,v,f={},g=null!==(p=t[h-1])&&void 0!==p?p:e,m=g.close,y=e.high,_=e.low,b=y-_,x=Math.abs(y-m),w=Math.abs(m-_),S=y-g.high,C=g.low-_,k=Math.max(Math.max(b,x),w),I=S>0&&S>C?S:0,E=C>0&&C>S?C:0;if(n+=k,a+=I,r+=E,h>=i[0]-1){h>i[0]-1?(o=o-o/i[0]+k,s=s-s/i[0]+I,l=l-l/i[0]+E):(o=n,s=a,l=r);var A=0,P=0;0!==o&&(A=100*s/o,P=100*l/o),f.pdi=A,f.mdi=P;var M=0;P+A!==0&&(M=Math.abs(P-A)/(P+A)*100),c+=M,h>=2*i[0]-2&&(u=h>2*i[0]-2?(u*(i[0]-1)+M)/i[0]:c/i[0],f.adx=u,h>=2*i[0]+i[1]-3&&(f.adxr=((null!==(v=d[h-(i[1]-1)].adx)&&void 0!==v?v:0)+u)/2))}d.push(f)}),d}},Oe={name:"EMV",shortName:"EMV",calcParams:[14,9],figures:[{key:"emv",title:"EMV: ",type:"line"},{key:"maEmv",title:"MAEMV: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=[];return t.map(function(e,r){var o,s={};if(r>0){var l=t[r-1],c=e.high,u=e.low,d=null!==(o=e.volume)&&void 0!==o?o:0,h=(c+u)/2-(l.high+l.low)/2;if(0===d||c-u===0)s.emv=0;else{var p=d/1e8/(c-u);s.emv=h/p}n+=s.emv,a.push(s.emv),r>=i[0]&&(s.maEmv=n/i[0],n-=a[r-i[0]])}return s})}},ze={name:"EMA",shortName:"EMA",series:Xt.Price,calcParams:[6,12,20],precision:2,shouldOhlc:!0,figures:[{key:"ema1",title:"EMA6: ",type:"line"},{key:"ema2",title:"EMA12: ",type:"line"},{key:"ema3",title:"EMA20: ",type:"line"}],regenerateFigures:function(t){return t.map(function(t,e){return{key:"ema".concat(e+1),title:"EMA".concat(t,": "),type:"line"}})},calc:function(t,e){var i=e.calcParams,n=e.figures,a=0,r=[];return t.map(function(t,e){var o={},s=t.close;return a+=s,i.forEach(function(t,i){e>=t-1&&(r[i]=e>t-1?(2*s+(t-1)*r[i])/(t+1):a/t,o[n[i].key]=r[i])}),o})}},Ve={name:"MTM",shortName:"MTM",calcParams:[12,6],figures:[{key:"mtm",title:"MTM: ",type:"line"},{key:"maMtm",title:"MAMTM: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=[];return t.forEach(function(e,r){var o,s={};if(r>=i[0]){var l=e.close,c=t[r-i[0]].close;s.mtm=l-c,n+=s.mtm,r>=i[0]+i[1]-1&&(s.maMtm=n/i[1],n-=null!==(o=a[r-(i[1]-1)].mtm)&&void 0!==o?o:0)}a.push(s)}),a}},We={name:"MA",shortName:"MA",series:Xt.Price,calcParams:[5,10,30,60],precision:2,shouldOhlc:!0,figures:[{key:"ma5",title:"MA5: ",type:"line"},{key:"ma10",title:"MA10: ",type:"line"},{key:"ma30",title:"MA30: ",type:"line"},{key:"ma60",title:"MA60: ",type:"line"}],regenerateFigures:function(t){return t.map(function(t,e){return{key:"ma".concat(e+1),title:"MA".concat(t,": "),type:"line"}})},calc:function(t,e){var i=e.calcParams,n=e.figures,a=[];return t.map(function(e,r){var o={},s=e.close;return i.forEach(function(e,i){var l;a[i]=(null!==(l=a[i])&&void 0!==l?l:0)+s,r>=e-1&&(o[n[i].key]=a[i]/e,a[i]-=t[r-(e-1)].close)}),o})}},He={name:"MACD",shortName:"MACD",calcParams:[12,26,9],figures:[{key:"dif",title:"DIF: ",type:"line"},{key:"dea",title:"DEA: ",type:"line"},{key:"macd",title:"MACD: ",type:"bar",baseValue:0,styles:function(t,e,i){var n,a,r,o,s,l=t.prev,c=t.current,u=null!==(a=null===(n=l.indicatorData)||void 0===n?void 0:n.macd)&&void 0!==a?a:Number.MIN_SAFE_INTEGER,d=null!==(o=null===(r=c.indicatorData)||void 0===r?void 0:r.macd)&&void 0!==o?o:Number.MIN_SAFE_INTEGER;s=d>0?Rt(e.styles,"bars[0].upColor",i.bars[0].upColor):d<0?Rt(e.styles,"bars[0].downColor",i.bars[0].downColor):Rt(e.styles,"bars[0].noChangeColor",i.bars[0].noChangeColor);var h=u=a[0]-1&&(i=e>a[0]-1?(2*d+(a[0]-1)*i)/(a[0]+1):r/a[0]),e>=a[1]-1&&(n=e>a[1]-1?(2*d+(a[1]-1)*n)/(a[1]+1):r/a[1]),e>=c-1&&(o=i-n,u.dif=o,s+=o,e>=c+a[2]-2&&(l=e>c+a[2]-2?(2*o+l*(a[2]-1))/(a[2]+1):s/a[2],u.macd=2*(o-l),u.dea=l)),u})}},$e={name:"OBV",shortName:"OBV",calcParams:[30],figures:[{key:"obv",title:"OBV: ",type:"line"},{key:"maObv",title:"MAOBV: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=0,r=[];return t.forEach(function(e,o){var s,l,c,u,d=null!==(s=t[o-1])&&void 0!==s?s:e;e.closed.close&&(a+=null!==(c=e.volume)&&void 0!==c?c:0);var h={obv:a};n+=a,o>=i[0]-1&&(h.maObv=n/i[0],n-=null!==(u=r[o-(i[0]-1)].obv)&&void 0!==u?u:0),r.push(h)}),r}},Ye={name:"PVT",shortName:"PVT",figures:[{key:"pvt",title:"PVT: ",type:"line"}],calc:function(t){var e=0;return t.map(function(i,n){var a,r,o={},s=i.close,l=null!==(a=i.volume)&&void 0!==a?a:1,c=(null!==(r=t[n-1])&&void 0!==r?r:i).close,u=0,d=c*l;return 0!==d&&(u=(s-c)/d),e+=u,o.pvt=e,o})}},Xe={name:"PSY",shortName:"PSY",calcParams:[12,6],figures:[{key:"psy",title:"PSY: ",type:"line"},{key:"maPsy",title:"MAPSY: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=0,r=[],o=[];return t.forEach(function(e,s){var l,c,u={},d=(null!==(l=t[s-1])&&void 0!==l?l:e).close,h=e.close-d>0?1:0;r.push(h),n+=h,s>=i[0]-1&&(u.psy=n/i[0]*100,a+=u.psy,s>=i[0]+i[1]-2&&(u.maPsy=a/i[1],a-=null!==(c=o[s-(i[1]-1)].psy)&&void 0!==c?c:0),n-=r[s-(i[0]-1)]),o.push(u)}),o}},Ke={name:"ROC",shortName:"ROC",calcParams:[12,6],figures:[{key:"roc",title:"ROC: ",type:"line"},{key:"maRoc",title:"MAROC: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=[],a=0;return t.forEach(function(e,r){var o,s,l={};if(r>=i[0]-1){var c=e.close,u=(null!==(o=t[r-i[0]])&&void 0!==o?o:t[r-(i[0]-1)]).close;l.roc=0!==u?(c-u)/u*100:0,a+=l.roc,r>=i[0]-1+i[1]-1&&(l.maRoc=a/i[1],a-=null!==(s=n[r-(i[1]-1)].roc)&&void 0!==s?s:0)}n.push(l)}),n}},je={name:"RSI",shortName:"RSI",calcParams:[6,12,24],figures:[{key:"rsi1",title:"RSI1: ",type:"line"},{key:"rsi2",title:"RSI2: ",type:"line"},{key:"rsi3",title:"RSI3: ",type:"line"}],regenerateFigures:function(t){return t.map(function(t,e){var i=e+1;return{key:"rsi".concat(i),title:"RSI".concat(i,": "),type:"line"}})},calc:function(t,e){var i=e.calcParams,n=e.figures,a=[],r=[];return t.map(function(e,o){var s,l={},c=(null!==(s=t[o-1])&&void 0!==s?s:e).close,u=e.close-c;return i.forEach(function(e,i){var s,c,d;if(u>0?a[i]=(null!==(s=a[i])&&void 0!==s?s:0)+u:r[i]=(null!==(c=r[i])&&void 0!==c?c:0)+Math.abs(u),o>=e-1){0!==r[i]?l[n[i].key]=100-100/(1+a[i]/r[i]):l[n[i].key]=0;var h=t[o-(e-1)],p=null!==(d=t[o-e])&&void 0!==d?d:h,v=h.close-p.close;v>0?a[i]-=v:r[i]-=Math.abs(v)}}),l})}},Ue={name:"SMA",shortName:"SMA",series:Xt.Price,calcParams:[12,2],precision:2,figures:[{key:"sma",title:"SMA: ",type:"line"}],shouldOhlc:!0,calc:function(t,e){var i=e.calcParams,n=0,a=0;return t.map(function(t,e){var r={},o=t.close;return n+=o,e>=i[0]-1&&(a=e>i[0]-1?(o*i[1]+a*(i[0]-i[1]+1))/(i[0]+1):n/i[0],r.sma=a),r})}},Ge={name:"KDJ",shortName:"KDJ",calcParams:[9,3,3],figures:[{key:"k",title:"K: ",type:"line"},{key:"d",title:"D: ",type:"line"},{key:"j",title:"J: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=[];return t.forEach(function(e,a){var r,o,s,l,c={},u=e.close;if(a>=i[0]-1){var d=me(t.slice(a-(i[0]-1),a+1),"high","low"),h=d[0],p=d[1],v=h-p,f=(u-p)/(0===v?1:v)*100;c.k=((i[1]-1)*(null!==(o=null===(r=n[a-1])||void 0===r?void 0:r.k)&&void 0!==o?o:50)+f)/i[1],c.d=((i[2]-1)*(null!==(l=null===(s=n[a-1])||void 0===s?void 0:s.d)&&void 0!==l?l:50)+c.k)/i[2],c.j=3*c.k-2*c.d}n.push(c)}),n}},Ze={name:"SAR",shortName:"SAR",series:Xt.Price,calcParams:[2,2,20],precision:2,shouldOhlc:!0,figures:[{key:"sar",title:"SAR: ",type:"circle",styles:function(t,e,i){var n,a,r=t.current,o=null!==(a=null===(n=r.indicatorData)||void 0===n?void 0:n.sar)&&void 0!==a?a:Number.MIN_SAFE_INTEGER,s=r.kLineData,l=((null===s||void 0===s?void 0:s.high)+(null===s||void 0===s?void 0:s.low))/2,c=oe.low?(c=s,o=n,s=-100,l=!l):c>p&&(c=p)}else{(-100===s||s>h)&&(s=h,o=Math.min(o+a,r)),c=u+o*(s-u);var v=Math.max(t[Math.max(1,i)-1].high,d);c=r[0]-1&&(i=e>r[0]-1?(2*p+(r[0]-1)*i)/(r[0]+1):o/r[0],s+=i,e>=2*r[0]-2&&(n=e>2*r[0]-2?(2*i+(r[0]-1)*n)/(r[0]+1):s/r[0],l+=n,e>=3*r[0]-3))){var v=void 0,f=0;e>3*r[0]-3?(v=(2*n+(r[0]-1)*a)/(r[0]+1),f=(v-a)/a*100):v=l/r[0],a=v,h.trix=f,c+=f,e>=3*r[0]+r[1]-4&&(h.maTrix=c/r[1],c-=null!==(d=u[e-(r[1]-1)].trix)&&void 0!==d?d:0)}u.push(h)}),u}};function Je(){return{key:"volume",title:"VOLUME: ",type:"bar",baseValue:0,styles:function(t,e,i){var n=t.current.kLineData,a=Rt(e.styles,"bars[0].noChangeColor",i.bars[0].noChangeColor);return At(n)&&(n.close>n.open?a=Rt(e.styles,"bars[0].upColor",i.bars[0].upColor):n.close=e-1&&(l[n[i].key]=a[i]/e,a[i]-=null!==(c=t[r-(e-1)].volume)&&void 0!==c?c:0)}),l})}},ti={name:"VR",shortName:"VR",calcParams:[26,6],figures:[{key:"vr",title:"VR: ",type:"line"},{key:"maVr",title:"MAVR: ",type:"line"}],calc:function(t,e){var i=e.calcParams,n=0,a=0,r=0,o=0,s=[];return t.forEach(function(e,l){var c,u,d,h,p,v={},f=e.close,g=(null!==(c=t[l-1])&&void 0!==c?c:e).close,m=null!==(u=e.volume)&&void 0!==u?u:0;if(f>g?n+=m:f=i[0]-1){var y=r/2;v.vr=a+y===0?0:(n+y)/(a+y)*100,o+=v.vr,l>=i[0]+i[1]-2&&(v.maVr=o/i[1],o-=null!==(d=s[l-(i[1]-1)].vr)&&void 0!==d?d:0);var _=t[l-(i[0]-1)],b=null!==(h=t[l-i[0]])&&void 0!==h?h:_,x=_.close,w=null!==(p=_.volume)&&void 0!==p?p:0;x>b.close?n-=w:x=s){var l=me(t.slice(a-s,a+1),"high","low"),c=l[0],u=l[1],d=c-u;r[n[i].key]=0===d?0:(o-c)/d*100}}),r})}},ii={},ni=[Ee,Ae,Pe,De,Te,Be,Fe,Re,Le,Ne,Oe,ze,Ve,We,He,$e,Ye,Xe,Ke,je,Ue,Ge,Ze,qe,Qe,ti,ei];function ai(t){ii[t.name]=Gt.extend(t)}function ri(t){var e;return null!==(e=ii[t])&&void 0!==e?e:null}ni.forEach(function(t){ii[t.name]=Gt.extend(t)});var oi=function(){function t(t){this._instances=new Map,this._chartStore=t}return t.prototype._overrideInstance=function(t,e){var i=e.shortName,n=e.series,a=e.calcParams,r=e.precision,o=e.figures,s=e.minValue,l=e.maxValue,c=e.shouldOhlc,u=e.shouldFormatBigNumber,d=e.visible,h=e.zLevel,p=e.styles,v=e.extendData,f=e.regenerateFigures,g=e.createTooltipDataSource,m=e.draw,y=e.calc,_=!1;Mt(i)&&t.setShortName(i)&&(_=!0),At(n)&&t.setSeries(n)&&(_=!0);var b=!1;Ct(a)&&t.setCalcParams(a)&&(_=!0,b=!0),Ct(o)&&t.setFigures(o)&&(_=!0,b=!0),void 0!==s&&t.setMinValue(s)&&(_=!0),void 0!==l&&t.setMinValue(l)&&(_=!0),Et(r)&&t.setPrecision(r)&&(_=!0),Pt(c)&&t.setShouldOhlc(c)&&(_=!0),Pt(u)&&t.setShouldFormatBigNumber(u)&&(_=!0),Pt(d)&&t.setVisible(d)&&(_=!0);var x=!1;return Et(h)&&t.setZLevel(h)&&(_=!0,x=!0),At(p)&&t.setStyles(p)&&(_=!0),void 0!==v&&t.setExtendData(v)&&(_=!0,b=!0),void 0!==f&&t.setRegenerateFigures(f)&&(_=!0),void 0!==g&&t.setCreateTooltipDataSource(g)&&(_=!0),void 0!==m&&t.setDraw(m)&&(_=!0),kt(y)&&(t.calc=y,b=!0),[_,b,x]},t.prototype._sort=function(t){var e;Mt(t)?null===(e=this._instances.get(t))||void 0===e||e.sort(function(t,e){return t.zLevel-e.zLevel}):this._instances.forEach(function(t){t.sort(function(t,e){return t.zLevel-e.zLevel})})},t.prototype.addInstance=function(t,e,i){return j(this,void 0,void 0,function(){var n,a,r,o,s;return U(this,function(l){switch(l.label){case 0:return n=t.name,a=this._instances.get(e),At(a)?(r=a.find(function(t){return t.name===n}),At(r)?[4,Promise.reject(new Error("Duplicate indicators."))]:[3,2]):[3,2];case 1:return[2,l.sent()];case 2:return At(a)||(a=[]),o=ri(n),s=new o,this.synchronizeSeriesPrecision(s),this._overrideInstance(s,t),i||(a=[]),a.push(s),this._instances.set(e,a),this._sort(e),[4,s.calcIndicator(this._chartStore.getDataList())];case 3:return[2,l.sent()]}})})},t.prototype.getInstances=function(t){var e;return null!==(e=this._instances.get(t))&&void 0!==e?e:[]},t.prototype.removeInstance=function(t,e){var i,n=!1,a=this._instances.get(t);if(At(a)){if(Mt(e)){var r=a.findIndex(function(t){return t.name===e});r>-1&&(a.splice(r,1),n=!0)}else this._instances.set(t,[]),n=!0;0===(null===(i=this._instances.get(t))||void 0===i?void 0:i.length)&&this._instances.delete(t)}return n},t.prototype.hasInstances=function(t){return this._instances.has(t)},t.prototype.calcInstance=function(t,e){return j(this,void 0,void 0,function(){var i,n,a,r,o=this;return U(this,function(s){switch(s.label){case 0:return i=[],Mt(t)?Mt(e)?(n=this._instances.get(e),At(n)&&(a=n.find(function(e){return e.name===t}),At(a)&&i.push(a.calcIndicator(this._chartStore.getDataList())))):this._instances.forEach(function(e){var n=e.find(function(e){return e.name===t});At(n)&&i.push(n.calcIndicator(o._chartStore.getDataList()))}):this._instances.forEach(function(t){t.forEach(function(t){i.push(t.calcIndicator(o._chartStore.getDataList()))})}),[4,Promise.all(i)];case 1:return r=s.sent(),[2,r.includes(!0)]}})})},t.prototype.getInstanceByPaneId=function(t,e){var i,n,a=function(t){var e=new Map;return t.forEach(function(t){e.set(t.name,t)}),e};if(Mt(t)){var r=null!==(i=this._instances.get(t))&&void 0!==i?i:[];return Mt(e)?null!==(n=null===r||void 0===r?void 0:r.find(function(t){return t.name===e}))&&void 0!==n?n:null:a(r)}var o=new Map;return this._instances.forEach(function(t,e){o.set(e,a(t))}),o},t.prototype.synchronizeSeriesPrecision=function(t){var e=this._chartStore.getPrecision(),i=e.price,n=e.volume,a=function(t){switch(t.series){case Xt.Price:t.setPrecision(i,!0);break;case Xt.Volume:t.setPrecision(n,!0);break}};At(t)?a(t):this._instances.forEach(function(t){t.forEach(function(t){a(t)})})},t.prototype.override=function(t,e){return j(this,void 0,void 0,function(){var i,n,a,r,o,s,l,c=this;return U(this,function(u){switch(u.label){case 0:return i=t.name,n=new Map,null!==e?(a=this._instances.get(e),At(a)&&n.set(e,a)):n=this._instances,r=!1,o=[],s=!1,n.forEach(function(e){var n=e.find(function(t){return t.name===i});if(At(n)){var a=c._overrideInstance(n,t);a[2]&&(s=!0),a[1]?o.push(n.calcIndicator(c._chartStore.getDataList())):a[0]&&(r=!0)}}),s&&this._sort(),[4,Promise.all(o)];case 1:return l=u.sent(),[2,[r,l.includes(!0)]]}})})},t}(),si=function(){function t(t){this._crosshair={},this._activeIcon=null,this._chartStore=t}return t.prototype.setCrosshair=function(t,e){var i,n,a=null!==e&&void 0!==e?e:{},r=a.notInvalidate,o=a.notExecuteAction,s=this._chartStore.getDataList(),l=null!==t&&void 0!==t?t:{};Et(l.x)?(i=this._chartStore.getTimeScaleStore().coordinateToDataIndex(l.x),n=i<0?0:i>s.length-1?s.length-1:i):(i=s.length-1,n=i);var c=s[n],u=this._chartStore.getTimeScaleStore().dataIndexToCoordinate(i),d={x:this._crosshair.x,y:this._crosshair.y,paneId:this._crosshair.paneId};this._crosshair=K(K({},l),{realX:u,kLineData:c,realDataIndex:i,dataIndex:n}),d.x===l.x&&d.y===l.y&&d.paneId===l.paneId||(null===c||null!==o&&void 0!==o&&o||this._chartStore.getChart().crosshairChange(this._crosshair),null!==r&&void 0!==r&&r||this._chartStore.getChart().updatePane(1))},t.prototype.recalculateCrosshair=function(t){this.setCrosshair(this._crosshair,{notInvalidate:t})},t.prototype.getCrosshair=function(){return this._crosshair},t.prototype.setActiveIcon=function(t){this._activeIcon=null!==t&&void 0!==t?t:null},t.prototype.getActiveIcon=function(){return this._activeIcon},t.prototype.clear=function(){this.setCrosshair({},{notInvalidate:!0}),this.setActiveIcon()},t}(),li={name:"fibonacciLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e,i=t.coordinates,n=t.bounding,a=t.overlay,r=t.precision,o=t.thousandsSeparator,s=t.decimalFoldThreshold,l=t.yAxis,c=a.points;if(i.length>0){var u=null===(e=null===l||void 0===l?void 0:l.isInCandle())||void 0===e||e?r.price:r.excludePriceVolumeMax,d=[],h=[],p=0,v=n.width;if(i.length>1&&Et(c[0].value)&&Et(c[1].value)){var f=[1,.786,.618,.5,.382,.236,0],g=i[0].y-i[1].y,m=c[0].value-c[1].value;f.forEach(function(t){var e,n=i[1].y+g*t,a=Vt(zt(((null!==(e=c[1].value)&&void 0!==e?e:0)+m*t).toFixed(u),o),s);d.push({coordinates:[{x:p,y:n},{x:v,y:n}]}),h.push({x:p,y:n,text:"".concat(a," (").concat((100*t).toFixed(1),"%)"),baseline:"bottom"})})}return[{type:"line",attrs:d},{type:"text",isCheckEvent:!1,attrs:h}]}return[]}},ci={name:"horizontalRayLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates,i=t.bounding,n={x:0,y:e[0].y};return At(e[1])&&e[0].x-1)for(var a=n;a>-1;a--)if(this._children[a].dispatchEvent(t,e,i))return!0;return this.onEvent(t,e,i)},t.prototype.addChild=function(t){return this._children.push(t),this},t.prototype.clear=function(){this._children=[]},t}(),pi=2,vi=function(t){function e(e){var i=t.call(this)||this;return i.attrs=e.attrs,i.styles=e.styles,i}return L(e,t),e.prototype.checkEventOn=function(t){return this.checkEventOnImp(t,this.attrs,this.styles)},e.prototype.setAttrs=function(t){return this.attrs=t,this},e.prototype.setStyles=function(t){return this.styles=t,this},e.prototype.draw=function(t){this.drawImp(t,this.attrs,this.styles)},e.extend=function(t){var i=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return L(i,e),i.prototype.checkEventOnImp=function(e,i,n){return t.checkEventOn(e,i,n)},i.prototype.drawImp=function(e,i,n){t.draw(e,i,n)},i}(e);return i},e}(hi);function fi(t,e){var i=[];i=i.concat(e);for(var n=0;n1)for(var r=1;r0&&i<1?i:0:i?.5:0;if(a>0&&n>2){for(var r=e[0].x,o=e[0].y,s=1;s1&&(2!==i.length||i[0].x!==i[1].x&&i[0].y!==i[1].y?(t.save(),c%2===1&&t.translate(.5,.5),t.beginPath(),t.moveTo(i[0].x,i[0].y),_i(t,i,s),t.stroke(),t.closePath(),t.restore()):(t.beginPath(),i[0].x===i[1].x?(t.moveTo(i[0].x+v,i[0].y),t.lineTo(i[1].x+v,i[1].y)):(t.moveTo(i[0].x,i[0].y+v),t.lineTo(i[1].x,i[1].y+v)),t.stroke(),t.closePath()))})}var xi={name:"line",checkEventOn:fi,draw:function(t,e,i){bi(t,e,i)}};function wi(t,e,i){var n=null!==i&&void 0!==i?i:0,a=[];if(t.length>1)if(t[0].x===t[1].x){var r=0,o=e.height;if(a.push({coordinates:[{x:t[0].x,y:r},{x:t[0].x,y:o}]}),t.length>2){a.push({coordinates:[{x:t[2].x,y:r},{x:t[2].x,y:o}]});for(var s=t[0].x-t[2].x,l=0;l2){var f=t[2].y-p*t[2].x;a.push({coordinates:[{x:u,y:u*p+f},{x:d,y:d*p+f}]});for(s=v-f,l=0;l1){var i=void 0;return i=t[0].x===t[1].x&&t[0].y!==t[1].y?t[0].yt[1].x?{x:0,y:mi(t[0],t[1],{x:0,y:t[0].y})}:{x:e.width,y:mi(t[0],t[1],{x:e.width,y:t[0].y})},{coordinates:[t[0],i]}}return[]}var Ei={name:"rayLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates,i=t.bounding;return[{type:"line",attrs:Ii(e,i)}]}},Ai={name:"segment",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates;return 2===e.length?[{type:"line",attrs:{coordinates:e}}]:[]}},Pi={name:"straightLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates,i=t.bounding;return 2===e.length?e[0].x===e[1].x?[{type:"line",attrs:{coordinates:[{x:e[0].x,y:0},{x:e[0].x,y:i.height}]}}]:[{type:"line",attrs:{coordinates:[{x:0,y:mi(e[0],e[1],{x:0,y:e[0].y})},{x:i.width,y:mi(e[0],e[1],{x:i.width,y:e[0].y})}]}}]:[]}},Mi={name:"verticalRayLine",totalStep:3,needDefaultPointFigure:!0,needDefaultXAxisFigure:!0,needDefaultYAxisFigure:!0,createPointFigures:function(t){var e=t.coordinates,i=t.bounding;if(2===e.length){var n={x:e[0].x,y:0};return e[0].y0&&l.set(e[0],n)};try{for(var u=G(this._instances),d=u.next();!d.done;d=u.next()){var h=d.value;c(h)}}catch(v){e={error:v}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(e)throw e.error}}this._instances=l}else this._instances.forEach(function(t,e){r.push(e),t.forEach(function(t){var e;null===(e=t.onRemoved)||void 0===e||e.call(t,{overlay:t})})}),this._instances.clear();if(r.length>0){var p=this._chartStore.getChart();r.forEach(function(t){p.updatePane(1,t)}),p.updatePane(1,Wi.X_AXIS)}},t.prototype.setPressedInstanceInfo=function(t){this._pressedInstanceInfo=t},t.prototype.getPressedInstanceInfo=function(){return this._pressedInstanceInfo},t.prototype.updatePointPosition=function(t,e){if(t>0){var i=this._chartStore.getDataList();this._instances.forEach(function(n){n.forEach(function(n){var a=n.points;a.forEach(function(n){if(!At(n.timestamp)&&At(n.dataIndex)){e===Yt.Forward&&(n.dataIndex=n.dataIndex+t);var a=i[n.dataIndex];n.timestamp=null===a||void 0===a?void 0:a.timestamp}})})})}},t.prototype.setHoverInstanceInfo=function(t,e){var i,n,a=this._hoverInstanceInfo,r=a.instance,o=a.figureType,s=a.figureKey,l=a.figureIndex;if(((null===r||void 0===r?void 0:r.id)!==(null===(i=t.instance)||void 0===i?void 0:i.id)||o!==t.figureType||l!==t.figureIndex)&&(this._hoverInstanceInfo=t,(null===r||void 0===r?void 0:r.id)!==(null===(n=t.instance)||void 0===n?void 0:n.id))){var c=!1,u=!1;null!==r&&(u=!0,kt(r.onMouseLeave)&&(r.onMouseLeave(K({overlay:r,figureKey:s,figureIndex:l},e)),c=!0)),null!==t.instance&&(u=!0,kt(t.instance.onMouseEnter)&&(t.instance.onMouseEnter(K({overlay:t.instance,figureKey:t.figureKey,figureIndex:t.figureIndex},e)),c=!0)),u&&this._sort(),c||this._chartStore.getChart().updatePane(1)}},t.prototype.getHoverInstanceInfo=function(){return this._hoverInstanceInfo},t.prototype.setClickInstanceInfo=function(t,e){var i,n,a,r,o,s,l,c,u,d=this._clickInstanceInfo,h=d.paneId,p=d.instance,v=d.figureType,f=d.figureKey,g=d.figureIndex;if(null!==(n=null===(i=t.instance)||void 0===i?void 0:i.isDrawing())&&void 0!==n&&n||null===(r=null===(a=t.instance)||void 0===a?void 0:a.onClick)||void 0===r||r.call(a,K({overlay:t.instance,figureKey:t.figureKey,figureIndex:t.figureIndex},e)),((null===p||void 0===p?void 0:p.id)!==(null===(o=t.instance)||void 0===o?void 0:o.id)||v!==t.figureType||g!==t.figureIndex)&&(this._clickInstanceInfo=t,(null===p||void 0===p?void 0:p.id)!==(null===(s=t.instance)||void 0===s?void 0:s.id))){null===(l=null===p||void 0===p?void 0:p.onDeselected)||void 0===l||l.call(p,K({overlay:p,figureKey:f,figureIndex:g},e)),null===(u=null===(c=t.instance)||void 0===c?void 0:c.onSelected)||void 0===u||u.call(c,K({overlay:t.instance,figureKey:t.figureKey,figureIndex:t.figureIndex},e));var m=this._chartStore.getChart();m.updatePane(1,t.paneId),h!==t.paneId&&m.updatePane(1,h),m.updatePane(1,Wi.X_AXIS)}},t.prototype.getClickInstanceInfo=function(){return this._clickInstanceInfo},t.prototype.isEmpty=function(){return 0===this._instances.size&&null===this._progressInstanceInfo},t.prototype.isDrawing=function(){var t,e;return null!==this._progressInstanceInfo&&null!==(e=null===(t=this._progressInstanceInfo)||void 0===t?void 0:t.instance.isDrawing())&&void 0!==e&&e},t}(),$i=function(){function t(){this._actions=new Map}return t.prototype.execute=function(t,e){var i;null===(i=this._actions.get(t))||void 0===i||i.execute(e)},t.prototype.subscribe=function(t,e){var i;this._actions.has(t)||this._actions.set(t,new Kt),null===(i=this._actions.get(t))||void 0===i||i.subscribe(e)},t.prototype.unsubscribe=function(t,e){var i=this._actions.get(t);At(i)&&(i.unsubscribe(e),i.isEmpty()&&this._actions.delete(t))},t.prototype.has=function(t){var e=this._actions.get(t);return At(e)&&!e.isEmpty()},t}(),Yi={grid:{horizontal:{color:"#EDEDED"},vertical:{color:"#EDEDED"}},candle:{priceMark:{high:{color:"#76808F"},low:{color:"#76808F"}},tooltip:{rect:{color:"#FEFEFE",borderColor:"#F2F3F5"},text:{color:"#76808F"}}},indicator:{tooltip:{text:{color:"#76808F"}}},xAxis:{axisLine:{color:"#DDDDDD"},tickText:{color:"#76808F"},tickLine:{color:"#DDDDDD"}},yAxis:{axisLine:{color:"#DDDDDD"},tickText:{color:"#76808F"},tickLine:{color:"#DDDDDD"}},separator:{color:"#DDDDDD"},crosshair:{horizontal:{line:{color:"#76808F"},text:{borderColor:"#686D76",backgroundColor:"#686D76"}},vertical:{line:{color:"#76808F"},text:{borderColor:"#686D76",backgroundColor:"#686D76"}}}},Xi={grid:{horizontal:{color:"#292929"},vertical:{color:"#292929"}},candle:{priceMark:{high:{color:"#929AA5"},low:{color:"#929AA5"}},tooltip:{rect:{color:"rgba(10, 10, 10, .6)",borderColor:"rgba(10, 10, 10, .6)"},text:{color:"#929AA5"}}},indicator:{tooltip:{text:{color:"#929AA5"}}},xAxis:{axisLine:{color:"#333333"},tickText:{color:"#929AA5"},tickLine:{color:"#333333"}},yAxis:{axisLine:{color:"#333333"},tickText:{color:"#929AA5"},tickLine:{color:"#333333"}},separator:{color:"#333333"},crosshair:{horizontal:{line:{color:"#929AA5"},text:{borderColor:"#373a40",backgroundColor:"#373a40"}},vertical:{line:{color:"#929AA5"},text:{borderColor:"#373a40",backgroundColor:"#373a40"}}}},Ki={light:Yi,dark:Xi};function ji(t){var e;return null!==(e=Ki[t])&&void 0!==e?e:null}var Ui=function(){function t(t,e){this._styles=gt(),this._customApi=ne(),this._locale=ae,this._precision={price:2,volume:0},this._thousandsSeparator=",",this._decimalFoldThreshold=3,this._dataList=[],this._loadMoreCallback=null,this._loadDataCallback=null,this._loading=!0,this._forwardMore=!0,this._backwardMore=!0,this._timeScaleStore=new Ie(this),this._indicatorStore=new oi(this),this._overlayStore=new Hi(this),this._tooltipStore=new si(this),this._actionStore=new $i,this._visibleDataList=[],this._chart=t,this.setOptions(e)}return t.prototype.adjustVisibleDataList=function(){this._visibleDataList=[];for(var t=this._timeScaleStore.getVisibleRange(),e=t.realFrom,i=t.realTo,n=e;n0&&(this._decimalFoldThreshold=u)}return this},t.prototype.getStyles=function(){return this._styles},t.prototype.getLocale=function(){return this._locale},t.prototype.getCustomApi=function(){return this._customApi},t.prototype.getThousandsSeparator=function(){return this._thousandsSeparator},t.prototype.getDecimalFoldThreshold=function(){return this._decimalFoldThreshold},t.prototype.getPrecision=function(){return this._precision},t.prototype.setPrecision=function(t){return this._precision=t,this._indicatorStore.synchronizeSeriesPrecision(),this},t.prototype.getDataList=function(){return this._dataList},t.prototype.getVisibleFirstData=function(){var t,e=this._timeScaleStore.getVisibleRange().from;return null!==(t=this._dataList[e])&&void 0!==t?t:null},t.prototype.getVisibleDataList=function(){return this._visibleDataList},t.prototype.addData=function(t,e,i){return j(this,void 0,void 0,function(){var n,a,r,o,s,l,c;return U(this,function(u){switch(u.label){case 0:if(n=!1,a=!1,r=0,Ct(t)){switch(r=t.length,e){case Yt.Init:this.clear(),this._dataList=t,this._forwardMore=null===i||void 0===i||i,this._timeScaleStore.resetOffsetRightDistance(),a=!0;break;case Yt.Backward:this._dataList=this._dataList.concat(t),this._backwardMore=null!==i&&void 0!==i&&i,a=r>0;break;case Yt.Forward:this._dataList=t.concat(this._dataList),this._forwardMore=null!==i&&void 0!==i&&i,a=r>0}this._loading=!1,n=!0}else o=this._dataList.length,s=t.timestamp,l=Rt(this._dataList[o-1],"timestamp",0),s>l?(this._dataList.push(t),c=this._timeScaleStore.getLastBarRightSideDiffBarCount(),c<0&&this._timeScaleStore.setLastBarRightSideDiffBarCount(--c),r=1,n=!0,a=!0):s===l&&(this._dataList[o-1]=t,n=!0,a=!0);if(!n)return[3,5];u.label=1;case 1:return u.trys.push([1,4,,5]),this._overlayStore.updatePointPosition(r,e),a?(this._timeScaleStore.adjustVisibleRange(),this._tooltipStore.recalculateCrosshair(!0),[4,this._indicatorStore.calcInstance()]):[3,3];case 2:u.sent(),this._chart.adjustPaneViewport(!1,!0,!0,!0),u.label=3;case 3:return this._actionStore.execute(Tt.OnDataReady),[3,5];case 4:return u.sent(),[3,5];case 5:return[2]}})})},t.prototype.setLoadMoreCallback=function(t){this._loadMoreCallback=t},t.prototype.executeLoadMoreCallback=function(t){this._forwardMore&&!this._loading&&At(this._loadMoreCallback)&&(this._loading=!0,this._loadMoreCallback(t))},t.prototype.setLoadDataCallback=function(t){this._loadDataCallback=t},t.prototype.executeLoadDataCallback=function(t){var e=this;if(!this._loading&&At(this._loadDataCallback)&&(this._forwardMore&&t.type===Yt.Forward||this._backwardMore&&t.type===Yt.Backward)){var i=function(i,n){e.addData(i,t.type,n).then(function(){}).catch(function(){})};this._loading=!0,this._loadDataCallback(K(K({},t),{callback:i}))}},t.prototype.clear=function(){this._forwardMore=!0,this._backwardMore=!0,this._loading=!0,this._dataList=[],this._visibleDataList=[],this._timeScaleStore.clear(),this._tooltipStore.clear()},t.prototype.getTimeScaleStore=function(){return this._timeScaleStore},t.prototype.getIndicatorStore=function(){return this._indicatorStore},t.prototype.getOverlayStore=function(){return this._overlayStore},t.prototype.getTooltipStore=function(){return this._tooltipStore},t.prototype.getActionStore=function(){return this._actionStore},t.prototype.getChart=function(){return this._chart},t}(),Gi={MAIN:"main",X_AXIS:"xAxis",Y_AXIS:"yAxis",SEPARATOR:"separator"},Zi=7;function qi(){return j(this,void 0,void 0,function(){return U(this,function(t){switch(t.label){case 0:return[4,new Promise(function(t){var e=new ResizeObserver(function(i){t(i.every(function(t){return"devicePixelContentBoxSize"in t})),e.disconnect()});e.observe(document.body,{box:"device-pixel-content-box"})}).catch(function(){return!1})];case 1:return[2,t.sent()]}})})}var Ji=function(){function t(t,e){var i=this;this._supportedDevicePixelContentBox=!1,this._width=0,this._height=0,this._pixelWidth=0,this._pixelHeight=0,this._nextPixelWidth=0,this._nextPixelHeight=0,this._requestAnimationId=re,this._mediaQueryListener=function(){var t=Wt(i._element);i._nextPixelWidth=Math.round(i._element.clientWidth*t),i._nextPixelHeight=Math.round(i._element.clientHeight*t),i._resetPixelRatio()},this._listener=e,this._element=he("canvas",t),this._ctx=this._element.getContext("2d",{willReadFrequently:!0}),qi().then(function(t){i._supportedDevicePixelContentBox=t,t?(i._resizeObserver=new ResizeObserver(function(t){var e,n=t.find(function(t){return t.target===i._element}),a=null===(e=null===n||void 0===n?void 0:n.devicePixelContentBoxSize)||void 0===e?void 0:e[0];At(a)&&(i._nextPixelWidth=a.inlineSize,i._nextPixelHeight=a.blockSize,i._pixelWidth===i._nextPixelWidth&&i._pixelHeight===i._nextPixelHeight||i._resetPixelRatio())}),i._resizeObserver.observe(i._element,{box:"device-pixel-content-box"})):(i._mediaQueryList=window.matchMedia("(resolution: ".concat(Wt(i._element),"dppx)")),i._mediaQueryList.addListener(i._mediaQueryListener))}).catch(function(t){return!1})}return t.prototype._resetPixelRatio=function(){var t=this;this._executeListener(function(){var e=t._element.clientWidth,i=t._element.clientHeight,n=t._nextPixelWidth/e,a=t._nextPixelHeight/i;t._width=e,t._height=i,t._pixelWidth=t._nextPixelWidth,t._pixelHeight=t._nextPixelHeight,t._element.width=t._nextPixelWidth,t._element.height=t._nextPixelHeight,t._ctx.scale(n,a)})},t.prototype._executeListener=function(t){var e=this;this._requestAnimationId===re&&(this._requestAnimationId=oe(function(){e._ctx.clearRect(0,0,e._width,e._height),null===t||void 0===t||t(),e._listener(),e._requestAnimationId=re}))},t.prototype.update=function(t,e){if(this._width!==t||this._height!==e){if(this._element.style.width="".concat(t,"px"),this._element.style.height="".concat(e,"px"),!this._supportedDevicePixelContentBox){var i=Wt(this._element);this._nextPixelWidth=Math.round(t*i),this._nextPixelHeight=Math.round(e*i),this._resetPixelRatio()}}else this._executeListener()},t.prototype.getElement=function(){return this._element},t.prototype.getContext=function(){return this._ctx},t.prototype.destroy=function(){At(this._resizeObserver)&&this._resizeObserver.unobserve(this._element),At(this._mediaQueryList)&&this._mediaQueryList.removeListener(this._mediaQueryListener)},t}();function Qi(t){var e={width:0,height:0,left:0,right:0,top:0,bottom:0};return At(t)&&wt(e,t),e}var tn=function(t){function e(e,i){var n=t.call(this)||this;return n._bounding=Qi(),n._pane=i,n._rootContainer=e,n._container=n.createContainer(),e.appendChild(n._container),n}return L(e,t),e.prototype.setBounding=function(t){return wt(this._bounding,t),this},e.prototype.getContainer=function(){return this._container},e.prototype.getBounding=function(){return this._bounding},e.prototype.getPane=function(){return this._pane},e.prototype.update=function(t){this.updateImp(this._container,this._bounding,null!==t&&void 0!==t?t:3)},e.prototype.destroy=function(){this._rootContainer.removeChild(this._container)},e}(hi),en=function(t){function e(e,i){var n=t.call(this,e,i)||this;n._mainCanvas=new Ji({position:"absolute",top:"0",left:"0",zIndex:"2",boxSizing:"border-box"},function(){n.updateMain(n._mainCanvas.getContext())}),n._overlayCanvas=new Ji({position:"absolute",top:"0",left:"0",zIndex:"2",boxSizing:"border-box"},function(){n.updateOverlay(n._overlayCanvas.getContext())});var a=n.getContainer();return a.appendChild(n._mainCanvas.getElement()),a.appendChild(n._overlayCanvas.getElement()),n}return L(e,t),e.prototype.createContainer=function(){return he("div",{margin:"0",padding:"0",position:"absolute",top:"0",overflow:"hidden",boxSizing:"border-box",zIndex:"1"})},e.prototype.updateImp=function(t,e,i){var n=e.width,a=e.height,r=e.left;t.style.left="".concat(r,"px");var o=i,s=t.clientWidth,l=t.clientHeight;switch(n===s&&a===l||(t.style.width="".concat(n,"px"),t.style.height="".concat(a,"px"),o=3),o){case 0:this._mainCanvas.update(n,a);break;case 1:this._overlayCanvas.update(n,a);break;case 3:case 4:this._mainCanvas.update(n,a),this._overlayCanvas.update(n,a);break}},e.prototype.destroy=function(){this._mainCanvas.destroy(),this._overlayCanvas.destroy()},e.prototype.getImage=function(t){var e=this.getBounding(),i=e.width,n=e.height,a=he("canvas",{width:"".concat(i,"px"),height:"".concat(n,"px"),boxSizing:"border-box"}),r=a.getContext("2d"),o=Wt(a);return a.width=i*o,a.height=n*o,r.scale(o,o),r.drawImage(this._mainCanvas.getElement(),0,0,i,n),t&&r.drawImage(this._overlayCanvas.getElement(),0,0,i,n),a},e}(tn);function nn(t){return"transparent"===t||"none"===t||/^[rR][gG][Bb][Aa]\(([\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\s]*,){3}[\s]*0[\s]*\)$/.test(t)||/^[hH][Ss][Ll][Aa]\(([\s]*(360|3[0-5][0-9]|[012]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,){2}([\s]*0[\s]*)\)$/.test(t)}function an(t,e){var i=[];i=i.concat(e);for(var n=0;ns*s))return!0}return!1}function rn(t,e,i){var n=[];n=n.concat(e);var a=i.style,r=void 0===a?O.Fill:a,o=i.color,s=void 0===o?"currentColor":o,l=i.borderSize,c=void 0===l?1:l,u=i.borderColor,d=void 0===u?"currentColor":u,h=i.borderStyle,p=void 0===h?N.Solid:h,v=i.borderDashedValue,f=void 0===v?[2,2]:v,g=(r===O.Fill||i.style===O.StrokeFill)&&(!Mt(s)||!nn(s));g&&(t.fillStyle=s,n.forEach(function(e){var i=e.x,n=e.y,a=e.r;t.beginPath(),t.arc(i,n,a,0,2*Math.PI),t.closePath(),t.fill()})),(r===O.Stroke||i.style===O.StrokeFill)&&c>0&&!nn(d)&&(t.strokeStyle=d,t.lineWidth=c,p===N.Dashed?t.setLineDash(f):t.setLineDash([]),n.forEach(function(e){var i=e.x,n=e.y,a=e.r;(!g||a>c)&&(t.beginPath(),t.arc(i,n,a,0,2*Math.PI),t.closePath(),t.stroke())}))}var on={name:"circle",checkEventOn:an,draw:function(t,e,i){rn(t,e,i)}};function sn(t,e){var i=[];i=i.concat(e);for(var n=0;nt.y!==r[s].y>t.y&&t.x<(r[s].x-r[o].x)*(t.y-r[o].y)/(r[s].y-r[o].y)+r[o].x&&(a=!a);if(a)return!0}return!1}function ln(t,e,i){var n=[];n=n.concat(e);var a=i.style,r=void 0===a?O.Fill:a,o=i.color,s=void 0===o?"currentColor":o,l=i.borderSize,c=void 0===l?1:l,u=i.borderColor,d=void 0===u?"currentColor":u,h=i.borderStyle,p=void 0===h?N.Solid:h,v=i.borderDashedValue,f=void 0===v?[2,2]:v;r!==O.Fill&&i.style!==O.StrokeFill||Mt(s)&&nn(s)||(t.fillStyle=s,n.forEach(function(e){var i=e.coordinates;t.beginPath(),t.moveTo(i[0].x,i[0].y);for(var n=1;n0&&!nn(d)&&(t.strokeStyle=d,t.lineWidth=c,p===N.Dashed?t.setLineDash(f):t.setLineDash([]),n.forEach(function(e){var i=e.coordinates;t.beginPath(),t.moveTo(i[0].x,i[0].y);for(var n=1;n=r&&t.x<=r+o&&t.y>=s&&t.y<=s+l)return!0}return!1}function dn(t,e,i){var n,a=[];a=a.concat(e);var r=i.style,o=void 0===r?O.Fill:r,s=i.color,l=void 0===s?"transparent":s,c=i.borderSize,u=void 0===c?1:c,d=i.borderColor,h=void 0===d?"transparent":d,p=i.borderStyle,v=void 0===p?N.Solid:p,f=i.borderRadius,g=void 0===f?0:f,m=i.borderDashedValue,y=void 0===m?[2,2]:m,_=null!==(n=t.roundRect)&&void 0!==n?n:t.rect,b=(o===O.Fill||i.style===O.StrokeFill)&&(!Mt(l)||!nn(l));if(b&&(t.fillStyle=l,a.forEach(function(e){var i=e.x,n=e.y,a=e.width,r=e.height;t.beginPath(),_.call(t,i,n,a,r,g),t.closePath(),t.fill()})),(o===O.Stroke||i.style===O.StrokeFill)&&u>0&&!nn(h)){t.strokeStyle=h,t.fillStyle=h,t.lineWidth=u,v===N.Dashed?t.setLineDash(y):t.setLineDash([]);var x=u%2===1?.5:0,w=Math.round(2*x);a.forEach(function(e){var i=e.x,n=e.y,a=e.width,r=e.height;a>2*u&&r>2*u?(t.beginPath(),_.call(t,i+x,n+x,a-w,r-w,g),t.closePath(),t.stroke()):b||t.fillRect(i,n,a,r)})}}var hn={name:"rect",checkEventOn:un,draw:function(t,e,i){dn(t,e,i)}};function pn(t,e){var i,n,a=e.size,r=void 0===a?12:a,o=e.paddingLeft,s=void 0===o?0:o,l=e.paddingTop,c=void 0===l?0:l,u=e.paddingRight,d=void 0===u?0:u,h=e.paddingBottom,p=void 0===h?0:h,v=e.weight,f=void 0===v?"normal":v,g=e.family,m=t.x,y=t.y,_=t.text,b=t.align,x=void 0===b?"left":b,w=t.baseline,S=void 0===w?"top":w,C=t.width,k=t.height,I=null!==C&&void 0!==C?C:s+$t(_,r,f,g)+d,E=null!==k&&void 0!==k?k:c+r+p;switch(x){case"left":case"start":i=m;break;case"right":case"end":i=m-I;break;default:i=m-I/2;break}switch(S){case"top":case"hanging":n=y;break;case"bottom":case"ideographic":case"alphabetic":n=y-E;break;default:n=y-E/2;break}return{x:i,y:n,width:I,height:E}}function vn(t,e,i){var n=[];n=n.concat(e);for(var a=0;a=o&&t.x<=o+l&&t.y>=s&&t.y<=s+c)return!0}return!1}function fn(t,e,i){var n=[];n=n.concat(e);var a=i.color,r=void 0===a?"currentColor":a,o=i.size,s=void 0===o?12:o,l=i.family,c=i.weight,u=i.paddingLeft,d=void 0===u?0:u,h=i.paddingTop,p=void 0===h?0:h,v=i.paddingRight,f=void 0===v?0:v,g=n.map(function(t){return pn(t,i)});dn(t,g,K(K({},i),{color:i.backgroundColor})),t.textAlign="left",t.textBaseline="top",t.font=Ht(s,c,l),t.fillStyle=r,n.forEach(function(e,i){var n=g[i];t.fillText(e.text,n.x+d,n.y+p,n.width-d-f)})}var gn={name:"text",checkEventOn:vn,draw:function(t,e,i){fn(t,e,i)}},mn=gn;function yn(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}function _n(t,e){var i=[];i=i.concat(e);for(var n=0;n=Math.min(l,u)-pi&&t.y<=Math.max(c,d)+pi&&t.y>=Math.min(c,d)-pi)return!0}}return!1}function bn(t,e,i){var n=[];n=n.concat(e);var a=i.style,r=void 0===a?N.Solid:a,o=i.size,s=void 0===o?1:o,l=i.color,c=void 0===l?"currentColor":l,u=i.dashedValue,d=void 0===u?[2,2]:u;t.lineWidth=s,t.strokeStyle=c,r===N.Dashed?t.setLineDash(d):t.setLineDash([]),n.forEach(function(e){var i=e.x,n=e.y,a=e.r,r=e.startAngle,o=e.endAngle;t.beginPath(),t.arc(i,n,a,r,o),t.stroke(),t.closePath()})}var xn={name:"arc",checkEventOn:_n,draw:function(t,e,i){bn(t,e,i)}},wn={},Sn=[on,xi,cn,hn,gn,mn,xn];function Cn(t){var e;return null!==(e=wn[t])&&void 0!==e?e:null}Sn.forEach(function(t){wn[t.name]=vi.extend(t)});var kn=function(t){function e(e){var i=t.call(this)||this;return i._widget=e,i}return L(e,t),e.prototype.getWidget=function(){return this._widget},e.prototype.createFigure=function(t,e){var i=Cn(t.name);if(null!==i){var n=new i(t);if(At(e)){for(var a in e)e.hasOwnProperty(a)&&n.registerEvent(a,e[a]);this.addChild(n)}return n}return null},e.prototype.draw=function(t){this.clear(),this.drawImp(t)},e}(hi),In=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.drawImp=function(t){var e,i,n=this.getWidget(),a=this.getWidget().getPane(),r=a.getChart(),o=n.getBounding(),s=r.getStyles().grid,l=s.show;if(l){t.save(),t.globalCompositeOperation="destination-over";var c=s.horizontal,u=c.show;if(u){var d=a.getAxisComponent(),h=d.getTicks().map(function(t){return{coordinates:[{x:0,y:t.coord},{x:o.width,y:t.coord}]}});null===(e=this.createFigure({name:"line",attrs:h,styles:c}))||void 0===e||e.draw(t)}var p=s.vertical,v=p.show;if(v){var f=r.getXAxisPane().getAxisComponent();h=f.getTicks().map(function(t){return{coordinates:[{x:t.coord,y:0},{x:t.coord,y:o.height}]}});null===(i=this.createFigure({name:"line",attrs:h,styles:p}))||void 0===i||i.draw(t)}t.restore()}},e}(kn),En=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.eachChildren=function(t){var e=this.getWidget().getPane(),i=e.getChart().getChartStore(),n=i.getVisibleDataList(),a=i.getTimeScaleStore().getBarSpace();n.forEach(function(e,i){t(e,a,i)})},e}(kn),An=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._boundCandleBarClickEvent=function(t){return function(){return e.getWidget().getPane().getChart().getChartStore().getActionStore().execute(Tt.OnCandleBarClick,t),!1}},e}return L(e,t),e.prototype.drawImp=function(t){var e=this,i=this.getWidget().getPane(),n=i.getId()===Wi.CANDLE,a=i.getChart().getChartStore(),r=this.getCandleBarOptions(a);if(null!==r){var o=0,s=0;if(r.type===$.Ohlc){var l=a.getTimeScaleStore().getBarSpace().gapBar;o=Math.min(Math.max(Math.round(.2*l),1),8),o>2&&o%2===1&&o--,s=Math.floor(s/2)}var c=i.getAxisComponent();this.eachChildren(function(i,a){var l=i.data,u=i.x;if(At(l)){var d=l.open,h=l.high,p=l.low,v=l.close,f=r.type,g=r.styles,m=[];v>d?(m[0]=g.upColor,m[1]=g.upBorderColor,m[2]=g.upWickColor):vd?e._createStrokeBar(u,b,a,m):e._createSolidBar(u,b,a,m);break;case $.CandleDownStroke:x=d>v?e._createStrokeBar(u,b,a,m):e._createSolidBar(u,b,a,m);break;case $.Ohlc:x=[{name:"rect",attrs:[{x:u-s,y:b[0],width:o,height:b[3]-b[0]},{x:u-a.halfGapBar,y:y+o>b[3]?b[3]-o:y,width:a.halfGapBar,height:o},{x:u+s,y:_+o>b[3]?b[3]-o:_,width:a.halfGapBar-s,height:o}],styles:{color:m[0]}}];break}x.forEach(function(a){var r,o;n&&(o={mouseClickEvent:e._boundCandleBarClickEvent(i)}),null===(r=e.createFigure(a,o))||void 0===r||r.draw(t)})}})}},e.prototype.getCandleBarOptions=function(t){var e=t.getStyles().candle;return{type:e.type,styles:e.bar}},e.prototype._createSolidBar=function(t,e,i,n){return[{name:"rect",attrs:{x:t,y:e[0],width:1,height:e[3]-e[0]},styles:{color:n[2]}},{name:"rect",attrs:{x:t-i.halfGapBar,y:e[1],width:i.gapBar,height:Math.max(1,e[2]-e[1])},styles:{style:O.StrokeFill,color:n[0],borderColor:n[1]}}]},e.prototype._createStrokeBar=function(t,e,i,n){return[{name:"rect",attrs:[{x:t,y:e[0],width:1,height:e[1]-e[0]},{x:t,y:e[2],width:1,height:e[3]-e[2]}],styles:{color:n[2]}},{name:"rect",attrs:{x:t-i.halfGapBar,y:e[1],width:i.gapBar,height:Math.max(1,e[2]-e[1])},styles:{style:O.Stroke,borderColor:n[1]}}]},e}(En),Pn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.getCandleBarOptions=function(t){var e,i,n=this.getWidget().getPane(),a=n.getAxisComponent();if(!a.isInCandle()){var r=t.getIndicatorStore().getInstances(n.getId());try{for(var o=G(r),s=o.next();!s.done;s=o.next()){var l=s.value;if(l.shouldOhlc&&l.visible){var c=l.styles,u=t.getStyles().indicator,d=Rt(c,"ohlc.upColor",u.ohlc.upColor),h=Rt(c,"ohlc.downColor",u.ohlc.downColor),p=Rt(c,"ohlc.noChangeColor",u.ohlc.noChangeColor);return{type:$.Ohlc,styles:{upColor:d,downColor:h,noChangeColor:p,upBorderColor:d,downBorderColor:h,noChangeBorderColor:p,upWickColor:d,downWickColor:h,noChangeWickColor:p}}}}}catch(v){e={error:v}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(e)throw e.error}}}return null},e.prototype.drawImp=function(e){var i=this;t.prototype.drawImp.call(this,e);var n=this.getWidget(),a=n.getPane(),r=a.getChart(),o=n.getBounding(),s=r.getXAxisPane().getAxisComponent(),l=a.getAxisComponent(),c=r.getChartStore(),u=c.getDataList(),d=c.getTimeScaleStore(),h=d.getVisibleRange(),p=c.getIndicatorStore().getInstances(a.getId()),v=c.getStyles().indicator;e.save(),p.forEach(function(t){var n;if(t.visible){t.zLevel<0?e.globalCompositeOperation="destination-over":e.globalCompositeOperation="source-over";var a=!1;if(null!==t.draw&&(e.save(),a=null!==(n=t.draw({ctx:e,kLineDataList:u,indicator:t,visibleRange:h,bounding:o,barSpace:d.getBarSpace(),defaultStyles:v,xAxis:s,yAxis:l}))&&void 0!==n&&n,e.restore()),!a){var r=t.result,c=[];i.eachChildren(function(n,a){var d,h,p,f=a.halfGapBar,g=n.dataIndex,m=n.x,y=s.convertToPixel(g-1),_=s.convertToPixel(g+1),b=null!==(d=r[g-1])&&void 0!==d?d:null,x=null!==(h=r[g])&&void 0!==h?h:null,w=null!==(p=r[g+1])&&void 0!==p?p:null,S={x:y},C={x:m},k={x:_};t.figures.forEach(function(t){var e=t.key,i=null===b||void 0===b?void 0:b[e];Et(i)&&(S[e]=l.convertToPixel(i));var n=null===x||void 0===x?void 0:x[e];Et(n)&&(C[e]=l.convertToPixel(n));var a=null===w||void 0===w?void 0:w[e];Et(a)&&(k[e]=l.convertToPixel(a))}),jt(u,t,g,v,function(t,n,r){var u,d,h;if(At(null===x||void 0===x?void 0:x[t.key])){var p=C[t.key],v=null===(u=t.attrs)||void 0===u?void 0:u.call(t,{data:{prev:b,current:x,next:w},coordinate:{prev:S,current:C,next:k},bounding:o,barSpace:a,xAxis:s,yAxis:l});if(!At(v))switch(t.type){case"circle":v={x:m,y:p,r:Math.max(1,f)};break;case"rect":case"bar":var g=null!==(d=t.baseValue)&&void 0!==d?d:l.getRange().from,y=l.convertToPixel(g),_=Math.abs(y-p);g!==(null===x||void 0===x?void 0:x[t.key])&&(_=Math.max(1,_));var I=void 0;I=p>y?y:p,v={x:m-f,y:I,width:Math.max(1,2*f),height:_};break;case"line":At(c[r])||(c[r]=[]),Et(C[t.key])&&Et(k[t.key])&&c[r].push({coordinates:[{x:C.x,y:C[t.key]},{x:k.x,y:k[t.key]}],styles:n});break}var E=t.type;At(v)&&"line"!==E&&(null===(h=i.createFigure({name:"bar"===E?"rect":E,attrs:v,styles:n}))||void 0===h||h.draw(e))}})}),c.forEach(function(t){if(t.length>1){for(var n=[{coordinates:[t[0].coordinates[0],t[0].coordinates[1]],styles:t[0].styles}],a=1;a0,C=x.length>0;if(S||C){var k=Z(p.classifyTooltipIcons(w),3),I=k[0],E=k[1],A=k[2];if(g=p.drawStandardTooltipIcons(t,a,I,m,e,r.name,c,g,d),S){var P=_;b.length>0&&(P="".concat(P).concat(b)),g=p.drawStandardTooltipLegends(t,[{title:{text:"",color:f.color},value:{text:P,color:f.color}}],m,c,g,d,f)}g=p.drawStandardTooltipIcons(t,a,E,m,e,r.name,c,g,d),C&&(g=p.drawStandardTooltipLegends(t,x,m,c,g,d,v.text)),g=p.drawStandardTooltipIcons(t,a,A,m,e,r.name,c,g,d),u=m.y+g}})}return u},e.prototype.drawStandardTooltipIcons=function(t,e,i,n,a,r,o,s,l){var c=this;if(i.length>0){var u=0,d=0;i.forEach(function(e){var i=e.marginLeft,n=void 0===i?0:i,a=e.marginTop,r=void 0===a?0:a,o=e.marginRight,s=void 0===o?0:o,l=e.marginBottom,c=void 0===l?0:l,h=e.paddingLeft,p=void 0===h?0:h,v=e.paddingTop,f=void 0===v?0:v,g=e.paddingRight,m=void 0===g?0:g,y=e.paddingBottom,_=void 0===y?0:y,b=e.size,x=e.fontFamily,w=e.icon;t.font=Ht(b,"normal",x),u+=n+p+t.measureText(w).width+m+s,d=Math.max(d,r+f+b+_+c)}),n.x+u>l?(n.x=o,n.y+=s,s=d):s=Math.max(s,d),i.forEach(function(i){var o,s=i.marginLeft,l=void 0===s?0:s,u=i.marginTop,d=void 0===u?0:u,h=i.marginRight,p=void 0===h?0:h,v=i.paddingLeft,f=void 0===v?0:v,g=i.paddingTop,m=void 0===g?0:g,y=i.paddingRight,_=void 0===y?0:y,b=i.paddingBottom,x=void 0===b?0:b,w=i.color,S=i.activeColor,C=i.size,k=i.fontFamily,I=i.icon,E=i.backgroundColor,A=i.activeBackgroundColor,P=(null===e||void 0===e?void 0:e.paneId)===a&&(null===e||void 0===e?void 0:e.indicatorName)===r&&(null===e||void 0===e?void 0:e.iconId)===i.id;null===(o=c.createFigure({name:"text",attrs:{text:I,x:n.x+l,y:n.y+d},styles:{paddingLeft:f,paddingTop:m,paddingRight:_,paddingBottom:x,color:P?S:w,size:C,family:k,backgroundColor:P?A:E}},{mouseClickEvent:c._boundIconClickEvent({paneId:a,indicatorName:r,iconId:i.id}),mouseMoveEvent:c._boundIconMouseMoveEvent({paneId:a,indicatorName:r,iconId:i.id})}))||void 0===o||o.draw(t),n.x+=l+f+t.measureText(I).width+_+p})}return s},e.prototype.drawStandardTooltipLegends=function(t,e,i,n,a,r,o){var s=this;if(e.length>0){var l=o.marginLeft,c=o.marginTop,u=o.marginRight,d=o.marginBottom,h=o.size,p=o.family,v=o.weight;t.font=Ht(h,v,p),e.forEach(function(e){var o,f,g=e.title,m=e.value,y=t.measureText(g.text).width,_=t.measureText(m.text).width,b=y+_,x=c+h+d;i.x+l+b+u>r?(i.x=n,i.y+=a,a=x):a=Math.max(a,x),g.text.length>0&&(null===(o=s.createFigure({name:"text",attrs:{x:i.x+l,y:i.y+c,text:g.text},styles:{color:g.color,size:h,family:p,weight:v}}))||void 0===o||o.draw(t)),null===(f=s.createFigure({name:"text",attrs:{x:i.x+l+y,y:i.y+c,text:m.text},styles:{color:m.color,size:h,family:p,weight:v}}))||void 0===f||f.draw(t),i.x+=l+b+u})}return a},e.prototype.isDrawTooltip=function(t,e){var i=e.showRule;return i===z.Always||i===z.FollowCross&&Mt(t.paneId)},e.prototype.getIndicatorTooltipData=function(t,e,i,n,a,r,o){var s,l,c=o.tooltip,u=c.showName?i.shortName:"",d="",h=i.calcParams;h.length>0&&c.showParams&&(d="(".concat(h.join(","),")"));var p={name:u,calcParamsText:d,values:[],icons:c.icons},v=e.dataIndex,f=null!==(s=i.result)&&void 0!==s?s:[],g=[];if(i.visible){var m=null!==(l=f[v])&&void 0!==l?l:{};jt(t,i,v,o,function(t,e){var o;if(Mt(t.title)){var s=e.color,l=null!==(o=m[t.key])&&void 0!==o?o:c.defaultValue;Et(l)&&(l=Nt(l,i.precision),i.shouldFormatBigNumber&&(l=n.formatBigNumber(l)),l=Vt(zt(l,a),r)),g.push({title:{text:t.title,color:s},value:{text:l,color:s}})}}),p.values=g}if(null!==i.createTooltipDataSource){var y=this.getWidget(),_=y.getPane(),b=_.getChart().getChartStore(),x=i.createTooltipDataSource({kLineDataList:t,indicator:i,visibleRange:b.getTimeScaleStore().getVisibleRange(),bounding:y.getBounding(),crosshair:e,defaultStyles:o,xAxis:_.getChart().getXAxisPane().getAxisComponent(),yAxis:_.getAxisComponent()}),w=x.name,S=x.calcParamsText,C=x.values,k=x.icons;if(Mt(w)&&c.showName&&(p.name=w),Mt(S)&&c.showParams&&(p.calcParamsText=S),At(k)&&(p.icons=k),At(C)&&i.visible){var I=[],E=o.tooltip.text.color;C.forEach(function(t){var e,o={text:"",color:E};It(t.title)?o=t.title:o.text=t.title;var s={text:"",color:E};if(It(t.value)?s=t.value:s.text=null!==(e=t.value)&&void 0!==e?e:c.defaultValue,Et(s.text)){var l=Nt(s.text,i.precision);i.shouldFormatBigNumber&&(l=n.formatBigNumber(l)),l=Vt(zt(l,a),r),s.text=l}I.push({title:o,value:s})}),p.values=I}}return p},e.prototype.classifyTooltipIcons=function(t){var e=[],i=[],n=[];return t.forEach(function(t){switch(t.position){case W.Left:e.push(t);break;case W.Middle:i.push(t);break;case W.Right:n.push(t);break}}),[e,i,n]},e}(kn),Tn=function(t){function e(e){var i=t.call(this,e)||this;return i._initEvent(),i}return L(e,t),e.prototype._initEvent=function(){var t=this,e=this.getWidget().getPane(),i=e.getId(),n=e.getChart().getChartStore().getOverlayStore();this.registerEvent("mouseMoveEvent",function(e){var a,r=n.getProgressInstanceInfo();if(null!==r){var o=r.instance,s=r.paneId;o.isStart()&&(n.updateProgressInstanceInfo(i),s=i);var l=o.points.length-1,c="".concat(ee,"point_").concat(l);return o.isDrawing()&&s===i&&(o.eventMoveForDrawing(t._coordinateToPoint(r.instance,e)),null===(a=o.onDrawing)||void 0===a||a.call(o,K({overlay:o,figureKey:c,figureIndex:l},e))),t._figureMouseMoveEvent(o,1,c,l,0)(e)}return n.setHoverInstanceInfo({paneId:i,instance:null,figureType:0,figureKey:"",figureIndex:-1,attrsIndex:-1},e),!1}).registerEvent("mouseClickEvent",function(e){var a,r,o=n.getProgressInstanceInfo();if(null!==o){var s=o.instance,l=o.paneId;s.isStart()&&(n.updateProgressInstanceInfo(i,!0),l=i);var c=s.points.length-1,u="".concat(ee,"point_").concat(c);return s.isDrawing()&&l===i&&(s.eventMoveForDrawing(t._coordinateToPoint(s,e)),null===(a=s.onDrawing)||void 0===a||a.call(s,K({overlay:s,figureKey:u,figureIndex:c},e)),s.nextStep(),s.isDrawing()||(n.progressInstanceComplete(),null===(r=s.onDrawEnd)||void 0===r||r.call(s,K({overlay:s,figureKey:u,figureIndex:c},e)))),t._figureMouseClickEvent(s,1,u,c,0)(e)}return n.setClickInstanceInfo({paneId:i,instance:null,figureType:0,figureKey:"",figureIndex:-1,attrsIndex:-1},e),!1}).registerEvent("mouseDoubleClickEvent",function(e){var a,r=n.getProgressInstanceInfo();if(null!==r){var o=r.instance,s=r.paneId;if(o.isDrawing()&&s===i&&(o.forceComplete(),!o.isDrawing())){n.progressInstanceComplete();var l=o.points.length-1,c="".concat(ee,"point_").concat(l);null===(a=o.onDrawEnd)||void 0===a||a.call(o,K({overlay:o,figureKey:c,figureIndex:l},e))}var u=o.points.length-1;return t._figureMouseClickEvent(o,1,"".concat(ee,"point_").concat(u),u,0)(e)}return!1}).registerEvent("mouseRightClickEvent",function(e){var i=n.getProgressInstanceInfo();if(null!==i){var a=i.instance;if(a.isDrawing()){var r=a.points.length-1;return t._figureMouseRightClickEvent(a,1,"".concat(ee,"point_").concat(r),r,0)(e)}}return!1}).registerEvent("mouseUpEvent",function(t){var e,a=n.getPressedInstanceInfo(),r=a.instance,o=a.figureIndex,s=a.figureKey;return null!==r&&(null===(e=r.onPressedMoveEnd)||void 0===e||e.call(r,K({overlay:r,figureKey:s,figureIndex:o},t))),n.setPressedInstanceInfo({paneId:i,instance:null,figureType:0,figureKey:"",figureIndex:-1,attrsIndex:-1}),!1}).registerEvent("pressedMouseMoveEvent",function(e){var i,a,r=n.getPressedInstanceInfo(),o=r.instance,s=r.figureType,l=r.figureIndex,c=r.figureKey;if(null!==o){if(!o.lock&&(null===(a=null===(i=o.onPressedMoving)||void 0===i?void 0:i.call(o,K({overlay:o,figureIndex:l,figureKey:c},e)))||void 0===a||!a)){var u=t._coordinateToPoint(o,e);1===s?o.eventPressedPointMove(u,l):o.eventPressedOtherMove(u,t.getWidget().getPane().getChart().getChartStore().getTimeScaleStore())}return!0}return!1})},e.prototype._createFigureEvents=function(t,e,i,n,a,r){var o;if(!t.isDrawing()){var s=[];if(At(r)&&(Pt(r)?r&&(s=Zt()):s=r),0===s.length)return{mouseMoveEvent:this._figureMouseMoveEvent(t,e,i,n,a),mouseDownEvent:this._figureMouseDownEvent(t,e,i,n,a),mouseClickEvent:this._figureMouseClickEvent(t,e,i,n,a),mouseRightClickEvent:this._figureMouseRightClickEvent(t,e,i,n,a),mouseDoubleClickEvent:this._figureMouseDoubleClickEvent(t,e,i,n,a)};o={},s.includes("mouseMoveEvent")||s.includes("touchMoveEvent")||(o.mouseMoveEvent=this._figureMouseMoveEvent(t,e,i,n,a)),s.includes("mouseDownEvent")||s.includes("touchStartEvent")||(o.mouseDownEvent=this._figureMouseDownEvent(t,e,i,n,a)),s.includes("mouseClickEvent")||s.includes("tapEvent")||(o.mouseClickEvent=this._figureMouseClickEvent(t,e,i,n,a)),s.includes("mouseDoubleClickEvent")||s.includes("doubleTapEvent")||(o.mouseDoubleClickEvent=this._figureMouseDoubleClickEvent(t,e,i,n,a)),s.includes("mouseRightClickEvent")||(o.mouseRightClickEvent=this._figureMouseRightClickEvent(t,e,i,n,a))}return o},e.prototype._figureMouseMoveEvent=function(t,e,i,n,a){var r=this;return function(o){var s=r.getWidget().getPane(),l=s.getChart().getChartStore().getOverlayStore();return l.setHoverInstanceInfo({paneId:s.getId(),instance:t,figureType:e,figureKey:i,figureIndex:n,attrsIndex:a},o),!0}},e.prototype._figureMouseDownEvent=function(t,e,i,n,a){var r=this;return function(o){var s,l=r.getWidget().getPane(),c=l.getId(),u=l.getChart().getChartStore().getOverlayStore();return t.startPressedMove(r._coordinateToPoint(t,o)),null===(s=t.onPressedMoveStart)||void 0===s||s.call(t,K({overlay:t,figureIndex:n,figureKey:i},o)),u.setPressedInstanceInfo({paneId:c,instance:t,figureType:e,figureKey:i,figureIndex:n,attrsIndex:a}),!0}},e.prototype._figureMouseClickEvent=function(t,e,i,n,a){var r=this;return function(o){var s=r.getWidget().getPane(),l=s.getId(),c=s.getChart().getChartStore().getOverlayStore();return c.setClickInstanceInfo({paneId:l,instance:t,figureType:e,figureKey:i,figureIndex:n,attrsIndex:a},o),!0}},e.prototype._figureMouseDoubleClickEvent=function(t,e,i,n,a){return function(e){var a;return null===(a=t.onDoubleClick)||void 0===a||a.call(t,K(K({},e),{figureIndex:n,figureKey:i,overlay:t})),!0}},e.prototype._figureMouseRightClickEvent=function(t,e,i,n,a){var r=this;return function(e){var a,o;if(null===(o=null===(a=t.onRightClick)||void 0===a?void 0:a.call(t,K({overlay:t,figureIndex:n,figureKey:i},e)))||void 0===o||!o){var s=r.getWidget().getPane(),l=s.getChart().getChartStore().getOverlayStore();l.removeInstance(t)}return!0}},e.prototype._coordinateToPoint=function(t,e){var i,n={},a=this.getWidget().getPane(),r=a.getChart(),o=a.getId(),s=r.getChartStore().getTimeScaleStore();if(this.coordinateToPointTimestampDataIndexFlag()){var l=r.getXAxisPane().getAxisComponent(),c=l.convertFromPixel(e.x),u=null!==(i=s.dataIndexToTimestamp(c))&&void 0!==i?i:void 0;n.dataIndex=c,n.timestamp=u}if(this.coordinateToPointValueFlag()){var d=a.getAxisComponent(),h=d.convertFromPixel(e.y);if(t.mode!==Ut.Normal&&o===Wi.CANDLE&&Et(n.dataIndex)){var p=s.getDataByDataIndex(n.dataIndex);if(null!==p){var v=t.modeSensitivity;if(h>p.high)if(t.mode===Ut.WeakMagnet){var f=d.convertToPixel(p.high),g=d.convertFromPixel(f-v);hg&&(h=p.low)}else h=p.low;else{var y=Math.max(p.open,p.close),_=Math.min(p.open,p.close);h=h>y?h-y0){var m=(new Array).concat(this.getFigures(e,g,i,n,a,s,l,r,c,u,d));this.drawFigures(t,e,m,c)}this.drawDefaultFigures(t,e,g,i,a,r,o,s,l,c,u,d,h,p)},e.prototype.drawFigures=function(t,e,i,n){var a=this;i.forEach(function(i,r){var o=i.type,s=i.styles,l=i.attrs,c=i.ignoreEvent,u=[].concat(l);u.forEach(function(l,u){var d,h,p,v=a._createFigureEvents(e,2,null!==(d=i.key)&&void 0!==d?d:"",r,u,c),f=K(K(K({},n[o]),null===(h=e.styles)||void 0===h?void 0:h[o]),s);null===(p=a.createFigure({name:o,attrs:l,styles:f},v))||void 0===p||p.draw(t)})})},e.prototype.getCompleteOverlays=function(t,e){return t.getInstances(e)},e.prototype.getProgressOverlay=function(t,e){return t.paneId===e?t.instance:null},e.prototype.getFigures=function(t,e,i,n,a,r,o,s,l,c,u){var d,h;return null!==(h=null===(d=t.createPointFigures)||void 0===d?void 0:d.call(t,{overlay:t,coordinates:e,bounding:i,barSpace:n,precision:a,thousandsSeparator:r,decimalFoldThreshold:o,dateTimeFormat:s,defaultStyles:l,xAxis:c,yAxis:u}))&&void 0!==h?h:[]},e.prototype.drawDefaultFigures=function(t,e,i,n,a,r,o,s,l,c,u,d,h,p){var v,f,g=this;if(e.needDefaultPointFigure&&((null===(v=h.instance)||void 0===v?void 0:v.id)===e.id&&0!==h.figureType||(null===(f=p.instance)||void 0===f?void 0:f.id)===e.id&&0!==p.figureType)){var m=e.styles,y=K(K({},c.point),null===m||void 0===m?void 0:m.point);i.forEach(function(i,n){var a,r,o,s=i.x,l=i.y,c=y.radius,u=y.color,d=y.borderColor,p=y.borderSize;(null===(a=h.instance)||void 0===a?void 0:a.id)===e.id&&1===h.figureType&&h.figureIndex===n&&(c=y.activeRadius,u=y.activeColor,d=y.activeBorderColor,p=y.activeBorderSize),null===(r=g.createFigure({name:"circle",attrs:{x:s,y:l,r:c+p},styles:{color:d}},g._createFigureEvents(e,1,"".concat(ee,"point_").concat(n),n,0)))||void 0===r||r.draw(t),null===(o=g.createFigure({name:"circle",attrs:{x:s,y:l,r:c},styles:{color:u}}))||void 0===o||o.draw(t)})}},e}(kn),Bn=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._gridView=new In(n),n._indicatorView=new Pn(n),n._crosshairLineView=new Mn(n),n._tooltipView=n.createTooltipView(),n._overlayView=new Tn(n),n.addChild(n._tooltipView),n.addChild(n._overlayView),n.getContainer().style.cursor="crosshair",n.registerEvent("mouseMoveEvent",function(){return i.getChart().getChartStore().getTooltipStore().setActiveIcon(),!1}),n}return L(e,t),e.prototype.getName=function(){return Gi.MAIN},e.prototype.updateMain=function(t){this.updateMainContent(t),this._indicatorView.draw(t),this._gridView.draw(t)},e.prototype.createTooltipView=function(){return new Dn(this)},e.prototype.updateMainContent=function(t){},e.prototype.updateOverlay=function(t){this._overlayView.draw(t),this._crosshairLineView.draw(t),this._tooltipView.draw(t)},e}(en),Fn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._ripplePoint=e.createFigure({name:"circle",attrs:{x:0,y:0,r:0},styles:{style:"fill"}}),e._animationFrameTime=0,e._animation=new le({iterationCount:1/0}).doFrame(function(t){e._animationFrameTime=t;var i=e.getWidget().getPane();i.getChart().updatePane(0,i.getId())}),e}return L(e,t),e.prototype.drawImp=function(t){var e,i,n,a=this.getWidget(),r=a.getPane(),o=r.getChart(),s=o.getDataList(),l=s.length-1,c=a.getBounding(),u=r.getAxisComponent(),d=o.getStyles().candle.area,h=[],p=Number.MAX_SAFE_INTEGER,v=Number.MIN_SAFE_INTEGER,f=null;if(this.eachChildren(function(t){var e=t.data,i=t.x,n=null===e||void 0===e?void 0:e[d.value];if(Et(n)){var a=u.convertToPixel(n);v===Number.MIN_SAFE_INTEGER&&(v=i),h.push({x:i,y:a}),p=Math.min(p,a),t.dataIndex===l&&(f={x:i,y:a})}}),h.length>0){null===(e=this.createFigure({name:"line",attrs:{coordinates:h},styles:{color:d.lineColor,size:d.lineSize,smooth:d.smooth}}))||void 0===e||e.draw(t);var g=d.backgroundColor,m=void 0;if(Ct(g)){var y=t.createLinearGradient(0,c.height,0,p);try{g.forEach(function(t){var e=t.offset,i=t.color;y.addColorStop(e,i)})}catch(x){}m=y}else m=g;t.fillStyle=m,t.beginPath(),t.moveTo(v,c.height),t.lineTo(h[0].x,h[0].y),_i(t,h,d.smooth),t.lineTo(h[h.length-1].x,c.height),t.closePath(),t.fill()}var _=d.point;if(_.show&&At(f)){null===(i=this.createFigure({name:"circle",attrs:{x:f.x,y:f.y,r:_.radius},styles:{style:"fill",color:_.color}}))||void 0===i||i.draw(t);var b=_.rippleRadius;_.animation&&(b=_.radius+this._animationFrameTime/_.animationDuration*(_.rippleRadius-_.radius),this._animation.setDuration(_.animationDuration).start()),null===(n=this._ripplePoint)||void 0===n||n.setAttrs({x:f.x,y:f.y,r:b}).setStyles({style:"fill",color:_.rippleColor}).draw(t)}else this.stopAnimation()},e.prototype.stopAnimation=function(){this._animation.stop()},e}(En),Rn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.drawImp=function(t){var e=this.getWidget(),i=e.getPane(),n=i.getChart().getChartStore(),a=n.getStyles().candle.priceMark,r=a.high,o=a.low;if(a.show&&(r.show||o.show)){var s=n.getThousandsSeparator(),l=n.getDecimalFoldThreshold(),c=n.getPrecision(),u=i.getAxisComponent(),d=Number.MIN_SAFE_INTEGER,h=0,p=Number.MAX_SAFE_INTEGER,v=0;this.eachChildren(function(t){var e=t.data,i=t.x;At(e)&&(de.low&&(p=e.low,v=i))});var f=u.convertToPixel(d),g=u.convertToPixel(p);r.show&&d!==Number.MIN_SAFE_INTEGER&&this._drawMark(t,Vt(zt(Nt(d,c.price),s),l),{x:h,y:f},fp/2?(l=d-5,c=l-a.textOffset,u="right"):(l=d+5,u="left",c=l+a.textOffset);var v=h+n[1];null===(o=this.createFigure({name:"line",attrs:{coordinates:[{x:d,y:h},{x:d,y:v},{x:l,y:v}]},styles:{color:a.color}}))||void 0===o||o.draw(t),null===(s=this.createFigure({name:"text",attrs:{x:c,y:v,text:e,align:u,baseline:"middle"},styles:{color:a.color,size:a.textSize,family:a.textFamily,weight:a.textWeight}}))||void 0===s||s.draw(t)},e}(En),Ln=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.drawImp=function(t){var e,i=this.getWidget(),n=i.getPane(),a=i.getBounding(),r=n.getChart().getChartStore(),o=r.getStyles().candle.priceMark,s=o.last,l=s.line;if(o.show&&s.show&&l.show){var c=n.getAxisComponent(),u=r.getDataList(),d=u[u.length-1];if(null!=d){var h=d.close,p=d.open,v=c.convertToNicePixel(h),f=void 0;f=h>p?s.upColor:h0&&(b=this.drawStandardTooltipLegends(t,S,x,d,b,p,_)),b=this.drawStandardTooltipIcons(t,a,E,x,i,"",d,b,p)}return x.y+b},e.prototype._drawRectTooltip=function(t,e,i,n,a,r,o,s,l,c,u,d,h,p,v,f){var g,m,y,_,b,x=this,w=f.candle,S=f.indicator,C=w.tooltip,k=S.tooltip;if(h||p){var I=null!==(g=r.dataIndex)&&void 0!==g?g:0,E=this._getCandleTooltipLegends({prev:null!==(m=e[I-1])&&void 0!==m?m:null,current:r.kLineData,next:null!==(y=e[I+1])&&void 0!==y?y:null},o,s,l,c,u,d,w),A=C.offsetLeft,P=C.offsetTop,M=C.offsetRight,D=C.offsetBottom,T=C.text,B=T.marginLeft,F=T.marginRight,R=T.marginTop,L=T.marginBottom,N=T.size,z=T.weight,V=T.family,W=C.rect,$=W.position,X=W.paddingLeft,K=W.paddingRight,j=W.paddingTop,U=W.paddingBottom,G=W.offsetLeft,Z=W.offsetRight,q=W.offsetTop,J=W.offsetBottom,Q=W.borderSize,tt=W.borderRadius,et=W.borderColor,it=W.color,nt=0,at=0,rt=0;h&&(t.font=Ht(N,z,V),E.forEach(function(e){var i=e.title,n=e.value,a="".concat(i.text).concat(n.text),r=t.measureText(a).width+B+F;nt=Math.max(nt,r)}),rt+=(L+R+N)*E.length);var ot=k.text,st=ot.marginLeft,lt=ot.marginRight,ct=ot.marginTop,ut=ot.marginBottom,dt=ot.size,ht=ot.weight,pt=ot.family,vt=[];if(p&&(t.font=Ht(dt,ht,pt),i.forEach(function(i){var n,a=null!==(n=x.getIndicatorTooltipData(e,r,i,c,u,d,S).values)&&void 0!==n?n:[];vt.push(a),a.forEach(function(e){var i=e.title,n=e.value,a="".concat(i.text).concat(n.text),r=t.measureText(a).width+st+lt;nt=Math.max(nt,r),rt+=ct+ut+dt})})),at+=nt,0!==at&&0!==rt){at+=2*Q+X+K,rt+=2*Q+j+U;var ft=n.width/2,gt=$===H.Pointer&&r.paneId===Wi.CANDLE,mt=(null!==(_=r.realX)&&void 0!==_?_:0)>ft,yt=0;if(gt){var _t=r.realX;yt=mt?_t-Z-at:_t+G}else mt?(yt=G+A,f.yAxis.inside&&f.yAxis.position===Y.Left&&(yt+=a.width)):(yt=n.width-Z-at-M,f.yAxis.inside&&f.yAxis.position===Y.Right&&(yt-=a.width));var bt=v+q;if(gt){var xt=r.y;bt=xt-rt/2,bt+rt>n.height-J-D&&(bt=n.height-J-rt-D),bt1){var c="{".concat(l[1],"}");o.text=o.text.replace(c,null!==(e=b[c])&&void 0!==e?e:p.defaultValue),"{change}"===c&&(o.color=0===m?s.priceMark.last.noChangeColor:m>0?s.priceMark.last.upColor:s.priceMark.last.downColor)}return{title:r,value:o}})},e}(Dn),Hn=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._candleBarView=new An(n),n._candleAreaView=new Fn(n),n._candleHighLowPriceView=new Rn(n),n._candleLastPriceLineView=new Ln(n),n.addChild(n._candleBarView),n}return L(e,t),e.prototype.updateMainContent=function(t){var e=this.getPane().getChart().getStyles().candle;e.type!==$.Area?(this._candleBarView.draw(t),this._candleHighLowPriceView.draw(t),this._candleAreaView.stopAnimation()):this._candleAreaView.draw(t),this._candleLastPriceLineView.draw(t)},e.prototype.createTooltipView=function(){return new Wn(this)},e}(Bn),$n=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.drawImp=function(t){var e,i,n=this,a=this.getWidget(),r=a.getPane(),o=a.getBounding(),s=r.getAxisComponent(),l=this.getAxisStyles(r.getChart().getStyles());if(l.show){l.axisLine.show&&(null===(e=this.createFigure({name:"line",attrs:this.createAxisLine(o,l),styles:l.axisLine}))||void 0===e||e.draw(t));var c=s.getTicks();if(l.tickLine.show){var u=this.createTickLines(c,o,l);u.forEach(function(e){var i;null===(i=n.createFigure({name:"line",attrs:e,styles:l.tickLine}))||void 0===i||i.draw(t)})}if(l.tickText.show){var d=this.createTickTexts(c,o,l);null===(i=this.createFigure({name:"text",attrs:d,styles:l.tickText}))||void 0===i||i.draw(t)}}},e}(kn),Yn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.getAxisStyles=function(t){return t.yAxis},e.prototype.createAxisLine=function(t,e){var i,n=this.getWidget().getPane().getAxisComponent(),a=e.axisLine.size;return i=n.isFromZero()?0:t.width-a,{coordinates:[{x:i,y:0},{x:i,y:t.height}]}},e.prototype.createTickLines=function(t,e,i){var n=this.getWidget().getPane().getAxisComponent(),a=i.axisLine,r=i.tickLine,o=0,s=0;return n.isFromZero()?(o=0,a.show&&(o+=a.size),s=o+r.length):(o=e.width,a.show&&(o-=a.size),s=o-r.length),t.map(function(t){return{coordinates:[{x:o,y:t.coord},{x:s,y:t.coord}]}})},e.prototype.createTickTexts=function(t,e,i){var n=this.getWidget().getPane().getAxisComponent(),a=i.axisLine,r=i.tickLine,o=i.tickText,s=0;n.isFromZero()?(s=o.marginStart,a.show&&(s+=a.size),r.show&&(s+=r.length)):(s=e.width-o.marginEnd,a.show&&(s-=a.size),r.show&&(s-=r.length));var l=this.getWidget().getPane().getAxisComponent().isFromZero()?"left":"right";return t.map(function(t){return{x:s,y:t.coord,text:t.text,align:l,baseline:"middle"}})},e}($n),Xn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.drawImp=function(t){var e,i=this.getWidget(),n=i.getPane(),a=i.getBounding(),r=n.getChart().getChartStore(),o=r.getStyles().candle.priceMark,s=o.last,l=s.text;if(o.show&&s.show&&l.show){var c=r.getPrecision(),u=n.getAxisComponent(),d=r.getDataList(),h=d[d.length-1];if(At(h)){var p=h.close,v=h.open,f=u.convertToNicePixel(p),g=void 0;g=p>v?s.upColor:p1&&p.unshift({type:"rect",attrs:{x:0,y:g,width:i.width,height:m-g},ignoreEvent:!0})}return p},e.prototype.getFigures=function(t,e,i,n,a,r,o,s,l,c,u){var d,h;return null!==(h=null===(d=t.createYAxisFigures)||void 0===d?void 0:d.call(t,{overlay:t,coordinates:e,bounding:i,barSpace:n,precision:a,thousandsSeparator:r,decimalFoldThreshold:o,dateTimeFormat:s,defaultStyles:l,xAxis:c,yAxis:u}))&&void 0!==h?h:[]},e}(Tn),Un=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.drawImp=function(t){var e,i=this.getWidget(),n=i.getPane(),a=i.getBounding(),r=i.getPane().getChart().getChartStore(),o=r.getTooltipStore().getCrosshair(),s=r.getStyles().crosshair;if(Mt(o.paneId)&&this.compare(o,n.getId())&&s.show){var l=this.getDirectionStyles(s),c=l.text;if(l.show&&c.show){var u=n.getAxisComponent(),d=this.getText(o,r,u);t.font=Ht(c.size,c.weight,c.family),null===(e=this.createFigure({name:"text",attrs:this.getTextAttrs(d,t.measureText(d).width,o,a,u,c),styles:c}))||void 0===e||e.draw(t)}}},e.prototype.compare=function(t,e){return t.paneId===e},e.prototype.getDirectionStyles=function(t){return t.horizontal},e.prototype.getText=function(t,e,i){var n,a=i,r=i.convertFromPixel(t.y);if(a.getType()===X.Percentage){var o=e.getVisibleFirstData();n="".concat(((r-o.close)/o.close*100).toFixed(2),"%")}else{var s=e.getIndicatorStore().getInstances(t.paneId),l=0,c=!1;a.isInCandle()?l=e.getPrecision().price:s.forEach(function(t){l=Math.max(t.precision,l),c||(c=t.shouldFormatBigNumber)}),n=Nt(r,l),c&&(n=e.getCustomApi().formatBigNumber(n))}return Vt(zt(n,e.getThousandsSeparator()),e.getDecimalFoldThreshold())},e.prototype.getTextAttrs=function(t,e,i,n,a,r){var o,s,l=a;return l.isFromZero()?(o=0,s="left"):(o=n.width,s="right"),{x:o,y:i.y,text:t,align:s,baseline:"middle"}},e}(kn),Gn=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._yAxisView=new Yn(n),n._candleLastPriceLabelView=new Xn(n),n._indicatorLastValueView=new Kn(n),n._overlayYAxisView=new jn(n),n._crosshairHorizontalLabelView=new Un(n),n.getContainer().style.cursor="ns-resize",n.addChild(n._overlayYAxisView),n}return L(e,t),e.prototype.getName=function(){return Gi.Y_AXIS},e.prototype.updateMain=function(t){this._yAxisView.draw(t),this.getPane().getAxisComponent().isInCandle()&&this._candleLastPriceLabelView.draw(t),this._indicatorLastValueView.draw(t)},e.prototype.updateOverlay=function(t){this._overlayYAxisView.draw(t),this._crosshairHorizontalLabelView.draw(t)},e}(en),Zn=function(){function t(t){this._range={from:0,to:0,range:0,realFrom:0,realTo:0,realRange:0},this._prevRange={from:0,to:0,range:0,realFrom:0,realTo:0,realRange:0},this._ticks=[],this._autoCalcTickFlag=!0,this._parent=t}return t.prototype.getParent=function(){return this._parent},t.prototype.buildTicks=function(t){if(this._autoCalcTickFlag&&(this._range=this.calcRange()),this._prevRange.from!==this._range.from||this._prevRange.to!==this._range.to||t){this._prevRange=this._range;var e=this.optimalTicks(this._calcTicks());return this._ticks=this.createTicks({range:this._range,bounding:this.getSelfBounding(),defaultTicks:e}),!0}return!1},t.prototype.getTicks=function(){return this._ticks},t.prototype.getScrollZoomEnabled=function(){var t;return null===(t=this.getParent().getOptions().axisOptions.scrollZoomEnabled)||void 0===t||t},t.prototype.setRange=function(t){this._autoCalcTickFlag=!1,this._range=t},t.prototype.getRange=function(){return this._range},t.prototype.setAutoCalcTickFlag=function(t){this._autoCalcTickFlag=t},t.prototype.getAutoCalcTickFlag=function(){return this._autoCalcTickFlag},t.prototype._calcTicks=function(){var t=this._range,e=t.realFrom,i=t.realTo,n=t.realRange,a=[];if(n>=0){var r=Z(this._calcTickInterval(n),2),o=r[0],s=r[1],l=fe(Math.ceil(e/o)*o,s),c=fe(Math.floor(i/o)*o,s),u=0,d=l;if(0!==o)while(d<=c){var h=d.toFixed(s);a[u]={text:h,coord:0,value:h},++u,d+=o}}return a},t.prototype._calcTickInterval=function(t){var e=ve(t/8),i=ge(e);return[e,i]},t}(),qn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.calcRange=function(){var t,e,i,n,a=this.getParent(),r=a.getChart(),o=r.getChartStore(),s=Number.MAX_SAFE_INTEGER,l=Number.MIN_SAFE_INTEGER,c=[],u=!1,d=Number.MAX_SAFE_INTEGER,h=Number.MIN_SAFE_INTEGER,p=Number.MAX_SAFE_INTEGER,v=o.getIndicatorStore().getInstances(a.getId());v.forEach(function(t){var e,i,n;u||(u=null!==(e=t.shouldOhlc)&&void 0!==e&&e),p=Math.min(p,t.precision),Et(t.minValue)&&(d=Math.min(d,t.minValue)),Et(t.maxValue)&&(h=Math.max(h,t.maxValue)),c.push({figures:null!==(i=t.figures)&&void 0!==i?i:[],result:null!==(n=t.result)&&void 0!==n?n:[]})});var f=4,g=this.isInCandle();if(g){var m=o.getPrecision().price;f=p!==Number.MAX_SAFE_INTEGER?Math.min(p,m):m}else p!==Number.MAX_SAFE_INTEGER&&(f=p);var y=o.getVisibleDataList(),_=r.getStyles().candle,b=_.type===$.Area,x=_.area.value,w=g&&!b||!g&&u;y.forEach(function(t){var e=t.dataIndex,i=t.data;if(At(i)&&(w&&(s=Math.min(s,i.low),l=Math.max(l,i.high)),g&&b)){var n=i[x];Et(n)&&(s=Math.min(s,n),l=Math.max(l,n))}c.forEach(function(t){var i,n=t.figures,a=t.result,r=null!==(i=a[e])&&void 0!==i?i:{};n.forEach(function(t){var e=r[t.key];Et(e)&&(s=Math.min(s,e),l=Math.max(l,e))})})}),s!==Number.MAX_SAFE_INTEGER&&l!==Number.MIN_SAFE_INTEGER?(s=Math.min(d,s),l=Math.max(h,l)):(s=0,l=10);var S,C=this.getType();switch(C){case X.Percentage:var k=o.getVisibleFirstData();At(k)&&Et(k.close)&&(s=(s-k.close)/k.close*100,l=(l-k.close)/k.close*100),S=Math.pow(10,-2);break;case X.Log:s=ye(s),l=ye(l),S=.05*_e(-f);break;default:S=_e(-f)}if(s===l||Math.abs(s-l)=1&&(M/=A);var D=null!==(n=null===P||void 0===P?void 0:P.bottom)&&void 0!==n?n:.1;D>=1&&(D/=A);var T,B,F,R=Math.abs(l-s);return s-=R*D,l+=R*M,R=Math.abs(l-s),C===X.Log?(T=_e(s),B=_e(l),F=Math.abs(B-T)):(T=s,B=l,F=R),{from:s,to:l,range:R,realFrom:T,realTo:B,realRange:F}},e.prototype._innerConvertToPixel=function(t){var e,i,n=null!==(i=null===(e=this.getParent().getYAxisWidget())||void 0===e?void 0:e.getBounding().height)&&void 0!==i?i:0,a=this.getRange(),r=a.from,o=a.range,s=(t-r)/o;return this.isReverse()?Math.round(s*n):Math.round((1-s)*n)},e.prototype.isInCandle=function(){return this.getParent().getId()===Wi.CANDLE},e.prototype.getType=function(){return this.isInCandle()?this.getParent().getChart().getStyles().yAxis.type:X.Normal},e.prototype.getPosition=function(){return this.getParent().getChart().getStyles().yAxis.position},e.prototype.isReverse=function(){return!!this.isInCandle()&&this.getParent().getChart().getStyles().yAxis.reverse},e.prototype.isFromZero=function(){var t=this.getParent().getChart().getStyles().yAxis,e=t.inside;return t.position===Y.Left&&e||t.position===Y.Right&&!e},e.prototype.optimalTicks=function(t){var e,i,n=this,a=this.getParent(),r=null!==(i=null===(e=a.getYAxisWidget())||void 0===e?void 0:e.getBounding().height)&&void 0!==i?i:0,o=a.getChart().getChartStore(),s=o.getCustomApi(),l=[],c=this.getType(),u=o.getIndicatorStore().getInstances(a.getId()),d=o.getThousandsSeparator(),h=o.getDecimalFoldThreshold(),p=0,v=!1;this.isInCandle()?p=o.getPrecision().price:u.forEach(function(t){p=Math.max(p,t.precision),v||(v=t.shouldFormatBigNumber)});var f,g=o.getStyles().xAxis.tickText.size;return t.forEach(function(t){var e,i=t.value,a=n._innerConvertToPixel(+i);switch(c){case X.Percentage:e="".concat(Nt(i,2),"%");break;case X.Log:a=n._innerConvertToPixel(ye(+i)),e=Nt(i,p);break;default:e=Nt(i,p),v&&(e=s.formatBigNumber(i));break}e=Vt(zt(e,d),h);var o=Et(f);a>g&&a2*g||!o)&&(l.push({text:e,coord:a,value:i}),f=a)}),l},e.prototype.getAutoSize=function(){var t=this.getParent(),e=t.getChart(),i=e.getStyles(),n=i.yAxis,a=n.size;if("auto"!==a)return a;var r=e.getChartStore(),o=r.getCustomApi(),s=0;if(n.show&&(n.axisLine.show&&(s+=n.axisLine.size),n.tickLine.show&&(s+=n.tickLine.length),n.tickText.show)){var l=0;this.getTicks().forEach(function(t){l=Math.max(l,$t(t.text,n.tickText.size,n.tickText.weight,n.tickText.family))}),s+=n.tickText.marginStart+n.tickText.marginEnd+l}var c=i.crosshair,u=0;if(c.show&&c.horizontal.show&&c.horizontal.text.show){var d=r.getIndicatorStore().getInstances(t.getId()),h=0,p=!1;d.forEach(function(t){h=Math.max(t.precision,h),p||(p=t.shouldFormatBigNumber)});var v=2;if(this.getType()!==X.Percentage)if(this.isInCandle()){var f=r.getPrecision().price,g=i.indicator.lastValueMark;v=g.show&&g.text.show?Math.max(h,f):f}else v=h;var m=Nt(this.getRange().to,v);p&&(m=o.formatBigNumber(m)),m=Vt(m,r.getDecimalFoldThreshold()),u+=c.horizontal.text.paddingLeft+c.horizontal.text.paddingRight+2*c.horizontal.text.borderSize+$t(m,c.horizontal.text.size,c.horizontal.text.weight,c.horizontal.text.family)}return Math.max(s,u)},e.prototype.getSelfBounding=function(){return this.getParent().getYAxisWidget().getBounding()},e.prototype.convertFromPixel=function(t){var e,i,n=null!==(i=null===(e=this.getParent().getYAxisWidget())||void 0===e?void 0:e.getBounding().height)&&void 0!==i?i:0,a=this.getRange(),r=a.from,o=a.range,s=this.isReverse()?t/n:1-t/n,l=s*o+r;switch(this.getType()){case X.Percentage:var c=this.getParent().getChart().getChartStore().getVisibleFirstData();return At(c)&&Et(c.close)?c.close*l/100+c.close:0;case X.Log:return _e(l);default:return l}},e.prototype.convertToRealValue=function(t){var e=t;return this.getType()===X.Log&&(e=_e(t)),e},e.prototype.convertToPixel=function(t){var e=t;switch(this.getType()){case X.Percentage:var i=this.getParent().getChart().getChartStore().getVisibleFirstData();At(i)&&Et(i.close)&&(e=(t-i.close)/i.close*100);break;case X.Log:e=ye(t);break;default:e=t}return this._innerConvertToPixel(e)},e.prototype.convertToNicePixel=function(t){var e,i,n=null!==(i=null===(e=this.getParent().getYAxisWidget())||void 0===e?void 0:e.getBounding().height)&&void 0!==i?i:0,a=this.convertToPixel(t);return Math.round(Math.max(.05*n,Math.min(a,.98*n)))},e.extend=function(t){var i=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return L(i,e),i.prototype.createTicks=function(e){return t.createTicks(e)},i}(e);return i},e}(Zn),Jn={name:"default",createTicks:function(t){var e=t.defaultTicks;return e}},Qn={default:qn.extend(Jn)};function ta(t){var e;return null!==(e=Qn[t])&&void 0!==e?e:Qn.default}var ea=function(){function t(t,e,i,n){this._bounding=Qi(),this._chart=i,this._id=n,this._init(t,e)}return t.prototype._init=function(t,e){this._rootContainer=t,this._container=he("div",{width:"100%",margin:"0",padding:"0",position:"relative",overflow:"hidden",boxSizing:"border-box"}),null!==e?t.insertBefore(this._container,e):t.appendChild(this._container)},t.prototype.getContainer=function(){return this._container},t.prototype.getId=function(){return this._id},t.prototype.getChart=function(){return this._chart},t.prototype.getBounding=function(){return this._bounding},t.prototype.update=function(t){this._bounding.height!==this._container.clientHeight&&(this._container.style.height="".concat(this._bounding.height,"px")),this.updateImp(null!==t&&void 0!==t?t:3,this._container,this._bounding)},t.prototype.destroy=function(){this._rootContainer.removeChild(this._container)},t}(),ia=function(t){function e(e,i,n,a,r){var o=t.call(this,e,i,n,a)||this;o._yAxisWidget=null,o._options={minHeight:zi,dragEnabled:!0,gap:{top:.2,bottom:.1},axisOptions:{name:"default",scrollZoomEnabled:!0}};var s=o.getContainer();return o._mainWidget=o.createMainWidget(s),o._yAxisWidget=o.createYAxisWidget(s),o.setOptions(r),o}return L(e,t),e.prototype.setOptions=function(t){var e,i,n,a,r,o=null===(e=t.axisOptions)||void 0===e?void 0:e.name;return(this._options.axisOptions.name!==o&&Mt(o)||!At(this._axis))&&(this._axis=this.createAxisComponent(null!==o&&void 0!==o?o:"default")),wt(this._options,t),this.getId()===Wi.X_AXIS?(a=this.getMainWidget().getContainer(),r="ew-resize"):(a=this.getYAxisWidget().getContainer(),r="ns-resize"),null===(n=null===(i=t.axisOptions)||void 0===i?void 0:i.scrollZoomEnabled)||void 0===n||n?a.style.cursor=r:a.style.cursor="default",this},e.prototype.getOptions=function(){return this._options},e.prototype.getAxisComponent=function(){return this._axis},e.prototype.setBounding=function(t,e,i){var n,a;wt(this.getBounding(),t);var r={};return At(t.height)&&(r.height=t.height),At(t.top)&&(r.top=t.top),this._mainWidget.setBounding(r),null===(n=this._yAxisWidget)||void 0===n||n.setBounding(r),At(e)&&this._mainWidget.setBounding(e),At(i)&&(null===(a=this._yAxisWidget)||void 0===a||a.setBounding(i)),this},e.prototype.getMainWidget=function(){return this._mainWidget},e.prototype.getYAxisWidget=function(){return this._yAxisWidget},e.prototype.updateImp=function(t){var e;this._mainWidget.update(t),null===(e=this._yAxisWidget)||void 0===e||e.update(t)},e.prototype.destroy=function(){var e;t.prototype.destroy.call(this),this._mainWidget.destroy(),null===(e=this._yAxisWidget)||void 0===e||e.destroy()},e.prototype.getImage=function(t){var e=this.getBounding(),i=e.width,n=e.height,a=he("canvas",{width:"".concat(i,"px"),height:"".concat(n,"px"),boxSizing:"border-box"}),r=a.getContext("2d"),o=Wt(a);a.width=i*o,a.height=n*o,r.scale(o,o);var s=this._mainWidget.getBounding();if(r.drawImage(this._mainWidget.getImage(t),s.left,0,s.width,s.height),null!==this._yAxisWidget){var l=this._yAxisWidget.getBounding();r.drawImage(this._yAxisWidget.getImage(t),l.left,0,l.width,l.height)}return a},e.prototype.createYAxisWidget=function(t){return null},e}(ea),na=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.createAxisComponent=function(t){var e=ta(null!==t&&void 0!==t?t:"default");return new e(this)},e.prototype.createMainWidget=function(t){return new Bn(t,this)},e.prototype.createYAxisWidget=function(t){return new Gn(t,this)},e}(ia),aa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.createMainWidget=function(t){return new Hn(t,this)},e}(na),ra=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.getAxisStyles=function(t){return t.xAxis},e.prototype.createAxisLine=function(t){return{coordinates:[{x:0,y:0},{x:t.width,y:0}]}},e.prototype.createTickLines=function(t,e,i){var n=i.tickLine,a=i.axisLine.size;return t.map(function(t){return{coordinates:[{x:t.coord,y:0},{x:t.coord,y:a+n.length}]}})},e.prototype.createTickTexts=function(t,e,i){var n=i.tickText,a=i.axisLine.size,r=i.tickLine.length;return t.map(function(t){return{x:t.coord,y:a+r+n.marginStart,text:t.text,align:"center",baseline:"top"}})},e}($n),oa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.coordinateToPointTimestampDataIndexFlag=function(){return!0},e.prototype.coordinateToPointValueFlag=function(){return!1},e.prototype.getCompleteOverlays=function(t){return t.getInstances()},e.prototype.getProgressOverlay=function(t){return t.instance},e.prototype.getDefaultFigures=function(t,e,i,n,a,r,o,s,l,c,u){var d,h=[];if(t.needDefaultXAxisFigure&&t.id===(null===(d=u.instance)||void 0===d?void 0:d.id)){var p=Number.MAX_SAFE_INTEGER,v=Number.MIN_SAFE_INTEGER;e.forEach(function(e,i){p=Math.min(p,e.x),v=Math.max(v,e.x);var n=t.points[i];if(Et(n.timestamp)){var o=r.formatDate(a,n.timestamp,"YYYY-MM-DD HH:mm",qt.Crosshair);h.push({type:"text",attrs:{x:e.x,y:0,text:o,align:"center"},ignoreEvent:!0})}}),e.length>1&&h.unshift({type:"rect",attrs:{x:p,y:0,width:v-p,height:i.height},ignoreEvent:!0})}return h},e.prototype.getFigures=function(t,e,i,n,a,r,o,s,l,c,u){var d,h;return null!==(h=null===(d=t.createXAxisFigures)||void 0===d?void 0:d.call(t,{overlay:t,coordinates:e,bounding:i,barSpace:n,precision:a,thousandsSeparator:r,decimalFoldThreshold:o,dateTimeFormat:s,defaultStyles:l,xAxis:c,yAxis:u}))&&void 0!==h?h:[]},e}(jn),sa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.compare=function(t){return At(t.kLineData)&&t.dataIndex===t.realDataIndex},e.prototype.getDirectionStyles=function(t){return t.vertical},e.prototype.getText=function(t,e){var i,n=null===(i=t.kLineData)||void 0===i?void 0:i.timestamp;return e.getCustomApi().formatDate(e.getTimeScaleStore().getDateTimeFormat(),n,"YYYY-MM-DD HH:mm",qt.Crosshair)},e.prototype.getTextAttrs=function(t,e,i,n,a,r){var o,s=i.realX,l="center";return s-e/2-r.paddingLeft<0?(o=0,l="left"):s+e/2+r.paddingRight>n.width?(o=n.width,l="right"):o=s,{x:o,y:0,text:t,align:l,baseline:"top"}},e}(Un),la=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._xAxisView=new ra(n),n._overlayXAxisView=new oa(n),n._crosshairVerticalLabelView=new sa(n),n.getContainer().style.cursor="ew-resize",n.addChild(n._overlayXAxisView),n}return L(e,t),e.prototype.getName=function(){return Gi.X_AXIS},e.prototype.updateMain=function(t){this._xAxisView.draw(t)},e.prototype.updateOverlay=function(t){this._overlayXAxisView.draw(t),this._crosshairVerticalLabelView.draw(t)},e}(en),ca=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.calcRange=function(){var t=this.getParent().getChart().getChartStore(),e=t.getTimeScaleStore().getVisibleRange(),i=e.from,n=e.to,a=i,r=n-1,o=n-i;return{from:a,to:r,range:o,realFrom:a,realTo:r,realRange:o}},e.prototype.optimalTicks=function(t){var e,i,n=this.getParent().getChart(),a=n.getChartStore(),r=a.getCustomApi().formatDate,o=[],s=t.length,l=a.getDataList();if(s>0){var c=a.getTimeScaleStore().getDateTimeFormat(),u=n.getStyles().xAxis.tickText,d=$t("00-00 00:00",u.size,u.weight,u.family),h=parseInt(t[0].value,10),p=this.convertToPixel(h),v=1;if(s>1){var f=parseInt(t[1].value,10),g=this.convertToPixel(f),m=Math.abs(g-p);me&&(t.apply(this,arguments),i=n)}}var fa=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._dragFlag=!1,n._dragStartY=0,n._topPaneHeight=0,n._bottomPaneHeight=0,n._pressedMouseMoveEvent=va(n._pressedTouchMouseMoveEvent,20),n.registerEvent("touchStartEvent",n._mouseDownEvent.bind(n)).registerEvent("touchMoveEvent",n._pressedMouseMoveEvent.bind(n)).registerEvent("touchEndEvent",n._mouseUpEvent.bind(n)).registerEvent("mouseDownEvent",n._mouseDownEvent.bind(n)).registerEvent("mouseUpEvent",n._mouseUpEvent.bind(n)).registerEvent("pressedMouseMoveEvent",n._pressedMouseMoveEvent.bind(n)).registerEvent("mouseEnterEvent",n._mouseEnterEvent.bind(n)).registerEvent("mouseLeaveEvent",n._mouseLeaveEvent.bind(n)),n}return L(e,t),e.prototype.getName=function(){return Gi.SEPARATOR},e.prototype.checkEventOn=function(){return!0},e.prototype._mouseDownEvent=function(t){this._dragFlag=!0,this._dragStartY=t.pageY;var e=this.getPane();return this._topPaneHeight=e.getTopPane().getBounding().height,this._bottomPaneHeight=e.getBottomPane().getBounding().height,!0},e.prototype._mouseUpEvent=function(){return this._dragFlag=!1,this._mouseLeaveEvent()},e.prototype._pressedTouchMouseMoveEvent=function(t){var e=t.pageY-this._dragStartY,i=this.getPane(),n=i.getTopPane(),a=i.getBottomPane(),r=e<0;if(null!==n&&(null===a||void 0===a?void 0:a.getOptions().dragEnabled)){var o=void 0,s=void 0,l=void 0,c=void 0;r?(o=n,s=a,l=this._topPaneHeight,c=this._bottomPaneHeight):(o=a,s=n,l=this._bottomPaneHeight,c=this._topPaneHeight);var u=o.getOptions().minHeight;if(l>u){var d=Math.max(l-Math.abs(e),u),h=l-d;o.setBounding({height:d}),s.setBounding({height:c+h});var p=i.getChart();p.getChartStore().getActionStore().execute(Tt.OnPaneDrag,{paneId:i.getId()}),p.adjustPaneViewport(!0,!0,!0,!0,!0)}}return!0},e.prototype._mouseEnterEvent=function(){var t,e=this.getPane(),i=e.getBottomPane();if(null!==(t=null===i||void 0===i?void 0:i.getOptions().dragEnabled)&&void 0!==t&&t){var n=e.getChart(),a=n.getStyles().separator;return this.getContainer().style.background=a.activeBackgroundColor,!0}return!1},e.prototype._mouseLeaveEvent=function(){return!this._dragFlag&&(this.getContainer().style.background="",!0)},e.prototype.createContainer=function(){return he("div",{width:"100%",height:"".concat(Zi,"px"),margin:"0",padding:"0",position:"absolute",top:"-3px",zIndex:"20",boxSizing:"border-box",cursor:"ns-resize"})},e.prototype.updateImp=function(t,e,i){if(4===i||2===i){var n=this.getPane().getChart().getStyles().separator;t.style.top="".concat(-Math.floor((Zi-n.size)/2),"px"),t.style.height="".concat(Zi,"px")}},e}(tn),ga=function(t){function e(e,i,n,a,r,o){var s=t.call(this,e,i,n,a)||this;return s.getContainer().style.overflow="",s._topPane=r,s._bottomPane=o,s._separatorWidget=new fa(s.getContainer(),s),s}return L(e,t),e.prototype.setBounding=function(t){return wt(this.getBounding(),t),this},e.prototype.getTopPane=function(){return this._topPane},e.prototype.setTopPane=function(t){return this._topPane=t,this},e.prototype.getBottomPane=function(){return this._bottomPane},e.prototype.setBottomPane=function(t){return this._bottomPane=t,this},e.prototype.getWidget=function(){return this._separatorWidget},e.prototype.getImage=function(t){var e=this.getBounding(),i=e.width,n=e.height,a=this.getChart().getStyles().separator,r=he("canvas",{width:"".concat(i,"px"),height:"".concat(n,"px"),boxSizing:"border-box"}),o=r.getContext("2d"),s=Wt(r);return r.width=i*s,r.height=n*s,o.scale(s,s),o.fillStyle=a.color,o.fillRect(0,0,i,n),r},e.prototype.updateImp=function(t,e,i){if(4===t||2===t){var n=this.getChart().getStyles().separator;e.style.backgroundColor=n.color,e.style.height="".concat(i.height,"px"),e.style.marginLeft="".concat(i.left,"px"),e.style.width="".concat(i.width,"px"),this._separatorWidget.update(t)}},e}(ea);function ma(){var t;return"undefined"!==typeof window&&(null!==(t=window.navigator.userAgent.toLowerCase().indexOf("firefox"))&&void 0!==t?t:-1)>-1}function ya(){return"undefined"!==typeof window&&/iPhone|iPad|iPod/.test(window.navigator.platform)}var _a,ba=10,xa=function(){function t(t,e,i){var n=this;this._clickCount=0,this._clickTimeoutId=null,this._clickCoordinate={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY},this._tapCount=0,this._tapTimeoutId=null,this._tapCoordinate={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY},this._longTapTimeoutId=null,this._longTapActive=!1,this._mouseMoveStartCoordinate=null,this._touchMoveStartCoordinate=null,this._touchMoveExceededManhattanDistance=!1,this._cancelClick=!1,this._cancelTap=!1,this._unsubscribeOutsideMouseEvents=null,this._unsubscribeOutsideTouchEvents=null,this._unsubscribeMobileSafariEvents=null,this._unsubscribeMousemove=null,this._unsubscribeMouseWheel=null,this._unsubscribeContextMenu=null,this._unsubscribeRootMouseEvents=null,this._unsubscribeRootTouchEvents=null,this._startPinchMiddleCoordinate=null,this._startPinchDistance=0,this._pinchPrevented=!1,this._preventTouchDragProcess=!1,this._mousePressed=!1,this._lastTouchEventTimeStamp=0,this._activeTouchId=null,this._acceptMouseLeave=!ya(),this._onFirefoxOutsideMouseUp=function(t){n._mouseUpHandler(t)},this._onMobileSafariDoubleClick=function(t){if(n._firesTouchEvents(t)){if(++n._tapCount,null!==n._tapTimeoutId&&n._tapCount>1){var e=n._mouseTouchMoveWithDownInfo(n._getCoordinate(t),n._tapCoordinate).manhattanDistance;e<30&&!n._cancelTap&&n._processEvent(n._makeCompatEvent(t),n._handler.doubleTapEvent),n._resetTapTimeout()}}else if(++n._clickCount,null!==n._clickTimeoutId&&n._clickCount>1){e=n._mouseTouchMoveWithDownInfo(n._getCoordinate(t),n._clickCoordinate).manhattanDistance;e<5&&!n._cancelClick&&n._processEvent(n._makeCompatEvent(t),n._handler.mouseDoubleClickEvent),n._resetClickTimeout()}},this._target=t,this._handler=e,this._options=i,this._init()}return t.prototype.destroy=function(){null!==this._unsubscribeOutsideMouseEvents&&(this._unsubscribeOutsideMouseEvents(),this._unsubscribeOutsideMouseEvents=null),null!==this._unsubscribeOutsideTouchEvents&&(this._unsubscribeOutsideTouchEvents(),this._unsubscribeOutsideTouchEvents=null),null!==this._unsubscribeMousemove&&(this._unsubscribeMousemove(),this._unsubscribeMousemove=null),null!==this._unsubscribeMouseWheel&&(this._unsubscribeMouseWheel(),this._unsubscribeMouseWheel=null),null!==this._unsubscribeContextMenu&&(this._unsubscribeContextMenu(),this._unsubscribeContextMenu=null),null!==this._unsubscribeRootMouseEvents&&(this._unsubscribeRootMouseEvents(),this._unsubscribeRootMouseEvents=null),null!==this._unsubscribeRootTouchEvents&&(this._unsubscribeRootTouchEvents(),this._unsubscribeRootTouchEvents=null),null!==this._unsubscribeMobileSafariEvents&&(this._unsubscribeMobileSafariEvents(),this._unsubscribeMobileSafariEvents=null),this._clearLongTapTimeout(),this._resetClickTimeout()},t.prototype._mouseEnterHandler=function(t){var e,i,n,a=this;null===(e=this._unsubscribeMousemove)||void 0===e||e.call(this),null===(i=this._unsubscribeMouseWheel)||void 0===i||i.call(this),null===(n=this._unsubscribeContextMenu)||void 0===n||n.call(this);var r=this._mouseMoveHandler.bind(this);this._unsubscribeMousemove=function(){a._target.removeEventListener("mousemove",r)},this._target.addEventListener("mousemove",r);var o=this._mouseWheelHandler.bind(this);this._unsubscribeMouseWheel=function(){a._target.removeEventListener("wheel",o)},this._target.addEventListener("wheel",o,{passive:!1});var s=this._contextMenuHandler.bind(this);this._unsubscribeContextMenu=function(){a._target.removeEventListener("contextmenu",s)},this._target.addEventListener("contextmenu",s,{passive:!1}),this._firesTouchEvents(t)||(this._processEvent(this._makeCompatEvent(t),this._handler.mouseEnterEvent),this._acceptMouseLeave=!0)},t.prototype._resetClickTimeout=function(){null!==this._clickTimeoutId&&clearTimeout(this._clickTimeoutId),this._clickCount=0,this._clickTimeoutId=null,this._clickCoordinate={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY}},t.prototype._resetTapTimeout=function(){null!==this._tapTimeoutId&&clearTimeout(this._tapTimeoutId),this._tapCount=0,this._tapTimeoutId=null,this._tapCoordinate={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY}},t.prototype._mouseMoveHandler=function(t){this._mousePressed||null!==this._touchMoveStartCoordinate||this._firesTouchEvents(t)||(this._processEvent(this._makeCompatEvent(t),this._handler.mouseMoveEvent),this._acceptMouseLeave=!0)},t.prototype._mouseWheelHandler=function(t){if(Math.abs(t.deltaX)>Math.abs(t.deltaY)){if(!At(this._handler.mouseWheelHortEvent))return;if(this._preventDefault(t),0===Math.abs(t.deltaX))return;this._handler.mouseWheelHortEvent(this._makeCompatEvent(t),-t.deltaX)}else{if(!At(this._handler.mouseWheelVertEvent))return;var e=-t.deltaY/100;if(0===e)return;switch(this._preventDefault(t),t.deltaMode){case t.DOM_DELTA_PAGE:e*=120;break;case t.DOM_DELTA_LINE:e*=32;break}if(0!==e){var i=Math.sign(e)*Math.min(1,Math.abs(e));this._handler.mouseWheelVertEvent(this._makeCompatEvent(t),i)}}},t.prototype._contextMenuHandler=function(t){this._preventDefault(t)},t.prototype._touchMoveHandler=function(t){var e=this._touchWithId(t.changedTouches,this._activeTouchId);if(null!==e&&(this._lastTouchEventTimeStamp=this._eventTimeStamp(t),null===this._startPinchMiddleCoordinate&&!this._preventTouchDragProcess)){this._pinchPrevented=!0;var i=this._mouseTouchMoveWithDownInfo(this._getCoordinate(e),this._touchMoveStartCoordinate),n=i.xOffset,a=i.yOffset,r=i.manhattanDistance;if(this._touchMoveExceededManhattanDistance||!(r<5)){if(!this._touchMoveExceededManhattanDistance){var o=.5*n,s=a>=o&&!this._options.treatVertDragAsPageScroll(),l=o>a&&!this._options.treatHorzDragAsPageScroll();s||l||(this._preventTouchDragProcess=!0),this._touchMoveExceededManhattanDistance=!0,this._cancelTap=!0,this._clearLongTapTimeout(),this._resetTapTimeout()}this._preventTouchDragProcess||this._processEvent(this._makeCompatEvent(t,e),this._handler.touchMoveEvent)}}},t.prototype._mouseMoveWithDownHandler=function(t){if(0===t.button){var e=this._mouseTouchMoveWithDownInfo(this._getCoordinate(t),this._mouseMoveStartCoordinate),i=e.manhattanDistance;i>=5&&(this._cancelClick=!0,this._resetClickTimeout()),this._cancelClick&&this._processEvent(this._makeCompatEvent(t),this._handler.pressedMouseMoveEvent)}},t.prototype._mouseTouchMoveWithDownInfo=function(t,e){var i=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y),a=i+n;return{xOffset:i,yOffset:n,manhattanDistance:a}},t.prototype._touchEndHandler=function(t){var e=this._touchWithId(t.changedTouches,this._activeTouchId);if(null===e&&0===t.touches.length&&(e=t.changedTouches[0]),null!==e){this._activeTouchId=null,this._lastTouchEventTimeStamp=this._eventTimeStamp(t),this._clearLongTapTimeout(),this._touchMoveStartCoordinate=null,null!==this._unsubscribeRootTouchEvents&&(this._unsubscribeRootTouchEvents(),this._unsubscribeRootTouchEvents=null);var i=this._makeCompatEvent(t,e);if(this._processEvent(i,this._handler.touchEndEvent),++this._tapCount,null!==this._tapTimeoutId&&this._tapCount>1){var n=this._mouseTouchMoveWithDownInfo(this._getCoordinate(e),this._tapCoordinate).manhattanDistance;n<30&&!this._cancelTap&&this._processEvent(i,this._handler.doubleTapEvent),this._resetTapTimeout()}else this._cancelTap||(this._processEvent(i,this._handler.tapEvent),At(this._handler.tapEvent)&&this._preventDefault(t));0===this._tapCount&&this._preventDefault(t),0===t.touches.length&&this._longTapActive&&(this._longTapActive=!1,this._preventDefault(t))}},t.prototype._mouseUpHandler=function(t){if(0===t.button){var e=this._makeCompatEvent(t);if(this._mouseMoveStartCoordinate=null,this._mousePressed=!1,null!==this._unsubscribeRootMouseEvents&&(this._unsubscribeRootMouseEvents(),this._unsubscribeRootMouseEvents=null),ma()){var i=this._target.ownerDocument.documentElement;i.removeEventListener("mouseleave",this._onFirefoxOutsideMouseUp)}if(!this._firesTouchEvents(t))if(this._processEvent(e,this._handler.mouseUpEvent),++this._clickCount,null!==this._clickTimeoutId&&this._clickCount>1){var n=this._mouseTouchMoveWithDownInfo(this._getCoordinate(t),this._clickCoordinate).manhattanDistance;n<5&&!this._cancelClick&&this._processEvent(e,this._handler.mouseDoubleClickEvent),this._resetClickTimeout()}else this._cancelClick||this._processEvent(e,this._handler.mouseClickEvent)}},t.prototype._clearLongTapTimeout=function(){null!==this._longTapTimeoutId&&(clearTimeout(this._longTapTimeoutId),this._longTapTimeoutId=null)},t.prototype._touchStartHandler=function(t){if(null===this._activeTouchId){var e=t.changedTouches[0];this._activeTouchId=e.identifier,this._lastTouchEventTimeStamp=this._eventTimeStamp(t);var i=this._target.ownerDocument.documentElement;this._cancelTap=!1,this._touchMoveExceededManhattanDistance=!1,this._preventTouchDragProcess=!1,this._touchMoveStartCoordinate=this._getCoordinate(e),null!==this._unsubscribeRootTouchEvents&&(this._unsubscribeRootTouchEvents(),this._unsubscribeRootTouchEvents=null);var n=this._touchMoveHandler.bind(this),a=this._touchEndHandler.bind(this);this._unsubscribeRootTouchEvents=function(){i.removeEventListener("touchmove",n),i.removeEventListener("touchend",a)},i.addEventListener("touchmove",n,{passive:!1}),i.addEventListener("touchend",a,{passive:!1}),this._clearLongTapTimeout(),this._longTapTimeoutId=setTimeout(this._longTapHandler.bind(this,t),500),this._processEvent(this._makeCompatEvent(t,e),this._handler.touchStartEvent),null===this._tapTimeoutId&&(this._tapCount=0,this._tapTimeoutId=setTimeout(this._resetTapTimeout.bind(this),500),this._tapCoordinate=this._getCoordinate(e))}},t.prototype._mouseDownHandler=function(t){if(2===t.button)return this._preventDefault(t),void this._processEvent(this._makeCompatEvent(t),this._handler.mouseRightClickEvent);if(0===t.button){var e=this._target.ownerDocument.documentElement;ma()&&e.addEventListener("mouseleave",this._onFirefoxOutsideMouseUp),this._cancelClick=!1,this._mouseMoveStartCoordinate=this._getCoordinate(t),null!==this._unsubscribeRootMouseEvents&&(this._unsubscribeRootMouseEvents(),this._unsubscribeRootMouseEvents=null);var i=this._mouseMoveWithDownHandler.bind(this),n=this._mouseUpHandler.bind(this);this._unsubscribeRootMouseEvents=function(){e.removeEventListener("mousemove",i),e.removeEventListener("mouseup",n)},e.addEventListener("mousemove",i),e.addEventListener("mouseup",n),this._mousePressed=!0,this._firesTouchEvents(t)||(this._processEvent(this._makeCompatEvent(t),this._handler.mouseDownEvent),null===this._clickTimeoutId&&(this._clickCount=0,this._clickTimeoutId=setTimeout(this._resetClickTimeout.bind(this),500),this._clickCoordinate=this._getCoordinate(t)))}},t.prototype._init=function(){var t=this;this._target.addEventListener("mouseenter",this._mouseEnterHandler.bind(this)),this._target.addEventListener("touchcancel",this._clearLongTapTimeout.bind(this));var e=this._target.ownerDocument,i=function(e){null!=t._handler.mouseDownOutsideEvent&&(e.composed&&t._target.contains(e.composedPath()[0])||null!==e.target&&t._target.contains(e.target)||t._handler.mouseDownOutsideEvent({x:0,y:0,pageX:0,pageY:0}))};this._unsubscribeOutsideTouchEvents=function(){e.removeEventListener("touchstart",i)},this._unsubscribeOutsideMouseEvents=function(){e.removeEventListener("mousedown",i)},e.addEventListener("mousedown",i),e.addEventListener("touchstart",i,{passive:!0}),ya()&&(this._unsubscribeMobileSafariEvents=function(){t._target.removeEventListener("dblclick",t._onMobileSafariDoubleClick)},this._target.addEventListener("dblclick",this._onMobileSafariDoubleClick)),this._target.addEventListener("mouseleave",this._mouseLeaveHandler.bind(this)),this._target.addEventListener("touchstart",this._touchStartHandler.bind(this),{passive:!0}),this._target.addEventListener("mousedown",function(t){if(1===t.button)return t.preventDefault(),!1}),this._target.addEventListener("mousedown",this._mouseDownHandler.bind(this)),this._initPinch(),this._target.addEventListener("touchmove",function(){},{passive:!1})},t.prototype._initPinch=function(){var t=this;(At(this._handler.pinchStartEvent)||At(this._handler.pinchEvent)||At(this._handler.pinchEndEvent))&&(this._target.addEventListener("touchstart",function(e){t._checkPinchState(e.touches)},{passive:!0}),this._target.addEventListener("touchmove",function(e){if(2===e.touches.length&&null!==t._startPinchMiddleCoordinate&&At(t._handler.pinchEvent)){var i=t._getTouchDistance(e.touches[0],e.touches[1]),n=i/t._startPinchDistance;t._handler.pinchEvent(K(K({},t._startPinchMiddleCoordinate),{pageX:0,pageY:0}),n),t._preventDefault(e)}},{passive:!1}),this._target.addEventListener("touchend",function(e){t._checkPinchState(e.touches)}))},t.prototype._checkPinchState=function(t){1===t.length&&(this._pinchPrevented=!1),2!==t.length||this._pinchPrevented||this._longTapActive?this._stopPinch():this._startPinch(t)},t.prototype._startPinch=function(t){var e,i=null!==(e=this._target.getBoundingClientRect())&&void 0!==e?e:{left:0,top:0};this._startPinchMiddleCoordinate={x:(t[0].clientX-i.left+(t[1].clientX-i.left))/2,y:(t[0].clientY-i.top+(t[1].clientY-i.top))/2},this._startPinchDistance=this._getTouchDistance(t[0],t[1]),At(this._handler.pinchStartEvent)&&this._handler.pinchStartEvent({x:0,y:0,pageX:0,pageY:0}),this._clearLongTapTimeout()},t.prototype._stopPinch=function(){null!==this._startPinchMiddleCoordinate&&(this._startPinchMiddleCoordinate=null,At(this._handler.pinchEndEvent)&&this._handler.pinchEndEvent({x:0,y:0,pageX:0,pageY:0}))},t.prototype._mouseLeaveHandler=function(t){var e,i,n;null===(e=this._unsubscribeMousemove)||void 0===e||e.call(this),null===(i=this._unsubscribeMouseWheel)||void 0===i||i.call(this),null===(n=this._unsubscribeContextMenu)||void 0===n||n.call(this),this._firesTouchEvents(t)||this._acceptMouseLeave&&(this._processEvent(this._makeCompatEvent(t),this._handler.mouseLeaveEvent),this._acceptMouseLeave=!ya())},t.prototype._longTapHandler=function(t){var e=this._touchWithId(t.touches,this._activeTouchId);null!==e&&(this._processEvent(this._makeCompatEvent(t,e),this._handler.longTapEvent),this._cancelTap=!0,this._longTapActive=!0)},t.prototype._firesTouchEvents=function(t){var e;return At(null===(e=t.sourceCapabilities)||void 0===e?void 0:e.firesTouchEvents)?t.sourceCapabilities.firesTouchEvents:this._eventTimeStamp(t)this._startScrollCoordinate.y-s.y){var d=s.x-this._startScrollCoordinate.x;c.getTimeScaleStore().scroll(d)}return!0;case Gi.X_AXIS:case Gi.Y_AXIS:var h=o.dispatchEvent("pressedMouseMoveEvent",s);return h&&(null===(n=s.preventDefault)||void 0===n||n.call(s),this._chart.updatePane(1)),h}}return!1},t.prototype.touchEndEvent=function(t){var e=this,i=this._findWidgetByEvent(t).widget;if(null!==i){var n=this._makeWidgetEvent(t,i),a=i.getName();switch(a){case Gi.MAIN:if(i.dispatchEvent("mouseUpEvent",n),null!==this._startScrollCoordinate){var r=(new Date).getTime()-this._flingStartTime,o=n.x-this._startScrollCoordinate.x,s=o/(r>0?r:1)*20;if(r<200&&Math.abs(s)>0){var l=this._chart.getChartStore().getTimeScaleStore(),c=function(){e._flingScrollRequestId=oe(function(){l.startScroll(),l.scroll(s),s*=.975,Math.abs(s)<1?null!==e._flingScrollRequestId&&(se(e._flingScrollRequestId),e._flingScrollRequestId=null):c()})};c()}}return!0;case Gi.X_AXIS:case Gi.Y_AXIS:var u=i.dispatchEvent("mouseUpEvent",n);u&&this._chart.updatePane(1)}}return!1},t.prototype.tapEvent=function(t){var e=this._findWidgetByEvent(t),i=e.pane,n=e.widget,a=!1;if(null!==n){var r=this._makeWidgetEvent(t,n),o=n.dispatchEvent("mouseClickEvent",r);if(n.getName()===Gi.MAIN){var s=this._makeWidgetEvent(t,n),l=this._chart.getChartStore(),c=l.getTooltipStore();o?(this._touchCancelCrosshair=!0,this._touchCoordinate=null,c.setCrosshair(void 0,{notInvalidate:!0}),a=!0):(this._touchCancelCrosshair||this._touchZoomed||(this._touchCoordinate={x:s.x,y:s.y},c.setCrosshair({x:s.x,y:s.y,paneId:null===i||void 0===i?void 0:i.getId()},{notInvalidate:!0}),a=!0),this._touchCancelCrosshair=!1)}(a||o)&&this._chart.updatePane(1)}return a},t.prototype.doubleTapEvent=function(t){return this.mouseDoubleClickEvent(t)},t.prototype.longTapEvent=function(t){var e=this._findWidgetByEvent(t),i=e.pane,n=e.widget;if(null!==n&&n.getName()===Gi.MAIN){var a=this._makeWidgetEvent(t,n);return this._touchCoordinate={x:a.x,y:a.y},this._chart.getChartStore().getTooltipStore().setCrosshair({x:a.x,y:a.y,paneId:null===i||void 0===i?void 0:i.getId()}),!0}return!1},t.prototype._findWidgetByEvent=function(t){var e,i,n,a,r=t.x,o=t.y,s=this._chart.getAllSeparatorPanes(),l=this._chart.getChartStore().getStyles().separator.size;try{for(var c=G(s),u=c.next();!u.done;u=c.next()){var d=Z(u.value,2),h=d[1],p=h.getBounding(),v=p.top-Math.round((Zi-l)/2);if(r>=p.left&&r<=p.left+p.width&&o>=v&&o<=v+Zi)return{pane:h,widget:h.getWidget()}}}catch(k){e={error:k}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(e)throw e.error}}var f=this._chart.getAllDrawPanes(),g=null;try{for(var m=G(f),y=m.next();!y.done;y=m.next()){var _=y.value;p=_.getBounding();if(r>=p.left&&r<=p.left+p.width&&o>=p.top&&o<=p.top+p.height){g=_;break}}}catch(I){n={error:I}}finally{try{y&&!y.done&&(a=m.return)&&a.call(m)}finally{if(n)throw n.error}}var b=null;if(null!==g){if(null===b){var x=g.getMainWidget(),w=x.getBounding();r>=w.left&&r<=w.left+w.width&&o>=w.top&&o<=w.top+w.height&&(b=x)}if(null===b){var S=g.getYAxisWidget();if(null!==S){var C=S.getBounding();r>=C.left&&r<=C.left+C.width&&o>=C.top&&o<=C.top+C.height&&(b=S)}}}return{pane:g,widget:b}},t.prototype._makeWidgetEvent=function(t,e){var i,n,a,r=null!==(i=null===e||void 0===e?void 0:e.getBounding())&&void 0!==i?i:null;return K(K({},t),{x:t.x-(null!==(n=null===r||void 0===r?void 0:r.left)&&void 0!==n?n:0),y:t.y-(null!==(a=null===r||void 0===r?void 0:r.top)&&void 0!==a?a:0)})},t.prototype.destroy=function(){this._container.removeEventListener("keydown",this._boundKeyBoardDownEvent),this._event.destroy()},t}();(function(t){t["Root"]="root",t["Main"]="main",t["YAxis"]="yAxis"})(_a||(_a={}));var Sa=function(){function t(t,e){this._drawPanes=[],this._separatorPanes=new Map,this._initContainer(t),this._chartEvent=new wa(this._chartContainer,this),this._chartStore=new Ui(this,e),this._initPanes(e),this.adjustPaneViewport(!0,!0,!0)}return t.prototype._initContainer=function(t){this._container=t,this._chartContainer=he("div",{position:"relative",width:"100%",outline:"none",borderStyle:"none",cursor:"crosshair",boxSizing:"border-box",userSelect:"none",webkitUserSelect:"none",msUserSelect:"none",MozUserSelect:"none",webkitTapHighlightColor:"transparent"}),this._chartContainer.tabIndex=1,t.appendChild(this._chartContainer)},t.prototype._initPanes=function(t){var e,i=this,n=null!==(e=null===t||void 0===t?void 0:t.layout)&&void 0!==e?e:[{type:"candle"}],a=!1,r=!1,o=function(t){if(!r){var e=i._createPane(pa,Wi.X_AXIS,null!==t&&void 0!==t?t:{});i._xAxisPane=e,r=!0}};n.forEach(function(t){var e,n,r;switch(t.type){case"candle":if(!a){var s=null!==(e=t.options)&&void 0!==e?e:{};wt(s,{id:Wi.CANDLE}),i._candlePane=i._createPane(aa,Wi.CANDLE,s);var l=null!==(n=t.content)&&void 0!==n?n:[];l.forEach(function(t){i.createIndicator(t,!0,s)}),a=!0}break;case"indicator":var c;l=null!==(r=t.content)&&void 0!==r?r:[];if(l.length>0)l.forEach(function(e){At(c)?i.createIndicator(e,!0,{id:c}):c=i.createIndicator(e,!0,t.options)});break;case"xAxis":o(t.options);break}}),o({position:"bottom"})},t.prototype._createPane=function(t,e,i){var n,a=null,r=null,o=null===i||void 0===i?void 0:i.position;switch(o){case"top":var s=this._drawPanes[0];At(s)&&(r=new t(this._chartContainer,s.getContainer(),this,e,null!==i&&void 0!==i?i:{}),a=0);break;case"bottom":break;default:for(var l=this._drawPanes.length-1;l>-1;l--){var c=this._drawPanes[l],u=this._drawPanes[l-1];if("bottom"===(null===c||void 0===c?void 0:c.getOptions().position)&&"bottom"!==(null===u||void 0===u?void 0:u.getOptions().position)){r=new t(this._chartContainer,c.getContainer(),this,e,null!==i&&void 0!==i?i:{}),a=l;break}}}if(At(r)||(r=new t(this._chartContainer,null,this,e,null!==i&&void 0!==i?i:{})),Et(a)?(this._drawPanes.splice(a,0,r),n=a):(this._drawPanes.push(r),n=this._drawPanes.length-1),r.getId()!==Wi.X_AXIS){var d=this._drawPanes[n+1];if(At(d)&&d.getId()===Wi.X_AXIS&&(d=this._drawPanes[n+2]),At(d)){var h=this._separatorPanes.get(d);At(h)?h.setTopPane(r):(h=new ga(this._chartContainer,d.getContainer(),this,"",r,d),this._separatorPanes.set(d,h))}var p=this._drawPanes[n-1];if(At(p)&&p.getId()===Wi.X_AXIS&&(p=this._drawPanes[n-2]),At(p)){h=new ga(this._chartContainer,r.getContainer(),this,"",p,r);this._separatorPanes.set(r,h)}}return r},t.prototype._measurePaneHeight=function(){var t,e=this,i=Math.floor(this._container.clientHeight),n=this._chartStore.getStyles().separator.size,a=this._xAxisPane.getAxisComponent().getAutoSize(),r=i-a-this._separatorPanes.size*n;r<0&&(r=0);var o=0;this._drawPanes.forEach(function(t){if(t.getId()!==Wi.CANDLE&&t.getId()!==Wi.X_AXIS){var e=t.getBounding().height,i=t.getOptions().minHeight;er?(o=r,e=Math.max(r-o,0)):o+=e,t.setBounding({height:e})}});var s=r-o;null===(t=this._candlePane)||void 0===t||t.setBounding({height:s}),this._xAxisPane.setBounding({height:a});var l=0;this._drawPanes.forEach(function(t){var i=e._separatorPanes.get(t);At(i)&&(i.setBounding({height:n,top:l}),l+=n),t.setBounding({top:l}),l+=t.getBounding().height})},t.prototype._measurePaneWidth=function(){var t=this,e=Math.floor(this._container.clientWidth),i=this._chartStore.getStyles(),n=i.yAxis,a=n.position===Y.Left,r=!n.inside,o=0,s=0,l=0,c=0;this._drawPanes.forEach(function(t){t.getId()!==Wi.X_AXIS&&(s=Math.max(s,t.getAxisComponent().getAutoSize()))}),s>e&&(s=e),r?(o=e-s,a?(l=0,c=s):(l=e-s,c=0)):(o=e,c=0,l=a?0:e-s),this._chartStore.getTimeScaleStore().setTotalBarSpace(o);var u,d={width:e},h={width:o,left:c},p={width:s,left:l},v=i.separator.fill;u=r&&!v?h:d,this._drawPanes.forEach(function(e){var i;null===(i=t._separatorPanes.get(e))||void 0===i||i.setBounding(u),e.setBounding(d,h,p)})},t.prototype._setPaneOptions=function(t,e){var i,n;if(Mt(t.id)){var a=this.getDrawPaneById(t.id),r=!1;if(null!==a){var o=e;if(t.id!==Wi.CANDLE&&Et(t.height)&&t.height>0){var s=Math.max(null!==(i=t.minHeight)&&void 0!==i?i:a.getOptions().minHeight,0),l=Math.max(s,t.height);a.setBounding({height:l}),o=!0,r=!0}(Mt(null===(n=t.axisOptions)||void 0===n?void 0:n.name)||At(t.gap))&&(o=!0),a.setOptions(t),o&&this.adjustPaneViewport(r,!0,!0,!0,!0)}}},t.prototype.getDrawPaneById=function(t){if(t===Wi.CANDLE)return this._candlePane;if(t===Wi.X_AXIS)return this._xAxisPane;var e=this._drawPanes.find(function(e){return e.getId()===t});return null!==e&&void 0!==e?e:null},t.prototype.getContainer=function(){return this._container},t.prototype.getChartStore=function(){return this._chartStore},t.prototype.getXAxisPane=function(){return this._xAxisPane},t.prototype.getAllDrawPanes=function(){return this._drawPanes},t.prototype.getAllSeparatorPanes=function(){return this._separatorPanes},t.prototype.adjustPaneViewport=function(t,e,i,n,a){t&&this._measurePaneHeight();var r=e,o=null!==n&&void 0!==n&&n,s=null!==a&&void 0!==a&&a;(o||s)&&this._drawPanes.forEach(function(t){var e=t.getAxisComponent().buildTicks(s);r||(r=e)}),r&&this._measurePaneWidth(),null!==i&&void 0!==i&&i&&(this._xAxisPane.getAxisComponent().buildTicks(!0),this.updatePane(4))},t.prototype.updatePane=function(t,e){if(At(e)){var i=this.getDrawPaneById(e);null===i||void 0===i||i.update(t)}else this._separatorPanes.forEach(function(e){e.update(t)}),this._drawPanes.forEach(function(e){e.update(t)})},t.prototype.crosshairChange=function(t){var e=this,i=this._chartStore.getActionStore();if(i.has(Tt.OnCrosshairChange)){var n={};this._drawPanes.forEach(function(i){var a=i.getId(),r={},o=e._chartStore.getIndicatorStore().getInstances(a);o.forEach(function(e){var i,n=e.result;r[e.name]=n[null!==(i=t.dataIndex)&&void 0!==i?i:n.length-1]}),n[a]=r}),Mt(t.paneId)&&i.execute(Tt.OnCrosshairChange,K(K({},t),{indicatorData:n}))}},t.prototype.getDom=function(t,e){var i,n;if(!Mt(t))return this._chartContainer;var a=this.getDrawPaneById(t);if(null!==a){var r=null!==e&&void 0!==e?e:_a.Root;switch(r){case _a.Root:return a.getContainer();case _a.Main:return a.getMainWidget().getContainer();case _a.YAxis:return null!==(n=null===(i=a.getYAxisWidget())||void 0===i?void 0:i.getContainer())&&void 0!==n?n:null}}return null},t.prototype.getSize=function(t,e){var i,n;if(!At(t))return{width:Math.floor(this._chartContainer.clientWidth),height:Math.floor(this._chartContainer.clientHeight),left:0,top:0,right:0,bottom:0};var a=this.getDrawPaneById(t);if(null!==a){var r=null!==e&&void 0!==e?e:_a.Root;switch(r){case _a.Root:return a.getBounding();case _a.Main:return a.getMainWidget().getBounding();case _a.YAxis:return null!==(n=null===(i=a.getYAxisWidget())||void 0===i?void 0:i.getBounding())&&void 0!==n?n:null}}return null},t.prototype.setStyles=function(t){var e,i,n;this._chartStore.setOptions({styles:t}),n=Mt(t)?ji(t):t,At(null===(e=null===n||void 0===n?void 0:n.yAxis)||void 0===e?void 0:e.type)&&(null===(i=this._candlePane)||void 0===i||i.getAxisComponent().setAutoCalcTickFlag(!0)),this.adjustPaneViewport(!0,!0,!0,!0,!0)},t.prototype.getStyles=function(){return this._chartStore.getStyles()},t.prototype.setLocale=function(t){this._chartStore.setOptions({locale:t}),this.adjustPaneViewport(!0,!0,!0,!0,!0)},t.prototype.getLocale=function(){return this._chartStore.getLocale()},t.prototype.setCustomApi=function(t){this._chartStore.setOptions({customApi:t}),this.adjustPaneViewport(!0,!0,!0,!0,!0)},t.prototype.setPriceVolumePrecision=function(t,e){this._chartStore.setPrecision({price:t,volume:e})},t.prototype.getPriceVolumePrecision=function(){return this._chartStore.getPrecision()},t.prototype.setTimezone=function(t){this._chartStore.setOptions({timezone:t}),this._xAxisPane.getAxisComponent().buildTicks(!0),this._xAxisPane.update(3)},t.prototype.getTimezone=function(){return this._chartStore.getTimeScaleStore().getTimezone()},t.prototype.setOffsetRightDistance=function(t){this._chartStore.getTimeScaleStore().setOffsetRightDistance(t,!0)},t.prototype.getOffsetRightDistance=function(){return this._chartStore.getTimeScaleStore().getOffsetRightDistance()},t.prototype.setMaxOffsetLeftDistance=function(t){t<0?_t("setMaxOffsetLeftDistance","distance","distance must greater than zero!!!"):this._chartStore.getTimeScaleStore().setMaxOffsetLeftDistance(t)},t.prototype.setMaxOffsetRightDistance=function(t){t<0?_t("setMaxOffsetRightDistance","distance","distance must greater than zero!!!"):this._chartStore.getTimeScaleStore().setMaxOffsetRightDistance(t)},t.prototype.setLeftMinVisibleBarCount=function(t){t<0?_t("setLeftMinVisibleBarCount","barCount","barCount must greater than zero!!!"):this._chartStore.getTimeScaleStore().setLeftMinVisibleBarCount(Math.ceil(t))},t.prototype.setRightMinVisibleBarCount=function(t){t<0?_t("setRightMinVisibleBarCount","barCount","barCount must greater than zero!!!"):this._chartStore.getTimeScaleStore().setRightMinVisibleBarCount(Math.ceil(t))},t.prototype.setBarSpace=function(t){this._chartStore.getTimeScaleStore().setBarSpace(t)},t.prototype.getBarSpace=function(){return this._chartStore.getTimeScaleStore().getBarSpace().bar},t.prototype.getVisibleRange=function(){return this._chartStore.getTimeScaleStore().getVisibleRange()},t.prototype.clearData=function(){this._chartStore.clear()},t.prototype.getDataList=function(){return this._chartStore.getDataList()},t.prototype.applyNewData=function(t,e,i){At(i)&&_t("applyNewData","","param `callback` has been deprecated since version 9.8.0, use `subscribeAction('onDataReady')` instead."),this._chartStore.addData(t,Yt.Init,e).then(function(){}).catch(function(){}).finally(function(){null===i||void 0===i||i()})},t.prototype.applyMoreData=function(t,e,i){_t("","","Api `applyMoreData` has been deprecated since version 9.8.0."),this._chartStore.addData(t,Yt.Forward,null===e||void 0===e||e).then(function(){}).catch(function(){}).finally(function(){null===i||void 0===i||i()})},t.prototype.updateData=function(t,e){At(e)&&_t("updateData","","param `callback` has been deprecated since version 9.8.0, use `subscribeAction('onDataReady')` instead."),this._chartStore.addData(t).then(function(){}).catch(function(){}).finally(function(){null===e||void 0===e||e()})},t.prototype.loadMore=function(t){_t("","","Api `loadMore` has been deprecated since version 9.8.0, use `setLoadDataCallback` instead."),this._chartStore.setLoadMoreCallback(t)},t.prototype.setLoadDataCallback=function(t){this._chartStore.setLoadDataCallback(t)},t.prototype.createIndicator=function(t,e,i,n){var a,r=this,o=Mt(t)?{name:t}:t;if(null===ri(o.name))return _t("createIndicator","value","indicator not supported, you may need to use registerIndicator to add one!!!"),null;var s=null===i||void 0===i?void 0:i.id,l=this.getDrawPaneById(null!==s&&void 0!==s?s:"");if(null!==l)this._chartStore.getIndicatorStore().addInstance(o,null!==s&&void 0!==s?s:"",null!==e&&void 0!==e&&e).then(function(t){var e;r._setPaneOptions(null!==i&&void 0!==i?i:{},null!==(e=l.getAxisComponent().buildTicks(!0))&&void 0!==e&&e)}).catch(function(t){});else{null!==s&&void 0!==s||(s=de(Wi.INDICATOR));var c=this._createPane(na,s,null!==i&&void 0!==i?i:{}),u=null!==(a=null===i||void 0===i?void 0:i.height)&&void 0!==a?a:Vi;c.setBounding({height:u}),this._chartStore.getIndicatorStore().addInstance(o,s,null!==e&&void 0!==e&&e).finally(function(){r.adjustPaneViewport(!0,!0,!0,!0,!0),null===n||void 0===n||n()})}return null!==s&&void 0!==s?s:null},t.prototype.overrideIndicator=function(t,e,i){var n=this;this._chartStore.getIndicatorStore().override(t,null!==e&&void 0!==e?e:null).then(function(t){var e=Z(t,2),a=e[0],r=e[1];(a||r)&&(n.adjustPaneViewport(!1,r,!0,r),null===i||void 0===i||i())}).catch(function(){})},t.prototype.getIndicatorByPaneId=function(t,e){return this._chartStore.getIndicatorStore().getInstanceByPaneId(t,e)},t.prototype.removeIndicator=function(t,e){var i,n,a,r=this._chartStore.getIndicatorStore(),o=r.removeInstance(t,e);if(o){var s=!1;if(t!==Wi.CANDLE&&!r.hasInstances(t)){var l=this.getDrawPaneById(t),c=this._drawPanes.findIndex(function(e){return e.getId()===t});if(null!==l){s=!0;var u=this._separatorPanes.get(l);if(At(u)){var d=null===u||void 0===u?void 0:u.getTopPane();try{for(var h=G(this._separatorPanes),p=h.next();!p.done;p=h.next()){var v=p.value;if(v[1].getTopPane().getId()===l.getId()){v[1].setTopPane(d);break}}}catch(g){i={error:g}}finally{try{p&&!p.done&&(n=h.return)&&n.call(h)}finally{if(i)throw i.error}}u.destroy(),this._separatorPanes.delete(l)}this._drawPanes.splice(c,1),l.destroy();var f=this._drawPanes[0];At(f)&&f.getId()===Wi.X_AXIS&&(f=this._drawPanes[1]),null===(a=this._separatorPanes.get(f))||void 0===a||a.destroy(),this._separatorPanes.delete(f)}}this.adjustPaneViewport(s,!0,!0,!0,!0)}},t.prototype.createOverlay=function(t,e){var i=[];if(Mt(t))i=[{name:t}];else if(Ct(t))i=t.map(function(t){return Mt(t)?{name:t}:t});else{var n=t;i=[n]}var a=!0;At(e)&&null!==this.getDrawPaneById(e)||(e=Wi.CANDLE,a=!1);var r=this._chartStore.getOverlayStore().addInstances(i,e,a);return Ct(t)?r:r[0]},t.prototype.getOverlayById=function(t){return this._chartStore.getOverlayStore().getInstanceById(t)},t.prototype.overrideOverlay=function(t){this._chartStore.getOverlayStore().override(t)},t.prototype.removeOverlay=function(t){var e;At(t)&&(e=Mt(t)?{id:t}:t),this._chartStore.getOverlayStore().removeInstance(e)},t.prototype.setPaneOptions=function(t){this._setPaneOptions(t,!1)},t.prototype.setZoomEnabled=function(t){this._chartStore.getTimeScaleStore().setZoomEnabled(t)},t.prototype.isZoomEnabled=function(){return this._chartStore.getTimeScaleStore().getZoomEnabled()},t.prototype.setScrollEnabled=function(t){this._chartStore.getTimeScaleStore().setScrollEnabled(t)},t.prototype.isScrollEnabled=function(){return this._chartStore.getTimeScaleStore().getScrollEnabled()},t.prototype.scrollByDistance=function(t,e){var i=Et(e)&&e>0?e:0,n=this._chartStore.getTimeScaleStore();if(n.startScroll(),i>0){var a=new le({duration:i});a.doFrame(function(e){var a=t*(e/i);n.scroll(a)}),a.start()}else n.scroll(t)},t.prototype.scrollToRealTime=function(t){var e=this._chartStore.getTimeScaleStore(),i=e.getBarSpace().bar,n=e.getLastBarRightSideDiffBarCount()-e.getInitialOffsetRightDistance()/i,a=n*i;this.scrollByDistance(a,t)},t.prototype.scrollToDataIndex=function(t,e){var i=this._chartStore.getTimeScaleStore(),n=(i.getLastBarRightSideDiffBarCount()+(this.getDataList().length-1-t))*i.getBarSpace().bar;this.scrollByDistance(n,e)},t.prototype.scrollToTimestamp=function(t,e){var i=pe(this.getDataList(),"timestamp",t);this.scrollToDataIndex(i,e)},t.prototype.zoomAtCoordinate=function(t,e,i){var n=Et(i)&&i>0?i:0,a=this._chartStore.getTimeScaleStore(),r=a.getBarSpace().bar,o=r*t,s=o-r;if(n>0){var l=0,c=new le({duration:n});c.doFrame(function(t){var i=s*(t/n),r=(i-l)/a.getBarSpace().bar*ke;a.zoom(r,e),l=i}),c.start()}else a.zoom(s/r*ke,e)},t.prototype.zoomAtDataIndex=function(t,e,i){var n=this._chartStore.getTimeScaleStore().dataIndexToCoordinate(e);this.zoomAtCoordinate(t,{x:n,y:0},i)},t.prototype.zoomAtTimestamp=function(t,e,i){var n=pe(this.getDataList(),"timestamp",e);this.zoomAtDataIndex(t,n,i)},t.prototype.convertToPixel=function(t,e){var i,n=e.paneId,a=void 0===n?Wi.CANDLE:n,r=e.absolute,o=void 0!==r&&r,s=[];if(a!==Wi.X_AXIS){var l=this.getDrawPaneById(a);if(null!==l){var c=this._chartStore.getTimeScaleStore(),u=l.getBounding(),d=(new Array).concat(t),h=this._xAxisPane.getAxisComponent(),p=l.getAxisComponent();s=d.map(function(t){var e={},i=t.dataIndex;if(Et(t.timestamp)&&(i=c.timestampToDataIndex(t.timestamp)),Et(i)&&(e.x=null===h||void 0===h?void 0:h.convertToPixel(i)),Et(t.value)){var n=null===p||void 0===p?void 0:p.convertToPixel(t.value);e.y=o?u.top+n:n}return e})}}return Ct(t)?s:null!==(i=s[0])&&void 0!==i?i:{}},t.prototype.convertFromPixel=function(t,e){var i,n=e.paneId,a=void 0===n?Wi.CANDLE:n,r=e.absolute,o=void 0!==r&&r,s=[];if(a!==Wi.X_AXIS){var l=this.getDrawPaneById(a);if(null!==l){var c=this._chartStore.getTimeScaleStore(),u=l.getBounding(),d=(new Array).concat(t),h=this._xAxisPane.getAxisComponent(),p=l.getAxisComponent();s=d.map(function(t){var e,i,n={};if(Et(t.x)){var a=null!==(e=null===h||void 0===h?void 0:h.convertFromPixel(t.x))&&void 0!==e?e:-1;n.dataIndex=a,n.timestamp=null!==(i=c.dataIndexToTimestamp(a))&&void 0!==i?i:void 0}if(Et(t.y)){var r=o?t.y-u.top:t.y;n.value=p.convertFromPixel(r)}return n})}}return Ct(t)?s:null!==(i=s[0])&&void 0!==i?i:{}},t.prototype.executeAction=function(t,e){var i;switch(t){case Tt.OnCrosshairChange:var n=K({},e);n.paneId=null!==(i=n.paneId)&&void 0!==i?i:Wi.CANDLE,this._chartStore.getTooltipStore().setCrosshair(n,{notExecuteAction:!0});break}},t.prototype.subscribeAction=function(t,e){this._chartStore.getActionStore().subscribe(t,e)},t.prototype.unsubscribeAction=function(t,e){this._chartStore.getActionStore().unsubscribe(t,e)},t.prototype.getConvertPictureUrl=function(t,e,i){var n=this,a=this._chartContainer.clientWidth,r=this._chartContainer.clientHeight,o=he("canvas",{width:"".concat(a,"px"),height:"".concat(r,"px"),boxSizing:"border-box"}),s=o.getContext("2d"),l=Wt(o);o.width=a*l,o.height=r*l,s.scale(l,l),s.fillStyle=null!==i&&void 0!==i?i:"#FFFFFF",s.fillRect(0,0,a,r);var c=null!==t&&void 0!==t&&t;return this._drawPanes.forEach(function(t){var e=n._separatorPanes.get(t);if(At(e)){var i=e.getBounding();s.drawImage(e.getImage(c),i.left,i.top,i.width,i.height)}var r=t.getBounding();s.drawImage(t.getImage(c),0,r.top,a,r.height)}),o.toDataURL("image/".concat(null!==e&&void 0!==e?e:"jpeg"))},t.prototype.resize=function(){this.adjustPaneViewport(!0,!0,!0,!0,!0)},t.prototype.destroy=function(){this._chartEvent.destroy(),this._drawPanes.forEach(function(t){t.destroy()}),this._drawPanes=[],this._separatorPanes.forEach(function(t){t.destroy()}),this._separatorPanes.clear(),this._container.removeChild(this._chartContainer)},t}(),Ca=new Map,ka=1;function Ia(t,e){var i;if(xt(),i=Mt(t)?document.getElementById(t):t,null===i)return bt("","","The chart cannot be initialized correctly. Please check the parameters. The chart container cannot be null and child elements need to be added!!!"),null;var n=Ca.get(i.id);if(At(n))return _t("","","The chart has been initialized on the dom!!!"),n;var a="k_line_chart_".concat(ka++);return n=new Sa(i,e),n.id=a,i.setAttribute("k-line-chart-id",a),Ca.set(a,n),n}var Ea=i(21396),Aa=i.n(Ea);function Pa(t,e,i,n){if(!t||!e||!i||!n)return t;try{var a=Aa().enc.Base64.parse(t),r=Aa().lib.WordArray.create(a.words.slice(0,4)),o=Aa().lib.WordArray.create(a.words.slice(4)),s=Aa().enc.Base64.parse(n),l=Aa().AES.decrypt({ciphertext:o},s,{iv:r,mode:Aa().mode.CBC,padding:Aa().pad.Pkcs7}),c=l.toString(Aa().enc.Utf8);return c||t}catch(u){return t}}function Ma(t,e){return Da.apply(this,arguments)}function Da(){return Da=(0,c.A)((0,l.A)().m(function t(e,i){var n,a;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e&&i){t.n=1;break}throw new Error("用户ID和指标ID不能为空");case 1:return t.p=1,t.n=2,(0,v.Ay)({url:"/api/indicator/getDecryptKey",method:"post",data:{userid:e,indicatorId:i}});case 2:if(n=t.v,1!==n.code||!n.data||!n.data.key){t.n=3;break}return t.a(2,n.data.key);case 3:throw new Error(n.msg||"获取解密密钥失败");case 4:t.n=6;break;case 5:throw t.p=5,a=t.v,new Error("无法获取解密密钥,请检查网络连接或联系管理员: "+(a.message||"未知错误"));case 6:return t.a(2)}},t,null,[[1,5]])})),Da.apply(this,arguments)}function Ta(t,e,i){return Ba.apply(this,arguments)}function Ba(){return Ba=(0,c.A)((0,l.A)().m(function t(e,i,n){var a;return(0,l.A)().w(function(t){while(1)switch(t.n){case 0:return t.n=1,Ma(i,n);case 1:return a=t.v,t.a(2,Pa(e,i,n,a))}},t)})),Ba.apply(this,arguments)}function Fa(t,e){if(1===e||!0===e)return!0;if(t&&t.length>100)try{var i=atob(t);if(i.length>50)return!0}catch(n){}return!1}var Ra={name:"KlineChart",props:{symbol:{type:String,default:""},market:{type:String,default:""},timeframe:{type:String,default:"1H"},theme:{type:String,default:"light"},activeIndicators:{type:Array,default:function(){return[]}},realtimeEnabled:{type:Boolean,default:!1},userId:{type:Number,default:null}},emits:["retry","price-change","load","indicator-toggle"],setup:function(t,e){var i=e.emit,n=(0,h.IJ)([]),a=(0,h.KR)(!1),r=(0,h.KR)(null),s=(0,h.KR)(!1),u=(0,h.KR)(!0),p=null,f=(0,h.KR)(!1),g=(0,h.IJ)(null),m=(0,h.KR)(t.theme||"light"),y=(0,h.KR)(null),b=(0,h.KR)(5e3),x=(0,h.KR)(!1),w=(0,h.KR)(1e4),S=(0,h.KR)(0),C=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(g.value){var e=Date.now(),i=Number(w.value||1e4);(t||!S.value||e-S.value>=i)&&(S.value=e,xt())}},k=(0,h.KR)([]),I=(0,h.KR)([]),E=(0,h.KR)([]),A=(0,h.KR)(null),P=(0,h.nI)(),M=P.proxy,D=(0,h.EW)(function(){return[{name:"line",title:M.$t("dashboard.indicator.drawing.line"),icon:"line"},{name:"horizontalLine",title:M.$t("dashboard.indicator.drawing.horizontalLine"),icon:"minus"},{name:"verticalLine",title:M.$t("dashboard.indicator.drawing.verticalLine"),icon:"column-width"},{name:"ray",title:M.$t("dashboard.indicator.drawing.ray"),icon:"arrow-right"},{name:"straightLine",title:M.$t("dashboard.indicator.drawing.straightLine"),icon:"menu"},{name:"parallelStraightLine",title:M.$t("dashboard.indicator.drawing.parallelLine"),icon:"menu"},{name:"priceLine",title:M.$t("dashboard.indicator.drawing.priceLine"),icon:"dollar"},{name:"priceChannelLine",title:M.$t("dashboard.indicator.drawing.priceChannel"),icon:"border"},{name:"fibonacciLine",title:M.$t("dashboard.indicator.drawing.fibonacciLine"),icon:"rise"},{name:"measure",title:M.$t("dashboard.indicator.drawing.measure"),icon:"drag"}]}),R=(0,h.KR)([{id:"sma",name:"SMA (简单移动平均)",shortName:"SMA",type:"line",defaultParams:{length:20}},{id:"ema",name:"EMA (指数移动平均)",shortName:"EMA",type:"line",defaultParams:{length:20}},{id:"rsi",name:"RSI (相对强弱)",shortName:"RSI",type:"line",defaultParams:{length:14}},{id:"macd",name:"MACD",shortName:"MACD",type:"macd",defaultParams:{fast:12,slow:26,signal:9}},{id:"bb",name:"布林带 (Bollinger Bands)",shortName:"BB",type:"band",defaultParams:{length:20,mult:2}},{id:"atr",name:"ATR (平均真实波幅)",shortName:"ATR",type:"line",defaultParams:{period:14}},{id:"cci",name:"CCI (商品通道指数)",shortName:"CCI",type:"line",defaultParams:{length:20}},{id:"williams",name:"Williams %R (威廉指标)",shortName:"W%R",type:"line",defaultParams:{length:14}},{id:"mfi",name:"MFI (资金流量指标)",shortName:"MFI",type:"line",defaultParams:{length:14}},{id:"adx",name:"ADX (平均趋向指数)",shortName:"ADX",type:"adx",defaultParams:{length:14}},{id:"obv",name:"OBV (能量潮)",shortName:"OBV",type:"line",defaultParams:{}},{id:"adosc",name:"ADOSC (积累/派发振荡器)",shortName:"ADOSC",type:"line",defaultParams:{fast:3,slow:10}},{id:"ad",name:"AD (积累/派发线)",shortName:"AD",type:"line",defaultParams:{}},{id:"kdj",name:"KDJ (随机指标)",shortName:"KDJ",type:"line",defaultParams:{period:9,k:3,d:3}}]),L=function(e){return t.activeIndicators.some(function(t){return t.id===e})},N=function(t){if(g.value){var e={line:"segment",horizontalLine:"horizontalStraightLine",verticalLine:"verticalStraightLine",ray:"rayLine",straightLine:"straightLine",parallelStraightLine:"parallelStraightLine",priceLine:"priceLine",priceChannelLine:"priceChannelLine",fibonacciLine:"fibonacciLine",measure:"priceRangeMeasure"},i=e[t]||t;if(A.value!==t){A.value=t;try{var n=["priceRangeMeasure"];if(n.includes(i)){if("function"!==typeof g.value.overrideOverlay)return void(A.value=null);g.value.overrideOverlay({name:i,lock:!1})}else{var a={name:i,lock:!1,extendData:{isDrawing:!0}},r=g.value.createOverlay(a);r?E.value.push(r):A.value=null}}catch(o){A.value=null}}else{A.value=null;try{"function"===typeof g.value.overrideOverlay&&g.value.overrideOverlay(null)}catch(s){}}}},O=function(){if(g.value)try{E.value.forEach(function(t){try{"function"===typeof g.value.removeOverlay?g.value.removeOverlay(t):"function"===typeof g.value.removeOverlayById&&g.value.removeOverlayById(t)}catch(e){}}),E.value=[],A.value=null,"function"===typeof g.value.overrideOverlay&&g.value.overrideOverlay(null)}catch(t){}},z=function(t){var e=L(t.id);if(e)i("indicator-toggle",{action:"remove",indicator:{id:t.id}});else{var n=(0,d.A)((0,d.A)({},t),{},{params:(0,d.A)({},t.defaultParams),calculate:null});i("indicator-toggle",{action:"add",indicator:n})}},V=(0,h.KR)(null),W=(0,h.KR)(!1),H=(0,h.KR)(!1),$=(0,h.KR)(!1),Y=(0,h.EW)(function(){return"dark"===m.value?{backgroundColor:"#141414",textColor:"#d1d4dc",textColorSecondary:"#787b86",borderColor:"#2a2a2a",gridLineColor:"#252525",gridLineColorDashed:"#363c4e",tooltipBg:"rgba(25, 27, 32, 0.95)",tooltipBorder:"#333",tooltipText:"#ccc",tooltipTextSecondary:"#888",axisLabelColor:"#787b86",splitAreaColor:["rgba(250,250,250,0.05)","rgba(200,200,200,0.02)"],dataZoomBorder:"#2a2a2a",dataZoomFiller:"rgba(41, 98, 255, 0.15)",dataZoomHandle:"#13c2c2",dataZoomText:"transparent",dataZoomBg:"#252525"}:{backgroundColor:"#fff",textColor:"#333",textColorSecondary:"#666",borderColor:"#e8e8e8",gridLineColor:"#e8e8e8",gridLineColorDashed:"#e8e8e8",tooltipBg:"rgba(255, 255, 255, 0.95)",tooltipBorder:"#e8e8e8",tooltipText:"#333",tooltipTextSecondary:"#666",axisLabelColor:"#666",splitAreaColor:["rgba(250,250,250,0.05)","rgba(200,200,200,0.02)"],dataZoomBorder:"#e8e8e8",dataZoomFiller:"rgba(24, 144, 255, 0.15)",dataZoomHandle:"#1890ff",dataZoomText:"#999",dataZoomBg:"#f0f2f5"}}),X=function(t){return"dark"===m.value?["#13c2c2","#e040fb","#ffeb3b","#00e676","#ff6d00","#9c27b0"][t%6]:["#13c2c2","#9c27b0","#f57c00","#1976d2","#c2185b","#7b1fa2"][t%6]},K=function(){return new Promise(function(t,e){if(window.pyodide)return V.value=window.pyodide,H.value=!0,void t(window.pyodide);W.value=!0;var i="0.25.0",n=function(t){return t&&t.endsWith("/")?t:t?t+"/":t},a="/assets/pyodide/v".concat(i,"/full/"),r="https://cdn.jsdelivr.net/pyodide/v".concat(i,"/full/"),o=n({NODE_ENV:"production",VUE_APP_API_BASE_URL:"/api",VUE_APP_PREVIEW:"false",BASE_URL:"/"}.VUE_APP_PYODIDE_LOCAL_BASE||a),s=n({NODE_ENV:"production",VUE_APP_API_BASE_URL:"/api",VUE_APP_PREVIEW:"false",BASE_URL:"/"}.VUE_APP_PYODIDE_CDN_BASE||r),u=({NODE_ENV:"production",VUE_APP_API_BASE_URL:"/api",VUE_APP_PREVIEW:"false",BASE_URL:"/"}.VUE_APP_PYODIDE_PREFER_CDN||"").toString().toLowerCase(),d=!u||("true"===u||"1"===u||"yes"===u),h=function(t){return new Promise(function(e,i){var n=document.querySelector('script[data-pyodide-src="'.concat(t,'"]'));if(n)return"function"===typeof window.loadPyodide?e():(n.addEventListener("load",function(){return e()},{once:!0}),void n.addEventListener("error",function(){return i(new Error("Pyodide 脚本加载失败"))},{once:!0}));var a=document.createElement("script");a.dataset.pyodideSrc=t,a.src=t,a.onload=function(){return e()},a.onerror=function(){return i(new Error("Pyodide 脚本加载失败"))},document.head.appendChild(a)})},p=function(){var e=(0,c.A)((0,l.A)().m(function e(i){return(0,l.A)().w(function(e){while(1)switch(e.n){case 0:if("function"===typeof window.loadPyodide){e.n=1;break}throw new Error("loadPyodide 函数未找到");case 1:return e.n=2,window.loadPyodide({indexURL:i});case 2:return window.pyodide=e.v,e.n=3,window.pyodide.loadPackage(["pandas","numpy"]);case 3:V.value=window.pyodide,H.value=!0,W.value=!1,t(window.pyodide);case 4:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}();(0,c.A)((0,l.A)().m(function t(){var e,i,n;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e=function(){var t=(0,c.A)((0,l.A)().m(function t(e){return(0,l.A)().w(function(t){while(1)switch(t.n){case 0:return t.n=1,h(e+"pyodide.js");case 1:return t.n=2,p(e);case 2:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),t.p=1,!d){t.n=3;break}return t.n=2,e(s);case 2:t.n=4;break;case 3:return t.n=4,e(o);case 4:t.n=9;break;case 5:return t.p=5,i=t.v,t.p=6,t.n=7,e(d?o:s);case 7:t.n=9;break;case 8:throw t.p=8,n=t.v,n||i;case 9:return t.a(2)}},t,null,[[6,8],[1,5]])}))().catch(function(t){W.value=!1,$.value=!0,e(t)})})},j=function(t){if(!t||"string"!==typeof t)return null;try{var e={},i=t.match(/(\w+)\s*=\s*(\d+\.?\d*)/g);return i&&i.forEach(function(t){var i=t.split("=");if(2===i.length){var n=i[0].trim(),a=parseFloat(i[1].trim());isNaN(a)||(e[n]=a)}}),{params:e,plots:[],success:!0}}catch(n){return{params:{},plots:[],success:!1}}},U=function(){var e=(0,c.A)((0,l.A)().m(function e(i,n){var a,r,s,c,u,d,h,p,v,f,g,m,y,_,b,x,w,S,C=arguments;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(a=C.length>2&&void 0!==C[2]?C[2]:{},r=C.length>3&&void 0!==C[3]?C[3]:{},H.value&&V.value){e.n=5;break}if(!W.value){e.n=4;break}s=0;case 1:if(!(W.value&&s<30)){e.n=4;break}return e.n=2,new Promise(function(t){return setTimeout(t,500)});case 2:if(s++,!H.value||!V.value){e.n=3;break}return e.a(3,4);case 3:e.n=1;break;case 4:if(H.value&&V.value){e.n=5;break}throw W.value?(W.value=!1,$.value=!0):$.value=!0,new Error("Python 引擎未就绪,请等待加载完成");case 5:if(e.p=5,c=i,u=r.is_encrypted||r.isEncrypted||0,!u&&!Fa(i,u)){e.n=11;break}if(d=r.user_id||r.userId||t.userId||a.userId,h=r.originalId||r.id||a.indicatorId,!d||!h){e.n=10;break}return e.p=6,e.n=7,Ta(c,d,h);case 7:c=e.v,e.n=9;break;case 8:throw e.p=8,x=e.v,new Error("代码解密失败,无法执行指标: "+(x.message||"未知错误"));case 9:e.n=11;break;case 10:throw new Error("缺少必要的解密参数(用户ID或指标ID),无法执行加密指标");case 11:return p=n.map(function(t){var e=t.timestamp||t.time;return e<1e10&&(e*=1e3),{time:Math.floor(e/1e3),open:parseFloat(t.open)||0,high:parseFloat(t.high)||0,low:parseFloat(t.low)||0,close:parseFloat(t.close)||0,volume:parseFloat(t.volume)||0}}),v=JSON.stringify(p),f=JSON.stringify(a||{}),g=v.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r"),m=f.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r"),y="\nimport json\nimport pandas as pd\nimport numpy as np\n\n# 递归清理 NaN 值的函数\ndef clean_nan(obj):\n if isinstance(obj, dict):\n return {k: clean_nan(v) for k, v in obj.items()}\n elif isinstance(obj, list):\n return [clean_nan(item) for item in obj]\n elif isinstance(obj, (pd.Series, np.ndarray)):\n return [None if (isinstance(x, float) and (np.isnan(x) or np.isinf(x))) else x for x in obj]\n elif isinstance(obj, (float, np.floating)):\n if np.isnan(obj) or np.isinf(obj):\n return None\n return float(obj)\n elif pd.isna(obj):\n return None\n else:\n return obj\n\n# 接收 JSON 数据\nraw_data = json.loads('".concat(g,"')\nparams = json.loads('").concat(m,"')\n\n# 将前端参数注入为指标代码可直接使用的变量(对齐回测/实盘执行环境)\n# 兼容多种命名(snake_case / camelCase)\ndef _get_param(key, default=None):\n if key in params:\n return params.get(key, default)\n # camelCase fallback\n camel = ''.join([key.split('_')[0]] + [p.capitalize() for p in key.split('_')[1:]])\n return params.get(camel, default)\n\ntry:\n leverage = float(_get_param('leverage', 1) or 1)\nexcept Exception:\n leverage = 1\n\ntrade_direction = _get_param('trade_direction', _get_param('tradeDirection', 'both')) or 'both'\n\ntry:\n initial_position = int(_get_param('initial_position', 0) or 0)\nexcept Exception:\n initial_position = 0\n\ntry:\n initial_avg_entry_price = float(_get_param('initial_avg_entry_price', 0.0) or 0.0)\nexcept Exception:\n initial_avg_entry_price = 0.0\n\ntry:\n initial_position_count = int(_get_param('initial_position_count', 0) or 0)\nexcept Exception:\n initial_position_count = 0\n\ntry:\n initial_last_add_price = float(_get_param('initial_last_add_price', 0.0) or 0.0)\nexcept Exception:\n initial_last_add_price = 0.0\n\ntry:\n initial_highest_price = float(_get_param('initial_highest_price', 0.0) or 0.0)\nexcept Exception:\n initial_highest_price = 0.0\n\n# 转换为 DataFrame\ndf = pd.DataFrame(raw_data)\n\n# 转换数据类型\ndf['open'] = df['open'].astype(float)\ndf['high'] = df['high'].astype(float)\ndf['low'] = df['low'].astype(float)\ndf['close'] = df['close'].astype(float)\ndf['volume'] = df['volume'].astype(float)\n\n# 用户代码(已解密)\n").concat(c,"\n\n# 构造输出(如果用户没有定义 output,则尝试从 result_json 获取)\nif 'output' not in locals():\n if 'result_json' in locals():\n output = json.loads(result_json)\n else:\n output = {\"plots\": []}\nelse:\n # 确保 output 是字典格式\n if isinstance(output, str):\n output = json.loads(output)\n\n# 清理 output 中的所有 NaN 值\noutput = clean_nan(output)\n\n# 返回 JSON 字符串\njson.dumps(output)\n"),e.n=12,V.value.runPythonAsync(y);case 12:if(_=e.v,_&&"string"===typeof _){e.n=13;break}throw new Error("Python 代码执行后未返回有效的 JSON 字符串,返回类型: ".concat((0,o.A)(_)));case 13:e.p=13,b=JSON.parse(_),e.n=15;break;case 14:throw e.p=14,w=e.v,new Error("JSON 解析失败: ".concat(w.message,"。可能是数据中包含 NaN 或其他无效值。"));case 15:if(b){e.n=16;break}return e.a(2,{plots:[],signals:[],calculatedVars:{}});case 16:return b.plots&&Array.isArray(b.plots)||(b.plots=[]),b.plots=b.plots.map(function(t){return t.data&&Array.isArray(t.data)&&(t.data=t.data.map(function(t){return null===t||void 0===t||"number"===typeof t&&isNaN(t)?null:t})),t}),b.signals&&Array.isArray(b.signals)&&(b.signals=b.signals.map(function(t){return t.data&&Array.isArray(t.data)&&(t.data=t.data.map(function(t){return null===t||void 0===t||"number"===typeof t&&isNaN(t)?null:t})),t})),b.calculatedVars||(b.calculatedVars={}),e.a(2,b);case 17:throw e.p=17,S=e.v,new Error("Python 执行失败: ".concat(S.message));case 18:return e.a(2)}},e,null,[[13,14],[6,8],[5,17]])}));return function(t,i){return e.apply(this,arguments)}}();function G(t,e){for(var i=[],n=0;nn-e+1){var c=(t[o-1].high+t[o-1].low+t[o-1].close)/3;s>c?a+=l:sp&&h>0?o.push(h):o.push(0),p>h&&p>0?s.push(p):s.push(0)}for(var v=[],f=[],g=[],m=0;m=e-1){var w=v[m],S=f[m],C=g[m];if(0===w?(i.push(0),n.push(0)):(i.push(S/w*100),n.push(C/w*100)),m>=e-1){var k=i[m]+n[m],I=0===k?0:Math.abs(i[m]-n[m])/k*100;if(m===e-1)a.push(I);else if(m===e){var E=Math.abs(i[m-1]-n[m-1])/(i[m-1]+n[m-1])*100;a.push((E+I)/2)}else a.push((a[m-1]*(e-1)+I)/e)}}}return{adx:a,plusDI:i,minusDI:n}}function nt(t){for(var e=[],i=0,n=0;nt[n-1].close?i+=t[n].volume:t[n].close255?12:7)},0),m=g+2*h,y=v+2*p,_=(null===(i=r.extendData)||void 0===i?void 0:i.side)||(null===(n=r.extendData)||void 0===n?void 0:n.type)||"buy",b="buy"===_,x=b?u:u-y,w=d,S=w,C=b?x:x+y;return[{type:"line",attrs:{coordinates:[{x:c,y:S},{x:c,y:C}]},styles:{style:"stroke",color:l,dashedValue:[2,2]},ignoreEvent:!0},{type:"circle",attrs:{x:c,y:w,r:4},styles:{style:"fill",color:l},ignoreEvent:!0},{type:"rect",attrs:{x:c-m/2,y:x,width:m,height:y,r:4},styles:{style:"fill",color:l,borderSize:0},ignoreEvent:!0},{type:"text",attrs:{x:c,y:x+y/2,text:f,align:"center",baseline:"middle"},styles:{color:"#ffffff",size:v,weight:"bold",backgroundColor:l,borderRadius:5},ignoreEvent:!0}]}}),Ni({name:"priceRangeMeasure",totalStep:2,lock:!1,needDefaultPointFigure:!1,needDefaultXAxisFigure:!1,needDefaultYAxisFigure:!1,createPointFigures:function(t){var e=t.coordinates,i=t.overlay,n=t.ctx;if(!e[0]||!e[1])return[];var a=i.points[0],r=i.points[1];if(!a||!r)return[];var o=a.value,s=r.value,l=s-o,c=l/o*100,u=a.timestamp,d=r.timestamp,h=Math.abs(d-u),p="",v=Math.floor(h/864e5),f=Math.floor(h%864e5/36e5),g=Math.floor(h%36e5/6e4),m=Math.floor(h%6e4/1e3);p=v>0?"".concat(v,"天").concat(f>0?f+"小时":""):f>0?"".concat(f,"小时").concat(g>0?g+"分钟":""):g>0?"".concat(g,"分钟"):"".concat(m,"秒");var y=0;try{if(n&&n.chart){var _=n.chart.getData();if(_&&Array.isArray(_)&&_.length>0){var b=_.findIndex(function(t){return Math.abs(t.timestamp-u)<1e3}),x=_.findIndex(function(t){return Math.abs(t.timestamp-d)<1e3});b>=0&&x>=0&&(y=Math.abs(x-b))}}}catch(z){}var w=c>=0?"+".concat(c.toFixed(2),"%"):"".concat(c.toFixed(2),"%"),S=l>=0?"+".concat(l.toFixed(2)):"".concat(l.toFixed(2)),C="".concat(w," ").concat(S);y>0?(C+=" (".concat(y,"根"),p&&(C+=" / ".concat(p)),C+=")"):p&&(C+=" (".concat(p,")"));var k=l>=0,I=k?"#0ecb81":"#f6465d",E=k?"#0ecb81":"#f6465d",A=k?"rgba(14, 203, 129, 0.1)":"rgba(246, 70, 93, 0.1)",P=e[0].x,M=e[0].y,D=e[1].x,T=e[1].y,B=(P+D)/2,F=(M+T)/2,R=-20,L=12,N=7*C.length+16,O=L+8;return[{type:"line",attrs:{coordinates:[{x:P,y:M},{x:D,y:T}]},styles:{style:"stroke",color:I,size:2,dashedValue:[4,4]},ignoreEvent:!1},{type:"circle",attrs:{x:P,y:M,r:4},styles:{style:"fill",color:I},ignoreEvent:!1},{type:"circle",attrs:{x:D,y:T,r:4},styles:{style:"fill",color:I},ignoreEvent:!1},{type:"rect",attrs:{x:B-N/2,y:F+R-O/2,width:N,height:O,r:4},styles:{style:"fill",color:A,borderSize:1,borderColor:I},ignoreEvent:!1},{type:"text",attrs:{x:B,y:F+R,text:C,align:"center",baseline:"middle"},styles:{color:E,size:L,weight:"bold"},ignoreEvent:!1}]}});var st=function(t){return t.map(function(t){var e=t.time||t.timestamp;return"string"===typeof e&&(e=parseInt(e)),e<1e10&&(e*=1e3),{timestamp:e,open:parseFloat(t.open),high:parseFloat(t.high),low:parseFloat(t.low),close:parseFloat(t.close),volume:parseFloat(t.volume||0)}}).filter(function(t){return t.timestamp&&!isNaN(t.open)&&!isNaN(t.high)&&!isNaN(t.low)&&!isNaN(t.close)}).sort(function(t,e){return t.timestamp-e.timestamp})},lt=function(t){if(t.length>0){var e=t[t.length-1];if(t.length>1){var n=t[t.length-2],a=e.close.toFixed(2),r=(e.close-n.close)/n.close*100;i("price-change",{price:a,change:r})}else{var o=e.close.toFixed(2);i("price-change",{price:o,change:0})}}},ct=function(t){return t.map(function(t){return{time:Math.floor(t.timestamp/1e3),open:t.open,high:t.high,low:t.low,close:t.close,volume:t.volume}})},ut=function(t,e,i){var n=new Date(1e3*t),a=new Date(1e3*e);switch(i){case"1m":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()&&n.getHours()===a.getHours()&&n.getMinutes()===a.getMinutes();case"5m":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()&&n.getHours()===a.getHours()&&Math.floor(n.getMinutes()/5)===Math.floor(a.getMinutes()/5);case"15m":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()&&n.getHours()===a.getHours()&&Math.floor(n.getMinutes()/15)===Math.floor(a.getMinutes()/15);case"30m":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()&&n.getHours()===a.getHours()&&Math.floor(n.getMinutes()/30)===Math.floor(a.getMinutes()/30);case"1H":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()&&n.getHours()===a.getHours();case"4H":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()&&Math.floor(n.getHours()/4)===Math.floor(a.getHours()/4);case"1D":return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate();case"1W":var r=Math.floor((n.getTime()-new Date(n.getFullYear(),0,1).getTime())/6048e5),o=Math.floor((a.getTime()-new Date(a.getFullYear(),0,1).getTime())/6048e5);return n.getFullYear()===a.getFullYear()&&r===o;default:return t===e}},dt=function(){var e=(0,c.A)((0,l.A)().m(function e(){var i,o,s,c,d,p,f,m=arguments;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(i=m.length>0&&void 0!==m[0]&&m[0],t.symbol){e.n=1;break}return e.a(2);case 1:if(!a.value||i){e.n=2;break}return e.a(2);case 2:return a.value=!0,r.value=null,e.p=3,o=[],e.p=4,e.n=5,(0,v.Ay)({url:"/api/indicator/kline",method:"get",params:{market:t.market,symbol:t.symbol,timeframe:t.timeframe,limit:500}});case 5:if(s=e.v,1!==s.code||!s.data||!Array.isArray(s.data)){e.n=6;break}o=st(s.data),e.n=7;break;case 6:throw c=s.msg||"获取K线数据失败","tiingo_subscription"===s.hint&&(c=M.$t("dashboard.indicator.error.tiingoSubscription")||"Forex 1-minute data requires Tiingo paid subscription"),new Error(c);case 7:e.n=9;break;case 8:throw e.p=8,p=e.v,p;case 9:if(o&&0!==o.length){e.n=10;break}throw new Error("未获取到K线数据");case 10:n.value=o,u.value=!0,d=ct(o),lt(d),(0,h.dY)(function(){if(g.value){var e=n.value.filter(function(t){return t.timestamp&&!isNaN(t.open)&&!isNaN(t.high)&&!isNaN(t.low)&&!isNaN(t.close)});if(e.length>0&&g.value){try{g.value.applyNewData(e)}catch(i){g.value.applyNewData(e)}setTimeout(function(){g.value&&xt()},100)}}else mt();t.realtimeEnabled&&(gt(),ft())}),e.n=12;break;case 11:if(e.p=11,f=e.v,r.value=M.$t("dashboard.indicator.error.loadDataFailed")+": "+(f.message||M.$t("dashboard.indicator.error.loadDataFailedDesc")),n.value=[],g.value)try{g.value.applyNewData([])}catch(l){}case 12:return e.p=12,a.value=!1,e.f(12);case 13:return e.a(2)}},e,null,[[4,8],[3,11,12,13]])}));return function(){return e.apply(this,arguments)}}(),ht=function(){var e=(0,c.A)((0,l.A)().m(function e(i){return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.symbol&&n.value&&0!==n.value.length){e.n=1;break}return e.a(2);case 1:if(!s.value&&!p){e.n=6;break}if(!p){e.n=5;break}return e.p=2,e.n=3,p;case 3:e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2);case 6:if(u.value){e.n=7;break}return g.value&&"function"===typeof g.value.noMoreData&&g.value.noMoreData(),e.a(2);case 7:return s.value=!0,p=(0,c.A)((0,l.A)().m(function e(){var a,r,o,c,d,f;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.n=1,(0,h.dY)();case 1:return e.p=1,a=Math.floor(i/1e3),e.n=2,(0,v.Ay)({url:"/api/indicator/kline",method:"get",params:{market:t.market,symbol:t.symbol,timeframe:t.timeframe,limit:500,before_time:a}});case 2:if(r=e.v,1!==r.code||!r.data||!Array.isArray(r.data)){e.n=5;break}if(o=st(r.data),0!==o.length){e.n=3;break}return u.value=!1,g.value&&"function"===typeof g.value.noMoreData&&g.value.noMoreData(),e.a(2);case 3:if(c=o.filter(function(t){return t.timestamp0&&(a=st(i.data),r=(0,F.A)(n.value),a.length>0&&(o=Math.floor(a[a.length-1].timestamp/1e3),s=Math.floor(r[r.length-1].timestamp/1e3),ut(o,s,t.timeframe)?(c=r[r.length-1],u=a[a.length-1],r[r.length-1]={timestamp:c.timestamp,open:c.open,high:Math.max(c.high,u.high),low:Math.min(c.low,u.low),close:u.close,volume:u.volume},n.value=r,d=ct(n.value),lt(d),g.value&&"function"===typeof g.value.updateData?(h=n.value.length-1,g.value.updateData(r[h]),C(!1)):g.value&&(g.value.applyNewData(n.value),C(!1))):o>s&&(p=a.filter(function(e){var i=Math.floor(e.timestamp/1e3);return!r.some(function(e){var n=Math.floor(e.timestamp/1e3);return ut(i,n,t.timeframe)})}),p.length>0&&(n.value=[].concat((0,F.A)(r),(0,F.A)(p)),n.value.length>500&&(n.value=n.value.slice(-500)),f=ct(n.value),lt(f),g.value&&"function"===typeof g.value.applyMoreData?(g.value.applyMoreData(p),C(!0)):g.value&&(g.value.applyNewData(n.value),C(!0)))))),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[1,3]])}));return function(){return e.apply(this,arguments)}}(),ft=function(){y.value&&clearInterval(y.value);var e={"1m":5e3,"5m":1e4,"15m":15e3,"30m":3e4,"1H":6e4,"4H":3e5,"1D":6e5,"1W":18e5},i=e[t.timeframe]||1e4;b.value=Math.min(i,1e3),t.realtimeEnabled&&t.symbol&&n.value.length>0&&(y.value=setInterval(function(){!a.value&&t.symbol&&n.value&&n.value.length>0&&vt()},b.value))},gt=function(){y.value&&(clearInterval(y.value),y.value=null)},mt=function(){var t=document.getElementById("kline-chart-container");if(t)if(0!==t.clientWidth&&0!==t.clientHeight){if(g.value){try{g.value.destroy()}catch(y){}g.value=null}try{var e=document.getElementById("kline-chart-container");if(!e)throw new Error("容器元素不存在");try{g.value=Ia(e,{drawingBarVisible:!0,overlay:{visible:!0}})}catch(y){g.value=Ia(e)}if(g.value&&"function"===typeof g.value.setDrawingBarVisible?g.value.setDrawingBarVisible(!0):g.value&&"function"===typeof g.value.setDrawingBar?g.value.setDrawingBar(!0):g.value&&"function"===typeof g.value.enableDrawing&&g.value.enableDrawing(!0),!g.value)throw new Error("图表初始化失败:无法创建图表实例");if(g.value&&("function"===typeof g.value.setDrawingBarVisible&&g.value.setDrawingBarVisible(!0),"function"===typeof g.value.setDrawingBar&&g.value.setDrawingBar(!0),"function"===typeof g.value.enableDrawing&&g.value.enableDrawing(!0)),_t(),g.value&&"function"===typeof g.value.subscribeAction){if(g.value.subscribeAction("onOverlayCreated",function(t){if(A.value&&t&&t.id){var e={line:"segment",horizontalLine:"horizontalStraightLine",verticalLine:"verticalStraightLine",ray:"rayLine",straightLine:"straightLine",parallelStraightLine:"parallelStraightLine",priceLine:"priceLine",priceChannelLine:"priceChannelLine",fibonacciLine:"fibonacciLine",measure:"priceRangeMeasure"},i=e[A.value];if(!t.name||t.name===i||"priceRangeMeasure"===i){E.value.push(t.id),A.value=null;try{"function"===typeof g.value.overrideOverlay&&g.value.overrideOverlay(null)}catch(y){}}}}),"function"===typeof g.value.subscribeAction)try{g.value.subscribeAction("onOverlayComplete",function(t){A.value&&t&&t.id&&(E.value.push(t.id),A.value=null)})}catch(y){}g.value.subscribeAction("onOverlayRemoved",function(t){var e=E.value.indexOf(t);e>-1&&E.value.splice(e,1)})}if(g.value&&"function"===typeof g.value.subscribeAction){var i=null,a=!1;g.value.subscribeAction("onVisibleRangeChange",function(){var t=(0,c.A)((0,l.A)().m(function t(e){var r,o,c,d,h,v;return(0,l.A)().w(function(t){while(1)switch(t.n){case 0:if(!e||"number"!==typeof e.from){t.n=5;break}if(a){t.n=1;break}return i=e.from,a=!0,setTimeout(function(){f.value=!0},1e3),t.a(2);case 1:if(f.value){t.n=2;break}return i=e.from,t.a(2);case 2:if(!(s.value&&e.from<=0)){t.n=3;break}try{g.value&&"function"===typeof g.value.setVisibleRange&&(r=n.value.length,r>0&&(o=g.value.getVisibleRange(),o&&(c=Math.ceil((o.to-o.from)*r/100),d=.1,h=Math.min(100,d+c/r*100),g.value.setVisibleRange(d,h))))}catch(y){}return t.a(2);case 3:if(!(e.from<=5&&!s.value&&!p&&u.value&&f.value)){t.n=4;break}if(!(null!==i&&i>e.from)){t.n=4;break}if(!(n.value.length>0)){t.n=4;break}return v=n.value[0].timestamp,t.n=4,ht(v);case 4:i=e.from;case 5:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}())}if(n.value&&n.value.length>0){var o=n.value.filter(function(t){return t.timestamp&&!isNaN(t.open)&&!isNaN(t.high)&&!isNaN(t.low)&&!isNaN(t.close)});if(o.length>0){try{g.value.applyNewData(o)}catch(y){try{g.value.applyNewData(o)}catch(_){}}try{g.value.createIndicator("VOL",!1,{height:100,dragEnabled:!0})}catch(y){}(0,h.dY)(function(){xt()})}}window.addEventListener("resize",yt)}catch(r){r.value=M.$t("dashboard.indicator.error.chartInitFailed")+": "+(r.message||"未知错误")}}else{var d=0,v=10,m=function(){var t=document.getElementById("kline-chart-container");t&&t.clientWidth>0&&t.clientHeight>0?mt():d0&&t.clientHeight>0&&mt()}},_t=function(){if(g.value){var t=Y.value,e="dark"===m.value;g.value.setStyles({grid:{show:!0,horizontal:{show:!0,color:t.gridLineColor,style:"dashed",size:1},vertical:{show:!1}},candle:{priceMark:{show:!0,high:{show:!0,color:t.axisLabelColor},low:{show:!0,color:t.axisLabelColor}},tooltip:{showRule:"always",showType:"standard",labels:[M.$t("dashboard.indicator.tooltip.time"),M.$t("dashboard.indicator.tooltip.open"),M.$t("dashboard.indicator.tooltip.high"),M.$t("dashboard.indicator.tooltip.low"),M.$t("dashboard.indicator.tooltip.close"),M.$t("dashboard.indicator.tooltip.volume")],values:function(t){var e=new Date(t.timestamp);return["".concat(e.getFullYear(),"-").concat(e.getMonth()+1,"-").concat(e.getDate()," ").concat(e.getHours(),":").concat(e.getMinutes()),t.open.toFixed(2),t.high.toFixed(2),t.low.toFixed(2),t.close.toFixed(2),t.volume.toFixed(0)]}},bar:{upColor:e?"#0ecb81":"#13c2c2",downColor:e?"#f6465d":"#fa541c",noChangeColor:t.borderColor}},indicator:{tooltip:{showRule:"always",showType:"standard"}},xAxis:{show:!0,axisLine:{show:!0,color:t.borderColor}},yAxis:{show:!0,axisLine:{show:!1}},crosshair:{show:!0,horizontal:{show:!0,line:{show:!0,style:"dashed",color:t.gridLineColor,size:1}},vertical:{show:!0,line:{show:!0,style:"dashed",color:t.gridLineColor,size:1}}},watermark:{show:!1}})}},bt=function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2,r=arguments.length>5&&void 0!==arguments[5]&&arguments[5];try{var o={name:t,shortName:t,calc:e,figures:i,calcParams:n,precision:a,series:r?"price":"normal"};return ai(o),!0}catch(s){return!(!s.message||!s.message.includes("already registered"))}},xt=function(){var e=(0,c.A)((0,l.A)().m(function e(){var i,a,r,o;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!x.value){e.n=1;break}return e.a(2);case 1:if(g.value&&0!==n.value.length){e.n=2;break}return e.a(2);case 2:x.value=!0,e.p=3;try{I.value.length>0&&g.value&&(I.value.forEach(function(t){try{"function"===typeof g.value.removeOverlay?g.value.removeOverlay(t):"function"===typeof g.value.removeOverlayById&&g.value.removeOverlayById(t)}catch(e){}}),I.value=[])}catch(s){}try{k.value.length>0&&(k.value.forEach(function(t){var e="string"===typeof t?t:t.name,i="string"===typeof t?void 0:t.paneId;i?g.value.removeIndicator(i,e):(g.value.removeIndicator("candle_pane",e),g.value.removeIndicator(e))}),k.value=[])}catch(s){}i=ct(n.value),a=(0,l.A)().m(function e(){var n,a,r,s,c,u,d,h,p,v,f,m,y,b,x,w,S,C,E,A,P,M,D,T,R,L,N,O,z,V,H,Y,K,j,st,lt,ct,ut,dt,ht,pt,vt,ft,gt,mt,yt,_t,xt,wt,St,Ct,kt,It,Et,At,Pt,Mt,Dt,Tt,Bt,Ft,Rt,Lt,Nt,Ot,zt,Vt,Wt,Ht,$t,Yt,Xt,Kt,jt,Ut,Gt,Zt,qt,Jt,Qt,te,ee,ie,ne,ae,re,oe,se,le,ce,ue,de,he,pe,ve,fe,ge,me,ye,_e,be,xe,we,Se,Ce,ke,Ie,Ee,Ae,Pe,Me,De,Te,Be,Fe,Re,Le,Ne,Oe,ze,Ve,We,He,$e,Ye,Xe,Ke,je,Ue,Ge,Ze,qe,Je,Qe,ti,ei,ii,ni,ai,ri,oi,si,li,ci,ui,di,hi,pi,vi,fi,gi,mi,yi,_i;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(n=t.activeIndicators[o],e.p=1,"python"!==n.type){e.n=31;break}if(n.code){e.n=2;break}return e.a(2,0);case 2:if(e.p=2,!n.calculate||"function"!==typeof n.calculate){e.n=15;break}return e.n=3,n.calculate(i,n.params||{});case 3:if(a=e.v,r=[],a&&a.plots&&Array.isArray(a.plots)&&(r=(0,F.A)(a.plots)),!(a&&a.signals&&Array.isArray(a.signals))){e.n=14;break}s=(0,_.A)(a.signals),e.p=4,s.s();case 5:if((c=s.n()).done){e.n=11;break}if(u=c.value,!(u.data&&Array.isArray(u.data)&&u.data.length>0)){e.n=10;break}for(d=[],h=0;h0&&g.value){M=(0,_.A)(v);try{for(M.s();!(D=M.n()).done;){T=D.value;try{R=T.timestamp,R<1e10&&(R*=1e3),L=T.text,"function"===typeof g.value.createOverlay&&(N=g.value.createOverlay({name:"signalTag",points:[{timestamp:R,value:T.price},{timestamp:R,value:T.anchorPrice}],extendData:{text:L,color:T.color,side:T.side,action:T.action,price:T.price},lock:!0},"candle_pane"),N&&I.value.push(N))}catch(l){}}}catch(bi){M.e(bi)}finally{M.f()}}case 10:e.n=5;break;case 11:e.n=13;break;case 12:e.p=12,mi=e.v,s.e(mi);case 13:return e.p=13,s.f(),e.f(13);case 14:if(r.length>0&&(O=r.filter(function(t){return t.data&&Array.isArray(t.data)&&t.data.length>0}),O.length>0)){for(z=[],V={},H=0;H0)){e.n=23;break}for(xt=[],wt=0;wt0&&g.value){Lt=(0,_.A)(Ct);try{for(Lt.s();!(Nt=Lt.n()).done;){Ot=Nt.value;try{zt=Ot.timestamp,zt<1e10&&(zt*=1e3),Vt=Ot.text,"function"===typeof g.value.createOverlay&&(Wt=g.value.createOverlay({name:"signalTag",points:[{timestamp:zt,value:Ot.price},{timestamp:zt,value:Ot.anchorPrice}],extendData:{text:Vt,color:Ot.color,side:Ot.side,action:Ot.action,price:Ot.price},lock:!0},"candle_pane"),Wt&&I.value.push(Wt))}catch(l){}}}catch(bi){Lt.e(bi)}finally{Lt.f()}}case 23:e.n=18;break;case 24:e.n=26;break;case 25:e.p=25,yi=e.v,mt.e(yi);case 26:return e.p=26,mt.f(),e.f(26);case 27:if(gt.length>0&&(Ht=gt.filter(function(t){return t.data&&Array.isArray(t.data)&&t.data.length>0}),Ht.length>0)){for($t=[],Yt={},Xt=0;Xt0&&(0,h.dY)(function(){g.value&&xt()})},{deep:!0}),(0,h.wB)(function(){return t.realtimeEnabled},function(t){t?ft():gt()}),(0,h.sV)((0,c.A)((0,l.A)().m(function e(){return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.n=1,(0,h.dY)();case 1:return!t.theme||"dark"!==t.theme&&"light"!==t.theme||(m.value=t.theme),e.p=2,e.n=3,K();case 3:e.n=5;break;case 4:e.p=4,e.v,$.value=!0;case 5:(0,h.dY)(function(){setTimeout(function(){!g.value&&t.symbol&&mt()},300)});case 6:return e.a(2)}},e,null,[[2,4]])}))),(0,h.xo)(function(){gt(),g.value&&(g.value.destroy(),g.value=null),window.removeEventListener("resize",yt)}),{klineData:n,loading:a,error:r,loadingHistory:s,chartRef:g,chartTheme:m,themeConfig:Y,getIndicatorColor:X,handleRetry:wt,loadingPython:W,pythonReady:H,pyodideLoadFailed:$,formatKlineData:st,updatePricePanel:lt,isSameTimeframe:ut,loadKlineData:dt,loadMoreHistoryData:pt,updateKlineRealtime:vt,startRealtime:ft,stopRealtime:gt,initChart:mt,handleResize:yt,updateChartTheme:_t,updateIndicators:xt,executePythonStrategy:U,parsePythonStrategy:j,indicatorButtons:R,isIndicatorActive:L,toggleIndicator:z,drawingTools:D,activeDrawingTool:A,selectDrawingTool:N,clearAllDrawings:O}}},La=Ra,Na=(0,E.A)(La,M,D,!1,null,"58f93984",null),Oa=Na.exports,za=i(46500),Va={name:"DashboardIndicator",components:{IndicatorEditor:P,KlineChart:Oa,QuickTradePanel:za.A},computed:(0,d.A)((0,d.A)({},(0,p.aH)({navTheme:function(t){return t.app.theme}})),{},{chartTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme?"dark":"light"},isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme}}),setup:function(){var t=(0,h.nI)(),e=t||{},i=e.proxy,n=(0,h.KR)(1),a=(0,h.KR)(!1),p=(0,h.KR)(void 0),m=(0,h.KR)([]),y=(0,h.KR)([]),_=(0,h.KR)(!1),b=(0,h.KR)(""),x=(0,h.KR)(!1),w=(0,h.KR)(!1),S=(0,h.KR)(!1),C=(0,h.KR)(""),k=(0,h.KR)(""),I=(0,h.KR)([]),E=(0,h.KR)(!1),A=(0,h.KR)([]),P=(0,h.KR)(!1),M=(0,h.KR)(null),D=(0,h.KR)(null),T=(0,h.KR)([]),B=(0,h.KR)(!1),F=(0,h.KR)(!1),R=(0,h.KR)(""),L=(0,h.KR)(""),N=(0,h.KR)(0),O=(0,h.EW)(function(){return"crypto"===(Y.value||"").toLowerCase()}),z=function(){O.value?(R.value=$.value||"",N.value=parseFloat(X.value)||0,L.value="",F.value=!0):u.A.warning(i.$t("quickTrade.cryptoOnly"))},V=function(){u.A.success(i.$t("quickTrade.orderSuccess"))},W=function(t){t&&O.value&&(R.value=t)},H=function(){i&&i.$router&&i.$router.push("/indicator-community")},$=(0,h.KR)(""),Y=(0,h.KR)(""),X=(0,h.KR)("--"),K=(0,h.KR)(0),j=(0,h.EW)(function(){return K.value>0?"color-up":K.value<0?"color-down":""}),U=(0,h.KR)("1D"),G=(0,h.KR)([]),Z=(0,h.KR)(!1),q=[{id:"sma5",name:"SMA5 (5日均线)",shortName:"SMA5",type:"line",defaultParams:{length:5}},{id:"sma10",name:"SMA10 (10日均线)",shortName:"SMA10",type:"line",defaultParams:{length:10}},{id:"sma20",name:"SMA20 (20日均线)",shortName:"SMA20",type:"line",defaultParams:{length:20}},{id:"sma30",name:"SMA30 (30日均线)",shortName:"SMA30",type:"line",defaultParams:{length:30}}],J=[{id:"ema5",name:"EMA5 (5日指数均线)",shortName:"EMA5",type:"line",defaultParams:{length:5}},{id:"ema10",name:"EMA10 (10日指数均线)",shortName:"EMA10",type:"line",defaultParams:{length:10}},{id:"ema20",name:"EMA20 (20日指数均线)",shortName:"EMA20",type:"line",defaultParams:{length:20}},{id:"ema30",name:"EMA30 (30日指数均线)",shortName:"EMA30",type:"line",defaultParams:{length:30}}],Q=(0,h.KR)([]),tt=(0,h.KR)([]),et=(0,h.KR)(!1),it=(0,h.KR)(!1),nt=(0,h.KR)(null),at=(0,h.KR)(""),rt=(0,h.KR)([]),ot=(0,h.KR)({}),st=(0,h.KR)(!1),lt=(0,h.KR)({}),ct=(0,h.KR)(!1),ut=(0,h.KR)(!1),dt=(0,h.KR)(!1),ht=(0,h.KR)(null),pt=(0,h.KR)(!1),vt=(0,h.KR)(null),ft=(0,h.KR)(!1),gt=(0,h.KR)(null),mt=(0,h.KR)(!1),yt=(0,h.KR)(null),_t=(0,h.KR)(!1),bt=(0,h.KR)(null),xt=(0,h.KR)(!1),wt=(0,h.KR)(!1),St=(0,h.KR)("free"),Ct=(0,h.KR)(10),kt=(0,h.KR)(""),It=(0,h.KR)(!1),Et={price:[{required:!0,message:"请输入价格",trigger:"blur",type:"number"}]},At=(0,h.KR)(!1),Pt=function(t){var e=t.price,i=t.change;X.value=e,K.value=i},Mt=function(){},Dt=(0,h.KR)([]),Tt=(0,h.KR)([]),Bt=function(t){U.value=t},Ft=function(t){return t?Object.values(t).join(", "):""},Rt=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,i,r,o,s,c;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(a.value=!0,t.p=1,r=(0,h.nI)(),o=null===r||void 0===r||null===(e=r.proxy)||void 0===e?void 0:e.$store,s=(null===o||void 0===o||null===(i=o.getters)||void 0===i?void 0:i.userInfo)||{},!s||!s.email){t.n=2;break}return n.value=s.id,a.value=!1,Lt(),ae(),t.a(2);case 2:return t.n=3,(0,g.ug)();case 3:c=t.v,c&&1===c.code&&c.data&&(n.value=c.data.id,o&&o.commit("SET_INFO",c.data),Lt(),ae()),t.n=5;break;case 4:t.p=4,t.v;case 5:return t.p=5,a.value=!1,t.f(5);case 6:return t.a(2)}},t,null,[[1,4,5,6]])}));return function(){return t.apply(this,arguments)}}(),Lt=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,a;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(n.value){t.n=1;break}return t.a(2);case 1:return _.value=!0,t.p=2,t.n=3,(0,f.Qo)({userid:n.value});case 3:e=t.v,e&&1===e.code&&e.data&&(y.value=e.data.map(function(t){return(0,d.A)((0,d.A)({},t),{},{label:t.symbol+(t.name?" (".concat(t.name,")"):""),value:"".concat(t.market,":").concat(t.symbol)})}),Nt(),y.value.length>0&&!$.value&&(a=y.value[0],Y.value=a.market,$.value=a.symbol,p.value=a.value)),t.n=5;break;case 4:t.p=4,t.v,u.A.error(i.$t("dashboard.indicator.error.loadWatchlistFailed"));case 5:return t.p=5,_.value=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}));return function(){return t.apply(this,arguments)}}(),Nt=function(){b.value?m.value=y.value.filter(function(t){return t.symbol.toLowerCase().includes(b.value.toLowerCase())||t.name&&t.name.toLowerCase().includes(b.value.toLowerCase())}):m.value=y.value},Ot=function(t){b.value=t,0===y.value.length&&t&&(x.value=!0),Nt()},zt=function(t){x.value=t,t||(b.value="")},Vt=function(t){if("__empty_watchlist_hint__"!==t){if("__add_stock_option__"===t)return w.value=!0,void setTimeout(function(){p.value=void 0},0);var e=y.value.find(function(e){return e.value===t});if(e||(e=m.value.find(function(e){return e.value===t})),!e&&t.includes(":")){var i=t.split(":"),n=(0,s.A)(i,2),a=n[0],r=n[1];e={market:a,symbol:r,value:t}}e&&(Y.value=e.market,$.value=e.symbol,p.value=e.value)}},Wt=function(t,e){var i,n=(null===(i=e.componentOptions)||void 0===i||null===(i=i.propsData)||void 0===i?void 0:i.value)||"";return"__empty_watchlist_hint__"===n||"__add_stock_option__"===n||n.toLowerCase().includes(t.toLowerCase())},Ht=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return t.p=0,t.n=1,(0,f.iO)();case 1:e=t.v,e&&1===e.code&&e.data&&Array.isArray(e.data)?T.value=e.data.map(function(t){return{value:t.value,i18nKey:t.i18nKey||"dashboard.analysis.market.".concat(t.value)}}):e&&1===e.code&&e.data&&"object"===(0,o.A)(e.data)?T.value=Object.keys(e.data).map(function(t){return{value:t,i18nKey:"dashboard.analysis.market.".concat(t)}}):T.value=[{value:"USStock",i18nKey:"dashboard.analysis.market.USStock"},{value:"Crypto",i18nKey:"dashboard.analysis.market.Crypto"},{value:"Forex",i18nKey:"dashboard.analysis.market.Forex"},{value:"Futures",i18nKey:"dashboard.analysis.market.Futures"}],T.value.length>0&&!C.value&&(C.value=T.value[0].value),t.n=3;break;case 2:t.p=2,t.v,T.value=[{value:"USStock",i18nKey:"dashboard.analysis.market.USStock"},{value:"Crypto",i18nKey:"dashboard.analysis.market.Crypto"},{value:"Forex",i18nKey:"dashboard.analysis.market.Forex"},{value:"Futures",i18nKey:"dashboard.analysis.market.Futures"}];case 3:return t.a(2)}},t,null,[[0,2]])}));return function(){return t.apply(this,arguments)}}(),$t=function(){w.value=!1,M.value=null,k.value="",I.value=[],B.value=!1,C.value=T.value.length>0?T.value[0].value:""},Yt=function(t){C.value=t,k.value="",I.value=[],M.value=null,B.value=!1,Zt(t)},Xt=function(t){var e=t.target.value;if(k.value=e,D.value&&clearTimeout(D.value),!e||""===e.trim())return I.value=[],B.value=!1,void(M.value=null);D.value=setTimeout(function(){jt(e)},500)},Kt=function(t){t&&t.trim()&&(C.value?I.value.length>0||(B.value&&0===I.value.length?Ut():jt(t)):u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")))},jt=function(){var t=(0,c.A)((0,l.A)().m(function t(e){var n;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e&&""!==e.trim()){t.n=1;break}return I.value=[],B.value=!1,t.a(2);case 1:if(C.value){t.n=2;break}return u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")),t.a(2);case 2:return E.value=!0,B.value=!0,t.p=3,t.n=4,(0,f._3)({market:C.value,keyword:e.trim(),limit:20});case 4:n=t.v,n&&1===n.code&&n.data&&n.data.length>0?I.value=n.data:(I.value=[],M.value={market:C.value,symbol:e.trim().toUpperCase(),name:""}),t.n=6;break;case 5:t.p=5,t.v,I.value=[],M.value={market:C.value,symbol:e.trim().toUpperCase(),name:""};case 6:return t.p=6,E.value=!1,t.f(6);case 7:return t.a(2)}},t,null,[[3,5,6,7]])}));return function(e){return t.apply(this,arguments)}}(),Ut=function(){k.value&&k.value.trim()?C.value?M.value={market:C.value,symbol:k.value.trim().toUpperCase(),name:""}:u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")):u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseEnterSymbol"))},Gt=function(t){M.value={market:t.market,symbol:t.symbol,name:t.name||t.symbol}},Zt=function(){var t=(0,c.A)((0,l.A)().m(function t(e){var i;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e||(e=C.value||(T.value.length>0?T.value[0].value:"")),e){t.n=1;break}return t.a(2);case 1:return P.value=!0,t.p=2,t.n=3,(0,f.z6)({market:e,limit:10});case 3:i=t.v,i&&1===i.code&&i.data?A.value=i.data:A.value=[],t.n=5;break;case 4:t.p=4,t.v,A.value=[];case 5:return t.p=5,P.value=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}));return function(e){return t.apply(this,arguments)}}(),qt=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,a,r,o,s,c;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e="",a="",!M.value){t.n=1;break}e=M.value.market,a=M.value.symbol.toUpperCase(),t.n=4;break;case 1:if(!k.value||!k.value.trim()){t.n=3;break}if(C.value){t.n=2;break}return u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")),t.a(2);case 2:e=C.value,a=k.value.trim().toUpperCase(),t.n=4;break;case 3:return u.A.warning(i.$t("dashboard.analysis.modal.addStock.pleaseSelectOrEnterSymbol")),t.a(2);case 4:return S.value=!0,t.p=5,t.n=6,(0,f.dp)({userid:n.value,market:e,symbol:a});case 6:if(r=t.v,!r||1!==r.code){t.n=8;break}return u.A.success(i.$t("dashboard.analysis.message.addStockSuccess")),$t(),t.n=7,Lt();case 7:t.n=9;break;case 8:u.A.error((null===r||void 0===r?void 0:r.msg)||i.$t("dashboard.analysis.message.addStockFailed"));case 9:t.n=11;break;case 10:t.p=10,c=t.v,s=(null===c||void 0===c||null===(o=c.response)||void 0===o||null===(o=o.data)||void 0===o?void 0:o.msg)||(null===c||void 0===c?void 0:c.message)||i.$t("dashboard.analysis.message.addStockFailed"),u.A.error(s);case 11:return t.p=11,S.value=!1,t.f(11);case 12:return t.a(2)}},t,null,[[5,10,11,12]])}));return function(){return t.apply(this,arguments)}}(),Jt=function(t){if(!ie(t.id)){var e=t.params||t.defaultParams||{};G.value.push((0,d.A)((0,d.A)({},t),{},{id:t.id,params:(0,d.A)({},e)}))}},Qt=function(t){G.value=G.value.filter(function(e){return e.id!==t})},te=function(t){var e=t.action,i=t.indicator;if("add"===e){var n=(0,d.A)((0,d.A)({},i),{},{calculate:ee(i.id)});Jt(n)}else"remove"===e&&Qt(i.id)},ee=function(t){return null},ie=function(t){return"sma"===t?q.some(function(t){return G.value.some(function(e){return e.id===t.id})}):"ema"===t?J.some(function(t){return G.value.some(function(e){return e.id===t.id})}):G.value.some(function(e){return e.id===t})},ne=function(){var t=new Set;return q.forEach(function(e){return t.add(e.id)}),J.forEach(function(e){return t.add(e.id)}),G.value.filter(function(e){return!t.has(e.id)})},ae=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,i,a;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(n.value){t.n=1;break}return t.a(2);case 1:return et.value=!0,t.p=2,t.n=3,(0,v.Ay)({url:"/api/indicator/getIndicators",method:"get",params:{userid:n.value}});case 3:e=t.v,1===e.code&&e.data&&(i=e.data.filter(function(t){return!t.is_buy||0===t.is_buy||"0"===t.is_buy}),a=e.data.filter(function(t){return 1===t.is_buy||"1"===t.is_buy}),Q.value=i.map(function(t){return(0,d.A)((0,d.A)({},t),{},{type:"python",source:"custom"})}),tt.value=a.map(function(t){return(0,d.A)((0,d.A)({},t),{},{type:"python",source:"purchased"})})),t.n=5;break;case 4:t.p=4,t.v;case 5:return t.p=5,et.value=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}));return function(){return t.apply(this,arguments)}}(),re=(0,h.KR)(null),oe=function(){var t=(0,c.A)((0,l.A)().m(function t(e,n){var a,r,o,s,c,h,p,v,f;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(a="".concat(n,"-").concat(e.id),!ie(a)){t.n=1;break}return Qt(a),t.a(2);case 1:if(t.p=1,r=e.code||"",re.value){t.n=2;break}return u.A.error(i.$t("dashboard.indicator.error.chartNotReady")),t.a(2);case 2:if("function"===typeof re.value.parsePythonStrategy){t.n=3;break}return u.A.error(i.$t("dashboard.indicator.error.chartMethodNotReady")),t.a(2);case 3:if("function"===typeof re.value.executePythonStrategy){t.n=4;break}return u.A.error(i.$t("dashboard.indicator.error.chartExecuteNotReady")),t.a(2);case 4:if(o=re.value.parsePythonStrategy(r),o){t.n=5;break}return u.A.error(i.$t("dashboard.indicator.error.parseFailed")),t.a(2);case 5:s=e.userParams||{},c=r,h=(0,d.A)({},s),p={id:a,name:e.name,type:"python",code:c,description:e.description,parsed:o,userParams:h,originalId:e.id,user_id:e.user_id||e.userId,is_encrypted:e.is_encrypted||e.isEncrypted||0,calculate:function(t,i){return re.value.executePythonStrategy(c,t,(0,d.A)((0,d.A)({},i),h),{id:e.id,user_id:e.user_id||e.userId,is_encrypted:e.is_encrypted||e.isEncrypted||0})}},v=(0,d.A)((0,d.A)({},o.params),s),G.value.push((0,d.A)((0,d.A)({},p),{},{params:v})),t.n=7;break;case 6:t.p=6,f=t.v,u.A.error(i.$t("dashboard.indicator.error.addIndicatorFailed")+": "+(f.message||"未知错误"));case 7:return t.a(2)}},t,null,[[1,6]])}));return function(e,i){return t.apply(this,arguments)}}(),se=function(){var t=(0,c.A)((0,l.A)().m(function t(e,n){var a,r,o,s,c;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(a="".concat(n,"-").concat(e.id),!ie(a)){t.n=1;break}Qt(a),t.n=5;break;case 1:return t.p=1,st.value=!0,t.n=2,i.$http.get("/api/indicator/getIndicatorParams",{params:{indicator_id:e.id}});case 2:r=t.v,r&&1===r.code&&Array.isArray(r.data)&&r.data.length>0?(rt.value=r.data,o="".concat(n,"-").concat(e.id),s=lt.value[o],c={},r.data.forEach(function(t){var e=s&&void 0!==s[t.name]?s[t.name]:t.default;e="int"===t.type?parseInt(e)||0:"float"===t.type?parseFloat(e)||0:"bool"===t.type?!0===e||"true"===e||1===e||"1"===e:e||"",c[t.name]=e}),ot.value=c,nt.value=e,at.value=n,it.value=!0):oe(e,n),t.n=4;break;case 3:t.p=3,t.v,oe(e,n);case 4:return t.p=4,st.value=!1,t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}));return function(e,i){return t.apply(this,arguments)}}(),le=function(){if(nt.value){var t="".concat(at.value,"-").concat(nt.value.id);lt.value[t]=(0,d.A)({},ot.value);var e=(0,d.A)((0,d.A)({},nt.value),{},{userParams:(0,d.A)({},ot.value)});oe(e,at.value)}it.value=!1,nt.value=null,at.value=""},ce=function(){ue(),it.value=!1,setTimeout(function(){nt.value=null,at.value=""},100)},ue=function(){if(nt.value&&at.value){var t="".concat(at.value,"-").concat(nt.value.id);lt.value[t]=JSON.parse(JSON.stringify(ot.value))}},de=function(){ue()},he=function(t){var e=t.code,n=t.name;if(e&&e.trim())try{if(!re.value)return void u.A.error(i.$t("dashboard.indicator.error.chartNotReady"));if("function"!==typeof re.value.parsePythonStrategy)return void u.A.error(i.$t("dashboard.indicator.error.chartMethodNotReady"));if("function"!==typeof re.value.executePythonStrategy)return void u.A.error(i.$t("dashboard.indicator.error.chartExecuteNotReady"));var a=re.value.parsePythonStrategy(e);if(!a)return void u.A.error(i.$t("dashboard.indicator.error.parseFailedCheck"));var r={id:"temp-editor-indicator",name:n||"临时指标",type:"python",code:e,description:"",parsed:a,calculate:function(t,i){var n=e;return re.value.executePythonStrategy(n,t,i)}},o=G.value.findIndex(function(t){return"temp-editor-indicator"===t.id});o>=0&&G.value.splice(o,1),G.value.push((0,d.A)((0,d.A)({},r),{},{params:(0,d.A)({},a.params)})),u.A.success(i.$t("dashboard.indicator.success.runIndicator"))}catch(s){u.A.error(i.$t("dashboard.indicator.error.runIndicatorFailed")+": "+(s.message||"未知错误"))}else u.A.warning(i.$t("dashboard.indicator.warning.enterCode"))},pe=function(){ht.value=null,dt.value=!0},ve=function(t){ht.value=t,dt.value=!0},fe=function(){ct.value=!ct.value},ge=function(t){r.A.confirm({title:i.$t("dashboard.indicator.delete.confirmTitle"),content:i.$t("dashboard.indicator.delete.confirmContent",{name:t.name}),okText:i.$t("dashboard.indicator.delete.confirmOk"),okType:"danger",cancelText:i.$t("dashboard.indicator.delete.confirmCancel"),onOk:function(){var e=(0,c.A)((0,l.A)().m(function e(){var a,r,o;return(0,l.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,v.Ay)({url:"/api/indicator/deleteIndicator",method:"post",data:{id:t.id,userid:n.value}});case 1:if(a=e.v,1!==a.code){e.n=3;break}return u.A.success(i.$t("dashboard.indicator.delete.success")),r="custom-"+t.id,ie(r)&&Qt(r),e.n=2,ae();case 2:e.n=4;break;case 3:u.A.error(a.msg||i.$t("dashboard.indicator.delete.failed"));case 4:e.n=6;break;case 5:e.p=5,o=e.v,u.A.error(i.$t("dashboard.indicator.delete.failed")+": "+(o.message||"未知错误"));case 6:return e.a(2)}},e,null,[[0,5]])}));function a(){return e.apply(this,arguments)}return a}()})},me=function(t){i.$router.push({path:"/backtest-center",query:{tab:"indicator",indicator_id:String(t.id)}})},ye=function(t){i.$router.push({path:"/backtest-center",query:{tab:"indicator",indicator_id:String(t.id),view:"history"}})},_e=function(t){},be=function(t){bt.value=(0,d.A)({},t),St.value=t.pricing_type||"free",Ct.value=t.price||10,kt.value=t.description||"",It.value=!!t.vip_free,_t.value=!0},xe=function(t){i.$router.push({path:"/trading-assistant",query:{mode:"create",indicator_id:String(t.id),indicator_name:t.name||"",indicator_desc:t.description||""}})},we=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e,a;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(n.value){t.n=1;break}return u.A.error(i.$t("dashboard.indicator.error.pleaseLogin")),t.a(2);case 1:return xt.value=!0,t.p=2,t.n=3,(0,v.Ay)({url:"/api/indicator/saveIndicator",method:"post",data:{userid:n.value,id:bt.value.id,code:bt.value.code,name:bt.value.name,description:kt.value,publishToCommunity:!0,pricingType:St.value,price:"paid"===St.value?Ct.value:0,vipFree:"paid"===St.value&&It.value}});case 3:if(e=t.v,1!==e.code){t.n=5;break}return u.A.success(i.$t("dashboard.indicator.publish.success")),_t.value=!1,bt.value=null,t.n=4,ae();case 4:t.n=6;break;case 5:u.A.error(e.msg||i.$t("dashboard.indicator.publish.failed"));case 6:t.n=8;break;case 7:t.p=7,a=t.v,u.A.error(i.$t("dashboard.indicator.publish.failed")+": "+(a.message||""));case 8:return t.p=8,xt.value=!1,t.f(8);case 9:return t.a(2)}},t,null,[[2,7,8,9]])}));return function(){return t.apply(this,arguments)}}(),Se=function(){var t=(0,c.A)((0,l.A)().m(function t(){var e;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(n.value&&bt.value){t.n=1;break}return t.a(2);case 1:return wt.value=!0,t.p=2,t.n=3,(0,v.Ay)({url:"/api/indicator/saveIndicator",method:"post",data:{userid:n.value,id:bt.value.id,code:bt.value.code,name:bt.value.name,description:bt.value.description,publishToCommunity:!1,pricingType:"free",price:0,vipFree:!1}});case 3:if(e=t.v,1!==e.code){t.n=5;break}return u.A.success(i.$t("dashboard.indicator.publish.unpublishSuccess")),_t.value=!1,bt.value=null,t.n=4,ae();case 4:t.n=6;break;case 5:u.A.error(e.msg||i.$t("dashboard.indicator.publish.unpublishFailed"));case 6:t.n=8;break;case 7:t.p=7,t.v,u.A.error(i.$t("dashboard.indicator.publish.unpublishFailed"));case 8:return t.p=8,wt.value=!1,t.f(8);case 9:return t.a(2)}},t,null,[[2,7,8,9]])}));return function(){return t.apply(this,arguments)}}(),Ce=function(){var t=(0,c.A)((0,l.A)().m(function t(e){var a,r,o;return(0,l.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(n.value){t.n=1;break}return u.A.error(i.$t("dashboard.indicator.error.pleaseLogin")),t.a(2);case 1:return a=i.$refs.indicatorEditor,a&&(a.saving=!0),t.p=2,t.n=3,(0,v.Ay)({url:"/api/indicator/saveIndicator",method:"post",data:{userid:n.value,id:e.id||0,code:e.code}});case 3:if(r=t.v,1!==r.code){t.n=5;break}return u.A.success(i.$t("dashboard.indicator.save.success")),dt.value=!1,ht.value=null,t.n=4,ae();case 4:t.n=6;break;case 5:u.A.error(r.msg||i.$t("dashboard.indicator.save.failed"));case 6:t.n=8;break;case 7:t.p=7,o=t.v,u.A.error(i.$t("dashboard.indicator.save.failed")+": "+(o.message||"未知错误"));case 8:return t.p=8,a&&(a.saving=!1),t.f(8);case 9:return t.a(2)}},t,null,[[2,7,8,9]])}));return function(e){return t.apply(this,arguments)}}(),ke=function(t){var e=t.end_time;if(1===e||"1"===e)return i.$t("dashboard.indicator.status.normalPermanent");if(!e||0===e)return i.$t("dashboard.indicator.status.normal");var n=Math.floor(Date.now()/1e3);return e0&&!C.value&&(C.value=T.value[0].value),C.value&&Zt(C.value)):(M.value=null,k.value="",I.value=[],B.value=!1,D.value&&(clearTimeout(D.value),D.value=null))}),(0,h.wB)(function(){return ot.value},function(t){if(it.value&&nt.value&&at.value){var e="".concat(at.value,"-").concat(nt.value.id);lt.value[e]=JSON.parse(JSON.stringify(t))}},{deep:!0,immediate:!1}),(0,h.wB)(it,function(t){t||ue()}),{userId:n,klineChart:re,searchSymbol:p,symbolSuggestions:m,watchlist:y,symbolSearchValue:b,symbolSearchOpen:x,currentSymbol:$,currentMarket:Y,currentPrice:X,priceChange:K,priceChangeClass:j,timeframe:U,loadingWatchlist:_,activeIndicators:G,trendIndicators:Dt,oscillatorIndicators:Tt,customIndicators:Q,purchasedIndicators:tt,loadingIndicators:et,realtimeEnabled:At,toggleRealtime:De,handleSymbolSearch:Ot,handleSymbolSelect:Vt,handleDropdownVisibleChange:zt,filterSymbolOption:Wt,getMarketName:Pe,getMarketColor:Me,setTimeframe:Bt,addIndicator:Jt,removeIndicator:Qt,isIndicatorActive:ie,loadIndicators:ae,addPythonIndicator:oe,toggleIndicator:se,getIndicatorStatus:ke,getIndicatorStatusIcon:Ie,getIndicatorStatusClass:Ee,getExpiryTimeText:Ae,formatParams:Ft,loadWatchlist:Lt,getCustomActiveIndicators:ne,showIndicatorEditor:dt,editingIndicator:ht,handleCreateIndicator:pe,handleRunIndicator:he,handleSaveIndicator:Ce,handleEditIndicator:ve,handleDeleteIndicator:ge,toggleCustomSection:fe,customSectionCollapsed:ct,purchasedSectionCollapsed:ut,handlePriceChange:Pt,handleChartRetry:Mt,handleIndicatorToggle:te,showParamsModal:it,pendingIndicator:nt,indicatorParams:rt,indicatorParamValues:ot,loadingParams:st,confirmIndicatorParams:le,cancelIndicatorParams:ce,handleParamsModalAfterClose:de,showBacktestModal:pt,backtestIndicator:vt,handleOpenBacktest:me,showBacktestHistoryDrawer:ft,backtestHistoryIndicator:gt,handleOpenBacktestHistory:ye,showBacktestRunViewer:mt,selectedBacktestRun:yt,handleViewBacktestRun:_e,showPublishModal:_t,publishIndicator:bt,publishing:xt,unpublishing:wt,publishPricingType:St,publishPrice:Ct,publishDescription:kt,publishVipFree:It,publishRules:Et,handlePublishIndicator:be,handleCreateStrategyFromIndicator:xe,handleConfirmPublish:we,handleUnpublish:Se,selectedSymbol:$,selectedMarket:Y,selectedTimeframe:U,isMobile:Z,showAddStockModal:w,addingStock:S,selectedMarketTab:C,symbolSearchKeyword:k,symbolSearchResults:I,searchingSymbols:E,hotSymbols:A,loadingHotSymbols:P,selectedSymbolForAdd:M,marketTypes:T,hasSearched:B,handleCloseAddStockModal:$t,handleMarketTabChange:Yt,handleSymbolSearchInput:Xt,handleSearchOrInput:Kt,searchSymbolsInModal:jt,selectSymbol:Gt,loadHotSymbols:Zt,handleAddStock:qt,handleDirectAdd:Ut,loadMarketTypes:Ht,showQuickTrade:F,qtSymbol:R,qtSide:L,qtPrice:N,isCryptoMarket:O,openQuickTrade:z,onQuickTradeSuccess:V,handleQuickTradeSymbolChange:W,goToIndicatorMarket:H}}},Wa=Va,Ha=(0,E.A)(Wa,n,a,!1,null,"6bd239a6",null),$a=Ha.exports},40955:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(80754),i(84636),i(39506),i(57165))})(0,function(t){return function(){var e=t,i=e.lib,n=i.BlockCipher,a=e.algo,r=[],o=[],s=[],l=[],c=[],u=[],d=[],h=[],p=[],v=[];(function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var i=0,n=0;for(e=0;e<256;e++){var a=n^n<<1^n<<2^n<<3^n<<4;a=a>>>8^255&a^99,r[i]=a,o[a]=i;var f=t[i],g=t[f],m=t[g],y=257*t[a]^16843008*a;s[i]=y<<24|y>>>8,l[i]=y<<16|y>>>16,c[i]=y<<8|y>>>24,u[i]=y;y=16843009*m^65537*g^257*f^16843008*i;d[a]=y<<24|y>>>8,h[a]=y<<16|y>>>16,p[a]=y<<8|y>>>24,v[a]=y,i?(i=f^t[t[t[m^f]]],n^=t[t[n]]):i=n=1}})();var f=[0,1,2,4,8,16,32,64,128,27,54],g=a.AES=n.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,i=t.sigBytes/4,n=this._nRounds=i+6,a=4*(n+1),o=this._keySchedule=[],s=0;s6&&s%i==4&&(u=r[u>>>24]<<24|r[u>>>16&255]<<16|r[u>>>8&255]<<8|r[255&u]):(u=u<<8|u>>>24,u=r[u>>>24]<<24|r[u>>>16&255]<<16|r[u>>>8&255]<<8|r[255&u],u^=f[s/i|0]<<24),o[s]=o[s-i]^u);for(var l=this._invKeySchedule=[],c=0;c>>24]]^h[r[u>>>16&255]]^p[r[u>>>8&255]]^v[r[255&u]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,s,l,c,u,r)},decryptBlock:function(t,e){var i=t[e+1];t[e+1]=t[e+3],t[e+3]=i,this._doCryptBlock(t,e,this._invKeySchedule,d,h,p,v,o);i=t[e+1];t[e+1]=t[e+3],t[e+3]=i},_doCryptBlock:function(t,e,i,n,a,r,o,s){for(var l=this._nRounds,c=t[e]^i[0],u=t[e+1]^i[1],d=t[e+2]^i[2],h=t[e+3]^i[3],p=4,v=1;v>>24]^a[u>>>16&255]^r[d>>>8&255]^o[255&h]^i[p++],g=n[u>>>24]^a[d>>>16&255]^r[h>>>8&255]^o[255&c]^i[p++],m=n[d>>>24]^a[h>>>16&255]^r[c>>>8&255]^o[255&u]^i[p++],y=n[h>>>24]^a[c>>>16&255]^r[u>>>8&255]^o[255&d]^i[p++];c=f,u=g,d=m,h=y}f=(s[c>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[255&h])^i[p++],g=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[h>>>8&255]<<8|s[255&c])^i[p++],m=(s[d>>>24]<<24|s[h>>>16&255]<<16|s[c>>>8&255]<<8|s[255&u])^i[p++],y=(s[h>>>24]<<24|s[c>>>16&255]<<16|s[u>>>8&255]<<8|s[255&d])^i[p++];t[e]=f,t[e+1]=g,t[e+2]=m,t[e+3]=y},keySize:8});e.AES=n._createHelper(g)}(),t.AES})},43128:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(80754),i(84636),i(39506),i(57165))})(0,function(t){return function(){var e=t,i=e.lib,n=i.BlockCipher,a=e.algo;const r=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],s=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var l={pbox:[],sbox:[]};function c(t,e){let i=e>>24&255,n=e>>16&255,a=e>>8&255,r=255&e,o=t.sbox[0][i]+t.sbox[1][n];return o^=t.sbox[2][a],o+=t.sbox[3][r],o}function u(t,e,i){let n,a=e,o=i;for(let s=0;s1;--s)a^=t.pbox[s],o=c(t,a)^o,n=a,a=o,o=n;return n=a,a=o,o=n,o^=t.pbox[1],a^=t.pbox[0],{left:a,right:o}}function h(t,e,i){for(let r=0;r<4;r++){t.sbox[r]=[];for(let e=0;e<256;e++)t.sbox[r][e]=s[r][e]}let n=0;for(let s=0;s=i&&(n=0);let a=0,l=0,c=0;for(let o=0;o>>2];t.sigBytes-=e}},m=(n.BlockCipher=d.extend({cfg:d.cfg.extend({mode:v,padding:g}),reset:function(){var t;d.reset.call(this);var e=this.cfg,i=e.iv,n=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=n.createEncryptor:(t=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,i&&i.words):(this._mode=t.call(n,this,i&&i.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4}),n.CipherParams=a.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),y=i.format={},_=y.OpenSSL={stringify:function(t){var e,i=t.ciphertext,n=t.salt;return e=n?r.create([1398893684,1701076831]).concat(n).concat(i):i,e.toString(l)},parse:function(t){var e,i=l.parse(t),n=i.words;return 1398893684==n[0]&&1701076831==n[1]&&(e=r.create(n.slice(2,4)),n.splice(0,4),i.sigBytes-=16),m.create({ciphertext:i,salt:e})}},b=n.SerializableCipher=a.extend({cfg:a.extend({format:_}),encrypt:function(t,e,i,n){n=this.cfg.extend(n);var a=t.createEncryptor(i,n),r=a.finalize(e),o=a.cfg;return m.create({ciphertext:r,key:i,iv:o.iv,algorithm:t,mode:o.mode,padding:o.padding,blockSize:t.blockSize,formatter:n.format})},decrypt:function(t,e,i,n){n=this.cfg.extend(n),e=this._parse(e,n.format);var a=t.createDecryptor(i,n).finalize(e.ciphertext);return a},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),x=i.kdf={},w=x.OpenSSL={execute:function(t,e,i,n,a){if(n||(n=r.random(8)),a)o=u.create({keySize:e+i,hasher:a}).compute(t,n);else var o=u.create({keySize:e+i}).compute(t,n);var s=r.create(o.words.slice(e),4*i);return o.sigBytes=4*e,m.create({key:o,iv:s,salt:n})}},S=n.PasswordBasedCipher=b.extend({cfg:b.cfg.extend({kdf:w}),encrypt:function(t,e,i,n){n=this.cfg.extend(n);var a=n.kdf.execute(i,t.keySize,t.ivSize,n.salt,n.hasher);n.iv=a.iv;var r=b.encrypt.call(this,t,e,a.key,n);return r.mixIn(a),r},decrypt:function(t,e,i,n){n=this.cfg.extend(n),e=this._parse(e,n.format);var a=n.kdf.execute(i,t.keySize,t.ivSize,e.salt,n.hasher);n.iv=a.iv;var r=b.decrypt.call(this,t,e,a.key,n);return r}})}()})},19021:function(t,e,i){(function(e,i){t.exports=i()})(0,function(){var t=t||function(t,e){var n;if("undefined"!==typeof window&&window.crypto&&(n=window.crypto),"undefined"!==typeof self&&self.crypto&&(n=self.crypto),"undefined"!==typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!==typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&"undefined"!==typeof i.g&&i.g.crypto&&(n=i.g.crypto),!n)try{n=i(50477)}catch(g){}var a=function(){if(n){if("function"===typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(g){}if("function"===typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(g){}}throw new Error("Native crypto module could not be used to get secure random number.")},r=Object.create||function(){function t(){}return function(e){var i;return t.prototype=e,i=new t,t.prototype=null,i}}(),o={},s=o.lib={},l=s.Base=function(){return{extend:function(t){var e=r(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=s.WordArray=l.extend({init:function(t,i){t=this.words=t||[],this.sigBytes=i!=e?i:4*t.length},toString:function(t){return(t||d).stringify(this)},concat:function(t){var e=this.words,i=t.words,n=this.sigBytes,a=t.sigBytes;if(this.clamp(),n%4)for(var r=0;r>>2]>>>24-r%4*8&255;e[n+r>>>2]|=o<<24-(n+r)%4*8}else for(var s=0;s>>2]=i[s>>>2];return this.sigBytes+=a,this},clamp:function(){var e=this.words,i=this.sigBytes;e[i>>>2]&=4294967295<<32-i%4*8,e.length=t.ceil(i/4)},clone:function(){var t=l.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],i=0;i>>2]>>>24-a%4*8&255;n.push((r>>>4).toString(16)),n.push((15&r).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,i=[],n=0;n>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new c.init(i,e/2)}},h=u.Latin1={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],a=0;a>>2]>>>24-a%4*8&255;n.push(String.fromCharCode(r))}return n.join("")},parse:function(t){for(var e=t.length,i=[],n=0;n>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new c.init(i,e)}},p=u.Utf8={stringify:function(t){try{return decodeURIComponent(escape(h.stringify(t)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(t){return h.parse(unescape(encodeURIComponent(t)))}},v=s.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=p.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var i,n=this._data,a=n.words,r=n.sigBytes,o=this.blockSize,s=4*o,l=r/s;l=e?t.ceil(l):t.max((0|l)-this._minBufferSize,0);var u=l*o,d=t.min(4*u,r);if(u){for(var h=0;h>>2]>>>24-r%4*8&255,s=e[r+1>>>2]>>>24-(r+1)%4*8&255,l=e[r+2>>>2]>>>24-(r+2)%4*8&255,c=o<<16|s<<8|l,u=0;u<4&&r+.75*u>>6*(3-u)&63));var d=n.charAt(64);if(d)while(a.length%4)a.push(d);return a.join("")},parse:function(t){var e=t.length,i=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var a=0;a>>6-o%4*2,c=s|l;a[r>>>2]|=c<<24-r%4*8,r++}return n.create(a,r)}}(),t.enc.Base64})},64725:function(t,e,i){(function(e,n){t.exports=n(i(19021))})(0,function(t){return function(){var e=t,i=e.lib,n=i.WordArray,a=e.enc;a.Base64url={stringify:function(t,e){void 0===e&&(e=!0);var i=t.words,n=t.sigBytes,a=e?this._safe_map:this._map;t.clamp();for(var r=[],o=0;o>>2]>>>24-o%4*8&255,l=i[o+1>>>2]>>>24-(o+1)%4*8&255,c=i[o+2>>>2]>>>24-(o+2)%4*8&255,u=s<<16|l<<8|c,d=0;d<4&&o+.75*d>>6*(3-d)&63));var h=a.charAt(64);if(h)while(r.length%4)r.push(h);return r.join("")},parse:function(t,e){void 0===e&&(e=!0);var i=t.length,n=e?this._safe_map:this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var o=0;o>>6-o%4*2,c=s|l;a[r>>>2]|=c<<24-r%4*8,r++}return n.create(a,r)}}(),t.enc.Base64url})},45503:function(t,e,i){(function(e,n){t.exports=n(i(19021))})(0,function(t){return function(){var e=t,i=e.lib,n=i.WordArray,a=e.enc;a.Utf16=a.Utf16BE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],a=0;a>>2]>>>16-a%4*8&65535;n.push(String.fromCharCode(r))}return n.join("")},parse:function(t){for(var e=t.length,i=[],a=0;a>>1]|=t.charCodeAt(a)<<16-a%2*16;return n.create(i,2*e)}};function r(t){return t<<8&4278255360|t>>>8&16711935}a.Utf16LE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],a=0;a>>2]>>>16-a%4*8&65535);n.push(String.fromCharCode(o))}return n.join("")},parse:function(t){for(var e=t.length,i=[],a=0;a>>1]|=r(t.charCodeAt(a)<<16-a%2*16);return n.create(i,2*e)}}}(),t.enc.Utf16})},39506:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(45471),i(51025))})(0,function(t){return function(){var e=t,i=e.lib,n=i.Base,a=i.WordArray,r=e.algo,o=r.MD5,s=r.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:o,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){var i,n=this.cfg,r=n.hasher.create(),o=a.create(),s=o.words,l=n.keySize,c=n.iterations;while(s.lengthn&&(e=t.finalize(e)),e.clamp();for(var a=this._oKey=e.clone(),o=this._iKey=e.clone(),s=a.words,l=o.words,c=0;c>>2]|=t[n]<<24-n%4*8;a.call(this,i,e)}else a.apply(this,arguments)};r.prototype=n}}(),t.lib.WordArray})},84636:function(t,e,i){(function(e,n){t.exports=n(i(19021))})(0,function(t){return function(e){var i=t,n=i.lib,a=n.WordArray,r=n.Hasher,o=i.algo,s=[];(function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0})();var l=o.MD5=r.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var i=0;i<16;i++){var n=e+i,a=t[n];t[n]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}var r=this._hash.words,o=t[e+0],l=t[e+1],p=t[e+2],v=t[e+3],f=t[e+4],g=t[e+5],m=t[e+6],y=t[e+7],_=t[e+8],b=t[e+9],x=t[e+10],w=t[e+11],S=t[e+12],C=t[e+13],k=t[e+14],I=t[e+15],E=r[0],A=r[1],P=r[2],M=r[3];E=c(E,A,P,M,o,7,s[0]),M=c(M,E,A,P,l,12,s[1]),P=c(P,M,E,A,p,17,s[2]),A=c(A,P,M,E,v,22,s[3]),E=c(E,A,P,M,f,7,s[4]),M=c(M,E,A,P,g,12,s[5]),P=c(P,M,E,A,m,17,s[6]),A=c(A,P,M,E,y,22,s[7]),E=c(E,A,P,M,_,7,s[8]),M=c(M,E,A,P,b,12,s[9]),P=c(P,M,E,A,x,17,s[10]),A=c(A,P,M,E,w,22,s[11]),E=c(E,A,P,M,S,7,s[12]),M=c(M,E,A,P,C,12,s[13]),P=c(P,M,E,A,k,17,s[14]),A=c(A,P,M,E,I,22,s[15]),E=u(E,A,P,M,l,5,s[16]),M=u(M,E,A,P,m,9,s[17]),P=u(P,M,E,A,w,14,s[18]),A=u(A,P,M,E,o,20,s[19]),E=u(E,A,P,M,g,5,s[20]),M=u(M,E,A,P,x,9,s[21]),P=u(P,M,E,A,I,14,s[22]),A=u(A,P,M,E,f,20,s[23]),E=u(E,A,P,M,b,5,s[24]),M=u(M,E,A,P,k,9,s[25]),P=u(P,M,E,A,v,14,s[26]),A=u(A,P,M,E,_,20,s[27]),E=u(E,A,P,M,C,5,s[28]),M=u(M,E,A,P,p,9,s[29]),P=u(P,M,E,A,y,14,s[30]),A=u(A,P,M,E,S,20,s[31]),E=d(E,A,P,M,g,4,s[32]),M=d(M,E,A,P,_,11,s[33]),P=d(P,M,E,A,w,16,s[34]),A=d(A,P,M,E,k,23,s[35]),E=d(E,A,P,M,l,4,s[36]),M=d(M,E,A,P,f,11,s[37]),P=d(P,M,E,A,y,16,s[38]),A=d(A,P,M,E,x,23,s[39]),E=d(E,A,P,M,C,4,s[40]),M=d(M,E,A,P,o,11,s[41]),P=d(P,M,E,A,v,16,s[42]),A=d(A,P,M,E,m,23,s[43]),E=d(E,A,P,M,b,4,s[44]),M=d(M,E,A,P,S,11,s[45]),P=d(P,M,E,A,I,16,s[46]),A=d(A,P,M,E,p,23,s[47]),E=h(E,A,P,M,o,6,s[48]),M=h(M,E,A,P,y,10,s[49]),P=h(P,M,E,A,k,15,s[50]),A=h(A,P,M,E,g,21,s[51]),E=h(E,A,P,M,S,6,s[52]),M=h(M,E,A,P,v,10,s[53]),P=h(P,M,E,A,x,15,s[54]),A=h(A,P,M,E,l,21,s[55]),E=h(E,A,P,M,_,6,s[56]),M=h(M,E,A,P,I,10,s[57]),P=h(P,M,E,A,m,15,s[58]),A=h(A,P,M,E,C,21,s[59]),E=h(E,A,P,M,f,6,s[60]),M=h(M,E,A,P,w,10,s[61]),P=h(P,M,E,A,p,15,s[62]),A=h(A,P,M,E,b,21,s[63]),r[0]=r[0]+E|0,r[1]=r[1]+A|0,r[2]=r[2]+P|0,r[3]=r[3]+M|0},_doFinalize:function(){var t=this._data,i=t.words,n=8*this._nDataBytes,a=8*t.sigBytes;i[a>>>5]|=128<<24-a%32;var r=e.floor(n/4294967296),o=n;i[15+(a+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),i[14+(a+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(i.length+1),this._process();for(var s=this._hash,l=s.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});function c(t,e,i,n,a,r,o){var s=t+(e&i|~e&n)+a+o;return(s<>>32-r)+e}function u(t,e,i,n,a,r,o){var s=t+(e&n|i&~n)+a+o;return(s<>>32-r)+e}function d(t,e,i,n,a,r,o){var s=t+(e^i^n)+a+o;return(s<>>32-r)+e}function h(t,e,i,n,a,r,o){var s=t+(i^(e|~n))+a+o;return(s<>>32-r)+e}i.MD5=r._createHelper(l),i.HmacMD5=r._createHmacHelper(l)}(Math),t.MD5})},82169:function(t,e,i){(function(e,n){t.exports=n(i(19021),i(57165))})(0,function(t){return t.mode.CFB=function(){var e=t.lib.BlockCipherMode.extend();function i(t,e,i,n){var a,r=this._iv;r?(a=r.slice(0),this._iv=void 0):a=this._prevBlock,n.encryptBlock(a,0);for(var o=0;o",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,function(t,n,l){l&&l!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(o(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))});var i={Backspace:s,Enter:u};function o(e){for(var t=0;t=0;s--){var c=l[s].head;t.replaceRange("",n(c.line,c.ch-1),n(c.line,c.ch+1),"+delete")}}function u(t){var n=a(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var o=t.listSelections(),l=0;l0?{line:l.head.line,ch:l.head.ch+t}:{line:l.head.line-1};n.push({anchor:a,head:a})}e.setSelections(n,i)}function h(t){var r=e.cmpPos(t.anchor,t.head)>0;return{anchor:new n(t.anchor.line,t.anchor.ch+(r?-1:1)),head:new n(t.head.line,t.head.ch+(r?1:-1))}}function f(t,i){var o=a(t);if(!o||t.getOption("disableInput"))return e.Pass;var l=r(o,"pairs"),s=l.indexOf(i);if(-1==s)return e.Pass;for(var u,f=r(o,"closeBefore"),d=r(o,"triples"),g=l.charAt(s+1)==i,v=t.listSelections(),m=s%2==0,y=0;y1&&d.indexOf(i)>=0&&t.getRange(n(x.line,x.ch-2),x)==i+i){if(x.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(x.line,x.ch-2))))return e.Pass;b="addFour"}else if(g){var S=0==x.ch?" ":t.getRange(n(x.line,x.ch-1),x);if(e.isWordChar(C)||S==i||e.isWordChar(S))return e.Pass;b="both"}else{if(!m||!(0===C.length||/\s/.test(C)||f.indexOf(C)>-1))return e.Pass;b="both"}else b=g&&p(t,x)?"both":d.indexOf(i)>=0&&t.getRange(x,n(x.line,x.ch+3))==i+i+i?"skipThree":"skip";if(u){if(u!=b)return e.Pass}else u=b}var k=s%2?l.charAt(s-1):i,L=s%2?i:l.charAt(s+1);t.operation(function(){if("skip"==u)c(t,1);else if("skipThree"==u)c(t,3);else if("surround"==u){for(var e=t.getSelections(),n=0;n",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function i(e){return e&&e.bracketRegex||/[(){}[\]]/}function o(e,t,o){var a=e.getLineHandle(t.line),s=t.ch-1,u=o&&o.afterCursor;null==u&&(u=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var c=i(o),h=!u&&s>=0&&c.test(a.text.charAt(s))&&r[a.text.charAt(s)]||c.test(a.text.charAt(s+1))&&r[a.text.charAt(++s)];if(!h)return null;var f=">"==h.charAt(1)?1:-1;if(o&&o.strict&&f>0!=(s==t.ch))return null;var d=e.getTokenTypeAt(n(t.line,s+1)),p=l(e,n(t.line,s+(f>0?1:0)),f,d,o);return null==p?null:{from:n(t.line,s),to:p&&p.pos,match:p&&p.ch==h.charAt(0),forward:f>0}}function l(e,t,o,l,a){for(var s=a&&a.maxScanLineLength||1e4,u=a&&a.maxScanLines||1e3,c=[],h=i(a),f=o>0?Math.min(t.line+u,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-u),d=t.line;d!=f;d+=o){var p=e.getLine(d);if(p){var g=o>0?0:p.length-1,v=o>0?p.length:-1;if(!(p.length>s))for(d==t.line&&(g=t.ch-(o<0?1:0));g!=v;g+=o){var m=p.charAt(g);if(h.test(m)&&(void 0===l||(e.getTokenTypeAt(n(d,g+1))||"")==(l||""))){var y=r[m];if(y&&">"==y.charAt(1)==o>0)c.push(m);else{if(!c.length)return{pos:n(d,g),ch:m};c.pop()}}}}}return d-o!=(o>0?e.lastLine():e.firstLine())&&null}function a(e,r,i){for(var l=e.state.matchBrackets.maxHighlightLineLength||1e3,a=i&&i.highlightNonMatching,s=[],u=e.listSelections(),c=0;c2),m=/Android/.test(e),y=v||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=v||/Mac/.test(t),w=/\bCrOS\b/.test(e),x=/win/i.test(t),C=f&&e.match(/Version\/(\d*\.\d*)/);C&&(C=Number(C[1])),C&&C>=15&&(f=!1,s=!0);var S=b&&(u||f&&(null==C||C<12.11)),k=n||l&&a>=9;function L(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var T,M=function(e,t){var n=e.className,r=L(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function N(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function A(e,t){return N(e).appendChild(t)}function O(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=a-o,l+=n-l%n,o=a+1}}v?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(P=function(e){try{e.select()}catch(t){}});var _=function(){this.id=null,this.f=null,this.time=0,this.handler=G(this.onTimeout,this)};function K(e,t){for(var n=0;n=t)return r+Math.min(l,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}var J=[""];function Q(e){while(J.length<=e)J.push(ee(J)+" ");return J[e]}function ee(e){return e[e.length-1]}function te(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||oe.test(e))}function ae(e,t){return t?!!(t.source.indexOf("\\w")>-1&&le(e))||t.test(e):le(e)}function se(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ue=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ce(e){return e.charCodeAt(0)>=768&&ue.test(e)}function he(e,t,n){while((n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function de(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;ot||t==n&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,n),1==l.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var pe=null;function ge(e,t,n){var r;pe=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:pe=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:pe=i)}return null!=r?r:pe}var ve=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var u="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!r.test(e))return!1;for(var c=e.length,h=[],f=0;f-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Ce(e,t){var n=we(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function Te(e){e.prototype.on=function(e,t){be(this,e,t)},e.prototype.off=function(e,t){xe(this,e,t)}}function Me(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ne(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ae(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Oe(e){Me(e),Ne(e)}function De(e){return e.target||e.srcElement}function We(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var He,Fe,Ee=function(){if(l&&a<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function Pe(e){if(null==He){var t=O("span","​");A(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(He=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&a<8))}var n=He?O("span","​"):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function ze(e){if(null!=Fe)return Fe;var t=A(e,document.createTextNode("AخA")),n=T(t,0,1).getBoundingClientRect(),r=T(t,1,2).getBoundingClientRect();return N(e),!(!n||n.left==n.right)&&(Fe=r.right-n.right<3)}var Ie=3!="\n\nb".split(/\n/).length?function(e){var t=0,n=[],r=e.length;while(t<=r){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(n.push(o.slice(0,l)),t+=l+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Re=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(n){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Be=function(){var e=O("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Ge=null;function Ue(e){if(null!=Ge)return Ge;var t=A(e,O("span","x")),n=t.getBoundingClientRect(),r=T(t,0,1).getBoundingClientRect();return Ge=Math.abs(n.left-r.left)>1}var Ve={},_e={};function Ke(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ve[e]=t}function je(e,t){_e[e]=t}function Xe(e){if("string"==typeof e&&_e.hasOwnProperty(e))e=_e[e];else if(e&&"string"==typeof e.name&&_e.hasOwnProperty(e.name)){var t=_e[e.name];"string"==typeof t&&(t={name:t}),e=ie(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Xe("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Xe("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ye(e,t){t=Xe(t);var n=Ve[t.name];if(!n)return Ye(e,"text/plain");var r=n(e,t);if($e.hasOwnProperty(t.name)){var i=$e[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var $e={};function qe(e,t){var n=$e.hasOwnProperty(e)?$e[e]:$e[e]={};U(t,n)}function Ze(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Je(e,t){var n;while(e.innerMode){if(n=e.innerMode(t),!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}}function Qe(e,t,n){return!e.startState||e.startState(t,n)}var et=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function tt(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");var n=e;while(!n.lines)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?ut(n,tt(e,n).text.length):mt(t,tt(e,t.line).text.length)}function mt(e,t){var n=e.ch;return null==n||n>t?ut(e.line,t):n<0?ut(e.line,0):e}function yt(e,t){for(var n=[],r=0;r=this.string.length},et.prototype.sol=function(){return this.pos==this.lineStart},et.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},et.prototype.next=function(){if(this.post},et.prototype.eatSpace=function(){var e=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos)))++this.pos;return this.pos>e},et.prototype.skipToEnd=function(){this.pos=this.string.length},et.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},et.prototype.backUp=function(e){this.pos-=e},et.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);if(i(o)==i(e))return!1!==t&&(this.pos+=e.length),!0},et.prototype.current=function(){return this.string.slice(this.start,this.pos)},et.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},et.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},et.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var bt=function(e,t){this.state=e,this.lookAhead=t},wt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function xt(e,t,n,r){var i=[e.state.modeGen],o={};Ot(e,t.text,e.doc.mode,n,function(e,t){return i.push(e,t)},o,r);for(var l=n.state,a=function(r){n.baseTokens=i;var a=e.state.overlays[r],s=1,u=0;n.state=!0,Ot(e,t.text,a.mode,n,function(e,t){var n=s;while(ue&&i.splice(s,1,e,i[s+1],r),s+=2,u=Math.min(e,r)}if(t)if(a.opaque)i.splice(n,s-n,e,"overlay "+t),s=n+2;else for(;ne.options.maxHighlightLength&&Ze(e.doc.mode,r.state),o=xt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function St(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new wt(r,!0,t);var o=Dt(e,t,n),l=o>r.first&&tt(r,o-1).stateAfter,a=l?wt.fromSaved(r,l,o):new wt(r,Qe(r.mode),o);return r.iter(o,t,function(n){kt(e,n.text,a);var r=a.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}wt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},wt.prototype.baseToken=function(e){if(!this.baseTokens)return null;while(this.baseTokens[this.baseTokenPos]<=e)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},wt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},wt.fromSaved=function(e,t,n){return t instanceof bt?new wt(e,Ze(e.mode,t.state),n,t.lookAhead):new wt(e,Ze(e.mode,t),n)},wt.prototype.save=function(e){var t=!1!==e?Ze(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new bt(t,this.maxLookAhead):t};var Mt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Nt(e,t,n,r){var i,o=e.doc,l=o.mode;t=vt(o,t);var a,s=tt(o,t.line),u=St(e,t.line,n),c=new et(s.text,e.options.tabSize,u);r&&(a=[]);while((r||c.pose.options.maxHighlightLength?(a=!1,l&&kt(e,t,r,h.pos),h.pos=t.length,s=null):s=At(Tt(n,h,r.state,f),o),f){var d=f[0].name;d&&(s="m-"+(s?d+" "+s:d))}if(!a||c!=s){while(ul;--a){if(a<=o.first)return o.first;var s=tt(o,a-1),u=s.stateAfter;if(u&&(!n||a+(u instanceof bt?u.lookAhead:0)<=o.modeFrontier))return a;var c=V(s.text,null,e.options.tabSize);(null==i||r>c)&&(i=a-1,r=c)}return i}function Wt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=tt(e,r).stateAfter;if(i&&(!(i instanceof bt)||r+i.lookAhead=t:o.to>t);(r||(r=[])).push(new zt(l,o.from,s?null:o.to))}}return r}function Ut(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t);if(a||o.from==t&&"bookmark"==l.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(l.inclusiveLeft?o.from<=t:o.from0&&a)for(var w=0;w0)){var c=[s,1],h=ct(u.from,a.from),f=ct(u.to,a.to);(h<0||!l.inclusiveLeft&&!h)&&c.push({from:u.from,to:a.from}),(f>0||!l.inclusiveRight&&!f)&&c.push({from:a.to,to:u.to}),i.splice.apply(i,c),s+=c.length-3}}return i}function jt(e){var t=e.markedSpans;if(t){for(var n=0;nt)&&(!n||qt(n,o.marker)<0)&&(n=o.marker)}return n}function tn(e,t,n,r,i){var o=tt(e,t),l=Ft&&o.markedSpans;if(l)for(var a=0;a=0&&h<=0||c<=0&&h>=0)&&(c<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?ct(u.to,n)>=0:ct(u.to,n)>0)||c>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?ct(u.from,r)<=0:ct(u.from,r)<0)))return!0}}}function nn(e){var t;while(t=Jt(e))e=t.find(-1,!0).line;return e}function rn(e){var t;while(t=Qt(e))e=t.find(1,!0).line;return e}function on(e){var t,n;while(t=Qt(e))e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function ln(e,t){var n=tt(e,t),r=nn(n);return n==r?t:ot(r)}function an(e,t){if(t>e.lastLine())return t;var n,r=tt(e,t);if(!sn(e,r))return t;while(n=Qt(r))r=n.find(1,!0).line;return ot(r)+1}function sn(e,t){var n=Ft&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}var dn=function(e,t,n){this.text=e,Xt(this,t),this.height=n?n(this):1};function pn(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),jt(e),Xt(e,n);var i=r?r(e):1;i!=e.height&&it(e,i)}function gn(e){e.parent=null,jt(e)}dn.prototype.lineNo=function(){return ot(this)},Te(dn);var vn={},mn={};function yn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?mn:vn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function bn(e,t){var n=D("span",null,null,s?"padding-right: .1px":null),r={pre:D("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,l=void 0;r.pos=0,r.addToken=xn,ze(e.display.measure)&&(l=me(o,e.doc.direction))&&(r.addToken=Sn(r.addToken,l)),r.map=[];var a=t!=e.display.externalMeasured&&ot(o);Ln(o,r,Ct(e,o,a)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=E(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=E(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Pe(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(s){var u=r.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ce(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=E(r.pre.className,r.textClass||"")),r}function wn(e){var t=O("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function xn(e,t,n,r,i,o,s){if(t){var u,c=e.splitSpaces?Cn(t,e.trailingSpace):t,h=e.cm.state.specialChars,f=!1;if(h.test(t)){u=document.createDocumentFragment();var d=0;while(1){h.lastIndex=d;var p=h.exec(t),g=p?p.index-d:t.length-d;if(g){var v=document.createTextNode(c.slice(d,d+g));l&&a<9?u.appendChild(O("span",[v])):u.appendChild(v),e.map.push(e.pos,e.pos+g,v),e.col+=g,e.pos+=g}if(!p)break;d+=g+1;var m=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,b=y-e.col%y;m=u.appendChild(O("span",Q(b),"cm-tab")),m.setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?(m=u.appendChild(O("span","\r"==p[0]?"␍":"␤","cm-invalidchar")),m.setAttribute("cm-text",p[0]),e.col+=1):(m=e.cm.options.specialCharPlaceholder(p[0]),m.setAttribute("cm-text",p[0]),l&&a<9?u.appendChild(O("span",[m])):u.appendChild(m),e.col+=1);e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,u=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,u),l&&a<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),n||r||i||f||o||s){var w=n||"";r&&(w+=r),i&&(w+=i);var x=O("span",[u],w,o);if(s)for(var C in s)s.hasOwnProperty(C)&&"style"!=C&&"class"!=C&&x.setAttribute(C,s[C]);return e.content.appendChild(x)}e.content.appendChild(u)}}function Cn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;iu&&h.from<=u)break;if(h.to>=c)return e(n,r,i,o,l,a,s);e(n,r.slice(0,h.to-u),i,o,null,a,s),o=null,r=r.slice(h.to-u),u=h.to}}}function kn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Ln(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var l,a,s,u,c,h,f,d=i.length,p=0,g=1,v="",m=0;;){if(m==p){s=u=c=a="",f=null,h=null,m=1/0;for(var y=[],b=void 0,w=0;wp||C.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(s+=" "+C.className),C.css&&(a=(a?a+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&((f||(f={})).title=C.title),C.attributes)for(var S in C.attributes)(f||(f={}))[S]=C.attributes[S];C.collapsed&&(!h||qt(h.marker,C)<0)&&(h=x)}else x.from>p&&m>x.from&&(m=x.from)}if(b)for(var k=0;k=d)break;var T=Math.min(d,m);while(1){if(v){var M=p+v.length;if(!h){var N=M>T?v.slice(0,T-p):v;t.addToken(t,N,l?l+s:s,c,p+N.length==m?u:"",a,f)}if(M>=T){v=v.slice(T-p),p=T;break}p=M,c=""}v=i.slice(o,o=n[g++]),l=yn(n[g++],t.cm.options)}}else for(var A=1;A2&&o.push((s.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function nr(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function rr(e,t){t=nn(t);var n=ot(t),r=e.display.externalMeasured=new Tn(e.doc,t,n);r.lineN=n;var i=r.built=bn(e,r);return r.text=i.pre,A(e.display.lineMeasure,i.pre),r}function ir(e,t,n,r){return ar(e,lr(e,t),n,r)}function or(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(o=s-a,i=o-1,t>=s&&(l="right")),null!=i){if(r=e[u+2],a==s&&n==(r.insertLeft?"left":"right")&&(l=n),"left"==n&&0==i)while(u&&e[u-2]==e[u-3]&&e[u-1].insertLeft)r=e[2+(u-=3)],l="left";if("right"==n&&i==s-a)while(u=0;i--)if((n=e[i]).left!=n.right)break;return n}function fr(e,t,n,r){var i,o=cr(t.map,n,r),s=o.node,u=o.start,c=o.end,h=o.collapse;if(3==s.nodeType){for(var f=0;f<4;f++){while(u&&ce(t.line.text.charAt(o.coverStart+u)))--u;while(o.coverStart+c0&&(h=r="right"),i=e.options.lineWrapping&&(d=s.getClientRects()).length>1?d["right"==r?d.length-1:0]:s.getBoundingClientRect()}if(l&&a<9&&!u&&(!i||!i.left&&!i.right)){var p=s.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+Fr(e.display),top:p.top,bottom:p.bottom}:ur}for(var g=i.top-t.rect.top,v=i.bottom-t.rect.top,m=(g+v)/2,y=t.view.measure.heights,b=0;b=r.text.length?(s=r.text.length,u="before"):s<=0&&(s=0,u="after"),!a)return l("before"==u?s-1:s,"before"==u);function c(e,t,n){var r=a[t],i=1==r.level;return l(n?e-1:e,i!=n)}var h=ge(a,s,u),f=pe,d=c(s,h,"before"==u);return null!=f&&(d.other=c(s,f,"before"!=u)),d}function kr(e,t){var n=0;t=vt(e.doc,t),e.options.lineWrapping||(n=Fr(e.display)*t.ch);var r=tt(e.doc,t.line),i=cn(r)+$n(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Lr(e,t,n,r,i){var o=ut(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Tr(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Lr(r.first,0,null,-1,-1);var i=lt(r,n),o=r.first+r.size-1;if(i>o)return Lr(r.first+r.size-1,tt(r,o).text.length,null,1,1);t<0&&(t=0);for(var l=tt(r,i);;){var a=Or(e,l,i,t,n),s=en(l,a.ch+(a.xRel>0||a.outside>0?1:0));if(!s)return a;var u=s.find(1);if(u.line==i)return u;l=tt(r,i=u.line)}}function Mr(e,t,n,r){r-=br(t);var i=t.text.length,o=fe(function(t){return ar(e,n,t-1).bottom<=r},i,0);return i=fe(function(t){return ar(e,n,t).top>r},o,i),{begin:o,end:i}}function Nr(e,t,n,r){n||(n=lr(e,t));var i=wr(e,t,ar(e,n,r),"line").top;return Mr(e,t,n,i)}function Ar(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function Or(e,t,n,r,i){i-=cn(t);var o=lr(e,t),l=br(t),a=0,s=t.text.length,u=!0,c=me(t,e.doc.direction);if(c){var h=(e.options.lineWrapping?Wr:Dr)(e,t,n,o,c,r,i);u=1!=h.level,a=u?h.from:h.to-1,s=u?h.to:h.from-1}var f,d,p=null,g=null,v=fe(function(t){var n=ar(e,o,t);return n.top+=l,n.bottom+=l,!!Ar(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,g=n),!0)},a,s),m=!1;if(g){var y=r-g.left=w.bottom?1:0}return v=he(t.text,v,1),Lr(n,v,d,m,r-f)}function Dr(e,t,n,r,i,o,l){var a=fe(function(a){var s=i[a],u=1!=s.level;return Ar(Sr(e,ut(n,u?s.to:s.from,u?"before":"after"),"line",t,r),o,l,!0)},0,i.length-1),s=i[a];if(a>0){var u=1!=s.level,c=Sr(e,ut(n,u?s.from:s.to,u?"after":"before"),"line",t,r);Ar(c,o,l,!0)&&c.top>l&&(s=i[a-1])}return s}function Wr(e,t,n,r,i,o,l){var a=Mr(e,t,r,l),s=a.begin,u=a.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,h=null,f=0;f=u||d.to<=s)){var p=1!=d.level,g=ar(e,r,p?Math.min(u,d.to)-1:Math.max(s,d.from)).right,v=gv)&&(c=d,h=v)}}return c||(c=i[i.length-1]),c.fromu&&(c={from:c.from,to:u,level:c.level}),c}function Hr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==sr){sr=O("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)sr.appendChild(document.createTextNode("x")),sr.appendChild(O("br"));sr.appendChild(document.createTextNode("x"))}A(e.measure,sr);var n=sr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),N(e.measure),n||1}function Fr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),n=O("pre",[t],"CodeMirror-line-like");A(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Er(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var a=e.display.gutterSpecs[l].className;n[a]=o.offsetLeft+o.clientLeft+i,r[a]=o.clientWidth}return{fixedPos:Pr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Pr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function zr(e){var t=Hr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Fr(e.display)-3);return function(i){if(sn(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l0&&(s=tt(e.doc,u.line).text).length==u.ch){var c=V(s,s.length,e.options.tabSize)-s.length;u=ut(u.line,Math.max(0,Math.round((o-Zn(e.display).left)/Fr(e.display))-c))}return u}function Br(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ft&&ln(e.doc,t)i.viewFrom?Vr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Vr(e);else if(t<=i.viewFrom){var o=_r(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Vr(e)}else if(n>=i.viewTo){var l=_r(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):Vr(e)}else{var a=_r(e,t,t,-1),s=_r(e,n,n+r,1);a&&s?(i.view=i.view.slice(0,a.index).concat(Mn(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):Vr(e)}var u=i.externalMeasured;u&&(n=i.lineN&&t=r.viewTo)){var o=r.view[Br(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==K(l,n)&&l.push(n)}}}function Vr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function _r(e,t,n,r){var i,o=Br(e,t),l=e.display.view;if(!Ft||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var a=e.display.viewFrom,s=0;s0){if(o==l.length-1)return null;i=a+l[o].size-t,o++}else i=a-t;t+=i,n+=i}while(ln(e.doc,n)!=n){if(o==(r<0?0:l.length-1))return null;n+=r*l[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function Kr(e,t,n){var r=e.display,i=r.view;0==i.length||t>=r.viewTo||n<=r.viewFrom?(r.view=Mn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Mn(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Br(e,n)))),r.viewTo=n}function jr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().line0?l:e.defaultCharWidth())+"px"}if(r.other){var a=n.appendChild(O("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=r.other.left+"px",a.style.top=r.other.top+"px",a.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function qr(e,t){return e.top-t.top||e.left-t.left}function Zr(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),l=Zn(e.display),a=l.left,s=Math.max(r.sizerWidth,Qn(e)-r.sizer.offsetLeft)-l.right,u="ltr"==i.direction;function c(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),o.appendChild(O("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?s-e:n)+"px;\n height: "+(r-t)+"px"))}function h(t,n,r){var o,l,h=tt(i,t),f=h.text.length;function d(n,r){return Cr(e,ut(t,n),"div",h,r)}function p(t,n,r){var i=Nr(e,h,null,t),o="ltr"==n==("after"==r)?"left":"right",l="after"==r?i.begin:i.end-(/\s/.test(h.text.charAt(i.end-1))?2:1);return d(l,o)[o]}var g=me(h,i.direction);return de(g,n||0,null==r?f:r,function(e,t,i,h){var v="ltr"==i,m=d(e,v?"left":"right"),y=d(t-1,v?"right":"left"),b=null==n&&0==e,w=null==r&&t==f,x=0==h,C=!g||h==g.length-1;if(y.top-m.top<=3){var S=(u?b:w)&&x,k=(u?w:b)&&C,L=S?a:(v?m:y).left,T=k?s:(v?y:m).right;c(L,m.top,T-L,m.bottom)}else{var M,N,A,O;v?(M=u&&b&&x?a:m.left,N=u?s:p(e,i,"before"),A=u?a:p(t,i,"after"),O=u&&w&&C?s:y.right):(M=u?p(e,i,"before"):a,N=!u&&b&&x?s:m.right,A=!u&&w&&C?a:y.left,O=u?p(t,i,"after"):s),c(M,m.top,N-M,m.bottom),m.bottom0?t.blinker=setInterval(function(){e.hasFocus()||ni(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Qr(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||ti(e))}function ei(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&ni(e))},100)}function ti(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Ce(e,"focus",e,t),e.state.focused=!0,F(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),s&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Jr(e))}function ni(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ce(e,"blur",e,t),e.state.focused=!1,M(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function ri(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,s=0;s.005||g<-.005)&&(ie.display.sizerWidth){var m=Math.ceil(f/Fr(e.display));m>e.display.maxLineLength&&(e.display.maxLineLength=m,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function ii(e){if(e.widgets)for(var t=0;t=l&&(o=lt(t,cn(tt(t,s))-e.wrapper.clientHeight),l=s)}return{from:o,to:Math.max(l,o+1)}}function li(e,t){if(!Se(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,o=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(i=!1),null!=i&&!g){var l=O("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-$n(e.display))+"px;\n height: "+(t.bottom-t.top+Jn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(i),e.display.lineSpace.removeChild(l)}}}function ai(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?ut(t.line,t.ch+1,"before"):t,t=t.ch?ut(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var l=!1,a=Sr(e,t),s=n&&n!=t?Sr(e,n):a;i={left:Math.min(a.left,s.left),top:Math.min(a.top,s.top)-r,right:Math.max(a.left,s.left),bottom:Math.max(a.bottom,s.bottom)+r};var u=ui(e,i),c=e.doc.scrollTop,h=e.doc.scrollLeft;if(null!=u.scrollTop&&(vi(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(yi(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-h)>1&&(l=!0)),!l)break}return i}function si(e,t){var n=ui(e,t);null!=n.scrollTop&&vi(e,n.scrollTop),null!=n.scrollLeft&&yi(e,n.scrollLeft)}function ui(e,t){var n=e.display,r=Hr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=er(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+qn(n),s=t.topa-r;if(t.topi+o){var c=Math.min(t.top,(u?a:t.bottom)-o);c!=i&&(l.scrollTop=c)}var h=e.options.fixedGutter?0:n.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-h,d=Qn(e)-n.gutters.offsetWidth,p=t.right-t.left>d;return p&&(t.right=t.left+d),t.left<10?l.scrollLeft=0:t.leftd+f-3&&(l.scrollLeft=t.right+(p?0:10)-d),l}function ci(e,t){null!=t&&(pi(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function hi(e){pi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function fi(e,t,n){null==t&&null==n||pi(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function di(e,t){pi(e),e.curOp.scrollToPos=t}function pi(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=kr(e,t.from),r=kr(e,t.to);gi(e,n,r,t.margin)}}function gi(e,t,n,r){var i=ui(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});fi(e,i.scrollLeft,i.scrollTop)}function vi(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||Xi(e,{top:t}),mi(e,t,!0),n&&Xi(e),Ri(e,100))}function mi(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function yi(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,Zi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function bi(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+qn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Jn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var wi=function(e,t,n){this.cm=n;var r=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),be(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),be(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,l&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};wi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},wi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},wi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},wi.prototype.zeroWidthHack=function(){var e=b&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new _,this.disableVert=new _},wi.prototype.enableZeroWidthBar=function(e,t,n){function r(){var i=e.getBoundingClientRect(),o="vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.visibility="hidden":t.set(1e3,r)}e.style.visibility="",t.set(1e3,r)},wi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var xi=function(){};function Ci(e,t){t||(t=bi(e));var n=e.display.barWidth,r=e.display.barHeight;Si(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&ri(e),Si(e,bi(e)),n=e.display.barWidth,r=e.display.barHeight}function Si(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}xi.prototype.update=function(){return{bottom:0,right:0}},xi.prototype.setScrollLeft=function(){},xi.prototype.setScrollTop=function(){},xi.prototype.clear=function(){};var ki={native:wi,null:xi};function Li(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&M(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new ki[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),be(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){"horizontal"==n?yi(e,t):vi(e,t)},e),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)}var Ti=0;function Mi(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ti,markArrays:null},An(e.curOp)}function Ni(e){var t=e.curOp;t&&Dn(t,function(e){for(var t=0;t=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Gi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Di(e){e.updatedDisplay=e.mustUpdate&&Ki(e.cm,e.update)}function Wi(e){var t=e.cm,n=t.display;e.updatedDisplay&&ri(t),e.barMeasure=bi(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=ir(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Jn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Qn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Hi(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var n=+new Date+e.options.workTime,r=St(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var l=o.styles,a=o.text.length>e.options.maxHighlightLength?Ze(t.mode,r.state):null,s=xt(e,o,r,!0);a&&(r.state=a),o.styles=s.styles;var u=o.styleClasses,c=s.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var h=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),f=0;!h&&fn)return Ri(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Ei(e,function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==jr(e))return!1;Ji(e)&&(Vr(e),t.dims=Er(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroml&&n.viewTo-l<20&&(l=Math.min(i,n.viewTo)),Ft&&(o=ln(e.doc,o),l=an(e.doc,l));var a=o!=n.viewFrom||l!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Kr(e,o,l),n.viewOffset=cn(tt(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=jr(e);if(!a&&0==s&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Vi(e);return s>4&&(n.lineDiv.style.display="none"),Yi(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,_i(u),N(n.cursorDiv),N(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Ri(e,400)),n.updateLineNumbers=null,!0}function ji(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Qn(e))r&&(t.visible=oi(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+qn(e.display)-er(e),n.top)}),t.visible=oi(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!Ki(e,t))break;ri(e);var i=bi(e);Xr(e),Ci(e,i),qi(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Xi(e,t){var n=new Gi(e,t);if(Ki(e,n)){ri(e),ji(e,n);var r=bi(e);Xr(e),Ci(e,r),qi(e,r),n.finish()}}function Yi(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,l=o.firstChild;function a(t){var n=t.nextSibling;return s&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var u=r.view,c=r.viewFrom,h=0;h-1&&(d=!1),En(e,f,c,n)),d&&(N(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(st(e.options,c)))),l=f.node.nextSibling}else{var p=Vn(e,f,c,n);o.insertBefore(p,l)}c+=f.size}while(l)l=a(l)}function $i(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Hn(e,"gutterChanged",e)}function qi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Jn(e)+"px"}function Zi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=Pr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",l=0;lu.clientWidth,p=u.scrollHeight>u.clientHeight;if(i&&d||o&&p){if(o&&b&&s)e:for(var g=t.target,v=a.view;g!=u;g=g.parentNode)for(var m=0;m=0&&ct(e,r.to())<=0)return n}return-1};var uo=function(e,t){this.anchor=e,this.head=t};function co(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(e,t){return ct(e.from(),t.from())}),n=K(t,i);for(var o=1;o0:s>=0){var u=pt(a.from(),l.from()),c=dt(a.to(),l.to()),h=a.empty()?l.from()==l.head:a.from()==a.head;o<=n&&--n,t.splice(--o,2,new uo(h?c:u,h?u:c))}}return new so(t,n)}function ho(e,t){return new so([new uo(e,t||e)],0)}function fo(e){return e.text?ut(e.from.line+e.text.length-1,ee(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function po(e,t){if(ct(e,t.from)<0)return e;if(ct(e,t.to)<=0)return fo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=fo(t).ch-t.to.ch),ut(n,r)}function go(e,t){for(var n=[],r=0;r1&&e.remove(a.line+1,p-1),e.insert(a.line+1,m)}Hn(e,"change",e,t)}function Co(e,t,n){function r(e,i,o){if(e.linked)for(var l=0;l1&&!e.done[e.done.length-2].ranges?(e.done.pop(),ee(e.done)):void 0}function Oo(e,t,n,r){var i=e.history;i.undone.length=0;var o,l,a=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=Ao(i,i.lastOp==r)))l=ee(o.changes),0==ct(t.from,t.to)&&0==ct(t.from,l.to)?l.to=fo(t):o.changes.push(Mo(e,t));else{var s=ee(i.done);s&&s.ranges||Ho(e.sel,i.done),o={changes:[Mo(e,t)],generation:i.generation},i.done.push(o);while(i.done.length>i.undoDepth)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,l||Ce(e,"historyAdded")}function Do(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Wo(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Do(e,o,ee(i.done),t))?i.done[i.done.length-1]=t:Ho(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&No(i.undone)}function Ho(e,t){var n=ee(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Fo(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function Eo(e){if(!e)return null;for(var t,n=0;n-1&&(ee(a)[h]=u[h],delete u[h])}}}return r}function Ro(e,t,n,r){if(r){var i=e.anchor;if(n){var o=ct(t,i)<0;o!=ct(n,i)<0?(i=t,t=n):o!=ct(t,n)<0&&(t=n)}return new uo(i,t)}return new uo(n||t,t)}function Bo(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),jo(e,new so([Ro(e.sel.primary(),t,n,i)],0),r)}function Go(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:a.to>t.ch))){if(i&&(Ce(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!s.atomic)continue;if(n){var h=s.find(r<0?1:-1),f=void 0;if((r<0?c:u)&&(h=Qo(e,h,-r,h&&h.line==t.line?o:null)),h&&h.line==t.line&&(f=ct(h,n))&&(r<0?f<0:f>0))return Zo(e,h,t,r,i)}var d=s.find(r<0?-1:1);return(r<0?u:c)&&(d=Qo(e,d,r,d.line==t.line?o:null)),d?Zo(e,d,t,r,i):null}}return t}function Jo(e,t,n,r,i){var o=r||1,l=Zo(e,t,n,o,i)||!i&&Zo(e,t,n,o,!0)||Zo(e,t,n,-o,i)||!i&&Zo(e,t,n,-o,!0);return l||(e.cantEdit=!0,ut(e.first,0))}function Qo(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?vt(e,ut(t.line-1)):null:n>0&&t.ch==(r||tt(e,t.line)).text.length?t.line=0;--i)rl(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else rl(e,t)}}function rl(e,t){if(1!=t.text.length||""!=t.text[0]||0!=ct(t.from,t.to)){var n=go(e,t);Oo(e,t,n,e.cm?e.cm.curOp.id:NaN),ll(e,t,n,Vt(e,t));var r=[];Co(e,function(e,n){n||-1!=K(r,e.history)||(hl(e.history,t),r.push(e.history)),ll(e,t,null,Vt(e,t))})}}function il(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,l=e.sel,a="undo"==t?o.done:o.undone,s="undo"==t?o.undone:o.done,u=0;u=0;--d){var p=f(d);if(p)return p.v}}}}function ol(e,t){if(0!=t&&(e.first+=t,e.sel=new so(te(e.sel.ranges,function(e){return new uo(ut(e.anchor.line+t,e.anchor.ch),ut(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Gr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:ut(o,tt(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=nt(e,t.from,t.to),n||(n=go(e,t)),e.cm?al(e.cm,t,r):xo(e,t,r),Xo(e,n,Y),e.cantEdit&&Jo(e,ut(e.firstLine(),0))&&(e.cantEdit=!1)}}function al(e,t,n){var r=e.doc,i=e.display,o=t.from,l=t.to,a=!1,s=o.line;e.options.lineWrapping||(s=ot(nn(tt(r,o.line))),r.iter(s,l.line+1,function(e){if(e==i.maxLine)return a=!0,!0})),r.sel.contains(t.from,t.to)>-1&&ke(e),xo(r,t,n,zr(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,function(e){var t=hn(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,a=!1)}),a&&(e.curOp.updateMaxLine=!0)),Wt(r,o.line),Ri(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?Gr(e):o.line!=l.line||1!=t.text.length||wo(e.doc,t)?Gr(e,o.line,l.line+1,u):Ur(e,o.line,"text");var c=Le(e,"changes"),h=Le(e,"change");if(h||c){var f={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};h&&Hn(e,"change",e,f),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function sl(e,t,n,r,i){var o;r||(r=n),ct(r,n)<0&&(o=[r,n],n=o[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),nl(e,{from:n,to:r,text:t,origin:i})}function ul(e,t,n,r){n1||!(this.children[0]instanceof dl))){var a=[];this.collapse(a),this.children=[new dl(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var l=i.lines.length%25+25,a=l;a10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==l&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=D("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(tn(e,t.line,t,n,o)||t.line!=n.line&&tn(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Pt()}o.addToHistory&&Oo(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var a,s=t.line,u=e.cm;if(e.iter(s,n.line+1,function(r){u&&o.collapsed&&!u.options.lineWrapping&&nn(r)==u.display.maxLine&&(a=!0),o.collapsed&&s!=t.line&&it(r,0),Bt(r,new zt(o,s==t.line?t.ch:null,s==n.line?n.ch:null),e.cm&&e.cm.curOp),++s}),o.collapsed&&e.iter(t.line,n.line+1,function(t){sn(e,t)&&it(t,0)}),o.clearOnEnter&&be(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Et(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++yl,o.atomic=!0),u){if(a&&(u.curOp.updateMaxLine=!0),o.collapsed)Gr(u,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=t.line;c<=n.line;c++)Ur(u,c,"text");o.atomic&&$o(u.doc),Hn(u,"markerAdded",u,o)}return o}bl.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Mi(e),Le(this,"clear")){var n=this.find();n&&Hn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Gr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&$o(e.doc)),e&&Hn(e,"markerCleared",e,this,r,i),t&&Ni(e),this.parent&&this.parent.clear()}},bl.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;s--)nl(this,r[s]);a?Ko(this,a):this.cm&&hi(this.cm)}),undo:Ii(function(){il(this,"undo")}),redo:Ii(function(){il(this,"redo")}),undoSelection:Ii(function(){il(this,"undo",!0)}),redoSelection:Ii(function(){il(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=vt(this,e),t=vt(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var a=0;a=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||n&&!n(s.marker)||r.push(s.marker.parent||s.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n}),vt(this,ut(n,t))},indexFromPos:function(e){e=vt(this,e);var t=e.ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var h=e.dataTransfer.getData("Text");if(h){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),Xo(t.doc,ho(n,n)),f)for(var d=0;d=0;t--)sl(e.doc,"",r[t].from,r[t].to,"+delete");hi(e)})}function Zl(e,t,n){var r=he(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Jl(e,t,n){var r=Zl(e,t.ch,n);return null==r?null:new ut(t.line,r,n<0?"after":"before")}function Ql(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=me(n,t.doc.direction);if(o){var l,a=i<0?ee(o):o[0],s=i<0==(1==a.level),u=s?"after":"before";if(a.level>0||"rtl"==t.doc.direction){var c=lr(t,n);l=i<0?n.text.length-1:0;var h=ar(t,c,l).top;l=fe(function(e){return ar(t,c,e).top==h},i<0==(1==a.level)?a.from:a.to-1,l),"before"==u&&(l=Zl(n,l,1))}else l=i<0?a.to:a.from;return new ut(r,l,u)}}return new ut(r,i<0?n.text.length:0,i<0?"before":"after")}function ea(e,t,n,r){var i=me(t,e.doc.direction);if(!i)return Jl(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=ge(i,n.ch,n.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(r>0?l.to>n.ch:l.from=l.from&&f>=c.begin)){var d=h?"before":"after";return new ut(n.line,f,d)}}var p=function(e,t,r){for(var o=function(e,t){return t?new ut(n.line,s(e,1),"before"):new ut(n.line,e,"after")};e>=0&&e0==(1!=l.level),u=a?r.begin:s(r.end,-1);if(l.from<=u&&u0?c.end:s(c.begin,-1);return null==v||r>0&&v==t.text.length||(g=p(r>0?0:i.length-1,r,u(v)),!g)?null:g}Ul.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ul.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ul.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ul.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ul["default"]=b?Ul.macDefault:Ul.pcDefault;var ta={selectAll:el,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Y)},killLine:function(e){return ql(e,function(t){if(t.empty()){var n=tt(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new ut(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ut(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=tt(e.doc,i.line-1).text;l&&(i=new ut(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),ut(i.line-1,l.length-1),i,"+transpose"))}n.push(new uo(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Ei(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(ct((i=a.ranges[i]).from(),t)<0||t.xRel>0)&&(ct(i.to(),t)>0||t.xRel<0)?Ta(e,r,t,o):Na(e,r,t,o)}function Ta(e,t,n,r){var i=e.display,o=!1,u=Pi(e,function(t){s&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:ei(e)),xe(i.wrapper.ownerDocument,"mouseup",u),xe(i.wrapper.ownerDocument,"mousemove",c),xe(i.scroller,"dragstart",h),xe(i.scroller,"drop",u),o||(Me(t),r.addNew||Bo(e.doc,n,null,null,r.extend),s&&!d||l&&9==a?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},h=function(){return o=!0};s&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=!r.moveOnDrag,be(i.wrapper.ownerDocument,"mouseup",u),be(i.wrapper.ownerDocument,"mousemove",c),be(i.scroller,"dragstart",h),be(i.scroller,"drop",u),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Ma(e,t,n){if("char"==n)return new uo(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new uo(ut(t.line,0),vt(e.doc,ut(t.line+1,0)));var r=n(e,t);return new uo(r.from,r.to)}function Na(e,t,n,r){l&&ei(e);var i=e.display,o=e.doc;Me(t);var a,s,u=o.sel,c=u.ranges;if(r.addNew&&!r.extend?(s=o.sel.contains(n),a=s>-1?c[s]:new uo(n,n)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new uo(n,n)),n=Rr(e,t,!0,!0),s=-1;else{var h=Ma(e,n,r.unit);a=r.extend?Ro(a,h.anchor,h.head,r.extend):h}r.addNew?-1==s?(s=c.length,jo(o,co(e,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?(jo(o,co(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):Uo(o,s,a,$):(s=0,jo(o,new so([a],0),$),u=o.sel);var f=n;function d(t){if(0!=ct(f,t))if(f=t,"rectangle"==r.unit){for(var i=[],l=e.options.tabSize,c=V(tt(o,n.line).text,n.ch,l),h=V(tt(o,t.line).text,t.ch,l),d=Math.min(c,h),p=Math.max(c,h),g=Math.min(n.line,t.line),v=Math.min(e.lastLine(),Math.max(n.line,t.line));g<=v;g++){var m=tt(o,g).text,y=Z(m,d,l);d==p?i.push(new uo(ut(g,y),ut(g,y))):m.length>y&&i.push(new uo(ut(g,y),ut(g,Z(m,p,l))))}i.length||i.push(new uo(n,n)),jo(o,co(e,u.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=a,x=Ma(e,t,r.unit),C=w.anchor;ct(x.anchor,C)>0?(b=x.head,C=pt(w.from(),x.anchor)):(b=x.anchor,C=dt(w.to(),x.head));var S=u.ranges.slice(0);S[s]=Aa(e,new uo(vt(o,C),b)),jo(o,co(e,S,s),$)}}var p=i.wrapper.getBoundingClientRect(),g=0;function v(t){var n=++g,l=Rr(e,t,!0,"rectangle"==r.unit);if(l)if(0!=ct(l,f)){e.curOp.focus=H(I(e)),d(l);var a=oi(i,o);(l.line>=a.to||l.linep.bottom?20:0;s&&setTimeout(Pi(e,function(){g==n&&(i.scroller.scrollTop+=s,v(t))}),50)}}function m(t){e.state.selectingText=!1,g=1/0,t&&(Me(t),i.input.focus()),xe(i.wrapper.ownerDocument,"mousemove",y),xe(i.wrapper.ownerDocument,"mouseup",b),o.history.lastSelOrigin=null}var y=Pi(e,function(e){0!==e.buttons&&We(e)?v(e):m(e)}),b=Pi(e,m);e.state.selectingText=b,be(i.wrapper.ownerDocument,"mousemove",y),be(i.wrapper.ownerDocument,"mouseup",b)}function Aa(e,t){var n=t.anchor,r=t.head,i=tt(e.doc,n.line);if(0==ct(n,r)&&n.sticky==r.sticky)return t;var o=me(i);if(!o)return t;var l=ge(o,n.ch,n.sticky),a=o[l];if(a.from!=n.ch&&a.to!=n.ch)return t;var s,u=l+(a.from==n.ch==(1!=a.level)?0:1);if(0==u||u==o.length)return t;if(r.line!=n.line)s=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=ge(o,r.ch,r.sticky),h=c-l||(r.ch-n.ch)*(1==a.level?-1:1);s=c==u-1||c==u?h<0:h>0}var f=o[u+(s?-1:0)],d=s==(1==f.level),p=d?f.from:f.to,g=d?"after":"before";return n.ch==p&&n.sticky==g?t:new uo(new ut(n.line,p,g),r)}function Oa(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(f){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Me(t);var l=e.display,a=l.lineDiv.getBoundingClientRect();if(o>a.bottom||!Le(e,n))return Ae(t);o-=a.top-l.viewOffset;for(var s=0;s=i){var c=lt(e.doc,o),h=e.display.gutterSpecs[s];return Ce(e,n,e,c,h.className,t),Ae(t)}}}function Da(e,t){return Oa(e,t,"gutterClick",!0)}function Wa(e,t){Yn(e.display,t)||Ha(e,t)||Se(e,t,"contextmenu")||k||e.display.input.onContextMenu(t)}function Ha(e,t){return!!Le(e,"gutterContextMenu")&&Oa(e,t,"gutterContextMenu",!1)}function Fa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),vr(e)}wa.prototype.compare=function(e,t,n){return this.time+ba>e&&0==ct(t,this.pos)&&n==this.button};var Ea={toString:function(){return"CodeMirror.Init"}},Pa={},za={};function Ia(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Ea&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Ea,n("value","",function(e,t){return e.setValue(t)},!0),n("mode",null,function(e,t){e.doc.modeOption=t,yo(e)},!0),n("indentUnit",2,yo,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(e){bo(e),vr(e),Gr(e)},!0),n("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(ut(r,o))}r++});for(var i=n.length-1;i>=0;i--)sl(e.doc,t,n[i],ut(n[i].line,n[i].ch+t.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Ea&&e.refresh()}),n("specialCharPlaceholder",wn,function(e){return e.refresh()},!0),n("electricChars",!0),n("inputStyle",y?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),n("autocorrect",!1,function(e,t){return e.getInputField().autocorrect=t},!0),n("autocapitalize",!1,function(e,t){return e.getInputField().autocapitalize=t},!0),n("rtlMoveVisually",!x),n("wholeLineUpdateBefore",!0),n("theme","default",function(e){Fa(e),to(e)},!0),n("keyMap","default",function(e,t,n){var r=$l(t),i=n!=Ea&&$l(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Ba,!0),n("gutters",[],function(e,t){e.display.gutterSpecs=Qi(t,e.options.lineNumbers),to(e)},!0),n("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?Pr(e.display)+"px":"0",e.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(e){return Ci(e)},!0),n("scrollbarStyle","native",function(e){Li(e),Ci(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),n("lineNumbers",!1,function(e,t){e.display.gutterSpecs=Qi(e.options.gutters,t),to(e)},!0),n("firstLineNumber",1,to,!0),n("lineNumberFormatter",function(e){return e},to,!0),n("showCursorWhenSelecting",!1,Xr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(e,t){"nocursor"==t&&(ni(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),n("screenReaderLabel",null,function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)}),n("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),n("dragDrop",!0,Ra),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,Xr,!0),n("singleCursorHeightPerLine",!0,Xr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,bo,!0),n("addModeClass",!1,bo,!0),n("pollInterval",100),n("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),n("historyEventDelay",1250),n("viewportMargin",10,function(e){return e.refresh()},!0),n("maxHighlightLength",1e4,bo,!0),n("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),n("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),n("autofocus",null),n("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0),n("phrases",null)}function Ra(e,t,n){var r=n&&n!=Ea;if(!t!=!r){var i=e.display.dragFunctions,o=t?be:xe;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function Ba(e){e.options.lineWrapping?(F(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(M(e.display.wrapper,"CodeMirror-wrap"),fn(e)),Ir(e),Gr(e),vr(e),setTimeout(function(){return Ci(e)},100)}function Ga(e,t){var n=this;if(!(this instanceof Ga))return new Ga(e,t);this.options=t=t?U(t):{},U(Pa,t,!1);var r=t.value;"string"==typeof r?r=new Ml(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Ga.inputStyles[t.inputStyle](this),o=this.display=new no(e,r,i,t);for(var u in o.wrapper.CodeMirror=this,Fa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Li(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new _,keySeq:null,specialChars:null},t.autofocus&&!y&&o.input.focus(),l&&a<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Ua(this),El(),Mi(this),this.curOp.forceUpdate=!0,So(this,r),t.autofocus&&!y||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&ti(n)},20):ni(this),za)za.hasOwnProperty(u)&&za[u](this,t[u],Ea);Ji(this),t.finishInit&&t.finishInit(this);for(var c=0;c400}be(t.scroller,"touchstart",function(i){if(!Se(e,i)&&!o(i)&&!Da(e,i)){t.input.ensurePolled(),clearTimeout(n);var l=+new Date;t.activeTouch={start:l,moved:!1,prev:l-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),be(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),be(t.scroller,"touchend",function(n){var r=t.activeTouch;if(r&&!Yn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,l=e.coordsChar(t.activeTouch,"page");o=!r.prev||s(r,r.prev)?new uo(l,l):!r.prev.prev||s(r,r.prev.prev)?e.findWordAt(l):new uo(ut(l.line,0),vt(e.doc,ut(l.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),Me(n)}i()}),be(t.scroller,"touchcancel",i),be(t.scroller,"scroll",function(){t.scroller.clientHeight&&(vi(e,t.scroller.scrollTop),yi(e,t.scroller.scrollLeft,!0),Ce(e,"scroll",e))}),be(t.scroller,"mousewheel",function(t){return ao(e,t)}),be(t.scroller,"DOMMouseScroll",function(t){return ao(e,t)}),be(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){Se(e,t)||Oe(t)},over:function(t){Se(e,t)||(Dl(e,t),Oe(t))},start:function(t){return Ol(e,t)},drop:Pi(e,Al),leave:function(t){Se(e,t)||Wl(e)}};var u=t.input.getField();be(u,"keyup",function(t){return ga.call(e,t)}),be(u,"keydown",Pi(e,da)),be(u,"keypress",Pi(e,va)),be(u,"focus",function(t){return ti(e,t)}),be(u,"blur",function(t){return ni(e,t)})}Ga.defaults=Pa,Ga.optionHandlers=za;var Va=[];function _a(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=St(e,t).state:n="prev");var l=e.options.tabSize,a=tt(o,t),s=V(a.text,null,l);a.stateAfter&&(a.stateAfter=null);var u,c=a.text.match(/^\s*/)[0];if(r||/\S/.test(a.text)){if("smart"==n&&(u=o.mode.indent(i,a.text.slice(c.length),a.text),u==X||u>150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?V(tt(o,t-1).text,null,l):0:"add"==n?u=s+e.options.indentUnit:"subtract"==n?u=s-e.options.indentUnit:"number"==typeof n&&(u=s+n),u=Math.max(0,u);var h="",f=0;if(e.options.indentWithTabs)for(var d=Math.floor(u/l);d;--d)f+=l,h+="\t";if(fl,s=Ie(t),u=null;if(a&&r.ranges.length>1)if(Ka&&Ka.text.join("\n")==t){if(r.ranges.length%Ka.text.length==0){u=[];for(var c=0;c=0;f--){var d=r.ranges[f],p=d.from(),g=d.to();d.empty()&&(n&&n>0?p=ut(p.line,p.ch-n):e.state.overwrite&&!a?g=ut(g.line,Math.min(tt(o,g.line).text.length,g.ch+ee(s).length)):a&&Ka&&Ka.lineWise&&Ka.text.join("\n")==s.join("\n")&&(p=g=ut(p.line,0)));var v={from:p,to:g,text:u?u[f%u.length]:s,origin:i||(a?"paste":e.state.cutIncoming>l?"cut":"+input")};nl(e.doc,v),Hn(e,"inputRead",e,v)}t&&!a&&$a(e,t),hi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=h),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ya(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||Ei(t,function(){return Xa(t,n,0,null,"paste")}),!0}function $a(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var a=0;a-1){l=_a(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(tt(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=_a(e,i.head.line,"smart"));l&&Hn(e,"electricInput",e,i.head.line)}}}function qa(e){for(var t=[],n=[],r=0;rn&&(_a(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&hi(this));else{var o=i.from(),l=i.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var s=a;s0&&Uo(this.doc,r,new uo(o,u[r].to()),Y)}}}),getTokenAt:function(e,t){return Nt(this,e,t)},getLineTokens:function(e,t){return Nt(this,ut(e),t,!0)},getTokenTypeAt:function(e){e=vt(this.doc,e);var t,n=Ct(this,tt(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var l=r+i>>1;if((l?n[2*l-1]:0)>=o)i=l;else{if(!(n[2*l+1]o&&(e=o,i=!0),r=tt(this.doc,e)}else r=e;return wr(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-cn(r):0)},defaultTextHeight:function(){return Hr(this.display)},defaultCharWidth:function(){return Fr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=Sr(this,vt(this.doc,e));var l=e.bottom,a=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)l=e.top;else if("above"==r||"near"==r){var s=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?l=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(l=e.bottom),a+t.offsetWidth>u&&(a=u-t.offsetWidth)}t.style.top=l+"px",t.style.left=t.style.right="","right"==i?(a=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?a=0:"middle"==i&&(a=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=a+"px"),n&&si(this,{left:a,top:l,right:a+t.offsetWidth,bottom:l+t.offsetHeight})},triggerOnKeyDown:zi(da),triggerOnKeyPress:zi(va),triggerOnKeyUp:ga,triggerOnMouseDown:zi(Ca),execCommand:function(e){if(ta.hasOwnProperty(e))return ta[e].call(null,this)},triggerElectric:zi(function(e){$a(this,e)}),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=vt(this.doc,e),l=0;l0&&a(n.charAt(r-1)))--r;while(i.5||this.options.lineWrapping)&&Ir(this),Ce(this,"refresh",this)}),swapDoc:zi(function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),So(this,e),vr(this),this.display.input.reset(),fi(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Hn(this,"swapDoc",this,t),t}),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Te(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}function es(e,t,n,r,i){var o=t,l=n,a=tt(e,t.line),s=i&&"rtl"==e.direction?-n:n;function u(){var n=t.line+s;return!(n=e.first+e.size)&&(t=new ut(n,t.ch,t.sticky),a=tt(e,n))}function c(o){var l;if("codepoint"==r){var c=a.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(c))l=null;else{var h=n>0?c>=55296&&c<56320:c>=56320&&c<57343;l=new ut(t.line,Math.max(0,Math.min(a.text.length,t.ch+n*(h?2:1))),-n)}}else l=i?ea(e.cm,a,t,n):Jl(a,t,n);if(null==l){if(o||!u())return!1;t=Ql(i,e.cm,a,t.line,s)}else t=l;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var h=null,f="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;;p=!1){if(n<0&&!c(!p))break;var g=a.text.charAt(t.ch)||"\n",v=ae(g,d)?"w":f&&"\n"==g?"n":!f||/\s/.test(g)?null:"p";if(!f||p||v||(v="s"),h&&h!=v){n<0&&(n=1,c(),t.sticky="after");break}if(v&&(h=v),n>0&&!c(!p))break}var m=Jo(e,t,o,l,!0);return ht(o,m)&&(m.hitSide=!0),m}function ts(e,t,n,r){var i,o,l=e.doc,a=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,B(e).innerHeight||l(e).documentElement.clientHeight),u=Math.max(s-.5*Hr(e.display),3);i=(n>0?t.bottom:t.top)+n*u}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;;){if(o=Tr(e,a,i),!o.outside)break;if(n<0?i<=0:i>=l.height){o.hitSide=!0;break}i+=5*n}return o}var ns=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new _,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function rs(e,t){var n=or(e,t.line);if(!n||n.hidden)return null;var r=tt(e.doc,t.line),i=nr(n,r,t.line),o=me(r,e.doc.direction),l="left";if(o){var a=ge(o,t.ch);l=a%2?"right":"left"}var s=cr(i.map,t.ch,l);return s.offset="right"==s.collapse?s.end:s.start,s}function is(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function os(e,t){return t&&(e.bad=!0),e}function ls(e,t,n,r,i){var o="",l=!1,a=e.doc.lineSeparator(),s=!1;function u(e){return function(t){return t.id==e}}function c(){l&&(o+=a,s&&(o+=a),l=s=!1)}function h(e){e&&(c(),o+=e)}function f(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void h(n);var o,d=t.getAttribute("cm-marker");if(d){var p=e.findMarks(ut(r,0),ut(i+1,0),u(+d));return void(p.length&&(o=p[0].find(0))&&h(nt(e.doc,o.from,o.to).join(a)))}if("false"==t.getAttribute("contenteditable"))return;var g=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;g&&c();for(var v=0;v=t.display.viewTo||o.line=t.display.viewFrom&&rs(t,i)||{node:s[0].measure.map[2],offset:0},c=o.liner.firstLine()&&(l=ut(l.line-1,tt(r.doc,l.line-1).length)),a.ch==tt(r.doc,a.line).text.length&&a.linei.viewTo-1)return!1;l.line==i.viewFrom||0==(e=Br(r,l.line))?(t=ot(i.view[0].line),n=i.view[0].node):(t=ot(i.view[e].line),n=i.view[e-1].node.nextSibling);var s,u,c=Br(r,a.line);if(c==i.view.length-1?(s=i.viewTo-1,u=i.lineDiv.lastChild):(s=ot(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!n)return!1;var h=r.doc.splitLines(ls(r,n,u,t,s)),f=nt(r.doc,ut(t,0),ut(s,tt(r.doc,s).text.length));while(h.length>1&&f.length>1)if(ee(h)==ee(f))h.pop(),f.pop(),s--;else{if(h[0]!=f[0])break;h.shift(),f.shift(),t++}var d=0,p=0,g=h[0],v=f[0],m=Math.min(g.length,v.length);while(dl.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1))d--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(d).replace(/\u200b+$/,"");var x=ut(t,d),C=ut(s,f.length?ee(f).length-p:0);return h.length>1||h[0]||ct(x,C)?(sl(r.doc,h,x,C,"+input"),!0):void 0},ns.prototype.ensurePolled=function(){this.forceCompositionEnd()},ns.prototype.reset=function(){this.forceCompositionEnd()},ns.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ns.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},ns.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Ei(this.cm,function(){return Gr(e.cm)})},ns.prototype.setUneditable=function(e){e.contentEditable="false"},ns.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Pi(this.cm,Xa)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},ns.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},ns.prototype.onContextMenu=function(){},ns.prototype.resetPosition=function(){},ns.prototype.needsContentAttribute=!0;var us=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new _,this.hasSelection=!1,this.composing=null,this.resetting=!1};function cs(e,t){if(t=t?U(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=H(R(e));t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=a.getValue()}var i;if(e.form&&(be(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=l}}catch(s){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(xe(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var a=Ga(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return a}function hs(e){e.off=xe,e.on=be,e.wheelEventPixels=lo,e.Doc=Ml,e.splitLines=Ie,e.countColumn=V,e.findColumn=Z,e.isWordChar=le,e.Pass=X,e.signal=Ce,e.Line=dn,e.changeEnd=fo,e.scrollbarModel=ki,e.Pos=ut,e.cmpPos=ct,e.modes=Ve,e.mimeModes=_e,e.resolveMode=Xe,e.getMode=Ye,e.modeExtensions=$e,e.extendMode=qe,e.copyState=Ze,e.startState=Qe,e.innerMode=Je,e.commands=ta,e.keyMap=Ul,e.keyName=Yl,e.isModifierKey=jl,e.lookupKey=Kl,e.normalizeKeyMap=_l,e.StringStream=et,e.SharedTextMarker=xl,e.TextMarker=bl,e.LineWidget=gl,e.e_preventDefault=Me,e.e_stopPropagation=Ne,e.e_stop=Oe,e.addClass=F,e.contains=W,e.rmClass=M,e.keyNames=Il}us.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!Se(r,e)){if(r.somethingSelected())ja({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=qa(r);ja({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,Y):(n.prevInput="",i.value=t.text.join("\n"),P(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),v&&(i.style.width="0px"),be(i,"input",function(){l&&a>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),be(i,"paste",function(e){Se(r,e)||Ya(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())}),be(i,"cut",o),be(i,"copy",o),be(e.scroller,"paste",function(t){if(!Yn(e,t)&&!Se(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}}),be(e.lineSpace,"selectstart",function(t){Yn(e,t)||Me(t)}),be(i,"compositionstart",function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),be(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},us.prototype.createField=function(e){this.wrapper=Ja(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Za(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},us.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},us.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Yr(e);if(e.options.moveInputWithCursor){var i=Sr(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return r},us.prototype.showSelection=function(e){var t=this.cm,n=t.display;A(n.cursorDiv,e.cursors),A(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},us.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&P(this.textarea),l&&a>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",l&&a>=9&&(this.hasSelection=null));this.resetting=!1}},us.prototype.getField=function(){return this.textarea},us.prototype.supportsTouch=function(){return!1},us.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||H(R(this.textarea))!=this.textarea))try{this.textarea.focus()}catch(e){}},us.prototype.blur=function(){this.textarea.blur()},us.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},us.prototype.receivedFocus=function(){this.slowPoll()},us.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},us.prototype.fastPoll=function(){var e=!1,t=this;function n(){var r=t.poll();r||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}t.pollingFast=!0,t.polling.set(20,n)},us.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Re(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(l&&a>=9&&this.hasSelection===i||b&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}var s=0,u=Math.min(r.length,i.length);while(s1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},us.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},us.prototype.onKeyPress=function(){l&&a>=9&&(this.hasSelection=null),this.fastPoll()},us.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Rr(n,e),u=r.scroller.scrollTop;if(o&&!f){var c=n.options.resetSelectionOnContextMenu;c&&-1==n.doc.sel.contains(o)&&Pi(n,jo)(n.doc,ho(o),Y);var h,d=i.style.cssText,p=t.wrapper.style.cssText,g=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-g.top-5)+"px; left: "+(e.clientX-g.left-5)+"px;\n z-index: 1000; background: "+(l?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s&&(h=i.ownerDocument.defaultView.scrollY),r.input.focus(),s&&i.ownerDocument.defaultView.scrollTo(null,h),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=y,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),l&&a>=9&&m(),k){Oe(e);var v=function(){xe(window,"mouseup",v),setTimeout(y,20)};be(window,"mouseup",v)}else setTimeout(y,50)}function m(){if(null!=i.selectionStart){var e=n.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function y(){if(t.contextMenuPending==y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,i.style.cssText=d,l&&a<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=u),null!=i.selectionStart)){(!l||l&&a<9)&&m();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?Pi(n,el)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},us.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},us.prototype.setUneditable=function(){},us.prototype.needsContentAttribute=!1,Ia(Ga),Qa(Ga);var fs="iter insert remove copy getEditor constructor".split(" ");for(var ds in Ml.prototype)Ml.prototype.hasOwnProperty(ds)&&K(fs,ds)<0&&(Ga.prototype[ds]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ml.prototype[ds]));return Te(Ml),Ga.inputStyles={textarea:us,contenteditable:ns},Ga.defineMode=function(e){Ga.defaults.mode||"null"==e||(Ga.defaults.mode=e),Ke.apply(this,arguments)},Ga.defineMIME=je,Ga.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ga.defineMIME("text/plain","null"),Ga.defineExtension=function(e,t){Ga.prototype[e]=t},Ga.defineDocExtension=function(e,t){Ml.prototype[e]=t},Ga.fromTextArea=cs,hs(Ga),Ga.version="5.65.21",Ga})},74806:function(e,t,n){(function(e){e(n(15237))})(function(e){"use strict";function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var n=t(["and","or","not","is"]),r=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in","False","True"],i=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];function o(e){return e.scopes[e.scopes.length-1]}e.registerHelper("hintWords","python",r.concat(i).concat(["exec","print"])),e.defineMode("python",function(l,a){for(var s="error",u=a.delimiters||a.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,c=[a.singleOperators,a.doubleOperators,a.doubleDelimiters,a.tripleDelimiters,a.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],h=0;hr?k(t):i0&&T(e,t)&&(l+=" "+s),l}return x(e,t)}function x(e,t,r){if(e.eatSpace())return null;if(!r&&e.match(/^#.*/))return"comment";if(e.match(/^[0-9\.]/,!1)){var i=!1;if(e.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(i=!0),e.match(/^[\d_]+\.\d*/)&&(i=!0),e.match(/^\.\d+/)&&(i=!0),i)return e.eat(/J/i),"number";var o=!1;if(e.match(/^0x[0-9a-f_]+/i)&&(o=!0),e.match(/^0b[01_]+/i)&&(o=!0),e.match(/^0o[0-7_]+/i)&&(o=!0),e.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(e.eat(/J/i),o=!0),e.match(/^0(?![\dx])/i)&&(o=!0),o)return e.eat(/L/i),"number"}if(e.match(m)){var l=-1!==e.current().toLowerCase().indexOf("f");return l?(t.tokenize=C(e.current(),t.tokenize),t.tokenize(e,t)):(t.tokenize=S(e.current(),t.tokenize),t.tokenize(e,t))}for(var a=0;a=0)e=e.substr(1);var n=1==e.length,r="string";function i(e){return function(t,n){var r=x(t,n,!0);return"punctuation"==r&&("{"==t.current()?n.tokenize=i(e+1):"}"==t.current()&&(n.tokenize=e>1?i(e-1):o)),r}}function o(o,l){while(!o.eol())if(o.eatWhile(/[^'"\{\}\\]/),o.eat("\\")){if(o.next(),n&&o.eol())return r}else{if(o.match(e))return l.tokenize=t,r;if(o.match("{{"))return r;if(o.match("{",!1))return l.tokenize=i(0),o.current()?r:l.tokenize(o,l);if(o.match("}}"))return r;if(o.match("}"))return s;o.eat(/['"]/)}if(n){if(a.singleLineStringErrors)return s;l.tokenize=t}return r}return o.isString=!0,o}function S(e,t){while("rubf".indexOf(e.charAt(0).toLowerCase())>=0)e=e.substr(1);var n=1==e.length,r="string";function i(i,o){while(!i.eol())if(i.eatWhile(/[^'"\\]/),i.eat("\\")){if(i.next(),n&&i.eol())return r}else{if(i.match(e))return o.tokenize=t,r;i.eat(/['"]/)}if(n){if(a.singleLineStringErrors)return s;o.tokenize=t}return r}return i.isString=!0,i}function k(e){while("py"!=o(e).type)e.scopes.pop();e.scopes.push({offset:o(e).offset+l.indentUnit,type:"py",align:null})}function L(e,t,n){var r=e.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:e.column()+1;t.scopes.push({offset:t.indent+f,type:n,align:r})}function T(e,t){var n=e.indentation();while(t.scopes.length>1&&o(t).offset>n){if("py"!=o(t).type)return!0;t.scopes.pop()}return o(t).offset!=n}function M(e,t){e.sol()&&(t.beginningOfLine=!0,t.dedent=!1);var n=t.tokenize(e,t),r=e.current();if(t.beginningOfLine&&"@"==r)return e.match(v,!1)?"meta":g?"operator":s;if(/\S/.test(r)&&(t.beginningOfLine=!1),"variable"!=n&&"builtin"!=n||"meta"!=t.lastToken||(n="meta"),"pass"!=r&&"return"!=r||(t.dedent=!0),"lambda"==r&&(t.lambda=!0),":"==r&&!t.lambda&&"py"==o(t).type&&e.match(/^\s*(?:#|$)/,!1)&&k(t),1==r.length&&!/string|comment/.test(n)){var i="[({".indexOf(r);if(-1!=i&&L(e,t,"])}".slice(i,i+1)),i="])}".indexOf(r),-1!=i){if(o(t).type!=r)return s;t.indent=t.scopes.pop().offset-f}}return t.dedent&&e.eol()&&"py"==o(t).type&&t.scopes.length>1&&t.scopes.pop(),n}var N={startState:function(e){return{tokenize:w,scopes:[{offset:e||0,type:"py",align:null}],indent:e||0,lastToken:null,lambda:!1,dedent:0}},token:function(e,t){var n=t.errorToken;n&&(t.errorToken=!1);var r=M(e,t);return r&&"comment"!=r&&(t.lastToken="keyword"==r||"punctuation"==r?e.current():r),"punctuation"==r&&(r=null),e.eol()&&t.lambda&&(t.lambda=!1),n?r+" "+s:r},indent:function(t,n){if(t.tokenize!=w)return t.tokenize.isString?e.Pass:0;var r=o(t),i=r.type==n.charAt(0)||"py"==r.type&&!t.dedent&&/^(else:|elif |except |finally:)/.test(n);return null!=r.align?r.align-(i?1:0):r.offset-(i?f:0)},electricInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,closeBrackets:{triples:"'\""},lineComment:"#",fold:"indent"};return N}),e.defineMIME("text/x-python","python");var l=function(e){return e.split(" ")};e.defineMIME("text/x-cython",{name:"python",extra_keywords:l("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")})})},42430:function(e,t,n){"use strict";n.d(t,{IA:function(){return l},N6:function(){return u},PR:function(){return a},kI:function(){return s}});var r=n(76338),i=n(75769),o={list:"/api/credentials/list",get:"/api/credentials/get",create:"/api/credentials/create",delete:"/api/credentials/delete",egressIp:"/api/credentials/egress-ip"};function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i.Ay)({url:o.list,method:"get",params:e})}function a(e){return(0,i.Ay)({url:o.create,method:"post",data:e})}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.Ay)({url:o.delete,method:"delete",params:(0,r.A)({id:e},t)})}function u(){return(0,i.Ay)({url:o.egressIp,method:"get"})}}}]); \ No newline at end of file +(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[762],{55218:function(e,t,n){(function(e){e(n(15237))})(function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,function(t,n,l){l&&l!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(o(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))});var i={Backspace:s,Enter:u};function o(e){for(var t=0;t=0;s--){var c=l[s].head;t.replaceRange("",n(c.line,c.ch-1),n(c.line,c.ch+1),"+delete")}}function u(t){var n=a(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var o=t.listSelections(),l=0;l0?{line:l.head.line,ch:l.head.ch+t}:{line:l.head.line-1};n.push({anchor:a,head:a})}e.setSelections(n,i)}function h(t){var r=e.cmpPos(t.anchor,t.head)>0;return{anchor:new n(t.anchor.line,t.anchor.ch+(r?-1:1)),head:new n(t.head.line,t.head.ch+(r?1:-1))}}function f(t,i){var o=a(t);if(!o||t.getOption("disableInput"))return e.Pass;var l=r(o,"pairs"),s=l.indexOf(i);if(-1==s)return e.Pass;for(var u,f=r(o,"closeBefore"),d=r(o,"triples"),g=l.charAt(s+1)==i,v=t.listSelections(),m=s%2==0,y=0;y1&&d.indexOf(i)>=0&&t.getRange(n(x.line,x.ch-2),x)==i+i){if(x.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(x.line,x.ch-2))))return e.Pass;b="addFour"}else if(g){var S=0==x.ch?" ":t.getRange(n(x.line,x.ch-1),x);if(e.isWordChar(C)||S==i||e.isWordChar(S))return e.Pass;b="both"}else{if(!m||!(0===C.length||/\s/.test(C)||f.indexOf(C)>-1))return e.Pass;b="both"}else b=g&&p(t,x)?"both":d.indexOf(i)>=0&&t.getRange(x,n(x.line,x.ch+3))==i+i+i?"skipThree":"skip";if(u){if(u!=b)return e.Pass}else u=b}var k=s%2?l.charAt(s-1):i,L=s%2?i:l.charAt(s+1);t.operation(function(){if("skip"==u)c(t,1);else if("skipThree"==u)c(t,3);else if("surround"==u){for(var e=t.getSelections(),n=0;n",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function i(e){return e&&e.bracketRegex||/[(){}[\]]/}function o(e,t,o){var a=e.getLineHandle(t.line),s=t.ch-1,u=o&&o.afterCursor;null==u&&(u=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var c=i(o),h=!u&&s>=0&&c.test(a.text.charAt(s))&&r[a.text.charAt(s)]||c.test(a.text.charAt(s+1))&&r[a.text.charAt(++s)];if(!h)return null;var f=">"==h.charAt(1)?1:-1;if(o&&o.strict&&f>0!=(s==t.ch))return null;var d=e.getTokenTypeAt(n(t.line,s+1)),p=l(e,n(t.line,s+(f>0?1:0)),f,d,o);return null==p?null:{from:n(t.line,s),to:p&&p.pos,match:p&&p.ch==h.charAt(0),forward:f>0}}function l(e,t,o,l,a){for(var s=a&&a.maxScanLineLength||1e4,u=a&&a.maxScanLines||1e3,c=[],h=i(a),f=o>0?Math.min(t.line+u,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-u),d=t.line;d!=f;d+=o){var p=e.getLine(d);if(p){var g=o>0?0:p.length-1,v=o>0?p.length:-1;if(!(p.length>s))for(d==t.line&&(g=t.ch-(o<0?1:0));g!=v;g+=o){var m=p.charAt(g);if(h.test(m)&&(void 0===l||(e.getTokenTypeAt(n(d,g+1))||"")==(l||""))){var y=r[m];if(y&&">"==y.charAt(1)==o>0)c.push(m);else{if(!c.length)return{pos:n(d,g),ch:m};c.pop()}}}}}return d-o!=(o>0?e.lastLine():e.firstLine())&&null}function a(e,r,i){for(var l=e.state.matchBrackets.maxHighlightLineLength||1e3,a=i&&i.highlightNonMatching,s=[],u=e.listSelections(),c=0;c2),m=/Android/.test(e),y=v||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=v||/Mac/.test(t),w=/\bCrOS\b/.test(e),x=/win/i.test(t),C=f&&e.match(/Version\/(\d*\.\d*)/);C&&(C=Number(C[1])),C&&C>=15&&(f=!1,s=!0);var S=b&&(u||f&&(null==C||C<12.11)),k=n||l&&a>=9;function L(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var T,M=function(e,t){var n=e.className,r=L(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function N(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function A(e,t){return N(e).appendChild(t)}function O(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=a-o,l+=n-l%n,o=a+1}}v?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(P=function(e){try{e.select()}catch(t){}});var _=function(){this.id=null,this.f=null,this.time=0,this.handler=G(this.onTimeout,this)};function K(e,t){for(var n=0;n=t)return r+Math.min(l,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}var J=[""];function Q(e){while(J.length<=e)J.push(ee(J)+" ");return J[e]}function ee(e){return e[e.length-1]}function te(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||oe.test(e))}function ae(e,t){return t?!!(t.source.indexOf("\\w")>-1&&le(e))||t.test(e):le(e)}function se(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ue=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ce(e){return e.charCodeAt(0)>=768&&ue.test(e)}function he(e,t,n){while((n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function de(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;ot||t==n&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,n),1==l.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var pe=null;function ge(e,t,n){var r;pe=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:pe=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:pe=i)}return null!=r?r:pe}var ve=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var u="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!r.test(e))return!1;for(var c=e.length,h=[],f=0;f-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Ce(e,t){var n=we(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function Te(e){e.prototype.on=function(e,t){be(this,e,t)},e.prototype.off=function(e,t){xe(this,e,t)}}function Me(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ne(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ae(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Oe(e){Me(e),Ne(e)}function De(e){return e.target||e.srcElement}function We(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var He,Fe,Ee=function(){if(l&&a<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function Pe(e){if(null==He){var t=O("span","​");A(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(He=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&a<8))}var n=He?O("span","​"):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function ze(e){if(null!=Fe)return Fe;var t=A(e,document.createTextNode("AخA")),n=T(t,0,1).getBoundingClientRect(),r=T(t,1,2).getBoundingClientRect();return N(e),!(!n||n.left==n.right)&&(Fe=r.right-n.right<3)}var Ie=3!="\n\nb".split(/\n/).length?function(e){var t=0,n=[],r=e.length;while(t<=r){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(n.push(o.slice(0,l)),t+=l+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Re=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(n){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Be=function(){var e=O("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Ge=null;function Ue(e){if(null!=Ge)return Ge;var t=A(e,O("span","x")),n=t.getBoundingClientRect(),r=T(t,0,1).getBoundingClientRect();return Ge=Math.abs(n.left-r.left)>1}var Ve={},_e={};function Ke(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ve[e]=t}function je(e,t){_e[e]=t}function Xe(e){if("string"==typeof e&&_e.hasOwnProperty(e))e=_e[e];else if(e&&"string"==typeof e.name&&_e.hasOwnProperty(e.name)){var t=_e[e.name];"string"==typeof t&&(t={name:t}),e=ie(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Xe("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Xe("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ye(e,t){t=Xe(t);var n=Ve[t.name];if(!n)return Ye(e,"text/plain");var r=n(e,t);if($e.hasOwnProperty(t.name)){var i=$e[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var $e={};function qe(e,t){var n=$e.hasOwnProperty(e)?$e[e]:$e[e]={};U(t,n)}function Ze(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Je(e,t){var n;while(e.innerMode){if(n=e.innerMode(t),!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}}function Qe(e,t,n){return!e.startState||e.startState(t,n)}var et=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function tt(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");var n=e;while(!n.lines)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?ut(n,tt(e,n).text.length):mt(t,tt(e,t.line).text.length)}function mt(e,t){var n=e.ch;return null==n||n>t?ut(e.line,t):n<0?ut(e.line,0):e}function yt(e,t){for(var n=[],r=0;r=this.string.length},et.prototype.sol=function(){return this.pos==this.lineStart},et.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},et.prototype.next=function(){if(this.post},et.prototype.eatSpace=function(){var e=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos)))++this.pos;return this.pos>e},et.prototype.skipToEnd=function(){this.pos=this.string.length},et.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},et.prototype.backUp=function(e){this.pos-=e},et.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);if(i(o)==i(e))return!1!==t&&(this.pos+=e.length),!0},et.prototype.current=function(){return this.string.slice(this.start,this.pos)},et.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},et.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},et.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var bt=function(e,t){this.state=e,this.lookAhead=t},wt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function xt(e,t,n,r){var i=[e.state.modeGen],o={};Ot(e,t.text,e.doc.mode,n,function(e,t){return i.push(e,t)},o,r);for(var l=n.state,a=function(r){n.baseTokens=i;var a=e.state.overlays[r],s=1,u=0;n.state=!0,Ot(e,t.text,a.mode,n,function(e,t){var n=s;while(ue&&i.splice(s,1,e,i[s+1],r),s+=2,u=Math.min(e,r)}if(t)if(a.opaque)i.splice(n,s-n,e,"overlay "+t),s=n+2;else for(;ne.options.maxHighlightLength&&Ze(e.doc.mode,r.state),o=xt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function St(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new wt(r,!0,t);var o=Dt(e,t,n),l=o>r.first&&tt(r,o-1).stateAfter,a=l?wt.fromSaved(r,l,o):new wt(r,Qe(r.mode),o);return r.iter(o,t,function(n){kt(e,n.text,a);var r=a.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}wt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},wt.prototype.baseToken=function(e){if(!this.baseTokens)return null;while(this.baseTokens[this.baseTokenPos]<=e)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},wt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},wt.fromSaved=function(e,t,n){return t instanceof bt?new wt(e,Ze(e.mode,t.state),n,t.lookAhead):new wt(e,Ze(e.mode,t),n)},wt.prototype.save=function(e){var t=!1!==e?Ze(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new bt(t,this.maxLookAhead):t};var Mt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Nt(e,t,n,r){var i,o=e.doc,l=o.mode;t=vt(o,t);var a,s=tt(o,t.line),u=St(e,t.line,n),c=new et(s.text,e.options.tabSize,u);r&&(a=[]);while((r||c.pose.options.maxHighlightLength?(a=!1,l&&kt(e,t,r,h.pos),h.pos=t.length,s=null):s=At(Tt(n,h,r.state,f),o),f){var d=f[0].name;d&&(s="m-"+(s?d+" "+s:d))}if(!a||c!=s){while(ul;--a){if(a<=o.first)return o.first;var s=tt(o,a-1),u=s.stateAfter;if(u&&(!n||a+(u instanceof bt?u.lookAhead:0)<=o.modeFrontier))return a;var c=V(s.text,null,e.options.tabSize);(null==i||r>c)&&(i=a-1,r=c)}return i}function Wt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=tt(e,r).stateAfter;if(i&&(!(i instanceof bt)||r+i.lookAhead=t:o.to>t);(r||(r=[])).push(new zt(l,o.from,s?null:o.to))}}return r}function Ut(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t);if(a||o.from==t&&"bookmark"==l.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(l.inclusiveLeft?o.from<=t:o.from0&&a)for(var w=0;w0)){var c=[s,1],h=ct(u.from,a.from),f=ct(u.to,a.to);(h<0||!l.inclusiveLeft&&!h)&&c.push({from:u.from,to:a.from}),(f>0||!l.inclusiveRight&&!f)&&c.push({from:a.to,to:u.to}),i.splice.apply(i,c),s+=c.length-3}}return i}function jt(e){var t=e.markedSpans;if(t){for(var n=0;nt)&&(!n||qt(n,o.marker)<0)&&(n=o.marker)}return n}function tn(e,t,n,r,i){var o=tt(e,t),l=Ft&&o.markedSpans;if(l)for(var a=0;a=0&&h<=0||c<=0&&h>=0)&&(c<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?ct(u.to,n)>=0:ct(u.to,n)>0)||c>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?ct(u.from,r)<=0:ct(u.from,r)<0)))return!0}}}function nn(e){var t;while(t=Jt(e))e=t.find(-1,!0).line;return e}function rn(e){var t;while(t=Qt(e))e=t.find(1,!0).line;return e}function on(e){var t,n;while(t=Qt(e))e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function ln(e,t){var n=tt(e,t),r=nn(n);return n==r?t:ot(r)}function an(e,t){if(t>e.lastLine())return t;var n,r=tt(e,t);if(!sn(e,r))return t;while(n=Qt(r))r=n.find(1,!0).line;return ot(r)+1}function sn(e,t){var n=Ft&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}var dn=function(e,t,n){this.text=e,Xt(this,t),this.height=n?n(this):1};function pn(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),jt(e),Xt(e,n);var i=r?r(e):1;i!=e.height&&it(e,i)}function gn(e){e.parent=null,jt(e)}dn.prototype.lineNo=function(){return ot(this)},Te(dn);var vn={},mn={};function yn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?mn:vn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function bn(e,t){var n=D("span",null,null,s?"padding-right: .1px":null),r={pre:D("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,l=void 0;r.pos=0,r.addToken=xn,ze(e.display.measure)&&(l=me(o,e.doc.direction))&&(r.addToken=Sn(r.addToken,l)),r.map=[];var a=t!=e.display.externalMeasured&&ot(o);Ln(o,r,Ct(e,o,a)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=E(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=E(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Pe(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(s){var u=r.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ce(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=E(r.pre.className,r.textClass||"")),r}function wn(e){var t=O("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function xn(e,t,n,r,i,o,s){if(t){var u,c=e.splitSpaces?Cn(t,e.trailingSpace):t,h=e.cm.state.specialChars,f=!1;if(h.test(t)){u=document.createDocumentFragment();var d=0;while(1){h.lastIndex=d;var p=h.exec(t),g=p?p.index-d:t.length-d;if(g){var v=document.createTextNode(c.slice(d,d+g));l&&a<9?u.appendChild(O("span",[v])):u.appendChild(v),e.map.push(e.pos,e.pos+g,v),e.col+=g,e.pos+=g}if(!p)break;d+=g+1;var m=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,b=y-e.col%y;m=u.appendChild(O("span",Q(b),"cm-tab")),m.setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?(m=u.appendChild(O("span","\r"==p[0]?"␍":"␤","cm-invalidchar")),m.setAttribute("cm-text",p[0]),e.col+=1):(m=e.cm.options.specialCharPlaceholder(p[0]),m.setAttribute("cm-text",p[0]),l&&a<9?u.appendChild(O("span",[m])):u.appendChild(m),e.col+=1);e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,u=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,u),l&&a<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),n||r||i||f||o||s){var w=n||"";r&&(w+=r),i&&(w+=i);var x=O("span",[u],w,o);if(s)for(var C in s)s.hasOwnProperty(C)&&"style"!=C&&"class"!=C&&x.setAttribute(C,s[C]);return e.content.appendChild(x)}e.content.appendChild(u)}}function Cn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;iu&&h.from<=u)break;if(h.to>=c)return e(n,r,i,o,l,a,s);e(n,r.slice(0,h.to-u),i,o,null,a,s),o=null,r=r.slice(h.to-u),u=h.to}}}function kn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Ln(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var l,a,s,u,c,h,f,d=i.length,p=0,g=1,v="",m=0;;){if(m==p){s=u=c=a="",f=null,h=null,m=1/0;for(var y=[],b=void 0,w=0;wp||C.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(s+=" "+C.className),C.css&&(a=(a?a+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&((f||(f={})).title=C.title),C.attributes)for(var S in C.attributes)(f||(f={}))[S]=C.attributes[S];C.collapsed&&(!h||qt(h.marker,C)<0)&&(h=x)}else x.from>p&&m>x.from&&(m=x.from)}if(b)for(var k=0;k=d)break;var T=Math.min(d,m);while(1){if(v){var M=p+v.length;if(!h){var N=M>T?v.slice(0,T-p):v;t.addToken(t,N,l?l+s:s,c,p+N.length==m?u:"",a,f)}if(M>=T){v=v.slice(T-p),p=T;break}p=M,c=""}v=i.slice(o,o=n[g++]),l=yn(n[g++],t.cm.options)}}else for(var A=1;A2&&o.push((s.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function nr(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function rr(e,t){t=nn(t);var n=ot(t),r=e.display.externalMeasured=new Tn(e.doc,t,n);r.lineN=n;var i=r.built=bn(e,r);return r.text=i.pre,A(e.display.lineMeasure,i.pre),r}function ir(e,t,n,r){return ar(e,lr(e,t),n,r)}function or(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(o=s-a,i=o-1,t>=s&&(l="right")),null!=i){if(r=e[u+2],a==s&&n==(r.insertLeft?"left":"right")&&(l=n),"left"==n&&0==i)while(u&&e[u-2]==e[u-3]&&e[u-1].insertLeft)r=e[2+(u-=3)],l="left";if("right"==n&&i==s-a)while(u=0;i--)if((n=e[i]).left!=n.right)break;return n}function fr(e,t,n,r){var i,o=cr(t.map,n,r),s=o.node,u=o.start,c=o.end,h=o.collapse;if(3==s.nodeType){for(var f=0;f<4;f++){while(u&&ce(t.line.text.charAt(o.coverStart+u)))--u;while(o.coverStart+c0&&(h=r="right"),i=e.options.lineWrapping&&(d=s.getClientRects()).length>1?d["right"==r?d.length-1:0]:s.getBoundingClientRect()}if(l&&a<9&&!u&&(!i||!i.left&&!i.right)){var p=s.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+Fr(e.display),top:p.top,bottom:p.bottom}:ur}for(var g=i.top-t.rect.top,v=i.bottom-t.rect.top,m=(g+v)/2,y=t.view.measure.heights,b=0;b=r.text.length?(s=r.text.length,u="before"):s<=0&&(s=0,u="after"),!a)return l("before"==u?s-1:s,"before"==u);function c(e,t,n){var r=a[t],i=1==r.level;return l(n?e-1:e,i!=n)}var h=ge(a,s,u),f=pe,d=c(s,h,"before"==u);return null!=f&&(d.other=c(s,f,"before"!=u)),d}function kr(e,t){var n=0;t=vt(e.doc,t),e.options.lineWrapping||(n=Fr(e.display)*t.ch);var r=tt(e.doc,t.line),i=cn(r)+$n(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Lr(e,t,n,r,i){var o=ut(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Tr(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Lr(r.first,0,null,-1,-1);var i=lt(r,n),o=r.first+r.size-1;if(i>o)return Lr(r.first+r.size-1,tt(r,o).text.length,null,1,1);t<0&&(t=0);for(var l=tt(r,i);;){var a=Or(e,l,i,t,n),s=en(l,a.ch+(a.xRel>0||a.outside>0?1:0));if(!s)return a;var u=s.find(1);if(u.line==i)return u;l=tt(r,i=u.line)}}function Mr(e,t,n,r){r-=br(t);var i=t.text.length,o=fe(function(t){return ar(e,n,t-1).bottom<=r},i,0);return i=fe(function(t){return ar(e,n,t).top>r},o,i),{begin:o,end:i}}function Nr(e,t,n,r){n||(n=lr(e,t));var i=wr(e,t,ar(e,n,r),"line").top;return Mr(e,t,n,i)}function Ar(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function Or(e,t,n,r,i){i-=cn(t);var o=lr(e,t),l=br(t),a=0,s=t.text.length,u=!0,c=me(t,e.doc.direction);if(c){var h=(e.options.lineWrapping?Wr:Dr)(e,t,n,o,c,r,i);u=1!=h.level,a=u?h.from:h.to-1,s=u?h.to:h.from-1}var f,d,p=null,g=null,v=fe(function(t){var n=ar(e,o,t);return n.top+=l,n.bottom+=l,!!Ar(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,g=n),!0)},a,s),m=!1;if(g){var y=r-g.left=w.bottom?1:0}return v=he(t.text,v,1),Lr(n,v,d,m,r-f)}function Dr(e,t,n,r,i,o,l){var a=fe(function(a){var s=i[a],u=1!=s.level;return Ar(Sr(e,ut(n,u?s.to:s.from,u?"before":"after"),"line",t,r),o,l,!0)},0,i.length-1),s=i[a];if(a>0){var u=1!=s.level,c=Sr(e,ut(n,u?s.from:s.to,u?"after":"before"),"line",t,r);Ar(c,o,l,!0)&&c.top>l&&(s=i[a-1])}return s}function Wr(e,t,n,r,i,o,l){var a=Mr(e,t,r,l),s=a.begin,u=a.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,h=null,f=0;f=u||d.to<=s)){var p=1!=d.level,g=ar(e,r,p?Math.min(u,d.to)-1:Math.max(s,d.from)).right,v=gv)&&(c=d,h=v)}}return c||(c=i[i.length-1]),c.fromu&&(c={from:c.from,to:u,level:c.level}),c}function Hr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==sr){sr=O("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)sr.appendChild(document.createTextNode("x")),sr.appendChild(O("br"));sr.appendChild(document.createTextNode("x"))}A(e.measure,sr);var n=sr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),N(e.measure),n||1}function Fr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),n=O("pre",[t],"CodeMirror-line-like");A(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Er(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var a=e.display.gutterSpecs[l].className;n[a]=o.offsetLeft+o.clientLeft+i,r[a]=o.clientWidth}return{fixedPos:Pr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Pr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function zr(e){var t=Hr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Fr(e.display)-3);return function(i){if(sn(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l0&&(s=tt(e.doc,u.line).text).length==u.ch){var c=V(s,s.length,e.options.tabSize)-s.length;u=ut(u.line,Math.max(0,Math.round((o-Zn(e.display).left)/Fr(e.display))-c))}return u}function Br(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ft&&ln(e.doc,t)i.viewFrom?Vr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Vr(e);else if(t<=i.viewFrom){var o=_r(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Vr(e)}else if(n>=i.viewTo){var l=_r(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):Vr(e)}else{var a=_r(e,t,t,-1),s=_r(e,n,n+r,1);a&&s?(i.view=i.view.slice(0,a.index).concat(Mn(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):Vr(e)}var u=i.externalMeasured;u&&(n=i.lineN&&t=r.viewTo)){var o=r.view[Br(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==K(l,n)&&l.push(n)}}}function Vr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function _r(e,t,n,r){var i,o=Br(e,t),l=e.display.view;if(!Ft||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var a=e.display.viewFrom,s=0;s0){if(o==l.length-1)return null;i=a+l[o].size-t,o++}else i=a-t;t+=i,n+=i}while(ln(e.doc,n)!=n){if(o==(r<0?0:l.length-1))return null;n+=r*l[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function Kr(e,t,n){var r=e.display,i=r.view;0==i.length||t>=r.viewTo||n<=r.viewFrom?(r.view=Mn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Mn(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Br(e,n)))),r.viewTo=n}function jr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().line0?l:e.defaultCharWidth())+"px"}if(r.other){var a=n.appendChild(O("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=r.other.left+"px",a.style.top=r.other.top+"px",a.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function qr(e,t){return e.top-t.top||e.left-t.left}function Zr(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),l=Zn(e.display),a=l.left,s=Math.max(r.sizerWidth,Qn(e)-r.sizer.offsetLeft)-l.right,u="ltr"==i.direction;function c(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),o.appendChild(O("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?s-e:n)+"px;\n height: "+(r-t)+"px"))}function h(t,n,r){var o,l,h=tt(i,t),f=h.text.length;function d(n,r){return Cr(e,ut(t,n),"div",h,r)}function p(t,n,r){var i=Nr(e,h,null,t),o="ltr"==n==("after"==r)?"left":"right",l="after"==r?i.begin:i.end-(/\s/.test(h.text.charAt(i.end-1))?2:1);return d(l,o)[o]}var g=me(h,i.direction);return de(g,n||0,null==r?f:r,function(e,t,i,h){var v="ltr"==i,m=d(e,v?"left":"right"),y=d(t-1,v?"right":"left"),b=null==n&&0==e,w=null==r&&t==f,x=0==h,C=!g||h==g.length-1;if(y.top-m.top<=3){var S=(u?b:w)&&x,k=(u?w:b)&&C,L=S?a:(v?m:y).left,T=k?s:(v?y:m).right;c(L,m.top,T-L,m.bottom)}else{var M,N,A,O;v?(M=u&&b&&x?a:m.left,N=u?s:p(e,i,"before"),A=u?a:p(t,i,"after"),O=u&&w&&C?s:y.right):(M=u?p(e,i,"before"):a,N=!u&&b&&x?s:m.right,A=!u&&w&&C?a:y.left,O=u?p(t,i,"after"):s),c(M,m.top,N-M,m.bottom),m.bottom0?t.blinker=setInterval(function(){e.hasFocus()||ni(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Qr(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||ti(e))}function ei(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&ni(e))},100)}function ti(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Ce(e,"focus",e,t),e.state.focused=!0,F(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),s&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Jr(e))}function ni(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ce(e,"blur",e,t),e.state.focused=!1,M(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function ri(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,s=0;s.005||g<-.005)&&(ie.display.sizerWidth){var m=Math.ceil(f/Fr(e.display));m>e.display.maxLineLength&&(e.display.maxLineLength=m,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function ii(e){if(e.widgets)for(var t=0;t=l&&(o=lt(t,cn(tt(t,s))-e.wrapper.clientHeight),l=s)}return{from:o,to:Math.max(l,o+1)}}function li(e,t){if(!Se(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,o=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(i=!1),null!=i&&!g){var l=O("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-$n(e.display))+"px;\n height: "+(t.bottom-t.top+Jn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(i),e.display.lineSpace.removeChild(l)}}}function ai(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?ut(t.line,t.ch+1,"before"):t,t=t.ch?ut(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var l=!1,a=Sr(e,t),s=n&&n!=t?Sr(e,n):a;i={left:Math.min(a.left,s.left),top:Math.min(a.top,s.top)-r,right:Math.max(a.left,s.left),bottom:Math.max(a.bottom,s.bottom)+r};var u=ui(e,i),c=e.doc.scrollTop,h=e.doc.scrollLeft;if(null!=u.scrollTop&&(vi(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(yi(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-h)>1&&(l=!0)),!l)break}return i}function si(e,t){var n=ui(e,t);null!=n.scrollTop&&vi(e,n.scrollTop),null!=n.scrollLeft&&yi(e,n.scrollLeft)}function ui(e,t){var n=e.display,r=Hr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=er(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+qn(n),s=t.topa-r;if(t.topi+o){var c=Math.min(t.top,(u?a:t.bottom)-o);c!=i&&(l.scrollTop=c)}var h=e.options.fixedGutter?0:n.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-h,d=Qn(e)-n.gutters.offsetWidth,p=t.right-t.left>d;return p&&(t.right=t.left+d),t.left<10?l.scrollLeft=0:t.leftd+f-3&&(l.scrollLeft=t.right+(p?0:10)-d),l}function ci(e,t){null!=t&&(pi(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function hi(e){pi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function fi(e,t,n){null==t&&null==n||pi(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function di(e,t){pi(e),e.curOp.scrollToPos=t}function pi(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=kr(e,t.from),r=kr(e,t.to);gi(e,n,r,t.margin)}}function gi(e,t,n,r){var i=ui(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});fi(e,i.scrollLeft,i.scrollTop)}function vi(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||Xi(e,{top:t}),mi(e,t,!0),n&&Xi(e),Ri(e,100))}function mi(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function yi(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,Zi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function bi(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+qn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Jn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var wi=function(e,t,n){this.cm=n;var r=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),be(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),be(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,l&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};wi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},wi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},wi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},wi.prototype.zeroWidthHack=function(){var e=b&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new _,this.disableVert=new _},wi.prototype.enableZeroWidthBar=function(e,t,n){function r(){var i=e.getBoundingClientRect(),o="vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.visibility="hidden":t.set(1e3,r)}e.style.visibility="",t.set(1e3,r)},wi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var xi=function(){};function Ci(e,t){t||(t=bi(e));var n=e.display.barWidth,r=e.display.barHeight;Si(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&ri(e),Si(e,bi(e)),n=e.display.barWidth,r=e.display.barHeight}function Si(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}xi.prototype.update=function(){return{bottom:0,right:0}},xi.prototype.setScrollLeft=function(){},xi.prototype.setScrollTop=function(){},xi.prototype.clear=function(){};var ki={native:wi,null:xi};function Li(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&M(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new ki[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),be(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){"horizontal"==n?yi(e,t):vi(e,t)},e),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)}var Ti=0;function Mi(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ti,markArrays:null},An(e.curOp)}function Ni(e){var t=e.curOp;t&&Dn(t,function(e){for(var t=0;t=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Gi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Di(e){e.updatedDisplay=e.mustUpdate&&Ki(e.cm,e.update)}function Wi(e){var t=e.cm,n=t.display;e.updatedDisplay&&ri(t),e.barMeasure=bi(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=ir(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Jn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Qn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Hi(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var n=+new Date+e.options.workTime,r=St(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var l=o.styles,a=o.text.length>e.options.maxHighlightLength?Ze(t.mode,r.state):null,s=xt(e,o,r,!0);a&&(r.state=a),o.styles=s.styles;var u=o.styleClasses,c=s.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var h=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),f=0;!h&&fn)return Ri(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Ei(e,function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==jr(e))return!1;Ji(e)&&(Vr(e),t.dims=Er(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroml&&n.viewTo-l<20&&(l=Math.min(i,n.viewTo)),Ft&&(o=ln(e.doc,o),l=an(e.doc,l));var a=o!=n.viewFrom||l!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Kr(e,o,l),n.viewOffset=cn(tt(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=jr(e);if(!a&&0==s&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Vi(e);return s>4&&(n.lineDiv.style.display="none"),Yi(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,_i(u),N(n.cursorDiv),N(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Ri(e,400)),n.updateLineNumbers=null,!0}function ji(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Qn(e))r&&(t.visible=oi(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+qn(e.display)-er(e),n.top)}),t.visible=oi(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!Ki(e,t))break;ri(e);var i=bi(e);Xr(e),Ci(e,i),qi(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Xi(e,t){var n=new Gi(e,t);if(Ki(e,n)){ri(e),ji(e,n);var r=bi(e);Xr(e),Ci(e,r),qi(e,r),n.finish()}}function Yi(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,l=o.firstChild;function a(t){var n=t.nextSibling;return s&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var u=r.view,c=r.viewFrom,h=0;h-1&&(d=!1),En(e,f,c,n)),d&&(N(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(st(e.options,c)))),l=f.node.nextSibling}else{var p=Vn(e,f,c,n);o.insertBefore(p,l)}c+=f.size}while(l)l=a(l)}function $i(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Hn(e,"gutterChanged",e)}function qi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Jn(e)+"px"}function Zi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=Pr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",l=0;lu.clientWidth,p=u.scrollHeight>u.clientHeight;if(i&&d||o&&p){if(o&&b&&s)e:for(var g=t.target,v=a.view;g!=u;g=g.parentNode)for(var m=0;m=0&&ct(e,r.to())<=0)return n}return-1};var uo=function(e,t){this.anchor=e,this.head=t};function co(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(e,t){return ct(e.from(),t.from())}),n=K(t,i);for(var o=1;o0:s>=0){var u=pt(a.from(),l.from()),c=dt(a.to(),l.to()),h=a.empty()?l.from()==l.head:a.from()==a.head;o<=n&&--n,t.splice(--o,2,new uo(h?c:u,h?u:c))}}return new so(t,n)}function ho(e,t){return new so([new uo(e,t||e)],0)}function fo(e){return e.text?ut(e.from.line+e.text.length-1,ee(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function po(e,t){if(ct(e,t.from)<0)return e;if(ct(e,t.to)<=0)return fo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=fo(t).ch-t.to.ch),ut(n,r)}function go(e,t){for(var n=[],r=0;r1&&e.remove(a.line+1,p-1),e.insert(a.line+1,m)}Hn(e,"change",e,t)}function Co(e,t,n){function r(e,i,o){if(e.linked)for(var l=0;l1&&!e.done[e.done.length-2].ranges?(e.done.pop(),ee(e.done)):void 0}function Oo(e,t,n,r){var i=e.history;i.undone.length=0;var o,l,a=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=Ao(i,i.lastOp==r)))l=ee(o.changes),0==ct(t.from,t.to)&&0==ct(t.from,l.to)?l.to=fo(t):o.changes.push(Mo(e,t));else{var s=ee(i.done);s&&s.ranges||Ho(e.sel,i.done),o={changes:[Mo(e,t)],generation:i.generation},i.done.push(o);while(i.done.length>i.undoDepth)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,l||Ce(e,"historyAdded")}function Do(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Wo(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Do(e,o,ee(i.done),t))?i.done[i.done.length-1]=t:Ho(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&No(i.undone)}function Ho(e,t){var n=ee(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Fo(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function Eo(e){if(!e)return null;for(var t,n=0;n-1&&(ee(a)[h]=u[h],delete u[h])}}}return r}function Ro(e,t,n,r){if(r){var i=e.anchor;if(n){var o=ct(t,i)<0;o!=ct(n,i)<0?(i=t,t=n):o!=ct(t,n)<0&&(t=n)}return new uo(i,t)}return new uo(n||t,t)}function Bo(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),jo(e,new so([Ro(e.sel.primary(),t,n,i)],0),r)}function Go(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:a.to>t.ch))){if(i&&(Ce(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!s.atomic)continue;if(n){var h=s.find(r<0?1:-1),f=void 0;if((r<0?c:u)&&(h=Qo(e,h,-r,h&&h.line==t.line?o:null)),h&&h.line==t.line&&(f=ct(h,n))&&(r<0?f<0:f>0))return Zo(e,h,t,r,i)}var d=s.find(r<0?-1:1);return(r<0?u:c)&&(d=Qo(e,d,r,d.line==t.line?o:null)),d?Zo(e,d,t,r,i):null}}return t}function Jo(e,t,n,r,i){var o=r||1,l=Zo(e,t,n,o,i)||!i&&Zo(e,t,n,o,!0)||Zo(e,t,n,-o,i)||!i&&Zo(e,t,n,-o,!0);return l||(e.cantEdit=!0,ut(e.first,0))}function Qo(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?vt(e,ut(t.line-1)):null:n>0&&t.ch==(r||tt(e,t.line)).text.length?t.line=0;--i)rl(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else rl(e,t)}}function rl(e,t){if(1!=t.text.length||""!=t.text[0]||0!=ct(t.from,t.to)){var n=go(e,t);Oo(e,t,n,e.cm?e.cm.curOp.id:NaN),ll(e,t,n,Vt(e,t));var r=[];Co(e,function(e,n){n||-1!=K(r,e.history)||(hl(e.history,t),r.push(e.history)),ll(e,t,null,Vt(e,t))})}}function il(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,l=e.sel,a="undo"==t?o.done:o.undone,s="undo"==t?o.undone:o.done,u=0;u=0;--d){var p=f(d);if(p)return p.v}}}}function ol(e,t){if(0!=t&&(e.first+=t,e.sel=new so(te(e.sel.ranges,function(e){return new uo(ut(e.anchor.line+t,e.anchor.ch),ut(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Gr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:ut(o,tt(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=nt(e,t.from,t.to),n||(n=go(e,t)),e.cm?al(e.cm,t,r):xo(e,t,r),Xo(e,n,Y),e.cantEdit&&Jo(e,ut(e.firstLine(),0))&&(e.cantEdit=!1)}}function al(e,t,n){var r=e.doc,i=e.display,o=t.from,l=t.to,a=!1,s=o.line;e.options.lineWrapping||(s=ot(nn(tt(r,o.line))),r.iter(s,l.line+1,function(e){if(e==i.maxLine)return a=!0,!0})),r.sel.contains(t.from,t.to)>-1&&ke(e),xo(r,t,n,zr(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,function(e){var t=hn(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,a=!1)}),a&&(e.curOp.updateMaxLine=!0)),Wt(r,o.line),Ri(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?Gr(e):o.line!=l.line||1!=t.text.length||wo(e.doc,t)?Gr(e,o.line,l.line+1,u):Ur(e,o.line,"text");var c=Le(e,"changes"),h=Le(e,"change");if(h||c){var f={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};h&&Hn(e,"change",e,f),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function sl(e,t,n,r,i){var o;r||(r=n),ct(r,n)<0&&(o=[r,n],n=o[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),nl(e,{from:n,to:r,text:t,origin:i})}function ul(e,t,n,r){n1||!(this.children[0]instanceof dl))){var a=[];this.collapse(a),this.children=[new dl(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var l=i.lines.length%25+25,a=l;a10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==l&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=D("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(tn(e,t.line,t,n,o)||t.line!=n.line&&tn(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Pt()}o.addToHistory&&Oo(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var a,s=t.line,u=e.cm;if(e.iter(s,n.line+1,function(r){u&&o.collapsed&&!u.options.lineWrapping&&nn(r)==u.display.maxLine&&(a=!0),o.collapsed&&s!=t.line&&it(r,0),Bt(r,new zt(o,s==t.line?t.ch:null,s==n.line?n.ch:null),e.cm&&e.cm.curOp),++s}),o.collapsed&&e.iter(t.line,n.line+1,function(t){sn(e,t)&&it(t,0)}),o.clearOnEnter&&be(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Et(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++yl,o.atomic=!0),u){if(a&&(u.curOp.updateMaxLine=!0),o.collapsed)Gr(u,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=t.line;c<=n.line;c++)Ur(u,c,"text");o.atomic&&$o(u.doc),Hn(u,"markerAdded",u,o)}return o}bl.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Mi(e),Le(this,"clear")){var n=this.find();n&&Hn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Gr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&$o(e.doc)),e&&Hn(e,"markerCleared",e,this,r,i),t&&Ni(e),this.parent&&this.parent.clear()}},bl.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;s--)nl(this,r[s]);a?Ko(this,a):this.cm&&hi(this.cm)}),undo:Ii(function(){il(this,"undo")}),redo:Ii(function(){il(this,"redo")}),undoSelection:Ii(function(){il(this,"undo",!0)}),redoSelection:Ii(function(){il(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=vt(this,e),t=vt(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var a=0;a=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||n&&!n(s.marker)||r.push(s.marker.parent||s.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n}),vt(this,ut(n,t))},indexFromPos:function(e){e=vt(this,e);var t=e.ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var h=e.dataTransfer.getData("Text");if(h){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),Xo(t.doc,ho(n,n)),f)for(var d=0;d=0;t--)sl(e.doc,"",r[t].from,r[t].to,"+delete");hi(e)})}function Zl(e,t,n){var r=he(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Jl(e,t,n){var r=Zl(e,t.ch,n);return null==r?null:new ut(t.line,r,n<0?"after":"before")}function Ql(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=me(n,t.doc.direction);if(o){var l,a=i<0?ee(o):o[0],s=i<0==(1==a.level),u=s?"after":"before";if(a.level>0||"rtl"==t.doc.direction){var c=lr(t,n);l=i<0?n.text.length-1:0;var h=ar(t,c,l).top;l=fe(function(e){return ar(t,c,e).top==h},i<0==(1==a.level)?a.from:a.to-1,l),"before"==u&&(l=Zl(n,l,1))}else l=i<0?a.to:a.from;return new ut(r,l,u)}}return new ut(r,i<0?n.text.length:0,i<0?"before":"after")}function ea(e,t,n,r){var i=me(t,e.doc.direction);if(!i)return Jl(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=ge(i,n.ch,n.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(r>0?l.to>n.ch:l.from=l.from&&f>=c.begin)){var d=h?"before":"after";return new ut(n.line,f,d)}}var p=function(e,t,r){for(var o=function(e,t){return t?new ut(n.line,s(e,1),"before"):new ut(n.line,e,"after")};e>=0&&e0==(1!=l.level),u=a?r.begin:s(r.end,-1);if(l.from<=u&&u0?c.end:s(c.begin,-1);return null==v||r>0&&v==t.text.length||(g=p(r>0?0:i.length-1,r,u(v)),!g)?null:g}Ul.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ul.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ul.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ul.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ul["default"]=b?Ul.macDefault:Ul.pcDefault;var ta={selectAll:el,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Y)},killLine:function(e){return ql(e,function(t){if(t.empty()){var n=tt(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new ut(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ut(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=tt(e.doc,i.line-1).text;l&&(i=new ut(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),ut(i.line-1,l.length-1),i,"+transpose"))}n.push(new uo(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Ei(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(ct((i=a.ranges[i]).from(),t)<0||t.xRel>0)&&(ct(i.to(),t)>0||t.xRel<0)?Ta(e,r,t,o):Na(e,r,t,o)}function Ta(e,t,n,r){var i=e.display,o=!1,u=Pi(e,function(t){s&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:ei(e)),xe(i.wrapper.ownerDocument,"mouseup",u),xe(i.wrapper.ownerDocument,"mousemove",c),xe(i.scroller,"dragstart",h),xe(i.scroller,"drop",u),o||(Me(t),r.addNew||Bo(e.doc,n,null,null,r.extend),s&&!d||l&&9==a?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},h=function(){return o=!0};s&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=!r.moveOnDrag,be(i.wrapper.ownerDocument,"mouseup",u),be(i.wrapper.ownerDocument,"mousemove",c),be(i.scroller,"dragstart",h),be(i.scroller,"drop",u),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Ma(e,t,n){if("char"==n)return new uo(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new uo(ut(t.line,0),vt(e.doc,ut(t.line+1,0)));var r=n(e,t);return new uo(r.from,r.to)}function Na(e,t,n,r){l&&ei(e);var i=e.display,o=e.doc;Me(t);var a,s,u=o.sel,c=u.ranges;if(r.addNew&&!r.extend?(s=o.sel.contains(n),a=s>-1?c[s]:new uo(n,n)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new uo(n,n)),n=Rr(e,t,!0,!0),s=-1;else{var h=Ma(e,n,r.unit);a=r.extend?Ro(a,h.anchor,h.head,r.extend):h}r.addNew?-1==s?(s=c.length,jo(o,co(e,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?(jo(o,co(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):Uo(o,s,a,$):(s=0,jo(o,new so([a],0),$),u=o.sel);var f=n;function d(t){if(0!=ct(f,t))if(f=t,"rectangle"==r.unit){for(var i=[],l=e.options.tabSize,c=V(tt(o,n.line).text,n.ch,l),h=V(tt(o,t.line).text,t.ch,l),d=Math.min(c,h),p=Math.max(c,h),g=Math.min(n.line,t.line),v=Math.min(e.lastLine(),Math.max(n.line,t.line));g<=v;g++){var m=tt(o,g).text,y=Z(m,d,l);d==p?i.push(new uo(ut(g,y),ut(g,y))):m.length>y&&i.push(new uo(ut(g,y),ut(g,Z(m,p,l))))}i.length||i.push(new uo(n,n)),jo(o,co(e,u.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=a,x=Ma(e,t,r.unit),C=w.anchor;ct(x.anchor,C)>0?(b=x.head,C=pt(w.from(),x.anchor)):(b=x.anchor,C=dt(w.to(),x.head));var S=u.ranges.slice(0);S[s]=Aa(e,new uo(vt(o,C),b)),jo(o,co(e,S,s),$)}}var p=i.wrapper.getBoundingClientRect(),g=0;function v(t){var n=++g,l=Rr(e,t,!0,"rectangle"==r.unit);if(l)if(0!=ct(l,f)){e.curOp.focus=H(I(e)),d(l);var a=oi(i,o);(l.line>=a.to||l.linep.bottom?20:0;s&&setTimeout(Pi(e,function(){g==n&&(i.scroller.scrollTop+=s,v(t))}),50)}}function m(t){e.state.selectingText=!1,g=1/0,t&&(Me(t),i.input.focus()),xe(i.wrapper.ownerDocument,"mousemove",y),xe(i.wrapper.ownerDocument,"mouseup",b),o.history.lastSelOrigin=null}var y=Pi(e,function(e){0!==e.buttons&&We(e)?v(e):m(e)}),b=Pi(e,m);e.state.selectingText=b,be(i.wrapper.ownerDocument,"mousemove",y),be(i.wrapper.ownerDocument,"mouseup",b)}function Aa(e,t){var n=t.anchor,r=t.head,i=tt(e.doc,n.line);if(0==ct(n,r)&&n.sticky==r.sticky)return t;var o=me(i);if(!o)return t;var l=ge(o,n.ch,n.sticky),a=o[l];if(a.from!=n.ch&&a.to!=n.ch)return t;var s,u=l+(a.from==n.ch==(1!=a.level)?0:1);if(0==u||u==o.length)return t;if(r.line!=n.line)s=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=ge(o,r.ch,r.sticky),h=c-l||(r.ch-n.ch)*(1==a.level?-1:1);s=c==u-1||c==u?h<0:h>0}var f=o[u+(s?-1:0)],d=s==(1==f.level),p=d?f.from:f.to,g=d?"after":"before";return n.ch==p&&n.sticky==g?t:new uo(new ut(n.line,p,g),r)}function Oa(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(f){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Me(t);var l=e.display,a=l.lineDiv.getBoundingClientRect();if(o>a.bottom||!Le(e,n))return Ae(t);o-=a.top-l.viewOffset;for(var s=0;s=i){var c=lt(e.doc,o),h=e.display.gutterSpecs[s];return Ce(e,n,e,c,h.className,t),Ae(t)}}}function Da(e,t){return Oa(e,t,"gutterClick",!0)}function Wa(e,t){Yn(e.display,t)||Ha(e,t)||Se(e,t,"contextmenu")||k||e.display.input.onContextMenu(t)}function Ha(e,t){return!!Le(e,"gutterContextMenu")&&Oa(e,t,"gutterContextMenu",!1)}function Fa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),vr(e)}wa.prototype.compare=function(e,t,n){return this.time+ba>e&&0==ct(t,this.pos)&&n==this.button};var Ea={toString:function(){return"CodeMirror.Init"}},Pa={},za={};function Ia(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Ea&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Ea,n("value","",function(e,t){return e.setValue(t)},!0),n("mode",null,function(e,t){e.doc.modeOption=t,yo(e)},!0),n("indentUnit",2,yo,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(e){bo(e),vr(e),Gr(e)},!0),n("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(ut(r,o))}r++});for(var i=n.length-1;i>=0;i--)sl(e.doc,t,n[i],ut(n[i].line,n[i].ch+t.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Ea&&e.refresh()}),n("specialCharPlaceholder",wn,function(e){return e.refresh()},!0),n("electricChars",!0),n("inputStyle",y?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),n("autocorrect",!1,function(e,t){return e.getInputField().autocorrect=t},!0),n("autocapitalize",!1,function(e,t){return e.getInputField().autocapitalize=t},!0),n("rtlMoveVisually",!x),n("wholeLineUpdateBefore",!0),n("theme","default",function(e){Fa(e),to(e)},!0),n("keyMap","default",function(e,t,n){var r=$l(t),i=n!=Ea&&$l(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Ba,!0),n("gutters",[],function(e,t){e.display.gutterSpecs=Qi(t,e.options.lineNumbers),to(e)},!0),n("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?Pr(e.display)+"px":"0",e.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(e){return Ci(e)},!0),n("scrollbarStyle","native",function(e){Li(e),Ci(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),n("lineNumbers",!1,function(e,t){e.display.gutterSpecs=Qi(e.options.gutters,t),to(e)},!0),n("firstLineNumber",1,to,!0),n("lineNumberFormatter",function(e){return e},to,!0),n("showCursorWhenSelecting",!1,Xr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(e,t){"nocursor"==t&&(ni(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),n("screenReaderLabel",null,function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)}),n("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),n("dragDrop",!0,Ra),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,Xr,!0),n("singleCursorHeightPerLine",!0,Xr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,bo,!0),n("addModeClass",!1,bo,!0),n("pollInterval",100),n("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),n("historyEventDelay",1250),n("viewportMargin",10,function(e){return e.refresh()},!0),n("maxHighlightLength",1e4,bo,!0),n("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),n("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),n("autofocus",null),n("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0),n("phrases",null)}function Ra(e,t,n){var r=n&&n!=Ea;if(!t!=!r){var i=e.display.dragFunctions,o=t?be:xe;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function Ba(e){e.options.lineWrapping?(F(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(M(e.display.wrapper,"CodeMirror-wrap"),fn(e)),Ir(e),Gr(e),vr(e),setTimeout(function(){return Ci(e)},100)}function Ga(e,t){var n=this;if(!(this instanceof Ga))return new Ga(e,t);this.options=t=t?U(t):{},U(Pa,t,!1);var r=t.value;"string"==typeof r?r=new Ml(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Ga.inputStyles[t.inputStyle](this),o=this.display=new no(e,r,i,t);for(var u in o.wrapper.CodeMirror=this,Fa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Li(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new _,keySeq:null,specialChars:null},t.autofocus&&!y&&o.input.focus(),l&&a<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Ua(this),El(),Mi(this),this.curOp.forceUpdate=!0,So(this,r),t.autofocus&&!y||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&ti(n)},20):ni(this),za)za.hasOwnProperty(u)&&za[u](this,t[u],Ea);Ji(this),t.finishInit&&t.finishInit(this);for(var c=0;c400}be(t.scroller,"touchstart",function(i){if(!Se(e,i)&&!o(i)&&!Da(e,i)){t.input.ensurePolled(),clearTimeout(n);var l=+new Date;t.activeTouch={start:l,moved:!1,prev:l-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),be(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),be(t.scroller,"touchend",function(n){var r=t.activeTouch;if(r&&!Yn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,l=e.coordsChar(t.activeTouch,"page");o=!r.prev||s(r,r.prev)?new uo(l,l):!r.prev.prev||s(r,r.prev.prev)?e.findWordAt(l):new uo(ut(l.line,0),vt(e.doc,ut(l.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),Me(n)}i()}),be(t.scroller,"touchcancel",i),be(t.scroller,"scroll",function(){t.scroller.clientHeight&&(vi(e,t.scroller.scrollTop),yi(e,t.scroller.scrollLeft,!0),Ce(e,"scroll",e))}),be(t.scroller,"mousewheel",function(t){return ao(e,t)}),be(t.scroller,"DOMMouseScroll",function(t){return ao(e,t)}),be(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){Se(e,t)||Oe(t)},over:function(t){Se(e,t)||(Dl(e,t),Oe(t))},start:function(t){return Ol(e,t)},drop:Pi(e,Al),leave:function(t){Se(e,t)||Wl(e)}};var u=t.input.getField();be(u,"keyup",function(t){return ga.call(e,t)}),be(u,"keydown",Pi(e,da)),be(u,"keypress",Pi(e,va)),be(u,"focus",function(t){return ti(e,t)}),be(u,"blur",function(t){return ni(e,t)})}Ga.defaults=Pa,Ga.optionHandlers=za;var Va=[];function _a(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=St(e,t).state:n="prev");var l=e.options.tabSize,a=tt(o,t),s=V(a.text,null,l);a.stateAfter&&(a.stateAfter=null);var u,c=a.text.match(/^\s*/)[0];if(r||/\S/.test(a.text)){if("smart"==n&&(u=o.mode.indent(i,a.text.slice(c.length),a.text),u==X||u>150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?V(tt(o,t-1).text,null,l):0:"add"==n?u=s+e.options.indentUnit:"subtract"==n?u=s-e.options.indentUnit:"number"==typeof n&&(u=s+n),u=Math.max(0,u);var h="",f=0;if(e.options.indentWithTabs)for(var d=Math.floor(u/l);d;--d)f+=l,h+="\t";if(fl,s=Ie(t),u=null;if(a&&r.ranges.length>1)if(Ka&&Ka.text.join("\n")==t){if(r.ranges.length%Ka.text.length==0){u=[];for(var c=0;c=0;f--){var d=r.ranges[f],p=d.from(),g=d.to();d.empty()&&(n&&n>0?p=ut(p.line,p.ch-n):e.state.overwrite&&!a?g=ut(g.line,Math.min(tt(o,g.line).text.length,g.ch+ee(s).length)):a&&Ka&&Ka.lineWise&&Ka.text.join("\n")==s.join("\n")&&(p=g=ut(p.line,0)));var v={from:p,to:g,text:u?u[f%u.length]:s,origin:i||(a?"paste":e.state.cutIncoming>l?"cut":"+input")};nl(e.doc,v),Hn(e,"inputRead",e,v)}t&&!a&&$a(e,t),hi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=h),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ya(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||Ei(t,function(){return Xa(t,n,0,null,"paste")}),!0}function $a(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var a=0;a-1){l=_a(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(tt(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=_a(e,i.head.line,"smart"));l&&Hn(e,"electricInput",e,i.head.line)}}}function qa(e){for(var t=[],n=[],r=0;rn&&(_a(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&hi(this));else{var o=i.from(),l=i.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var s=a;s0&&Uo(this.doc,r,new uo(o,u[r].to()),Y)}}}),getTokenAt:function(e,t){return Nt(this,e,t)},getLineTokens:function(e,t){return Nt(this,ut(e),t,!0)},getTokenTypeAt:function(e){e=vt(this.doc,e);var t,n=Ct(this,tt(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var l=r+i>>1;if((l?n[2*l-1]:0)>=o)i=l;else{if(!(n[2*l+1]o&&(e=o,i=!0),r=tt(this.doc,e)}else r=e;return wr(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-cn(r):0)},defaultTextHeight:function(){return Hr(this.display)},defaultCharWidth:function(){return Fr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=Sr(this,vt(this.doc,e));var l=e.bottom,a=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)l=e.top;else if("above"==r||"near"==r){var s=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?l=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(l=e.bottom),a+t.offsetWidth>u&&(a=u-t.offsetWidth)}t.style.top=l+"px",t.style.left=t.style.right="","right"==i?(a=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?a=0:"middle"==i&&(a=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=a+"px"),n&&si(this,{left:a,top:l,right:a+t.offsetWidth,bottom:l+t.offsetHeight})},triggerOnKeyDown:zi(da),triggerOnKeyPress:zi(va),triggerOnKeyUp:ga,triggerOnMouseDown:zi(Ca),execCommand:function(e){if(ta.hasOwnProperty(e))return ta[e].call(null,this)},triggerElectric:zi(function(e){$a(this,e)}),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=vt(this.doc,e),l=0;l0&&a(n.charAt(r-1)))--r;while(i.5||this.options.lineWrapping)&&Ir(this),Ce(this,"refresh",this)}),swapDoc:zi(function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),So(this,e),vr(this),this.display.input.reset(),fi(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Hn(this,"swapDoc",this,t),t}),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Te(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}function es(e,t,n,r,i){var o=t,l=n,a=tt(e,t.line),s=i&&"rtl"==e.direction?-n:n;function u(){var n=t.line+s;return!(n=e.first+e.size)&&(t=new ut(n,t.ch,t.sticky),a=tt(e,n))}function c(o){var l;if("codepoint"==r){var c=a.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(c))l=null;else{var h=n>0?c>=55296&&c<56320:c>=56320&&c<57343;l=new ut(t.line,Math.max(0,Math.min(a.text.length,t.ch+n*(h?2:1))),-n)}}else l=i?ea(e.cm,a,t,n):Jl(a,t,n);if(null==l){if(o||!u())return!1;t=Ql(i,e.cm,a,t.line,s)}else t=l;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var h=null,f="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;;p=!1){if(n<0&&!c(!p))break;var g=a.text.charAt(t.ch)||"\n",v=ae(g,d)?"w":f&&"\n"==g?"n":!f||/\s/.test(g)?null:"p";if(!f||p||v||(v="s"),h&&h!=v){n<0&&(n=1,c(),t.sticky="after");break}if(v&&(h=v),n>0&&!c(!p))break}var m=Jo(e,t,o,l,!0);return ht(o,m)&&(m.hitSide=!0),m}function ts(e,t,n,r){var i,o,l=e.doc,a=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,B(e).innerHeight||l(e).documentElement.clientHeight),u=Math.max(s-.5*Hr(e.display),3);i=(n>0?t.bottom:t.top)+n*u}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;;){if(o=Tr(e,a,i),!o.outside)break;if(n<0?i<=0:i>=l.height){o.hitSide=!0;break}i+=5*n}return o}var ns=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new _,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function rs(e,t){var n=or(e,t.line);if(!n||n.hidden)return null;var r=tt(e.doc,t.line),i=nr(n,r,t.line),o=me(r,e.doc.direction),l="left";if(o){var a=ge(o,t.ch);l=a%2?"right":"left"}var s=cr(i.map,t.ch,l);return s.offset="right"==s.collapse?s.end:s.start,s}function is(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function os(e,t){return t&&(e.bad=!0),e}function ls(e,t,n,r,i){var o="",l=!1,a=e.doc.lineSeparator(),s=!1;function u(e){return function(t){return t.id==e}}function c(){l&&(o+=a,s&&(o+=a),l=s=!1)}function h(e){e&&(c(),o+=e)}function f(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void h(n);var o,d=t.getAttribute("cm-marker");if(d){var p=e.findMarks(ut(r,0),ut(i+1,0),u(+d));return void(p.length&&(o=p[0].find(0))&&h(nt(e.doc,o.from,o.to).join(a)))}if("false"==t.getAttribute("contenteditable"))return;var g=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;g&&c();for(var v=0;v=t.display.viewTo||o.line=t.display.viewFrom&&rs(t,i)||{node:s[0].measure.map[2],offset:0},c=o.liner.firstLine()&&(l=ut(l.line-1,tt(r.doc,l.line-1).length)),a.ch==tt(r.doc,a.line).text.length&&a.linei.viewTo-1)return!1;l.line==i.viewFrom||0==(e=Br(r,l.line))?(t=ot(i.view[0].line),n=i.view[0].node):(t=ot(i.view[e].line),n=i.view[e-1].node.nextSibling);var s,u,c=Br(r,a.line);if(c==i.view.length-1?(s=i.viewTo-1,u=i.lineDiv.lastChild):(s=ot(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!n)return!1;var h=r.doc.splitLines(ls(r,n,u,t,s)),f=nt(r.doc,ut(t,0),ut(s,tt(r.doc,s).text.length));while(h.length>1&&f.length>1)if(ee(h)==ee(f))h.pop(),f.pop(),s--;else{if(h[0]!=f[0])break;h.shift(),f.shift(),t++}var d=0,p=0,g=h[0],v=f[0],m=Math.min(g.length,v.length);while(dl.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1))d--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(d).replace(/\u200b+$/,"");var x=ut(t,d),C=ut(s,f.length?ee(f).length-p:0);return h.length>1||h[0]||ct(x,C)?(sl(r.doc,h,x,C,"+input"),!0):void 0},ns.prototype.ensurePolled=function(){this.forceCompositionEnd()},ns.prototype.reset=function(){this.forceCompositionEnd()},ns.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ns.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},ns.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Ei(this.cm,function(){return Gr(e.cm)})},ns.prototype.setUneditable=function(e){e.contentEditable="false"},ns.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Pi(this.cm,Xa)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},ns.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},ns.prototype.onContextMenu=function(){},ns.prototype.resetPosition=function(){},ns.prototype.needsContentAttribute=!0;var us=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new _,this.hasSelection=!1,this.composing=null,this.resetting=!1};function cs(e,t){if(t=t?U(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=H(R(e));t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=a.getValue()}var i;if(e.form&&(be(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=l}}catch(s){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(xe(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var a=Ga(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return a}function hs(e){e.off=xe,e.on=be,e.wheelEventPixels=lo,e.Doc=Ml,e.splitLines=Ie,e.countColumn=V,e.findColumn=Z,e.isWordChar=le,e.Pass=X,e.signal=Ce,e.Line=dn,e.changeEnd=fo,e.scrollbarModel=ki,e.Pos=ut,e.cmpPos=ct,e.modes=Ve,e.mimeModes=_e,e.resolveMode=Xe,e.getMode=Ye,e.modeExtensions=$e,e.extendMode=qe,e.copyState=Ze,e.startState=Qe,e.innerMode=Je,e.commands=ta,e.keyMap=Ul,e.keyName=Yl,e.isModifierKey=jl,e.lookupKey=Kl,e.normalizeKeyMap=_l,e.StringStream=et,e.SharedTextMarker=xl,e.TextMarker=bl,e.LineWidget=gl,e.e_preventDefault=Me,e.e_stopPropagation=Ne,e.e_stop=Oe,e.addClass=F,e.contains=W,e.rmClass=M,e.keyNames=Il}us.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!Se(r,e)){if(r.somethingSelected())ja({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=qa(r);ja({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,Y):(n.prevInput="",i.value=t.text.join("\n"),P(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),v&&(i.style.width="0px"),be(i,"input",function(){l&&a>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),be(i,"paste",function(e){Se(r,e)||Ya(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())}),be(i,"cut",o),be(i,"copy",o),be(e.scroller,"paste",function(t){if(!Yn(e,t)&&!Se(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}}),be(e.lineSpace,"selectstart",function(t){Yn(e,t)||Me(t)}),be(i,"compositionstart",function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),be(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},us.prototype.createField=function(e){this.wrapper=Ja(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Za(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},us.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},us.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Yr(e);if(e.options.moveInputWithCursor){var i=Sr(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return r},us.prototype.showSelection=function(e){var t=this.cm,n=t.display;A(n.cursorDiv,e.cursors),A(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},us.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&P(this.textarea),l&&a>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",l&&a>=9&&(this.hasSelection=null));this.resetting=!1}},us.prototype.getField=function(){return this.textarea},us.prototype.supportsTouch=function(){return!1},us.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||H(R(this.textarea))!=this.textarea))try{this.textarea.focus()}catch(e){}},us.prototype.blur=function(){this.textarea.blur()},us.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},us.prototype.receivedFocus=function(){this.slowPoll()},us.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},us.prototype.fastPoll=function(){var e=!1,t=this;function n(){var r=t.poll();r||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}t.pollingFast=!0,t.polling.set(20,n)},us.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Re(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(l&&a>=9&&this.hasSelection===i||b&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}var s=0,u=Math.min(r.length,i.length);while(s1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},us.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},us.prototype.onKeyPress=function(){l&&a>=9&&(this.hasSelection=null),this.fastPoll()},us.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Rr(n,e),u=r.scroller.scrollTop;if(o&&!f){var c=n.options.resetSelectionOnContextMenu;c&&-1==n.doc.sel.contains(o)&&Pi(n,jo)(n.doc,ho(o),Y);var h,d=i.style.cssText,p=t.wrapper.style.cssText,g=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-g.top-5)+"px; left: "+(e.clientX-g.left-5)+"px;\n z-index: 1000; background: "+(l?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s&&(h=i.ownerDocument.defaultView.scrollY),r.input.focus(),s&&i.ownerDocument.defaultView.scrollTo(null,h),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=y,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),l&&a>=9&&m(),k){Oe(e);var v=function(){xe(window,"mouseup",v),setTimeout(y,20)};be(window,"mouseup",v)}else setTimeout(y,50)}function m(){if(null!=i.selectionStart){var e=n.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function y(){if(t.contextMenuPending==y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,i.style.cssText=d,l&&a<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=u),null!=i.selectionStart)){(!l||l&&a<9)&&m();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?Pi(n,el)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},us.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},us.prototype.setUneditable=function(){},us.prototype.needsContentAttribute=!1,Ia(Ga),Qa(Ga);var fs="iter insert remove copy getEditor constructor".split(" ");for(var ds in Ml.prototype)Ml.prototype.hasOwnProperty(ds)&&K(fs,ds)<0&&(Ga.prototype[ds]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ml.prototype[ds]));return Te(Ml),Ga.inputStyles={textarea:us,contenteditable:ns},Ga.defineMode=function(e){Ga.defaults.mode||"null"==e||(Ga.defaults.mode=e),Ke.apply(this,arguments)},Ga.defineMIME=je,Ga.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ga.defineMIME("text/plain","null"),Ga.defineExtension=function(e,t){Ga.prototype[e]=t},Ga.defineDocExtension=function(e,t){Ml.prototype[e]=t},Ga.fromTextArea=cs,hs(Ga),Ga.version="5.65.21",Ga})},74806:function(e,t,n){(function(e){e(n(15237))})(function(e){"use strict";function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var n=t(["and","or","not","is"]),r=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in","False","True"],i=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];function o(e){return e.scopes[e.scopes.length-1]}e.registerHelper("hintWords","python",r.concat(i).concat(["exec","print"])),e.defineMode("python",function(l,a){for(var s="error",u=a.delimiters||a.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,c=[a.singleOperators,a.doubleOperators,a.doubleDelimiters,a.tripleDelimiters,a.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],h=0;hr?k(t):i0&&T(e,t)&&(l+=" "+s),l}return x(e,t)}function x(e,t,r){if(e.eatSpace())return null;if(!r&&e.match(/^#.*/))return"comment";if(e.match(/^[0-9\.]/,!1)){var i=!1;if(e.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(i=!0),e.match(/^[\d_]+\.\d*/)&&(i=!0),e.match(/^\.\d+/)&&(i=!0),i)return e.eat(/J/i),"number";var o=!1;if(e.match(/^0x[0-9a-f_]+/i)&&(o=!0),e.match(/^0b[01_]+/i)&&(o=!0),e.match(/^0o[0-7_]+/i)&&(o=!0),e.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(e.eat(/J/i),o=!0),e.match(/^0(?![\dx])/i)&&(o=!0),o)return e.eat(/L/i),"number"}if(e.match(m)){var l=-1!==e.current().toLowerCase().indexOf("f");return l?(t.tokenize=C(e.current(),t.tokenize),t.tokenize(e,t)):(t.tokenize=S(e.current(),t.tokenize),t.tokenize(e,t))}for(var a=0;a=0)e=e.substr(1);var n=1==e.length,r="string";function i(e){return function(t,n){var r=x(t,n,!0);return"punctuation"==r&&("{"==t.current()?n.tokenize=i(e+1):"}"==t.current()&&(n.tokenize=e>1?i(e-1):o)),r}}function o(o,l){while(!o.eol())if(o.eatWhile(/[^'"\{\}\\]/),o.eat("\\")){if(o.next(),n&&o.eol())return r}else{if(o.match(e))return l.tokenize=t,r;if(o.match("{{"))return r;if(o.match("{",!1))return l.tokenize=i(0),o.current()?r:l.tokenize(o,l);if(o.match("}}"))return r;if(o.match("}"))return s;o.eat(/['"]/)}if(n){if(a.singleLineStringErrors)return s;l.tokenize=t}return r}return o.isString=!0,o}function S(e,t){while("rubf".indexOf(e.charAt(0).toLowerCase())>=0)e=e.substr(1);var n=1==e.length,r="string";function i(i,o){while(!i.eol())if(i.eatWhile(/[^'"\\]/),i.eat("\\")){if(i.next(),n&&i.eol())return r}else{if(i.match(e))return o.tokenize=t,r;i.eat(/['"]/)}if(n){if(a.singleLineStringErrors)return s;o.tokenize=t}return r}return i.isString=!0,i}function k(e){while("py"!=o(e).type)e.scopes.pop();e.scopes.push({offset:o(e).offset+l.indentUnit,type:"py",align:null})}function L(e,t,n){var r=e.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:e.column()+1;t.scopes.push({offset:t.indent+f,type:n,align:r})}function T(e,t){var n=e.indentation();while(t.scopes.length>1&&o(t).offset>n){if("py"!=o(t).type)return!0;t.scopes.pop()}return o(t).offset!=n}function M(e,t){e.sol()&&(t.beginningOfLine=!0,t.dedent=!1);var n=t.tokenize(e,t),r=e.current();if(t.beginningOfLine&&"@"==r)return e.match(v,!1)?"meta":g?"operator":s;if(/\S/.test(r)&&(t.beginningOfLine=!1),"variable"!=n&&"builtin"!=n||"meta"!=t.lastToken||(n="meta"),"pass"!=r&&"return"!=r||(t.dedent=!0),"lambda"==r&&(t.lambda=!0),":"==r&&!t.lambda&&"py"==o(t).type&&e.match(/^\s*(?:#|$)/,!1)&&k(t),1==r.length&&!/string|comment/.test(n)){var i="[({".indexOf(r);if(-1!=i&&L(e,t,"])}".slice(i,i+1)),i="])}".indexOf(r),-1!=i){if(o(t).type!=r)return s;t.indent=t.scopes.pop().offset-f}}return t.dedent&&e.eol()&&"py"==o(t).type&&t.scopes.length>1&&t.scopes.pop(),n}var N={startState:function(e){return{tokenize:w,scopes:[{offset:e||0,type:"py",align:null}],indent:e||0,lastToken:null,lambda:!1,dedent:0}},token:function(e,t){var n=t.errorToken;n&&(t.errorToken=!1);var r=M(e,t);return r&&"comment"!=r&&(t.lastToken="keyword"==r||"punctuation"==r?e.current():r),"punctuation"==r&&(r=null),e.eol()&&t.lambda&&(t.lambda=!1),n?r+" "+s:r},indent:function(t,n){if(t.tokenize!=w)return t.tokenize.isString?e.Pass:0;var r=o(t),i=r.type==n.charAt(0)||"py"==r.type&&!t.dedent&&/^(else:|elif |except |finally:)/.test(n);return null!=r.align?r.align-(i?1:0):r.offset-(i?f:0)},electricInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,closeBrackets:{triples:"'\""},lineComment:"#",fold:"indent"};return N}),e.defineMIME("text/x-python","python");var l=function(e){return e.split(" ")};e.defineMIME("text/x-cython",{name:"python",extra_keywords:l("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")})})}}]); \ No newline at end of file diff --git a/frontend/dist/js/915-legacy.04c29e15.js b/frontend/dist/js/762.e3a47300.js similarity index 99% rename from frontend/dist/js/915-legacy.04c29e15.js rename to frontend/dist/js/762.e3a47300.js index 8ea6c52..1262902 100644 --- a/frontend/dist/js/915-legacy.04c29e15.js +++ b/frontend/dist/js/762.e3a47300.js @@ -1 +1 @@ -(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[915],{55218:function(e,t,n){(function(e){e(n(15237))})(function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,function(t,n,l){l&&l!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(o(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))});var i={Backspace:s,Enter:u};function o(e){for(var t=0;t=0;s--){var c=l[s].head;t.replaceRange("",n(c.line,c.ch-1),n(c.line,c.ch+1),"+delete")}}function u(t){var n=a(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var o=t.listSelections(),l=0;l0?{line:l.head.line,ch:l.head.ch+t}:{line:l.head.line-1};n.push({anchor:a,head:a})}e.setSelections(n,i)}function h(t){var r=e.cmpPos(t.anchor,t.head)>0;return{anchor:new n(t.anchor.line,t.anchor.ch+(r?-1:1)),head:new n(t.head.line,t.head.ch+(r?1:-1))}}function f(t,i){var o=a(t);if(!o||t.getOption("disableInput"))return e.Pass;var l=r(o,"pairs"),s=l.indexOf(i);if(-1==s)return e.Pass;for(var u,f=r(o,"closeBefore"),d=r(o,"triples"),g=l.charAt(s+1)==i,v=t.listSelections(),m=s%2==0,y=0;y1&&d.indexOf(i)>=0&&t.getRange(n(x.line,x.ch-2),x)==i+i){if(x.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(x.line,x.ch-2))))return e.Pass;b="addFour"}else if(g){var S=0==x.ch?" ":t.getRange(n(x.line,x.ch-1),x);if(e.isWordChar(C)||S==i||e.isWordChar(S))return e.Pass;b="both"}else{if(!m||!(0===C.length||/\s/.test(C)||f.indexOf(C)>-1))return e.Pass;b="both"}else b=g&&p(t,x)?"both":d.indexOf(i)>=0&&t.getRange(x,n(x.line,x.ch+3))==i+i+i?"skipThree":"skip";if(u){if(u!=b)return e.Pass}else u=b}var k=s%2?l.charAt(s-1):i,L=s%2?i:l.charAt(s+1);t.operation(function(){if("skip"==u)c(t,1);else if("skipThree"==u)c(t,3);else if("surround"==u){for(var e=t.getSelections(),n=0;n",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function i(e){return e&&e.bracketRegex||/[(){}[\]]/}function o(e,t,o){var a=e.getLineHandle(t.line),s=t.ch-1,u=o&&o.afterCursor;null==u&&(u=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var c=i(o),h=!u&&s>=0&&c.test(a.text.charAt(s))&&r[a.text.charAt(s)]||c.test(a.text.charAt(s+1))&&r[a.text.charAt(++s)];if(!h)return null;var f=">"==h.charAt(1)?1:-1;if(o&&o.strict&&f>0!=(s==t.ch))return null;var d=e.getTokenTypeAt(n(t.line,s+1)),p=l(e,n(t.line,s+(f>0?1:0)),f,d,o);return null==p?null:{from:n(t.line,s),to:p&&p.pos,match:p&&p.ch==h.charAt(0),forward:f>0}}function l(e,t,o,l,a){for(var s=a&&a.maxScanLineLength||1e4,u=a&&a.maxScanLines||1e3,c=[],h=i(a),f=o>0?Math.min(t.line+u,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-u),d=t.line;d!=f;d+=o){var p=e.getLine(d);if(p){var g=o>0?0:p.length-1,v=o>0?p.length:-1;if(!(p.length>s))for(d==t.line&&(g=t.ch-(o<0?1:0));g!=v;g+=o){var m=p.charAt(g);if(h.test(m)&&(void 0===l||(e.getTokenTypeAt(n(d,g+1))||"")==(l||""))){var y=r[m];if(y&&">"==y.charAt(1)==o>0)c.push(m);else{if(!c.length)return{pos:n(d,g),ch:m};c.pop()}}}}}return d-o!=(o>0?e.lastLine():e.firstLine())&&null}function a(e,r,i){for(var l=e.state.matchBrackets.maxHighlightLineLength||1e3,a=i&&i.highlightNonMatching,s=[],u=e.listSelections(),c=0;c2),m=/Android/.test(e),y=v||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=v||/Mac/.test(t),w=/\bCrOS\b/.test(e),x=/win/i.test(t),C=f&&e.match(/Version\/(\d*\.\d*)/);C&&(C=Number(C[1])),C&&C>=15&&(f=!1,s=!0);var S=b&&(u||f&&(null==C||C<12.11)),k=n||l&&a>=9;function L(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var T,M=function(e,t){var n=e.className,r=L(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function N(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function A(e,t){return N(e).appendChild(t)}function O(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=a-o,l+=n-l%n,o=a+1}}v?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(P=function(e){try{e.select()}catch(t){}});var _=function(){this.id=null,this.f=null,this.time=0,this.handler=G(this.onTimeout,this)};function K(e,t){for(var n=0;n=t)return r+Math.min(l,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}var J=[""];function Q(e){while(J.length<=e)J.push(ee(J)+" ");return J[e]}function ee(e){return e[e.length-1]}function te(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||oe.test(e))}function ae(e,t){return t?!!(t.source.indexOf("\\w")>-1&&le(e))||t.test(e):le(e)}function se(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ue=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ce(e){return e.charCodeAt(0)>=768&&ue.test(e)}function he(e,t,n){while((n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function de(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;ot||t==n&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,n),1==l.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var pe=null;function ge(e,t,n){var r;pe=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:pe=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:pe=i)}return null!=r?r:pe}var ve=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var u="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!r.test(e))return!1;for(var c=e.length,h=[],f=0;f-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Ce(e,t){var n=we(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function Te(e){e.prototype.on=function(e,t){be(this,e,t)},e.prototype.off=function(e,t){xe(this,e,t)}}function Me(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ne(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ae(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Oe(e){Me(e),Ne(e)}function De(e){return e.target||e.srcElement}function We(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var He,Fe,Ee=function(){if(l&&a<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function Pe(e){if(null==He){var t=O("span","​");A(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(He=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&a<8))}var n=He?O("span","​"):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function ze(e){if(null!=Fe)return Fe;var t=A(e,document.createTextNode("AخA")),n=T(t,0,1).getBoundingClientRect(),r=T(t,1,2).getBoundingClientRect();return N(e),!(!n||n.left==n.right)&&(Fe=r.right-n.right<3)}var Ie=3!="\n\nb".split(/\n/).length?function(e){var t=0,n=[],r=e.length;while(t<=r){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(n.push(o.slice(0,l)),t+=l+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Re=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(n){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Be=function(){var e=O("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Ge=null;function Ue(e){if(null!=Ge)return Ge;var t=A(e,O("span","x")),n=t.getBoundingClientRect(),r=T(t,0,1).getBoundingClientRect();return Ge=Math.abs(n.left-r.left)>1}var Ve={},_e={};function Ke(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ve[e]=t}function je(e,t){_e[e]=t}function Xe(e){if("string"==typeof e&&_e.hasOwnProperty(e))e=_e[e];else if(e&&"string"==typeof e.name&&_e.hasOwnProperty(e.name)){var t=_e[e.name];"string"==typeof t&&(t={name:t}),e=ie(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Xe("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Xe("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ye(e,t){t=Xe(t);var n=Ve[t.name];if(!n)return Ye(e,"text/plain");var r=n(e,t);if($e.hasOwnProperty(t.name)){var i=$e[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var $e={};function qe(e,t){var n=$e.hasOwnProperty(e)?$e[e]:$e[e]={};U(t,n)}function Ze(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Je(e,t){var n;while(e.innerMode){if(n=e.innerMode(t),!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}}function Qe(e,t,n){return!e.startState||e.startState(t,n)}var et=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function tt(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");var n=e;while(!n.lines)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?ut(n,tt(e,n).text.length):mt(t,tt(e,t.line).text.length)}function mt(e,t){var n=e.ch;return null==n||n>t?ut(e.line,t):n<0?ut(e.line,0):e}function yt(e,t){for(var n=[],r=0;r=this.string.length},et.prototype.sol=function(){return this.pos==this.lineStart},et.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},et.prototype.next=function(){if(this.post},et.prototype.eatSpace=function(){var e=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos)))++this.pos;return this.pos>e},et.prototype.skipToEnd=function(){this.pos=this.string.length},et.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},et.prototype.backUp=function(e){this.pos-=e},et.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);if(i(o)==i(e))return!1!==t&&(this.pos+=e.length),!0},et.prototype.current=function(){return this.string.slice(this.start,this.pos)},et.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},et.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},et.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var bt=function(e,t){this.state=e,this.lookAhead=t},wt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function xt(e,t,n,r){var i=[e.state.modeGen],o={};Ot(e,t.text,e.doc.mode,n,function(e,t){return i.push(e,t)},o,r);for(var l=n.state,a=function(r){n.baseTokens=i;var a=e.state.overlays[r],s=1,u=0;n.state=!0,Ot(e,t.text,a.mode,n,function(e,t){var n=s;while(ue&&i.splice(s,1,e,i[s+1],r),s+=2,u=Math.min(e,r)}if(t)if(a.opaque)i.splice(n,s-n,e,"overlay "+t),s=n+2;else for(;ne.options.maxHighlightLength&&Ze(e.doc.mode,r.state),o=xt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function St(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new wt(r,!0,t);var o=Dt(e,t,n),l=o>r.first&&tt(r,o-1).stateAfter,a=l?wt.fromSaved(r,l,o):new wt(r,Qe(r.mode),o);return r.iter(o,t,function(n){kt(e,n.text,a);var r=a.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}wt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},wt.prototype.baseToken=function(e){if(!this.baseTokens)return null;while(this.baseTokens[this.baseTokenPos]<=e)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},wt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},wt.fromSaved=function(e,t,n){return t instanceof bt?new wt(e,Ze(e.mode,t.state),n,t.lookAhead):new wt(e,Ze(e.mode,t),n)},wt.prototype.save=function(e){var t=!1!==e?Ze(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new bt(t,this.maxLookAhead):t};var Mt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Nt(e,t,n,r){var i,o=e.doc,l=o.mode;t=vt(o,t);var a,s=tt(o,t.line),u=St(e,t.line,n),c=new et(s.text,e.options.tabSize,u);r&&(a=[]);while((r||c.pose.options.maxHighlightLength?(a=!1,l&&kt(e,t,r,h.pos),h.pos=t.length,s=null):s=At(Tt(n,h,r.state,f),o),f){var d=f[0].name;d&&(s="m-"+(s?d+" "+s:d))}if(!a||c!=s){while(ul;--a){if(a<=o.first)return o.first;var s=tt(o,a-1),u=s.stateAfter;if(u&&(!n||a+(u instanceof bt?u.lookAhead:0)<=o.modeFrontier))return a;var c=V(s.text,null,e.options.tabSize);(null==i||r>c)&&(i=a-1,r=c)}return i}function Wt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=tt(e,r).stateAfter;if(i&&(!(i instanceof bt)||r+i.lookAhead=t:o.to>t);(r||(r=[])).push(new zt(l,o.from,s?null:o.to))}}return r}function Ut(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t);if(a||o.from==t&&"bookmark"==l.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(l.inclusiveLeft?o.from<=t:o.from0&&a)for(var w=0;w0)){var c=[s,1],h=ct(u.from,a.from),f=ct(u.to,a.to);(h<0||!l.inclusiveLeft&&!h)&&c.push({from:u.from,to:a.from}),(f>0||!l.inclusiveRight&&!f)&&c.push({from:a.to,to:u.to}),i.splice.apply(i,c),s+=c.length-3}}return i}function jt(e){var t=e.markedSpans;if(t){for(var n=0;nt)&&(!n||qt(n,o.marker)<0)&&(n=o.marker)}return n}function tn(e,t,n,r,i){var o=tt(e,t),l=Ft&&o.markedSpans;if(l)for(var a=0;a=0&&h<=0||c<=0&&h>=0)&&(c<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?ct(u.to,n)>=0:ct(u.to,n)>0)||c>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?ct(u.from,r)<=0:ct(u.from,r)<0)))return!0}}}function nn(e){var t;while(t=Jt(e))e=t.find(-1,!0).line;return e}function rn(e){var t;while(t=Qt(e))e=t.find(1,!0).line;return e}function on(e){var t,n;while(t=Qt(e))e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function ln(e,t){var n=tt(e,t),r=nn(n);return n==r?t:ot(r)}function an(e,t){if(t>e.lastLine())return t;var n,r=tt(e,t);if(!sn(e,r))return t;while(n=Qt(r))r=n.find(1,!0).line;return ot(r)+1}function sn(e,t){var n=Ft&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}var dn=function(e,t,n){this.text=e,Xt(this,t),this.height=n?n(this):1};function pn(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),jt(e),Xt(e,n);var i=r?r(e):1;i!=e.height&&it(e,i)}function gn(e){e.parent=null,jt(e)}dn.prototype.lineNo=function(){return ot(this)},Te(dn);var vn={},mn={};function yn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?mn:vn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function bn(e,t){var n=D("span",null,null,s?"padding-right: .1px":null),r={pre:D("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,l=void 0;r.pos=0,r.addToken=xn,ze(e.display.measure)&&(l=me(o,e.doc.direction))&&(r.addToken=Sn(r.addToken,l)),r.map=[];var a=t!=e.display.externalMeasured&&ot(o);Ln(o,r,Ct(e,o,a)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=E(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=E(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Pe(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(s){var u=r.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ce(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=E(r.pre.className,r.textClass||"")),r}function wn(e){var t=O("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function xn(e,t,n,r,i,o,s){if(t){var u,c=e.splitSpaces?Cn(t,e.trailingSpace):t,h=e.cm.state.specialChars,f=!1;if(h.test(t)){u=document.createDocumentFragment();var d=0;while(1){h.lastIndex=d;var p=h.exec(t),g=p?p.index-d:t.length-d;if(g){var v=document.createTextNode(c.slice(d,d+g));l&&a<9?u.appendChild(O("span",[v])):u.appendChild(v),e.map.push(e.pos,e.pos+g,v),e.col+=g,e.pos+=g}if(!p)break;d+=g+1;var m=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,b=y-e.col%y;m=u.appendChild(O("span",Q(b),"cm-tab")),m.setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?(m=u.appendChild(O("span","\r"==p[0]?"␍":"␤","cm-invalidchar")),m.setAttribute("cm-text",p[0]),e.col+=1):(m=e.cm.options.specialCharPlaceholder(p[0]),m.setAttribute("cm-text",p[0]),l&&a<9?u.appendChild(O("span",[m])):u.appendChild(m),e.col+=1);e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,u=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,u),l&&a<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),n||r||i||f||o||s){var w=n||"";r&&(w+=r),i&&(w+=i);var x=O("span",[u],w,o);if(s)for(var C in s)s.hasOwnProperty(C)&&"style"!=C&&"class"!=C&&x.setAttribute(C,s[C]);return e.content.appendChild(x)}e.content.appendChild(u)}}function Cn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;iu&&h.from<=u)break;if(h.to>=c)return e(n,r,i,o,l,a,s);e(n,r.slice(0,h.to-u),i,o,null,a,s),o=null,r=r.slice(h.to-u),u=h.to}}}function kn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Ln(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var l,a,s,u,c,h,f,d=i.length,p=0,g=1,v="",m=0;;){if(m==p){s=u=c=a="",f=null,h=null,m=1/0;for(var y=[],b=void 0,w=0;wp||C.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(s+=" "+C.className),C.css&&(a=(a?a+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&((f||(f={})).title=C.title),C.attributes)for(var S in C.attributes)(f||(f={}))[S]=C.attributes[S];C.collapsed&&(!h||qt(h.marker,C)<0)&&(h=x)}else x.from>p&&m>x.from&&(m=x.from)}if(b)for(var k=0;k=d)break;var T=Math.min(d,m);while(1){if(v){var M=p+v.length;if(!h){var N=M>T?v.slice(0,T-p):v;t.addToken(t,N,l?l+s:s,c,p+N.length==m?u:"",a,f)}if(M>=T){v=v.slice(T-p),p=T;break}p=M,c=""}v=i.slice(o,o=n[g++]),l=yn(n[g++],t.cm.options)}}else for(var A=1;A2&&o.push((s.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function nr(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function rr(e,t){t=nn(t);var n=ot(t),r=e.display.externalMeasured=new Tn(e.doc,t,n);r.lineN=n;var i=r.built=bn(e,r);return r.text=i.pre,A(e.display.lineMeasure,i.pre),r}function ir(e,t,n,r){return ar(e,lr(e,t),n,r)}function or(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(o=s-a,i=o-1,t>=s&&(l="right")),null!=i){if(r=e[u+2],a==s&&n==(r.insertLeft?"left":"right")&&(l=n),"left"==n&&0==i)while(u&&e[u-2]==e[u-3]&&e[u-1].insertLeft)r=e[2+(u-=3)],l="left";if("right"==n&&i==s-a)while(u=0;i--)if((n=e[i]).left!=n.right)break;return n}function fr(e,t,n,r){var i,o=cr(t.map,n,r),s=o.node,u=o.start,c=o.end,h=o.collapse;if(3==s.nodeType){for(var f=0;f<4;f++){while(u&&ce(t.line.text.charAt(o.coverStart+u)))--u;while(o.coverStart+c0&&(h=r="right"),i=e.options.lineWrapping&&(d=s.getClientRects()).length>1?d["right"==r?d.length-1:0]:s.getBoundingClientRect()}if(l&&a<9&&!u&&(!i||!i.left&&!i.right)){var p=s.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+Fr(e.display),top:p.top,bottom:p.bottom}:ur}for(var g=i.top-t.rect.top,v=i.bottom-t.rect.top,m=(g+v)/2,y=t.view.measure.heights,b=0;b=r.text.length?(s=r.text.length,u="before"):s<=0&&(s=0,u="after"),!a)return l("before"==u?s-1:s,"before"==u);function c(e,t,n){var r=a[t],i=1==r.level;return l(n?e-1:e,i!=n)}var h=ge(a,s,u),f=pe,d=c(s,h,"before"==u);return null!=f&&(d.other=c(s,f,"before"!=u)),d}function kr(e,t){var n=0;t=vt(e.doc,t),e.options.lineWrapping||(n=Fr(e.display)*t.ch);var r=tt(e.doc,t.line),i=cn(r)+$n(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Lr(e,t,n,r,i){var o=ut(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Tr(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Lr(r.first,0,null,-1,-1);var i=lt(r,n),o=r.first+r.size-1;if(i>o)return Lr(r.first+r.size-1,tt(r,o).text.length,null,1,1);t<0&&(t=0);for(var l=tt(r,i);;){var a=Or(e,l,i,t,n),s=en(l,a.ch+(a.xRel>0||a.outside>0?1:0));if(!s)return a;var u=s.find(1);if(u.line==i)return u;l=tt(r,i=u.line)}}function Mr(e,t,n,r){r-=br(t);var i=t.text.length,o=fe(function(t){return ar(e,n,t-1).bottom<=r},i,0);return i=fe(function(t){return ar(e,n,t).top>r},o,i),{begin:o,end:i}}function Nr(e,t,n,r){n||(n=lr(e,t));var i=wr(e,t,ar(e,n,r),"line").top;return Mr(e,t,n,i)}function Ar(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function Or(e,t,n,r,i){i-=cn(t);var o=lr(e,t),l=br(t),a=0,s=t.text.length,u=!0,c=me(t,e.doc.direction);if(c){var h=(e.options.lineWrapping?Wr:Dr)(e,t,n,o,c,r,i);u=1!=h.level,a=u?h.from:h.to-1,s=u?h.to:h.from-1}var f,d,p=null,g=null,v=fe(function(t){var n=ar(e,o,t);return n.top+=l,n.bottom+=l,!!Ar(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,g=n),!0)},a,s),m=!1;if(g){var y=r-g.left=w.bottom?1:0}return v=he(t.text,v,1),Lr(n,v,d,m,r-f)}function Dr(e,t,n,r,i,o,l){var a=fe(function(a){var s=i[a],u=1!=s.level;return Ar(Sr(e,ut(n,u?s.to:s.from,u?"before":"after"),"line",t,r),o,l,!0)},0,i.length-1),s=i[a];if(a>0){var u=1!=s.level,c=Sr(e,ut(n,u?s.from:s.to,u?"after":"before"),"line",t,r);Ar(c,o,l,!0)&&c.top>l&&(s=i[a-1])}return s}function Wr(e,t,n,r,i,o,l){var a=Mr(e,t,r,l),s=a.begin,u=a.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,h=null,f=0;f=u||d.to<=s)){var p=1!=d.level,g=ar(e,r,p?Math.min(u,d.to)-1:Math.max(s,d.from)).right,v=gv)&&(c=d,h=v)}}return c||(c=i[i.length-1]),c.fromu&&(c={from:c.from,to:u,level:c.level}),c}function Hr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==sr){sr=O("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)sr.appendChild(document.createTextNode("x")),sr.appendChild(O("br"));sr.appendChild(document.createTextNode("x"))}A(e.measure,sr);var n=sr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),N(e.measure),n||1}function Fr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),n=O("pre",[t],"CodeMirror-line-like");A(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Er(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var a=e.display.gutterSpecs[l].className;n[a]=o.offsetLeft+o.clientLeft+i,r[a]=o.clientWidth}return{fixedPos:Pr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Pr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function zr(e){var t=Hr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Fr(e.display)-3);return function(i){if(sn(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l0&&(s=tt(e.doc,u.line).text).length==u.ch){var c=V(s,s.length,e.options.tabSize)-s.length;u=ut(u.line,Math.max(0,Math.round((o-Zn(e.display).left)/Fr(e.display))-c))}return u}function Br(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ft&&ln(e.doc,t)i.viewFrom?Vr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Vr(e);else if(t<=i.viewFrom){var o=_r(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Vr(e)}else if(n>=i.viewTo){var l=_r(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):Vr(e)}else{var a=_r(e,t,t,-1),s=_r(e,n,n+r,1);a&&s?(i.view=i.view.slice(0,a.index).concat(Mn(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):Vr(e)}var u=i.externalMeasured;u&&(n=i.lineN&&t=r.viewTo)){var o=r.view[Br(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==K(l,n)&&l.push(n)}}}function Vr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function _r(e,t,n,r){var i,o=Br(e,t),l=e.display.view;if(!Ft||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var a=e.display.viewFrom,s=0;s0){if(o==l.length-1)return null;i=a+l[o].size-t,o++}else i=a-t;t+=i,n+=i}while(ln(e.doc,n)!=n){if(o==(r<0?0:l.length-1))return null;n+=r*l[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function Kr(e,t,n){var r=e.display,i=r.view;0==i.length||t>=r.viewTo||n<=r.viewFrom?(r.view=Mn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Mn(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Br(e,n)))),r.viewTo=n}function jr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().line0?l:e.defaultCharWidth())+"px"}if(r.other){var a=n.appendChild(O("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=r.other.left+"px",a.style.top=r.other.top+"px",a.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function qr(e,t){return e.top-t.top||e.left-t.left}function Zr(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),l=Zn(e.display),a=l.left,s=Math.max(r.sizerWidth,Qn(e)-r.sizer.offsetLeft)-l.right,u="ltr"==i.direction;function c(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),o.appendChild(O("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?s-e:n)+"px;\n height: "+(r-t)+"px"))}function h(t,n,r){var o,l,h=tt(i,t),f=h.text.length;function d(n,r){return Cr(e,ut(t,n),"div",h,r)}function p(t,n,r){var i=Nr(e,h,null,t),o="ltr"==n==("after"==r)?"left":"right",l="after"==r?i.begin:i.end-(/\s/.test(h.text.charAt(i.end-1))?2:1);return d(l,o)[o]}var g=me(h,i.direction);return de(g,n||0,null==r?f:r,function(e,t,i,h){var v="ltr"==i,m=d(e,v?"left":"right"),y=d(t-1,v?"right":"left"),b=null==n&&0==e,w=null==r&&t==f,x=0==h,C=!g||h==g.length-1;if(y.top-m.top<=3){var S=(u?b:w)&&x,k=(u?w:b)&&C,L=S?a:(v?m:y).left,T=k?s:(v?y:m).right;c(L,m.top,T-L,m.bottom)}else{var M,N,A,O;v?(M=u&&b&&x?a:m.left,N=u?s:p(e,i,"before"),A=u?a:p(t,i,"after"),O=u&&w&&C?s:y.right):(M=u?p(e,i,"before"):a,N=!u&&b&&x?s:m.right,A=!u&&w&&C?a:y.left,O=u?p(t,i,"after"):s),c(M,m.top,N-M,m.bottom),m.bottom0?t.blinker=setInterval(function(){e.hasFocus()||ni(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Qr(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||ti(e))}function ei(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&ni(e))},100)}function ti(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Ce(e,"focus",e,t),e.state.focused=!0,F(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),s&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Jr(e))}function ni(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ce(e,"blur",e,t),e.state.focused=!1,M(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function ri(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,s=0;s.005||g<-.005)&&(ie.display.sizerWidth){var m=Math.ceil(f/Fr(e.display));m>e.display.maxLineLength&&(e.display.maxLineLength=m,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function ii(e){if(e.widgets)for(var t=0;t=l&&(o=lt(t,cn(tt(t,s))-e.wrapper.clientHeight),l=s)}return{from:o,to:Math.max(l,o+1)}}function li(e,t){if(!Se(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,o=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(i=!1),null!=i&&!g){var l=O("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-$n(e.display))+"px;\n height: "+(t.bottom-t.top+Jn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(i),e.display.lineSpace.removeChild(l)}}}function ai(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?ut(t.line,t.ch+1,"before"):t,t=t.ch?ut(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var l=!1,a=Sr(e,t),s=n&&n!=t?Sr(e,n):a;i={left:Math.min(a.left,s.left),top:Math.min(a.top,s.top)-r,right:Math.max(a.left,s.left),bottom:Math.max(a.bottom,s.bottom)+r};var u=ui(e,i),c=e.doc.scrollTop,h=e.doc.scrollLeft;if(null!=u.scrollTop&&(vi(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(yi(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-h)>1&&(l=!0)),!l)break}return i}function si(e,t){var n=ui(e,t);null!=n.scrollTop&&vi(e,n.scrollTop),null!=n.scrollLeft&&yi(e,n.scrollLeft)}function ui(e,t){var n=e.display,r=Hr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=er(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+qn(n),s=t.topa-r;if(t.topi+o){var c=Math.min(t.top,(u?a:t.bottom)-o);c!=i&&(l.scrollTop=c)}var h=e.options.fixedGutter?0:n.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-h,d=Qn(e)-n.gutters.offsetWidth,p=t.right-t.left>d;return p&&(t.right=t.left+d),t.left<10?l.scrollLeft=0:t.leftd+f-3&&(l.scrollLeft=t.right+(p?0:10)-d),l}function ci(e,t){null!=t&&(pi(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function hi(e){pi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function fi(e,t,n){null==t&&null==n||pi(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function di(e,t){pi(e),e.curOp.scrollToPos=t}function pi(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=kr(e,t.from),r=kr(e,t.to);gi(e,n,r,t.margin)}}function gi(e,t,n,r){var i=ui(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});fi(e,i.scrollLeft,i.scrollTop)}function vi(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||Xi(e,{top:t}),mi(e,t,!0),n&&Xi(e),Ri(e,100))}function mi(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function yi(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,Zi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function bi(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+qn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Jn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var wi=function(e,t,n){this.cm=n;var r=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),be(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),be(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,l&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};wi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},wi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},wi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},wi.prototype.zeroWidthHack=function(){var e=b&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new _,this.disableVert=new _},wi.prototype.enableZeroWidthBar=function(e,t,n){function r(){var i=e.getBoundingClientRect(),o="vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.visibility="hidden":t.set(1e3,r)}e.style.visibility="",t.set(1e3,r)},wi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var xi=function(){};function Ci(e,t){t||(t=bi(e));var n=e.display.barWidth,r=e.display.barHeight;Si(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&ri(e),Si(e,bi(e)),n=e.display.barWidth,r=e.display.barHeight}function Si(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}xi.prototype.update=function(){return{bottom:0,right:0}},xi.prototype.setScrollLeft=function(){},xi.prototype.setScrollTop=function(){},xi.prototype.clear=function(){};var ki={native:wi,null:xi};function Li(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&M(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new ki[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),be(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){"horizontal"==n?yi(e,t):vi(e,t)},e),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)}var Ti=0;function Mi(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ti,markArrays:null},An(e.curOp)}function Ni(e){var t=e.curOp;t&&Dn(t,function(e){for(var t=0;t=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Gi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Di(e){e.updatedDisplay=e.mustUpdate&&Ki(e.cm,e.update)}function Wi(e){var t=e.cm,n=t.display;e.updatedDisplay&&ri(t),e.barMeasure=bi(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=ir(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Jn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Qn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Hi(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var n=+new Date+e.options.workTime,r=St(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var l=o.styles,a=o.text.length>e.options.maxHighlightLength?Ze(t.mode,r.state):null,s=xt(e,o,r,!0);a&&(r.state=a),o.styles=s.styles;var u=o.styleClasses,c=s.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var h=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),f=0;!h&&fn)return Ri(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Ei(e,function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==jr(e))return!1;Ji(e)&&(Vr(e),t.dims=Er(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroml&&n.viewTo-l<20&&(l=Math.min(i,n.viewTo)),Ft&&(o=ln(e.doc,o),l=an(e.doc,l));var a=o!=n.viewFrom||l!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Kr(e,o,l),n.viewOffset=cn(tt(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=jr(e);if(!a&&0==s&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Vi(e);return s>4&&(n.lineDiv.style.display="none"),Yi(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,_i(u),N(n.cursorDiv),N(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Ri(e,400)),n.updateLineNumbers=null,!0}function ji(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Qn(e))r&&(t.visible=oi(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+qn(e.display)-er(e),n.top)}),t.visible=oi(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!Ki(e,t))break;ri(e);var i=bi(e);Xr(e),Ci(e,i),qi(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Xi(e,t){var n=new Gi(e,t);if(Ki(e,n)){ri(e),ji(e,n);var r=bi(e);Xr(e),Ci(e,r),qi(e,r),n.finish()}}function Yi(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,l=o.firstChild;function a(t){var n=t.nextSibling;return s&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var u=r.view,c=r.viewFrom,h=0;h-1&&(d=!1),En(e,f,c,n)),d&&(N(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(st(e.options,c)))),l=f.node.nextSibling}else{var p=Vn(e,f,c,n);o.insertBefore(p,l)}c+=f.size}while(l)l=a(l)}function $i(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Hn(e,"gutterChanged",e)}function qi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Jn(e)+"px"}function Zi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=Pr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",l=0;lu.clientWidth,p=u.scrollHeight>u.clientHeight;if(i&&d||o&&p){if(o&&b&&s)e:for(var g=t.target,v=a.view;g!=u;g=g.parentNode)for(var m=0;m=0&&ct(e,r.to())<=0)return n}return-1};var uo=function(e,t){this.anchor=e,this.head=t};function co(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(e,t){return ct(e.from(),t.from())}),n=K(t,i);for(var o=1;o0:s>=0){var u=pt(a.from(),l.from()),c=dt(a.to(),l.to()),h=a.empty()?l.from()==l.head:a.from()==a.head;o<=n&&--n,t.splice(--o,2,new uo(h?c:u,h?u:c))}}return new so(t,n)}function ho(e,t){return new so([new uo(e,t||e)],0)}function fo(e){return e.text?ut(e.from.line+e.text.length-1,ee(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function po(e,t){if(ct(e,t.from)<0)return e;if(ct(e,t.to)<=0)return fo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=fo(t).ch-t.to.ch),ut(n,r)}function go(e,t){for(var n=[],r=0;r1&&e.remove(a.line+1,p-1),e.insert(a.line+1,m)}Hn(e,"change",e,t)}function Co(e,t,n){function r(e,i,o){if(e.linked)for(var l=0;l1&&!e.done[e.done.length-2].ranges?(e.done.pop(),ee(e.done)):void 0}function Oo(e,t,n,r){var i=e.history;i.undone.length=0;var o,l,a=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=Ao(i,i.lastOp==r)))l=ee(o.changes),0==ct(t.from,t.to)&&0==ct(t.from,l.to)?l.to=fo(t):o.changes.push(Mo(e,t));else{var s=ee(i.done);s&&s.ranges||Ho(e.sel,i.done),o={changes:[Mo(e,t)],generation:i.generation},i.done.push(o);while(i.done.length>i.undoDepth)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,l||Ce(e,"historyAdded")}function Do(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Wo(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Do(e,o,ee(i.done),t))?i.done[i.done.length-1]=t:Ho(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&No(i.undone)}function Ho(e,t){var n=ee(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Fo(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function Eo(e){if(!e)return null;for(var t,n=0;n-1&&(ee(a)[h]=u[h],delete u[h])}}}return r}function Ro(e,t,n,r){if(r){var i=e.anchor;if(n){var o=ct(t,i)<0;o!=ct(n,i)<0?(i=t,t=n):o!=ct(t,n)<0&&(t=n)}return new uo(i,t)}return new uo(n||t,t)}function Bo(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),jo(e,new so([Ro(e.sel.primary(),t,n,i)],0),r)}function Go(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:a.to>t.ch))){if(i&&(Ce(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!s.atomic)continue;if(n){var h=s.find(r<0?1:-1),f=void 0;if((r<0?c:u)&&(h=Qo(e,h,-r,h&&h.line==t.line?o:null)),h&&h.line==t.line&&(f=ct(h,n))&&(r<0?f<0:f>0))return Zo(e,h,t,r,i)}var d=s.find(r<0?-1:1);return(r<0?u:c)&&(d=Qo(e,d,r,d.line==t.line?o:null)),d?Zo(e,d,t,r,i):null}}return t}function Jo(e,t,n,r,i){var o=r||1,l=Zo(e,t,n,o,i)||!i&&Zo(e,t,n,o,!0)||Zo(e,t,n,-o,i)||!i&&Zo(e,t,n,-o,!0);return l||(e.cantEdit=!0,ut(e.first,0))}function Qo(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?vt(e,ut(t.line-1)):null:n>0&&t.ch==(r||tt(e,t.line)).text.length?t.line=0;--i)rl(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else rl(e,t)}}function rl(e,t){if(1!=t.text.length||""!=t.text[0]||0!=ct(t.from,t.to)){var n=go(e,t);Oo(e,t,n,e.cm?e.cm.curOp.id:NaN),ll(e,t,n,Vt(e,t));var r=[];Co(e,function(e,n){n||-1!=K(r,e.history)||(hl(e.history,t),r.push(e.history)),ll(e,t,null,Vt(e,t))})}}function il(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,l=e.sel,a="undo"==t?o.done:o.undone,s="undo"==t?o.undone:o.done,u=0;u=0;--d){var p=f(d);if(p)return p.v}}}}function ol(e,t){if(0!=t&&(e.first+=t,e.sel=new so(te(e.sel.ranges,function(e){return new uo(ut(e.anchor.line+t,e.anchor.ch),ut(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Gr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:ut(o,tt(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=nt(e,t.from,t.to),n||(n=go(e,t)),e.cm?al(e.cm,t,r):xo(e,t,r),Xo(e,n,Y),e.cantEdit&&Jo(e,ut(e.firstLine(),0))&&(e.cantEdit=!1)}}function al(e,t,n){var r=e.doc,i=e.display,o=t.from,l=t.to,a=!1,s=o.line;e.options.lineWrapping||(s=ot(nn(tt(r,o.line))),r.iter(s,l.line+1,function(e){if(e==i.maxLine)return a=!0,!0})),r.sel.contains(t.from,t.to)>-1&&ke(e),xo(r,t,n,zr(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,function(e){var t=hn(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,a=!1)}),a&&(e.curOp.updateMaxLine=!0)),Wt(r,o.line),Ri(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?Gr(e):o.line!=l.line||1!=t.text.length||wo(e.doc,t)?Gr(e,o.line,l.line+1,u):Ur(e,o.line,"text");var c=Le(e,"changes"),h=Le(e,"change");if(h||c){var f={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};h&&Hn(e,"change",e,f),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function sl(e,t,n,r,i){var o;r||(r=n),ct(r,n)<0&&(o=[r,n],n=o[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),nl(e,{from:n,to:r,text:t,origin:i})}function ul(e,t,n,r){n1||!(this.children[0]instanceof dl))){var a=[];this.collapse(a),this.children=[new dl(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var l=i.lines.length%25+25,a=l;a10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==l&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=D("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(tn(e,t.line,t,n,o)||t.line!=n.line&&tn(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Pt()}o.addToHistory&&Oo(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var a,s=t.line,u=e.cm;if(e.iter(s,n.line+1,function(r){u&&o.collapsed&&!u.options.lineWrapping&&nn(r)==u.display.maxLine&&(a=!0),o.collapsed&&s!=t.line&&it(r,0),Bt(r,new zt(o,s==t.line?t.ch:null,s==n.line?n.ch:null),e.cm&&e.cm.curOp),++s}),o.collapsed&&e.iter(t.line,n.line+1,function(t){sn(e,t)&&it(t,0)}),o.clearOnEnter&&be(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Et(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++yl,o.atomic=!0),u){if(a&&(u.curOp.updateMaxLine=!0),o.collapsed)Gr(u,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=t.line;c<=n.line;c++)Ur(u,c,"text");o.atomic&&$o(u.doc),Hn(u,"markerAdded",u,o)}return o}bl.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Mi(e),Le(this,"clear")){var n=this.find();n&&Hn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Gr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&$o(e.doc)),e&&Hn(e,"markerCleared",e,this,r,i),t&&Ni(e),this.parent&&this.parent.clear()}},bl.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;s--)nl(this,r[s]);a?Ko(this,a):this.cm&&hi(this.cm)}),undo:Ii(function(){il(this,"undo")}),redo:Ii(function(){il(this,"redo")}),undoSelection:Ii(function(){il(this,"undo",!0)}),redoSelection:Ii(function(){il(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=vt(this,e),t=vt(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var a=0;a=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||n&&!n(s.marker)||r.push(s.marker.parent||s.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n}),vt(this,ut(n,t))},indexFromPos:function(e){e=vt(this,e);var t=e.ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var h=e.dataTransfer.getData("Text");if(h){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),Xo(t.doc,ho(n,n)),f)for(var d=0;d=0;t--)sl(e.doc,"",r[t].from,r[t].to,"+delete");hi(e)})}function Zl(e,t,n){var r=he(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Jl(e,t,n){var r=Zl(e,t.ch,n);return null==r?null:new ut(t.line,r,n<0?"after":"before")}function Ql(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=me(n,t.doc.direction);if(o){var l,a=i<0?ee(o):o[0],s=i<0==(1==a.level),u=s?"after":"before";if(a.level>0||"rtl"==t.doc.direction){var c=lr(t,n);l=i<0?n.text.length-1:0;var h=ar(t,c,l).top;l=fe(function(e){return ar(t,c,e).top==h},i<0==(1==a.level)?a.from:a.to-1,l),"before"==u&&(l=Zl(n,l,1))}else l=i<0?a.to:a.from;return new ut(r,l,u)}}return new ut(r,i<0?n.text.length:0,i<0?"before":"after")}function ea(e,t,n,r){var i=me(t,e.doc.direction);if(!i)return Jl(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=ge(i,n.ch,n.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(r>0?l.to>n.ch:l.from=l.from&&f>=c.begin)){var d=h?"before":"after";return new ut(n.line,f,d)}}var p=function(e,t,r){for(var o=function(e,t){return t?new ut(n.line,s(e,1),"before"):new ut(n.line,e,"after")};e>=0&&e0==(1!=l.level),u=a?r.begin:s(r.end,-1);if(l.from<=u&&u0?c.end:s(c.begin,-1);return null==v||r>0&&v==t.text.length||(g=p(r>0?0:i.length-1,r,u(v)),!g)?null:g}Ul.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ul.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ul.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ul.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ul["default"]=b?Ul.macDefault:Ul.pcDefault;var ta={selectAll:el,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Y)},killLine:function(e){return ql(e,function(t){if(t.empty()){var n=tt(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new ut(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ut(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=tt(e.doc,i.line-1).text;l&&(i=new ut(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),ut(i.line-1,l.length-1),i,"+transpose"))}n.push(new uo(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Ei(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(ct((i=a.ranges[i]).from(),t)<0||t.xRel>0)&&(ct(i.to(),t)>0||t.xRel<0)?Ta(e,r,t,o):Na(e,r,t,o)}function Ta(e,t,n,r){var i=e.display,o=!1,u=Pi(e,function(t){s&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:ei(e)),xe(i.wrapper.ownerDocument,"mouseup",u),xe(i.wrapper.ownerDocument,"mousemove",c),xe(i.scroller,"dragstart",h),xe(i.scroller,"drop",u),o||(Me(t),r.addNew||Bo(e.doc,n,null,null,r.extend),s&&!d||l&&9==a?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},h=function(){return o=!0};s&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=!r.moveOnDrag,be(i.wrapper.ownerDocument,"mouseup",u),be(i.wrapper.ownerDocument,"mousemove",c),be(i.scroller,"dragstart",h),be(i.scroller,"drop",u),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Ma(e,t,n){if("char"==n)return new uo(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new uo(ut(t.line,0),vt(e.doc,ut(t.line+1,0)));var r=n(e,t);return new uo(r.from,r.to)}function Na(e,t,n,r){l&&ei(e);var i=e.display,o=e.doc;Me(t);var a,s,u=o.sel,c=u.ranges;if(r.addNew&&!r.extend?(s=o.sel.contains(n),a=s>-1?c[s]:new uo(n,n)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new uo(n,n)),n=Rr(e,t,!0,!0),s=-1;else{var h=Ma(e,n,r.unit);a=r.extend?Ro(a,h.anchor,h.head,r.extend):h}r.addNew?-1==s?(s=c.length,jo(o,co(e,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?(jo(o,co(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):Uo(o,s,a,$):(s=0,jo(o,new so([a],0),$),u=o.sel);var f=n;function d(t){if(0!=ct(f,t))if(f=t,"rectangle"==r.unit){for(var i=[],l=e.options.tabSize,c=V(tt(o,n.line).text,n.ch,l),h=V(tt(o,t.line).text,t.ch,l),d=Math.min(c,h),p=Math.max(c,h),g=Math.min(n.line,t.line),v=Math.min(e.lastLine(),Math.max(n.line,t.line));g<=v;g++){var m=tt(o,g).text,y=Z(m,d,l);d==p?i.push(new uo(ut(g,y),ut(g,y))):m.length>y&&i.push(new uo(ut(g,y),ut(g,Z(m,p,l))))}i.length||i.push(new uo(n,n)),jo(o,co(e,u.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=a,x=Ma(e,t,r.unit),C=w.anchor;ct(x.anchor,C)>0?(b=x.head,C=pt(w.from(),x.anchor)):(b=x.anchor,C=dt(w.to(),x.head));var S=u.ranges.slice(0);S[s]=Aa(e,new uo(vt(o,C),b)),jo(o,co(e,S,s),$)}}var p=i.wrapper.getBoundingClientRect(),g=0;function v(t){var n=++g,l=Rr(e,t,!0,"rectangle"==r.unit);if(l)if(0!=ct(l,f)){e.curOp.focus=H(I(e)),d(l);var a=oi(i,o);(l.line>=a.to||l.linep.bottom?20:0;s&&setTimeout(Pi(e,function(){g==n&&(i.scroller.scrollTop+=s,v(t))}),50)}}function m(t){e.state.selectingText=!1,g=1/0,t&&(Me(t),i.input.focus()),xe(i.wrapper.ownerDocument,"mousemove",y),xe(i.wrapper.ownerDocument,"mouseup",b),o.history.lastSelOrigin=null}var y=Pi(e,function(e){0!==e.buttons&&We(e)?v(e):m(e)}),b=Pi(e,m);e.state.selectingText=b,be(i.wrapper.ownerDocument,"mousemove",y),be(i.wrapper.ownerDocument,"mouseup",b)}function Aa(e,t){var n=t.anchor,r=t.head,i=tt(e.doc,n.line);if(0==ct(n,r)&&n.sticky==r.sticky)return t;var o=me(i);if(!o)return t;var l=ge(o,n.ch,n.sticky),a=o[l];if(a.from!=n.ch&&a.to!=n.ch)return t;var s,u=l+(a.from==n.ch==(1!=a.level)?0:1);if(0==u||u==o.length)return t;if(r.line!=n.line)s=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=ge(o,r.ch,r.sticky),h=c-l||(r.ch-n.ch)*(1==a.level?-1:1);s=c==u-1||c==u?h<0:h>0}var f=o[u+(s?-1:0)],d=s==(1==f.level),p=d?f.from:f.to,g=d?"after":"before";return n.ch==p&&n.sticky==g?t:new uo(new ut(n.line,p,g),r)}function Oa(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(f){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Me(t);var l=e.display,a=l.lineDiv.getBoundingClientRect();if(o>a.bottom||!Le(e,n))return Ae(t);o-=a.top-l.viewOffset;for(var s=0;s=i){var c=lt(e.doc,o),h=e.display.gutterSpecs[s];return Ce(e,n,e,c,h.className,t),Ae(t)}}}function Da(e,t){return Oa(e,t,"gutterClick",!0)}function Wa(e,t){Yn(e.display,t)||Ha(e,t)||Se(e,t,"contextmenu")||k||e.display.input.onContextMenu(t)}function Ha(e,t){return!!Le(e,"gutterContextMenu")&&Oa(e,t,"gutterContextMenu",!1)}function Fa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),vr(e)}wa.prototype.compare=function(e,t,n){return this.time+ba>e&&0==ct(t,this.pos)&&n==this.button};var Ea={toString:function(){return"CodeMirror.Init"}},Pa={},za={};function Ia(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Ea&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Ea,n("value","",function(e,t){return e.setValue(t)},!0),n("mode",null,function(e,t){e.doc.modeOption=t,yo(e)},!0),n("indentUnit",2,yo,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(e){bo(e),vr(e),Gr(e)},!0),n("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(ut(r,o))}r++});for(var i=n.length-1;i>=0;i--)sl(e.doc,t,n[i],ut(n[i].line,n[i].ch+t.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Ea&&e.refresh()}),n("specialCharPlaceholder",wn,function(e){return e.refresh()},!0),n("electricChars",!0),n("inputStyle",y?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),n("autocorrect",!1,function(e,t){return e.getInputField().autocorrect=t},!0),n("autocapitalize",!1,function(e,t){return e.getInputField().autocapitalize=t},!0),n("rtlMoveVisually",!x),n("wholeLineUpdateBefore",!0),n("theme","default",function(e){Fa(e),to(e)},!0),n("keyMap","default",function(e,t,n){var r=$l(t),i=n!=Ea&&$l(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Ba,!0),n("gutters",[],function(e,t){e.display.gutterSpecs=Qi(t,e.options.lineNumbers),to(e)},!0),n("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?Pr(e.display)+"px":"0",e.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(e){return Ci(e)},!0),n("scrollbarStyle","native",function(e){Li(e),Ci(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),n("lineNumbers",!1,function(e,t){e.display.gutterSpecs=Qi(e.options.gutters,t),to(e)},!0),n("firstLineNumber",1,to,!0),n("lineNumberFormatter",function(e){return e},to,!0),n("showCursorWhenSelecting",!1,Xr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(e,t){"nocursor"==t&&(ni(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),n("screenReaderLabel",null,function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)}),n("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),n("dragDrop",!0,Ra),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,Xr,!0),n("singleCursorHeightPerLine",!0,Xr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,bo,!0),n("addModeClass",!1,bo,!0),n("pollInterval",100),n("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),n("historyEventDelay",1250),n("viewportMargin",10,function(e){return e.refresh()},!0),n("maxHighlightLength",1e4,bo,!0),n("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),n("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),n("autofocus",null),n("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0),n("phrases",null)}function Ra(e,t,n){var r=n&&n!=Ea;if(!t!=!r){var i=e.display.dragFunctions,o=t?be:xe;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function Ba(e){e.options.lineWrapping?(F(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(M(e.display.wrapper,"CodeMirror-wrap"),fn(e)),Ir(e),Gr(e),vr(e),setTimeout(function(){return Ci(e)},100)}function Ga(e,t){var n=this;if(!(this instanceof Ga))return new Ga(e,t);this.options=t=t?U(t):{},U(Pa,t,!1);var r=t.value;"string"==typeof r?r=new Ml(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Ga.inputStyles[t.inputStyle](this),o=this.display=new no(e,r,i,t);for(var u in o.wrapper.CodeMirror=this,Fa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Li(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new _,keySeq:null,specialChars:null},t.autofocus&&!y&&o.input.focus(),l&&a<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Ua(this),El(),Mi(this),this.curOp.forceUpdate=!0,So(this,r),t.autofocus&&!y||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&ti(n)},20):ni(this),za)za.hasOwnProperty(u)&&za[u](this,t[u],Ea);Ji(this),t.finishInit&&t.finishInit(this);for(var c=0;c400}be(t.scroller,"touchstart",function(i){if(!Se(e,i)&&!o(i)&&!Da(e,i)){t.input.ensurePolled(),clearTimeout(n);var l=+new Date;t.activeTouch={start:l,moved:!1,prev:l-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),be(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),be(t.scroller,"touchend",function(n){var r=t.activeTouch;if(r&&!Yn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,l=e.coordsChar(t.activeTouch,"page");o=!r.prev||s(r,r.prev)?new uo(l,l):!r.prev.prev||s(r,r.prev.prev)?e.findWordAt(l):new uo(ut(l.line,0),vt(e.doc,ut(l.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),Me(n)}i()}),be(t.scroller,"touchcancel",i),be(t.scroller,"scroll",function(){t.scroller.clientHeight&&(vi(e,t.scroller.scrollTop),yi(e,t.scroller.scrollLeft,!0),Ce(e,"scroll",e))}),be(t.scroller,"mousewheel",function(t){return ao(e,t)}),be(t.scroller,"DOMMouseScroll",function(t){return ao(e,t)}),be(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){Se(e,t)||Oe(t)},over:function(t){Se(e,t)||(Dl(e,t),Oe(t))},start:function(t){return Ol(e,t)},drop:Pi(e,Al),leave:function(t){Se(e,t)||Wl(e)}};var u=t.input.getField();be(u,"keyup",function(t){return ga.call(e,t)}),be(u,"keydown",Pi(e,da)),be(u,"keypress",Pi(e,va)),be(u,"focus",function(t){return ti(e,t)}),be(u,"blur",function(t){return ni(e,t)})}Ga.defaults=Pa,Ga.optionHandlers=za;var Va=[];function _a(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=St(e,t).state:n="prev");var l=e.options.tabSize,a=tt(o,t),s=V(a.text,null,l);a.stateAfter&&(a.stateAfter=null);var u,c=a.text.match(/^\s*/)[0];if(r||/\S/.test(a.text)){if("smart"==n&&(u=o.mode.indent(i,a.text.slice(c.length),a.text),u==X||u>150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?V(tt(o,t-1).text,null,l):0:"add"==n?u=s+e.options.indentUnit:"subtract"==n?u=s-e.options.indentUnit:"number"==typeof n&&(u=s+n),u=Math.max(0,u);var h="",f=0;if(e.options.indentWithTabs)for(var d=Math.floor(u/l);d;--d)f+=l,h+="\t";if(fl,s=Ie(t),u=null;if(a&&r.ranges.length>1)if(Ka&&Ka.text.join("\n")==t){if(r.ranges.length%Ka.text.length==0){u=[];for(var c=0;c=0;f--){var d=r.ranges[f],p=d.from(),g=d.to();d.empty()&&(n&&n>0?p=ut(p.line,p.ch-n):e.state.overwrite&&!a?g=ut(g.line,Math.min(tt(o,g.line).text.length,g.ch+ee(s).length)):a&&Ka&&Ka.lineWise&&Ka.text.join("\n")==s.join("\n")&&(p=g=ut(p.line,0)));var v={from:p,to:g,text:u?u[f%u.length]:s,origin:i||(a?"paste":e.state.cutIncoming>l?"cut":"+input")};nl(e.doc,v),Hn(e,"inputRead",e,v)}t&&!a&&$a(e,t),hi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=h),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ya(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||Ei(t,function(){return Xa(t,n,0,null,"paste")}),!0}function $a(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var a=0;a-1){l=_a(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(tt(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=_a(e,i.head.line,"smart"));l&&Hn(e,"electricInput",e,i.head.line)}}}function qa(e){for(var t=[],n=[],r=0;rn&&(_a(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&hi(this));else{var o=i.from(),l=i.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var s=a;s0&&Uo(this.doc,r,new uo(o,u[r].to()),Y)}}}),getTokenAt:function(e,t){return Nt(this,e,t)},getLineTokens:function(e,t){return Nt(this,ut(e),t,!0)},getTokenTypeAt:function(e){e=vt(this.doc,e);var t,n=Ct(this,tt(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var l=r+i>>1;if((l?n[2*l-1]:0)>=o)i=l;else{if(!(n[2*l+1]o&&(e=o,i=!0),r=tt(this.doc,e)}else r=e;return wr(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-cn(r):0)},defaultTextHeight:function(){return Hr(this.display)},defaultCharWidth:function(){return Fr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=Sr(this,vt(this.doc,e));var l=e.bottom,a=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)l=e.top;else if("above"==r||"near"==r){var s=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?l=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(l=e.bottom),a+t.offsetWidth>u&&(a=u-t.offsetWidth)}t.style.top=l+"px",t.style.left=t.style.right="","right"==i?(a=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?a=0:"middle"==i&&(a=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=a+"px"),n&&si(this,{left:a,top:l,right:a+t.offsetWidth,bottom:l+t.offsetHeight})},triggerOnKeyDown:zi(da),triggerOnKeyPress:zi(va),triggerOnKeyUp:ga,triggerOnMouseDown:zi(Ca),execCommand:function(e){if(ta.hasOwnProperty(e))return ta[e].call(null,this)},triggerElectric:zi(function(e){$a(this,e)}),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=vt(this.doc,e),l=0;l0&&a(n.charAt(r-1)))--r;while(i.5||this.options.lineWrapping)&&Ir(this),Ce(this,"refresh",this)}),swapDoc:zi(function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),So(this,e),vr(this),this.display.input.reset(),fi(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Hn(this,"swapDoc",this,t),t}),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Te(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}function es(e,t,n,r,i){var o=t,l=n,a=tt(e,t.line),s=i&&"rtl"==e.direction?-n:n;function u(){var n=t.line+s;return!(n=e.first+e.size)&&(t=new ut(n,t.ch,t.sticky),a=tt(e,n))}function c(o){var l;if("codepoint"==r){var c=a.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(c))l=null;else{var h=n>0?c>=55296&&c<56320:c>=56320&&c<57343;l=new ut(t.line,Math.max(0,Math.min(a.text.length,t.ch+n*(h?2:1))),-n)}}else l=i?ea(e.cm,a,t,n):Jl(a,t,n);if(null==l){if(o||!u())return!1;t=Ql(i,e.cm,a,t.line,s)}else t=l;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var h=null,f="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;;p=!1){if(n<0&&!c(!p))break;var g=a.text.charAt(t.ch)||"\n",v=ae(g,d)?"w":f&&"\n"==g?"n":!f||/\s/.test(g)?null:"p";if(!f||p||v||(v="s"),h&&h!=v){n<0&&(n=1,c(),t.sticky="after");break}if(v&&(h=v),n>0&&!c(!p))break}var m=Jo(e,t,o,l,!0);return ht(o,m)&&(m.hitSide=!0),m}function ts(e,t,n,r){var i,o,l=e.doc,a=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,B(e).innerHeight||l(e).documentElement.clientHeight),u=Math.max(s-.5*Hr(e.display),3);i=(n>0?t.bottom:t.top)+n*u}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;;){if(o=Tr(e,a,i),!o.outside)break;if(n<0?i<=0:i>=l.height){o.hitSide=!0;break}i+=5*n}return o}var ns=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new _,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function rs(e,t){var n=or(e,t.line);if(!n||n.hidden)return null;var r=tt(e.doc,t.line),i=nr(n,r,t.line),o=me(r,e.doc.direction),l="left";if(o){var a=ge(o,t.ch);l=a%2?"right":"left"}var s=cr(i.map,t.ch,l);return s.offset="right"==s.collapse?s.end:s.start,s}function is(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function os(e,t){return t&&(e.bad=!0),e}function ls(e,t,n,r,i){var o="",l=!1,a=e.doc.lineSeparator(),s=!1;function u(e){return function(t){return t.id==e}}function c(){l&&(o+=a,s&&(o+=a),l=s=!1)}function h(e){e&&(c(),o+=e)}function f(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void h(n);var o,d=t.getAttribute("cm-marker");if(d){var p=e.findMarks(ut(r,0),ut(i+1,0),u(+d));return void(p.length&&(o=p[0].find(0))&&h(nt(e.doc,o.from,o.to).join(a)))}if("false"==t.getAttribute("contenteditable"))return;var g=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;g&&c();for(var v=0;v=t.display.viewTo||o.line=t.display.viewFrom&&rs(t,i)||{node:s[0].measure.map[2],offset:0},c=o.liner.firstLine()&&(l=ut(l.line-1,tt(r.doc,l.line-1).length)),a.ch==tt(r.doc,a.line).text.length&&a.linei.viewTo-1)return!1;l.line==i.viewFrom||0==(e=Br(r,l.line))?(t=ot(i.view[0].line),n=i.view[0].node):(t=ot(i.view[e].line),n=i.view[e-1].node.nextSibling);var s,u,c=Br(r,a.line);if(c==i.view.length-1?(s=i.viewTo-1,u=i.lineDiv.lastChild):(s=ot(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!n)return!1;var h=r.doc.splitLines(ls(r,n,u,t,s)),f=nt(r.doc,ut(t,0),ut(s,tt(r.doc,s).text.length));while(h.length>1&&f.length>1)if(ee(h)==ee(f))h.pop(),f.pop(),s--;else{if(h[0]!=f[0])break;h.shift(),f.shift(),t++}var d=0,p=0,g=h[0],v=f[0],m=Math.min(g.length,v.length);while(dl.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1))d--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(d).replace(/\u200b+$/,"");var x=ut(t,d),C=ut(s,f.length?ee(f).length-p:0);return h.length>1||h[0]||ct(x,C)?(sl(r.doc,h,x,C,"+input"),!0):void 0},ns.prototype.ensurePolled=function(){this.forceCompositionEnd()},ns.prototype.reset=function(){this.forceCompositionEnd()},ns.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ns.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},ns.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Ei(this.cm,function(){return Gr(e.cm)})},ns.prototype.setUneditable=function(e){e.contentEditable="false"},ns.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Pi(this.cm,Xa)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},ns.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},ns.prototype.onContextMenu=function(){},ns.prototype.resetPosition=function(){},ns.prototype.needsContentAttribute=!0;var us=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new _,this.hasSelection=!1,this.composing=null,this.resetting=!1};function cs(e,t){if(t=t?U(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=H(R(e));t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=a.getValue()}var i;if(e.form&&(be(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=l}}catch(s){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(xe(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var a=Ga(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return a}function hs(e){e.off=xe,e.on=be,e.wheelEventPixels=lo,e.Doc=Ml,e.splitLines=Ie,e.countColumn=V,e.findColumn=Z,e.isWordChar=le,e.Pass=X,e.signal=Ce,e.Line=dn,e.changeEnd=fo,e.scrollbarModel=ki,e.Pos=ut,e.cmpPos=ct,e.modes=Ve,e.mimeModes=_e,e.resolveMode=Xe,e.getMode=Ye,e.modeExtensions=$e,e.extendMode=qe,e.copyState=Ze,e.startState=Qe,e.innerMode=Je,e.commands=ta,e.keyMap=Ul,e.keyName=Yl,e.isModifierKey=jl,e.lookupKey=Kl,e.normalizeKeyMap=_l,e.StringStream=et,e.SharedTextMarker=xl,e.TextMarker=bl,e.LineWidget=gl,e.e_preventDefault=Me,e.e_stopPropagation=Ne,e.e_stop=Oe,e.addClass=F,e.contains=W,e.rmClass=M,e.keyNames=Il}us.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!Se(r,e)){if(r.somethingSelected())ja({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=qa(r);ja({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,Y):(n.prevInput="",i.value=t.text.join("\n"),P(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),v&&(i.style.width="0px"),be(i,"input",function(){l&&a>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),be(i,"paste",function(e){Se(r,e)||Ya(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())}),be(i,"cut",o),be(i,"copy",o),be(e.scroller,"paste",function(t){if(!Yn(e,t)&&!Se(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}}),be(e.lineSpace,"selectstart",function(t){Yn(e,t)||Me(t)}),be(i,"compositionstart",function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),be(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},us.prototype.createField=function(e){this.wrapper=Ja(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Za(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},us.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},us.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Yr(e);if(e.options.moveInputWithCursor){var i=Sr(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return r},us.prototype.showSelection=function(e){var t=this.cm,n=t.display;A(n.cursorDiv,e.cursors),A(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},us.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&P(this.textarea),l&&a>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",l&&a>=9&&(this.hasSelection=null));this.resetting=!1}},us.prototype.getField=function(){return this.textarea},us.prototype.supportsTouch=function(){return!1},us.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||H(R(this.textarea))!=this.textarea))try{this.textarea.focus()}catch(e){}},us.prototype.blur=function(){this.textarea.blur()},us.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},us.prototype.receivedFocus=function(){this.slowPoll()},us.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},us.prototype.fastPoll=function(){var e=!1,t=this;function n(){var r=t.poll();r||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}t.pollingFast=!0,t.polling.set(20,n)},us.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Re(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(l&&a>=9&&this.hasSelection===i||b&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}var s=0,u=Math.min(r.length,i.length);while(s1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},us.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},us.prototype.onKeyPress=function(){l&&a>=9&&(this.hasSelection=null),this.fastPoll()},us.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Rr(n,e),u=r.scroller.scrollTop;if(o&&!f){var c=n.options.resetSelectionOnContextMenu;c&&-1==n.doc.sel.contains(o)&&Pi(n,jo)(n.doc,ho(o),Y);var h,d=i.style.cssText,p=t.wrapper.style.cssText,g=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-g.top-5)+"px; left: "+(e.clientX-g.left-5)+"px;\n z-index: 1000; background: "+(l?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s&&(h=i.ownerDocument.defaultView.scrollY),r.input.focus(),s&&i.ownerDocument.defaultView.scrollTo(null,h),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=y,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),l&&a>=9&&m(),k){Oe(e);var v=function(){xe(window,"mouseup",v),setTimeout(y,20)};be(window,"mouseup",v)}else setTimeout(y,50)}function m(){if(null!=i.selectionStart){var e=n.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function y(){if(t.contextMenuPending==y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,i.style.cssText=d,l&&a<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=u),null!=i.selectionStart)){(!l||l&&a<9)&&m();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?Pi(n,el)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},us.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},us.prototype.setUneditable=function(){},us.prototype.needsContentAttribute=!1,Ia(Ga),Qa(Ga);var fs="iter insert remove copy getEditor constructor".split(" ");for(var ds in Ml.prototype)Ml.prototype.hasOwnProperty(ds)&&K(fs,ds)<0&&(Ga.prototype[ds]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ml.prototype[ds]));return Te(Ml),Ga.inputStyles={textarea:us,contenteditable:ns},Ga.defineMode=function(e){Ga.defaults.mode||"null"==e||(Ga.defaults.mode=e),Ke.apply(this,arguments)},Ga.defineMIME=je,Ga.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ga.defineMIME("text/plain","null"),Ga.defineExtension=function(e,t){Ga.prototype[e]=t},Ga.defineDocExtension=function(e,t){Ml.prototype[e]=t},Ga.fromTextArea=cs,hs(Ga),Ga.version="5.65.21",Ga})},74806:function(e,t,n){(function(e){e(n(15237))})(function(e){"use strict";function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var n=t(["and","or","not","is"]),r=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in","False","True"],i=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];function o(e){return e.scopes[e.scopes.length-1]}e.registerHelper("hintWords","python",r.concat(i).concat(["exec","print"])),e.defineMode("python",function(l,a){for(var s="error",u=a.delimiters||a.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,c=[a.singleOperators,a.doubleOperators,a.doubleDelimiters,a.tripleDelimiters,a.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],h=0;hr?k(t):i0&&T(e,t)&&(l+=" "+s),l}return x(e,t)}function x(e,t,r){if(e.eatSpace())return null;if(!r&&e.match(/^#.*/))return"comment";if(e.match(/^[0-9\.]/,!1)){var i=!1;if(e.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(i=!0),e.match(/^[\d_]+\.\d*/)&&(i=!0),e.match(/^\.\d+/)&&(i=!0),i)return e.eat(/J/i),"number";var o=!1;if(e.match(/^0x[0-9a-f_]+/i)&&(o=!0),e.match(/^0b[01_]+/i)&&(o=!0),e.match(/^0o[0-7_]+/i)&&(o=!0),e.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(e.eat(/J/i),o=!0),e.match(/^0(?![\dx])/i)&&(o=!0),o)return e.eat(/L/i),"number"}if(e.match(m)){var l=-1!==e.current().toLowerCase().indexOf("f");return l?(t.tokenize=C(e.current(),t.tokenize),t.tokenize(e,t)):(t.tokenize=S(e.current(),t.tokenize),t.tokenize(e,t))}for(var a=0;a=0)e=e.substr(1);var n=1==e.length,r="string";function i(e){return function(t,n){var r=x(t,n,!0);return"punctuation"==r&&("{"==t.current()?n.tokenize=i(e+1):"}"==t.current()&&(n.tokenize=e>1?i(e-1):o)),r}}function o(o,l){while(!o.eol())if(o.eatWhile(/[^'"\{\}\\]/),o.eat("\\")){if(o.next(),n&&o.eol())return r}else{if(o.match(e))return l.tokenize=t,r;if(o.match("{{"))return r;if(o.match("{",!1))return l.tokenize=i(0),o.current()?r:l.tokenize(o,l);if(o.match("}}"))return r;if(o.match("}"))return s;o.eat(/['"]/)}if(n){if(a.singleLineStringErrors)return s;l.tokenize=t}return r}return o.isString=!0,o}function S(e,t){while("rubf".indexOf(e.charAt(0).toLowerCase())>=0)e=e.substr(1);var n=1==e.length,r="string";function i(i,o){while(!i.eol())if(i.eatWhile(/[^'"\\]/),i.eat("\\")){if(i.next(),n&&i.eol())return r}else{if(i.match(e))return o.tokenize=t,r;i.eat(/['"]/)}if(n){if(a.singleLineStringErrors)return s;o.tokenize=t}return r}return i.isString=!0,i}function k(e){while("py"!=o(e).type)e.scopes.pop();e.scopes.push({offset:o(e).offset+l.indentUnit,type:"py",align:null})}function L(e,t,n){var r=e.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:e.column()+1;t.scopes.push({offset:t.indent+f,type:n,align:r})}function T(e,t){var n=e.indentation();while(t.scopes.length>1&&o(t).offset>n){if("py"!=o(t).type)return!0;t.scopes.pop()}return o(t).offset!=n}function M(e,t){e.sol()&&(t.beginningOfLine=!0,t.dedent=!1);var n=t.tokenize(e,t),r=e.current();if(t.beginningOfLine&&"@"==r)return e.match(v,!1)?"meta":g?"operator":s;if(/\S/.test(r)&&(t.beginningOfLine=!1),"variable"!=n&&"builtin"!=n||"meta"!=t.lastToken||(n="meta"),"pass"!=r&&"return"!=r||(t.dedent=!0),"lambda"==r&&(t.lambda=!0),":"==r&&!t.lambda&&"py"==o(t).type&&e.match(/^\s*(?:#|$)/,!1)&&k(t),1==r.length&&!/string|comment/.test(n)){var i="[({".indexOf(r);if(-1!=i&&L(e,t,"])}".slice(i,i+1)),i="])}".indexOf(r),-1!=i){if(o(t).type!=r)return s;t.indent=t.scopes.pop().offset-f}}return t.dedent&&e.eol()&&"py"==o(t).type&&t.scopes.length>1&&t.scopes.pop(),n}var N={startState:function(e){return{tokenize:w,scopes:[{offset:e||0,type:"py",align:null}],indent:e||0,lastToken:null,lambda:!1,dedent:0}},token:function(e,t){var n=t.errorToken;n&&(t.errorToken=!1);var r=M(e,t);return r&&"comment"!=r&&(t.lastToken="keyword"==r||"punctuation"==r?e.current():r),"punctuation"==r&&(r=null),e.eol()&&t.lambda&&(t.lambda=!1),n?r+" "+s:r},indent:function(t,n){if(t.tokenize!=w)return t.tokenize.isString?e.Pass:0;var r=o(t),i=r.type==n.charAt(0)||"py"==r.type&&!t.dedent&&/^(else:|elif |except |finally:)/.test(n);return null!=r.align?r.align-(i?1:0):r.offset-(i?f:0)},electricInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,closeBrackets:{triples:"'\""},lineComment:"#",fold:"indent"};return N}),e.defineMIME("text/x-python","python");var l=function(e){return e.split(" ")};e.defineMIME("text/x-cython",{name:"python",extra_keywords:l("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")})})},42430:function(e,t,n){"use strict";n.d(t,{IA:function(){return l},N6:function(){return u},PR:function(){return a},kI:function(){return s}});var r=n(76338),i=n(75769),o={list:"/api/credentials/list",get:"/api/credentials/get",create:"/api/credentials/create",delete:"/api/credentials/delete",egressIp:"/api/credentials/egress-ip"};function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i.Ay)({url:o.list,method:"get",params:e})}function a(e){return(0,i.Ay)({url:o.create,method:"post",data:e})}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.Ay)({url:o.delete,method:"delete",params:(0,r.A)({id:e},t)})}function u(){return(0,i.Ay)({url:o.egressIp,method:"get"})}}}]); \ No newline at end of file +(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[762],{55218:function(e,t,n){(function(e){e(n(15237))})(function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,function(t,n,l){l&&l!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(o(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))});var i={Backspace:s,Enter:u};function o(e){for(var t=0;t=0;s--){var c=l[s].head;t.replaceRange("",n(c.line,c.ch-1),n(c.line,c.ch+1),"+delete")}}function u(t){var n=a(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var o=t.listSelections(),l=0;l0?{line:l.head.line,ch:l.head.ch+t}:{line:l.head.line-1};n.push({anchor:a,head:a})}e.setSelections(n,i)}function h(t){var r=e.cmpPos(t.anchor,t.head)>0;return{anchor:new n(t.anchor.line,t.anchor.ch+(r?-1:1)),head:new n(t.head.line,t.head.ch+(r?1:-1))}}function f(t,i){var o=a(t);if(!o||t.getOption("disableInput"))return e.Pass;var l=r(o,"pairs"),s=l.indexOf(i);if(-1==s)return e.Pass;for(var u,f=r(o,"closeBefore"),d=r(o,"triples"),g=l.charAt(s+1)==i,v=t.listSelections(),m=s%2==0,y=0;y1&&d.indexOf(i)>=0&&t.getRange(n(x.line,x.ch-2),x)==i+i){if(x.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(x.line,x.ch-2))))return e.Pass;b="addFour"}else if(g){var S=0==x.ch?" ":t.getRange(n(x.line,x.ch-1),x);if(e.isWordChar(C)||S==i||e.isWordChar(S))return e.Pass;b="both"}else{if(!m||!(0===C.length||/\s/.test(C)||f.indexOf(C)>-1))return e.Pass;b="both"}else b=g&&p(t,x)?"both":d.indexOf(i)>=0&&t.getRange(x,n(x.line,x.ch+3))==i+i+i?"skipThree":"skip";if(u){if(u!=b)return e.Pass}else u=b}var k=s%2?l.charAt(s-1):i,L=s%2?i:l.charAt(s+1);t.operation(function(){if("skip"==u)c(t,1);else if("skipThree"==u)c(t,3);else if("surround"==u){for(var e=t.getSelections(),n=0;n",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function i(e){return e&&e.bracketRegex||/[(){}[\]]/}function o(e,t,o){var a=e.getLineHandle(t.line),s=t.ch-1,u=o&&o.afterCursor;null==u&&(u=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var c=i(o),h=!u&&s>=0&&c.test(a.text.charAt(s))&&r[a.text.charAt(s)]||c.test(a.text.charAt(s+1))&&r[a.text.charAt(++s)];if(!h)return null;var f=">"==h.charAt(1)?1:-1;if(o&&o.strict&&f>0!=(s==t.ch))return null;var d=e.getTokenTypeAt(n(t.line,s+1)),p=l(e,n(t.line,s+(f>0?1:0)),f,d,o);return null==p?null:{from:n(t.line,s),to:p&&p.pos,match:p&&p.ch==h.charAt(0),forward:f>0}}function l(e,t,o,l,a){for(var s=a&&a.maxScanLineLength||1e4,u=a&&a.maxScanLines||1e3,c=[],h=i(a),f=o>0?Math.min(t.line+u,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-u),d=t.line;d!=f;d+=o){var p=e.getLine(d);if(p){var g=o>0?0:p.length-1,v=o>0?p.length:-1;if(!(p.length>s))for(d==t.line&&(g=t.ch-(o<0?1:0));g!=v;g+=o){var m=p.charAt(g);if(h.test(m)&&(void 0===l||(e.getTokenTypeAt(n(d,g+1))||"")==(l||""))){var y=r[m];if(y&&">"==y.charAt(1)==o>0)c.push(m);else{if(!c.length)return{pos:n(d,g),ch:m};c.pop()}}}}}return d-o!=(o>0?e.lastLine():e.firstLine())&&null}function a(e,r,i){for(var l=e.state.matchBrackets.maxHighlightLineLength||1e3,a=i&&i.highlightNonMatching,s=[],u=e.listSelections(),c=0;c2),m=/Android/.test(e),y=v||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=v||/Mac/.test(t),w=/\bCrOS\b/.test(e),x=/win/i.test(t),C=f&&e.match(/Version\/(\d*\.\d*)/);C&&(C=Number(C[1])),C&&C>=15&&(f=!1,s=!0);var S=b&&(u||f&&(null==C||C<12.11)),k=n||l&&a>=9;function L(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var T,M=function(e,t){var n=e.className,r=L(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function N(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function A(e,t){return N(e).appendChild(t)}function O(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=a-o,l+=n-l%n,o=a+1}}v?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(P=function(e){try{e.select()}catch(t){}});var _=function(){this.id=null,this.f=null,this.time=0,this.handler=G(this.onTimeout,this)};function K(e,t){for(var n=0;n=t)return r+Math.min(l,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}var J=[""];function Q(e){while(J.length<=e)J.push(ee(J)+" ");return J[e]}function ee(e){return e[e.length-1]}function te(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||oe.test(e))}function ae(e,t){return t?!!(t.source.indexOf("\\w")>-1&&le(e))||t.test(e):le(e)}function se(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ue=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ce(e){return e.charCodeAt(0)>=768&&ue.test(e)}function he(e,t,n){while((n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function de(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;ot||t==n&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,n),1==l.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var pe=null;function ge(e,t,n){var r;pe=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:pe=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:pe=i)}return null!=r?r:pe}var ve=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var u="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!r.test(e))return!1;for(var c=e.length,h=[],f=0;f-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Ce(e,t){var n=we(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function Te(e){e.prototype.on=function(e,t){be(this,e,t)},e.prototype.off=function(e,t){xe(this,e,t)}}function Me(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ne(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ae(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Oe(e){Me(e),Ne(e)}function De(e){return e.target||e.srcElement}function We(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var He,Fe,Ee=function(){if(l&&a<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function Pe(e){if(null==He){var t=O("span","​");A(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(He=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&a<8))}var n=He?O("span","​"):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function ze(e){if(null!=Fe)return Fe;var t=A(e,document.createTextNode("AخA")),n=T(t,0,1).getBoundingClientRect(),r=T(t,1,2).getBoundingClientRect();return N(e),!(!n||n.left==n.right)&&(Fe=r.right-n.right<3)}var Ie=3!="\n\nb".split(/\n/).length?function(e){var t=0,n=[],r=e.length;while(t<=r){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(n.push(o.slice(0,l)),t+=l+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Re=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(n){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Be=function(){var e=O("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Ge=null;function Ue(e){if(null!=Ge)return Ge;var t=A(e,O("span","x")),n=t.getBoundingClientRect(),r=T(t,0,1).getBoundingClientRect();return Ge=Math.abs(n.left-r.left)>1}var Ve={},_e={};function Ke(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ve[e]=t}function je(e,t){_e[e]=t}function Xe(e){if("string"==typeof e&&_e.hasOwnProperty(e))e=_e[e];else if(e&&"string"==typeof e.name&&_e.hasOwnProperty(e.name)){var t=_e[e.name];"string"==typeof t&&(t={name:t}),e=ie(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Xe("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Xe("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ye(e,t){t=Xe(t);var n=Ve[t.name];if(!n)return Ye(e,"text/plain");var r=n(e,t);if($e.hasOwnProperty(t.name)){var i=$e[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var $e={};function qe(e,t){var n=$e.hasOwnProperty(e)?$e[e]:$e[e]={};U(t,n)}function Ze(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Je(e,t){var n;while(e.innerMode){if(n=e.innerMode(t),!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}}function Qe(e,t,n){return!e.startState||e.startState(t,n)}var et=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function tt(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");var n=e;while(!n.lines)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?ut(n,tt(e,n).text.length):mt(t,tt(e,t.line).text.length)}function mt(e,t){var n=e.ch;return null==n||n>t?ut(e.line,t):n<0?ut(e.line,0):e}function yt(e,t){for(var n=[],r=0;r=this.string.length},et.prototype.sol=function(){return this.pos==this.lineStart},et.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},et.prototype.next=function(){if(this.post},et.prototype.eatSpace=function(){var e=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos)))++this.pos;return this.pos>e},et.prototype.skipToEnd=function(){this.pos=this.string.length},et.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},et.prototype.backUp=function(e){this.pos-=e},et.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);if(i(o)==i(e))return!1!==t&&(this.pos+=e.length),!0},et.prototype.current=function(){return this.string.slice(this.start,this.pos)},et.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},et.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},et.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var bt=function(e,t){this.state=e,this.lookAhead=t},wt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function xt(e,t,n,r){var i=[e.state.modeGen],o={};Ot(e,t.text,e.doc.mode,n,function(e,t){return i.push(e,t)},o,r);for(var l=n.state,a=function(r){n.baseTokens=i;var a=e.state.overlays[r],s=1,u=0;n.state=!0,Ot(e,t.text,a.mode,n,function(e,t){var n=s;while(ue&&i.splice(s,1,e,i[s+1],r),s+=2,u=Math.min(e,r)}if(t)if(a.opaque)i.splice(n,s-n,e,"overlay "+t),s=n+2;else for(;ne.options.maxHighlightLength&&Ze(e.doc.mode,r.state),o=xt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function St(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new wt(r,!0,t);var o=Dt(e,t,n),l=o>r.first&&tt(r,o-1).stateAfter,a=l?wt.fromSaved(r,l,o):new wt(r,Qe(r.mode),o);return r.iter(o,t,function(n){kt(e,n.text,a);var r=a.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}wt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},wt.prototype.baseToken=function(e){if(!this.baseTokens)return null;while(this.baseTokens[this.baseTokenPos]<=e)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},wt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},wt.fromSaved=function(e,t,n){return t instanceof bt?new wt(e,Ze(e.mode,t.state),n,t.lookAhead):new wt(e,Ze(e.mode,t),n)},wt.prototype.save=function(e){var t=!1!==e?Ze(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new bt(t,this.maxLookAhead):t};var Mt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Nt(e,t,n,r){var i,o=e.doc,l=o.mode;t=vt(o,t);var a,s=tt(o,t.line),u=St(e,t.line,n),c=new et(s.text,e.options.tabSize,u);r&&(a=[]);while((r||c.pose.options.maxHighlightLength?(a=!1,l&&kt(e,t,r,h.pos),h.pos=t.length,s=null):s=At(Tt(n,h,r.state,f),o),f){var d=f[0].name;d&&(s="m-"+(s?d+" "+s:d))}if(!a||c!=s){while(ul;--a){if(a<=o.first)return o.first;var s=tt(o,a-1),u=s.stateAfter;if(u&&(!n||a+(u instanceof bt?u.lookAhead:0)<=o.modeFrontier))return a;var c=V(s.text,null,e.options.tabSize);(null==i||r>c)&&(i=a-1,r=c)}return i}function Wt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=tt(e,r).stateAfter;if(i&&(!(i instanceof bt)||r+i.lookAhead=t:o.to>t);(r||(r=[])).push(new zt(l,o.from,s?null:o.to))}}return r}function Ut(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t);if(a||o.from==t&&"bookmark"==l.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(l.inclusiveLeft?o.from<=t:o.from0&&a)for(var w=0;w0)){var c=[s,1],h=ct(u.from,a.from),f=ct(u.to,a.to);(h<0||!l.inclusiveLeft&&!h)&&c.push({from:u.from,to:a.from}),(f>0||!l.inclusiveRight&&!f)&&c.push({from:a.to,to:u.to}),i.splice.apply(i,c),s+=c.length-3}}return i}function jt(e){var t=e.markedSpans;if(t){for(var n=0;nt)&&(!n||qt(n,o.marker)<0)&&(n=o.marker)}return n}function tn(e,t,n,r,i){var o=tt(e,t),l=Ft&&o.markedSpans;if(l)for(var a=0;a=0&&h<=0||c<=0&&h>=0)&&(c<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?ct(u.to,n)>=0:ct(u.to,n)>0)||c>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?ct(u.from,r)<=0:ct(u.from,r)<0)))return!0}}}function nn(e){var t;while(t=Jt(e))e=t.find(-1,!0).line;return e}function rn(e){var t;while(t=Qt(e))e=t.find(1,!0).line;return e}function on(e){var t,n;while(t=Qt(e))e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function ln(e,t){var n=tt(e,t),r=nn(n);return n==r?t:ot(r)}function an(e,t){if(t>e.lastLine())return t;var n,r=tt(e,t);if(!sn(e,r))return t;while(n=Qt(r))r=n.find(1,!0).line;return ot(r)+1}function sn(e,t){var n=Ft&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}var dn=function(e,t,n){this.text=e,Xt(this,t),this.height=n?n(this):1};function pn(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),jt(e),Xt(e,n);var i=r?r(e):1;i!=e.height&&it(e,i)}function gn(e){e.parent=null,jt(e)}dn.prototype.lineNo=function(){return ot(this)},Te(dn);var vn={},mn={};function yn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?mn:vn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function bn(e,t){var n=D("span",null,null,s?"padding-right: .1px":null),r={pre:D("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,l=void 0;r.pos=0,r.addToken=xn,ze(e.display.measure)&&(l=me(o,e.doc.direction))&&(r.addToken=Sn(r.addToken,l)),r.map=[];var a=t!=e.display.externalMeasured&&ot(o);Ln(o,r,Ct(e,o,a)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=E(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=E(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Pe(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(s){var u=r.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ce(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=E(r.pre.className,r.textClass||"")),r}function wn(e){var t=O("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function xn(e,t,n,r,i,o,s){if(t){var u,c=e.splitSpaces?Cn(t,e.trailingSpace):t,h=e.cm.state.specialChars,f=!1;if(h.test(t)){u=document.createDocumentFragment();var d=0;while(1){h.lastIndex=d;var p=h.exec(t),g=p?p.index-d:t.length-d;if(g){var v=document.createTextNode(c.slice(d,d+g));l&&a<9?u.appendChild(O("span",[v])):u.appendChild(v),e.map.push(e.pos,e.pos+g,v),e.col+=g,e.pos+=g}if(!p)break;d+=g+1;var m=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,b=y-e.col%y;m=u.appendChild(O("span",Q(b),"cm-tab")),m.setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?(m=u.appendChild(O("span","\r"==p[0]?"␍":"␤","cm-invalidchar")),m.setAttribute("cm-text",p[0]),e.col+=1):(m=e.cm.options.specialCharPlaceholder(p[0]),m.setAttribute("cm-text",p[0]),l&&a<9?u.appendChild(O("span",[m])):u.appendChild(m),e.col+=1);e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,u=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,u),l&&a<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),n||r||i||f||o||s){var w=n||"";r&&(w+=r),i&&(w+=i);var x=O("span",[u],w,o);if(s)for(var C in s)s.hasOwnProperty(C)&&"style"!=C&&"class"!=C&&x.setAttribute(C,s[C]);return e.content.appendChild(x)}e.content.appendChild(u)}}function Cn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;iu&&h.from<=u)break;if(h.to>=c)return e(n,r,i,o,l,a,s);e(n,r.slice(0,h.to-u),i,o,null,a,s),o=null,r=r.slice(h.to-u),u=h.to}}}function kn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Ln(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var l,a,s,u,c,h,f,d=i.length,p=0,g=1,v="",m=0;;){if(m==p){s=u=c=a="",f=null,h=null,m=1/0;for(var y=[],b=void 0,w=0;wp||C.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(s+=" "+C.className),C.css&&(a=(a?a+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&((f||(f={})).title=C.title),C.attributes)for(var S in C.attributes)(f||(f={}))[S]=C.attributes[S];C.collapsed&&(!h||qt(h.marker,C)<0)&&(h=x)}else x.from>p&&m>x.from&&(m=x.from)}if(b)for(var k=0;k=d)break;var T=Math.min(d,m);while(1){if(v){var M=p+v.length;if(!h){var N=M>T?v.slice(0,T-p):v;t.addToken(t,N,l?l+s:s,c,p+N.length==m?u:"",a,f)}if(M>=T){v=v.slice(T-p),p=T;break}p=M,c=""}v=i.slice(o,o=n[g++]),l=yn(n[g++],t.cm.options)}}else for(var A=1;A2&&o.push((s.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function nr(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function rr(e,t){t=nn(t);var n=ot(t),r=e.display.externalMeasured=new Tn(e.doc,t,n);r.lineN=n;var i=r.built=bn(e,r);return r.text=i.pre,A(e.display.lineMeasure,i.pre),r}function ir(e,t,n,r){return ar(e,lr(e,t),n,r)}function or(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(o=s-a,i=o-1,t>=s&&(l="right")),null!=i){if(r=e[u+2],a==s&&n==(r.insertLeft?"left":"right")&&(l=n),"left"==n&&0==i)while(u&&e[u-2]==e[u-3]&&e[u-1].insertLeft)r=e[2+(u-=3)],l="left";if("right"==n&&i==s-a)while(u=0;i--)if((n=e[i]).left!=n.right)break;return n}function fr(e,t,n,r){var i,o=cr(t.map,n,r),s=o.node,u=o.start,c=o.end,h=o.collapse;if(3==s.nodeType){for(var f=0;f<4;f++){while(u&&ce(t.line.text.charAt(o.coverStart+u)))--u;while(o.coverStart+c0&&(h=r="right"),i=e.options.lineWrapping&&(d=s.getClientRects()).length>1?d["right"==r?d.length-1:0]:s.getBoundingClientRect()}if(l&&a<9&&!u&&(!i||!i.left&&!i.right)){var p=s.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+Fr(e.display),top:p.top,bottom:p.bottom}:ur}for(var g=i.top-t.rect.top,v=i.bottom-t.rect.top,m=(g+v)/2,y=t.view.measure.heights,b=0;b=r.text.length?(s=r.text.length,u="before"):s<=0&&(s=0,u="after"),!a)return l("before"==u?s-1:s,"before"==u);function c(e,t,n){var r=a[t],i=1==r.level;return l(n?e-1:e,i!=n)}var h=ge(a,s,u),f=pe,d=c(s,h,"before"==u);return null!=f&&(d.other=c(s,f,"before"!=u)),d}function kr(e,t){var n=0;t=vt(e.doc,t),e.options.lineWrapping||(n=Fr(e.display)*t.ch);var r=tt(e.doc,t.line),i=cn(r)+$n(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Lr(e,t,n,r,i){var o=ut(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Tr(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Lr(r.first,0,null,-1,-1);var i=lt(r,n),o=r.first+r.size-1;if(i>o)return Lr(r.first+r.size-1,tt(r,o).text.length,null,1,1);t<0&&(t=0);for(var l=tt(r,i);;){var a=Or(e,l,i,t,n),s=en(l,a.ch+(a.xRel>0||a.outside>0?1:0));if(!s)return a;var u=s.find(1);if(u.line==i)return u;l=tt(r,i=u.line)}}function Mr(e,t,n,r){r-=br(t);var i=t.text.length,o=fe(function(t){return ar(e,n,t-1).bottom<=r},i,0);return i=fe(function(t){return ar(e,n,t).top>r},o,i),{begin:o,end:i}}function Nr(e,t,n,r){n||(n=lr(e,t));var i=wr(e,t,ar(e,n,r),"line").top;return Mr(e,t,n,i)}function Ar(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function Or(e,t,n,r,i){i-=cn(t);var o=lr(e,t),l=br(t),a=0,s=t.text.length,u=!0,c=me(t,e.doc.direction);if(c){var h=(e.options.lineWrapping?Wr:Dr)(e,t,n,o,c,r,i);u=1!=h.level,a=u?h.from:h.to-1,s=u?h.to:h.from-1}var f,d,p=null,g=null,v=fe(function(t){var n=ar(e,o,t);return n.top+=l,n.bottom+=l,!!Ar(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,g=n),!0)},a,s),m=!1;if(g){var y=r-g.left=w.bottom?1:0}return v=he(t.text,v,1),Lr(n,v,d,m,r-f)}function Dr(e,t,n,r,i,o,l){var a=fe(function(a){var s=i[a],u=1!=s.level;return Ar(Sr(e,ut(n,u?s.to:s.from,u?"before":"after"),"line",t,r),o,l,!0)},0,i.length-1),s=i[a];if(a>0){var u=1!=s.level,c=Sr(e,ut(n,u?s.from:s.to,u?"after":"before"),"line",t,r);Ar(c,o,l,!0)&&c.top>l&&(s=i[a-1])}return s}function Wr(e,t,n,r,i,o,l){var a=Mr(e,t,r,l),s=a.begin,u=a.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,h=null,f=0;f=u||d.to<=s)){var p=1!=d.level,g=ar(e,r,p?Math.min(u,d.to)-1:Math.max(s,d.from)).right,v=gv)&&(c=d,h=v)}}return c||(c=i[i.length-1]),c.fromu&&(c={from:c.from,to:u,level:c.level}),c}function Hr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==sr){sr=O("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)sr.appendChild(document.createTextNode("x")),sr.appendChild(O("br"));sr.appendChild(document.createTextNode("x"))}A(e.measure,sr);var n=sr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),N(e.measure),n||1}function Fr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),n=O("pre",[t],"CodeMirror-line-like");A(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Er(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var a=e.display.gutterSpecs[l].className;n[a]=o.offsetLeft+o.clientLeft+i,r[a]=o.clientWidth}return{fixedPos:Pr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Pr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function zr(e){var t=Hr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Fr(e.display)-3);return function(i){if(sn(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l0&&(s=tt(e.doc,u.line).text).length==u.ch){var c=V(s,s.length,e.options.tabSize)-s.length;u=ut(u.line,Math.max(0,Math.round((o-Zn(e.display).left)/Fr(e.display))-c))}return u}function Br(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ft&&ln(e.doc,t)i.viewFrom?Vr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Vr(e);else if(t<=i.viewFrom){var o=_r(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Vr(e)}else if(n>=i.viewTo){var l=_r(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):Vr(e)}else{var a=_r(e,t,t,-1),s=_r(e,n,n+r,1);a&&s?(i.view=i.view.slice(0,a.index).concat(Mn(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):Vr(e)}var u=i.externalMeasured;u&&(n=i.lineN&&t=r.viewTo)){var o=r.view[Br(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==K(l,n)&&l.push(n)}}}function Vr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function _r(e,t,n,r){var i,o=Br(e,t),l=e.display.view;if(!Ft||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var a=e.display.viewFrom,s=0;s0){if(o==l.length-1)return null;i=a+l[o].size-t,o++}else i=a-t;t+=i,n+=i}while(ln(e.doc,n)!=n){if(o==(r<0?0:l.length-1))return null;n+=r*l[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function Kr(e,t,n){var r=e.display,i=r.view;0==i.length||t>=r.viewTo||n<=r.viewFrom?(r.view=Mn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Mn(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Br(e,n)))),r.viewTo=n}function jr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().line0?l:e.defaultCharWidth())+"px"}if(r.other){var a=n.appendChild(O("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=r.other.left+"px",a.style.top=r.other.top+"px",a.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function qr(e,t){return e.top-t.top||e.left-t.left}function Zr(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),l=Zn(e.display),a=l.left,s=Math.max(r.sizerWidth,Qn(e)-r.sizer.offsetLeft)-l.right,u="ltr"==i.direction;function c(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),o.appendChild(O("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?s-e:n)+"px;\n height: "+(r-t)+"px"))}function h(t,n,r){var o,l,h=tt(i,t),f=h.text.length;function d(n,r){return Cr(e,ut(t,n),"div",h,r)}function p(t,n,r){var i=Nr(e,h,null,t),o="ltr"==n==("after"==r)?"left":"right",l="after"==r?i.begin:i.end-(/\s/.test(h.text.charAt(i.end-1))?2:1);return d(l,o)[o]}var g=me(h,i.direction);return de(g,n||0,null==r?f:r,function(e,t,i,h){var v="ltr"==i,m=d(e,v?"left":"right"),y=d(t-1,v?"right":"left"),b=null==n&&0==e,w=null==r&&t==f,x=0==h,C=!g||h==g.length-1;if(y.top-m.top<=3){var S=(u?b:w)&&x,k=(u?w:b)&&C,L=S?a:(v?m:y).left,T=k?s:(v?y:m).right;c(L,m.top,T-L,m.bottom)}else{var M,N,A,O;v?(M=u&&b&&x?a:m.left,N=u?s:p(e,i,"before"),A=u?a:p(t,i,"after"),O=u&&w&&C?s:y.right):(M=u?p(e,i,"before"):a,N=!u&&b&&x?s:m.right,A=!u&&w&&C?a:y.left,O=u?p(t,i,"after"):s),c(M,m.top,N-M,m.bottom),m.bottom0?t.blinker=setInterval(function(){e.hasFocus()||ni(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Qr(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||ti(e))}function ei(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&ni(e))},100)}function ti(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Ce(e,"focus",e,t),e.state.focused=!0,F(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),s&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Jr(e))}function ni(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ce(e,"blur",e,t),e.state.focused=!1,M(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function ri(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,s=0;s.005||g<-.005)&&(ie.display.sizerWidth){var m=Math.ceil(f/Fr(e.display));m>e.display.maxLineLength&&(e.display.maxLineLength=m,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function ii(e){if(e.widgets)for(var t=0;t=l&&(o=lt(t,cn(tt(t,s))-e.wrapper.clientHeight),l=s)}return{from:o,to:Math.max(l,o+1)}}function li(e,t){if(!Se(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,o=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(i=!1),null!=i&&!g){var l=O("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-$n(e.display))+"px;\n height: "+(t.bottom-t.top+Jn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(i),e.display.lineSpace.removeChild(l)}}}function ai(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?ut(t.line,t.ch+1,"before"):t,t=t.ch?ut(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var l=!1,a=Sr(e,t),s=n&&n!=t?Sr(e,n):a;i={left:Math.min(a.left,s.left),top:Math.min(a.top,s.top)-r,right:Math.max(a.left,s.left),bottom:Math.max(a.bottom,s.bottom)+r};var u=ui(e,i),c=e.doc.scrollTop,h=e.doc.scrollLeft;if(null!=u.scrollTop&&(vi(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(yi(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-h)>1&&(l=!0)),!l)break}return i}function si(e,t){var n=ui(e,t);null!=n.scrollTop&&vi(e,n.scrollTop),null!=n.scrollLeft&&yi(e,n.scrollLeft)}function ui(e,t){var n=e.display,r=Hr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=er(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+qn(n),s=t.topa-r;if(t.topi+o){var c=Math.min(t.top,(u?a:t.bottom)-o);c!=i&&(l.scrollTop=c)}var h=e.options.fixedGutter?0:n.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-h,d=Qn(e)-n.gutters.offsetWidth,p=t.right-t.left>d;return p&&(t.right=t.left+d),t.left<10?l.scrollLeft=0:t.leftd+f-3&&(l.scrollLeft=t.right+(p?0:10)-d),l}function ci(e,t){null!=t&&(pi(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function hi(e){pi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function fi(e,t,n){null==t&&null==n||pi(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function di(e,t){pi(e),e.curOp.scrollToPos=t}function pi(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=kr(e,t.from),r=kr(e,t.to);gi(e,n,r,t.margin)}}function gi(e,t,n,r){var i=ui(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});fi(e,i.scrollLeft,i.scrollTop)}function vi(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||Xi(e,{top:t}),mi(e,t,!0),n&&Xi(e),Ri(e,100))}function mi(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function yi(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,Zi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function bi(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+qn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Jn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var wi=function(e,t,n){this.cm=n;var r=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),be(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),be(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,l&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};wi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},wi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},wi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},wi.prototype.zeroWidthHack=function(){var e=b&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new _,this.disableVert=new _},wi.prototype.enableZeroWidthBar=function(e,t,n){function r(){var i=e.getBoundingClientRect(),o="vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.visibility="hidden":t.set(1e3,r)}e.style.visibility="",t.set(1e3,r)},wi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var xi=function(){};function Ci(e,t){t||(t=bi(e));var n=e.display.barWidth,r=e.display.barHeight;Si(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&ri(e),Si(e,bi(e)),n=e.display.barWidth,r=e.display.barHeight}function Si(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}xi.prototype.update=function(){return{bottom:0,right:0}},xi.prototype.setScrollLeft=function(){},xi.prototype.setScrollTop=function(){},xi.prototype.clear=function(){};var ki={native:wi,null:xi};function Li(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&M(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new ki[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),be(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){"horizontal"==n?yi(e,t):vi(e,t)},e),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)}var Ti=0;function Mi(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ti,markArrays:null},An(e.curOp)}function Ni(e){var t=e.curOp;t&&Dn(t,function(e){for(var t=0;t=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Gi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Di(e){e.updatedDisplay=e.mustUpdate&&Ki(e.cm,e.update)}function Wi(e){var t=e.cm,n=t.display;e.updatedDisplay&&ri(t),e.barMeasure=bi(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=ir(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Jn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Qn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Hi(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var n=+new Date+e.options.workTime,r=St(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var l=o.styles,a=o.text.length>e.options.maxHighlightLength?Ze(t.mode,r.state):null,s=xt(e,o,r,!0);a&&(r.state=a),o.styles=s.styles;var u=o.styleClasses,c=s.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var h=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),f=0;!h&&fn)return Ri(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Ei(e,function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==jr(e))return!1;Ji(e)&&(Vr(e),t.dims=Er(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroml&&n.viewTo-l<20&&(l=Math.min(i,n.viewTo)),Ft&&(o=ln(e.doc,o),l=an(e.doc,l));var a=o!=n.viewFrom||l!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Kr(e,o,l),n.viewOffset=cn(tt(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=jr(e);if(!a&&0==s&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Vi(e);return s>4&&(n.lineDiv.style.display="none"),Yi(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,_i(u),N(n.cursorDiv),N(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Ri(e,400)),n.updateLineNumbers=null,!0}function ji(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Qn(e))r&&(t.visible=oi(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+qn(e.display)-er(e),n.top)}),t.visible=oi(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!Ki(e,t))break;ri(e);var i=bi(e);Xr(e),Ci(e,i),qi(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Xi(e,t){var n=new Gi(e,t);if(Ki(e,n)){ri(e),ji(e,n);var r=bi(e);Xr(e),Ci(e,r),qi(e,r),n.finish()}}function Yi(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,l=o.firstChild;function a(t){var n=t.nextSibling;return s&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var u=r.view,c=r.viewFrom,h=0;h-1&&(d=!1),En(e,f,c,n)),d&&(N(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(st(e.options,c)))),l=f.node.nextSibling}else{var p=Vn(e,f,c,n);o.insertBefore(p,l)}c+=f.size}while(l)l=a(l)}function $i(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Hn(e,"gutterChanged",e)}function qi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Jn(e)+"px"}function Zi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=Pr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",l=0;lu.clientWidth,p=u.scrollHeight>u.clientHeight;if(i&&d||o&&p){if(o&&b&&s)e:for(var g=t.target,v=a.view;g!=u;g=g.parentNode)for(var m=0;m=0&&ct(e,r.to())<=0)return n}return-1};var uo=function(e,t){this.anchor=e,this.head=t};function co(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(e,t){return ct(e.from(),t.from())}),n=K(t,i);for(var o=1;o0:s>=0){var u=pt(a.from(),l.from()),c=dt(a.to(),l.to()),h=a.empty()?l.from()==l.head:a.from()==a.head;o<=n&&--n,t.splice(--o,2,new uo(h?c:u,h?u:c))}}return new so(t,n)}function ho(e,t){return new so([new uo(e,t||e)],0)}function fo(e){return e.text?ut(e.from.line+e.text.length-1,ee(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function po(e,t){if(ct(e,t.from)<0)return e;if(ct(e,t.to)<=0)return fo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=fo(t).ch-t.to.ch),ut(n,r)}function go(e,t){for(var n=[],r=0;r1&&e.remove(a.line+1,p-1),e.insert(a.line+1,m)}Hn(e,"change",e,t)}function Co(e,t,n){function r(e,i,o){if(e.linked)for(var l=0;l1&&!e.done[e.done.length-2].ranges?(e.done.pop(),ee(e.done)):void 0}function Oo(e,t,n,r){var i=e.history;i.undone.length=0;var o,l,a=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=Ao(i,i.lastOp==r)))l=ee(o.changes),0==ct(t.from,t.to)&&0==ct(t.from,l.to)?l.to=fo(t):o.changes.push(Mo(e,t));else{var s=ee(i.done);s&&s.ranges||Ho(e.sel,i.done),o={changes:[Mo(e,t)],generation:i.generation},i.done.push(o);while(i.done.length>i.undoDepth)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,l||Ce(e,"historyAdded")}function Do(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Wo(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Do(e,o,ee(i.done),t))?i.done[i.done.length-1]=t:Ho(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&No(i.undone)}function Ho(e,t){var n=ee(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Fo(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function Eo(e){if(!e)return null;for(var t,n=0;n-1&&(ee(a)[h]=u[h],delete u[h])}}}return r}function Ro(e,t,n,r){if(r){var i=e.anchor;if(n){var o=ct(t,i)<0;o!=ct(n,i)<0?(i=t,t=n):o!=ct(t,n)<0&&(t=n)}return new uo(i,t)}return new uo(n||t,t)}function Bo(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),jo(e,new so([Ro(e.sel.primary(),t,n,i)],0),r)}function Go(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:a.to>t.ch))){if(i&&(Ce(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!s.atomic)continue;if(n){var h=s.find(r<0?1:-1),f=void 0;if((r<0?c:u)&&(h=Qo(e,h,-r,h&&h.line==t.line?o:null)),h&&h.line==t.line&&(f=ct(h,n))&&(r<0?f<0:f>0))return Zo(e,h,t,r,i)}var d=s.find(r<0?-1:1);return(r<0?u:c)&&(d=Qo(e,d,r,d.line==t.line?o:null)),d?Zo(e,d,t,r,i):null}}return t}function Jo(e,t,n,r,i){var o=r||1,l=Zo(e,t,n,o,i)||!i&&Zo(e,t,n,o,!0)||Zo(e,t,n,-o,i)||!i&&Zo(e,t,n,-o,!0);return l||(e.cantEdit=!0,ut(e.first,0))}function Qo(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?vt(e,ut(t.line-1)):null:n>0&&t.ch==(r||tt(e,t.line)).text.length?t.line=0;--i)rl(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else rl(e,t)}}function rl(e,t){if(1!=t.text.length||""!=t.text[0]||0!=ct(t.from,t.to)){var n=go(e,t);Oo(e,t,n,e.cm?e.cm.curOp.id:NaN),ll(e,t,n,Vt(e,t));var r=[];Co(e,function(e,n){n||-1!=K(r,e.history)||(hl(e.history,t),r.push(e.history)),ll(e,t,null,Vt(e,t))})}}function il(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,l=e.sel,a="undo"==t?o.done:o.undone,s="undo"==t?o.undone:o.done,u=0;u=0;--d){var p=f(d);if(p)return p.v}}}}function ol(e,t){if(0!=t&&(e.first+=t,e.sel=new so(te(e.sel.ranges,function(e){return new uo(ut(e.anchor.line+t,e.anchor.ch),ut(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Gr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:ut(o,tt(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=nt(e,t.from,t.to),n||(n=go(e,t)),e.cm?al(e.cm,t,r):xo(e,t,r),Xo(e,n,Y),e.cantEdit&&Jo(e,ut(e.firstLine(),0))&&(e.cantEdit=!1)}}function al(e,t,n){var r=e.doc,i=e.display,o=t.from,l=t.to,a=!1,s=o.line;e.options.lineWrapping||(s=ot(nn(tt(r,o.line))),r.iter(s,l.line+1,function(e){if(e==i.maxLine)return a=!0,!0})),r.sel.contains(t.from,t.to)>-1&&ke(e),xo(r,t,n,zr(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,function(e){var t=hn(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,a=!1)}),a&&(e.curOp.updateMaxLine=!0)),Wt(r,o.line),Ri(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?Gr(e):o.line!=l.line||1!=t.text.length||wo(e.doc,t)?Gr(e,o.line,l.line+1,u):Ur(e,o.line,"text");var c=Le(e,"changes"),h=Le(e,"change");if(h||c){var f={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};h&&Hn(e,"change",e,f),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function sl(e,t,n,r,i){var o;r||(r=n),ct(r,n)<0&&(o=[r,n],n=o[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),nl(e,{from:n,to:r,text:t,origin:i})}function ul(e,t,n,r){n1||!(this.children[0]instanceof dl))){var a=[];this.collapse(a),this.children=[new dl(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var l=i.lines.length%25+25,a=l;a10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==l&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=D("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(tn(e,t.line,t,n,o)||t.line!=n.line&&tn(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Pt()}o.addToHistory&&Oo(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var a,s=t.line,u=e.cm;if(e.iter(s,n.line+1,function(r){u&&o.collapsed&&!u.options.lineWrapping&&nn(r)==u.display.maxLine&&(a=!0),o.collapsed&&s!=t.line&&it(r,0),Bt(r,new zt(o,s==t.line?t.ch:null,s==n.line?n.ch:null),e.cm&&e.cm.curOp),++s}),o.collapsed&&e.iter(t.line,n.line+1,function(t){sn(e,t)&&it(t,0)}),o.clearOnEnter&&be(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Et(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++yl,o.atomic=!0),u){if(a&&(u.curOp.updateMaxLine=!0),o.collapsed)Gr(u,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=t.line;c<=n.line;c++)Ur(u,c,"text");o.atomic&&$o(u.doc),Hn(u,"markerAdded",u,o)}return o}bl.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Mi(e),Le(this,"clear")){var n=this.find();n&&Hn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Gr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&$o(e.doc)),e&&Hn(e,"markerCleared",e,this,r,i),t&&Ni(e),this.parent&&this.parent.clear()}},bl.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;s--)nl(this,r[s]);a?Ko(this,a):this.cm&&hi(this.cm)}),undo:Ii(function(){il(this,"undo")}),redo:Ii(function(){il(this,"redo")}),undoSelection:Ii(function(){il(this,"undo",!0)}),redoSelection:Ii(function(){il(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=vt(this,e),t=vt(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var a=0;a=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||n&&!n(s.marker)||r.push(s.marker.parent||s.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n}),vt(this,ut(n,t))},indexFromPos:function(e){e=vt(this,e);var t=e.ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var h=e.dataTransfer.getData("Text");if(h){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),Xo(t.doc,ho(n,n)),f)for(var d=0;d=0;t--)sl(e.doc,"",r[t].from,r[t].to,"+delete");hi(e)})}function Zl(e,t,n){var r=he(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Jl(e,t,n){var r=Zl(e,t.ch,n);return null==r?null:new ut(t.line,r,n<0?"after":"before")}function Ql(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=me(n,t.doc.direction);if(o){var l,a=i<0?ee(o):o[0],s=i<0==(1==a.level),u=s?"after":"before";if(a.level>0||"rtl"==t.doc.direction){var c=lr(t,n);l=i<0?n.text.length-1:0;var h=ar(t,c,l).top;l=fe(function(e){return ar(t,c,e).top==h},i<0==(1==a.level)?a.from:a.to-1,l),"before"==u&&(l=Zl(n,l,1))}else l=i<0?a.to:a.from;return new ut(r,l,u)}}return new ut(r,i<0?n.text.length:0,i<0?"before":"after")}function ea(e,t,n,r){var i=me(t,e.doc.direction);if(!i)return Jl(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=ge(i,n.ch,n.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(r>0?l.to>n.ch:l.from=l.from&&f>=c.begin)){var d=h?"before":"after";return new ut(n.line,f,d)}}var p=function(e,t,r){for(var o=function(e,t){return t?new ut(n.line,s(e,1),"before"):new ut(n.line,e,"after")};e>=0&&e0==(1!=l.level),u=a?r.begin:s(r.end,-1);if(l.from<=u&&u0?c.end:s(c.begin,-1);return null==v||r>0&&v==t.text.length||(g=p(r>0?0:i.length-1,r,u(v)),!g)?null:g}Ul.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ul.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ul.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ul.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ul["default"]=b?Ul.macDefault:Ul.pcDefault;var ta={selectAll:el,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Y)},killLine:function(e){return ql(e,function(t){if(t.empty()){var n=tt(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new ut(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ut(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=tt(e.doc,i.line-1).text;l&&(i=new ut(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),ut(i.line-1,l.length-1),i,"+transpose"))}n.push(new uo(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Ei(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(ct((i=a.ranges[i]).from(),t)<0||t.xRel>0)&&(ct(i.to(),t)>0||t.xRel<0)?Ta(e,r,t,o):Na(e,r,t,o)}function Ta(e,t,n,r){var i=e.display,o=!1,u=Pi(e,function(t){s&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:ei(e)),xe(i.wrapper.ownerDocument,"mouseup",u),xe(i.wrapper.ownerDocument,"mousemove",c),xe(i.scroller,"dragstart",h),xe(i.scroller,"drop",u),o||(Me(t),r.addNew||Bo(e.doc,n,null,null,r.extend),s&&!d||l&&9==a?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},h=function(){return o=!0};s&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=!r.moveOnDrag,be(i.wrapper.ownerDocument,"mouseup",u),be(i.wrapper.ownerDocument,"mousemove",c),be(i.scroller,"dragstart",h),be(i.scroller,"drop",u),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Ma(e,t,n){if("char"==n)return new uo(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new uo(ut(t.line,0),vt(e.doc,ut(t.line+1,0)));var r=n(e,t);return new uo(r.from,r.to)}function Na(e,t,n,r){l&&ei(e);var i=e.display,o=e.doc;Me(t);var a,s,u=o.sel,c=u.ranges;if(r.addNew&&!r.extend?(s=o.sel.contains(n),a=s>-1?c[s]:new uo(n,n)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new uo(n,n)),n=Rr(e,t,!0,!0),s=-1;else{var h=Ma(e,n,r.unit);a=r.extend?Ro(a,h.anchor,h.head,r.extend):h}r.addNew?-1==s?(s=c.length,jo(o,co(e,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?(jo(o,co(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):Uo(o,s,a,$):(s=0,jo(o,new so([a],0),$),u=o.sel);var f=n;function d(t){if(0!=ct(f,t))if(f=t,"rectangle"==r.unit){for(var i=[],l=e.options.tabSize,c=V(tt(o,n.line).text,n.ch,l),h=V(tt(o,t.line).text,t.ch,l),d=Math.min(c,h),p=Math.max(c,h),g=Math.min(n.line,t.line),v=Math.min(e.lastLine(),Math.max(n.line,t.line));g<=v;g++){var m=tt(o,g).text,y=Z(m,d,l);d==p?i.push(new uo(ut(g,y),ut(g,y))):m.length>y&&i.push(new uo(ut(g,y),ut(g,Z(m,p,l))))}i.length||i.push(new uo(n,n)),jo(o,co(e,u.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=a,x=Ma(e,t,r.unit),C=w.anchor;ct(x.anchor,C)>0?(b=x.head,C=pt(w.from(),x.anchor)):(b=x.anchor,C=dt(w.to(),x.head));var S=u.ranges.slice(0);S[s]=Aa(e,new uo(vt(o,C),b)),jo(o,co(e,S,s),$)}}var p=i.wrapper.getBoundingClientRect(),g=0;function v(t){var n=++g,l=Rr(e,t,!0,"rectangle"==r.unit);if(l)if(0!=ct(l,f)){e.curOp.focus=H(I(e)),d(l);var a=oi(i,o);(l.line>=a.to||l.linep.bottom?20:0;s&&setTimeout(Pi(e,function(){g==n&&(i.scroller.scrollTop+=s,v(t))}),50)}}function m(t){e.state.selectingText=!1,g=1/0,t&&(Me(t),i.input.focus()),xe(i.wrapper.ownerDocument,"mousemove",y),xe(i.wrapper.ownerDocument,"mouseup",b),o.history.lastSelOrigin=null}var y=Pi(e,function(e){0!==e.buttons&&We(e)?v(e):m(e)}),b=Pi(e,m);e.state.selectingText=b,be(i.wrapper.ownerDocument,"mousemove",y),be(i.wrapper.ownerDocument,"mouseup",b)}function Aa(e,t){var n=t.anchor,r=t.head,i=tt(e.doc,n.line);if(0==ct(n,r)&&n.sticky==r.sticky)return t;var o=me(i);if(!o)return t;var l=ge(o,n.ch,n.sticky),a=o[l];if(a.from!=n.ch&&a.to!=n.ch)return t;var s,u=l+(a.from==n.ch==(1!=a.level)?0:1);if(0==u||u==o.length)return t;if(r.line!=n.line)s=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=ge(o,r.ch,r.sticky),h=c-l||(r.ch-n.ch)*(1==a.level?-1:1);s=c==u-1||c==u?h<0:h>0}var f=o[u+(s?-1:0)],d=s==(1==f.level),p=d?f.from:f.to,g=d?"after":"before";return n.ch==p&&n.sticky==g?t:new uo(new ut(n.line,p,g),r)}function Oa(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(f){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Me(t);var l=e.display,a=l.lineDiv.getBoundingClientRect();if(o>a.bottom||!Le(e,n))return Ae(t);o-=a.top-l.viewOffset;for(var s=0;s=i){var c=lt(e.doc,o),h=e.display.gutterSpecs[s];return Ce(e,n,e,c,h.className,t),Ae(t)}}}function Da(e,t){return Oa(e,t,"gutterClick",!0)}function Wa(e,t){Yn(e.display,t)||Ha(e,t)||Se(e,t,"contextmenu")||k||e.display.input.onContextMenu(t)}function Ha(e,t){return!!Le(e,"gutterContextMenu")&&Oa(e,t,"gutterContextMenu",!1)}function Fa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),vr(e)}wa.prototype.compare=function(e,t,n){return this.time+ba>e&&0==ct(t,this.pos)&&n==this.button};var Ea={toString:function(){return"CodeMirror.Init"}},Pa={},za={};function Ia(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Ea&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Ea,n("value","",function(e,t){return e.setValue(t)},!0),n("mode",null,function(e,t){e.doc.modeOption=t,yo(e)},!0),n("indentUnit",2,yo,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(e){bo(e),vr(e),Gr(e)},!0),n("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(ut(r,o))}r++});for(var i=n.length-1;i>=0;i--)sl(e.doc,t,n[i],ut(n[i].line,n[i].ch+t.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Ea&&e.refresh()}),n("specialCharPlaceholder",wn,function(e){return e.refresh()},!0),n("electricChars",!0),n("inputStyle",y?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),n("autocorrect",!1,function(e,t){return e.getInputField().autocorrect=t},!0),n("autocapitalize",!1,function(e,t){return e.getInputField().autocapitalize=t},!0),n("rtlMoveVisually",!x),n("wholeLineUpdateBefore",!0),n("theme","default",function(e){Fa(e),to(e)},!0),n("keyMap","default",function(e,t,n){var r=$l(t),i=n!=Ea&&$l(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Ba,!0),n("gutters",[],function(e,t){e.display.gutterSpecs=Qi(t,e.options.lineNumbers),to(e)},!0),n("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?Pr(e.display)+"px":"0",e.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(e){return Ci(e)},!0),n("scrollbarStyle","native",function(e){Li(e),Ci(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),n("lineNumbers",!1,function(e,t){e.display.gutterSpecs=Qi(e.options.gutters,t),to(e)},!0),n("firstLineNumber",1,to,!0),n("lineNumberFormatter",function(e){return e},to,!0),n("showCursorWhenSelecting",!1,Xr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(e,t){"nocursor"==t&&(ni(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),n("screenReaderLabel",null,function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)}),n("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),n("dragDrop",!0,Ra),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,Xr,!0),n("singleCursorHeightPerLine",!0,Xr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,bo,!0),n("addModeClass",!1,bo,!0),n("pollInterval",100),n("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),n("historyEventDelay",1250),n("viewportMargin",10,function(e){return e.refresh()},!0),n("maxHighlightLength",1e4,bo,!0),n("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),n("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),n("autofocus",null),n("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0),n("phrases",null)}function Ra(e,t,n){var r=n&&n!=Ea;if(!t!=!r){var i=e.display.dragFunctions,o=t?be:xe;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function Ba(e){e.options.lineWrapping?(F(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(M(e.display.wrapper,"CodeMirror-wrap"),fn(e)),Ir(e),Gr(e),vr(e),setTimeout(function(){return Ci(e)},100)}function Ga(e,t){var n=this;if(!(this instanceof Ga))return new Ga(e,t);this.options=t=t?U(t):{},U(Pa,t,!1);var r=t.value;"string"==typeof r?r=new Ml(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Ga.inputStyles[t.inputStyle](this),o=this.display=new no(e,r,i,t);for(var u in o.wrapper.CodeMirror=this,Fa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Li(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new _,keySeq:null,specialChars:null},t.autofocus&&!y&&o.input.focus(),l&&a<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Ua(this),El(),Mi(this),this.curOp.forceUpdate=!0,So(this,r),t.autofocus&&!y||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&ti(n)},20):ni(this),za)za.hasOwnProperty(u)&&za[u](this,t[u],Ea);Ji(this),t.finishInit&&t.finishInit(this);for(var c=0;c400}be(t.scroller,"touchstart",function(i){if(!Se(e,i)&&!o(i)&&!Da(e,i)){t.input.ensurePolled(),clearTimeout(n);var l=+new Date;t.activeTouch={start:l,moved:!1,prev:l-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),be(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),be(t.scroller,"touchend",function(n){var r=t.activeTouch;if(r&&!Yn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,l=e.coordsChar(t.activeTouch,"page");o=!r.prev||s(r,r.prev)?new uo(l,l):!r.prev.prev||s(r,r.prev.prev)?e.findWordAt(l):new uo(ut(l.line,0),vt(e.doc,ut(l.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),Me(n)}i()}),be(t.scroller,"touchcancel",i),be(t.scroller,"scroll",function(){t.scroller.clientHeight&&(vi(e,t.scroller.scrollTop),yi(e,t.scroller.scrollLeft,!0),Ce(e,"scroll",e))}),be(t.scroller,"mousewheel",function(t){return ao(e,t)}),be(t.scroller,"DOMMouseScroll",function(t){return ao(e,t)}),be(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){Se(e,t)||Oe(t)},over:function(t){Se(e,t)||(Dl(e,t),Oe(t))},start:function(t){return Ol(e,t)},drop:Pi(e,Al),leave:function(t){Se(e,t)||Wl(e)}};var u=t.input.getField();be(u,"keyup",function(t){return ga.call(e,t)}),be(u,"keydown",Pi(e,da)),be(u,"keypress",Pi(e,va)),be(u,"focus",function(t){return ti(e,t)}),be(u,"blur",function(t){return ni(e,t)})}Ga.defaults=Pa,Ga.optionHandlers=za;var Va=[];function _a(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=St(e,t).state:n="prev");var l=e.options.tabSize,a=tt(o,t),s=V(a.text,null,l);a.stateAfter&&(a.stateAfter=null);var u,c=a.text.match(/^\s*/)[0];if(r||/\S/.test(a.text)){if("smart"==n&&(u=o.mode.indent(i,a.text.slice(c.length),a.text),u==X||u>150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?V(tt(o,t-1).text,null,l):0:"add"==n?u=s+e.options.indentUnit:"subtract"==n?u=s-e.options.indentUnit:"number"==typeof n&&(u=s+n),u=Math.max(0,u);var h="",f=0;if(e.options.indentWithTabs)for(var d=Math.floor(u/l);d;--d)f+=l,h+="\t";if(fl,s=Ie(t),u=null;if(a&&r.ranges.length>1)if(Ka&&Ka.text.join("\n")==t){if(r.ranges.length%Ka.text.length==0){u=[];for(var c=0;c=0;f--){var d=r.ranges[f],p=d.from(),g=d.to();d.empty()&&(n&&n>0?p=ut(p.line,p.ch-n):e.state.overwrite&&!a?g=ut(g.line,Math.min(tt(o,g.line).text.length,g.ch+ee(s).length)):a&&Ka&&Ka.lineWise&&Ka.text.join("\n")==s.join("\n")&&(p=g=ut(p.line,0)));var v={from:p,to:g,text:u?u[f%u.length]:s,origin:i||(a?"paste":e.state.cutIncoming>l?"cut":"+input")};nl(e.doc,v),Hn(e,"inputRead",e,v)}t&&!a&&$a(e,t),hi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=h),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ya(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||Ei(t,function(){return Xa(t,n,0,null,"paste")}),!0}function $a(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var a=0;a-1){l=_a(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(tt(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=_a(e,i.head.line,"smart"));l&&Hn(e,"electricInput",e,i.head.line)}}}function qa(e){for(var t=[],n=[],r=0;rn&&(_a(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&hi(this));else{var o=i.from(),l=i.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var s=a;s0&&Uo(this.doc,r,new uo(o,u[r].to()),Y)}}}),getTokenAt:function(e,t){return Nt(this,e,t)},getLineTokens:function(e,t){return Nt(this,ut(e),t,!0)},getTokenTypeAt:function(e){e=vt(this.doc,e);var t,n=Ct(this,tt(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var l=r+i>>1;if((l?n[2*l-1]:0)>=o)i=l;else{if(!(n[2*l+1]o&&(e=o,i=!0),r=tt(this.doc,e)}else r=e;return wr(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-cn(r):0)},defaultTextHeight:function(){return Hr(this.display)},defaultCharWidth:function(){return Fr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=Sr(this,vt(this.doc,e));var l=e.bottom,a=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)l=e.top;else if("above"==r||"near"==r){var s=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?l=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(l=e.bottom),a+t.offsetWidth>u&&(a=u-t.offsetWidth)}t.style.top=l+"px",t.style.left=t.style.right="","right"==i?(a=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?a=0:"middle"==i&&(a=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=a+"px"),n&&si(this,{left:a,top:l,right:a+t.offsetWidth,bottom:l+t.offsetHeight})},triggerOnKeyDown:zi(da),triggerOnKeyPress:zi(va),triggerOnKeyUp:ga,triggerOnMouseDown:zi(Ca),execCommand:function(e){if(ta.hasOwnProperty(e))return ta[e].call(null,this)},triggerElectric:zi(function(e){$a(this,e)}),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=vt(this.doc,e),l=0;l0&&a(n.charAt(r-1)))--r;while(i.5||this.options.lineWrapping)&&Ir(this),Ce(this,"refresh",this)}),swapDoc:zi(function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),So(this,e),vr(this),this.display.input.reset(),fi(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Hn(this,"swapDoc",this,t),t}),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Te(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}function es(e,t,n,r,i){var o=t,l=n,a=tt(e,t.line),s=i&&"rtl"==e.direction?-n:n;function u(){var n=t.line+s;return!(n=e.first+e.size)&&(t=new ut(n,t.ch,t.sticky),a=tt(e,n))}function c(o){var l;if("codepoint"==r){var c=a.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(c))l=null;else{var h=n>0?c>=55296&&c<56320:c>=56320&&c<57343;l=new ut(t.line,Math.max(0,Math.min(a.text.length,t.ch+n*(h?2:1))),-n)}}else l=i?ea(e.cm,a,t,n):Jl(a,t,n);if(null==l){if(o||!u())return!1;t=Ql(i,e.cm,a,t.line,s)}else t=l;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var h=null,f="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;;p=!1){if(n<0&&!c(!p))break;var g=a.text.charAt(t.ch)||"\n",v=ae(g,d)?"w":f&&"\n"==g?"n":!f||/\s/.test(g)?null:"p";if(!f||p||v||(v="s"),h&&h!=v){n<0&&(n=1,c(),t.sticky="after");break}if(v&&(h=v),n>0&&!c(!p))break}var m=Jo(e,t,o,l,!0);return ht(o,m)&&(m.hitSide=!0),m}function ts(e,t,n,r){var i,o,l=e.doc,a=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,B(e).innerHeight||l(e).documentElement.clientHeight),u=Math.max(s-.5*Hr(e.display),3);i=(n>0?t.bottom:t.top)+n*u}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;;){if(o=Tr(e,a,i),!o.outside)break;if(n<0?i<=0:i>=l.height){o.hitSide=!0;break}i+=5*n}return o}var ns=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new _,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function rs(e,t){var n=or(e,t.line);if(!n||n.hidden)return null;var r=tt(e.doc,t.line),i=nr(n,r,t.line),o=me(r,e.doc.direction),l="left";if(o){var a=ge(o,t.ch);l=a%2?"right":"left"}var s=cr(i.map,t.ch,l);return s.offset="right"==s.collapse?s.end:s.start,s}function is(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function os(e,t){return t&&(e.bad=!0),e}function ls(e,t,n,r,i){var o="",l=!1,a=e.doc.lineSeparator(),s=!1;function u(e){return function(t){return t.id==e}}function c(){l&&(o+=a,s&&(o+=a),l=s=!1)}function h(e){e&&(c(),o+=e)}function f(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void h(n);var o,d=t.getAttribute("cm-marker");if(d){var p=e.findMarks(ut(r,0),ut(i+1,0),u(+d));return void(p.length&&(o=p[0].find(0))&&h(nt(e.doc,o.from,o.to).join(a)))}if("false"==t.getAttribute("contenteditable"))return;var g=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;g&&c();for(var v=0;v=t.display.viewTo||o.line=t.display.viewFrom&&rs(t,i)||{node:s[0].measure.map[2],offset:0},c=o.liner.firstLine()&&(l=ut(l.line-1,tt(r.doc,l.line-1).length)),a.ch==tt(r.doc,a.line).text.length&&a.linei.viewTo-1)return!1;l.line==i.viewFrom||0==(e=Br(r,l.line))?(t=ot(i.view[0].line),n=i.view[0].node):(t=ot(i.view[e].line),n=i.view[e-1].node.nextSibling);var s,u,c=Br(r,a.line);if(c==i.view.length-1?(s=i.viewTo-1,u=i.lineDiv.lastChild):(s=ot(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!n)return!1;var h=r.doc.splitLines(ls(r,n,u,t,s)),f=nt(r.doc,ut(t,0),ut(s,tt(r.doc,s).text.length));while(h.length>1&&f.length>1)if(ee(h)==ee(f))h.pop(),f.pop(),s--;else{if(h[0]!=f[0])break;h.shift(),f.shift(),t++}var d=0,p=0,g=h[0],v=f[0],m=Math.min(g.length,v.length);while(dl.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1))d--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(d).replace(/\u200b+$/,"");var x=ut(t,d),C=ut(s,f.length?ee(f).length-p:0);return h.length>1||h[0]||ct(x,C)?(sl(r.doc,h,x,C,"+input"),!0):void 0},ns.prototype.ensurePolled=function(){this.forceCompositionEnd()},ns.prototype.reset=function(){this.forceCompositionEnd()},ns.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ns.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},ns.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Ei(this.cm,function(){return Gr(e.cm)})},ns.prototype.setUneditable=function(e){e.contentEditable="false"},ns.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Pi(this.cm,Xa)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},ns.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},ns.prototype.onContextMenu=function(){},ns.prototype.resetPosition=function(){},ns.prototype.needsContentAttribute=!0;var us=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new _,this.hasSelection=!1,this.composing=null,this.resetting=!1};function cs(e,t){if(t=t?U(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=H(R(e));t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=a.getValue()}var i;if(e.form&&(be(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=l}}catch(s){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(xe(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var a=Ga(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return a}function hs(e){e.off=xe,e.on=be,e.wheelEventPixels=lo,e.Doc=Ml,e.splitLines=Ie,e.countColumn=V,e.findColumn=Z,e.isWordChar=le,e.Pass=X,e.signal=Ce,e.Line=dn,e.changeEnd=fo,e.scrollbarModel=ki,e.Pos=ut,e.cmpPos=ct,e.modes=Ve,e.mimeModes=_e,e.resolveMode=Xe,e.getMode=Ye,e.modeExtensions=$e,e.extendMode=qe,e.copyState=Ze,e.startState=Qe,e.innerMode=Je,e.commands=ta,e.keyMap=Ul,e.keyName=Yl,e.isModifierKey=jl,e.lookupKey=Kl,e.normalizeKeyMap=_l,e.StringStream=et,e.SharedTextMarker=xl,e.TextMarker=bl,e.LineWidget=gl,e.e_preventDefault=Me,e.e_stopPropagation=Ne,e.e_stop=Oe,e.addClass=F,e.contains=W,e.rmClass=M,e.keyNames=Il}us.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!Se(r,e)){if(r.somethingSelected())ja({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=qa(r);ja({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,Y):(n.prevInput="",i.value=t.text.join("\n"),P(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),v&&(i.style.width="0px"),be(i,"input",function(){l&&a>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),be(i,"paste",function(e){Se(r,e)||Ya(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())}),be(i,"cut",o),be(i,"copy",o),be(e.scroller,"paste",function(t){if(!Yn(e,t)&&!Se(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}}),be(e.lineSpace,"selectstart",function(t){Yn(e,t)||Me(t)}),be(i,"compositionstart",function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),be(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},us.prototype.createField=function(e){this.wrapper=Ja(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Za(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},us.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},us.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Yr(e);if(e.options.moveInputWithCursor){var i=Sr(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return r},us.prototype.showSelection=function(e){var t=this.cm,n=t.display;A(n.cursorDiv,e.cursors),A(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},us.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&P(this.textarea),l&&a>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",l&&a>=9&&(this.hasSelection=null));this.resetting=!1}},us.prototype.getField=function(){return this.textarea},us.prototype.supportsTouch=function(){return!1},us.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||H(R(this.textarea))!=this.textarea))try{this.textarea.focus()}catch(e){}},us.prototype.blur=function(){this.textarea.blur()},us.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},us.prototype.receivedFocus=function(){this.slowPoll()},us.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},us.prototype.fastPoll=function(){var e=!1,t=this;function n(){var r=t.poll();r||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}t.pollingFast=!0,t.polling.set(20,n)},us.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Re(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(l&&a>=9&&this.hasSelection===i||b&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}var s=0,u=Math.min(r.length,i.length);while(s1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},us.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},us.prototype.onKeyPress=function(){l&&a>=9&&(this.hasSelection=null),this.fastPoll()},us.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Rr(n,e),u=r.scroller.scrollTop;if(o&&!f){var c=n.options.resetSelectionOnContextMenu;c&&-1==n.doc.sel.contains(o)&&Pi(n,jo)(n.doc,ho(o),Y);var h,d=i.style.cssText,p=t.wrapper.style.cssText,g=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-g.top-5)+"px; left: "+(e.clientX-g.left-5)+"px;\n z-index: 1000; background: "+(l?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s&&(h=i.ownerDocument.defaultView.scrollY),r.input.focus(),s&&i.ownerDocument.defaultView.scrollTo(null,h),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=y,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),l&&a>=9&&m(),k){Oe(e);var v=function(){xe(window,"mouseup",v),setTimeout(y,20)};be(window,"mouseup",v)}else setTimeout(y,50)}function m(){if(null!=i.selectionStart){var e=n.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function y(){if(t.contextMenuPending==y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,i.style.cssText=d,l&&a<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=u),null!=i.selectionStart)){(!l||l&&a<9)&&m();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?Pi(n,el)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},us.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},us.prototype.setUneditable=function(){},us.prototype.needsContentAttribute=!1,Ia(Ga),Qa(Ga);var fs="iter insert remove copy getEditor constructor".split(" ");for(var ds in Ml.prototype)Ml.prototype.hasOwnProperty(ds)&&K(fs,ds)<0&&(Ga.prototype[ds]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ml.prototype[ds]));return Te(Ml),Ga.inputStyles={textarea:us,contenteditable:ns},Ga.defineMode=function(e){Ga.defaults.mode||"null"==e||(Ga.defaults.mode=e),Ke.apply(this,arguments)},Ga.defineMIME=je,Ga.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ga.defineMIME("text/plain","null"),Ga.defineExtension=function(e,t){Ga.prototype[e]=t},Ga.defineDocExtension=function(e,t){Ml.prototype[e]=t},Ga.fromTextArea=cs,hs(Ga),Ga.version="5.65.21",Ga})},74806:function(e,t,n){(function(e){e(n(15237))})(function(e){"use strict";function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var n=t(["and","or","not","is"]),r=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in","False","True"],i=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];function o(e){return e.scopes[e.scopes.length-1]}e.registerHelper("hintWords","python",r.concat(i).concat(["exec","print"])),e.defineMode("python",function(l,a){for(var s="error",u=a.delimiters||a.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,c=[a.singleOperators,a.doubleOperators,a.doubleDelimiters,a.tripleDelimiters,a.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],h=0;hr?k(t):i0&&T(e,t)&&(l+=" "+s),l}return x(e,t)}function x(e,t,r){if(e.eatSpace())return null;if(!r&&e.match(/^#.*/))return"comment";if(e.match(/^[0-9\.]/,!1)){var i=!1;if(e.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(i=!0),e.match(/^[\d_]+\.\d*/)&&(i=!0),e.match(/^\.\d+/)&&(i=!0),i)return e.eat(/J/i),"number";var o=!1;if(e.match(/^0x[0-9a-f_]+/i)&&(o=!0),e.match(/^0b[01_]+/i)&&(o=!0),e.match(/^0o[0-7_]+/i)&&(o=!0),e.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(e.eat(/J/i),o=!0),e.match(/^0(?![\dx])/i)&&(o=!0),o)return e.eat(/L/i),"number"}if(e.match(m)){var l=-1!==e.current().toLowerCase().indexOf("f");return l?(t.tokenize=C(e.current(),t.tokenize),t.tokenize(e,t)):(t.tokenize=S(e.current(),t.tokenize),t.tokenize(e,t))}for(var a=0;a=0)e=e.substr(1);var n=1==e.length,r="string";function i(e){return function(t,n){var r=x(t,n,!0);return"punctuation"==r&&("{"==t.current()?n.tokenize=i(e+1):"}"==t.current()&&(n.tokenize=e>1?i(e-1):o)),r}}function o(o,l){while(!o.eol())if(o.eatWhile(/[^'"\{\}\\]/),o.eat("\\")){if(o.next(),n&&o.eol())return r}else{if(o.match(e))return l.tokenize=t,r;if(o.match("{{"))return r;if(o.match("{",!1))return l.tokenize=i(0),o.current()?r:l.tokenize(o,l);if(o.match("}}"))return r;if(o.match("}"))return s;o.eat(/['"]/)}if(n){if(a.singleLineStringErrors)return s;l.tokenize=t}return r}return o.isString=!0,o}function S(e,t){while("rubf".indexOf(e.charAt(0).toLowerCase())>=0)e=e.substr(1);var n=1==e.length,r="string";function i(i,o){while(!i.eol())if(i.eatWhile(/[^'"\\]/),i.eat("\\")){if(i.next(),n&&i.eol())return r}else{if(i.match(e))return o.tokenize=t,r;i.eat(/['"]/)}if(n){if(a.singleLineStringErrors)return s;o.tokenize=t}return r}return i.isString=!0,i}function k(e){while("py"!=o(e).type)e.scopes.pop();e.scopes.push({offset:o(e).offset+l.indentUnit,type:"py",align:null})}function L(e,t,n){var r=e.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:e.column()+1;t.scopes.push({offset:t.indent+f,type:n,align:r})}function T(e,t){var n=e.indentation();while(t.scopes.length>1&&o(t).offset>n){if("py"!=o(t).type)return!0;t.scopes.pop()}return o(t).offset!=n}function M(e,t){e.sol()&&(t.beginningOfLine=!0,t.dedent=!1);var n=t.tokenize(e,t),r=e.current();if(t.beginningOfLine&&"@"==r)return e.match(v,!1)?"meta":g?"operator":s;if(/\S/.test(r)&&(t.beginningOfLine=!1),"variable"!=n&&"builtin"!=n||"meta"!=t.lastToken||(n="meta"),"pass"!=r&&"return"!=r||(t.dedent=!0),"lambda"==r&&(t.lambda=!0),":"==r&&!t.lambda&&"py"==o(t).type&&e.match(/^\s*(?:#|$)/,!1)&&k(t),1==r.length&&!/string|comment/.test(n)){var i="[({".indexOf(r);if(-1!=i&&L(e,t,"])}".slice(i,i+1)),i="])}".indexOf(r),-1!=i){if(o(t).type!=r)return s;t.indent=t.scopes.pop().offset-f}}return t.dedent&&e.eol()&&"py"==o(t).type&&t.scopes.length>1&&t.scopes.pop(),n}var N={startState:function(e){return{tokenize:w,scopes:[{offset:e||0,type:"py",align:null}],indent:e||0,lastToken:null,lambda:!1,dedent:0}},token:function(e,t){var n=t.errorToken;n&&(t.errorToken=!1);var r=M(e,t);return r&&"comment"!=r&&(t.lastToken="keyword"==r||"punctuation"==r?e.current():r),"punctuation"==r&&(r=null),e.eol()&&t.lambda&&(t.lambda=!1),n?r+" "+s:r},indent:function(t,n){if(t.tokenize!=w)return t.tokenize.isString?e.Pass:0;var r=o(t),i=r.type==n.charAt(0)||"py"==r.type&&!t.dedent&&/^(else:|elif |except |finally:)/.test(n);return null!=r.align?r.align-(i?1:0):r.offset-(i?f:0)},electricInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,closeBrackets:{triples:"'\""},lineComment:"#",fold:"indent"};return N}),e.defineMIME("text/x-python","python");var l=function(e){return e.split(" ")};e.defineMIME("text/x-cython",{name:"python",extra_keywords:l("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")})})}}]); \ No newline at end of file diff --git a/frontend/dist/js/797.743504ff.js b/frontend/dist/js/797.743504ff.js deleted file mode 100644 index 98604a5..0000000 --- a/frontend/dist/js/797.743504ff.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[797],{17692:function(t,a,e){e.r(a),e.d(a,{default:function(){return R}});var s=function(){var t=this,a=t._self._c;return a("div",{staticClass:"ai-asset-analysis-page",class:{"theme-dark":t.isDarkTheme}},[t.opportunities.length>0?a("div",{staticClass:"radar-section"},[a("div",{staticClass:"radar-header"},[a("div",{staticClass:"radar-header-left"},[a("h2",{staticClass:"radar-title"},[t._v(t._s(t.$t("aiAssetAnalysis.opportunities.title")))]),a("p",{staticClass:"radar-subtitle"},[t._v(t._s(t.$t("aiAssetAnalysis.opportunities.updateHint")))])]),a("a-button",{staticClass:"radar-refresh-btn",attrs:{size:"small",loading:t.oppLoading},on:{click:function(a){return t.loadOpportunities(!0)}}},[a("a-icon",{attrs:{type:"sync"}}),t._v(" "+t._s(t.$t("common.refresh")||"Refresh")+" ")],1)],1),a("div",{staticClass:"radar-carousel",on:{mouseenter:function(a){t.oppHover=!0},mouseleave:function(a){t.oppHover=!1}}},[a("div",{staticClass:"radar-track",class:{paused:t.oppHover},style:t.oppTrackStyle},t._l(t.carouselItems,function(e,s){return a("div",{key:"opp-"+s,staticClass:"radar-card",class:[e.impact,{"is-prediction":"PredictionMarket"===e.market}],on:{click:function(a){return t.analyzeOpportunity(e)}}},[a("div",{staticClass:"rc-head"},[a("span",{staticClass:"rc-symbol",class:{"rc-prediction-title":"PredictionMarket"===e.market}},[t._v(" "+t._s("PredictionMarket"===e.market&&e.name||e.symbol)+" ")]),a("span",{staticClass:"rc-market",class:"rc-market-"+(e.market||"").toLowerCase()},[t._v(" "+t._s(t.getMarketLabel(e.market))+" ")])]),"PredictionMarket"!==e.market?a("div",{staticClass:"rc-metrics"},[a("div",{staticClass:"rc-metric"},[a("span",{staticClass:"rc-metric-label"},[t._v(t._s(t.$i18n&&"zh-CN"===t.$i18n.locale?"当前价格":"Price"))]),a("span",{staticClass:"rc-metric-value"},[t._v("$"+t._s(t.formatOppPrice(e.price)))])]),a("div",{staticClass:"rc-metric"},[a("span",{staticClass:"rc-metric-label"},[t._v(t._s(t.$i18n&&"zh-CN"===t.$i18n.locale?"24h涨跌":"24h Change"))]),a("span",{staticClass:"rc-metric-value",class:e.change_24h>=0?"rc-up":"rc-down"},[t._v(" "+t._s(e.change_24h>=0?"+":"")+t._s((e.change_24h||0).toFixed(2))+"% ")])]),a("div",{staticClass:"rc-metric"},[a("span",{staticClass:"rc-metric-label"},[t._v(t._s(t.$i18n&&"zh-CN"===t.$i18n.locale?"信号":"Signal"))]),a("span",{staticClass:"rc-metric-value rc-signal-val",class:"rc-signal-"+(e.signal||"")},[t._v(" "+t._s(t.getSignalLabel(e.signal))+" ")])])]):a("div",{staticClass:"rc-metrics"},[a("div",{staticClass:"rc-metric"},[a("span",{staticClass:"rc-metric-label"},[t._v(t._s(t.$i18n&&"zh-CN"===t.$i18n.locale?"市场概率":"Probability"))]),a("span",{staticClass:"rc-metric-value"},[t._v(t._s((e.price||0).toFixed(1))+"%")])]),e.ai_analysis?a("div",{staticClass:"rc-metric"},[a("span",{staticClass:"rc-metric-label"},[t._v(t._s(t.$i18n&&"zh-CN"===t.$i18n.locale?"机会评分":"Score"))]),a("span",{staticClass:"rc-metric-value rc-up"},[t._v(t._s(e.ai_analysis.opportunity_score.toFixed(0)))])]):t._e(),e.ai_analysis?a("div",{staticClass:"rc-metric"},[a("span",{staticClass:"rc-metric-label"},[t._v(t._s(t.$i18n&&"zh-CN"===t.$i18n.locale?"建议":"Rec."))]),a("span",{staticClass:"rc-metric-value",class:"YES"===e.ai_analysis.recommendation?"rc-up":"NO"===e.ai_analysis.recommendation?"rc-down":""},[t._v(" "+t._s(t.getRecommendationLabel(e.ai_analysis.recommendation))+" ")])]):t._e()]),a("div",{staticClass:"rc-footer"},[a("span",{staticClass:"rc-reason"},[t._v(t._s(t.getReasonText(e)))]),"Crypto"===e.market?a("span",{staticClass:"rc-cta",on:{click:function(a){return a.stopPropagation(),t.openQuickTradeFromOpp(e)}}},[a("a-icon",{attrs:{type:"transaction"}}),t._v(" "+t._s(t.$t("quickTrade.tradeNow"))+" ")],1):t._e()])])}),0)])]):t._e(),a("a-tooltip",{attrs:{title:t.$t("quickTrade.openPanel"),placement:"left"}},[!t.showQuickTrade&&t.currentAnalysisSymbol?a("div",{staticClass:"qt-floating-btn",on:{click:t.openQuickTradeFromCurrent}},[a("a-icon",{attrs:{type:"thunderbolt",theme:"filled"}})],1):t._e()]),a("quick-trade-panel",{attrs:{visible:t.showQuickTrade,symbol:t.qtSymbol,"preset-side":t.qtSide,"preset-price":t.qtPrice,source:t.qtSource,"market-type":"swap"},on:{close:function(a){t.showQuickTrade=!1},"order-success":t.onQuickTradeSuccess,"update:symbol":t.handleQuickTradeSymbolChange}}),a("a-card",{staticClass:"workspace-card",attrs:{bordered:!1}},[a("a-tabs",{staticClass:"workspace-tabs",attrs:{size:"large"},model:{value:t.activeTab,callback:function(a){t.activeTab=a},expression:"activeTab"}},[a("a-tab-pane",{key:"quick"},[a("span",{attrs:{slot:"tab"},slot:"tab"},[a("a-icon",{attrs:{type:"thunderbolt"}}),t._v(" "+t._s(t.$t("aiAssetAnalysis.tabs.quick"))+" ")],1),a("div",{staticClass:"tab-body"},["quick"===t.activeTab?a("AnalysisView",{attrs:{embedded:!0,"preset-symbol":t.presetSymbol,"auto-analyze-signal":t.autoAnalyzeSignal},on:{"symbol-change":t.onAnalysisSymbolChange}}):t._e()],1)]),a("a-tab-pane",{key:"polymarket"},[a("span",{attrs:{slot:"tab"},slot:"tab"},[a("a-icon",{attrs:{type:"radar-chart"}}),t._v(" "+t._s(t.$t("aiAssetAnalysis.tabs.polymarket"))+" ")],1),a("div",{staticClass:"tab-body"},[a("div",{staticClass:"polymarket-tab-content"},[a("div",{staticClass:"polymarket-placeholder"},[a("div",{staticClass:"placeholder-icon"},[a("a-icon",{attrs:{type:"radar-chart"}})],1),a("h3",[t._v(t._s(t.$t("polymarket.analysis.title")))]),a("p",[t._v(t._s(t.$t("polymarket.analysis.description")))]),a("a-button",{staticStyle:{"margin-top":"16px"},attrs:{type:"primary",size:"large",icon:"thunderbolt"},on:{click:function(a){t.showPolymarketModal=!0}}},[t._v(" "+t._s(t.$t("polymarket.analysis.startAnalysis"))+" ")])],1)])])])],1)],1),a("PolymarketAnalysisModal",{attrs:{visible:t.showPolymarketModal},on:{close:function(a){t.showPolymarketModal=!1}}})],1)},i=[],n=e(81127),r=e(56252),o=e(2403),l=e(76338),c=(e(74423),e(95353)),u=e(67681),d=e(44146),y=e(90371),p=function(){var t=this,a=t._self._c;return a("a-modal",{attrs:{visible:t.visible,title:t.$t("polymarket.analysis.title"),width:900,footer:null,wrapClassName:t.isDarkTheme?"qd-dark-modal":"",maskClosable:!1},on:{cancel:t.handleClose}},[a("div",{staticClass:"polymarket-analysis-modal",class:{"theme-dark":t.isDarkTheme}},[a("a-tabs",{attrs:{"default-active-key":"analyze"},on:{change:t.handleTabChange}},[a("a-tab-pane",{key:"analyze",attrs:{tab:t.$t("polymarket.analysis.tabAnalyze")}},[t.analysisResult?t._e():a("div",{staticClass:"input-section"},[a("a-alert",{staticStyle:{"margin-bottom":"16px"},attrs:{message:t.$t("polymarket.analysis.inputHint"),type:"info","show-icon":""}}),a("a-textarea",{attrs:{placeholder:t.$t("polymarket.analysis.inputPlaceholder"),rows:3,disabled:t.analyzing},on:{pressEnter:t.handleAnalyze},model:{value:t.inputText,callback:function(a){t.inputText=a},expression:"inputText"}}),a("div",{staticClass:"input-actions"},[a("a-button",{staticStyle:{width:"100%","margin-top":"12px"},attrs:{type:"primary",size:"large",icon:"thunderbolt",loading:t.analyzing,disabled:!t.inputText.trim()},on:{click:t.handleAnalyze}},[t._v(" "+t._s(t.$t("polymarket.analysis.analyzeButton"))+" ")])],1)],1),t.analysisResult?a("div",{staticClass:"result-section"},[a("div",{staticClass:"market-info"},[a("h3",[t._v(t._s(t.analysisResult.market.question))]),a("div",{staticClass:"market-meta"},[a("a-tag",{attrs:{color:t.getStatusColor(t.analysisResult.market.status)}},[t._v(" "+t._s(t.analysisResult.market.status)+" ")]),a("span",{staticClass:"meta-item"},[a("a-icon",{attrs:{type:"percentage"}}),t._v(" "+t._s(t.analysisResult.market.current_probability)+"% ")],1),t.analysisResult.market.volume_24h?a("span",{staticClass:"meta-item"},[a("a-icon",{attrs:{type:"dollar"}}),t._v(" "+t._s(t.formatVolume(t.analysisResult.market.volume_24h))+" ")],1):t._e(),t.analysisResult.market.polymarket_url?a("a-button",{attrs:{type:"link",size:"small",icon:"link",href:t.analysisResult.market.polymarket_url,target:"_blank"}},[t._v(" "+t._s(t.$t("polymarket.analysis.viewOnPolymarket"))+" ")]):t._e()],1)]),a("div",{staticClass:"analysis-result"},[a("a-divider",[t._v(t._s(t.$t("polymarket.analysis.aiAnalysis")))]),a("div",{staticClass:"probability-comparison"},[a("div",{staticClass:"prob-item"},[a("div",{staticClass:"prob-label"},[t._v(t._s(t.$t("polymarket.analysis.marketProbability")))]),a("div",{staticClass:"prob-value"},[t._v(t._s(t.analysisResult.analysis.market_probability)+"%")])]),a("div",{staticClass:"prob-item"},[a("div",{staticClass:"prob-label"},[t._v(t._s(t.$t("polymarket.analysis.aiPredictedProbability")))]),a("div",{staticClass:"prob-value ai-prob"},[t._v(t._s(t.analysisResult.analysis.ai_predicted_probability)+"%")])]),a("div",{staticClass:"prob-item"},[a("div",{staticClass:"prob-label"},[t._v(t._s(t.$t("polymarket.analysis.divergence")))]),a("div",{staticClass:"prob-value",class:t.getDivergenceClass(t.analysisResult.analysis.divergence)},[t._v(" "+t._s(t.analysisResult.analysis.divergence>=0?"+":"")+t._s(t.analysisResult.analysis.divergence.toFixed(2))+"% ")])])]),a("div",{staticClass:"recommendation-section"},[a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{span:8}},[a("div",{staticClass:"rec-card"},[a("div",{staticClass:"rec-label"},[t._v(t._s(t.$t("polymarket.analysis.recommendation")))]),a("a-tag",{staticStyle:{"font-size":"16px",padding:"4px 12px"},attrs:{color:t.getRecommendationColor(t.analysisResult.analysis.recommendation)}},[t._v(" "+t._s(t.getRecommendationLabel(t.analysisResult.analysis.recommendation))+" ")])],1)]),a("a-col",{attrs:{span:8}},[a("div",{staticClass:"rec-card"},[a("div",{staticClass:"rec-label"},[t._v(t._s(t.$t("polymarket.analysis.confidenceScore")))]),a("div",{staticClass:"rec-value"},[t._v(t._s(t.analysisResult.analysis.confidence_score.toFixed(0)))])])]),a("a-col",{attrs:{span:8}},[a("div",{staticClass:"rec-card"},[a("div",{staticClass:"rec-label"},[t._v(t._s(t.$t("polymarket.analysis.opportunityScore")))]),a("div",{staticClass:"rec-value"},[t._v(t._s(t.analysisResult.analysis.opportunity_score.toFixed(0)))])])])],1)],1),t.analysisResult.analysis.reasoning?a("div",{staticClass:"reasoning-section"},[a("h4",[t._v(t._s(t.$t("polymarket.analysis.reasoning")))]),a("p",{staticClass:"reasoning-text"},[t._v(t._s(t.analysisResult.analysis.reasoning))])]):t._e(),t.analysisResult.analysis.key_factors&&t.analysisResult.analysis.key_factors.length>0?a("div",{staticClass:"key-factors-section"},[a("h4",[t._v(t._s(t.$t("polymarket.analysis.keyFactors")))]),t._l(t.analysisResult.analysis.key_factors,function(e,s){return a("a-tag",{key:s,staticStyle:{margin:"4px"},attrs:{color:"blue"}},[t._v(" "+t._s(e)+" ")])})],2):t._e(),t.analysisResult.credits_charged>0?a("div",{staticClass:"billing-info"},[a("a-alert",{staticStyle:{"margin-top":"16px"},attrs:{message:t.$t("polymarket.analysis.creditsCharged",{credits:t.analysisResult.credits_charged}),type:"success","show-icon":""}}),void 0!==t.analysisResult.remaining_credits?a("div",{staticStyle:{"margin-top":"8px","text-align":"right"},style:{color:t.isDarkTheme?"rgba(255,255,255,0.75)":"rgba(0,0,0,0.65)"}},[t._v(" "+t._s(t.$t("polymarket.analysis.remainingCredits",{credits:t.analysisResult.remaining_credits.toFixed(0)}))+" ")]):t._e()],1):t._e()],1),a("div",{staticClass:"result-actions"},[a("a-button",{staticStyle:{"margin-right":"8px"},on:{click:t.handleNewAnalysis}},[t._v(" "+t._s(t.$t("polymarket.analysis.newAnalysis"))+" ")]),a("a-button",{attrs:{type:"primary"},on:{click:t.handleClose}},[t._v(" "+t._s(t.$t("common.close"))+" ")])],1)]):t._e(),t.analyzing?a("div",{staticClass:"loading-section"},[a("a-spin",{attrs:{size:"large"}}),a("p",{style:{marginTop:"16px",color:t.isDarkTheme?"rgba(255,255,255,0.75)":"rgba(0,0,0,0.65)"}},[t._v(" "+t._s(t.$t("polymarket.analysis.analyzing"))+" ")])],1):t._e()]),a("a-tab-pane",{key:"history",attrs:{tab:t.$t("polymarket.analysis.tabHistory")}},[a("div",{staticClass:"history-section"},[a("a-spin",{attrs:{spinning:t.historyLoading}},[a("a-table",{attrs:{columns:t.historyColumns,"data-source":t.historyList,pagination:t.historyPagination,"row-key":function(t){return t.id},size:"small"},on:{change:t.handleHistoryTableChange},scopedSlots:t._u([{key:"market_title",fn:function(e,s){return[a("a-button",{staticStyle:{padding:"0"},attrs:{type:"link"},on:{click:function(a){return t.viewHistoryItem(s)}}},[t._v(" "+t._s(e)+" ")])]}},{key:"recommendation",fn:function(e){return[a("a-tag",{attrs:{color:t.getRecommendationColor(e)}},[t._v(" "+t._s(t.getRecommendationLabel(e))+" ")])]}},{key:"created_at",fn:function(a){return[t._v(" "+t._s(t.formatDateTime(a))+" ")]}}])})],1)],1)])],1)],1)])},m=[],h=e(75769),v="/api/polymarket";function _(t){return(0,h.Ay)({url:"".concat(v,"/analyze"),method:"post",data:t,timeout:12e4})}function k(t){return(0,h.Ay)({url:"".concat(v,"/history"),method:"get",params:t})}var g={name:"PolymarketAnalysisModal",props:{visible:{type:Boolean,default:!1}},data:function(){var t=this;return{inputText:"",analyzing:!1,analysisResult:null,activeTab:"analyze",historyLoading:!1,historyList:[],historyPagination:{current:1,pageSize:20,total:0,showSizeChanger:!0,showTotal:function(a){return t.$t("polymarket.analysis.historyTotal",{total:a})}},historyColumns:[]}},computed:(0,l.A)((0,l.A)({},(0,c.aH)({navTheme:function(t){return t.app.theme}})),{},{isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme}}),methods:{handleAnalyze:function(){var t=this;this.inputText.trim()?(this.analyzing=!0,this.analysisResult=null,_({input:this.inputText.trim(),language:this.$i18n.locale||"zh-CN"}).then(function(a){1===a.code?(t.analysisResult=a.data,t.$message.success(t.$t("polymarket.analysis.success"))):"Insufficient credits"===a.msg?(t.$message.error(t.$t("polymarket.analysis.insufficientCredits")),t.$router.push("/billing")):t.$message.error(a.msg||t.$t("polymarket.analysis.failed"))}).catch(function(a){a.response&&a.response.data&&"Insufficient credits"===a.response.data.msg?(t.$message.error(t.$t("polymarket.analysis.insufficientCredits")),t.$router.push("/billing")):t.$message.error(t.$t("polymarket.analysis.failed"))}).finally(function(){t.analyzing=!1})):this.$message.warning(this.$t("polymarket.analysis.inputRequired"))},handleNewAnalysis:function(){this.inputText="",this.analysisResult=null},handleClose:function(){var t=this;this.$emit("close"),setTimeout(function(){t.inputText="",t.analysisResult=null,t.analyzing=!1},300)},getStatusColor:function(t){var a={active:"green",closed:"default",resolved:"blue"};return a[t]||"default"},getRecommendationColor:function(t){var a={YES:"green",NO:"red",HOLD:"orange"};return a[t]||"default"},getRecommendationLabel:function(t){var a={YES:this.$t("polymarket.analysis.recommendationYes"),NO:this.$t("polymarket.analysis.recommendationNo"),HOLD:this.$t("polymarket.analysis.recommendationHold")};return a[t]||t},getDivergenceClass:function(t){return t>5?"divergence-positive":t<-5?"divergence-negative":"divergence-neutral"},formatVolume:function(t){return t>=1e6?"$".concat((t/1e6).toFixed(2),"M"):t>=1e3?"$".concat((t/1e3).toFixed(2),"K"):"$".concat(t.toFixed(2))},handleTabChange:function(t){this.activeTab=t,"history"===t&&0===this.historyList.length&&this.loadHistory()},loadHistory:function(){var t=this;return(0,r.A)((0,n.A)().m(function a(){var e;return(0,n.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return t.historyLoading=!0,a.p=1,a.n=2,k({page:t.historyPagination.current,page_size:t.historyPagination.pageSize});case 2:e=a.v,1===e.code&&e.data&&(t.historyList=e.data.items||[],t.historyPagination.total=e.data.total||0),a.n=4;break;case 3:a.p=3,a.v,t.$message.error(t.$t("polymarket.analysis.loadHistoryFailed"));case 4:return a.p=4,t.historyLoading=!1,a.f(4);case 5:return a.a(2)}},a,null,[[1,3,4,5]])}))()},handleHistoryTableChange:function(t){this.historyPagination.current=t.current,this.historyPagination.pageSize=t.pageSize,this.loadHistory()},viewHistoryItem:function(t){this.activeTab="analyze",this.analysisResult={market:{question:t.market_title,market_id:t.market_id,polymarket_url:t.market_url,current_probability:t.market_probability,status:"active"},analysis:{ai_predicted_probability:t.ai_predicted_probability,market_probability:t.market_probability,recommendation:t.recommendation,opportunity_score:t.opportunity_score,confidence_score:t.confidence_score}}},formatDateTime:function(t){if(!t)return"";var a=new Date(t);return a.toLocaleString("zh-CN"===this.$i18n.locale?"zh-CN":"en-US")}},mounted:function(){this.historyColumns=[{title:this.$t("polymarket.analysis.historyMarket"),dataIndex:"market_title",key:"market_title",scopedSlots:{customRender:"market_title"}},{title:this.$t("polymarket.analysis.historyRecommendation"),dataIndex:"recommendation",key:"recommendation",width:120,scopedSlots:{customRender:"recommendation"}},{title:this.$t("polymarket.analysis.historyOpportunityScore"),dataIndex:"opportunity_score",key:"opportunity_score",width:120,align:"right"},{title:this.$t("polymarket.analysis.historyCreatedAt"),dataIndex:"created_at",key:"created_at",width:180,scopedSlots:{customRender:"created_at"}}]}},b=g,f=e(845),C=(0,f.A)(b,p,m,!1,null,"67e891d2",null),$=C.exports,S={name:"AIAssetAnalysis",components:{AnalysisView:u["default"],QuickTradePanel:y.A,PolymarketAnalysisModal:$},data:function(){return{activeTab:"quick",opportunities:[],oppLoading:!1,oppHover:!1,presetSymbol:"",autoAnalyzeSignal:0,showQuickTrade:!1,qtSymbol:"",qtSide:"",qtPrice:0,qtSource:"ai_radar",currentAnalysisSymbol:"",currentAnalysisMarket:"",showPolymarketModal:!1}},computed:(0,l.A)((0,l.A)({},(0,c.aH)({navTheme:function(t){return t.app.theme}})),{},{isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},carouselItems:function(){return 0===this.opportunities.length?[]:[].concat((0,o.A)(this.opportunities),(0,o.A)(this.opportunities))},oppTrackStyle:function(){var t=3*this.opportunities.length;return{animationDuration:t+"s"}}}),created:function(){this.loadOpportunities()},methods:{loadOpportunities:function(){var t=arguments,a=this;return(0,r.A)((0,n.A)().m(function e(){var s,i,r;return(0,n.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return s=t.length>0&&void 0!==t[0]&&t[0],a.oppLoading=!0,e.p=1,i=s?{force:!0}:{},e.n=2,(0,d.r9)(i);case 2:r=e.v,r&&1===r.code&&Array.isArray(r.data)&&(a.opportunities=r.data.slice(0,20)),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.p=4,a.oppLoading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},getSignalColor:function(t){var a={overbought:"volcano",oversold:"green",bullish_momentum:"cyan",bearish_momentum:"red"};return a[t]||"default"},getSignalLabel:function(t){var a="aiAssetAnalysis.opportunities.signal.".concat(t),e=this.$t(a);return e!==a?e:t},getMarketTagColor:function(t){var a={Crypto:"purple",USStock:"green",Forex:"gold",PredictionMarket:"cyan"};return a[t]||"default"},getMarketLabel:function(t){var a="aiAssetAnalysis.opportunities.market.".concat(t),e=this.$t(a);return e!==a?e:t},getReasonText:function(t){var a=(t.market||"Crypto").toLowerCase(),e=t.signal||"",s="aiAssetAnalysis.opportunities.reason.".concat(a,".").concat(e),i=this.$t(s);if(i===s)return t.reason||"";var n=Math.abs(t.change_24h||0).toFixed(1),r=Math.abs(t.change_7d||0).toFixed(1);return i.replace("{change}",n).replace("{change7d}",r)},formatOppPrice:function(t){return t?t>=1e4?(t/1e3).toFixed(1)+"K":t>=1?t.toFixed(2):t.toFixed(4):"--"},analyzeOpportunity:function(t){var a=this;if("PredictionMarket"===t.market)return this.activeTab="polymarket",void(this.showPolymarketModal=!0);this.activeTab="quick";var e=t.market||"Crypto";this.presetSymbol="".concat(e,":").concat(t.symbol),this.$nextTick(function(){a.autoAnalyzeSignal++})},getRecommendationColor:function(t){var a={YES:"green",NO:"red",HOLD:"default"};return a[t]||"default"},getRecommendationLabel:function(t){return this.$t("polymarket.recommendation.".concat(t))||t},onAnalysisSymbolChange:function(t){if(!t)return this.currentAnalysisSymbol="",void(this.currentAnalysisMarket="");var a=t.split(":"),e=a.length>1?a[0]:"Crypto",s=a.length>1?a[1]:a[0];this.currentAnalysisMarket=e,this.currentAnalysisSymbol="Crypto"===e?s:""},openQuickTradeFromCurrent:function(){this.currentAnalysisSymbol&&(this.qtSymbol=this.currentAnalysisSymbol,this.qtSide="",this.qtPrice=0,this.qtSource="ai_analysis",this.showQuickTrade=!0)},openQuickTradeFromOpp:function(t){if("Crypto"===t.market){this.qtSymbol=t.symbol||"";var a=(t.signal||"").toLowerCase();a.includes("oversold")||a.includes("bullish")?this.qtSide="buy":a.includes("overbought")||a.includes("bearish")?this.qtSide="sell":this.qtSide="",this.qtPrice=t.price||0,this.qtSource="ai_radar",this.showQuickTrade=!0}},onQuickTradeSuccess:function(){this.$message.success(this.$t("quickTrade.orderSuccess"))},handleQuickTradeSymbolChange:function(t){t&&(this.qtSymbol=t)}}},A=S,T=(0,f.A)(A,s,i,!1,null,"0d0a10d6",null),R=T.exports},42430:function(t,a,e){e.d(a,{IA:function(){return r},N6:function(){return c},PR:function(){return o},kI:function(){return l}});var s=e(76338),i=e(75769),n={list:"/api/credentials/list",get:"/api/credentials/get",create:"/api/credentials/create",delete:"/api/credentials/delete",egressIp:"/api/credentials/egress-ip"};function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i.Ay)({url:n.list,method:"get",params:t})}function o(t){return(0,i.Ay)({url:n.create,method:"post",data:t})}function l(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.Ay)({url:n.delete,method:"delete",params:(0,s.A)({id:t},a)})}function c(){return(0,i.Ay)({url:n.egressIp,method:"get"})}}}]); \ No newline at end of file diff --git a/frontend/dist/js/846-legacy.0359cda8.js b/frontend/dist/js/846-legacy.0359cda8.js deleted file mode 100644 index 18a2f25..0000000 --- a/frontend/dist/js/846-legacy.0359cda8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[846],{69846:function(t,e,a){a.r(e),a.d(e,{default:function(){return v}});var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"user-manage-page",class:{"theme-dark":t.isDarkTheme}},[e("div",{staticClass:"page-header"},[e("h2",{staticClass:"page-title"},[e("a-icon",{attrs:{type:"team"}}),e("span",[t._v(t._s(t.$t("userManage.title")||"User Management"))])],1),e("p",{staticClass:"page-desc"},[t._v(t._s(t.$t("userManage.description")||"Manage system users, roles and permissions"))])]),e("a-tabs",{staticClass:"manage-tabs",on:{change:t.handleTabChange},model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[e("a-tab-pane",{key:"users",attrs:{tab:t.$t("userManage.tabUsers")||"User Management"}},[e("div",{staticClass:"toolbar"},[e("div",{staticClass:"toolbar-left"},[e("a-button",{attrs:{type:"primary"},on:{click:t.showCreateModal}},[e("a-icon",{attrs:{type:"user-add"}}),t._v(" "+t._s(t.$t("userManage.createUser")||"Create User")+" ")],1),e("a-button",{on:{click:t.loadUsers}},[e("a-icon",{attrs:{type:"reload"}}),t._v(" "+t._s(t.$t("common.refresh")||"Refresh")+" ")],1)],1),e("div",{staticClass:"toolbar-right"},[e("a-input-search",{staticClass:"toolbar-search",attrs:{placeholder:t.$t("userManage.searchPlaceholder")||"Search by username/email",allowClear:""},on:{search:t.handleSearch,pressEnter:t.handleSearch},model:{value:t.searchKeyword,callback:function(e){t.searchKeyword=e},expression:"searchKeyword"}})],1)]),e("a-card",{staticClass:"user-table-card",attrs:{bordered:!1}},[e("a-table",{attrs:{columns:t.columns,dataSource:t.users,loading:t.loading,pagination:t.pagination,rowKey:function(t){return t.id},scroll:{x:1280}},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"status",fn:function(a){return[e("a-tag",{attrs:{color:"active"===a?"green":"red"}},[t._v(" "+t._s("active"===a?t.$t("userManage.active")||"Active":t.$t("userManage.disabled")||"Disabled")+" ")])]}},{key:"role",fn:function(a){return[e("a-tag",{attrs:{color:t.getRoleColor(a)}},[t._v(" "+t._s(t.getRoleLabel(a))+" ")])]}},{key:"last_login_at",fn:function(a){return[a?e("span",[t._v(t._s(t.formatTime(a)))]):e("span",{staticClass:"text-muted"},[t._v(t._s(t.$t("userManage.neverLogin")||"Never"))])]}},{key:"credits",fn:function(a){return[e("span",{staticClass:"credits-value"},[t._v(t._s(t.formatCredits(a)))])]}},{key:"vip_expires_at",fn:function(a){return[a&&t.isVipActive(a)?[e("a-tag",{attrs:{color:"gold"}},[e("a-icon",{attrs:{type:"crown"}}),t._v(" "+t._s(t.formatDate(a))+" ")],1)]:e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"action",fn:function(a,s){return[e("a-space",[e("a-tooltip",{attrs:{title:t.$t("common.edit")||"Edit"}},[e("a-button",{attrs:{type:"link",size:"small"},on:{click:function(e){return t.showEditModal(s)}}},[e("a-icon",{attrs:{type:"edit"}})],1)],1),e("a-tooltip",{attrs:{title:t.$t("userManage.adjustCredits")||"Adjust Credits"}},[e("a-button",{attrs:{type:"link",size:"small"},on:{click:function(e){return t.showCreditsModal(s)}}},[e("a-icon",{staticStyle:{color:"#722ed1"},attrs:{type:"wallet"}})],1)],1),e("a-tooltip",{attrs:{title:t.$t("userManage.setVip")||"Set VIP"}},[e("a-button",{attrs:{type:"link",size:"small"},on:{click:function(e){return t.showVipModal(s)}}},[e("a-icon",{staticStyle:{color:"#faad14"},attrs:{type:"crown"}})],1)],1),e("a-tooltip",{attrs:{title:t.$t("userManage.resetPassword")||"Reset Password"}},[e("a-button",{attrs:{type:"link",size:"small"},on:{click:function(e){return t.showResetPasswordModal(s)}}},[e("a-icon",{attrs:{type:"key"}})],1)],1),e("a-tooltip",{attrs:{title:t.$t("common.delete")||"Delete"}},[e("a-popconfirm",{attrs:{title:t.$t("userManage.confirmDelete")||"Are you sure to delete this user?"},on:{confirm:function(e){return t.handleDelete(s.id)}}},[e("a-button",{attrs:{type:"link",size:"small",disabled:s.id===t.currentUserId}},[e("a-icon",{staticStyle:{color:"#ff4d4f"},attrs:{type:"delete"}})],1)],1)],1)],1)]}}])})],1)],1),e("a-tab-pane",{key:"strategies",attrs:{tab:t.$t("systemOverview.tabTitle")||"System Overview"}},[t.strategySummary?e("div",{staticClass:"summary-cards"},[e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #667eea, #764ba2)"}},[e("a-icon",{attrs:{type:"fund"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.strategySummary.total_strategies||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("systemOverview.totalStrategies")||"Total Strategies"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #11998e, #38ef7d)"}},[e("a-icon",{attrs:{type:"play-circle"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.strategySummary.running_strategies||0))]),e("div",{staticClass:"summary-sub"},[t._v(" "+t._s(t.$t("systemOverview.live")||"实盘")+": "+t._s(t.strategySummary.running_live_strategies||0)+" / "+t._s(t.$t("systemOverview.signal")||"仅通知")+": "+t._s(t.strategySummary.running_signal_strategies||0)+" ")]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("systemOverview.runningStrategies")||"Running"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #f093fb, #f5576c)"}},[e("a-icon",{attrs:{type:"dollar"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.formatNumber(t.strategySummary.total_capital)))]),e("div",{staticClass:"summary-sub"},[t._v(" "+t._s(t.$t("systemOverview.live")||"实盘")+": "+t._s(t.formatNumber(t.strategySummary.live_capital))+" / "+t._s(t.$t("systemOverview.signal")||"仅通知")+": "+t._s(t.formatNumber(t.strategySummary.signal_capital))+" ")]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("systemOverview.totalCapital")||"Total Capital"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",style:{background:(t.strategySummary.total_pnl||0)>=0?"linear-gradient(135deg, #11998e, #38ef7d)":"linear-gradient(135deg, #ff416c, #ff4b2b)"}},[e("a-icon",{attrs:{type:"rise"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value",class:(t.strategySummary.total_pnl||0)>=0?"text-profit":"text-loss"},[t._v(" "+t._s(t.formatPnl(t.strategySummary.total_pnl))+" "),e("span",{staticClass:"roi-badge"},[t._v(t._s(t.strategySummary.total_roi||0)+"%")])]),e("div",{staticClass:"summary-sub"},[t._v(" "+t._s(t.$t("systemOverview.live")||"实盘")+": "+t._s(t.formatPnl(t.strategySummary.live_pnl))+" / "+t._s(t.$t("systemOverview.signal")||"仅通知")+": "+t._s(t.formatPnl(t.strategySummary.signal_pnl))+" ")]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("systemOverview.totalPnl")||"Total PnL"))])])])]):t._e(),e("div",{staticClass:"toolbar"},[e("div",{staticClass:"toolbar-left"},[e("a-button",{on:{click:t.loadSystemStrategies}},[e("a-icon",{attrs:{type:"reload"}}),t._v(" "+t._s(t.$t("common.refresh")||"Refresh")+" ")],1),e("a-select",{staticClass:"toolbar-select",on:{change:t.handleStrategyFilterChange},model:{value:t.strategyStatusFilter,callback:function(e){t.strategyStatusFilter=e},expression:"strategyStatusFilter"}},[e("a-select-option",{attrs:{value:"all"}},[t._v(t._s(t.$t("systemOverview.filterAll")||"All Status"))]),e("a-select-option",{attrs:{value:"running"}},[t._v(t._s(t.$t("systemOverview.filterRunning")||"Running"))]),e("a-select-option",{attrs:{value:"stopped"}},[t._v(t._s(t.$t("systemOverview.filterStopped")||"Stopped"))])],1),e("a-select",{staticClass:"toolbar-select",on:{change:t.handleStrategyExecutionFilterChange},model:{value:t.strategyExecutionFilter,callback:function(e){t.strategyExecutionFilter=e},expression:"strategyExecutionFilter"}},[e("a-select-option",{attrs:{value:"all"}},[t._v(t._s(t.$t("systemOverview.filterExecAll")||"All modes"))]),e("a-select-option",{attrs:{value:"live"}},[t._v(t._s(t.$t("systemOverview.live")||"Live"))]),e("a-select-option",{attrs:{value:"signal"}},[t._v(t._s(t.$t("systemOverview.signal")||"Signal"))])],1)],1),e("div",{staticClass:"toolbar-right"},[e("a-input-search",{staticClass:"toolbar-search",attrs:{placeholder:t.$t("systemOverview.searchPlaceholder")||"Search strategy/symbol/user",allowClear:""},on:{search:t.handleStrategySearch,pressEnter:t.handleStrategySearch},model:{value:t.strategySearchKeyword,callback:function(e){t.strategySearchKeyword=e},expression:"strategySearchKeyword"}})],1)]),e("a-card",{staticClass:"user-table-card",attrs:{bordered:!1}},[e("a-table",{attrs:{columns:t.strategyColumns,dataSource:t.systemStrategies,loading:t.strategyLoading,pagination:t.strategyPagination,rowKey:function(t){return t.id},scroll:{x:1920}},on:{change:t.handleStrategyTableChange},scopedSlots:t._u([{key:"strategyStatus",fn:function(a){return[e("span",{staticClass:"status-cell"},[e("span",{staticClass:"status-dot",class:"running"===a?"dot-running":"dot-stopped"}),e("span",{class:"running"===a?"status-running":"status-stopped"},[t._v(" "+t._s("running"===a?t.$t("systemOverview.running")||"Running":t.$t("systemOverview.stopped")||"Stopped")+" ")])])]}},{key:"userInfo",fn:function(a,s){return[e("a-tooltip",{attrs:{title:s.nickname||s.username||"-"}},[e("span",{staticClass:"user-cell"},[e("a-avatar",{style:{backgroundColor:t.getUserColor(s.user_id),fontSize:"11px",marginRight:"6px"},attrs:{size:"small"}},[t._v(" "+t._s((s.nickname||s.username||"?").charAt(0).toUpperCase())+" ")]),e("span",{staticClass:"user-name"},[t._v(t._s(t.truncate(s.nickname||s.username||"-",8)))])],1)])]}},{key:"symbolInfo",fn:function(a,s){return[e("div",[e("span",{staticClass:"symbol-text"},[t._v(t._s(s.symbol||"-"))]),"cross_sectional"===s.cs_strategy_type?e("a-tag",{staticStyle:{"margin-left":"4px"},attrs:{color:"purple",size:"small"}},[t._v("CS")]):t._e()],1),"cross_sectional"===s.cs_strategy_type&&s.symbol_list&&s.symbol_list.length?e("div",{staticClass:"symbol-count text-muted"},[t._v(" "+t._s(s.symbol_list.length)+" "+t._s(t.$t("systemOverview.symbols")||"symbols")+" ")]):t._e()]}},{key:"capitalInfo",fn:function(a){return[e("span",[t._v(t._s(t.formatNumber(a)))])]}},{key:"executionModeInfo",fn:function(a){return["live"===a?e("a-tag",{attrs:{color:"green",size:"small"}},[t._v(t._s(t.$t("systemOverview.live")||"Live"))]):"signal"===a?e("a-tag",{attrs:{color:"blue",size:"small"}},[t._v(t._s(t.$t("systemOverview.signal")||"Signal"))]):e("a-tag",{attrs:{size:"small"}},[t._v(t._s(a||"—"))])]}},{key:"equityInfo",fn:function(a,s){return["live"===s.execution_mode?e("span",[t._v(t._s(t.formatNumber(a||0)))]):e("span",{staticClass:"text-muted"},[t._v("—")])]}},{key:"pnlInfo",fn:function(a,s){return[e("div",{class:s.total_pnl>=0?"text-profit":"text-loss"},[e("span",{staticClass:"pnl-value"},[t._v(t._s(t.formatPnl(s.total_pnl)))]),e("span",{staticClass:"roi-text"},[t._v("("+t._s(s.roi>=0?"+":"")+t._s(s.roi)+"%)")])]),e("div",{staticClass:"pnl-detail text-muted"},[e("span",[t._v(t._s(t.$t("systemOverview.realized")||"Real")+": "+t._s(t.formatPnl(s.total_realized_pnl)))]),e("span",{staticStyle:{"margin-left":"8px"}},[t._v(t._s(t.$t("systemOverview.unrealized")||"Unreal")+": "+t._s(t.formatPnl(s.total_unrealized_pnl)))])])]}},{key:"positionInfo",fn:function(t,a){return[e("a-badge",{attrs:{count:a.position_count,numberStyle:{backgroundColor:a.position_count>0?"#52c41a":"#d9d9d9"}}})]}},{key:"tradeInfo",fn:function(a){return[e("span",[t._v(t._s(a||0))])]}},{key:"indicatorInfo",fn:function(a){return[a?e("a-tooltip",{attrs:{title:a}},[e("span",{staticClass:"indicator-name"},[t._v(t._s(t.truncate(a,16)))])]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"exchangeInfo",fn:function(a){return[a?e("span",{staticClass:"exchange-name"},[t._v(t._s(a))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"timeframeInfo",fn:function(a){return[a?e("a-tag",{attrs:{size:"small"}},[t._v(t._s(a))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"leverageInfo",fn:function(a){return[a>1?e("span",{staticStyle:{color:"#fa8c16","font-weight":"600"}},[t._v(t._s(a)+"x")]):e("span",[t._v(t._s(a||1)+"x")])]}},{key:"createdAtInfo",fn:function(a){return[a?e("span",[t._v(t._s(t.formatTime(a)))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"updatedAtInfo",fn:function(a){return[a?e("span",[t._v(t._s(t.formatTime(a)))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}}])})],1)],1),e("a-tab-pane",{key:"orders",attrs:{tab:t.$t("adminOrders.tabTitle")||"Order List"}},[t.orderSummary?e("div",{staticClass:"summary-cards"},[e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #667eea, #764ba2)"}},[e("a-icon",{attrs:{type:"file-text"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.orderSummary.total_orders||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminOrders.totalOrders")||"Total Orders"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #11998e, #38ef7d)"}},[e("a-icon",{attrs:{type:"check-circle"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.orderSummary.paid_orders||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminOrders.paidOrders")||"Paid"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #f093fb, #f5576c)"}},[e("a-icon",{attrs:{type:"clock-circle"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.orderSummary.pending_orders||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminOrders.pendingOrders")||"Pending"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #fa709a, #fee140)"}},[e("a-icon",{attrs:{type:"dollar"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.formatNumber(t.orderSummary.total_revenue))+" "),e("span",{staticStyle:{"font-size":"13px",color:"#999"}},[t._v("USDT")])]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminOrders.totalRevenue")||"Total Revenue"))])])])]):t._e(),e("div",{staticClass:"toolbar"},[e("div",{staticClass:"toolbar-left"},[e("a-button",{on:{click:t.loadOrders}},[e("a-icon",{attrs:{type:"reload"}}),t._v(" "+t._s(t.$t("common.refresh")||"Refresh")+" ")],1),e("a-select",{staticClass:"toolbar-select",on:{change:t.handleOrderFilterChange},model:{value:t.orderStatusFilter,callback:function(e){t.orderStatusFilter=e},expression:"orderStatusFilter"}},[e("a-select-option",{attrs:{value:"all"}},[t._v(t._s(t.$t("adminOrders.filterAll")||"All Status"))]),e("a-select-option",{attrs:{value:"pending"}},[t._v(t._s(t.$t("adminOrders.filterPending")||"Pending"))]),e("a-select-option",{attrs:{value:"paid"}},[t._v(t._s(t.$t("adminOrders.filterPaid")||"Paid"))]),e("a-select-option",{attrs:{value:"confirmed"}},[t._v(t._s(t.$t("adminOrders.filterConfirmed")||"Confirmed"))]),e("a-select-option",{attrs:{value:"expired"}},[t._v(t._s(t.$t("adminOrders.filterExpired")||"Expired"))])],1)],1),e("div",{staticClass:"toolbar-right"},[e("a-input-search",{staticClass:"toolbar-search",attrs:{placeholder:t.$t("adminOrders.searchPlaceholder")||"Search by username/email",allowClear:""},on:{search:t.handleOrderSearch,pressEnter:t.handleOrderSearch},model:{value:t.orderSearchKeyword,callback:function(e){t.orderSearchKeyword=e},expression:"orderSearchKeyword"}})],1)]),e("a-card",{staticClass:"user-table-card",attrs:{bordered:!1}},[e("a-table",{attrs:{columns:t.orderColumns,dataSource:t.orders,loading:t.orderLoading,pagination:t.orderPagination,rowKey:function(t){return t.order_type+"-"+t.id},scroll:{x:1400}},on:{change:t.handleOrderTableChange},scopedSlots:t._u([{key:"orderUserInfo",fn:function(a,s){return[e("a-tooltip",{attrs:{title:(s.nickname||s.username||"-")+" ("+(s.user_email||"")+")"}},[e("span",{staticClass:"user-cell"},[e("a-avatar",{style:{backgroundColor:t.getUserColor(s.user_id),fontSize:"11px",marginRight:"6px"},attrs:{size:"small"}},[t._v(" "+t._s((s.nickname||s.username||"?").charAt(0).toUpperCase())+" ")]),e("span",{staticClass:"user-name"},[t._v(t._s(t.truncate(s.nickname||s.username||"-",10)))])],1)])]}},{key:"orderTypeInfo",fn:function(a){return[e("a-tag",{attrs:{color:"usdt"===a?"green":"blue"}},[t._v(" "+t._s("usdt"===a?"USDT":"Mock")+" ")])]}},{key:"planInfo",fn:function(a){return[e("a-tag",{attrs:{color:"lifetime"===a?"gold":"yearly"===a?"purple":"cyan"}},[t._v(" "+t._s("lifetime"===a?t.$t("adminOrders.lifetime")||"Lifetime":"yearly"===a?t.$t("adminOrders.yearly")||"Yearly":t.$t("adminOrders.monthly")||"Monthly")+" ")])]}},{key:"amountInfo",fn:function(a,s){return[e("span",{staticStyle:{"font-weight":"600"}},[t._v(t._s(a))]),e("span",{staticClass:"text-muted",staticStyle:{"margin-left":"4px"}},[t._v(t._s(s.currency))])]}},{key:"orderStatusInfo",fn:function(a){return[e("a-tag",{attrs:{color:t.getOrderStatusColor(a)}},[t._v(t._s(t.getOrderStatusLabel(a)))])]}},{key:"chainInfo",fn:function(a){return[a?e("span",[t._v(t._s(a))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"addressInfo",fn:function(a){return[a?e("a-tooltip",{attrs:{title:a}},[e("span",{staticClass:"address-text"},[t._v(t._s(t.truncate(a,12)))])]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"txHashInfo",fn:function(a){return[a?e("a-tooltip",{attrs:{title:a}},[e("span",{staticClass:"hash-text"},[t._v(t._s(t.truncate(a,14)))])]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"orderCreatedAt",fn:function(a){return[a?e("span",[t._v(t._s(t.formatTime(a)))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}}])})],1)],1),e("a-tab-pane",{key:"aiStats",attrs:{tab:t.$t("adminAiStats.tabTitle")||"AI Analysis"}},[t.aiStatsSummary?e("div",{staticClass:"summary-cards"},[e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #667eea, #764ba2)"}},[e("a-icon",{attrs:{type:"thunderbolt"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.aiStatsSummary.total_analyses||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminAiStats.totalAnalyses")||"Total Analyses"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #11998e, #38ef7d)"}},[e("a-icon",{attrs:{type:"team"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.aiStatsSummary.unique_users||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminAiStats.activeUsers")||"Active Users"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #f093fb, #f5576c)"}},[e("a-icon",{attrs:{type:"stock"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.aiStatsSummary.unique_symbols||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminAiStats.uniqueSymbols")||"Symbols Analyzed"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #fa709a, #fee140)"}},[e("a-icon",{attrs:{type:"like"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(" "+t._s(t.aiStatsSummary.correct_count||0)+" "),e("span",{staticStyle:{"font-size":"13px",color:"#999"}},[t._v("/ "+t._s(t.aiStatsSummary.total_memory||0))])]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminAiStats.accuracy")||"Correct / Verified"))])])])]):t._e(),e("div",{staticClass:"toolbar"},[e("div",{staticClass:"toolbar-left"},[e("a-button",{on:{click:t.loadAiStats}},[e("a-icon",{attrs:{type:"reload"}}),t._v(" "+t._s(t.$t("common.refresh")||"Refresh")+" ")],1)],1),e("div",{staticClass:"toolbar-right"},[e("a-input-search",{staticClass:"toolbar-search",attrs:{placeholder:t.$t("adminAiStats.searchPlaceholder")||"Search by username",allowClear:""},on:{search:t.handleAiStatsSearch,pressEnter:t.handleAiStatsSearch},model:{value:t.aiStatsSearchKeyword,callback:function(e){t.aiStatsSearchKeyword=e},expression:"aiStatsSearchKeyword"}})],1)]),e("a-card",{staticClass:"user-table-card",staticStyle:{"margin-bottom":"20px"},attrs:{bordered:!1}},[e("h4",{staticClass:"section-card-title"},[e("a-icon",{staticClass:"section-card-title-icon",attrs:{type:"bar-chart"}}),t._v(" "+t._s(t.$t("adminAiStats.userStatsTitle")||"Per-User Statistics")+" ")],1),e("a-table",{attrs:{columns:t.aiUserColumns,dataSource:t.aiUserStats,loading:t.aiStatsLoading,pagination:t.aiStatsPagination,rowKey:function(t){return t.user_id},scroll:{x:960}},on:{change:t.handleAiStatsTableChange},scopedSlots:t._u([{key:"aiUserInfo",fn:function(a,s){return[e("a-tooltip",{attrs:{title:(s.nickname||s.username||"-")+" ("+(s.email||"")+")"}},[e("span",{staticClass:"user-cell"},[e("a-avatar",{style:{backgroundColor:t.getUserColor(s.user_id),fontSize:"11px",marginRight:"6px"},attrs:{size:"small"}},[t._v(" "+t._s((s.nickname||s.username||"?").charAt(0).toUpperCase())+" ")]),e("span",{staticClass:"user-name"},[t._v(t._s(t.truncate(s.nickname||s.username||"-",10)))])],1)])]}},{key:"analysisCountInfo",fn:function(a){return[e("span",{staticStyle:{"font-weight":"600",color:"#1890ff"}},[t._v(t._s(a||0))])]}},{key:"accuracyInfo",fn:function(a,s){return[e("span",{staticClass:"text-profit"},[t._v(t._s(s.correct||0))]),e("span",{staticClass:"text-muted"},[t._v(" / ")]),e("span",{staticClass:"text-loss"},[t._v(t._s(s.incorrect||0))])]}},{key:"feedbackInfo",fn:function(a,s){return[e("a-tooltip",{attrs:{title:(t.$t("adminAiStats.helpful")||"Helpful")+" / "+(t.$t("adminAiStats.notHelpful")||"Not Helpful")}},[e("span",{staticStyle:{color:"#52c41a"}},[e("a-icon",{attrs:{type:"like"}}),t._v(" "+t._s(s.helpful||0))],1),e("span",{staticClass:"text-muted"},[t._v(" / ")]),e("span",{staticStyle:{color:"#ff4d4f"}},[e("a-icon",{attrs:{type:"dislike"}}),t._v(" "+t._s(s.not_helpful||0))],1)])]}},{key:"lastAnalysisAt",fn:function(a){return[a?e("span",[t._v(t._s(t.formatTime(a)))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}}])})],1),e("a-card",{staticClass:"user-table-card",attrs:{bordered:!1}},[e("h4",{staticClass:"section-card-title"},[e("a-icon",{staticClass:"section-card-title-icon",attrs:{type:"history"}}),t._v(" "+t._s(t.$t("adminAiStats.recentTitle")||"Recent Analysis Records")+" ")],1),e("a-table",{attrs:{columns:t.aiRecentColumns,dataSource:t.aiRecentRecords,loading:t.aiStatsLoading,pagination:!1,rowKey:function(t){return t.id},scroll:{x:900},size:"small"},scopedSlots:t._u([{key:"recentUserInfo",fn:function(a,s){return[e("span",{staticClass:"user-cell"},[e("a-avatar",{style:{backgroundColor:t.getUserColor(s.user_id),fontSize:"11px",marginRight:"6px"},attrs:{size:"small"}},[t._v(" "+t._s((s.nickname||s.username||"?").charAt(0).toUpperCase())+" ")]),e("span",{staticClass:"user-name"},[t._v(t._s(t.truncate(s.nickname||s.username||"-",8)))])],1)]}},{key:"recentStatusInfo",fn:function(a){return[e("a-tag",{attrs:{color:"completed"===a?"green":"failed"===a?"red":"blue"}},[t._v(" "+t._s(a)+" ")])]}},{key:"recentCreatedAt",fn:function(a){return[a?e("span",[t._v(t._s(t.formatTime(a)))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}}])})],1)],1)],1),e("a-modal",{attrs:{"wrap-class-name":"user-manage-modal",title:t.isEdit?t.$t("userManage.editUser")||"Edit User":t.$t("userManage.createUser")||"Create User",confirmLoading:t.modalLoading},on:{ok:t.handleModalOk,cancel:t.handleModalCancel},model:{value:t.modalVisible,callback:function(e){t.modalVisible=e},expression:"modalVisible"}},[e("a-form",{attrs:{form:t.form,layout:"vertical"}},[e("a-form-item",{attrs:{label:t.$t("userManage.username")||"Username"}},[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["username",{rules:[{required:!t.isEdit,message:t.$t("userManage.usernameRequired")||"Please enter username"}]}],expression:"['username', {\n rules: [{ required: !isEdit, message: $t('userManage.usernameRequired') || 'Please enter username' }]\n }]"}],attrs:{disabled:t.isEdit,placeholder:t.$t("userManage.usernamePlaceholder")||"Enter username"}},[e("a-icon",{attrs:{slot:"prefix",type:"user"},slot:"prefix"})],1)],1),t.isEdit?t._e():e("a-form-item",{attrs:{label:t.$t("userManage.password")||"Password"}},[e("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["password",{rules:[{required:!0,message:t.$t("userManage.passwordRequired")||"Please enter password"},{min:6,message:t.$t("userManage.passwordMin")||"Password must be at least 6 characters"}]}],expression:"['password', {\n rules: [\n { required: true, message: $t('userManage.passwordRequired') || 'Please enter password' },\n { min: 6, message: $t('userManage.passwordMin') || 'Password must be at least 6 characters' }\n ]\n }]"}],attrs:{placeholder:t.$t("userManage.passwordPlaceholder")||"Enter password (min 6 characters)"}},[e("a-icon",{attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),e("a-form-item",{attrs:{label:t.$t("userManage.nickname")||"Nickname"}},[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["nickname"],expression:"['nickname']"}],attrs:{placeholder:t.$t("userManage.nicknamePlaceholder")||"Enter nickname"}},[e("a-icon",{attrs:{slot:"prefix",type:"smile"},slot:"prefix"})],1)],1),e("a-form-item",{attrs:{label:t.$t("userManage.email")||"Email"}},[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["email",{rules:[{type:"email",message:t.$t("userManage.emailInvalid")||"Invalid email format"}]}],expression:"['email', {\n rules: [{ type: 'email', message: $t('userManage.emailInvalid') || 'Invalid email format' }]\n }]"}],attrs:{placeholder:t.$t("userManage.emailPlaceholder")||"Enter email"}},[e("a-icon",{attrs:{slot:"prefix",type:"mail"},slot:"prefix"})],1)],1),e("a-form-item",{attrs:{label:t.$t("userManage.role")||"Role"}},[e("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["role",{initialValue:"user"}],expression:"['role', { initialValue: 'user' }]"}],attrs:{placeholder:t.$t("userManage.rolePlaceholder")||"Select role"}},t._l(t.roles,function(a){return e("a-select-option",{key:a.id,attrs:{value:a.id}},[t._v(" "+t._s(t.getRoleLabel(a.id))+" ")])}),1)],1),t.isEdit?e("a-form-item",{attrs:{label:t.$t("userManage.status")||"Status"}},[e("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:"active"}],expression:"['status', { initialValue: 'active' }]"}],attrs:{placeholder:t.$t("userManage.statusPlaceholder")||"Select status"}},[e("a-select-option",{attrs:{value:"active"}},[t._v(t._s(t.$t("userManage.active")||"Active"))]),e("a-select-option",{attrs:{value:"disabled"}},[t._v(t._s(t.$t("userManage.disabled")||"Disabled"))])],1)],1):t._e()],1)],1),e("a-modal",{attrs:{"wrap-class-name":"user-manage-modal",title:t.$t("userManage.resetPassword")||"Reset Password",confirmLoading:t.resetPasswordLoading},on:{ok:t.handleResetPassword},model:{value:t.resetPasswordVisible,callback:function(e){t.resetPasswordVisible=e},expression:"resetPasswordVisible"}},[e("a-form",{attrs:{form:t.resetPasswordForm,layout:"vertical"}},[e("a-alert",{staticStyle:{"margin-bottom":"16px"},attrs:{message:t.$t("userManage.resetPasswordWarning")||"This will reset the user's password",type:"warning",showIcon:""}}),e("a-form-item",{attrs:{label:t.$t("userManage.newPassword")||"New Password"}},[e("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["new_password",{rules:[{required:!0,message:t.$t("userManage.passwordRequired")||"Please enter new password"},{min:6,message:t.$t("userManage.passwordMin")||"Password must be at least 6 characters"}]}],expression:"['new_password', {\n rules: [\n { required: true, message: $t('userManage.passwordRequired') || 'Please enter new password' },\n { min: 6, message: $t('userManage.passwordMin') || 'Password must be at least 6 characters' }\n ]\n }]"}],attrs:{placeholder:t.$t("userManage.newPasswordPlaceholder")||"Enter new password"}},[e("a-icon",{attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1)],1)],1),e("a-modal",{attrs:{"wrap-class-name":"user-manage-modal",title:(t.$t("userManage.adjustCredits")||"Adjust Credits")+(t.creditsEditingUser?" - ".concat(t.creditsEditingUser.username):""),confirmLoading:t.creditsLoading},on:{ok:t.handleSetCredits},model:{value:t.creditsModalVisible,callback:function(e){t.creditsModalVisible=e},expression:"creditsModalVisible"}},[e("a-form",{attrs:{layout:"vertical"}},[t.creditsEditingUser?e("div",{staticClass:"current-credits-info"},[e("span",{staticClass:"label"},[t._v(t._s(t.$t("userManage.currentCredits")||"Current Credits")+":")]),e("span",{staticClass:"value"},[t._v(t._s(t.formatCredits(t.creditsEditingUser.credits)))])]):t._e(),e("a-form-item",{attrs:{label:t.$t("userManage.newCredits")||"New Credits"}},[e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,precision:2,placeholder:t.$t("userManage.enterCredits")||"Enter new credits amount"},model:{value:t.newCredits,callback:function(e){t.newCredits=e},expression:"newCredits"}})],1),e("a-form-item",{attrs:{label:t.$t("userManage.remark")||"Remark"}},[e("a-input",{attrs:{placeholder:t.$t("userManage.remarkPlaceholder")||"Optional remark"},model:{value:t.creditsRemark,callback:function(e){t.creditsRemark=e},expression:"creditsRemark"}})],1)],1)],1),e("a-modal",{attrs:{"wrap-class-name":"user-manage-modal",title:(t.$t("userManage.setVip")||"Set VIP")+(t.vipEditingUser?" - ".concat(t.vipEditingUser.username):""),confirmLoading:t.vipLoading},on:{ok:t.handleSetVip},model:{value:t.vipModalVisible,callback:function(e){t.vipModalVisible=e},expression:"vipModalVisible"}},[e("a-form",{attrs:{layout:"vertical"}},[t.vipEditingUser&&t.vipEditingUser.vip_expires_at?e("div",{staticClass:"current-vip-info"},[e("span",{staticClass:"label"},[t._v(t._s(t.$t("userManage.currentVip")||"Current VIP")+":")]),e("span",{staticClass:"value",class:t.isVipActive(t.vipEditingUser.vip_expires_at)?"active":"expired"},[t._v(" "+t._s(t.isVipActive(t.vipEditingUser.vip_expires_at)?(t.$t("userManage.vipActive")||"Active")+" (".concat(t.formatDate(t.vipEditingUser.vip_expires_at),")"):t.$t("userManage.vipExpired")||"Expired")+" ")])]):t._e(),e("a-form-item",{attrs:{label:t.$t("userManage.vipDays")||"VIP Days"}},[e("a-select",{staticStyle:{width:"100%"},model:{value:t.vipDays,callback:function(e){t.vipDays=e},expression:"vipDays"}},[e("a-select-option",{attrs:{value:0}},[t._v(t._s(t.$t("userManage.cancelVip")||"Cancel VIP"))]),e("a-select-option",{attrs:{value:7}},[t._v("7 "+t._s(t.$t("userManage.days")||"days"))]),e("a-select-option",{attrs:{value:30}},[t._v("30 "+t._s(t.$t("userManage.days")||"days"))]),e("a-select-option",{attrs:{value:90}},[t._v("90 "+t._s(t.$t("userManage.days")||"days"))]),e("a-select-option",{attrs:{value:180}},[t._v("180 "+t._s(t.$t("userManage.days")||"days"))]),e("a-select-option",{attrs:{value:365}},[t._v("365 "+t._s(t.$t("userManage.days")||"days"))]),e("a-select-option",{attrs:{value:-1}},[t._v(t._s(t.$t("userManage.customDate")||"Custom Date"))])],1)],1),-1===t.vipDays?e("a-form-item",{attrs:{label:t.$t("userManage.vipExpiresAt")||"VIP Expires At"}},[e("a-date-picker",{staticStyle:{width:"100%"},attrs:{showTime:"",format:"YYYY-MM-DD HH:mm:ss"},model:{value:t.vipCustomDate,callback:function(e){t.vipCustomDate=e},expression:"vipCustomDate"}})],1):t._e(),e("a-form-item",{attrs:{label:t.$t("userManage.remark")||"Remark"}},[e("a-input",{attrs:{placeholder:t.$t("userManage.remarkPlaceholder")||"Optional remark"},model:{value:t.vipRemark,callback:function(e){t.vipRemark=e},expression:"vipRemark"}})],1)],1)],1)],1)},r=[],i=a(81127),n=a(56252),o=a(76338),l=(a(2892),a(79432),a(84841)),d=a(55434),c=a(95353),u={name:"UserManage",mixins:[d.t],data:function(){return{activeTab:"users",loading:!1,users:[],roles:[],searchKeyword:"",pagination:{current:1,pageSize:10,total:0},modalVisible:!1,modalLoading:!1,isEdit:!1,editingUser:null,resetPasswordVisible:!1,resetPasswordLoading:!1,resetPasswordUserId:null,creditsModalVisible:!1,creditsLoading:!1,creditsEditingUser:null,newCredits:0,creditsRemark:"",vipModalVisible:!1,vipLoading:!1,vipEditingUser:null,vipDays:30,vipCustomDate:null,vipRemark:"",strategyLoading:!1,systemStrategies:[],strategySummary:null,strategyStatusFilter:"all",strategyExecutionFilter:"all",strategySortBy:"",strategySortOrder:"desc",strategySearchKeyword:"",strategyPagination:{current:1,pageSize:20,total:0},strategiesLoaded:!1,orderLoading:!1,orders:[],orderSummary:null,orderStatusFilter:"all",orderSearchKeyword:"",orderPagination:{current:1,pageSize:20,total:0},ordersLoaded:!1,aiStatsLoading:!1,aiUserStats:[],aiRecentRecords:[],aiStatsSummary:null,aiStatsSearchKeyword:"",aiStatsPagination:{current:1,pageSize:20,total:0},aiStatsLoaded:!1}},computed:(0,o.A)((0,o.A)({},(0,c.L8)(["userInfo"])),{},{isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},currentUserId:function(){var t;return null===(t=this.userInfo)||void 0===t?void 0:t.id},columns:function(){return[{title:"ID",dataIndex:"id",width:60},{title:this.$t("userManage.username")||"Username",dataIndex:"username",width:120},{title:this.$t("userManage.nickname")||"Nickname",dataIndex:"nickname",width:100},{title:this.$t("userManage.email")||"Email",dataIndex:"email",width:180},{title:this.$t("userManage.role")||"Role",dataIndex:"role",width:90,scopedSlots:{customRender:"role"}},{title:this.$t("userManage.credits")||"Credits",dataIndex:"credits",width:100,scopedSlots:{customRender:"credits"}},{title:"VIP",dataIndex:"vip_expires_at",width:120,scopedSlots:{customRender:"vip_expires_at"}},{title:this.$t("userManage.status")||"Status",dataIndex:"status",width:90,scopedSlots:{customRender:"status"}},{title:this.$t("userManage.lastLogin")||"Last Login",dataIndex:"last_login_at",width:150,scopedSlots:{customRender:"last_login_at"}},{title:this.$t("common.actions")||"Actions",dataIndex:"action",width:180,scopedSlots:{customRender:"action"}}]},strategyColumns:function(){var t=this,e=function(e){return t.strategySortBy===e&&("asc"===t.strategySortOrder?"ascend":"descend")};return[{title:"ID",dataIndex:"id",key:"id",width:72,fixed:"left",sorter:!0,sortOrder:e("id")},{title:this.$t("systemOverview.colUser")||"User",dataIndex:"username",key:"username",width:118,fixed:"left",scopedSlots:{customRender:"userInfo"}},{title:this.$t("systemOverview.colStrategy")||"Strategy",dataIndex:"strategy_name",key:"strategy_name",width:160,ellipsis:!0,sorter:!0,sortOrder:e("strategy_name")},{title:this.$t("systemOverview.colStatus")||"Status",dataIndex:"status",key:"status",width:108,scopedSlots:{customRender:"strategyStatus"},sorter:!0,sortOrder:e("status")},{title:this.$t("systemOverview.colExecutionMode")||"Mode",dataIndex:"execution_mode",key:"execution_mode",width:96,align:"center",scopedSlots:{customRender:"executionModeInfo"},sorter:!0,sortOrder:e("execution_mode")},{title:this.$t("systemOverview.colSymbol")||"Symbol",dataIndex:"symbol",key:"symbol",width:140,scopedSlots:{customRender:"symbolInfo"},sorter:!0,sortOrder:e("symbol")},{title:this.$t("systemOverview.colCapital")||"Capital",dataIndex:"initial_capital",key:"initial_capital",width:110,scopedSlots:{customRender:"capitalInfo"},sorter:!0,sortOrder:e("initial_capital")},{title:this.$t("systemOverview.colPositionEquity")||"Pos. equity",dataIndex:"total_equity",key:"total_equity",width:120,align:"right",scopedSlots:{customRender:"equityInfo"},sorter:!0,sortOrder:e("total_equity")},{title:this.$t("systemOverview.colPnl")||"PnL / ROI",dataIndex:"total_pnl",key:"total_pnl",width:200,scopedSlots:{customRender:"pnlInfo"},sorter:!0,sortOrder:e("total_pnl")},{title:this.$t("systemOverview.colPositions")||"Pos",dataIndex:"position_count",key:"position_count",width:76,align:"center",scopedSlots:{customRender:"positionInfo"},sorter:!0,sortOrder:e("position_count")},{title:this.$t("systemOverview.colTrades")||"Trades",dataIndex:"trade_count",key:"trade_count",width:88,align:"center",scopedSlots:{customRender:"tradeInfo"},sorter:!0,sortOrder:e("trade_count")},{title:this.$t("systemOverview.colIndicator")||"Indicator",dataIndex:"indicator_name",key:"indicator_name",width:130,scopedSlots:{customRender:"indicatorInfo"}},{title:this.$t("systemOverview.colExchange")||"Exchange",dataIndex:"exchange_name",key:"exchange_name",width:100,scopedSlots:{customRender:"exchangeInfo"}},{title:this.$t("systemOverview.colTimeframe")||"TF",dataIndex:"timeframe",key:"timeframe",width:70,align:"center",scopedSlots:{customRender:"timeframeInfo"}},{title:this.$t("systemOverview.colLeverage")||"Lev",dataIndex:"leverage",key:"leverage",width:70,align:"center",scopedSlots:{customRender:"leverageInfo"},sorter:!0,sortOrder:e("leverage")},{title:this.$t("systemOverview.colCreatedAt")||"Created",dataIndex:"created_at",key:"created_at",width:150,scopedSlots:{customRender:"createdAtInfo"},sorter:!0,sortOrder:e("created_at")},{title:this.$t("systemOverview.colUpdatedAt")||"Updated",dataIndex:"updated_at",key:"updated_at",width:150,scopedSlots:{customRender:"updatedAtInfo"},sorter:!0,sortOrder:e("updated_at")}]},orderColumns:function(){return[{title:this.$t("adminOrders.colUser")||"User",dataIndex:"username",width:120,scopedSlots:{customRender:"orderUserInfo"}},{title:this.$t("adminOrders.colType")||"Type",dataIndex:"order_type",width:80,scopedSlots:{customRender:"orderTypeInfo"}},{title:this.$t("adminOrders.colPlan")||"Plan",dataIndex:"plan",width:100,scopedSlots:{customRender:"planInfo"}},{title:this.$t("adminOrders.colAmount")||"Amount",dataIndex:"amount",width:120,scopedSlots:{customRender:"amountInfo"}},{title:this.$t("adminOrders.colStatus")||"Status",dataIndex:"status",width:100,scopedSlots:{customRender:"orderStatusInfo"}},{title:this.$t("adminOrders.colChain")||"Chain",dataIndex:"chain",width:80,scopedSlots:{customRender:"chainInfo"}},{title:this.$t("adminOrders.colAddress")||"Address",dataIndex:"address",width:140,scopedSlots:{customRender:"addressInfo"}},{title:this.$t("adminOrders.colTxHash")||"Tx Hash",dataIndex:"tx_hash",width:160,scopedSlots:{customRender:"txHashInfo"}},{title:this.$t("adminOrders.colCreatedAt")||"Created",dataIndex:"created_at",width:150,scopedSlots:{customRender:"orderCreatedAt"}}]},aiUserColumns:function(){return[{title:this.$t("adminAiStats.colUser")||"User",dataIndex:"username",width:140,scopedSlots:{customRender:"aiUserInfo"}},{title:this.$t("adminAiStats.colAnalysisCount")||"Analyses",dataIndex:"analysis_count",width:100,align:"center",scopedSlots:{customRender:"analysisCountInfo"},sorter:function(t,e){return t.analysis_count-e.analysis_count},defaultSortOrder:"descend"},{title:this.$t("adminAiStats.colSymbols")||"Symbols",dataIndex:"symbol_count",width:90,align:"center"},{title:this.$t("adminAiStats.colMarkets")||"Markets",dataIndex:"market_count",width:90,align:"center"},{title:this.$t("adminAiStats.colAccuracy")||"Correct / Wrong",dataIndex:"correct",width:130,align:"center",scopedSlots:{customRender:"accuracyInfo"}},{title:this.$t("adminAiStats.colFeedback")||"Feedback",dataIndex:"helpful",width:130,align:"center",scopedSlots:{customRender:"feedbackInfo"}},{title:this.$t("adminAiStats.colLastAnalysis")||"Last Analysis",dataIndex:"last_analysis_at",width:160,scopedSlots:{customRender:"lastAnalysisAt"}}]},aiRecentColumns:function(){return[{title:"ID",dataIndex:"id",width:60},{title:this.$t("adminAiStats.colUser")||"User",dataIndex:"username",width:120,scopedSlots:{customRender:"recentUserInfo"}},{title:this.$t("adminAiStats.colMarket")||"Market",dataIndex:"market",width:80},{title:this.$t("adminAiStats.colSymbol")||"Symbol",dataIndex:"symbol",width:120},{title:this.$t("adminAiStats.colModel")||"Model",dataIndex:"model",width:140,ellipsis:!0},{title:this.$t("adminAiStats.colStatus")||"Status",dataIndex:"status",width:100,scopedSlots:{customRender:"recentStatusInfo"}},{title:this.$t("adminAiStats.colCreatedAt")||"Time",dataIndex:"created_at",width:160,scopedSlots:{customRender:"recentCreatedAt"}}]}}),beforeCreate:function(){this.form=this.$form.createForm(this),this.resetPasswordForm=this.$form.createForm(this,{name:"resetPassword"})},mounted:function(){this.loadUsers(),this.loadRoles()},methods:{handleTabChange:function(t){"strategies"!==t||this.strategiesLoaded||this.loadSystemStrategies(),"orders"!==t||this.ordersLoaded||this.loadOrders(),"aiStats"!==t||this.aiStatsLoaded||this.loadAiStats()},loadSystemStrategies:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a,s;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.strategyLoading=!0,e.p=1,a={page:t.strategyPagination.current,page_size:t.strategyPagination.pageSize,status:"all"===t.strategyStatusFilter?"":t.strategyStatusFilter,execution_mode:"all"===t.strategyExecutionFilter?"":t.strategyExecutionFilter,search:t.strategySearchKeyword||""},t.strategySortBy&&(a.sort_by=t.strategySortBy,a.sort_order=t.strategySortOrder),e.n=2,(0,l.DK)(a);case 2:s=e.v,1===s.code?(t.systemStrategies=s.data.items||[],t.strategyPagination.total=s.data.total||0,t.strategySummary=s.data.summary||{},t.strategiesLoaded=!0):t.$message.error(s.msg||"Failed to load strategies"),e.n=4;break;case 3:e.p=3,e.v,t.$message.error("Failed to load system strategies");case 4:return e.p=4,t.strategyLoading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},handleStrategySearch:function(){this.strategyPagination.current=1,this.loadSystemStrategies()},handleStrategyFilterChange:function(){this.strategyPagination.current=1,this.loadSystemStrategies()},handleStrategyExecutionFilterChange:function(){this.strategyPagination.current=1,this.loadSystemStrategies()},handleStrategyTableChange:function(t,e,a){if(t&&(this.strategyPagination.current=t.current,this.strategyPagination.pageSize=t.pageSize),a&&Object.keys(a).length)if("ascend"===a.order||"descend"===a.order){var s=null!=a.columnKey?String(a.columnKey):String(a.field||"");this.strategySortBy=s,this.strategySortOrder="ascend"===a.order?"asc":"desc"}else this.strategySortBy="",this.strategySortOrder="desc";this.loadSystemStrategies()},getUserColor:function(t){var e=["#1890ff","#722ed1","#13c2c2","#fa8c16","#eb2f96","#52c41a","#2f54eb","#faad14"];return e[(t||0)%e.length]},formatNumber:function(t){return t||0===t?Number(t).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:2}):"0"},formatPnl:function(t){if(!t&&0!==t)return"0";var e=Number(t),a=e>=0?"+":"";return a+e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:4})},truncate:function(t,e){return t?t.length>e?t.substring(0,e)+"...":t:""},loadUsers:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.loading=!0,e.p=1,e.n=2,(0,l.aU)({page:t.pagination.current,page_size:t.pagination.pageSize,search:t.searchKeyword||""});case 2:a=e.v,1===a.code?(t.users=a.data.items||[],t.pagination.total=a.data.total||0):t.$message.error(a.msg||"Failed to load users"),e.n=4;break;case 3:e.p=3,e.v,t.$message.error("Failed to load users");case 4:return e.p=4,t.loading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},handleSearch:function(){this.pagination.current=1,this.loadUsers()},loadRoles:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,l.O0)();case 1:a=e.v,1===a.code&&(t.roles=a.data.roles||[]),e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}))()},handleTableChange:function(t){this.pagination.current=t.current,this.pagination.pageSize=t.pageSize,this.loadUsers()},showCreateModal:function(){var t=this;this.isEdit=!1,this.editingUser=null,this.modalVisible=!0,this.$nextTick(function(){t.form.resetFields()})},showEditModal:function(t){var e=this;this.isEdit=!0,this.editingUser=t,this.modalVisible=!0,this.$nextTick(function(){e.form.setFieldsValue({username:t.username,nickname:t.nickname,email:t.email,role:t.role,status:t.status})})},handleModalCancel:function(){this.modalVisible=!1,this.form.resetFields()},handleModalOk:function(){var t=this;this.form.validateFields(function(){var e=(0,n.A)((0,i.A)().m(function e(a,s){var r;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!a){e.n=1;break}return e.a(2);case 1:if(t.modalLoading=!0,e.p=2,!t.isEdit){e.n=4;break}return e.n=3,(0,l.TK)(t.editingUser.id,{nickname:s.nickname,email:s.email,role:s.role,status:s.status});case 3:r=e.v,e.n=6;break;case 4:return e.n=5,(0,l.kg)(s);case 5:r=e.v;case 6:1===r.code?(t.$message.success(r.msg||"Success"),t.modalVisible=!1,t.form.resetFields(),t.loadUsers()):t.$message.error(r.msg||"Operation failed"),e.n=8;break;case 7:e.p=7,e.v,t.$message.error("Operation failed");case 8:return e.p=8,t.modalLoading=!1,e.f(8);case 9:return e.a(2)}},e,null,[[2,7,8,9]])}));return function(t,a){return e.apply(this,arguments)}}())},handleDelete:function(t){var e=this;return(0,n.A)((0,i.A)().m(function a(){var s;return(0,i.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return a.p=0,a.n=1,(0,l.hG)(t);case 1:s=a.v,1===s.code?(e.$message.success(s.msg||"User deleted"),e.loadUsers()):e.$message.error(s.msg||"Delete failed"),a.n=3;break;case 2:a.p=2,a.v,e.$message.error("Delete failed");case 3:return a.a(2)}},a,null,[[0,2]])}))()},showResetPasswordModal:function(t){var e=this;this.resetPasswordUserId=t.id,this.resetPasswordVisible=!0,this.$nextTick(function(){e.resetPasswordForm.resetFields()})},handleResetPassword:function(){var t=this;this.resetPasswordForm.validateFields(function(){var e=(0,n.A)((0,i.A)().m(function e(a,s){var r;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!a){e.n=1;break}return e.a(2);case 1:return t.resetPasswordLoading=!0,e.p=2,e.n=3,(0,l.cw)({user_id:t.resetPasswordUserId,new_password:s.new_password});case 3:r=e.v,1===r.code?(t.$message.success(r.msg||"Password reset successfully"),t.resetPasswordVisible=!1,t.resetPasswordForm.resetFields()):t.$message.error(r.msg||"Reset failed"),e.n=5;break;case 4:e.p=4,e.v,t.$message.error("Reset failed");case 5:return e.p=5,t.resetPasswordLoading=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}));return function(t,a){return e.apply(this,arguments)}}())},getRoleColor:function(t){var e={admin:"red",manager:"orange",user:"blue",viewer:"default"};return e[t]||"default"},getRoleLabel:function(t){var e={admin:this.$t("userManage.roleAdmin")||"Admin",manager:this.$t("userManage.roleManager")||"Manager",user:this.$t("userManage.roleUser")||"User",viewer:this.$t("userManage.roleViewer")||"Viewer"};return e[t]||t},formatTime:function(t){if(!t)return"";var e=new Date("number"===typeof t?1e3*t:t);return e.toLocaleString()},formatCredits:function(t){return t||0===t?Number(t).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:2}):"0"},formatDate:function(t){if(!t)return"";var e=new Date(t);return e.toLocaleDateString()},isVipActive:function(t){return!!t&&new Date(t)>new Date},showCreditsModal:function(t){this.creditsEditingUser=t,this.newCredits=parseFloat(t.credits)||0,this.creditsRemark="",this.creditsModalVisible=!0},handleSetCredits:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!(t.newCredits<0)){e.n=1;break}return t.$message.error(t.$t("userManage.creditsNonNegative")||"Credits cannot be negative"),e.a(2);case 1:return t.creditsLoading=!0,e.p=2,e.n=3,(0,l.wq)({user_id:t.creditsEditingUser.id,credits:t.newCredits,remark:t.creditsRemark});case 3:a=e.v,1===a.code?(t.$message.success(a.msg||"Credits updated successfully"),t.creditsModalVisible=!1,t.loadUsers()):t.$message.error(a.msg||"Update failed"),e.n=5;break;case 4:e.p=4,e.v,t.$message.error("Update failed");case 5:return e.p=5,t.creditsLoading=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},showVipModal:function(t){this.vipEditingUser=t,this.vipDays=30,this.vipCustomDate=null,this.vipRemark="",this.vipModalVisible=!0},handleSetVip:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a,s;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(a={user_id:t.vipEditingUser.id,remark:t.vipRemark},-1!==t.vipDays){e.n=2;break}if(t.vipCustomDate){e.n=1;break}return t.$message.error(t.$t("userManage.selectDate")||"Please select a date"),e.a(2);case 1:a.vip_expires_at=t.vipCustomDate.toISOString(),e.n=3;break;case 2:a.vip_days=t.vipDays;case 3:return t.vipLoading=!0,e.p=4,e.n=5,(0,l.nY)(a);case 5:s=e.v,1===s.code?(t.$message.success(s.msg||"VIP status updated successfully"),t.vipModalVisible=!1,t.loadUsers()):t.$message.error(s.msg||"Update failed"),e.n=7;break;case 6:e.p=6,e.v,t.$message.error("Update failed");case 7:return e.p=7,t.vipLoading=!1,e.f(7);case 8:return e.a(2)}},e,null,[[4,6,7,8]])}))()},loadOrders:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.orderLoading=!0,e.p=1,e.n=2,(0,l.vi)({page:t.orderPagination.current,page_size:t.orderPagination.pageSize,status:"all"===t.orderStatusFilter?"":t.orderStatusFilter,search:t.orderSearchKeyword||""});case 2:a=e.v,1===a.code?(t.orders=a.data.items||[],t.orderPagination.total=a.data.total||0,t.orderSummary=a.data.summary||{},t.ordersLoaded=!0):t.$message.error(a.msg||"Failed to load orders"),e.n=4;break;case 3:e.p=3,e.v,t.$message.error("Failed to load orders");case 4:return e.p=4,t.orderLoading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},handleOrderSearch:function(){this.orderPagination.current=1,this.loadOrders()},handleOrderFilterChange:function(){this.orderPagination.current=1,this.loadOrders()},handleOrderTableChange:function(t){this.orderPagination.current=t.current,this.orderPagination.pageSize=t.pageSize,this.loadOrders()},getOrderStatusColor:function(t){var e={paid:"green",confirmed:"green",pending:"orange",expired:"grey",cancelled:"default",failed:"red"};return e[t]||"default"},getOrderStatusLabel:function(t){var e={paid:this.$t("adminOrders.statusPaid")||"Paid",confirmed:this.$t("adminOrders.statusConfirmed")||"Confirmed",pending:this.$t("adminOrders.statusPending")||"Pending",expired:this.$t("adminOrders.statusExpired")||"Expired",cancelled:this.$t("adminOrders.statusCancelled")||"Cancelled",failed:this.$t("adminOrders.statusFailed")||"Failed"};return e[t]||t},loadAiStats:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.aiStatsLoading=!0,e.p=1,e.n=2,(0,l.d$)({page:t.aiStatsPagination.current,page_size:t.aiStatsPagination.pageSize,search:t.aiStatsSearchKeyword||""});case 2:a=e.v,1===a.code?(t.aiUserStats=a.data.user_stats||[],t.aiRecentRecords=a.data.recent||[],t.aiStatsPagination.total=a.data.user_total||0,t.aiStatsSummary=a.data.summary||{},t.aiStatsLoaded=!0):t.$message.error(a.msg||"Failed to load AI stats"),e.n=4;break;case 3:e.p=3,e.v,t.$message.error("Failed to load AI stats");case 4:return e.p=4,t.aiStatsLoading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},handleAiStatsSearch:function(){this.aiStatsPagination.current=1,this.loadAiStats()},handleAiStatsTableChange:function(t){this.aiStatsPagination.current=t.current,this.aiStatsPagination.pageSize=t.pageSize,this.loadAiStats()}}},m=u,p=a(845),g=(0,p.A)(m,s,r,!1,null,"4e5dc5e0",null),v=g.exports},84841:function(t,e,a){a.d(e,{DK:function(){return _},E$:function(){return c},Gl:function(){return p},O0:function(){return d},TK:function(){return n},aU:function(){return r},cw:function(){return l},d$:function(){return w},hG:function(){return o},hl:function(){return g},kg:function(){return i},nY:function(){return h},r7:function(){return u},rx:function(){return y},v9:function(){return v},vF:function(){return m},vi:function(){return S},wq:function(){return f}});var s=a(75769);function r(t){return(0,s.Ay)({url:"/api/users/list",method:"get",params:t})}function i(t){return(0,s.Ay)({url:"/api/users/create",method:"post",data:t})}function n(t,e){return(0,s.Ay)({url:"/api/users/update",method:"put",params:{id:t},data:e})}function o(t){return(0,s.Ay)({url:"/api/users/delete",method:"delete",params:{id:t}})}function l(t){return(0,s.Ay)({url:"/api/users/reset-password",method:"post",data:t})}function d(){return(0,s.Ay)({url:"/api/users/roles",method:"get"})}function c(){return(0,s.Ay)({url:"/api/users/profile",method:"get"})}function u(t){return(0,s.Ay)({url:"/api/users/profile/update",method:"put",data:t})}function m(){return(0,s.Ay)({url:"/api/users/notification-settings",method:"get"})}function p(t){return(0,s.Ay)({url:"/api/users/notification-settings",method:"put",data:t})}function g(){return(0,s.Ay)({url:"/api/users/notification-settings/test",method:"post",data:{}})}function v(t){return(0,s.Ay)({url:"/api/users/my-credits-log",method:"get",params:t})}function y(t){return(0,s.Ay)({url:"/api/users/my-referrals",method:"get",params:t})}function f(t){return(0,s.Ay)({url:"/api/users/set-credits",method:"post",data:t})}function h(t){return(0,s.Ay)({url:"/api/users/set-vip",method:"post",data:t})}function _(t){return(0,s.Ay)({url:"/api/users/system-strategies",method:"get",params:t})}function S(t){return(0,s.Ay)({url:"/api/users/admin-orders",method:"get",params:t})}function w(t){return(0,s.Ay)({url:"/api/users/admin-ai-stats",method:"get",params:t})}}}]); \ No newline at end of file diff --git a/frontend/dist/js/846.db514e9f.js b/frontend/dist/js/846.db514e9f.js deleted file mode 100644 index fc17061..0000000 --- a/frontend/dist/js/846.db514e9f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[846],{69846:function(t,e,a){a.r(e),a.d(e,{default:function(){return v}});var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"user-manage-page",class:{"theme-dark":t.isDarkTheme}},[e("div",{staticClass:"page-header"},[e("h2",{staticClass:"page-title"},[e("a-icon",{attrs:{type:"team"}}),e("span",[t._v(t._s(t.$t("userManage.title")||"User Management"))])],1),e("p",{staticClass:"page-desc"},[t._v(t._s(t.$t("userManage.description")||"Manage system users, roles and permissions"))])]),e("a-tabs",{staticClass:"manage-tabs",on:{change:t.handleTabChange},model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[e("a-tab-pane",{key:"users",attrs:{tab:t.$t("userManage.tabUsers")||"User Management"}},[e("div",{staticClass:"toolbar"},[e("div",{staticClass:"toolbar-left"},[e("a-button",{attrs:{type:"primary"},on:{click:t.showCreateModal}},[e("a-icon",{attrs:{type:"user-add"}}),t._v(" "+t._s(t.$t("userManage.createUser")||"Create User")+" ")],1),e("a-button",{on:{click:t.loadUsers}},[e("a-icon",{attrs:{type:"reload"}}),t._v(" "+t._s(t.$t("common.refresh")||"Refresh")+" ")],1)],1),e("div",{staticClass:"toolbar-right"},[e("a-input-search",{staticClass:"toolbar-search",attrs:{placeholder:t.$t("userManage.searchPlaceholder")||"Search by username/email",allowClear:""},on:{search:t.handleSearch,pressEnter:t.handleSearch},model:{value:t.searchKeyword,callback:function(e){t.searchKeyword=e},expression:"searchKeyword"}})],1)]),e("a-card",{staticClass:"user-table-card",attrs:{bordered:!1}},[e("a-table",{attrs:{columns:t.columns,dataSource:t.users,loading:t.loading,pagination:t.pagination,rowKey:function(t){return t.id},scroll:{x:1280}},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"status",fn:function(a){return[e("a-tag",{attrs:{color:"active"===a?"green":"red"}},[t._v(" "+t._s("active"===a?t.$t("userManage.active")||"Active":t.$t("userManage.disabled")||"Disabled")+" ")])]}},{key:"role",fn:function(a){return[e("a-tag",{attrs:{color:t.getRoleColor(a)}},[t._v(" "+t._s(t.getRoleLabel(a))+" ")])]}},{key:"last_login_at",fn:function(a){return[a?e("span",[t._v(t._s(t.formatTime(a)))]):e("span",{staticClass:"text-muted"},[t._v(t._s(t.$t("userManage.neverLogin")||"Never"))])]}},{key:"credits",fn:function(a){return[e("span",{staticClass:"credits-value"},[t._v(t._s(t.formatCredits(a)))])]}},{key:"vip_expires_at",fn:function(a){return[a&&t.isVipActive(a)?[e("a-tag",{attrs:{color:"gold"}},[e("a-icon",{attrs:{type:"crown"}}),t._v(" "+t._s(t.formatDate(a))+" ")],1)]:e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"action",fn:function(a,s){return[e("a-space",[e("a-tooltip",{attrs:{title:t.$t("common.edit")||"Edit"}},[e("a-button",{attrs:{type:"link",size:"small"},on:{click:function(e){return t.showEditModal(s)}}},[e("a-icon",{attrs:{type:"edit"}})],1)],1),e("a-tooltip",{attrs:{title:t.$t("userManage.adjustCredits")||"Adjust Credits"}},[e("a-button",{attrs:{type:"link",size:"small"},on:{click:function(e){return t.showCreditsModal(s)}}},[e("a-icon",{staticStyle:{color:"#722ed1"},attrs:{type:"wallet"}})],1)],1),e("a-tooltip",{attrs:{title:t.$t("userManage.setVip")||"Set VIP"}},[e("a-button",{attrs:{type:"link",size:"small"},on:{click:function(e){return t.showVipModal(s)}}},[e("a-icon",{staticStyle:{color:"#faad14"},attrs:{type:"crown"}})],1)],1),e("a-tooltip",{attrs:{title:t.$t("userManage.resetPassword")||"Reset Password"}},[e("a-button",{attrs:{type:"link",size:"small"},on:{click:function(e){return t.showResetPasswordModal(s)}}},[e("a-icon",{attrs:{type:"key"}})],1)],1),e("a-tooltip",{attrs:{title:t.$t("common.delete")||"Delete"}},[e("a-popconfirm",{attrs:{title:t.$t("userManage.confirmDelete")||"Are you sure to delete this user?"},on:{confirm:function(e){return t.handleDelete(s.id)}}},[e("a-button",{attrs:{type:"link",size:"small",disabled:s.id===t.currentUserId}},[e("a-icon",{staticStyle:{color:"#ff4d4f"},attrs:{type:"delete"}})],1)],1)],1)],1)]}}])})],1)],1),e("a-tab-pane",{key:"strategies",attrs:{tab:t.$t("systemOverview.tabTitle")||"System Overview"}},[t.strategySummary?e("div",{staticClass:"summary-cards"},[e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #667eea, #764ba2)"}},[e("a-icon",{attrs:{type:"fund"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.strategySummary.total_strategies||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("systemOverview.totalStrategies")||"Total Strategies"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #11998e, #38ef7d)"}},[e("a-icon",{attrs:{type:"play-circle"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.strategySummary.running_strategies||0))]),e("div",{staticClass:"summary-sub"},[t._v(" "+t._s(t.$t("systemOverview.live")||"实盘")+": "+t._s(t.strategySummary.running_live_strategies||0)+" / "+t._s(t.$t("systemOverview.signal")||"仅通知")+": "+t._s(t.strategySummary.running_signal_strategies||0)+" ")]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("systemOverview.runningStrategies")||"Running"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #f093fb, #f5576c)"}},[e("a-icon",{attrs:{type:"dollar"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.formatNumber(t.strategySummary.total_capital)))]),e("div",{staticClass:"summary-sub"},[t._v(" "+t._s(t.$t("systemOverview.live")||"实盘")+": "+t._s(t.formatNumber(t.strategySummary.live_capital))+" / "+t._s(t.$t("systemOverview.signal")||"仅通知")+": "+t._s(t.formatNumber(t.strategySummary.signal_capital))+" ")]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("systemOverview.totalCapital")||"Total Capital"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",style:{background:(t.strategySummary.total_pnl||0)>=0?"linear-gradient(135deg, #11998e, #38ef7d)":"linear-gradient(135deg, #ff416c, #ff4b2b)"}},[e("a-icon",{attrs:{type:"rise"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value",class:(t.strategySummary.total_pnl||0)>=0?"text-profit":"text-loss"},[t._v(" "+t._s(t.formatPnl(t.strategySummary.total_pnl))+" "),e("span",{staticClass:"roi-badge"},[t._v(t._s(t.strategySummary.total_roi||0)+"%")])]),e("div",{staticClass:"summary-sub"},[t._v(" "+t._s(t.$t("systemOverview.live")||"实盘")+": "+t._s(t.formatPnl(t.strategySummary.live_pnl))+" / "+t._s(t.$t("systemOverview.signal")||"仅通知")+": "+t._s(t.formatPnl(t.strategySummary.signal_pnl))+" ")]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("systemOverview.totalPnl")||"Total PnL"))])])])]):t._e(),e("div",{staticClass:"toolbar"},[e("div",{staticClass:"toolbar-left"},[e("a-button",{on:{click:t.loadSystemStrategies}},[e("a-icon",{attrs:{type:"reload"}}),t._v(" "+t._s(t.$t("common.refresh")||"Refresh")+" ")],1),e("a-select",{staticClass:"toolbar-select",on:{change:t.handleStrategyFilterChange},model:{value:t.strategyStatusFilter,callback:function(e){t.strategyStatusFilter=e},expression:"strategyStatusFilter"}},[e("a-select-option",{attrs:{value:"all"}},[t._v(t._s(t.$t("systemOverview.filterAll")||"All Status"))]),e("a-select-option",{attrs:{value:"running"}},[t._v(t._s(t.$t("systemOverview.filterRunning")||"Running"))]),e("a-select-option",{attrs:{value:"stopped"}},[t._v(t._s(t.$t("systemOverview.filterStopped")||"Stopped"))])],1),e("a-select",{staticClass:"toolbar-select",on:{change:t.handleStrategyExecutionFilterChange},model:{value:t.strategyExecutionFilter,callback:function(e){t.strategyExecutionFilter=e},expression:"strategyExecutionFilter"}},[e("a-select-option",{attrs:{value:"all"}},[t._v(t._s(t.$t("systemOverview.filterExecAll")||"All modes"))]),e("a-select-option",{attrs:{value:"live"}},[t._v(t._s(t.$t("systemOverview.live")||"Live"))]),e("a-select-option",{attrs:{value:"signal"}},[t._v(t._s(t.$t("systemOverview.signal")||"Signal"))])],1)],1),e("div",{staticClass:"toolbar-right"},[e("a-input-search",{staticClass:"toolbar-search",attrs:{placeholder:t.$t("systemOverview.searchPlaceholder")||"Search strategy/symbol/user",allowClear:""},on:{search:t.handleStrategySearch,pressEnter:t.handleStrategySearch},model:{value:t.strategySearchKeyword,callback:function(e){t.strategySearchKeyword=e},expression:"strategySearchKeyword"}})],1)]),e("a-card",{staticClass:"user-table-card",attrs:{bordered:!1}},[e("a-table",{attrs:{columns:t.strategyColumns,dataSource:t.systemStrategies,loading:t.strategyLoading,pagination:t.strategyPagination,rowKey:function(t){return t.id},scroll:{x:1920}},on:{change:t.handleStrategyTableChange},scopedSlots:t._u([{key:"strategyStatus",fn:function(a){return[e("span",{staticClass:"status-cell"},[e("span",{staticClass:"status-dot",class:"running"===a?"dot-running":"dot-stopped"}),e("span",{class:"running"===a?"status-running":"status-stopped"},[t._v(" "+t._s("running"===a?t.$t("systemOverview.running")||"Running":t.$t("systemOverview.stopped")||"Stopped")+" ")])])]}},{key:"userInfo",fn:function(a,s){return[e("a-tooltip",{attrs:{title:s.nickname||s.username||"-"}},[e("span",{staticClass:"user-cell"},[e("a-avatar",{style:{backgroundColor:t.getUserColor(s.user_id),fontSize:"11px",marginRight:"6px"},attrs:{size:"small"}},[t._v(" "+t._s((s.nickname||s.username||"?").charAt(0).toUpperCase())+" ")]),e("span",{staticClass:"user-name"},[t._v(t._s(t.truncate(s.nickname||s.username||"-",8)))])],1)])]}},{key:"symbolInfo",fn:function(a,s){return[e("div",[e("span",{staticClass:"symbol-text"},[t._v(t._s(s.symbol||"-"))]),"cross_sectional"===s.cs_strategy_type?e("a-tag",{staticStyle:{"margin-left":"4px"},attrs:{color:"purple",size:"small"}},[t._v("CS")]):t._e()],1),"cross_sectional"===s.cs_strategy_type&&s.symbol_list&&s.symbol_list.length?e("div",{staticClass:"symbol-count text-muted"},[t._v(" "+t._s(s.symbol_list.length)+" "+t._s(t.$t("systemOverview.symbols")||"symbols")+" ")]):t._e()]}},{key:"capitalInfo",fn:function(a){return[e("span",[t._v(t._s(t.formatNumber(a)))])]}},{key:"executionModeInfo",fn:function(a){return["live"===a?e("a-tag",{attrs:{color:"green",size:"small"}},[t._v(t._s(t.$t("systemOverview.live")||"Live"))]):"signal"===a?e("a-tag",{attrs:{color:"blue",size:"small"}},[t._v(t._s(t.$t("systemOverview.signal")||"Signal"))]):e("a-tag",{attrs:{size:"small"}},[t._v(t._s(a||"—"))])]}},{key:"equityInfo",fn:function(a,s){return["live"===s.execution_mode?e("span",[t._v(t._s(t.formatNumber(a||0)))]):e("span",{staticClass:"text-muted"},[t._v("—")])]}},{key:"pnlInfo",fn:function(a,s){return[e("div",{class:s.total_pnl>=0?"text-profit":"text-loss"},[e("span",{staticClass:"pnl-value"},[t._v(t._s(t.formatPnl(s.total_pnl)))]),e("span",{staticClass:"roi-text"},[t._v("("+t._s(s.roi>=0?"+":"")+t._s(s.roi)+"%)")])]),e("div",{staticClass:"pnl-detail text-muted"},[e("span",[t._v(t._s(t.$t("systemOverview.realized")||"Real")+": "+t._s(t.formatPnl(s.total_realized_pnl)))]),e("span",{staticStyle:{"margin-left":"8px"}},[t._v(t._s(t.$t("systemOverview.unrealized")||"Unreal")+": "+t._s(t.formatPnl(s.total_unrealized_pnl)))])])]}},{key:"positionInfo",fn:function(t,a){return[e("a-badge",{attrs:{count:a.position_count,numberStyle:{backgroundColor:a.position_count>0?"#52c41a":"#d9d9d9"}}})]}},{key:"tradeInfo",fn:function(a){return[e("span",[t._v(t._s(a||0))])]}},{key:"indicatorInfo",fn:function(a){return[a?e("a-tooltip",{attrs:{title:a}},[e("span",{staticClass:"indicator-name"},[t._v(t._s(t.truncate(a,16)))])]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"exchangeInfo",fn:function(a){return[a?e("span",{staticClass:"exchange-name"},[t._v(t._s(a))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"timeframeInfo",fn:function(a){return[a?e("a-tag",{attrs:{size:"small"}},[t._v(t._s(a))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"leverageInfo",fn:function(a){return[a>1?e("span",{staticStyle:{color:"#fa8c16","font-weight":"600"}},[t._v(t._s(a)+"x")]):e("span",[t._v(t._s(a||1)+"x")])]}},{key:"createdAtInfo",fn:function(a){return[a?e("span",[t._v(t._s(t.formatTime(a)))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"updatedAtInfo",fn:function(a){return[a?e("span",[t._v(t._s(t.formatTime(a)))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}}])})],1)],1),e("a-tab-pane",{key:"orders",attrs:{tab:t.$t("adminOrders.tabTitle")||"Order List"}},[t.orderSummary?e("div",{staticClass:"summary-cards"},[e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #667eea, #764ba2)"}},[e("a-icon",{attrs:{type:"file-text"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.orderSummary.total_orders||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminOrders.totalOrders")||"Total Orders"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #11998e, #38ef7d)"}},[e("a-icon",{attrs:{type:"check-circle"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.orderSummary.paid_orders||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminOrders.paidOrders")||"Paid"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #f093fb, #f5576c)"}},[e("a-icon",{attrs:{type:"clock-circle"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.orderSummary.pending_orders||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminOrders.pendingOrders")||"Pending"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #fa709a, #fee140)"}},[e("a-icon",{attrs:{type:"dollar"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.formatNumber(t.orderSummary.total_revenue))+" "),e("span",{staticStyle:{"font-size":"13px",color:"#999"}},[t._v("USDT")])]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminOrders.totalRevenue")||"Total Revenue"))])])])]):t._e(),e("div",{staticClass:"toolbar"},[e("div",{staticClass:"toolbar-left"},[e("a-button",{on:{click:t.loadOrders}},[e("a-icon",{attrs:{type:"reload"}}),t._v(" "+t._s(t.$t("common.refresh")||"Refresh")+" ")],1),e("a-select",{staticClass:"toolbar-select",on:{change:t.handleOrderFilterChange},model:{value:t.orderStatusFilter,callback:function(e){t.orderStatusFilter=e},expression:"orderStatusFilter"}},[e("a-select-option",{attrs:{value:"all"}},[t._v(t._s(t.$t("adminOrders.filterAll")||"All Status"))]),e("a-select-option",{attrs:{value:"pending"}},[t._v(t._s(t.$t("adminOrders.filterPending")||"Pending"))]),e("a-select-option",{attrs:{value:"paid"}},[t._v(t._s(t.$t("adminOrders.filterPaid")||"Paid"))]),e("a-select-option",{attrs:{value:"confirmed"}},[t._v(t._s(t.$t("adminOrders.filterConfirmed")||"Confirmed"))]),e("a-select-option",{attrs:{value:"expired"}},[t._v(t._s(t.$t("adminOrders.filterExpired")||"Expired"))])],1)],1),e("div",{staticClass:"toolbar-right"},[e("a-input-search",{staticClass:"toolbar-search",attrs:{placeholder:t.$t("adminOrders.searchPlaceholder")||"Search by username/email",allowClear:""},on:{search:t.handleOrderSearch,pressEnter:t.handleOrderSearch},model:{value:t.orderSearchKeyword,callback:function(e){t.orderSearchKeyword=e},expression:"orderSearchKeyword"}})],1)]),e("a-card",{staticClass:"user-table-card",attrs:{bordered:!1}},[e("a-table",{attrs:{columns:t.orderColumns,dataSource:t.orders,loading:t.orderLoading,pagination:t.orderPagination,rowKey:function(t){return t.order_type+"-"+t.id},scroll:{x:1400}},on:{change:t.handleOrderTableChange},scopedSlots:t._u([{key:"orderUserInfo",fn:function(a,s){return[e("a-tooltip",{attrs:{title:(s.nickname||s.username||"-")+" ("+(s.user_email||"")+")"}},[e("span",{staticClass:"user-cell"},[e("a-avatar",{style:{backgroundColor:t.getUserColor(s.user_id),fontSize:"11px",marginRight:"6px"},attrs:{size:"small"}},[t._v(" "+t._s((s.nickname||s.username||"?").charAt(0).toUpperCase())+" ")]),e("span",{staticClass:"user-name"},[t._v(t._s(t.truncate(s.nickname||s.username||"-",10)))])],1)])]}},{key:"orderTypeInfo",fn:function(a){return[e("a-tag",{attrs:{color:"usdt"===a?"green":"blue"}},[t._v(" "+t._s("usdt"===a?"USDT":"Mock")+" ")])]}},{key:"planInfo",fn:function(a){return[e("a-tag",{attrs:{color:"lifetime"===a?"gold":"yearly"===a?"purple":"cyan"}},[t._v(" "+t._s("lifetime"===a?t.$t("adminOrders.lifetime")||"Lifetime":"yearly"===a?t.$t("adminOrders.yearly")||"Yearly":t.$t("adminOrders.monthly")||"Monthly")+" ")])]}},{key:"amountInfo",fn:function(a,s){return[e("span",{staticStyle:{"font-weight":"600"}},[t._v(t._s(a))]),e("span",{staticClass:"text-muted",staticStyle:{"margin-left":"4px"}},[t._v(t._s(s.currency))])]}},{key:"orderStatusInfo",fn:function(a){return[e("a-tag",{attrs:{color:t.getOrderStatusColor(a)}},[t._v(t._s(t.getOrderStatusLabel(a)))])]}},{key:"chainInfo",fn:function(a){return[a?e("span",[t._v(t._s(a))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"addressInfo",fn:function(a){return[a?e("a-tooltip",{attrs:{title:a}},[e("span",{staticClass:"address-text"},[t._v(t._s(t.truncate(a,12)))])]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"txHashInfo",fn:function(a){return[a?e("a-tooltip",{attrs:{title:a}},[e("span",{staticClass:"hash-text"},[t._v(t._s(t.truncate(a,14)))])]):e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"orderCreatedAt",fn:function(a){return[a?e("span",[t._v(t._s(t.formatTime(a)))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}}])})],1)],1),e("a-tab-pane",{key:"aiStats",attrs:{tab:t.$t("adminAiStats.tabTitle")||"AI Analysis"}},[t.aiStatsSummary?e("div",{staticClass:"summary-cards"},[e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #667eea, #764ba2)"}},[e("a-icon",{attrs:{type:"thunderbolt"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.aiStatsSummary.total_analyses||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminAiStats.totalAnalyses")||"Total Analyses"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #11998e, #38ef7d)"}},[e("a-icon",{attrs:{type:"team"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.aiStatsSummary.unique_users||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminAiStats.activeUsers")||"Active Users"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #f093fb, #f5576c)"}},[e("a-icon",{attrs:{type:"stock"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(t._s(t.aiStatsSummary.unique_symbols||0))]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminAiStats.uniqueSymbols")||"Symbols Analyzed"))])])]),e("div",{staticClass:"summary-card"},[e("div",{staticClass:"summary-icon",staticStyle:{background:"linear-gradient(135deg, #fa709a, #fee140)"}},[e("a-icon",{attrs:{type:"like"}})],1),e("div",{staticClass:"summary-info"},[e("div",{staticClass:"summary-value"},[t._v(" "+t._s(t.aiStatsSummary.correct_count||0)+" "),e("span",{staticStyle:{"font-size":"13px",color:"#999"}},[t._v("/ "+t._s(t.aiStatsSummary.total_memory||0))])]),e("div",{staticClass:"summary-label"},[t._v(t._s(t.$t("adminAiStats.accuracy")||"Correct / Verified"))])])])]):t._e(),e("div",{staticClass:"toolbar"},[e("div",{staticClass:"toolbar-left"},[e("a-button",{on:{click:t.loadAiStats}},[e("a-icon",{attrs:{type:"reload"}}),t._v(" "+t._s(t.$t("common.refresh")||"Refresh")+" ")],1)],1),e("div",{staticClass:"toolbar-right"},[e("a-input-search",{staticClass:"toolbar-search",attrs:{placeholder:t.$t("adminAiStats.searchPlaceholder")||"Search by username",allowClear:""},on:{search:t.handleAiStatsSearch,pressEnter:t.handleAiStatsSearch},model:{value:t.aiStatsSearchKeyword,callback:function(e){t.aiStatsSearchKeyword=e},expression:"aiStatsSearchKeyword"}})],1)]),e("a-card",{staticClass:"user-table-card",staticStyle:{"margin-bottom":"20px"},attrs:{bordered:!1}},[e("h4",{staticClass:"section-card-title"},[e("a-icon",{staticClass:"section-card-title-icon",attrs:{type:"bar-chart"}}),t._v(" "+t._s(t.$t("adminAiStats.userStatsTitle")||"Per-User Statistics")+" ")],1),e("a-table",{attrs:{columns:t.aiUserColumns,dataSource:t.aiUserStats,loading:t.aiStatsLoading,pagination:t.aiStatsPagination,rowKey:function(t){return t.user_id},scroll:{x:960}},on:{change:t.handleAiStatsTableChange},scopedSlots:t._u([{key:"aiUserInfo",fn:function(a,s){return[e("a-tooltip",{attrs:{title:(s.nickname||s.username||"-")+" ("+(s.email||"")+")"}},[e("span",{staticClass:"user-cell"},[e("a-avatar",{style:{backgroundColor:t.getUserColor(s.user_id),fontSize:"11px",marginRight:"6px"},attrs:{size:"small"}},[t._v(" "+t._s((s.nickname||s.username||"?").charAt(0).toUpperCase())+" ")]),e("span",{staticClass:"user-name"},[t._v(t._s(t.truncate(s.nickname||s.username||"-",10)))])],1)])]}},{key:"analysisCountInfo",fn:function(a){return[e("span",{staticStyle:{"font-weight":"600",color:"#1890ff"}},[t._v(t._s(a||0))])]}},{key:"accuracyInfo",fn:function(a,s){return[e("span",{staticClass:"text-profit"},[t._v(t._s(s.correct||0))]),e("span",{staticClass:"text-muted"},[t._v(" / ")]),e("span",{staticClass:"text-loss"},[t._v(t._s(s.incorrect||0))])]}},{key:"feedbackInfo",fn:function(a,s){return[e("a-tooltip",{attrs:{title:(t.$t("adminAiStats.helpful")||"Helpful")+" / "+(t.$t("adminAiStats.notHelpful")||"Not Helpful")}},[e("span",{staticStyle:{color:"#52c41a"}},[e("a-icon",{attrs:{type:"like"}}),t._v(" "+t._s(s.helpful||0))],1),e("span",{staticClass:"text-muted"},[t._v(" / ")]),e("span",{staticStyle:{color:"#ff4d4f"}},[e("a-icon",{attrs:{type:"dislike"}}),t._v(" "+t._s(s.not_helpful||0))],1)])]}},{key:"lastAnalysisAt",fn:function(a){return[a?e("span",[t._v(t._s(t.formatTime(a)))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}}])})],1),e("a-card",{staticClass:"user-table-card",attrs:{bordered:!1}},[e("h4",{staticClass:"section-card-title"},[e("a-icon",{staticClass:"section-card-title-icon",attrs:{type:"history"}}),t._v(" "+t._s(t.$t("adminAiStats.recentTitle")||"Recent Analysis Records")+" ")],1),e("a-table",{attrs:{columns:t.aiRecentColumns,dataSource:t.aiRecentRecords,loading:t.aiStatsLoading,pagination:!1,rowKey:function(t){return t.id},scroll:{x:900},size:"small"},scopedSlots:t._u([{key:"recentUserInfo",fn:function(a,s){return[e("span",{staticClass:"user-cell"},[e("a-avatar",{style:{backgroundColor:t.getUserColor(s.user_id),fontSize:"11px",marginRight:"6px"},attrs:{size:"small"}},[t._v(" "+t._s((s.nickname||s.username||"?").charAt(0).toUpperCase())+" ")]),e("span",{staticClass:"user-name"},[t._v(t._s(t.truncate(s.nickname||s.username||"-",8)))])],1)]}},{key:"recentStatusInfo",fn:function(a){return[e("a-tag",{attrs:{color:"completed"===a?"green":"failed"===a?"red":"blue"}},[t._v(" "+t._s(a)+" ")])]}},{key:"recentCreatedAt",fn:function(a){return[a?e("span",[t._v(t._s(t.formatTime(a)))]):e("span",{staticClass:"text-muted"},[t._v("-")])]}}])})],1)],1)],1),e("a-modal",{attrs:{"wrap-class-name":"user-manage-modal",title:t.isEdit?t.$t("userManage.editUser")||"Edit User":t.$t("userManage.createUser")||"Create User",confirmLoading:t.modalLoading},on:{ok:t.handleModalOk,cancel:t.handleModalCancel},model:{value:t.modalVisible,callback:function(e){t.modalVisible=e},expression:"modalVisible"}},[e("a-form",{attrs:{form:t.form,layout:"vertical"}},[e("a-form-item",{attrs:{label:t.$t("userManage.username")||"Username"}},[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["username",{rules:[{required:!t.isEdit,message:t.$t("userManage.usernameRequired")||"Please enter username"}]}],expression:"['username', {\n rules: [{ required: !isEdit, message: $t('userManage.usernameRequired') || 'Please enter username' }]\n }]"}],attrs:{disabled:t.isEdit,placeholder:t.$t("userManage.usernamePlaceholder")||"Enter username"}},[e("a-icon",{attrs:{slot:"prefix",type:"user"},slot:"prefix"})],1)],1),t.isEdit?t._e():e("a-form-item",{attrs:{label:t.$t("userManage.password")||"Password"}},[e("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["password",{rules:[{required:!0,message:t.$t("userManage.passwordRequired")||"Please enter password"},{min:6,message:t.$t("userManage.passwordMin")||"Password must be at least 6 characters"}]}],expression:"['password', {\n rules: [\n { required: true, message: $t('userManage.passwordRequired') || 'Please enter password' },\n { min: 6, message: $t('userManage.passwordMin') || 'Password must be at least 6 characters' }\n ]\n }]"}],attrs:{placeholder:t.$t("userManage.passwordPlaceholder")||"Enter password (min 6 characters)"}},[e("a-icon",{attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),e("a-form-item",{attrs:{label:t.$t("userManage.nickname")||"Nickname"}},[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["nickname"],expression:"['nickname']"}],attrs:{placeholder:t.$t("userManage.nicknamePlaceholder")||"Enter nickname"}},[e("a-icon",{attrs:{slot:"prefix",type:"smile"},slot:"prefix"})],1)],1),e("a-form-item",{attrs:{label:t.$t("userManage.email")||"Email"}},[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["email",{rules:[{type:"email",message:t.$t("userManage.emailInvalid")||"Invalid email format"}]}],expression:"['email', {\n rules: [{ type: 'email', message: $t('userManage.emailInvalid') || 'Invalid email format' }]\n }]"}],attrs:{placeholder:t.$t("userManage.emailPlaceholder")||"Enter email"}},[e("a-icon",{attrs:{slot:"prefix",type:"mail"},slot:"prefix"})],1)],1),e("a-form-item",{attrs:{label:t.$t("userManage.role")||"Role"}},[e("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["role",{initialValue:"user"}],expression:"['role', { initialValue: 'user' }]"}],attrs:{placeholder:t.$t("userManage.rolePlaceholder")||"Select role"}},t._l(t.roles,function(a){return e("a-select-option",{key:a.id,attrs:{value:a.id}},[t._v(" "+t._s(t.getRoleLabel(a.id))+" ")])}),1)],1),t.isEdit?e("a-form-item",{attrs:{label:t.$t("userManage.status")||"Status"}},[e("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:"active"}],expression:"['status', { initialValue: 'active' }]"}],attrs:{placeholder:t.$t("userManage.statusPlaceholder")||"Select status"}},[e("a-select-option",{attrs:{value:"active"}},[t._v(t._s(t.$t("userManage.active")||"Active"))]),e("a-select-option",{attrs:{value:"disabled"}},[t._v(t._s(t.$t("userManage.disabled")||"Disabled"))])],1)],1):t._e()],1)],1),e("a-modal",{attrs:{"wrap-class-name":"user-manage-modal",title:t.$t("userManage.resetPassword")||"Reset Password",confirmLoading:t.resetPasswordLoading},on:{ok:t.handleResetPassword},model:{value:t.resetPasswordVisible,callback:function(e){t.resetPasswordVisible=e},expression:"resetPasswordVisible"}},[e("a-form",{attrs:{form:t.resetPasswordForm,layout:"vertical"}},[e("a-alert",{staticStyle:{"margin-bottom":"16px"},attrs:{message:t.$t("userManage.resetPasswordWarning")||"This will reset the user's password",type:"warning",showIcon:""}}),e("a-form-item",{attrs:{label:t.$t("userManage.newPassword")||"New Password"}},[e("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["new_password",{rules:[{required:!0,message:t.$t("userManage.passwordRequired")||"Please enter new password"},{min:6,message:t.$t("userManage.passwordMin")||"Password must be at least 6 characters"}]}],expression:"['new_password', {\n rules: [\n { required: true, message: $t('userManage.passwordRequired') || 'Please enter new password' },\n { min: 6, message: $t('userManage.passwordMin') || 'Password must be at least 6 characters' }\n ]\n }]"}],attrs:{placeholder:t.$t("userManage.newPasswordPlaceholder")||"Enter new password"}},[e("a-icon",{attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1)],1)],1),e("a-modal",{attrs:{"wrap-class-name":"user-manage-modal",title:(t.$t("userManage.adjustCredits")||"Adjust Credits")+(t.creditsEditingUser?" - ".concat(t.creditsEditingUser.username):""),confirmLoading:t.creditsLoading},on:{ok:t.handleSetCredits},model:{value:t.creditsModalVisible,callback:function(e){t.creditsModalVisible=e},expression:"creditsModalVisible"}},[e("a-form",{attrs:{layout:"vertical"}},[t.creditsEditingUser?e("div",{staticClass:"current-credits-info"},[e("span",{staticClass:"label"},[t._v(t._s(t.$t("userManage.currentCredits")||"Current Credits")+":")]),e("span",{staticClass:"value"},[t._v(t._s(t.formatCredits(t.creditsEditingUser.credits)))])]):t._e(),e("a-form-item",{attrs:{label:t.$t("userManage.newCredits")||"New Credits"}},[e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,precision:2,placeholder:t.$t("userManage.enterCredits")||"Enter new credits amount"},model:{value:t.newCredits,callback:function(e){t.newCredits=e},expression:"newCredits"}})],1),e("a-form-item",{attrs:{label:t.$t("userManage.remark")||"Remark"}},[e("a-input",{attrs:{placeholder:t.$t("userManage.remarkPlaceholder")||"Optional remark"},model:{value:t.creditsRemark,callback:function(e){t.creditsRemark=e},expression:"creditsRemark"}})],1)],1)],1),e("a-modal",{attrs:{"wrap-class-name":"user-manage-modal",title:(t.$t("userManage.setVip")||"Set VIP")+(t.vipEditingUser?" - ".concat(t.vipEditingUser.username):""),confirmLoading:t.vipLoading},on:{ok:t.handleSetVip},model:{value:t.vipModalVisible,callback:function(e){t.vipModalVisible=e},expression:"vipModalVisible"}},[e("a-form",{attrs:{layout:"vertical"}},[t.vipEditingUser&&t.vipEditingUser.vip_expires_at?e("div",{staticClass:"current-vip-info"},[e("span",{staticClass:"label"},[t._v(t._s(t.$t("userManage.currentVip")||"Current VIP")+":")]),e("span",{staticClass:"value",class:t.isVipActive(t.vipEditingUser.vip_expires_at)?"active":"expired"},[t._v(" "+t._s(t.isVipActive(t.vipEditingUser.vip_expires_at)?(t.$t("userManage.vipActive")||"Active")+" (".concat(t.formatDate(t.vipEditingUser.vip_expires_at),")"):t.$t("userManage.vipExpired")||"Expired")+" ")])]):t._e(),e("a-form-item",{attrs:{label:t.$t("userManage.vipDays")||"VIP Days"}},[e("a-select",{staticStyle:{width:"100%"},model:{value:t.vipDays,callback:function(e){t.vipDays=e},expression:"vipDays"}},[e("a-select-option",{attrs:{value:0}},[t._v(t._s(t.$t("userManage.cancelVip")||"Cancel VIP"))]),e("a-select-option",{attrs:{value:7}},[t._v("7 "+t._s(t.$t("userManage.days")||"days"))]),e("a-select-option",{attrs:{value:30}},[t._v("30 "+t._s(t.$t("userManage.days")||"days"))]),e("a-select-option",{attrs:{value:90}},[t._v("90 "+t._s(t.$t("userManage.days")||"days"))]),e("a-select-option",{attrs:{value:180}},[t._v("180 "+t._s(t.$t("userManage.days")||"days"))]),e("a-select-option",{attrs:{value:365}},[t._v("365 "+t._s(t.$t("userManage.days")||"days"))]),e("a-select-option",{attrs:{value:-1}},[t._v(t._s(t.$t("userManage.customDate")||"Custom Date"))])],1)],1),-1===t.vipDays?e("a-form-item",{attrs:{label:t.$t("userManage.vipExpiresAt")||"VIP Expires At"}},[e("a-date-picker",{staticStyle:{width:"100%"},attrs:{showTime:"",format:"YYYY-MM-DD HH:mm:ss"},model:{value:t.vipCustomDate,callback:function(e){t.vipCustomDate=e},expression:"vipCustomDate"}})],1):t._e(),e("a-form-item",{attrs:{label:t.$t("userManage.remark")||"Remark"}},[e("a-input",{attrs:{placeholder:t.$t("userManage.remarkPlaceholder")||"Optional remark"},model:{value:t.vipRemark,callback:function(e){t.vipRemark=e},expression:"vipRemark"}})],1)],1)],1)],1)},r=[],i=a(81127),n=a(56252),o=a(76338),l=a(84841),d=a(55434),c=a(95353),u={name:"UserManage",mixins:[d.t],data:function(){return{activeTab:"users",loading:!1,users:[],roles:[],searchKeyword:"",pagination:{current:1,pageSize:10,total:0},modalVisible:!1,modalLoading:!1,isEdit:!1,editingUser:null,resetPasswordVisible:!1,resetPasswordLoading:!1,resetPasswordUserId:null,creditsModalVisible:!1,creditsLoading:!1,creditsEditingUser:null,newCredits:0,creditsRemark:"",vipModalVisible:!1,vipLoading:!1,vipEditingUser:null,vipDays:30,vipCustomDate:null,vipRemark:"",strategyLoading:!1,systemStrategies:[],strategySummary:null,strategyStatusFilter:"all",strategyExecutionFilter:"all",strategySortBy:"",strategySortOrder:"desc",strategySearchKeyword:"",strategyPagination:{current:1,pageSize:20,total:0},strategiesLoaded:!1,orderLoading:!1,orders:[],orderSummary:null,orderStatusFilter:"all",orderSearchKeyword:"",orderPagination:{current:1,pageSize:20,total:0},ordersLoaded:!1,aiStatsLoading:!1,aiUserStats:[],aiRecentRecords:[],aiStatsSummary:null,aiStatsSearchKeyword:"",aiStatsPagination:{current:1,pageSize:20,total:0},aiStatsLoaded:!1}},computed:(0,o.A)((0,o.A)({},(0,c.L8)(["userInfo"])),{},{isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},currentUserId:function(){var t;return null===(t=this.userInfo)||void 0===t?void 0:t.id},columns:function(){return[{title:"ID",dataIndex:"id",width:60},{title:this.$t("userManage.username")||"Username",dataIndex:"username",width:120},{title:this.$t("userManage.nickname")||"Nickname",dataIndex:"nickname",width:100},{title:this.$t("userManage.email")||"Email",dataIndex:"email",width:180},{title:this.$t("userManage.role")||"Role",dataIndex:"role",width:90,scopedSlots:{customRender:"role"}},{title:this.$t("userManage.credits")||"Credits",dataIndex:"credits",width:100,scopedSlots:{customRender:"credits"}},{title:"VIP",dataIndex:"vip_expires_at",width:120,scopedSlots:{customRender:"vip_expires_at"}},{title:this.$t("userManage.status")||"Status",dataIndex:"status",width:90,scopedSlots:{customRender:"status"}},{title:this.$t("userManage.lastLogin")||"Last Login",dataIndex:"last_login_at",width:150,scopedSlots:{customRender:"last_login_at"}},{title:this.$t("common.actions")||"Actions",dataIndex:"action",width:180,scopedSlots:{customRender:"action"}}]},strategyColumns:function(){var t=this,e=function(e){return t.strategySortBy===e&&("asc"===t.strategySortOrder?"ascend":"descend")};return[{title:"ID",dataIndex:"id",key:"id",width:72,fixed:"left",sorter:!0,sortOrder:e("id")},{title:this.$t("systemOverview.colUser")||"User",dataIndex:"username",key:"username",width:118,fixed:"left",scopedSlots:{customRender:"userInfo"}},{title:this.$t("systemOverview.colStrategy")||"Strategy",dataIndex:"strategy_name",key:"strategy_name",width:160,ellipsis:!0,sorter:!0,sortOrder:e("strategy_name")},{title:this.$t("systemOverview.colStatus")||"Status",dataIndex:"status",key:"status",width:108,scopedSlots:{customRender:"strategyStatus"},sorter:!0,sortOrder:e("status")},{title:this.$t("systemOverview.colExecutionMode")||"Mode",dataIndex:"execution_mode",key:"execution_mode",width:96,align:"center",scopedSlots:{customRender:"executionModeInfo"},sorter:!0,sortOrder:e("execution_mode")},{title:this.$t("systemOverview.colSymbol")||"Symbol",dataIndex:"symbol",key:"symbol",width:140,scopedSlots:{customRender:"symbolInfo"},sorter:!0,sortOrder:e("symbol")},{title:this.$t("systemOverview.colCapital")||"Capital",dataIndex:"initial_capital",key:"initial_capital",width:110,scopedSlots:{customRender:"capitalInfo"},sorter:!0,sortOrder:e("initial_capital")},{title:this.$t("systemOverview.colPositionEquity")||"Pos. equity",dataIndex:"total_equity",key:"total_equity",width:120,align:"right",scopedSlots:{customRender:"equityInfo"},sorter:!0,sortOrder:e("total_equity")},{title:this.$t("systemOverview.colPnl")||"PnL / ROI",dataIndex:"total_pnl",key:"total_pnl",width:200,scopedSlots:{customRender:"pnlInfo"},sorter:!0,sortOrder:e("total_pnl")},{title:this.$t("systemOverview.colPositions")||"Pos",dataIndex:"position_count",key:"position_count",width:76,align:"center",scopedSlots:{customRender:"positionInfo"},sorter:!0,sortOrder:e("position_count")},{title:this.$t("systemOverview.colTrades")||"Trades",dataIndex:"trade_count",key:"trade_count",width:88,align:"center",scopedSlots:{customRender:"tradeInfo"},sorter:!0,sortOrder:e("trade_count")},{title:this.$t("systemOverview.colIndicator")||"Indicator",dataIndex:"indicator_name",key:"indicator_name",width:130,scopedSlots:{customRender:"indicatorInfo"}},{title:this.$t("systemOverview.colExchange")||"Exchange",dataIndex:"exchange_name",key:"exchange_name",width:100,scopedSlots:{customRender:"exchangeInfo"}},{title:this.$t("systemOverview.colTimeframe")||"TF",dataIndex:"timeframe",key:"timeframe",width:70,align:"center",scopedSlots:{customRender:"timeframeInfo"}},{title:this.$t("systemOverview.colLeverage")||"Lev",dataIndex:"leverage",key:"leverage",width:70,align:"center",scopedSlots:{customRender:"leverageInfo"},sorter:!0,sortOrder:e("leverage")},{title:this.$t("systemOverview.colCreatedAt")||"Created",dataIndex:"created_at",key:"created_at",width:150,scopedSlots:{customRender:"createdAtInfo"},sorter:!0,sortOrder:e("created_at")},{title:this.$t("systemOverview.colUpdatedAt")||"Updated",dataIndex:"updated_at",key:"updated_at",width:150,scopedSlots:{customRender:"updatedAtInfo"},sorter:!0,sortOrder:e("updated_at")}]},orderColumns:function(){return[{title:this.$t("adminOrders.colUser")||"User",dataIndex:"username",width:120,scopedSlots:{customRender:"orderUserInfo"}},{title:this.$t("adminOrders.colType")||"Type",dataIndex:"order_type",width:80,scopedSlots:{customRender:"orderTypeInfo"}},{title:this.$t("adminOrders.colPlan")||"Plan",dataIndex:"plan",width:100,scopedSlots:{customRender:"planInfo"}},{title:this.$t("adminOrders.colAmount")||"Amount",dataIndex:"amount",width:120,scopedSlots:{customRender:"amountInfo"}},{title:this.$t("adminOrders.colStatus")||"Status",dataIndex:"status",width:100,scopedSlots:{customRender:"orderStatusInfo"}},{title:this.$t("adminOrders.colChain")||"Chain",dataIndex:"chain",width:80,scopedSlots:{customRender:"chainInfo"}},{title:this.$t("adminOrders.colAddress")||"Address",dataIndex:"address",width:140,scopedSlots:{customRender:"addressInfo"}},{title:this.$t("adminOrders.colTxHash")||"Tx Hash",dataIndex:"tx_hash",width:160,scopedSlots:{customRender:"txHashInfo"}},{title:this.$t("adminOrders.colCreatedAt")||"Created",dataIndex:"created_at",width:150,scopedSlots:{customRender:"orderCreatedAt"}}]},aiUserColumns:function(){return[{title:this.$t("adminAiStats.colUser")||"User",dataIndex:"username",width:140,scopedSlots:{customRender:"aiUserInfo"}},{title:this.$t("adminAiStats.colAnalysisCount")||"Analyses",dataIndex:"analysis_count",width:100,align:"center",scopedSlots:{customRender:"analysisCountInfo"},sorter:function(t,e){return t.analysis_count-e.analysis_count},defaultSortOrder:"descend"},{title:this.$t("adminAiStats.colSymbols")||"Symbols",dataIndex:"symbol_count",width:90,align:"center"},{title:this.$t("adminAiStats.colMarkets")||"Markets",dataIndex:"market_count",width:90,align:"center"},{title:this.$t("adminAiStats.colAccuracy")||"Correct / Wrong",dataIndex:"correct",width:130,align:"center",scopedSlots:{customRender:"accuracyInfo"}},{title:this.$t("adminAiStats.colFeedback")||"Feedback",dataIndex:"helpful",width:130,align:"center",scopedSlots:{customRender:"feedbackInfo"}},{title:this.$t("adminAiStats.colLastAnalysis")||"Last Analysis",dataIndex:"last_analysis_at",width:160,scopedSlots:{customRender:"lastAnalysisAt"}}]},aiRecentColumns:function(){return[{title:"ID",dataIndex:"id",width:60},{title:this.$t("adminAiStats.colUser")||"User",dataIndex:"username",width:120,scopedSlots:{customRender:"recentUserInfo"}},{title:this.$t("adminAiStats.colMarket")||"Market",dataIndex:"market",width:80},{title:this.$t("adminAiStats.colSymbol")||"Symbol",dataIndex:"symbol",width:120},{title:this.$t("adminAiStats.colModel")||"Model",dataIndex:"model",width:140,ellipsis:!0},{title:this.$t("adminAiStats.colStatus")||"Status",dataIndex:"status",width:100,scopedSlots:{customRender:"recentStatusInfo"}},{title:this.$t("adminAiStats.colCreatedAt")||"Time",dataIndex:"created_at",width:160,scopedSlots:{customRender:"recentCreatedAt"}}]}}),beforeCreate:function(){this.form=this.$form.createForm(this),this.resetPasswordForm=this.$form.createForm(this,{name:"resetPassword"})},mounted:function(){this.loadUsers(),this.loadRoles()},methods:{handleTabChange:function(t){"strategies"!==t||this.strategiesLoaded||this.loadSystemStrategies(),"orders"!==t||this.ordersLoaded||this.loadOrders(),"aiStats"!==t||this.aiStatsLoaded||this.loadAiStats()},loadSystemStrategies:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a,s;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.strategyLoading=!0,e.p=1,a={page:t.strategyPagination.current,page_size:t.strategyPagination.pageSize,status:"all"===t.strategyStatusFilter?"":t.strategyStatusFilter,execution_mode:"all"===t.strategyExecutionFilter?"":t.strategyExecutionFilter,search:t.strategySearchKeyword||""},t.strategySortBy&&(a.sort_by=t.strategySortBy,a.sort_order=t.strategySortOrder),e.n=2,(0,l.DK)(a);case 2:s=e.v,1===s.code?(t.systemStrategies=s.data.items||[],t.strategyPagination.total=s.data.total||0,t.strategySummary=s.data.summary||{},t.strategiesLoaded=!0):t.$message.error(s.msg||"Failed to load strategies"),e.n=4;break;case 3:e.p=3,e.v,t.$message.error("Failed to load system strategies");case 4:return e.p=4,t.strategyLoading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},handleStrategySearch:function(){this.strategyPagination.current=1,this.loadSystemStrategies()},handleStrategyFilterChange:function(){this.strategyPagination.current=1,this.loadSystemStrategies()},handleStrategyExecutionFilterChange:function(){this.strategyPagination.current=1,this.loadSystemStrategies()},handleStrategyTableChange:function(t,e,a){if(t&&(this.strategyPagination.current=t.current,this.strategyPagination.pageSize=t.pageSize),a&&Object.keys(a).length)if("ascend"===a.order||"descend"===a.order){var s=null!=a.columnKey?String(a.columnKey):String(a.field||"");this.strategySortBy=s,this.strategySortOrder="ascend"===a.order?"asc":"desc"}else this.strategySortBy="",this.strategySortOrder="desc";this.loadSystemStrategies()},getUserColor:function(t){var e=["#1890ff","#722ed1","#13c2c2","#fa8c16","#eb2f96","#52c41a","#2f54eb","#faad14"];return e[(t||0)%e.length]},formatNumber:function(t){return t||0===t?Number(t).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:2}):"0"},formatPnl:function(t){if(!t&&0!==t)return"0";var e=Number(t),a=e>=0?"+":"";return a+e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:4})},truncate:function(t,e){return t?t.length>e?t.substring(0,e)+"...":t:""},loadUsers:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.loading=!0,e.p=1,e.n=2,(0,l.aU)({page:t.pagination.current,page_size:t.pagination.pageSize,search:t.searchKeyword||""});case 2:a=e.v,1===a.code?(t.users=a.data.items||[],t.pagination.total=a.data.total||0):t.$message.error(a.msg||"Failed to load users"),e.n=4;break;case 3:e.p=3,e.v,t.$message.error("Failed to load users");case 4:return e.p=4,t.loading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},handleSearch:function(){this.pagination.current=1,this.loadUsers()},loadRoles:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,l.O0)();case 1:a=e.v,1===a.code&&(t.roles=a.data.roles||[]),e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}))()},handleTableChange:function(t){this.pagination.current=t.current,this.pagination.pageSize=t.pageSize,this.loadUsers()},showCreateModal:function(){var t=this;this.isEdit=!1,this.editingUser=null,this.modalVisible=!0,this.$nextTick(function(){t.form.resetFields()})},showEditModal:function(t){var e=this;this.isEdit=!0,this.editingUser=t,this.modalVisible=!0,this.$nextTick(function(){e.form.setFieldsValue({username:t.username,nickname:t.nickname,email:t.email,role:t.role,status:t.status})})},handleModalCancel:function(){this.modalVisible=!1,this.form.resetFields()},handleModalOk:function(){var t=this;this.form.validateFields(function(){var e=(0,n.A)((0,i.A)().m(function e(a,s){var r;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!a){e.n=1;break}return e.a(2);case 1:if(t.modalLoading=!0,e.p=2,!t.isEdit){e.n=4;break}return e.n=3,(0,l.TK)(t.editingUser.id,{nickname:s.nickname,email:s.email,role:s.role,status:s.status});case 3:r=e.v,e.n=6;break;case 4:return e.n=5,(0,l.kg)(s);case 5:r=e.v;case 6:1===r.code?(t.$message.success(r.msg||"Success"),t.modalVisible=!1,t.form.resetFields(),t.loadUsers()):t.$message.error(r.msg||"Operation failed"),e.n=8;break;case 7:e.p=7,e.v,t.$message.error("Operation failed");case 8:return e.p=8,t.modalLoading=!1,e.f(8);case 9:return e.a(2)}},e,null,[[2,7,8,9]])}));return function(t,a){return e.apply(this,arguments)}}())},handleDelete:function(t){var e=this;return(0,n.A)((0,i.A)().m(function a(){var s;return(0,i.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return a.p=0,a.n=1,(0,l.hG)(t);case 1:s=a.v,1===s.code?(e.$message.success(s.msg||"User deleted"),e.loadUsers()):e.$message.error(s.msg||"Delete failed"),a.n=3;break;case 2:a.p=2,a.v,e.$message.error("Delete failed");case 3:return a.a(2)}},a,null,[[0,2]])}))()},showResetPasswordModal:function(t){var e=this;this.resetPasswordUserId=t.id,this.resetPasswordVisible=!0,this.$nextTick(function(){e.resetPasswordForm.resetFields()})},handleResetPassword:function(){var t=this;this.resetPasswordForm.validateFields(function(){var e=(0,n.A)((0,i.A)().m(function e(a,s){var r;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!a){e.n=1;break}return e.a(2);case 1:return t.resetPasswordLoading=!0,e.p=2,e.n=3,(0,l.cw)({user_id:t.resetPasswordUserId,new_password:s.new_password});case 3:r=e.v,1===r.code?(t.$message.success(r.msg||"Password reset successfully"),t.resetPasswordVisible=!1,t.resetPasswordForm.resetFields()):t.$message.error(r.msg||"Reset failed"),e.n=5;break;case 4:e.p=4,e.v,t.$message.error("Reset failed");case 5:return e.p=5,t.resetPasswordLoading=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}));return function(t,a){return e.apply(this,arguments)}}())},getRoleColor:function(t){var e={admin:"red",manager:"orange",user:"blue",viewer:"default"};return e[t]||"default"},getRoleLabel:function(t){var e={admin:this.$t("userManage.roleAdmin")||"Admin",manager:this.$t("userManage.roleManager")||"Manager",user:this.$t("userManage.roleUser")||"User",viewer:this.$t("userManage.roleViewer")||"Viewer"};return e[t]||t},formatTime:function(t){if(!t)return"";var e=new Date("number"===typeof t?1e3*t:t);return e.toLocaleString()},formatCredits:function(t){return t||0===t?Number(t).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:2}):"0"},formatDate:function(t){if(!t)return"";var e=new Date(t);return e.toLocaleDateString()},isVipActive:function(t){return!!t&&new Date(t)>new Date},showCreditsModal:function(t){this.creditsEditingUser=t,this.newCredits=parseFloat(t.credits)||0,this.creditsRemark="",this.creditsModalVisible=!0},handleSetCredits:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!(t.newCredits<0)){e.n=1;break}return t.$message.error(t.$t("userManage.creditsNonNegative")||"Credits cannot be negative"),e.a(2);case 1:return t.creditsLoading=!0,e.p=2,e.n=3,(0,l.wq)({user_id:t.creditsEditingUser.id,credits:t.newCredits,remark:t.creditsRemark});case 3:a=e.v,1===a.code?(t.$message.success(a.msg||"Credits updated successfully"),t.creditsModalVisible=!1,t.loadUsers()):t.$message.error(a.msg||"Update failed"),e.n=5;break;case 4:e.p=4,e.v,t.$message.error("Update failed");case 5:return e.p=5,t.creditsLoading=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},showVipModal:function(t){this.vipEditingUser=t,this.vipDays=30,this.vipCustomDate=null,this.vipRemark="",this.vipModalVisible=!0},handleSetVip:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a,s;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(a={user_id:t.vipEditingUser.id,remark:t.vipRemark},-1!==t.vipDays){e.n=2;break}if(t.vipCustomDate){e.n=1;break}return t.$message.error(t.$t("userManage.selectDate")||"Please select a date"),e.a(2);case 1:a.vip_expires_at=t.vipCustomDate.toISOString(),e.n=3;break;case 2:a.vip_days=t.vipDays;case 3:return t.vipLoading=!0,e.p=4,e.n=5,(0,l.nY)(a);case 5:s=e.v,1===s.code?(t.$message.success(s.msg||"VIP status updated successfully"),t.vipModalVisible=!1,t.loadUsers()):t.$message.error(s.msg||"Update failed"),e.n=7;break;case 6:e.p=6,e.v,t.$message.error("Update failed");case 7:return e.p=7,t.vipLoading=!1,e.f(7);case 8:return e.a(2)}},e,null,[[4,6,7,8]])}))()},loadOrders:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.orderLoading=!0,e.p=1,e.n=2,(0,l.vi)({page:t.orderPagination.current,page_size:t.orderPagination.pageSize,status:"all"===t.orderStatusFilter?"":t.orderStatusFilter,search:t.orderSearchKeyword||""});case 2:a=e.v,1===a.code?(t.orders=a.data.items||[],t.orderPagination.total=a.data.total||0,t.orderSummary=a.data.summary||{},t.ordersLoaded=!0):t.$message.error(a.msg||"Failed to load orders"),e.n=4;break;case 3:e.p=3,e.v,t.$message.error("Failed to load orders");case 4:return e.p=4,t.orderLoading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},handleOrderSearch:function(){this.orderPagination.current=1,this.loadOrders()},handleOrderFilterChange:function(){this.orderPagination.current=1,this.loadOrders()},handleOrderTableChange:function(t){this.orderPagination.current=t.current,this.orderPagination.pageSize=t.pageSize,this.loadOrders()},getOrderStatusColor:function(t){var e={paid:"green",confirmed:"green",pending:"orange",expired:"grey",cancelled:"default",failed:"red"};return e[t]||"default"},getOrderStatusLabel:function(t){var e={paid:this.$t("adminOrders.statusPaid")||"Paid",confirmed:this.$t("adminOrders.statusConfirmed")||"Confirmed",pending:this.$t("adminOrders.statusPending")||"Pending",expired:this.$t("adminOrders.statusExpired")||"Expired",cancelled:this.$t("adminOrders.statusCancelled")||"Cancelled",failed:this.$t("adminOrders.statusFailed")||"Failed"};return e[t]||t},loadAiStats:function(){var t=this;return(0,n.A)((0,i.A)().m(function e(){var a;return(0,i.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.aiStatsLoading=!0,e.p=1,e.n=2,(0,l.d$)({page:t.aiStatsPagination.current,page_size:t.aiStatsPagination.pageSize,search:t.aiStatsSearchKeyword||""});case 2:a=e.v,1===a.code?(t.aiUserStats=a.data.user_stats||[],t.aiRecentRecords=a.data.recent||[],t.aiStatsPagination.total=a.data.user_total||0,t.aiStatsSummary=a.data.summary||{},t.aiStatsLoaded=!0):t.$message.error(a.msg||"Failed to load AI stats"),e.n=4;break;case 3:e.p=3,e.v,t.$message.error("Failed to load AI stats");case 4:return e.p=4,t.aiStatsLoading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},handleAiStatsSearch:function(){this.aiStatsPagination.current=1,this.loadAiStats()},handleAiStatsTableChange:function(t){this.aiStatsPagination.current=t.current,this.aiStatsPagination.pageSize=t.pageSize,this.loadAiStats()}}},m=u,p=a(845),g=(0,p.A)(m,s,r,!1,null,"4e5dc5e0",null),v=g.exports},84841:function(t,e,a){a.d(e,{DK:function(){return _},E$:function(){return c},Gl:function(){return p},O0:function(){return d},TK:function(){return n},aU:function(){return r},cw:function(){return l},d$:function(){return w},hG:function(){return o},hl:function(){return g},kg:function(){return i},nY:function(){return h},r7:function(){return u},rx:function(){return y},v9:function(){return v},vF:function(){return m},vi:function(){return S},wq:function(){return f}});var s=a(75769);function r(t){return(0,s.Ay)({url:"/api/users/list",method:"get",params:t})}function i(t){return(0,s.Ay)({url:"/api/users/create",method:"post",data:t})}function n(t,e){return(0,s.Ay)({url:"/api/users/update",method:"put",params:{id:t},data:e})}function o(t){return(0,s.Ay)({url:"/api/users/delete",method:"delete",params:{id:t}})}function l(t){return(0,s.Ay)({url:"/api/users/reset-password",method:"post",data:t})}function d(){return(0,s.Ay)({url:"/api/users/roles",method:"get"})}function c(){return(0,s.Ay)({url:"/api/users/profile",method:"get"})}function u(t){return(0,s.Ay)({url:"/api/users/profile/update",method:"put",data:t})}function m(){return(0,s.Ay)({url:"/api/users/notification-settings",method:"get"})}function p(t){return(0,s.Ay)({url:"/api/users/notification-settings",method:"put",data:t})}function g(){return(0,s.Ay)({url:"/api/users/notification-settings/test",method:"post",data:{}})}function v(t){return(0,s.Ay)({url:"/api/users/my-credits-log",method:"get",params:t})}function y(t){return(0,s.Ay)({url:"/api/users/my-referrals",method:"get",params:t})}function f(t){return(0,s.Ay)({url:"/api/users/set-credits",method:"post",data:t})}function h(t){return(0,s.Ay)({url:"/api/users/set-vip",method:"post",data:t})}function _(t){return(0,s.Ay)({url:"/api/users/system-strategies",method:"get",params:t})}function S(t){return(0,s.Ay)({url:"/api/users/admin-orders",method:"get",params:t})}function w(t){return(0,s.Ay)({url:"/api/users/admin-ai-stats",method:"get",params:t})}}}]); \ No newline at end of file diff --git a/frontend/dist/js/878.2260ef30.js b/frontend/dist/js/878.2260ef30.js deleted file mode 100644 index eb89edb..0000000 --- a/frontend/dist/js/878.2260ef30.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[878],{18878:function(t,e,a){a.r(e),a.d(e,{default:function(){return Mt}});a(74423);var s=function(){var t,e=this,a=e._self._c;return a("div",{staticClass:"trading-assistant",class:{"theme-dark":e.isDarkTheme}},[a("div",{staticClass:"assistant-guide-bar"},[a("div",{staticClass:"assistant-guide-copy"},[a("div",{staticClass:"assistant-guide-eyebrow"},[e._v(e._s(e.$t("trading-assistant.guide.eyebrow")))]),a("div",{staticClass:"assistant-guide-title"},[e._v(e._s(e.$t("trading-assistant.guide.title")))]),a("div",{staticClass:"assistant-guide-desc"},[e._v(e._s(e.$t("trading-assistant.guide.desc")))])]),a("div",{staticClass:"assistant-guide-steps"},[a("div",{staticClass:"assistant-step-card"},[a("div",{staticClass:"assistant-step-index"},[e._v("1")]),a("div",{staticClass:"assistant-step-body"},[a("div",{staticClass:"assistant-step-title"},[e._v(e._s(e.$t("trading-assistant.guide.step1Title")))]),a("div",{staticClass:"assistant-step-desc"},[e._v(e._s(e.$t("trading-assistant.guide.step1Desc")))])])]),a("div",{staticClass:"assistant-step-card"},[a("div",{staticClass:"assistant-step-index"},[e._v("2")]),a("div",{staticClass:"assistant-step-body"},[a("div",{staticClass:"assistant-step-title"},[e._v(e._s(e.$t("trading-assistant.guide.step2Title")))]),a("div",{staticClass:"assistant-step-desc"},[e._v(e._s(e.$t("trading-assistant.guide.step2Desc")))])])]),a("div",{staticClass:"assistant-step-card"},[a("div",{staticClass:"assistant-step-index"},[e._v("3")]),a("div",{staticClass:"assistant-step-body"},[a("div",{staticClass:"assistant-step-title"},[e._v(e._s(e.$t("trading-assistant.guide.step3Title")))]),a("div",{staticClass:"assistant-step-desc"},[e._v(e._s(e.$t("trading-assistant.guide.step3Desc")))])])])]),a("div",{staticClass:"assistant-guide-actions"},[a("a-button",{on:{click:e.goToStrategyTab}},[a("a-icon",{attrs:{type:"appstore"}}),e._v(" "+e._s(e.$t("trading-assistant.guide.secondary"))+" ")],1),a("a-button",{attrs:{type:"primary"},on:{click:e.openCreateStrategyFromGuide}},[a("a-icon",{attrs:{type:"plus"}}),e._v(" "+e._s(e.$t("trading-assistant.guide.primary"))+" ")],1)],1)]),a("a-tabs",{staticClass:"top-level-tabs",attrs:{animated:!1},model:{value:e.topTab,callback:function(t){e.topTab=t},expression:"topTab"}},[a("a-tab-pane",{key:"overview",attrs:{tab:e.$t("trading-assistant.tabs.overview")}},["overview"===e.topTab?a("dashboard-overview"):e._e()],1),a("a-tab-pane",{key:"strategy",attrs:{tab:e.$t("trading-assistant.tabs.strategyManage")}},[a("a-row",{staticClass:"strategy-layout",attrs:{gutter:24}},[a("a-col",{staticClass:"strategy-list-col",attrs:{xs:24,sm:24,md:10,lg:8,xl:8}},[a("a-card",{staticClass:"strategy-list-card",attrs:{bordered:!1}},[a("div",{staticClass:"card-title",attrs:{slot:"title"},slot:"title"},[a("span",[e._v(e._s(e.$t("trading-assistant.strategyList")))]),a("a-button",{attrs:{type:"primary",size:"small"},on:{click:e.handleCreateStrategy}},[a("a-icon",{attrs:{type:"plus"}}),e._v(" "+e._s(e.$t("trading-assistant.createStrategy"))+" ")],1)],1),a("div",{staticClass:"group-mode-switch"},[a("span",{staticClass:"group-mode-label"},[e._v(e._s(e.$t("trading-assistant.groupBy"))+":")]),a("a-radio-group",{attrs:{size:"small","button-style":"solid"},model:{value:e.groupByMode,callback:function(t){e.groupByMode=t},expression:"groupByMode"}},[a("a-radio-button",{attrs:{value:"strategy"}},[a("a-icon",{attrs:{type:"folder"}}),e._v(" "+e._s(e.$t("trading-assistant.groupByStrategy"))+" ")],1),a("a-radio-button",{attrs:{value:"symbol"}},[a("a-icon",{attrs:{type:"stock"}}),e._v(" "+e._s(e.$t("trading-assistant.groupBySymbol"))+" ")],1)],1)],1),a("a-spin",{attrs:{spinning:e.loading}},[e.loading||0!==e.strategies.length?a("div",{staticClass:"strategy-grouped-list"},[e._l(e.groupedStrategies.groups,function(t){return a("div",{key:t.id,staticClass:"strategy-group"},[a("div",{staticClass:"strategy-group-header",on:{click:function(a){return e.toggleGroup(t.id)}}},[a("div",{staticClass:"group-header-left"},[a("a-icon",{staticClass:"collapse-icon",attrs:{type:e.collapsedGroups[t.id]?"right":"down"}}),a("a-icon",{staticClass:"group-icon",attrs:{type:"symbol"===e.groupByMode?"stock":"folder"}}),a("span",{staticClass:"group-name"},[e._v(e._s(t.baseName))]),a("a-tag",{attrs:{size:"small",color:"blue"}},[e._v(e._s(t.strategies.length)+" "+e._s("symbol"===e.groupByMode?e.$t("trading-assistant.strategyCount"):e.$t("trading-assistant.symbolCount")))])],1),a("div",{staticClass:"group-header-right",on:{click:function(t){t.stopPropagation()}}},[t.runningCount>0?a("span",{staticClass:"group-status running"},[e._v(" "+e._s(t.runningCount)+" "+e._s(e.$t("trading-assistant.status.running"))+" ")]):e._e(),t.stoppedCount>0?a("span",{staticClass:"group-status stopped"},[e._v(" "+e._s(t.stoppedCount)+" "+e._s(e.$t("trading-assistant.status.stopped"))+" ")]):e._e(),a("a-dropdown",{attrs:{getPopupContainer:e.getDropdownContainer,trigger:["click"]}},[a("a-menu",{attrs:{slot:"overlay"},on:{click:function(a){var s=a.key;return e.handleGroupMenuClick(s,t)}},slot:"overlay"},[a("a-menu-item",{key:"startAll"},[a("a-icon",{attrs:{type:"play-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.startAll"))+" ")],1),a("a-menu-item",{key:"stopAll"},[a("a-icon",{attrs:{type:"pause-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.stopAll"))+" ")],1),a("a-menu-divider"),a("a-menu-item",{key:"deleteAll",staticClass:"danger-item"},[a("a-icon",{attrs:{type:"delete"}}),e._v(" "+e._s(e.$t("trading-assistant.deleteAll"))+" ")],1)],1),a("a-button",{attrs:{type:"link",icon:"more",size:"small"}})],1)],1)]),a("div",{directives:[{name:"show",rawName:"v-show",value:!e.collapsedGroups[t.id],expression:"!collapsedGroups[group.id]"}],staticClass:"strategy-group-content"},e._l(t.strategies,function(t){return a("div",{key:t.id,class:["strategy-list-item",{active:e.selectedStrategy&&e.selectedStrategy.id===t.id}],on:{click:function(a){return e.handleSelectStrategy(t)}}},[a("div",{staticClass:"strategy-item-content"},[a("div",{staticClass:"strategy-item-header"},[a("div",{staticClass:"strategy-name-wrapper"},["strategy"===e.groupByMode?[t.trading_config&&t.trading_config.symbol?a("span",{staticClass:"info-item"},[a("a-icon",{attrs:{type:"dollar"}}),e._v(" "+e._s(t.trading_config.symbol)+" ")],1):e._e()]:[a("span",{staticClass:"info-item strategy-name-text"},[a("a-icon",{attrs:{type:"thunderbolt"}}),e._v(" "+e._s(t.displayInfo?t.displayInfo.strategyName:t.strategy_name)+" ")],1),t.displayInfo&&t.displayInfo.timeframe?a("a-tag",{attrs:{size:"small",color:"cyan"}},[a("a-icon",{staticStyle:{"margin-right":"2px"},attrs:{type:"clock-circle"}}),e._v(" "+e._s(t.displayInfo.timeframe)+" ")],1):e._e(),t.displayInfo&&t.displayInfo.indicatorName&&"-"!==t.displayInfo.indicatorName?a("a-tag",{attrs:{size:"small",color:"purple"}},[a("a-icon",{staticStyle:{"margin-right":"2px"},attrs:{type:"line-chart"}}),e._v(" "+e._s(t.displayInfo.indicatorName)+" ")],1):e._e()],"script"===t.strategy_mode?a("a-tag",{staticStyle:{"margin-left":"4px"},attrs:{size:"small",color:"green"}},[a("a-icon",{staticStyle:{"margin-right":"2px"},attrs:{type:"code"}}),e._v(e._s(e.$t("trading-assistant.strategyMode.script"))+" ")],1):e._e(),a("span",{staticClass:"status-label",class:[t.status?"status-".concat(t.status):"",{"status-stopped":"stopped"===t.status}]},[e._v(" "+e._s(e.getStatusText(t.status))+" ")])],2)])]),a("div",{staticClass:"strategy-item-actions",on:{click:function(t){t.stopPropagation()}}},[a("a-dropdown",{attrs:{getPopupContainer:e.getDropdownContainer,trigger:["click"]}},[a("a-menu",{attrs:{slot:"overlay"},on:{click:function(a){var s=a.key;return e.handleMenuClick(s,t)}},slot:"overlay"},["stopped"===t.status?a("a-menu-item",{key:"start"},[a("a-icon",{attrs:{type:"play-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.startStrategy"))+" ")],1):e._e(),"running"===t.status?a("a-menu-item",{key:"stop"},[a("a-icon",{attrs:{type:"pause-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.stopStrategy"))+" ")],1):e._e(),a("a-menu-divider"),a("a-menu-item",{key:"edit"},[a("a-icon",{attrs:{type:"edit"}}),e._v(" "+e._s(e.$t("trading-assistant.editStrategy"))+" ")],1),a("a-menu-item",{key:"backtest"},[a("a-icon",{attrs:{type:"experiment"}}),e._v(" "+e._s(e.$t("dashboard.indicator.action.backtest"))+" ")],1),a("a-menu-divider"),a("a-menu-item",{key:"delete",staticClass:"danger-item"},[a("a-icon",{attrs:{type:"delete"}}),e._v(" "+e._s(e.$t("trading-assistant.deleteStrategy"))+" ")],1)],1),a("a-button",{attrs:{type:"link",icon:"more",size:"small"}})],1)],1)])}),0)])}),e._l(e.groupedStrategies.ungrouped,function(t){return a("div",{key:t.id,class:["strategy-list-item",{active:e.selectedStrategy&&e.selectedStrategy.id===t.id}],on:{click:function(a){return e.handleSelectStrategy(t)}}},[a("div",{staticClass:"strategy-item-content"},[a("div",{staticClass:"strategy-item-header"},[a("div",{staticClass:"strategy-name-wrapper"},[t.exchange_config&&t.exchange_config.exchange_id?a("a-tag",{staticClass:"exchange-tag",attrs:{color:e.getExchangeTagColor(t.exchange_config.exchange_id),size:"small"}},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"bank"}}),e._v(" "+e._s(e.getExchangeDisplayName(t.exchange_config.exchange_id))+" ")],1):e._e(),a("span",{staticClass:"strategy-name"},[e._v(e._s(t.strategy_name))]),"PromptBasedStrategy"===t.strategy_type?a("a-tag",{staticClass:"strategy-type-tag",attrs:{color:"purple",size:"small"}},[a("a-icon",{staticStyle:{"margin-right":"2px"},attrs:{type:"robot"}}),e._v(" AI ")],1):e._e()],1)]),a("div",{staticClass:"strategy-item-info"},[t.trading_config&&t.trading_config.symbol?a("span",{staticClass:"info-item"},[a("a-icon",{attrs:{type:"dollar"}}),e._v(" "+e._s(t.trading_config.symbol)+" ")],1):e._e(),a("span",{staticClass:"status-label",class:[t.status?"status-".concat(t.status):"",{"status-stopped":"stopped"===t.status}]},[e._v(" "+e._s(e.getStatusText(t.status))+" ")])])]),a("div",{staticClass:"strategy-item-actions",on:{click:function(t){t.stopPropagation()}}},[a("a-dropdown",{attrs:{getPopupContainer:e.getDropdownContainer,trigger:["click"]}},[a("a-menu",{attrs:{slot:"overlay"},on:{click:function(a){var s=a.key;return e.handleMenuClick(s,t)}},slot:"overlay"},["stopped"===t.status?a("a-menu-item",{key:"start"},[a("a-icon",{attrs:{type:"play-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.startStrategy"))+" ")],1):e._e(),"running"===t.status?a("a-menu-item",{key:"stop"},[a("a-icon",{attrs:{type:"pause-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.stopStrategy"))+" ")],1):e._e(),a("a-menu-divider"),a("a-menu-item",{key:"edit"},[a("a-icon",{attrs:{type:"edit"}}),e._v(" "+e._s(e.$t("trading-assistant.editStrategy"))+" ")],1),a("a-menu-item",{key:"backtest"},[a("a-icon",{attrs:{type:"experiment"}}),e._v(" "+e._s(e.$t("dashboard.indicator.action.backtest"))+" ")],1),a("a-menu-divider"),a("a-menu-item",{key:"delete",staticClass:"danger-item"},[a("a-icon",{attrs:{type:"delete"}}),e._v(" "+e._s(e.$t("trading-assistant.deleteStrategy"))+" ")],1)],1),a("a-button",{attrs:{type:"link",icon:"more",size:"small"}})],1)],1)])})],2):a("div",{staticClass:"strategy-empty-state"},[a("a-empty",{attrs:{description:e.$t("trading-assistant.empty.title")}}),a("div",{staticClass:"strategy-empty-desc"},[e._v(e._s(e.$t("trading-assistant.empty.desc")))]),a("div",{staticClass:"strategy-empty-path"},[e._v(e._s(e.$t("trading-assistant.empty.path")))]),a("a-button",{attrs:{type:"primary"},on:{click:e.openCreateStrategyFromGuide}},[a("a-icon",{attrs:{type:"plus"}}),e._v(" "+e._s(e.$t("trading-assistant.empty.primary"))+" ")],1)],1)])],1)],1),a("a-col",{staticClass:"strategy-detail-col",attrs:{xs:24,sm:24,md:14,lg:16,xl:16}},[e.selectedStrategy?a("div",{staticClass:"strategy-detail-panel"},[a("a-card",{staticClass:"strategy-header-card",attrs:{bordered:!1}},[a("div",{staticClass:"strategy-header"},[a("div",{staticClass:"header-left"},[a("div",{staticClass:"strategy-title-row"},[a("h3",{staticClass:"strategy-title"},[e._v(e._s(e.selectedStrategy.strategy_name))]),a("div",{staticClass:"status-badge",class:["status-".concat(e.selectedStrategy.status)]},[a("span",{staticClass:"status-dot"}),e._v(" "+e._s(e.getStatusText(e.selectedStrategy.status))+" ")])]),a("div",{staticClass:"key-stats-grid"},[e.selectedStrategy.initial_capital||e.selectedStrategy.trading_config&&e.selectedStrategy.trading_config.initial_capital?a("div",{staticClass:"stat-card"},[a("div",{staticClass:"stat-icon investment"},[a("a-icon",{attrs:{type:"wallet"}})],1),a("div",{staticClass:"stat-content"},[a("div",{staticClass:"stat-label"},[e._v(e._s(e.$t("trading-assistant.detail.totalInvestment")))]),a("div",{staticClass:"stat-value"},[e._v("$"+e._s(parseFloat(e.selectedStrategy.initial_capital||(null===(t=e.selectedStrategy.trading_config)||void 0===t?void 0:t.initial_capital)||0).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})))])])]):e._e(),null!==e.currentEquity?a("div",{staticClass:"stat-card"},[a("div",{staticClass:"stat-icon equity"},[a("a-icon",{attrs:{type:"fund"}})],1),a("div",{staticClass:"stat-content"},[a("div",{staticClass:"stat-label"},[e._v(e._s(e.$t("trading-assistant.detail.currentEquity")))]),a("div",{staticClass:"stat-value",class:e.getEquityColorClass},[e._v(e._s(e.formatCurrency(e.currentEquity)))])])]):e._e(),null!==e.totalPnl?a("div",{staticClass:"stat-card pnl-card",class:{profit:e.totalPnl>0,loss:e.totalPnl<0}},[a("div",{staticClass:"stat-icon pnl"},[a("a-icon",{attrs:{type:e.totalPnl>=0?"rise":"fall"}})],1),a("div",{staticClass:"stat-content"},[a("div",{staticClass:"stat-label"},[e._v(e._s(e.$t("trading-assistant.detail.totalPnl")))]),a("div",{staticClass:"stat-value",class:e.getPnlColorClass},[e._v(" "+e._s(e.formatPnl(e.totalPnl))+" "),a("span",{staticClass:"pnl-percent"},[e._v("("+e._s(e.formatPnlPercent(e.totalPnlPercent))+")")])])])]):e._e()]),a("div",{staticClass:"strategy-tags"},[e.selectedStrategy.trading_config?a("div",{staticClass:"tag-item"},[a("a-icon",{attrs:{type:"stock"}}),a("span",[e._v(e._s(e.selectedStrategy.trading_config.symbol))])],1):e._e(),e.selectedStrategy.indicator_config&&e.selectedStrategy.indicator_config.indicator_name?a("div",{staticClass:"tag-item"},[a("a-icon",{attrs:{type:"line-chart"}}),a("span",[e._v(e._s(e.selectedStrategy.indicator_config.indicator_name))])],1):e._e(),e.selectedStrategy.trading_config?a("div",{staticClass:"tag-item"},[a("a-icon",{attrs:{type:"thunderbolt"}}),a("span",[e._v(e._s(e.selectedStrategy.trading_config.leverage||1)+"x")])],1):e._e(),e.selectedStrategy.trading_config&&e.selectedStrategy.trading_config.trade_direction?a("div",{staticClass:"tag-item"},[a("a-icon",{attrs:{type:"swap"}}),a("span",[e._v(e._s(e.getTradeDirectionText(e.selectedStrategy.trading_config.trade_direction)))])],1):e._e(),e.selectedStrategy.trading_config&&e.selectedStrategy.trading_config.timeframe?a("div",{staticClass:"tag-item"},[a("a-icon",{attrs:{type:"clock-circle"}}),a("span",[e._v(e._s(e.selectedStrategy.trading_config.timeframe))])],1):e._e()])]),a("div",{staticClass:"header-right"},["stopped"===e.selectedStrategy.status?a("a-button",{staticClass:"action-btn start-btn",attrs:{type:"primary",size:"large"},on:{click:function(t){return e.handleStartStrategy(e.selectedStrategy.id)}}},[a("a-icon",{attrs:{type:"play-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.startStrategy"))+" ")],1):e._e(),"running"===e.selectedStrategy.status?a("a-button",{staticClass:"action-btn stop-btn",attrs:{type:"danger",size:"large"},on:{click:function(t){return e.handleStopStrategy(e.selectedStrategy.id)}}},[a("a-icon",{attrs:{type:"pause-circle"}}),e._v(" "+e._s(e.$t("trading-assistant.stopStrategy"))+" ")],1):e._e()],1)])]),a("a-card",{staticClass:"strategy-content-card",attrs:{bordered:!1}},[a("a-tabs",{attrs:{defaultActiveKey:"positions"}},[a("a-tab-pane",{key:"positions",attrs:{tab:e.$t("trading-assistant.tabs.positions")}},[a("position-records",{attrs:{"strategy-id":e.selectedStrategy.id,"market-type":e.selectedStrategy.trading_config&&e.selectedStrategy.trading_config.market_type||"swap",leverage:e.selectedStrategy.trading_config&&e.selectedStrategy.trading_config.leverage||1,loading:e.loadingRecords}})],1),a("a-tab-pane",{key:"trades",attrs:{tab:e.$t("trading-assistant.tabs.tradingRecords")}},[a("trading-records",{attrs:{"strategy-id":e.selectedStrategy.id,loading:e.loadingRecords}})],1),a("a-tab-pane",{key:"performance",attrs:{tab:e.$t("trading-assistant.tabs.performance")}},[a("performance-analysis",{attrs:{"strategy-id":e.selectedStrategy.id,"is-dark":e.isDarkTheme}})],1),a("a-tab-pane",{key:"logs",attrs:{tab:e.$t("trading-assistant.tabs.logs")}},[a("strategy-logs",{attrs:{"strategy-id":e.selectedStrategy.id,"is-dark":e.isDarkTheme}})],1)],1)],1)],1):a("div",{staticClass:"empty-detail"},[a("a-empty",{attrs:{description:e.$t("trading-assistant.selectStrategy")}})],1)])],1),a("a-modal",{staticClass:"mode-selector-modal",attrs:{visible:e.showModeSelector,title:e.$t("trading-assistant.selectMode"),width:e.isMobile?"95%":700,footer:null,maskClosable:!0,bodyStyle:{padding:"16px 24px"}},on:{cancel:function(t){e.showModeSelector=!1}}},[a("strategy-type-selector",{attrs:{selected:e.strategyMode,"is-dark":e.isDarkTheme},on:{select:e.handleModeSelect,"use-template":e.handleUseTemplate}})],1),a("a-modal",{attrs:{visible:e.showFormModal,title:e.editingStrategy?e.$t("trading-assistant.editStrategy"):e.$t("trading-assistant.createStrategy")+("script"===e.strategyMode?" - "+e.$t("trading-assistant.strategyMode.script"):""),width:e.isMobile?"95%":1120,confirmLoading:e.saving,maskClosable:!1,wrapClassName:e.strategyFormWrapClass,bodyStyle:{maxHeight:"76vh",overflowY:"auto",paddingBottom:"8px"}},on:{ok:e.handleSubmit,cancel:e.handleCloseModal}},[a("a-spin",{attrs:{spinning:e.loadingIndicators}},[e.editingStrategy||"script"===e.strategyMode?e._e():a("div",{staticClass:"creation-mode-toggle"},[a("div",{staticClass:"mode-meta"},[a("div",{staticClass:"mode-title"},[e._v(e._s(e.$t("trading-assistant.selectMode")))]),a("div",{staticClass:"mode-hint"},[e._v(e._s(e.isSimpleMode?e.$t("trading-assistant.form.simpleModeHint"):e.$t("trading-assistant.form.advancedModeHint")))])]),a("a-radio-group",{attrs:{size:"small","button-style":"solid"},model:{value:e.creationMode,callback:function(t){e.creationMode=t},expression:"creationMode"}},[a("a-radio-button",{attrs:{value:"simple"}},[a("a-icon",{attrs:{type:"rocket"}}),e._v(" "+e._s(e.$t("trading-assistant.form.simpleMode"))+" ")],1),a("a-radio-button",{attrs:{value:"advanced"}},[a("a-icon",{attrs:{type:"setting"}}),e._v(" "+e._s(e.$t("trading-assistant.form.advancedMode"))+" ")],1)],1)],1),a("a-steps",{staticClass:"steps-container",attrs:{current:e.displayCurrentStep}},["script"===e.strategyMode?[a("a-step",{attrs:{title:e.$t("trading-assistant.form.simpleStep1")}}),a("a-step",{attrs:{title:e.$t("trading-assistant.editor.title")}}),a("a-step",{attrs:{title:e.$t("trading-assistant.form.step3Signal")}})]:[a("a-step",{attrs:{title:e.isSimpleMode&&!e.editingStrategy?e.$t("trading-assistant.form.simpleStep1"):e.$t("trading-assistant.form.step1")}}),e.isAdvancedMode||e.editingStrategy?a("a-step",{attrs:{title:e.$t("trading-assistant.form.step2Params")}}):e._e(),a("a-step",{attrs:{title:e.isSimpleMode&&!e.editingStrategy?e.$t("trading-assistant.form.simpleStep2"):e.$t("trading-assistant.form.step3Signal")}})]],2),a("div",{staticClass:"form-container"},[a("div",{directives:[{name:"show",rawName:"v-show",value:0===e.currentStep,expression:"currentStep === 0"}],staticClass:"step-content"},["indicator"===e.strategyType&&"script"!==e.strategyMode?a("div",[a("a-form",{attrs:{form:e.form,layout:"vertical"}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.indicator")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["indicator_id",{rules:[{required:!0,message:e.$t("trading-assistant.validation.indicatorRequired")}]}],expression:"['indicator_id', { rules: [{ required: true, message: $t('trading-assistant.validation.indicatorRequired') }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.selectIndicator"),"show-search":"",optionLabelProp:"label","filter-option":e.filterIndicatorOption,loading:e.loadingIndicators,getPopupContainer:function(t){return t.parentNode}},on:{focus:e.handleIndicatorSelectFocus,change:e.handleIndicatorChange}},e._l(e.availableIndicators,function(t){return a("a-select-option",{key:String(t.id),attrs:{value:String(t.id),label:e.getIndicatorOptionLabel(t)}},[a("div",{staticClass:"indicator-option"},[a("div",{staticClass:"indicator-option-main"},[a("span",{staticClass:"indicator-name"},[e._v(e._s(t.name))]),t.description?a("span",{staticClass:"indicator-option-desc"},[e._v(e._s(t.description))]):e._e()]),t.type?a("a-tag",{attrs:{size:"small",color:e.getIndicatorTypeColor(t.type)}},[e._v(" "+e._s(e.getIndicatorTypeName(t.type))+" ")]):e._e()],1)])}),1),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.indicatorHint"))+" ")])],1),e.selectedIndicator?a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.indicatorDescription")}},[a("div",{staticClass:"selected-indicator-card"},[a("div",{staticClass:"selected-indicator-header"},[a("span",{staticClass:"selected-indicator-name"},[e._v(e._s(e.selectedIndicator.name))]),e.selectedIndicator.type?a("a-tag",{attrs:{size:"small",color:e.getIndicatorTypeColor(e.selectedIndicator.type)}},[e._v(" "+e._s(e.getIndicatorTypeName(e.selectedIndicator.type))+" ")]):e._e()],1),a("div",{staticClass:"indicator-description"},[e._v(" "+e._s(e.selectedIndicator.description||e.$t("trading-assistant.form.noDescription"))+" ")])])]):e._e(),e.indicatorParams.length>0?a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.indicatorParams")}},[a("div",{staticClass:"indicator-params-form"},[a("a-row",{attrs:{gutter:16}},e._l(e.indicatorParams,function(t){return a("a-col",{key:t.name,attrs:{xs:24,sm:12,md:8}},[a("div",{staticClass:"param-item"},[a("label",{staticClass:"param-label"},[e._v(" "+e._s(t.name)+" "),t.description?a("a-tooltip",{attrs:{title:t.description}},[a("a-icon",{staticStyle:{"margin-left":"4px",color:"#999"},attrs:{type:"question-circle"}})],1):e._e()],1),"int"===t.type?a("a-input-number",{staticStyle:{width:"100%"},attrs:{precision:0,size:"small"},model:{value:e.indicatorParamValues[t.name],callback:function(a){e.$set(e.indicatorParamValues,t.name,a)},expression:"indicatorParamValues[param.name]"}}):"float"===t.type?a("a-input-number",{staticStyle:{width:"100%"},attrs:{precision:4,size:"small"},model:{value:e.indicatorParamValues[t.name],callback:function(a){e.$set(e.indicatorParamValues,t.name,a)},expression:"indicatorParamValues[param.name]"}}):"bool"===t.type?a("a-switch",{attrs:{size:"small"},model:{value:e.indicatorParamValues[t.name],callback:function(a){e.$set(e.indicatorParamValues,t.name,a)},expression:"indicatorParamValues[param.name]"}}):a("a-input",{attrs:{size:"small"},model:{value:e.indicatorParamValues[t.name],callback:function(a){e.$set(e.indicatorParamValues,t.name,a)},expression:"indicatorParamValues[param.name]"}})],1)])}),1),a("div",{staticClass:"form-item-hint",staticStyle:{"margin-top":"8px"}},[e._v(" "+e._s(e.$t("trading-assistant.form.indicatorParamsHint"))+" ")])],1)]):e._e(),a("a-divider"),a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.strategyName")}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["strategy_name",{rules:[{required:!0,message:e.$t("trading-assistant.validation.strategyNameRequired")}]}],expression:"['strategy_name', { rules: [{ required: true, message: $t('trading-assistant.validation.strategyNameRequired') }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.inputStrategyName")}}),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.strategyNameHint"))+" ")])],1),e.isSimpleMode&&!e.editingStrategy?a("div",{staticClass:"simple-essentials-card"},[a("div",{staticClass:"simple-mode-hero"},[a("div",{staticClass:"simple-mode-hero-main"},[a("div",{staticClass:"simple-mode-kicker"},[e._v(e._s(e.$t("trading-assistant.form.simpleModePreset")))]),a("div",{staticClass:"simple-mode-hero-desc"},[e._v(e._s(e.$t("trading-assistant.form.simpleModePresetValue")))])]),a("div",{staticClass:"simple-mode-badges"},[a("a-tag",[e._v("15m")]),a("a-tag",{attrs:{color:"blue"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeFutures")))]),a("a-tag",{attrs:{color:"purple"}},[e._v("5x")])],1)]),a("div",{staticClass:"section-block-title"},[a("span",[e._v(e._s(e.$t("trading-assistant.form.simpleModeSectionCore")))]),a("span",{staticClass:"section-block-desc"},[e._v(e._s(e.$t("trading-assistant.form.simpleModeSectionCoreDesc")))])]),a("a-form-item",{staticClass:"compact-form-item"},[a("span",{staticClass:"required-label",attrs:{slot:"label"},slot:"label"},[a("span",{staticClass:"required-star"},[e._v("*")]),e._v(e._s(e.$t("trading-assistant.form.symbol"))+" ")]),a("a-select",{attrs:{value:e.selectedSymbols[0],placeholder:e.$t("trading-assistant.placeholders.selectSymbol"),"show-search":"","filter-option":e.filterWatchlistOptionWithAdd,loading:e.loadingWatchlist,"allow-clear":"",getPopupContainer:function(t){return t.parentNode}},on:{change:e.handleSimpleSymbolChange}},[e._l(e.watchlist,function(t){return a("a-select-option",{key:"".concat(t.market,":").concat(t.symbol),attrs:{value:"".concat(t.market,":").concat(t.symbol)}},[a("div",{staticClass:"symbol-option"},[a("a-tag",{staticStyle:{"margin-right":"8px","margin-bottom":"0"},attrs:{color:e.getMarketColor(t.market)}},[e._v(" "+e._s(t.market)+" ")]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.symbol))]),t.name?a("span",{staticClass:"symbol-name-extra"},[e._v(e._s(t.name))]):e._e()],1)])}),a("a-select-option",{key:"__add_symbol_option__",staticClass:"add-symbol-option",attrs:{value:"__add_symbol_option__"}},[a("div",{staticStyle:{width:"100%","text-align":"center",padding:"4px 0",color:"#1890ff",cursor:"pointer"}},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"plus"}}),a("span",[e._v(e._s(e.$t("trading-assistant.form.addSymbol")))])],1)])],2),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.symbolHintCrypto"))+" ")])],1),a("a-row",{staticClass:"compact-grid-row",attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.initialCapital")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["initial_capital",{rules:[{required:!0,message:e.$t("trading-assistant.validation.initialCapitalRequired")}],initialValue:1e3}],expression:"['initial_capital', { rules: [{ required: true, message: $t('trading-assistant.validation.initialCapitalRequired') }], initialValue: 1000 }]"}],staticStyle:{width:"100%"},attrs:{min:10,step:100,precision:2}})],1)],1),a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.leverage")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["leverage",{initialValue:5,rules:[{required:!0,message:e.$t("trading-assistant.validation.leverageRequired")}]}],expression:"['leverage', { initialValue: 5, rules: [{ required: true, message: $t('trading-assistant.validation.leverageRequired') }] }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:"spot"===e.form.getFieldValue("market_type")?1:125,step:1,disabled:"spot"===e.form.getFieldValue("market_type")}})],1)],1)],1),a("a-row",{staticClass:"compact-grid-row",attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.marketType")}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["market_type",{initialValue:"swap"}],expression:"['market_type', { initialValue: 'swap' }]"}],on:{change:e.handleMarketTypeChange}},[a("a-radio",{attrs:{value:"swap"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeFutures")))]),a("a-radio",{attrs:{value:"spot"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeSpot")))])],1)],1)],1),a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.tradeDirection")}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["trade_direction",{initialValue:"long"}],expression:"['trade_direction', { initialValue: 'long' }]"}],attrs:{disabled:"spot"===e.form.getFieldValue("market_type")}},[a("a-radio",{attrs:{value:"long"}},[e._v(e._s(e.$t("trading-assistant.form.tradeDirectionLong")))]),a("a-radio",{attrs:{value:"short",disabled:"spot"===e.form.getFieldValue("market_type")}},[e._v(" "+e._s(e.$t("trading-assistant.form.tradeDirectionShort"))+" ")]),a("a-radio",{attrs:{value:"both",disabled:"spot"===e.form.getFieldValue("market_type")}},[e._v(" "+e._s(e.$t("trading-assistant.form.tradeDirectionBoth"))+" ")])],1)],1)],1)],1),a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.klinePeriod")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["timeframe",{initialValue:"15m",rules:[{required:!0}]}],expression:"['timeframe', { initialValue: '15m', rules: [{ required: true }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.selectKlinePeriod"),getPopupContainer:function(t){return t.parentNode}}},[a("a-select-option",{attrs:{value:"1m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1m")))]),a("a-select-option",{attrs:{value:"5m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe5m")))]),a("a-select-option",{attrs:{value:"15m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe15m")))]),a("a-select-option",{attrs:{value:"30m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe30m")))]),a("a-select-option",{attrs:{value:"1H"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1H")))]),a("a-select-option",{attrs:{value:"4H"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe4H")))]),a("a-select-option",{attrs:{value:"1D"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1D")))])],1)],1)],1):e._e(),e.isAdvancedMode||e.editingStrategy?a("div",{staticClass:"advanced-settings-shell"},[a("div",{staticClass:"section-block-title"},[a("span",[e._v(e._s(e.$t("trading-assistant.form.advancedMode")))]),a("span",{staticClass:"section-block-desc"},[e._v(e._s(e.$t("trading-assistant.form.advancedModeHint")))])]),a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.strategyType")}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["cs_strategy_type",{initialValue:"single"}],expression:"['cs_strategy_type', { initialValue: 'single' }]"}],on:{change:e.handleStrategyTypeChange}},[a("a-radio",{attrs:{value:"single"}},[e._v(e._s(e.$t("trading-assistant.form.strategyTypeSingle")))]),a("a-radio",{attrs:{value:"cross_sectional"}},[e._v(e._s(e.$t("trading-assistant.form.strategyTypeCrossSectional")))])],1),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.strategyTypeHint"))+" ")])],1)],1):e._e(),(e.isAdvancedMode||e.editingStrategy)&&"cross_sectional"===e.form.getFieldValue("cs_strategy_type")?[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.symbolList")}},[a("a-select",{attrs:{mode:"multiple",placeholder:e.$t("trading-assistant.placeholders.selectSymbols"),"show-search":"","filter-option":e.filterWatchlistOptionWithAdd,loading:e.loadingWatchlist,getPopupContainer:function(t){return t.parentNode},maxTagCount:5},on:{change:e.handleCrossSectionalSymbolChange},model:{value:e.crossSectionalSymbols,callback:function(t){e.crossSectionalSymbols=t},expression:"crossSectionalSymbols"}},[e._l(e.watchlist,function(t){return a("a-select-option",{key:"".concat(t.market,":").concat(t.symbol),attrs:{value:"".concat(t.market,":").concat(t.symbol)}},[a("div",{staticClass:"symbol-option"},[a("a-tag",{staticStyle:{"margin-right":"8px","margin-bottom":"0"},attrs:{color:e.getMarketColor(t.market)}},[e._v(" "+e._s(t.market)+" ")]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.symbol))]),t.name?a("span",{staticClass:"symbol-name-extra"},[e._v(e._s(t.name))]):e._e()],1)])}),a("a-select-option",{key:"__add_symbol_option__",staticClass:"add-symbol-option",attrs:{value:"__add_symbol_option__"}},[a("div",{staticStyle:{width:"100%","text-align":"center",padding:"4px 0",color:"#1890ff",cursor:"pointer"}},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"plus"}}),a("span",[e._v(e._s(e.$t("trading-assistant.form.addSymbol")))])],1)])],2),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.symbolListHint"))+" ")])],1),a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.portfolioSize")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["portfolio_size",{initialValue:10,rules:[{required:!0,message:e.$t("trading-assistant.validation.portfolioSizeRequired")}]}],expression:"['portfolio_size', { initialValue: 10, rules: [{ required: true, message: $t('trading-assistant.validation.portfolioSizeRequired') }] }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:100,step:1}}),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.portfolioSizeHint"))+" ")])],1)],1),a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.longRatio")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["long_ratio",{initialValue:.5,rules:[{required:!0,message:e.$t("trading-assistant.validation.longRatioRequired")}]}],expression:"['long_ratio', { initialValue: 0.5, rules: [{ required: true, message: $t('trading-assistant.validation.longRatioRequired') }] }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:1,step:.1,precision:2}}),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.longRatioHint"))+" ")])],1)],1)],1),a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.rebalanceFrequency")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["rebalance_frequency",{initialValue:"daily"}],expression:"['rebalance_frequency', { initialValue: 'daily' }]"}],staticStyle:{width:"100%"}},[a("a-select-option",{attrs:{value:"daily"}},[e._v(e._s(e.$t("trading-assistant.form.rebalanceDaily")))]),a("a-select-option",{attrs:{value:"weekly"}},[e._v(e._s(e.$t("trading-assistant.form.rebalanceWeekly")))]),a("a-select-option",{attrs:{value:"monthly"}},[e._v(e._s(e.$t("trading-assistant.form.rebalanceMonthly")))])],1),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.rebalanceFrequencyHint"))+" ")])],1)]:e._e(),(e.isAdvancedMode||e.editingStrategy)&&"cross_sectional"!==e.form.getFieldValue("cs_strategy_type")?a("a-form-item",{attrs:{label:e.isEditMode?e.$t("trading-assistant.form.symbol"):e.$t("trading-assistant.form.symbols")}},[e.isEditMode?a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["symbol",{rules:[{required:!0,message:e.$t("trading-assistant.validation.symbolRequired")}]}],expression:"['symbol', { rules: [{ required: true, message: $t('trading-assistant.validation.symbolRequired') }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.selectSymbol"),"show-search":"","filter-option":e.filterWatchlistOption,loading:e.loadingWatchlist,getPopupContainer:function(t){return t.parentNode}},on:{change:e.handleWatchlistSymbolChange}},[e._l(e.watchlist,function(t){return a("a-select-option",{key:"".concat(t.market,":").concat(t.symbol),attrs:{value:"".concat(t.market,":").concat(t.symbol)}},[a("div",{staticClass:"symbol-option"},[a("a-tag",{staticStyle:{"margin-right":"8px","margin-bottom":"0"},attrs:{color:e.getMarketColor(t.market)}},[e._v(" "+e._s(t.market)+" ")]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.symbol))]),t.name?a("span",{staticClass:"symbol-name-extra"},[e._v(e._s(t.name))]):e._e()],1)])}),a("a-select-option",{key:"__add_symbol_option__",staticClass:"add-symbol-option",attrs:{value:"__add_symbol_option__"}},[a("div",{staticStyle:{width:"100%","text-align":"center",padding:"4px 0",color:"#1890ff",cursor:"pointer"}},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"plus"}}),a("span",[e._v(e._s(e.$t("trading-assistant.form.addSymbol")))])],1)])],2):a("a-select",{attrs:{mode:"multiple",placeholder:e.$t("trading-assistant.placeholders.selectSymbols"),"show-search":"","filter-option":e.filterWatchlistOptionWithAdd,loading:e.loadingWatchlist,getPopupContainer:function(t){return t.parentNode},maxTagCount:3},on:{change:e.handleMultiSymbolChangeWithAdd},model:{value:e.selectedSymbols,callback:function(t){e.selectedSymbols=t},expression:"selectedSymbols"}},[e._l(e.watchlist,function(t){return a("a-select-option",{key:"".concat(t.market,":").concat(t.symbol),attrs:{value:"".concat(t.market,":").concat(t.symbol)}},[a("div",{staticClass:"symbol-option"},[a("a-tag",{staticStyle:{"margin-right":"8px","margin-bottom":"0"},attrs:{color:e.getMarketColor(t.market)}},[e._v(" "+e._s(t.market)+" ")]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.symbol))]),t.name?a("span",{staticClass:"symbol-name-extra"},[e._v(e._s(t.name))]):e._e()],1)])}),a("a-select-option",{key:"__add_symbol_option__",staticClass:"add-symbol-option",attrs:{value:"__add_symbol_option__"}},[a("div",{staticStyle:{width:"100%","text-align":"center",padding:"4px 0",color:"#1890ff",cursor:"pointer"}},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"plus"}}),a("span",[e._v(e._s(e.$t("trading-assistant.form.addSymbol")))])],1)])],2),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.isEditMode?e.$t("trading-assistant.form.symbolHintCrypto"):e.$t("trading-assistant.form.symbolsHint"))+" ")])],1):e._e(),e.isAdvancedMode||e.editingStrategy?a("div",[a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:24,md:12,lg:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.initialCapital")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["initial_capital",{rules:[{required:!0,message:e.$t("trading-assistant.validation.initialCapitalRequired")}],initialValue:1e3}],expression:"['initial_capital', { rules: [{ required: true, message: $t('trading-assistant.validation.initialCapitalRequired') }], initialValue: 1000 }]"}],staticStyle:{width:"100%"},attrs:{min:10,step:100,precision:2}})],1)],1),a("a-col",{attrs:{xs:24,sm:24,md:12,lg:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.marketType")}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["market_type",{initialValue:"swap"}],expression:"['market_type', { initialValue: 'swap' }]"}],on:{change:e.handleMarketTypeChange}},[a("a-radio",{attrs:{value:"swap"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeFutures")))]),a("a-radio",{attrs:{value:"spot"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeSpot")))])],1),a("div",{staticClass:"form-item-hint"},[e._v(" "+e._s(e.$t("trading-assistant.form.marketTypeHint"))+" ")])],1)],1)],1),a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:24,md:12,lg:12}},[a("a-form-item",{attrs:{label:"".concat(e.$t("trading-assistant.form.leverage")," (x)")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["leverage",{initialValue:5,rules:[{required:!0,message:e.$t("trading-assistant.validation.leverageRequired")}]}],expression:"['leverage', { initialValue: 5, rules: [{ required: true, message: $t('trading-assistant.validation.leverageRequired') }] }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:"spot"===e.form.getFieldValue("market_type")?1:125,step:1,disabled:"spot"===e.form.getFieldValue("market_type")}}),a("div",{staticClass:"form-item-hint"},["spot"===e.form.getFieldValue("market_type")?a("span",[e._v(" "+e._s(e.$t("trading-assistant.form.spotLeverageFixed"))+" ")]):a("span",[e._v(" "+e._s(e.$t("trading-assistant.form.leverageHint"))+" ")])])],1)],1),a("a-col",{attrs:{xs:24,sm:24,md:12,lg:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.tradeDirection")}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["trade_direction",{initialValue:"long"}],expression:"['trade_direction', { initialValue: 'long' }]"}],attrs:{disabled:"spot"===e.form.getFieldValue("market_type")}},[a("a-radio",{attrs:{value:"long"}},[e._v(e._s(e.$t("trading-assistant.form.tradeDirectionLong")))]),a("a-radio",{attrs:{value:"short",disabled:"spot"===e.form.getFieldValue("market_type")}},[e._v(" "+e._s(e.$t("trading-assistant.form.tradeDirectionShort"))+" ")]),a("a-radio",{attrs:{value:"both",disabled:"spot"===e.form.getFieldValue("market_type")}},[e._v(" "+e._s(e.$t("trading-assistant.form.tradeDirectionBoth"))+" ")])],1),"spot"===e.form.getFieldValue("market_type")?a("div",{staticClass:"form-item-hint",staticStyle:{color:"#ff9800"}},[e._v(" "+e._s(e.$t("trading-assistant.form.spotOnlyLongHint"))+" ")]):e._e()],1)],1)],1),a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:24,md:12,lg:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.klinePeriod")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["timeframe",{initialValue:"15m",rules:[{required:!0}]}],expression:"['timeframe', { initialValue: '15m', rules: [{ required: true }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.selectKlinePeriod"),getPopupContainer:function(t){return t.parentNode}}},[a("a-select-option",{attrs:{value:"1m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1m")))]),a("a-select-option",{attrs:{value:"5m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe5m")))]),a("a-select-option",{attrs:{value:"15m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe15m")))]),a("a-select-option",{attrs:{value:"30m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe30m")))]),a("a-select-option",{attrs:{value:"1H"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1H")))]),a("a-select-option",{attrs:{value:"4H"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe4H")))]),a("a-select-option",{attrs:{value:"1D"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1D")))])],1)],1)],1),a("a-col",{attrs:{xs:24,sm:24,md:12,lg:12}})],1)],1):e._e()],2)],1):e._e(),"script"===e.strategyMode?a("div",[a("a-form",{attrs:{form:e.form,layout:"vertical"}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.strategyName")}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["strategy_name",{rules:[{required:!0,message:e.$t("trading-assistant.validation.strategyNameRequired")}]}],expression:"['strategy_name', { rules: [{ required: true, message: $t('trading-assistant.validation.strategyNameRequired') }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.inputStrategyName")}})],1),a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.symbol")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["symbol",{rules:[{required:!0,message:e.$t("trading-assistant.validation.symbolRequired")}]}],expression:"['symbol', { rules: [{ required: true, message: $t('trading-assistant.validation.symbolRequired') }] }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.selectSymbol"),"show-search":"","filter-option":e.filterWatchlistOption,loading:e.loadingWatchlist,getPopupContainer:function(t){return t.parentNode}},on:{change:e.handleWatchlistSymbolChange}},e._l(e.watchlist,function(t){return a("a-select-option",{key:"".concat(t.market,":").concat(t.symbol),attrs:{value:"".concat(t.market,":").concat(t.symbol)}},[a("div",{staticClass:"symbol-option"},[a("a-tag",{staticStyle:{"margin-right":"8px","margin-bottom":"0"},attrs:{color:e.getMarketColor(t.market)}},[e._v(" "+e._s(t.market)+" ")]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.symbol))]),t.name?a("span",{staticClass:"symbol-name-extra"},[e._v(e._s(t.name))]):e._e()],1)])}),1)],1),a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.initialCapital")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["initial_capital",{initialValue:1e3,rules:[{required:!0}]}],expression:"['initial_capital', { initialValue: 1000, rules: [{ required: true }] }]"}],staticStyle:{width:"100%"},attrs:{min:10,step:100,precision:2}})],1)],1),a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.klinePeriod")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["timeframe",{initialValue:"15m",rules:[{required:!0}]}],expression:"['timeframe', { initialValue: '15m', rules: [{ required: true }] }]"}],attrs:{getPopupContainer:function(t){return t.parentNode}}},[a("a-select-option",{attrs:{value:"1m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1m")))]),a("a-select-option",{attrs:{value:"5m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe5m")))]),a("a-select-option",{attrs:{value:"15m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe15m")))]),a("a-select-option",{attrs:{value:"30m"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe30m")))]),a("a-select-option",{attrs:{value:"1H"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1H")))]),a("a-select-option",{attrs:{value:"4H"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe4H")))]),a("a-select-option",{attrs:{value:"1D"}},[e._v(e._s(e.$t("trading-assistant.form.timeframe1D")))])],1)],1)],1)],1),a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:e.$t("trading-assistant.form.marketType")}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["market_type",{initialValue:"swap"}],expression:"['market_type', { initialValue: 'swap' }]"}]},[a("a-radio",{attrs:{value:"swap"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeFutures")))]),a("a-radio",{attrs:{value:"spot"}},[e._v(e._s(e.$t("trading-assistant.form.marketTypeSpot")))])],1)],1)],1),a("a-col",{attrs:{xs:24,sm:12}},[a("a-form-item",{attrs:{label:"".concat(e.$t("trading-assistant.form.leverage")," (x)")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["leverage",{initialValue:5}],expression:"['leverage', { initialValue: 5 }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:125,step:1}})],1)],1)],1)],1)],1):e._e()]),"script"===e.strategyMode?a("div",{directives:[{name:"show",rawName:"v-show",value:1===e.currentStep,expression:"currentStep === 1"}],staticClass:"step-content"},[a("strategy-editor",{ref:"strategyEditor",attrs:{"is-dark":e.isDarkTheme,"user-id":1,visible:e.showFormModal&&"script"===e.strategyMode&&1===e.currentStep,"initial-template-key":e.pendingScriptTemplateKey},model:{value:e.strategyCode,callback:function(t){e.strategyCode=t},expression:"strategyCode"}})],1):e._e(),a("div",{directives:[{name:"show",rawName:"v-show",value:"script"!==e.strategyMode&&1===e.currentStep,expression:"strategyMode !== 'script' && currentStep === 1"}],staticClass:"step-content"},["indicator"===e.strategyType?a("div",[a("a-form",{attrs:{form:e.form,layout:"vertical"}},[a("a-collapse",{staticStyle:{background:"#fafafa"},attrs:{bordered:!1},model:{value:e.backtestCollapseKeys,callback:function(t){e.backtestCollapseKeys=t},expression:"backtestCollapseKeys"}},[a("a-collapse-panel",{key:"risk",attrs:{header:e.$t("dashboard.indicator.backtest.panel.risk")}},[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.stopLossPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["stop_loss_pct",{initialValue:3}],expression:"['stop_loss_pct', { initialValue: 3 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.01,precision:4}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.takeProfitPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["take_profit_pct",{initialValue:6}],expression:"['take_profit_pct', { initialValue: 6 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trailingEnabled")}},[a("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["trailing_enabled",{valuePropName:"checked",initialValue:!1}],expression:"['trailing_enabled', { valuePropName: 'checked', initialValue: false }]"}],on:{change:e.onTrailingToggle}})],1)],1),a("a-col",{attrs:{span:12}})],1),e.trailingEnabledUi?[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trailingStopPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trailing_stop_pct",{initialValue:0}],expression:"['trailing_stop_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.01,precision:4}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trailingActivationPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trailing_activation_pct",{initialValue:0}],expression:"['trailing_activation_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1)],1)]:e._e()],2),a("a-collapse-panel",{key:"scale",attrs:{header:e.$t("dashboard.indicator.backtest.panel.scale")}},[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendAddEnabled")}},[a("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_add_enabled",{valuePropName:"checked",initialValue:!1}],expression:"['trend_add_enabled', { valuePropName: 'checked', initialValue: false }]"}],on:{change:e.onTrendAddToggle}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.dcaAddEnabled")}},[a("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["dca_add_enabled",{valuePropName:"checked",initialValue:!1}],expression:"['dca_add_enabled', { valuePropName: 'checked', initialValue: false }]"}],on:{change:e.onDcaAddToggle}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendAddStepPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_add_step_pct",{initialValue:0}],expression:"['trend_add_step_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4},on:{change:e.onScaleParamsChange}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.dcaAddStepPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["dca_add_step_pct",{initialValue:0}],expression:"['dca_add_step_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4},on:{change:e.onScaleParamsChange}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendAddSizePct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_add_size_pct",{initialValue:0}],expression:"['trend_add_size_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4},on:{change:e.onScaleParamsChange}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.dcaAddSizePct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["dca_add_size_pct",{initialValue:0}],expression:"['dca_add_size_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4},on:{change:e.onScaleParamsChange}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendAddMaxTimes")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_add_max_times",{initialValue:0}],expression:"['trend_add_max_times', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:50,step:1,precision:0},on:{change:e.onScaleParamsChange}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.dcaAddMaxTimes")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["dca_add_max_times",{initialValue:0}],expression:"['dca_add_max_times', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:50,step:1,precision:0},on:{change:e.onScaleParamsChange}})],1)],1)],1)],1),a("a-collapse-panel",{key:"reduce",attrs:{header:e.$t("dashboard.indicator.backtest.panel.reduce")}},[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendReduceEnabled")}},[a("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_reduce_enabled",{valuePropName:"checked",initialValue:!1}],expression:"['trend_reduce_enabled', { valuePropName: 'checked', initialValue: false }]"}]})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.adverseReduceEnabled")}},[a("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverse_reduce_enabled",{valuePropName:"checked",initialValue:!1}],expression:"['adverse_reduce_enabled', { valuePropName: 'checked', initialValue: false }]"}]})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendReduceStepPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_reduce_step_pct",{initialValue:0}],expression:"['trend_reduce_step_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.adverseReduceStepPct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverse_reduce_step_pct",{initialValue:0}],expression:"['adverse_reduce_step_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:1e3,step:.01,precision:4}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendReduceSizePct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_reduce_size_pct",{initialValue:0}],expression:"['trend_reduce_size_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.adverseReduceSizePct")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverse_reduce_size_pct",{initialValue:0}],expression:"['adverse_reduce_size_pct', { initialValue: 0 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:100,step:.1,precision:4}})],1)],1)],1),a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.trendReduceMaxTimes")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["trend_reduce_max_times",{initialValue:0}],expression:"['trend_reduce_max_times', { initialValue: 0 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:50,step:1,precision:0}})],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.adverseReduceMaxTimes")}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["adverse_reduce_max_times",{initialValue:0}],expression:"['adverse_reduce_max_times', { initialValue: 0 }]"}],staticStyle:{width:"100%"},attrs:{min:0,max:50,step:1,precision:0}})],1)],1)],1)],1),a("a-collapse-panel",{key:"position",attrs:{header:e.$t("dashboard.indicator.backtest.panel.position")}},[a("a-row",{attrs:{gutter:24}},[a("a-col",{attrs:{span:12}},[a("a-form-item",{attrs:{label:e.$t("dashboard.indicator.backtest.field.entryPct"),help:e.$t("dashboard.indicator.backtest.hint.entryPctMax",{maxPct:Number(e.entryPctMaxUi||0).toFixed(0)})}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["entry_pct",{initialValue:100}],expression:"['entry_pct', { initialValue: 100 }]"}],staticStyle:{width:"220px"},attrs:{min:0,max:e.entryPctMaxUi,step:.1,precision:4},on:{change:e.onEntryPctChange}})],1)],1),a("a-col",{attrs:{span:12}})],1)],1)],1),a("div",{staticClass:"ai-filter-box"},[a("div",{staticClass:"ai-filter-header"},[a("div",{staticClass:"ai-filter-title"},[a("a-icon",{attrs:{type:"robot"}}),a("span",[e._v(e._s(e.$t("trading-assistant.form.enableAiFilter")))])],1),a("a-switch",{attrs:{checked:e.aiFilterEnabledUi},on:{change:e.onAiFilterToggle}})],1),a("div",{staticClass:"ai-filter-hint"},[e._v(e._s(e.$t("trading-assistant.form.enableAiFilterHint")))])])],1)],1):e._e()]),a("div",{directives:[{name:"show",rawName:"v-show",value:2===e.currentStep,expression:"currentStep === 2"}],staticClass:"step-content"},[a("a-form",{attrs:{form:e.form,layout:"vertical",autocomplete:"off"}},[a("div",{staticClass:"execution-step-layout"},[a("div",{staticClass:"execution-step-hero"},[a("div",{staticClass:"simple-mode-kicker"},[e._v(e._s(e.$t("trading-assistant.form.step2HeroTitle")))]),a("div",{staticClass:"execution-step-hero-desc"},[e._v(e._s(e.$t("trading-assistant.form.step2HeroDesc")))])]),a("div",{staticClass:"execution-section-card"},[a("div",{staticClass:"section-block-title"},[a("span",[e._v(e._s(e.$t("trading-assistant.form.executionSectionTitle")))]),a("span",{staticClass:"section-block-desc"},[e._v(e._s(e.$t("trading-assistant.form.executionSectionDesc")))])]),a("a-form-item",{staticClass:"compact-form-item",attrs:{label:e.$t("trading-assistant.form.executionMode")}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["execution_mode",{initialValue:"signal"}],expression:"['execution_mode', { initialValue: 'signal' }]"}],staticStyle:{display:"none"}}),a("div",{staticClass:"execution-mode-cards"},[a("div",{class:["execution-mode-card",{active:"signal"===e.executionModeUi}],on:{click:function(t){return e.setExecutionModeUi("signal")}}},[a("div",{staticClass:"execution-mode-card-icon signal"},[a("a-icon",{attrs:{type:"notification"}})],1),a("div",{staticClass:"execution-mode-card-body"},[a("div",{staticClass:"execution-mode-card-title"},[e._v(e._s(e.$t("trading-assistant.form.executionModeSignal")))]),a("div",{staticClass:"execution-mode-card-desc"},[e._v(e._s(e.$t("trading-assistant.form.executionModeSignalDesc")))])]),"signal"===e.executionModeUi?a("a-icon",{staticClass:"execution-mode-card-check",attrs:{type:"check-circle",theme:"filled"}}):e._e()],1),a("div",{class:["execution-mode-card","live-card",{active:"live"===e.executionModeUi,disabled:!e.canUseLiveTrading}],on:{click:function(t){e.canUseLiveTrading&&e.setExecutionModeUi("live")}}},[a("div",{staticClass:"execution-mode-card-icon live"},[a("a-icon",{attrs:{type:"thunderbolt"}})],1),a("div",{staticClass:"execution-mode-card-body"},[a("div",{staticClass:"execution-mode-card-title"},[e._v(e._s(e.$t("trading-assistant.form.executionModeLive")))]),a("div",{staticClass:"execution-mode-card-desc"},[e._v(" "+e._s(e.canUseLiveTrading?e.$t("trading-assistant.form.executionModeLiveDesc"):e.$t("trading-assistant.form.liveTradingNotSupportedHint"))+" ")])]),"live"===e.executionModeUi&&e.canUseLiveTrading?a("a-icon",{staticClass:"execution-mode-card-check",attrs:{type:"check-circle",theme:"filled"}}):e._e()],1)]),e.canUseLiveTrading?e._e():a("div",{staticClass:"form-item-hint execution-warn-text"},[e._v(" "+e._s(e.$t("trading-assistant.form.liveTradingNotSupportedHint"))+" ")])],1),"live"===e.executionModeUi&&e.canUseLiveTrading?a("a-alert",{staticClass:"section-inline-alert",attrs:{type:"warning",showIcon:"",message:e.$t("trading-assistant.liveDisclaimer.title"),description:e.$t("trading-assistant.liveDisclaimer.content")}}):e._e()],1),a("div",{staticClass:"execution-section-card"},[a("div",{staticClass:"section-block-title"},[a("span",[e._v(e._s(e.$t("trading-assistant.form.notificationSectionTitle")))]),a("span",{staticClass:"section-block-desc"},[e._v(e._s(e.$t("trading-assistant.form.notificationSectionDesc")))])]),a("a-form-item",{staticClass:"compact-form-item",attrs:{label:e.$t("trading-assistant.form.notifyChannels")}},[a("a-checkbox-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["notify_channels",{initialValue:["browser"]}],expression:"['notify_channels', { initialValue: ['browser'] }]"}],staticClass:"notify-channel-grid",on:{change:e.onNotifyChannelsChange}},[a("a-checkbox",{attrs:{value:"browser"}},[e._v(e._s(e.$t("trading-assistant.notify.browser")))]),a("a-checkbox",{attrs:{value:"email"}},[e._v(e._s(e.$t("trading-assistant.notify.email")))]),a("a-checkbox",{attrs:{value:"telegram"}},[e._v(e._s(e.$t("trading-assistant.notify.telegram")))]),a("a-checkbox",{attrs:{value:"discord"}},[e._v(e._s(e.$t("trading-assistant.notify.discord")))]),a("a-checkbox",{attrs:{value:"webhook"}},[e._v(e._s(e.$t("trading-assistant.notify.webhook")))]),a("a-checkbox",{attrs:{value:"phone"}},[e._v(e._s(e.$t("trading-assistant.notify.phone")))])],1),a("div",{staticClass:"form-item-hint"},[e._v(e._s(e.$t("trading-assistant.form.notifyChannelsHint")))])],1),e.unconfiguredChannels.length>0?a("a-alert",{staticClass:"section-inline-alert",attrs:{type:"warning",showIcon:""},scopedSlots:e._u([{key:"message",fn:function(){return[a("span",[e._v(" "+e._s(e.$t("trading-assistant.form.notificationConfigMissing",{channels:e.unconfiguredChannels.join(", ")}))+" "),a("router-link",{staticStyle:{"margin-left":"8px"},attrs:{to:"/profile"}},[a("a-icon",{attrs:{type:"setting"}}),e._v(" "+e._s(e.$t("trading-assistant.form.goToProfile"))+" ")],1)],1)]},proxy:!0}],null,!1,2930252607)}):e.notifyChannelsUi.length>0&&!e.notifyChannelsUi.includes("browser")||e.notifyChannelsUi.length>1?a("a-alert",{staticClass:"section-inline-alert",attrs:{type:"info",showIcon:""},scopedSlots:e._u([{key:"message",fn:function(){return[a("span",[e._v(" "+e._s(e.$t("trading-assistant.form.notificationFromProfile"))+" "),a("router-link",{staticStyle:{"margin-left":"8px"},attrs:{to:"/profile"}},[a("a-icon",{attrs:{type:"setting"}}),e._v(" "+e._s(e.$t("trading-assistant.form.goToProfile"))+" ")],1)],1)]},proxy:!0}])}):e._e()],1),"live"===e.executionModeUi&&e.canUseLiveTrading?a("div",{staticClass:"execution-section-card risk-section-card"},[a("div",{staticClass:"section-block-title"},[a("span",[e._v(e._s(e.$t("trading-assistant.form.riskSectionTitle")))]),a("span",{staticClass:"section-block-desc"},[e._v(e._s(e.$t("trading-assistant.form.riskSectionDesc")))])]),a("a-alert",{staticClass:"section-inline-alert",attrs:{type:"warning","show-icon":"",message:e.$t("trading-assistant.form.liveTradingConfigTitle"),description:e.$t("trading-assistant.form.liveTradingConfigHint")}})],1):e._e(),"live"===e.executionModeUi&&e.canUseLiveTrading?a("div",{staticClass:"execution-section-card"},[a("div",{staticClass:"section-block-title"},[a("span",[e._v(e._s(e.$t("trading-assistant.form.liveConnectionSectionTitle")))]),a("span",{staticClass:"section-block-desc"},[e._v(e._s(e.$t("trading-assistant.form.liveConnectionSectionDesc")))])]),a("a-form-item",{staticClass:"compact-form-item",attrs:{label:e.$t("trading-assistant.form.savedCredential")}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["credential_id",{rules:[{required:!0,message:e.$t("profile.exchange.noCredentialHint")}],getValueFromEvent:function(t){return t||void 0}}],expression:"['credential_id', {\n rules: [{ required: true, message: $t('profile.exchange.noCredentialHint') }],\n getValueFromEvent: (val) => val || undefined\n }]"}],attrs:{placeholder:e.$t("trading-assistant.placeholders.selectSavedCredential"),"allow-clear":"","show-search":"","option-filter-prop":"children",loading:e.loadingExchangeCredentials},on:{change:e.handleCredentialSelectChange}},e._l(e.filteredExchangeCredentials,function(t){return a("a-select-option",{key:t.id,attrs:{value:t.id}},[e._v(" "+e._s(e.formatCredentialLabel(t))+" ")])}),1),a("div",{staticClass:"form-item-hint",staticStyle:{"margin-top":"6px"}},[a("router-link",{attrs:{to:"/profile?tab=exchange"}},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"setting"}}),e._v(e._s(e.$t("profile.exchange.goToManage"))+" ")],1)],1)],1)],1):e._e()])])],1)])],1),a("template",{slot:"footer"},[a("a-button",{on:{click:e.handleCloseModal}},[e._v(e._s(e.$t("trading-assistant.form.cancel")))]),a("a-button",{directives:[{name:"show",rawName:"v-show",value:e.currentStep>0,expression:"currentStep > 0"}],on:{click:e.handlePrev}},[e._v(" "+e._s(e.$t("trading-assistant.form.prev"))+" ")]),a("a-button",{directives:[{name:"show",rawName:"v-show",value:e.currentStep<2,expression:"currentStep < 2"}],attrs:{type:"primary",loading:e.saving},on:{click:e.handleNext}},[e._v(" "+e._s(e.$t("trading-assistant.form.next"))+" ")]),a("a-button",{directives:[{name:"show",rawName:"v-show",value:2===e.currentStep,expression:"currentStep === 2"}],attrs:{type:"primary",loading:e.saving},on:{click:e.handleSubmit}},[e._v(" "+e._s(e.editingStrategy?e.$t("trading-assistant.form.confirmEdit"):e.$t("trading-assistant.form.confirmCreate"))+" ")])],1)],2),a("a-modal",{attrs:{title:e.$t("trading-assistant.form.addSymbolTitle"),visible:e.showAddSymbolModal,confirmLoading:e.addingSymbol,width:"600px",okText:e.$t("trading-assistant.form.confirmAdd"),cancelText:e.$t("trading-assistant.form.cancel"),maskClosable:!1,keyboard:!1},on:{ok:e.handleConfirmAddSymbol,cancel:e.handleCloseAddSymbolModal}},[a("div",{staticClass:"add-symbol-modal-content"},[a("a-tabs",{staticClass:"market-tabs",on:{change:e.handleAddSymbolMarketChange},model:{value:e.addSymbolMarket,callback:function(t){e.addSymbolMarket=t},expression:"addSymbolMarket"}},e._l(e.addSymbolMarketTypes,function(t){return a("a-tab-pane",{key:t.value,attrs:{tab:e.$t(t.i18nKey||"dashboard.analysis.market.".concat(t.value))}})}),1),a("div",{staticClass:"symbol-search-section"},[a("a-input-search",{attrs:{placeholder:e.$t("dashboard.analysis.modal.addStock.searchOrInputPlaceholder"),loading:e.searchingSymbol,size:"large","allow-clear":""},on:{search:e.handleSearchSymbol,change:e.handleSymbolSearchInputChange},model:{value:e.addSymbolKeyword,callback:function(t){e.addSymbolKeyword=t},expression:"addSymbolKeyword"}},[a("a-button",{attrs:{slot:"enterButton",type:"primary",icon:"search"},slot:"enterButton"},[e._v(" "+e._s(e.$t("dashboard.analysis.modal.addStock.search"))+" ")])],1)],1),e.symbolSearchResults.length>0?a("div",{staticClass:"search-results-section"},[a("div",{staticClass:"section-title"},[a("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"search"}}),e._v(" "+e._s(e.$t("dashboard.analysis.modal.addStock.searchResults"))+" ")],1),a("a-list",{staticClass:"symbol-list",attrs:{"data-source":e.symbolSearchResults,loading:e.searchingSymbol,size:"small"},scopedSlots:e._u([{key:"renderItem",fn:function(t){return a("a-list-item",{staticClass:"symbol-list-item",on:{click:function(a){return e.handleSelectAddSymbol(t)}}},[a("a-list-item-meta",[a("template",{slot:"title"},[a("div",{staticClass:"symbol-item-content"},[a("span",{staticClass:"symbol-code"},[e._v(e._s(t.symbol))]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.name))]),t.exchange?a("a-tag",{staticStyle:{"margin-left":"8px"},attrs:{size:"small",color:"blue"}},[e._v(" "+e._s(t.exchange)+" ")]):e._e()],1)])],2)],1)}}],null,!1,2801225082)})],1):e._e(),a("div",{staticClass:"hot-symbols-section"},[a("div",{staticClass:"section-title"},[a("a-icon",{staticStyle:{color:"#ff4d4f","margin-right":"4px"},attrs:{type:"fire"}}),e._v(" "+e._s(e.$t("dashboard.analysis.modal.addStock.hotSymbols"))+" ")],1),a("a-spin",{attrs:{spinning:e.loadingHotSymbols}},[e.hotSymbols.length>0?a("a-list",{staticClass:"symbol-list",attrs:{"data-source":e.hotSymbols,size:"small"},scopedSlots:e._u([{key:"renderItem",fn:function(t){return a("a-list-item",{staticClass:"symbol-list-item",on:{click:function(a){return e.handleSelectAddSymbol(t)}}},[a("a-list-item-meta",[a("template",{slot:"title"},[a("div",{staticClass:"symbol-item-content"},[a("span",{staticClass:"symbol-code"},[e._v(e._s(t.symbol))]),a("span",{staticClass:"symbol-name"},[e._v(e._s(t.name))]),t.exchange?a("a-tag",{staticStyle:{"margin-left":"8px"},attrs:{size:"small",color:"orange"}},[e._v(" "+e._s(t.exchange)+" ")]):e._e()],1)])],2)],1)}}],null,!1,3959834868)}):a("a-empty",{attrs:{description:e.$t("dashboard.analysis.modal.addStock.noHotSymbols"),image:!1}})],1)],1),e.selectedAddSymbol?a("div",{staticClass:"selected-symbol-section"},[a("div",{staticClass:"section-title"},[a("a-icon",{staticStyle:{color:"#52c41a","margin-right":"4px"},attrs:{type:"check-circle"}}),e._v(" "+e._s(e.$t("dashboard.analysis.modal.addStock.selectedSymbol"))+" ")],1),a("div",{staticClass:"selected-symbol-info"},[a("a-tag",{staticStyle:{"margin-right":"8px"},attrs:{color:e.getMarketColor(e.addSymbolMarket)}},[e._v(e._s(e.addSymbolMarket))]),a("span",{staticClass:"symbol-code"},[e._v(e._s(e.selectedAddSymbol.symbol))]),e.selectedAddSymbol.name?a("span",{staticClass:"symbol-name"},[e._v(e._s(e.selectedAddSymbol.name))]):e._e()],1)]):e._e()],1)])],1)],1)],1)},i=[],r=a(15863),n=a(44735),o=a(81127),l=a(56252),c=a(2403),d=a(57532),u=a(76338),p=a(36911),m=a(35038),g=a(42430),h=a(84841),_=a(55434),y=a(75769),f=function(){var t=this,e=t._self._c;return e("div",{staticClass:"trading-records"},[0!==t.records.length||t.loading?e("a-table",{attrs:{columns:t.columns,"data-source":t.records,loading:t.loading,pagination:{pageSize:10},size:"small",rowKey:"id",scroll:{x:800}},scopedSlots:t._u([{key:"type",fn:function(a){return[e("a-tag",{attrs:{color:t.getTradeTypeColor(a)}},[t._v(" "+t._s(t.getTradeTypeText(a))+" ")])]}},{key:"price",fn:function(e){return[t._v(" $"+t._s(parseFloat(e).toFixed(4))+" ")]}},{key:"amount",fn:function(e){return[t._v(" "+t._s(parseFloat(e).toFixed(4))+" ")]}},{key:"value",fn:function(e){return[t._v(" $"+t._s(parseFloat(e).toFixed(2))+" ")]}},{key:"profit",fn:function(a,s){return[e("span",{style:{color:a>0?"#52c41a":a<0?"#f5222d":"#666"}},[t._v(" "+t._s(t.formatProfit(a,s))+" ")])]}},{key:"commission",fn:function(e){return[t._v(" "+t._s(t.formatCommission(e))+" ")]}},{key:"time",fn:function(e,a){return[t._v(" "+t._s(t.formatTime(a.created_at||e))+" ")]}}])}):e("div",{staticClass:"empty-state"},[e("a-empty",{attrs:{description:t.$t("trading-assistant.table.noPositions")}})],1)],1)},v=[],b={name:"TradingRecords",props:{strategyId:{type:Number,required:!0},loading:{type:Boolean,default:!1}},computed:{columns:function(){return[{title:this.$t("trading-assistant.table.time"),dataIndex:"created_at",key:"created_at",width:180,scopedSlots:{customRender:"time"}},{title:this.$t("dashboard.indicator.backtest.tradeType"),dataIndex:"type",key:"type",width:140,scopedSlots:{customRender:"type"}},{title:this.$t("trading-assistant.table.price"),dataIndex:"price",key:"price",width:120,scopedSlots:{customRender:"price"}},{title:this.$t("trading-assistant.table.amount"),dataIndex:"amount",key:"amount",width:120,scopedSlots:{customRender:"amount"}},{title:this.$t("trading-assistant.table.value"),dataIndex:"value",key:"value",width:120,scopedSlots:{customRender:"value"}},{title:this.$t("dashboard.indicator.backtest.profit"),dataIndex:"profit",key:"profit",width:120,scopedSlots:{customRender:"profit"}},{title:this.$t("trading-assistant.table.commission"),dataIndex:"commission",key:"commission",width:100,scopedSlots:{customRender:"commission"}}]}},data:function(){return{records:[]}},watch:{strategyId:{handler:function(t){t&&this.loadRecords()},immediate:!0}},methods:{loadRecords:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.strategyId){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,(0,p.tq)(t.strategyId);case 2:a=e.v,1===a.code?t.records=(a.data.trades||[]).map(function(t){return(0,u.A)((0,u.A)({},t),{},{time:t.created_at||t.time})}):t.$message.error(a.msg||t.$t("trading-assistant.messages.loadTradesFailed")),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[1,3]])}))()},formatTime:function(t){if(!t)return"--";try{var e;if("number"===typeof t){var a=t<1e12?1e3*t:t;e=new Date(a)}else{if("string"!==typeof t)return"--";if(/^\d+$/.test(t)){var s=parseInt(t,10),i=s<1e12?1e3*s:s;e=new Date(i)}else e=new Date(t)}if(isNaN(e.getTime()))return"--";var r=this.$i18n.locale||"zh-CN",n={"zh-CN":"zh-CN","zh-TW":"zh-TW","en-US":"en-US"};return e.toLocaleString(n[r]||"zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}catch(o){return"--"}},getTradeTypeColor:function(t){var e={buy:"green",sell:"red",liquidation:"orange",open_long:"green",add_long:"cyan",close_long:"orange",close_long_stop:"red",close_long_profit:"lime",open_short:"red",add_short:"magenta",close_short:"blue",close_short_stop:"red",close_short_profit:"cyan"};return e[t]||"default"},getTradeTypeText:function(t){var e={buy:this.$t("dashboard.indicator.backtest.buy"),sell:this.$t("dashboard.indicator.backtest.sell"),liquidation:this.$t("dashboard.indicator.backtest.liquidation"),open_long:this.$t("dashboard.indicator.backtest.openLong"),add_long:this.$t("dashboard.indicator.backtest.addLong"),close_long:this.$t("dashboard.indicator.backtest.closeLong"),close_long_stop:this.$t("dashboard.indicator.backtest.closeLongStop"),close_long_profit:this.$t("dashboard.indicator.backtest.closeLongProfit"),open_short:this.$t("dashboard.indicator.backtest.openShort"),add_short:this.$t("dashboard.indicator.backtest.addShort"),close_short:this.$t("dashboard.indicator.backtest.closeShort"),close_short_stop:this.$t("dashboard.indicator.backtest.closeShortStop"),close_short_profit:this.$t("dashboard.indicator.backtest.closeShortProfit")};return e[t]||t},formatMoney:function(t){if(null===t||void 0===t)return"--";var e=t>=0?"+":"-";return"".concat(e,"$").concat(Math.abs(t).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}))},formatProfit:function(t,e){if(null===t||void 0===t)return"--";var a=parseFloat(t),s=["open_long","open_short","add_long","add_short"];return 0===a&&e&&s.includes(e.type)?"--":Math.abs(a)<1e-6?e&&s.includes(e.type)?"--":"$0.00":this.formatMoney(a)},formatCommission:function(t){if(null===t||void 0===t)return"--";var e=parseFloat(t);return isNaN(e)||Math.abs(e)<1e-6?"--":"$".concat(e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:6}))}}},x=b,C=a(845),k=(0,C.A)(x,f,v,!1,null,"a5bdef7e",null),S=k.exports,w=function(){var t=this,e=t._self._c;return e("div",{staticClass:"position-records"},[0!==t.positions.length||t.loading?e("a-table",{attrs:{columns:t.columns,"data-source":t.positions,loading:t.loading,pagination:!1,size:"small",rowKey:"id",scroll:{x:800}},scopedSlots:t._u([{key:"symbol",fn:function(a,s){return[e("strong",[t._v(t._s(s.symbol||a))])]}},{key:"side",fn:function(a,s){return[e("a-tag",{attrs:{color:"long"===(s.side||a)?"green":"red"}},[t._v(" "+t._s("long"===(s.side||a)?t.$t("trading-assistant.table.long"):t.$t("trading-assistant.table.short"))+" ")])]}},{key:"entryPrice",fn:function(a,s){return[t.hasValidPrice(s.entry_price||a)?e("span",[t._v(" $"+t._s(parseFloat(s.entry_price||a).toFixed(4))+" ")]):e("span",[t._v("--")])]}},{key:"currentPrice",fn:function(e,a){return[t._v(" $"+t._s(parseFloat(a.current_price||e||0).toFixed(4))+" ")]}},{key:"size",fn:function(e,a){return[t._v(" "+t._s(parseFloat(a.size||e||0).toFixed(4))+" ")]}},{key:"unrealizedPnl",fn:function(a,s){return[e("span",{class:{profit:parseFloat(s.unrealized_pnl||a||0)>0,loss:parseFloat(s.unrealized_pnl||a||0)<0}},[t._v(" $"+t._s(parseFloat(s.unrealized_pnl||a||0).toFixed(2))+" ")])]}},{key:"pnlPercent",fn:function(a,s){return[e("span",{class:{profit:parseFloat(s.pnl_percent||a||0)>0,loss:parseFloat(s.pnl_percent||a||0)<0}},[t._v(" "+t._s(parseFloat(s.pnl_percent||a||0).toFixed(2))+"% ")])]}}])}):e("div",{staticClass:"empty-state"},[e("a-empty",{attrs:{description:t.$t("trading-assistant.table.noPositions")}})],1)],1)},$=[],T={name:"PositionRecords",props:{strategyId:{type:Number,required:!0},marketType:{type:String,default:"swap"},leverage:{type:[Number,String],default:1},loading:{type:Boolean,default:!1}},data:function(){return{positions:[]}},computed:{columns:function(){return[{title:this.$t("trading-assistant.table.symbol"),dataIndex:"symbol",key:"symbol",width:120,scopedSlots:{customRender:"symbol"}},{title:this.$t("trading-assistant.table.side"),dataIndex:"side",key:"side",width:80,scopedSlots:{customRender:"side"}},{title:this.$t("trading-assistant.table.size"),dataIndex:"size",key:"size",width:120,scopedSlots:{customRender:"size"}},{title:this.$t("trading-assistant.table.entryPrice"),dataIndex:"entry_price",key:"entry_price",width:120,scopedSlots:{customRender:"entryPrice"}},{title:this.$t("trading-assistant.table.currentPrice"),dataIndex:"current_price",key:"current_price",width:120,scopedSlots:{customRender:"currentPrice"}},{title:this.$t("trading-assistant.table.unrealizedPnl"),dataIndex:"unrealized_pnl",key:"unrealized_pnl",width:120,scopedSlots:{customRender:"unrealizedPnl"}},{title:this.$t("trading-assistant.table.pnlPercent"),dataIndex:"pnl_percent",key:"pnl_percent",width:100,scopedSlots:{customRender:"pnlPercent"}}]}},watch:{strategyId:{handler:function(t){t?(this.loadPositions(),this.startPolling()):this.stopPolling()},immediate:!0}},beforeDestroy:function(){this.stopPolling()},methods:{loadPositions:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.strategyId){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,(0,p.oK)(t.strategyId);case 2:a=e.v,1===a.code?(s=a.data.positions||[],t.positions=s.map(function(e,a){var s=String(t.marketType||"swap").toLowerCase(),i=parseFloat(t.leverage);(!isFinite(i)||i<=0)&&(i=1),"spot"===s&&(i=1);var r=parseFloat(e.entry_price||e.entryPrice||0),n=parseFloat(e.size||"0")||0,o=parseFloat(e.unrealized_pnl||e.unrealizedPnl||"0")||0,l=parseFloat(e.pnl_percent||e.pnlPercent||"0")||0;r>0&&n>0?l=o/(r*n)*100*i:"spot"!==s&&(l*=i);var c={id:e.id||a,symbol:e.symbol||"",side:e.side||"long",size:n>0?n.toString():"0",entry_price:r>0?r.toString():"0",current_price:e.current_price||e.currentPrice||"0",unrealized_pnl:e.unrealized_pnl||e.unrealizedPnl||"0",pnl_percent:l,updated_at:e.updated_at||e.updatedAt||""};return c})):t.positions=[],e.n=4;break;case 3:e.p=3,e.v,t.positions=[];case 4:return e.a(2)}},e,null,[[1,3]])}))()},hasValidPrice:function(t){var e=parseFloat(t);return Number.isFinite(e)&&e>0},startPolling:function(){var t=this;this.stopPolling(),this.pollingTimer=setInterval(function(){t.loadPositions()},5e3)},stopPolling:function(){this.pollingTimer&&(clearInterval(this.pollingTimer),this.pollingTimer=null)}}},A=T,P=(0,C.A)(A,w,$,!1,null,"2abcf4f1",null),M=P.exports,F=function(){var t=this,e=t._self._c;return e("div",{staticClass:"strategy-type-selector",class:{"theme-dark":t.isDark}},[e("div",{staticClass:"selector-header"},[e("h3",[t._v(t._s(t.$t("trading-assistant.selectMode")))]),e("p",{staticClass:"selector-hint"},[t._v(t._s(t.$t("trading-assistant.selectModeHint")))])]),e("div",{staticClass:"mode-cards"},[e("div",{staticClass:"mode-card",class:{selected:"signal"===t.selected},on:{click:function(e){return t.$emit("select","signal")}}},[e("div",{staticClass:"card-icon signal-icon"},[e("a-icon",{attrs:{type:"line-chart"}})],1),e("div",{staticClass:"card-body"},[e("div",{staticClass:"card-badge-row"},[e("span",{staticClass:"card-badge"},[t._v(t._s(t.$t("trading-assistant.strategyMode.signalBadge")))])]),e("h4",[t._v(t._s(t.$t("trading-assistant.strategyMode.signal")))]),e("p",{staticClass:"card-desc"},[t._v(t._s(t.$t("trading-assistant.strategyMode.signalDesc")))]),e("ul",{staticClass:"card-features"},[e("li",[e("a-icon",{attrs:{type:"check"}}),t._v(" "+t._s(t.$t("trading-assistant.strategyMode.signalFeature1")))],1),e("li",[e("a-icon",{attrs:{type:"check"}}),t._v(" "+t._s(t.$t("trading-assistant.strategyMode.signalFeature2")))],1),e("li",[e("a-icon",{attrs:{type:"check"}}),t._v(" "+t._s(t.$t("trading-assistant.strategyMode.signalFeature3")))],1)])]),e("a-button",{staticClass:"card-btn",attrs:{type:"primary",ghost:""},on:{click:function(e){return e.stopPropagation(),t.$emit("select","signal")}}},[t._v(" "+t._s(t.$t("trading-assistant.useThisMode"))+" ")])],1),e("div",{staticClass:"mode-card",class:{selected:"script"===t.selected},on:{click:function(e){return t.$emit("select","script")}}},[e("div",{staticClass:"card-icon script-icon"},[e("a-icon",{attrs:{type:"code"}})],1),e("div",{staticClass:"card-body"},[e("div",{staticClass:"card-badge-row"},[e("span",{staticClass:"card-badge card-badge--script"},[t._v(t._s(t.$t("trading-assistant.strategyMode.scriptBadge")))])]),e("h4",[t._v(t._s(t.$t("trading-assistant.strategyMode.script")))]),e("p",{staticClass:"card-desc"},[t._v(t._s(t.$t("trading-assistant.strategyMode.scriptDesc")))]),e("ul",{staticClass:"card-features"},[e("li",[e("a-icon",{attrs:{type:"check"}}),t._v(" "+t._s(t.$t("trading-assistant.strategyMode.scriptFeature1")))],1),e("li",[e("a-icon",{attrs:{type:"check"}}),t._v(" "+t._s(t.$t("trading-assistant.strategyMode.scriptFeature2")))],1),e("li",[e("a-icon",{attrs:{type:"check"}}),t._v(" "+t._s(t.$t("trading-assistant.strategyMode.scriptFeature3")))],1)])]),e("a-button",{staticClass:"card-btn",attrs:{type:"primary",ghost:""},on:{click:function(e){return e.stopPropagation(),t.$emit("select","script")}}},[t._v(" "+t._s(t.$t("trading-assistant.useThisMode"))+" ")])],1)]),e("div",{staticClass:"template-quick-start"},[e("a-divider",[e("span",{staticClass:"divider-text"},[t._v(t._s(t.$t("trading-assistant.fromTemplate")))])]),e("div",{staticClass:"template-tags"},t._l(t.templates,function(a){return e("a-tag",{key:a.key,staticClass:"template-tag",on:{click:function(e){return t.$emit("use-template",a.key)}}},[e("span",{staticClass:"tpl-icon"},[t._v(t._s(a.icon))]),t._v(" "+t._s(t.$t("trading-assistant.template.".concat(a.key)))+" ")])}),1)],1)])},I=[],N=[{key:"trendFollowing",icon:"📈",code:"\"\"\"\nTrend Following Strategy\nUses EMA crossover with dynamic stop-loss / take-profit.\n\"\"\"\n\ndef on_init(ctx):\n ctx.fast_period = ctx.param('fast_period', 12)\n ctx.slow_period = ctx.param('slow_period', 26)\n ctx.position_pct = ctx.param('position_pct', 0.95)\n ctx.stop_pct = ctx.param('stop_pct', 0.03)\n ctx.take_profit_pct = ctx.param('take_profit_pct', 0.08)\n\ndef on_bar(ctx, bar):\n bars = ctx.bars(ctx.slow_period + 5)\n if len(bars) < ctx.slow_period:\n return\n\n closes = [b['close'] for b in bars]\n fast_ema = _ema(closes, ctx.fast_period)\n slow_ema = _ema(closes, ctx.slow_period)\n price = bar['close']\n\n if fast_ema > slow_ema and not ctx.position:\n qty = (ctx.equity * ctx.position_pct) / price\n ctx.buy(price, qty)\n ctx.log(f\"BUY at {price:.2f}\")\n\n elif fast_ema < slow_ema and ctx.position and ctx.position['side'] == 'long':\n ctx.close_position()\n ctx.log(f\"SELL at {price:.2f}\")\n\n if ctx.position and ctx.position['side'] == 'long':\n entry = ctx.position['entry_price']\n pnl_pct = (price - entry) / entry\n if pnl_pct <= -ctx.stop_pct:\n ctx.close_position()\n ctx.log(f\"STOP LOSS at {price:.2f}\")\n elif pnl_pct >= ctx.take_profit_pct:\n ctx.close_position()\n ctx.log(f\"TAKE PROFIT at {price:.2f}\")\n\ndef _ema(data, period):\n k = 2 / (period + 1)\n ema = data[0]\n for price in data[1:]:\n ema = price * k + ema * (1 - k)\n return ema\n",params:[{name:"fast_period",type:"integer",default:12,min:2,max:120,step:1},{name:"slow_period",type:"integer",default:26,min:5,max:240,step:1},{name:"position_pct",type:"percent",default:.95,min:.05,max:1,step:.01},{name:"stop_pct",type:"percent",default:.03,min:.001,max:.5,step:.001},{name:"take_profit_pct",type:"percent",default:.08,min:.001,max:1,step:.001}]},{key:"martingale",icon:"🔥",code:"\"\"\"\nMartingale Strategy\nDouble position on each loss, with max layer control.\n\"\"\"\n\ndef on_init(ctx):\n ctx.base_amount = ctx.param('base_amount', 100)\n ctx.max_layers = ctx.param('max_layers', 5)\n ctx.multiplier = ctx.param('multiplier', 2.0)\n ctx.take_profit_pct = ctx.param('take_profit_pct', 0.02)\n ctx.stop_loss_pct = ctx.param('stop_loss_pct', 0.04)\n ctx.cooldown_bars = ctx.param('cooldown_bars', 1)\n ctx.current_layer = 0\n ctx.cooldown = 0\n\ndef on_bar(ctx, bar):\n if ctx.cooldown > 0:\n ctx.cooldown -= 1\n return\n\n price = bar['close']\n if not ctx.position:\n amount = ctx.base_amount * (ctx.multiplier ** ctx.current_layer)\n if amount <= ctx.balance:\n qty = amount / price\n ctx.buy(price, qty)\n ctx.log(f\"Layer {ctx.current_layer}: BUY {qty:.4f} at {price:.2f}\")\n else:\n entry = ctx.position['entry_price']\n pnl_pct = (price - entry) / entry\n\n if pnl_pct >= ctx.take_profit_pct:\n ctx.close_position()\n ctx.current_layer = 0\n ctx.cooldown = ctx.cooldown_bars\n ctx.log(f\"TAKE PROFIT at {price:.2f}, reset layers\")\n\n elif pnl_pct <= -ctx.stop_loss_pct:\n ctx.close_position()\n ctx.cooldown = ctx.cooldown_bars\n if ctx.current_layer < ctx.max_layers:\n ctx.current_layer += 1\n ctx.log(f\"LOSS, escalate to layer {ctx.current_layer}\")\n else:\n ctx.current_layer = 0\n ctx.log(\"Max layers reached, reset\")\n",params:[{name:"base_amount",type:"number",default:100,min:10,max:1e6,step:10},{name:"max_layers",type:"integer",default:5,min:1,max:20,step:1},{name:"multiplier",type:"number",default:2,min:1,max:5,step:.1},{name:"take_profit_pct",type:"percent",default:.02,min:.001,max:1,step:.001},{name:"stop_loss_pct",type:"percent",default:.04,min:.001,max:1,step:.001},{name:"cooldown_bars",type:"integer",default:1,min:0,max:500,step:1}]},{key:"grid",icon:"📐",code:"\"\"\"\nGrid Trading Strategy\nPlaces buy/sell orders at equal intervals within a price range.\n\"\"\"\n\ndef on_init(ctx):\n ctx.grid_upper = ctx.param('grid_upper', 70000)\n ctx.grid_lower = ctx.param('grid_lower', 60000)\n ctx.grid_levels = ctx.param('grid_levels', 10)\n ctx.order_amount = ctx.param('order_amount', 100)\n ctx.take_profit_pct = ctx.param('take_profit_pct', 0.05)\n ctx.stop_loss_pct = ctx.param('stop_loss_pct', 0.03)\n ctx.filled_grids = set()\n\n spacing = (ctx.grid_upper - ctx.grid_lower) / ctx.grid_levels\n ctx.grid_prices = [ctx.grid_lower + i * spacing for i in range(ctx.grid_levels + 1)]\n\ndef on_bar(ctx, bar):\n price = bar['close']\n if price < ctx.grid_lower or price > ctx.grid_upper:\n return\n\n if ctx.position and ctx.position['side'] == 'long':\n entry = ctx.position['entry_price']\n pnl_pct = (price - entry) / entry\n if pnl_pct >= ctx.take_profit_pct or pnl_pct <= -ctx.stop_loss_pct:\n ctx.close_position()\n ctx.filled_grids.clear()\n ctx.log(f\"Grid risk exit at {price:.2f}, pnl={pnl_pct:.2%}\")\n return\n\n for i, gp in enumerate(ctx.grid_prices[:-1]):\n upper_gp = ctx.grid_prices[i + 1]\n grid_id = f\"grid_{i}\"\n\n if price <= gp and grid_id not in ctx.filled_grids:\n qty = ctx.order_amount / price\n ctx.buy(price, qty)\n ctx.filled_grids.add(grid_id)\n ctx.log(f\"Grid BUY at {price:.2f} (level {i})\")\n\n elif price >= upper_gp and grid_id in ctx.filled_grids:\n qty = ctx.order_amount / price\n ctx.sell(price, qty)\n ctx.filled_grids.discard(grid_id)\n ctx.log(f\"Grid SELL at {price:.2f} (level {i})\")\n",params:[{name:"grid_upper",type:"number",default:7e4,min:1,max:1e8,step:10},{name:"grid_lower",type:"number",default:6e4,min:1,max:1e8,step:10},{name:"grid_levels",type:"integer",default:10,min:2,max:200,step:1},{name:"order_amount",type:"number",default:100,min:1,max:1e6,step:1},{name:"take_profit_pct",type:"percent",default:.05,min:.001,max:1,step:.001},{name:"stop_loss_pct",type:"percent",default:.03,min:.001,max:1,step:.001}]},{key:"dca",icon:"💰",code:"\"\"\"\nDCA (Dollar Cost Averaging) Strategy\nPeriodic purchases with optional dip-buying.\n\"\"\"\n\ndef on_init(ctx):\n ctx.buy_amount = ctx.param('buy_amount', 100)\n ctx.dip_threshold = ctx.param('dip_threshold', 0.05)\n ctx.dip_multiplier = ctx.param('dip_multiplier', 2.0)\n ctx.buy_interval = ctx.param('buy_interval', 24)\n ctx.max_orders = ctx.param('max_orders', 999)\n ctx.bar_count = 0\n ctx.order_count = 0\n ctx.last_buy_price = None\n\ndef on_bar(ctx, bar):\n ctx.bar_count += 1\n price = bar['close']\n\n if ctx.order_count >= ctx.max_orders:\n return\n\n is_dip = False\n if ctx.last_buy_price and price < ctx.last_buy_price * (1 - ctx.dip_threshold):\n is_dip = True\n\n if ctx.bar_count % ctx.buy_interval == 0 or is_dip:\n amount = ctx.buy_amount * (ctx.dip_multiplier if is_dip else 1.0)\n if amount <= ctx.balance:\n qty = amount / price\n ctx.buy(price, qty)\n ctx.last_buy_price = price\n ctx.order_count += 1\n tag = \" (DIP BUY)\" if is_dip else \"\"\n ctx.log(f\"DCA BUY {qty:.6f} at {price:.2f}{tag}\")\n",params:[{name:"buy_amount",type:"number",default:100,min:1,max:1e6,step:1},{name:"buy_interval",type:"integer",default:24,min:1,max:1e3,step:1},{name:"dip_threshold",type:"percent",default:.05,min:.001,max:1,step:.001},{name:"dip_multiplier",type:"number",default:2,min:1,max:10,step:.1},{name:"max_orders",type:"integer",default:999,min:1,max:9999,step:1}]},{key:"meanReversion",icon:"🔄",code:"\"\"\"\nMean Reversion Strategy\nBollinger Bands based: buy at lower band, sell at upper band.\n\"\"\"\n\ndef on_init(ctx):\n ctx.period = ctx.param('period', 20)\n ctx.std_mult = ctx.param('std_mult', 2.0)\n ctx.position_pct = ctx.param('position_pct', 0.5)\n ctx.take_profit_pct = ctx.param('take_profit_pct', 0.03)\n ctx.stop_loss_pct = ctx.param('stop_loss_pct', 0.02)\n\ndef on_bar(ctx, bar):\n bars = ctx.bars(ctx.period + 5)\n if len(bars) < ctx.period:\n return\n\n closes = [b['close'] for b in bars[-ctx.period:]]\n mean = sum(closes) / len(closes)\n std = (sum((c - mean) ** 2 for c in closes) / len(closes)) ** 0.5\n\n upper = mean + ctx.std_mult * std\n lower = mean - ctx.std_mult * std\n price = bar['close']\n\n if price <= lower and not ctx.position:\n qty = (ctx.equity * ctx.position_pct) / price\n ctx.buy(price, qty)\n ctx.log(f\"BUY at {price:.2f} (below lower band {lower:.2f})\")\n\n elif price >= upper and ctx.position and ctx.position['side'] == 'long':\n ctx.close_position()\n ctx.log(f\"SELL at {price:.2f} (above upper band {upper:.2f})\")\n\n elif ctx.position and ctx.position['side'] == 'long':\n entry = ctx.position['entry_price']\n pnl_pct = (price - entry) / entry\n if pnl_pct >= ctx.take_profit_pct or pnl_pct <= -ctx.stop_loss_pct:\n ctx.close_position()\n ctx.log(f\"Risk exit at {price:.2f}, pnl={pnl_pct:.2%}\")\n",params:[{name:"period",type:"integer",default:20,min:2,max:300,step:1},{name:"std_mult",type:"number",default:2,min:.5,max:6,step:.1},{name:"position_pct",type:"percent",default:.5,min:.05,max:1,step:.01},{name:"take_profit_pct",type:"percent",default:.03,min:.001,max:1,step:.001},{name:"stop_loss_pct",type:"percent",default:.02,min:.001,max:1,step:.001}]},{key:"breakout",icon:"⚡",code:"\"\"\"\nBreakout Strategy\nEnter when price breaks key resistance/support with volume confirmation.\n\"\"\"\n\ndef on_init(ctx):\n ctx.lookback = ctx.param('lookback', 20)\n ctx.volume_mult = ctx.param('volume_mult', 1.5)\n ctx.position_pct = ctx.param('position_pct', 0.9)\n ctx.stop_pct = ctx.param('stop_pct', 0.02)\n ctx.take_profit_pct = ctx.param('take_profit_pct', 0.05)\n\ndef on_bar(ctx, bar):\n bars = ctx.bars(ctx.lookback + 5)\n if len(bars) < ctx.lookback:\n return\n\n recent = bars[-ctx.lookback:]\n high = max(b['high'] for b in recent[:-1])\n low = min(b['low'] for b in recent[:-1])\n avg_vol = sum(b['volume'] for b in recent[:-1]) / (len(recent) - 1)\n price = bar['close']\n vol = bar['volume']\n\n if price > high and vol > avg_vol * ctx.volume_mult and not ctx.position:\n qty = (ctx.equity * ctx.position_pct) / price\n ctx.buy(price, qty)\n ctx.log(f\"BREAKOUT BUY at {price:.2f} (prev high: {high:.2f})\")\n\n elif price < low and ctx.position and ctx.position['side'] == 'long':\n ctx.close_position()\n ctx.log(f\"BREAK DOWN, close at {price:.2f}\")\n\n if ctx.position and ctx.position['side'] == 'long':\n entry = ctx.position['entry_price']\n pnl_pct = (price - entry) / entry\n if pnl_pct <= -ctx.stop_pct:\n ctx.close_position()\n ctx.log(f\"STOP LOSS at {price:.2f}\")\n elif pnl_pct >= ctx.take_profit_pct:\n ctx.close_position()\n ctx.log(f\"TAKE PROFIT at {price:.2f}\")\n",params:[{name:"lookback",type:"integer",default:20,min:2,max:300,step:1},{name:"volume_mult",type:"number",default:1.5,min:.5,max:10,step:.1},{name:"position_pct",type:"percent",default:.9,min:.05,max:1,step:.01},{name:"stop_pct",type:"percent",default:.02,min:.001,max:1,step:.001},{name:"take_profit_pct",type:"percent",default:.05,min:.001,max:1,step:.001}]}];function D(t){return String(t).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function V(t){return"boolean"===typeof t?t?"True":"False":"number"===typeof t?Number.isFinite(t)?String(t):"0":null===t||void 0===t?"None":"'".concat(String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\'"),"'")}var R=N;function z(t){return N.find(function(e){return e.key===t})||null}function E(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a="string"===typeof t?z(t):t;return a?a.params.reduce(function(t,a){return t[a.name]=Object.prototype.hasOwnProperty.call(e,a.name)?e[a.name]:a.default,t},{}):{}}function L(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a="string"===typeof t?z(t):t;if(!a)return"";var s=E(a,e);return a.params.reduce(function(t,e){var a=V(s[e.name]),i=new RegExp("(ctx\\.param\\(['\"]".concat(D(e.name),"['\"],\\s*)([^\\)]+)(\\))"));return t.replace(i,"$1".concat(a,"$3"))},a.code)}var U={name:"StrategyTypeSelector",props:{selected:{type:String,default:""},isDark:{type:Boolean,default:!1}},data:function(){return{templates:R.map(function(t){return{key:t.key,icon:t.icon}})}}},q=U,K=(0,C.A)(q,F,I,!1,null,"1cfbbafc",null),O=K.exports,B=function(){var t=this,e=t._self._c;return e("div",{staticClass:"strategy-editor",class:{"theme-dark":t.isDark}},[e("a-row",{staticClass:"editor-layout",attrs:{gutter:16}},[e("a-col",{staticClass:"code-col",attrs:{xs:24,md:16}},[e("div",{staticClass:"code-section"},[e("div",{staticClass:"section-header"},[e("div",{staticClass:"section-title-wrap"},[e("span",{staticClass:"section-title"},[e("a-icon",{attrs:{type:"code"}}),t._v(" "+t._s(t.$t("trading-assistant.editor.title"))+" ")],1),t.selectedTemplate?e("a-tag",{staticClass:"current-template-tag",attrs:{color:"blue"}},[t._v(" "+t._s(t.$t("trading-assistant.template.".concat(t.selectedTemplate.key)))+" ")]):t._e()],1),e("div",{staticClass:"section-actions"},[e("a-button",{staticClass:"verify-btn",attrs:{type:"link",size:"small",loading:t.verifying},on:{click:t.handleVerify}},[e("a-icon",{attrs:{type:"check-circle"}}),t._v(" "+t._s(t.$t("trading-assistant.editor.verify"))+" ")],1)],1)]),e("div",{ref:"editorContainer",staticClass:"code-editor-container"})])]),e("a-col",{staticClass:"side-col",attrs:{xs:24,md:8}},[e("a-tabs",{staticClass:"side-tabs",attrs:{size:"small"},model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[e("a-tab-pane",{key:"templates",attrs:{tab:t.$t("trading-assistant.editor.templateTab")}},[e("div",{staticClass:"panel-intro"},[e("div",{staticClass:"panel-intro__title"},[t._v(t._s(t.$t("trading-assistant.editor.templateIntroTitle")))]),e("div",{staticClass:"panel-intro__desc"},[t._v(t._s(t.$t("trading-assistant.editor.templateIntroDesc")))])]),e("div",{staticClass:"template-list"},t._l(t.templates,function(a){return e("div",{key:a.key,staticClass:"template-item",class:{active:t.selectedTemplateKey===a.key},on:{click:function(e){return t.loadTemplate(a.key,{focusParams:!0,resetParams:!0})}}},[e("div",{staticClass:"tpl-header"},[e("span",{staticClass:"tpl-icon"},[t._v(t._s(a.icon))]),e("span",{staticClass:"tpl-name"},[t._v(t._s(t.$t("trading-assistant.template.".concat(a.key))))])]),e("p",{staticClass:"tpl-desc"},[t._v(t._s(t.$t("trading-assistant.template.".concat(a.key,"Desc"))))]),e("a-button",{staticClass:"tpl-use-btn",attrs:{type:"link",size:"small"}},[t._v(" "+t._s(t.$t("trading-assistant.template.useTemplate"))+" "),e("a-icon",{attrs:{type:"arrow-right"}})],1)],1)}),0)]),e("a-tab-pane",{key:"params",attrs:{tab:t.$t("trading-assistant.editor.paramsTab")}},[t.selectedTemplate?e("div",{staticClass:"params-panel"},[e("div",{staticClass:"panel-intro"},[e("div",{staticClass:"panel-intro__title"},[t._v(" "+t._s(t.$t("trading-assistant.template.".concat(t.selectedTemplate.key)))+" ")]),e("div",{staticClass:"panel-intro__desc"},[t._v(" "+t._s(t.$t("trading-assistant.template.".concat(t.selectedTemplate.key,"Desc")))+" ")])]),e("a-alert",{staticClass:"params-tip",attrs:{type:"info","show-icon":"",message:t.$t("trading-assistant.editor.paramsHint")}}),e("div",{staticClass:"param-list"},t._l(t.selectedTemplate.params,function(a){return e("div",{key:a.name,staticClass:"param-item"},[e("div",{staticClass:"param-item__label-row"},[e("span",{staticClass:"param-item__label"},[t._v(t._s(t.getParamLabel(a)))]),e("span",{staticClass:"param-item__type"},[t._v(t._s(t.getParamTypeLabel(a.type)))])]),t.getParamDescription(a)?e("div",{staticClass:"param-item__desc"},[t._v(t._s(t.getParamDescription(a)))]):t._e(),"number"===a.type||"integer"===a.type||"percent"===a.type?e("a-input-number",{staticStyle:{width:"100%"},attrs:{value:t.templateParamValues[a.name],min:a.min,max:a.max,step:a.step||1,precision:"integer"===a.type?0:t.getParamPrecision(a)},on:{change:function(e){return t.handleNumericParamChange(a,e)}}}):"select"===a.type?e("a-select",{staticStyle:{width:"100%"},attrs:{value:t.templateParamValues[a.name]},on:{change:function(e){return t.handleSelectParamChange(a,e)}}},t._l(a.options||[],function(a){return e("a-select-option",{key:a.value,attrs:{value:a.value}},[t._v(" "+t._s(t.getOptionLabel(a))+" ")])}),1):"boolean"===a.type?e("div",{staticClass:"param-item__switch"},[e("a-switch",{attrs:{checked:!!t.templateParamValues[a.name]},on:{change:function(e){return t.handleBooleanParamChange(a,e)}}}),e("span",[t._v(t._s(t.templateParamValues[a.name]?t.$t("common.yes"):t.$t("common.no")))])],1):e("a-input",{attrs:{value:t.templateParamValues[a.name]},on:{input:function(e){return t.handleTextParamChange(a,e.target.value)}}})],1)}),0),e("div",{staticClass:"params-actions"},[e("a-button",{on:{click:t.resetTemplateParams}},[t._v(" "+t._s(t.$t("trading-assistant.editor.resetTemplateParams"))+" ")]),e("a-button",{attrs:{type:"primary",disabled:!t.templateDirty},on:{click:t.applySelectedTemplateToCode}},[t._v(" "+t._s(t.$t("trading-assistant.editor.applyTemplateParams"))+" ")])],1)],1):e("a-empty",{attrs:{description:t.$t("trading-assistant.editor.paramsEmpty")}})],1),e("a-tab-pane",{key:"ai",attrs:{tab:t.$t("trading-assistant.editor.aiTab")}},[e("div",{staticClass:"ai-panel"},[e("div",{staticClass:"panel-intro"},[e("div",{staticClass:"panel-intro__title"},[e("a-icon",{attrs:{type:"robot"}}),e("span",[t._v(t._s(t.$t("trading-assistant.editor.aiGenerate")))])],1),e("div",{staticClass:"panel-intro__desc"},[t._v(t._s(t.$t("trading-assistant.editor.aiHint")))])]),e("div",{staticClass:"ai-suggestions"},t._l(t.aiPromptSuggestions,function(a){return e("a-tag",{key:a.id,staticClass:"prompt-tag",on:{click:function(e){return t.applyPromptSuggestion(a.value)}}},[t._v(" "+t._s(a.label)+" ")])}),1),e("a-textarea",{attrs:{placeholder:t.$t("trading-assistant.editor.aiPromptPlaceholder"),rows:10,"auto-size":{minRows:8,maxRows:16}},model:{value:t.aiPrompt,callback:function(e){t.aiPrompt=e},expression:"aiPrompt"}}),e("a-button",{staticStyle:{"margin-top":"10px"},attrs:{type:"primary",block:"",loading:t.aiGenerating,size:"large"},on:{click:t.handleAIGenerate}},[e("a-icon",{attrs:{type:"thunderbolt"}}),t._v(" "+t._s(t.$t("trading-assistant.editor.aiGenerateBtn"))+" ")],1),t.aiGenerating?e("div",{staticClass:"ai-status"},[e("a-icon",{attrs:{type:"loading",spin:""}}),t._v(" "+t._s(t.$t("trading-assistant.editor.generating"))+" ")],1):t._e()],1)]),e("a-tab-pane",{key:"docs",attrs:{tab:t.$t("trading-assistant.editor.docsTab")}},[e("div",{staticClass:"docs-panel"},[e("div",{staticClass:"panel-intro"},[e("div",{staticClass:"panel-intro__title"},[t._v(t._s(t.$t("trading-assistant.editor.docsIntroTitle")))]),e("div",{staticClass:"panel-intro__desc"},[t._v(t._s(t.$t("trading-assistant.editor.docsIntroDesc")))])]),e("div",{staticClass:"docs-content",domProps:{innerHTML:t._s(t.apiDocsHtml)}})])])],1)],1)],1)],1)},H=[],G=(a(6011),a(18787)),W=a(15237),j=a.n(W),Y=(a(74806),a(55218),a(97923),a(50436),'\n

    Strategy API Reference

    \n
    Lifecycle Functions
    \n
    def on_init(ctx):\n    """Called once when strategy starts"""\n\ndef on_bar(ctx, bar):\n    """Called on each new K-line bar"""\n    # bar: { open, high, low, close, volume, timestamp }\n\ndef on_order_filled(ctx, order):\n    """Called when an order is filled"""\n\ndef on_stop(ctx):\n    """Called when strategy stops"""
    \n\n
    Trading Actions
    \n
    ctx.buy(price, amount)      # Buy / go long\nctx.sell(price, amount)     # Sell / reduce long / go short\nctx.close_position()        # Close current position\nctx.cancel_all_orders()     # Cancel pending orders
    \n\n
    Context Properties
    \n
    ctx.position       # { side, amount, entry_price, unrealized_pnl }\nctx.balance        # Available balance\nctx.equity         # Total equity\nctx.current_price  # Current market price\nctx.symbol         # Trading symbol\nctx.timeframe      # K-line timeframe
    \n\n
    Data Access
    \n
    ctx.bars(n=100)            # Get last N bars\nctx.param(name, default)   # Get strategy parameter\nctx.indicator(id, params)  # Call existing indicator\nctx.log(message)           # Write strategy log
    \n'),J={name:"StrategyEditor",props:{value:{type:String,default:""},isDark:{type:Boolean,default:!1},userId:{type:[Number,String],default:1},visible:{type:Boolean,default:!1},initialTemplateKey:{type:String,default:""}},data:function(){return{activeTab:"templates",aiPrompt:"",aiGenerating:!1,verifying:!1,editor:null,apiDocsHtml:Y,templates:R,selectedTemplateKey:"",templateParamValues:{},templateDirty:!1,refreshTimer:null}},computed:{selectedTemplate:function(){return z(this.selectedTemplateKey)},aiPromptSuggestions:function(){return[{id:"improve",label:this.$t("trading-assistant.editor.aiSuggestionImprove"),value:this.$t("trading-assistant.editor.aiSuggestionImprovePrompt")},{id:"risk",label:this.$t("trading-assistant.editor.aiSuggestionRisk"),value:this.$t("trading-assistant.editor.aiSuggestionRiskPrompt")},{id:"explain",label:this.$t("trading-assistant.editor.aiSuggestionExplain"),value:this.$t("trading-assistant.editor.aiSuggestionExplainPrompt")}]}},mounted:function(){var t=this;this.$nextTick(function(){t.initEditor(),t.initialTemplateKey?t.loadTemplate(t.initialTemplateKey,{focusParams:!0,resetParams:!0}):t.value||t.$emit("input",t._getDefaultCode())}),window.addEventListener("resize",this.scheduleEditorRefresh)},beforeDestroy:function(){window.removeEventListener("resize",this.scheduleEditorRefresh),this.refreshTimer&&(clearTimeout(this.refreshTimer),this.refreshTimer=null),this.editor&&("function"===typeof this.editor.toTextArea&&this.editor.toTextArea(),this.editor=null)},watch:{value:function(t){this.editor&&this.editor.getValue()!==t&&(this.editor.setValue(t||""),this.scheduleEditorRefresh())},isDark:function(){this.editor&&this.editor.setOption("theme",this.isDark?"monokai":"eclipse"),this.scheduleEditorRefresh()},visible:function(t){t&&this.scheduleEditorRefresh()},initialTemplateKey:function(t){t&&t!==this.selectedTemplateKey&&this.loadTemplate(t,{focusParams:!0,resetParams:!0})}},methods:{initEditor:function(){var t=this;this.$refs.editorContainer&&(this.editor=j()(this.$refs.editorContainer,{value:this.value||this._getDefaultCode(),mode:"python",theme:this.isDark?"monokai":"eclipse",lineNumbers:!0,autoCloseBrackets:!0,matchBrackets:!0,styleActiveLine:!0,tabSize:4,indentUnit:4,indentWithTabs:!1,lineWrapping:!1,viewportMargin:1/0,gutters:["CodeMirror-linenumbers"]}),this.editor.on("change",function(){t.$emit("input",t.editor.getValue())}),this.scheduleEditorRefresh())},scheduleEditorRefresh:function(){var t=this;this.refreshTimer&&clearTimeout(this.refreshTimer),this.refreshTimer=setTimeout(function(){t.editor&&t.editor.refresh()},60)},_getDefaultCode:function(){return'"""\nMy Custom Strategy\n"""\n\ndef on_init(ctx):\n # Initialize strategy parameters\n pass\n\ndef on_bar(ctx, bar):\n # Core trading logic, called on each K-line bar\n # bar: { open, high, low, close, volume, timestamp }\n price = bar[\'close\']\n\n bars = ctx.bars(20)\n if len(bars) < 20:\n return\n\n avg = sum(b[\'close\'] for b in bars) / len(bars)\n\n if price > avg and not ctx.position:\n ctx.buy(price, ctx.equity * 0.9 / price)\n ctx.log(f"BUY at {price}")\n\n elif price < avg and ctx.position:\n ctx.close_position()\n ctx.log(f"SELL at {price}")\n'},loadTemplate:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=e.focusParams,s=void 0!==a&&a,i=e.resetParams,r=void 0===i||i,n=z(t);n&&(this.selectedTemplateKey=t,!r&&this.templateParamValues&&0!==Object.keys(this.templateParamValues).length||(this.templateParamValues=E(n)),this.templateDirty=!0,this.applySelectedTemplateToCode({silent:!0}),s&&(this.activeTab="params"),this.aiPrompt.trim()||(this.aiPrompt=this.$t("trading-assistant.editor.aiPromptTemplateHint")+" "+this.$t("trading-assistant.template.".concat(n.key))),this.scheduleEditorRefresh())},getCode:function(){return this.editor?this.editor.getValue():this.value},setCode:function(t){this.editor&&this.editor.getValue()!==t?this.editor.setValue(t):this.$emit("input",t),this.scheduleEditorRefresh()},applySelectedTemplateToCode:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.silent,a=void 0!==e&&e;if(this.selectedTemplate){var s=L(this.selectedTemplate,this.templateParamValues);this.setCode(s),this.templateDirty=!1,this.$emit("template-change",{key:this.selectedTemplateKey,params:(0,u.A)({},this.templateParamValues)}),a||G.A.success(this.$t("trading-assistant.editor.templateApplied"))}},resetTemplateParams:function(){this.selectedTemplate&&(this.templateParamValues=E(this.selectedTemplate),this.templateDirty=!0,this.applySelectedTemplateToCode({silent:!1}))},getParamLabel:function(t){var e="trading-assistant.templateParam.".concat(t.name,".label"),a=this.$t(e);return a===e?t.name:a},getParamDescription:function(t){var e="trading-assistant.templateParam.".concat(t.name,".desc"),a=this.$t(e);return a===e?"":a},getParamTypeLabel:function(t){return this.$t("trading-assistant.editor.paramType.".concat(t))},getOptionLabel:function(t){if(!t)return"";if(t.labelKey){var e=this.$t(t.labelKey);if(e!==t.labelKey)return e}return t.label||t.value},getParamPrecision:function(t){if("integer"===t.type)return 0;var e=t.step;if(!e||Number.isInteger(e))return 0;var a=String(e),s=a.split(".");return s[1]?s[1].length:0},handleNumericParamChange:function(t,e){var a=""===e||null===e||void 0===e?t.default:"integer"===t.type?parseInt(e,10):Number(e);this.$set(this.templateParamValues,t.name,a),this.templateDirty=!0},handleSelectParamChange:function(t,e){this.$set(this.templateParamValues,t.name,e),this.templateDirty=!0},handleBooleanParamChange:function(t,e){this.$set(this.templateParamValues,t.name,!!e),this.templateDirty=!0},handleTextParamChange:function(t,e){this.$set(this.templateParamValues,t.name,e),this.templateDirty=!0},applyPromptSuggestion:function(t){this.aiPrompt=t},handleVerify:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.verifying=!0,e.p=1,a=t.getCode(),e.n=2,(0,y.Ay)({url:"/api/strategies/verify-code",method:"post",data:{code:a,user_id:t.userId}});case 2:s=e.v,s&&s.success?G.A.success(t.$t("trading-assistant.editor.verifySuccess")):G.A.error(s&&(s.msg||s.message)||t.$t("trading-assistant.editor.verifyFailed")),e.n=4;break;case 3:e.p=3,i=e.v,G.A.error(t.$t("trading-assistant.editor.verifyFailed")+": "+(i.message||""));case 4:return e.p=4,t.verifying=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},handleAIGenerate:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.aiPrompt.trim()){e.n=1;break}return G.A.warning(t.$t("trading-assistant.editor.aiPromptRequired")),e.a(2);case 1:return t.aiGenerating=!0,e.p=2,e.n=3,(0,y.Ay)({url:"/api/strategies/ai-generate",method:"post",data:{prompt:t.aiPrompt,user_id:t.userId}});case 3:a=e.v,a&&a.code?(t.setCode(a.code),G.A.success(t.$t("trading-assistant.editor.aiGenerateSuccess"))):G.A.error(a&&(a.msg||a.message)||t.$t("trading-assistant.editor.aiGenerateFailed")),e.n=5;break;case 4:e.p=4,s=e.v,G.A.error(s&&s.message||t.$t("trading-assistant.editor.aiGenerateFailed"));case 5:return e.p=5,t.aiGenerating=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()}}},X=J,Q=(0,C.A)(X,B,H,!1,null,"6c7c8660",null),Z=Q.exports,tt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"performance-analysis",class:{"theme-dark":t.isDark}},[e("a-spin",{attrs:{spinning:t.loading}},[t.hasData?e("div",[e("div",{staticClass:"metrics-grid"},[e("div",{staticClass:"metric-card",class:t.getMetricClass(t.metrics.totalReturn)},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.totalReturn")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.metrics.totalReturn)))])]),e("div",{staticClass:"metric-card",class:t.getMetricClass(t.metrics.annualReturn)},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.annualReturn")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.metrics.annualReturn)))])]),e("div",{staticClass:"metric-card negative"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.maxDrawdown")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.metrics.maxDrawdown)))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.sharpe")))]),e("div",{staticClass:"metric-value"},[t._v(t._s((t.metrics.sharpe||0).toFixed(2)))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.winRate")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.formatPercent(t.metrics.winRate)))])]),e("div",{staticClass:"metric-card",class:t.getMetricClass((t.metrics.profitFactor||0)-1)},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.profitFactor")))]),e("div",{staticClass:"metric-value"},[t._v(t._s((t.metrics.profitFactor||0).toFixed(2)))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.totalTrades")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.metrics.totalTrades||0))])]),e("div",{staticClass:"metric-card"},[e("div",{staticClass:"metric-label"},[t._v(t._s(t.$t("trading-assistant.performance.runningDays")))]),e("div",{staticClass:"metric-value"},[t._v(t._s(t.metrics.runningDays||0))])])]),e("div",{staticClass:"chart-section"},[e("div",{staticClass:"chart-title"},[t._v(t._s(t.$t("trading-assistant.performance.equityCurve")))]),e("div",{ref:"equityChart",staticClass:"chart-container"})]),e("div",{staticClass:"chart-section"},[e("div",{staticClass:"chart-title"},[t._v(t._s(t.$t("trading-assistant.performance.dailyReturns")))]),e("div",{ref:"dailyChart",staticClass:"chart-container",staticStyle:{height:"250px"}})])]):t.loading?t._e():e("a-empty",{staticStyle:{padding:"60px 0"},attrs:{description:t.$t("trading-assistant.performance.noData")}})],1)],1)},et=[],at={name:"PerformanceAnalysis",props:{strategyId:{type:[Number,String],default:null},isDark:{type:Boolean,default:!1}},data:function(){return{loading:!1,metrics:{},equityData:[],dailyReturns:[],equityChartInstance:null,dailyChartInstance:null}},computed:{hasData:function(){return this.equityData.length>0}},watch:{strategyId:{handler:function(t){t&&this.loadData()},immediate:!0},isDark:function(){var t=this;this.disposeCharts(),this.$nextTick(function(){return t.renderCharts()})}},beforeDestroy:function(){this.disposeCharts()},methods:{loadData:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.strategyId){e.n=1;break}return e.a(2);case 1:return t.loading=!0,e.p=2,e.n=3,(0,p.Yx)(t.strategyId);case 3:a=e.v,a&&a.data&&(t.equityData=a.data.equity_curve||a.data||[],t.computeMetrics(),t.$nextTick(function(){return t.renderCharts()})),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.p=5,t.loading=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},computeMetrics:function(){var t=this.equityData;if(t.length){for(var e=t.map(function(t){return t.equity||t.value||t.y||0}),a=e[0]||1,s=e[e.length-1]||a,i=(s-a)/a,r=e[0],n=0,o=[],l=1;lr&&(r=e[l]);var c=(e[l]-r)/r;c1?Math.sqrt(o.reduce(function(t,e){return t+Math.pow(e-p,2)},0)/(o.length-1)):0,g=t.filter(function(t){return t.trade_count}).reduce(function(t,e){return t+e.trade_count},0)||0,h=t.filter(function(t){return t.win_count}).reduce(function(t,e){return t+e.win_count},0)||0,_=t.filter(function(t){return t.gross_profit}).reduce(function(t,e){return t+e.gross_profit},0),y=Math.abs(t.filter(function(t){return t.gross_loss}).reduce(function(t,e){return t+e.gross_loss},0));this.metrics={totalReturn:i,annualReturn:Math.pow(1+i,u)-1,maxDrawdown:n,sharpe:m>0?p/m*Math.sqrt(252):0,winRate:g>0?h/g:0,profitFactor:y>0?_/y:_>0?999:0,totalTrades:g,runningDays:d}}else this.metrics={}},renderCharts:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.n){case 0:return e.n=1,t.getEcharts();case 1:if(a=e.v,a){e.n=2;break}return e.a(2);case 2:t.renderEquityChart(a),t.renderDailyChart(a);case 3:return e.a(2)}},e)}))()},getEcharts:function(){return(0,l.A)((0,o.A)().m(function t(){var e;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(!window.echarts){t.n=1;break}return t.a(2,window.echarts);case 1:return t.p=1,t.n=2,Promise.resolve().then(a.bind(a,29362));case 2:return e=t.v,window.echarts=e.default||e,t.a(2,window.echarts);case 3:return t.p=3,t.v,t.a(2,null)}},t,null,[[1,3]])}))()},renderEquityChart:function(t){if(this.$refs.equityChart){this.equityChartInstance=t.init(this.$refs.equityChart,this.isDark?"dark":null);var e=this.equityData.map(function(t){return t.date||t.timestamp||t.x||""}),a=this.equityData.map(function(t){return t.equity||t.value||t.y||0});this.equityChartInstance.setOption({tooltip:{trigger:"axis"},grid:{left:60,right:20,top:20,bottom:30},xAxis:{type:"category",data:e,axisLabel:{fontSize:10}},yAxis:{type:"value",axisLabel:{fontSize:10}},series:[{type:"line",data:a,smooth:!0,lineStyle:{width:2,color:"#1890ff"},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(24,144,255,0.3)"},{offset:1,color:"rgba(24,144,255,0.02)"}]}},itemStyle:{color:"#1890ff"},showSymbol:!1}]})}},renderDailyChart:function(t){this.$refs.dailyChart&&this.dailyReturns.length&&(this.dailyChartInstance=t.init(this.$refs.dailyChart,this.isDark?"dark":null),this.dailyChartInstance.setOption({tooltip:{trigger:"axis",formatter:function(t){return"".concat((100*t[0].value).toFixed(2),"%")}},grid:{left:60,right:20,top:10,bottom:30},xAxis:{type:"category",data:this.dailyReturns.map(function(t,e){return e+1}),show:!1},yAxis:{type:"value",axisLabel:{formatter:function(t){return(100*t).toFixed(1)+"%"},fontSize:10}},series:[{type:"bar",data:this.dailyReturns.map(function(t){return{value:t,itemStyle:{color:t>=0?"#52c41a":"#ff4d4f"}}}),barMaxWidth:6}]}))},disposeCharts:function(){this.equityChartInstance&&(this.equityChartInstance.dispose(),this.equityChartInstance=null),this.dailyChartInstance&&(this.dailyChartInstance.dispose(),this.dailyChartInstance=null)},formatPercent:function(t){return void 0===t||null===t?"--":(t>=0?"+":"")+(100*t).toFixed(2)+"%"},getMetricClass:function(t){return t?t>0?"positive":t<0?"negative":"":""}}},st=at,it=(0,C.A)(st,tt,et,!1,null,"192d71db",null),rt=it.exports,nt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"strategy-logs",class:{"theme-dark":t.isDark}},[e("div",{staticClass:"logs-toolbar"},[e("div",{staticClass:"toolbar-left"},[e("a-radio-group",{attrs:{size:"small","button-style":"solid"},model:{value:t.filterLevel,callback:function(e){t.filterLevel=e},expression:"filterLevel"}},[e("a-radio-button",{attrs:{value:"all"}},[t._v("All")]),e("a-radio-button",{attrs:{value:"trade"}},[e("a-badge",{attrs:{count:t.countByLevel("trade"),"overflow-count":99,offset:[6,-2]}},[t._v(" "+t._s(t.$t("trading-assistant.logs.level.trade"))+" ")])],1),e("a-radio-button",{attrs:{value:"signal"}},[t._v(t._s(t.$t("trading-assistant.logs.level.signal")))]),e("a-radio-button",{attrs:{value:"error"}},[t._v(t._s(t.$t("trading-assistant.logs.level.error")))])],1)],1),e("div",{staticClass:"toolbar-right"},[e("a-switch",{attrs:{checked:t.autoRefresh,size:"small"},on:{change:t.toggleAutoRefresh}}),e("span",{staticClass:"auto-refresh-label"},[t._v(t._s(t.$t("trading-assistant.logs.autoRefresh")))])],1)]),e("div",{ref:"logsContainer",staticClass:"logs-container custom-scrollbar"},[0===t.filteredLogs.length?e("div",{staticClass:"logs-empty"},[e("a-icon",{staticStyle:{"font-size":"32px",color:"#ccc"},attrs:{type:"file-text"}}),e("p",[t._v(t._s(t.$t("trading-assistant.logs.noLogs")))])],1):t._e(),t._l(t.filteredLogs,function(a,s){return e("div",{key:s,staticClass:"log-entry",class:"level-"+a.level},[e("span",{staticClass:"log-time"},[t._v(t._s(t.formatTime(a.timestamp)))]),e("a-tag",{staticClass:"log-level",attrs:{color:t.getLevelColor(a.level),size:"small"}},[t._v(" "+t._s(t.getLevelText(a.level))+" ")]),e("span",{staticClass:"log-message"},[t._v(t._s(a.message))])],1)})],2)])},ot=[],lt={name:"StrategyLogs",props:{strategyId:{type:[Number,String],default:null},isDark:{type:Boolean,default:!1}},data:function(){return{logs:[],filterLevel:"all",autoRefresh:!1,refreshTimer:null,loading:!1}},computed:{filteredLogs:function(){var t=this;return"all"===this.filterLevel?this.logs:this.logs.filter(function(e){return e.level===t.filterLevel})}},watch:{strategyId:{handler:function(t){t&&this.loadLogs()},immediate:!0}},beforeDestroy:function(){this.stopAutoRefresh()},methods:{loadLogs:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.strategyId){e.n=1;break}return e.a(2);case 1:return t.loading=!0,e.p=2,e.n=3,(0,y.Ay)({url:"/api/strategies/logs",method:"get",params:{id:t.strategyId,limit:200}});case 3:a=e.v,a&&a.data&&(t.logs=a.data,t.$nextTick(function(){return t.scrollToBottom()})),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.p=5,t.loading=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},toggleAutoRefresh:function(t){var e=this;this.autoRefresh=t,t?this.refreshTimer=setInterval(function(){return e.loadLogs()},5e3):this.stopAutoRefresh()},stopAutoRefresh:function(){this.refreshTimer&&(clearInterval(this.refreshTimer),this.refreshTimer=null)},scrollToBottom:function(){var t=this.$refs.logsContainer;t&&(t.scrollTop=t.scrollHeight)},countByLevel:function(t){return this.logs.filter(function(e){return e.level===t}).length},formatTime:function(t){if(!t)return"";try{var e=new Date(t);return e.toLocaleTimeString("en-GB",{hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch(a){return t}},getLevelColor:function(t){var e={info:"blue",warn:"orange",error:"red",trade:"green",signal:"purple"};return e[t]||"default"},getLevelText:function(t){var e="trading-assistant.logs.level.".concat(t),a=this.$t(e);return a!==e?a:t}}},ct=lt,dt=(0,C.A)(ct,nt,ot,!1,null,"129fed65",null),ut=dt.exports,pt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"dashboard-pro",class:{"theme-dark":t.isDarkTheme}},[e("div",{staticClass:"kpi-grid"},[e("div",{staticClass:"kpi-card kpi-primary"},[e("div",{staticClass:"kpi-glow"}),e("div",{staticClass:"kpi-content"},[e("div",{staticClass:"kpi-header"},[e("span",{staticClass:"kpi-icon"},[e("a-icon",{attrs:{type:"wallet"}})],1),e("span",{staticClass:"kpi-label"},[t._v(t._s(t.$t("dashboard.totalEquity")))])]),e("div",{staticClass:"kpi-value"},[e("span",{staticClass:"currency"},[t._v("$")]),e("span",{staticClass:"amount"},[t._v(t._s(t.formatNumber(t.summary.total_equity)))])]),e("div",{staticClass:"kpi-sub"},[e("span",{class:t.summary.total_pnl>=0?"positive":"negative"},[t._v(" "+t._s(t.summary.total_pnl>=0?"+":"")+t._s(t.formatNumber(t.summary.total_pnl))+" ")]),e("span",{staticClass:"label"},[t._v(t._s(t.$t("dashboard.label.totalPnl")))])])])]),e("div",{staticClass:"kpi-card kpi-win-rate"},[e("div",{staticClass:"kpi-content"},[e("div",{staticClass:"kpi-header"},[e("span",{staticClass:"kpi-icon"},[e("a-icon",{attrs:{type:"trophy"}})],1),e("span",{staticClass:"kpi-label"},[t._v(t._s(t.$t("dashboard.winRate")||"胜率"))])]),e("div",{staticClass:"kpi-value"},[e("span",{staticClass:"amount"},[t._v(t._s(t.formatNumber(t.performance.win_rate,1)))]),e("span",{staticClass:"unit"},[t._v("%")])]),e("div",{staticClass:"kpi-sub"},[e("span",{staticClass:"positive"},[t._v(t._s(t.performance.winning_trades))]),e("span",{staticClass:"label"},[t._v(t._s(t.$t("dashboard.label.win")))]),e("span",{staticClass:"divider"},[t._v("/")]),e("span",{staticClass:"negative"},[t._v(t._s(t.performance.losing_trades))]),e("span",{staticClass:"label"},[t._v(t._s(t.$t("dashboard.label.lose")))])])]),e("div",{staticClass:"kpi-ring"},[e("svg",{attrs:{viewBox:"0 0 36 36"}},[e("path",{staticClass:"ring-bg",attrs:{d:"M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831"}}),e("path",{staticClass:"ring-progress",attrs:{"stroke-dasharray":"".concat(t.performance.win_rate||0,", 100"),d:"M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831"}})])])]),e("div",{staticClass:"kpi-card kpi-profit-factor"},[e("div",{staticClass:"kpi-content"},[e("div",{staticClass:"kpi-header"},[e("span",{staticClass:"kpi-icon"},[e("a-icon",{attrs:{type:"rise"}})],1),e("span",{staticClass:"kpi-label"},[t._v(t._s(t.$t("dashboard.profitFactor")||"盈亏比"))])]),e("div",{staticClass:"kpi-value"},[e("span",{staticClass:"amount"},[t._v(t._s(t.formatNumber(t.performance.profit_factor,2)))]),e("span",{staticClass:"unit"},[t._v(":1")])]),e("div",{staticClass:"kpi-sub"},[e("span",[t._v(t._s(t.$t("dashboard.label.avgProfit"))+" ")]),e("span",{staticClass:"positive"},[t._v("$"+t._s(t.formatNumber(t.performance.avg_win)))])])])]),e("div",{staticClass:"kpi-card kpi-drawdown"},[e("div",{staticClass:"kpi-content"},[e("div",{staticClass:"kpi-header"},[e("span",{staticClass:"kpi-icon"},[e("a-icon",{attrs:{type:"fall"}})],1),e("span",{staticClass:"kpi-label"},[t._v(t._s(t.$t("dashboard.maxDrawdown")||"最大回撤"))])]),e("div",{staticClass:"kpi-value"},[e("span",{staticClass:"amount negative"},[t._v(t._s(t.formatNumber(t.performance.max_drawdown_pct,1)))]),e("span",{staticClass:"unit"},[t._v("%")])]),e("div",{staticClass:"kpi-sub"},[e("span",[t._v("$"+t._s(t.formatNumber(t.performance.max_drawdown)))])])])]),e("div",{staticClass:"kpi-card kpi-trades"},[e("div",{staticClass:"kpi-content"},[e("div",{staticClass:"kpi-header"},[e("span",{staticClass:"kpi-icon"},[e("a-icon",{attrs:{type:"swap"}})],1),e("span",{staticClass:"kpi-label"},[t._v(t._s(t.$t("dashboard.totalTrades")||"总交易"))])]),e("div",{staticClass:"kpi-value"},[e("span",{staticClass:"amount"},[t._v(t._s(t.performance.total_trades))]),e("span",{staticClass:"unit"},[t._v(t._s(t.$t("dashboard.unit.trades")))])]),e("div",{staticClass:"kpi-sub"},[e("span",[t._v(t._s(t.$t("dashboard.label.avgDaily"))+" ")]),e("span",[t._v(t._s(t.avgTradesPerDay))]),e("span",{staticClass:"label"},[t._v(" "+t._s(t.$t("dashboard.unit.trades")))])])])]),e("div",{staticClass:"kpi-card kpi-strategies clickable",on:{click:t.goToStrategyManagement}},[e("div",{staticClass:"kpi-content"},[e("div",{staticClass:"kpi-header"},[e("span",{staticClass:"kpi-icon"},[e("a-icon",{attrs:{type:"thunderbolt",theme:"filled"}})],1),e("span",{staticClass:"kpi-label"},[t._v(t._s(t.$t("dashboard.runningStrategies")||"运行中策略"))])]),e("div",{staticClass:"kpi-value"},[e("span",{staticClass:"amount"},[t._v(t._s(t.summary.indicator_strategy_count))]),e("span",{staticClass:"unit"},[t._v(t._s(t.$t("dashboard.unit.strategies")))])]),e("div",{staticClass:"kpi-sub"},[e("span",{staticClass:"highlight"},[t._v(t._s(t.summary.indicator_strategy_count))]),e("span",{staticClass:"label"},[t._v(" "+t._s(t.$t("dashboard.label.indicator")))])])]),e("div",{staticClass:"card-arrow"},[e("a-icon",{attrs:{type:"right"}})],1)])]),t.showSetupGuide?e("div",{staticClass:"setup-guide-card"},[e("div",{staticClass:"setup-guide-copy"},[e("div",{staticClass:"setup-guide-title"},[t._v(t._s(t.$t("dashboard.setupGuide.title")))]),e("div",{staticClass:"setup-guide-desc"},[t._v(t._s(t.$t("dashboard.setupGuide.desc")))]),e("div",{staticClass:"setup-guide-path"},[t._v(t._s(t.$t("dashboard.setupGuide.path")))])]),e("div",{staticClass:"setup-guide-actions"},[e("a-button",{on:{click:t.goToStrategyManagement}},[e("a-icon",{attrs:{type:"appstore"}}),t._v(" "+t._s(t.$t("dashboard.setupGuide.secondary"))+" ")],1),e("a-button",{attrs:{type:"primary"},on:{click:t.goToStrategyCreate}},[e("a-icon",{attrs:{type:"plus"}}),t._v(" "+t._s(t.$t("dashboard.setupGuide.primary"))+" ")],1)],1)]):t._e(),e("div",{staticClass:"chart-row"},[e("div",{staticClass:"chart-panel chart-main"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"calendar"}}),e("span",[t._v(t._s(t.$t("dashboard.profitCalendar")||"收益日曆"))])],1),e("div",{staticClass:"calendar-nav"},[e("a-button",{attrs:{type:"link",size:"small",disabled:t.currentCalendarIndex>=t.calendarMonths.length-1},on:{click:t.prevMonth}},[e("a-icon",{attrs:{type:"left"}})],1),e("span",{staticClass:"current-month"},[t._v(t._s(t.currentMonthLabel))]),e("a-button",{attrs:{type:"link",size:"small",disabled:t.currentCalendarIndex<=0},on:{click:t.nextMonth}},[e("a-icon",{attrs:{type:"right"}})],1)],1)]),e("div",{staticClass:"profit-calendar"},[t.currentCalendarMonth?[e("div",{staticClass:"month-summary"},[e("div",{staticClass:"summary-item"},[e("span",{staticClass:"summary-label"},[t._v(t._s(t.$t("dashboard.ranking.totalProfit")))]),e("span",{staticClass:"summary-value",class:t.currentCalendarMonth.total>=0?"positive":"negative"},[t._v(" "+t._s(t.currentCalendarMonth.total>=0?"+":"")+"$"+t._s(t.formatNumber(t.currentCalendarMonth.total))+" ")])]),e("div",{staticClass:"summary-item"},[e("span",{staticClass:"summary-label"},[t._v(t._s(t.$t("dashboard.label.win")))]),e("span",{staticClass:"summary-value positive"},[t._v(t._s(t.currentCalendarMonth.win_days))])]),e("div",{staticClass:"summary-item"},[e("span",{staticClass:"summary-label"},[t._v(t._s(t.$t("dashboard.label.lose")))]),e("span",{staticClass:"summary-value negative"},[t._v(t._s(t.currentCalendarMonth.lose_days))])])]),e("div",{staticClass:"calendar-weekdays"},t._l(t.weekdays,function(a){return e("div",{key:a,staticClass:"weekday"},[t._v(t._s(a))])}),0),e("div",{staticClass:"calendar-grid"},[t._l(t.calendarFirstDayOffset,function(t){return e("div",{key:"empty-"+t,staticClass:"calendar-cell empty"})}),t._l(t.currentCalendarMonth.days_in_month,function(a){return e("div",{key:a,staticClass:"calendar-cell",class:t.getDayClass(a)},[e("span",{staticClass:"day-number"},[t._v(t._s(a))]),null!==t.getDayProfit(a)?e("span",{staticClass:"day-profit",class:t.getDayProfit(a)>=0?"positive":"negative"},[t._v(" "+t._s(t.getDayProfit(a)>=0?"+":"")+t._s(t.formatCompactNumber(t.getDayProfit(a)))+" ")]):t._e()])})],2)]:e("div",{staticClass:"calendar-empty"},[e("a-icon",{attrs:{type:"inbox"}}),e("span",[t._v(t._s(t.$t("dashboard.noData")))])],1)],2)]),e("div",{staticClass:"chart-panel chart-side"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"pie-chart"}}),e("span",[t._v(t._s(t.$t("dashboard.strategyAllocation")||"策略分布"))])],1)]),e("div",{ref:"pieChart",staticClass:"chart-body"})])]),e("div",{staticClass:"chart-row"},[e("div",{staticClass:"chart-panel chart-half"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"area-chart"}}),e("span",[t._v(t._s(t.$t("dashboard.drawdownCurve")||"回撤曲线"))])],1)]),e("div",{ref:"drawdownChart",staticClass:"chart-body chart-sm"})]),e("div",{staticClass:"chart-panel chart-half"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"clock-circle"}}),e("span",[t._v(t._s(t.$t("dashboard.hourlyDistribution")||"交易时段"))])],1)]),e("div",{ref:"hourlyChart",staticClass:"chart-body chart-sm"})])]),e("div",{staticClass:"chart-panel"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"ordered-list"}}),e("span",[t._v(t._s(t.$t("dashboard.strategyRanking")||"策略排行榜"))])],1)]),e("div",{staticClass:"strategy-ranking"},[0===t.strategyStats.length?e("div",{staticClass:"empty-state"},[e("a-icon",{attrs:{type:"inbox"}}),e("span",[t._v(t._s(t.$t("dashboard.noStrategyData")))])],1):e("div",{staticClass:"ranking-grid"},t._l(t.strategyStats.slice(0,6),function(a,s){return e("div",{key:a.strategy_id,staticClass:"ranking-card",class:{"rank-top":s<3}},[e("div",{staticClass:"rank-badge",class:"rank-".concat(s+1)},[t._v(t._s(s+1))]),e("div",{staticClass:"rank-info"},[e("div",{staticClass:"rank-name"},[t._v(t._s(a.strategy_name))]),e("div",{staticClass:"rank-stats"},[e("span",{staticClass:"stat"},[e("label",[t._v(t._s(t.$t("dashboard.ranking.totalProfit")))]),e("span",{class:a.total_pnl>=0?"positive":"negative"},[t._v(" "+t._s(a.total_pnl>=0?"+":"")+"$"+t._s(t.formatNumber(a.total_pnl))+" ")])]),e("span",{staticClass:"stat"},[e("label",[t._v(t._s(t.$t("dashboard.winRate")))]),e("span",[t._v(t._s(t.formatNumber(a.win_rate,1))+"%")])]),e("span",{staticClass:"stat"},[e("label",[t._v(t._s(t.$t("dashboard.profitFactor")))]),e("span",[t._v(t._s(t.formatNumber(a.profit_factor,2)))])]),e("span",{staticClass:"stat"},[e("label",[t._v(t._s(t.$t("dashboard.ranking.trades")))]),e("span",[t._v(t._s(a.total_trades))])])])]),e("div",{staticClass:"rank-pnl-bar"},[e("div",{staticClass:"bar-fill",class:a.total_pnl>=0?"positive":"negative",style:{width:"".concat(Math.min(100,Math.abs(a.total_pnl)/t.maxStrategyPnl*100),"%")}})])])}),0)])]),e("div",{staticClass:"table-row"},[e("div",{staticClass:"table-panel"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"stock"}}),e("span",[t._v(t._s(t.$t("dashboard.currentPositions")))])],1),e("div",{staticClass:"panel-badge"},[t._v(t._s((t.summary.current_positions||[]).length))])]),e("a-table",{staticClass:"pro-table",attrs:{columns:t.positionColumns,"data-source":t.summary.current_positions,rowKey:"id",pagination:!1,size:"small",scroll:{x:"max-content"}},scopedSlots:t._u([{key:"symbol",fn:function(a,s){return[e("div",{staticClass:"symbol-cell"},[e("span",{staticClass:"symbol-name"},[t._v(t._s(a))]),e("span",{staticClass:"symbol-strategy"},[t._v(t._s(s.strategy_name))])])]}},{key:"side",fn:function(a){return[e("span",{staticClass:"side-tag",class:"long"===a?"long":"short"},[t._v(" "+t._s("long"===a?"LONG":"SHORT")+" ")])]}},{key:"unrealized_pnl",fn:function(a,s){return[e("div",{staticClass:"pnl-cell"},[e("span",{class:a>=0?"positive":"negative"},[t._v(" "+t._s(a>=0?"+":"")+"$"+t._s(t.formatNumber(a))+" ")]),e("span",{staticClass:"pnl-percent",class:s.pnl_percent>=0?"positive":"negative"},[t._v(" "+t._s(s.pnl_percent>=0?"+":"")+t._s(t.formatNumber(s.pnl_percent))+"% ")])])]}}])})],1),e("div",{staticClass:"table-panel"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"history"}}),e("span",[t._v(t._s(t.$t("dashboard.recentTrades")))])],1)]),e("a-table",{staticClass:"pro-table",attrs:{columns:t.columns,"data-source":t.summary.recent_trades,rowKey:"id",pagination:{pageSize:8,size:"small"},size:"small",scroll:{x:"max-content"}},scopedSlots:t._u([{key:"type",fn:function(a){return[e("span",{staticClass:"type-tag",class:t.getTypeClass(a)},[t._v(" "+t._s(t.getSignalTypeText(a))+" ")])]}},{key:"profit",fn:function(a,s){return[e("span",{class:"--"!==t.formatProfitValue(a,s)?a>=0?"positive":"negative":""},[t._v(" "+t._s(t.formatProfitValue(a,s))+" ")])]}},{key:"time",fn:function(a){return[e("span",{staticClass:"time-cell"},[t._v(t._s(t.formatTime(a)))])]}}])})],1)]),e("div",{staticClass:"chart-panel orders-panel"},[e("div",{staticClass:"panel-header"},[e("div",{staticClass:"panel-title"},[e("a-icon",{attrs:{type:"unordered-list"}}),e("span",[t._v(t._s(t.$t("dashboard.pendingOrders")))]),e("a-tooltip",{attrs:{title:t.soundEnabled?t.$t("dashboard.clickToMute"):t.$t("dashboard.clickToUnmute")}},[e("a-icon",{staticClass:"sound-toggle",class:{"sound-off":!t.soundEnabled},attrs:{type:t.soundEnabled?"sound":"audio-muted"},on:{click:t.toggleSound}})],1)],1),e("div",{staticClass:"panel-badge"},[t._v(t._s(t.ordersPagination.total))])]),e("a-table",{staticClass:"pro-table",attrs:{columns:t.orderColumns,"data-source":t.pendingOrders,rowKey:"id",pagination:{current:t.ordersPagination.current,pageSize:t.ordersPagination.pageSize,total:t.ordersPagination.total,showSizeChanger:!0,size:"small",showTotal:function(e){return t.$t("dashboard.totalOrders",{total:e})}},size:"small",loading:t.ordersLoading,scroll:{x:1200}},on:{change:t.handleOrdersTableChange},scopedSlots:t._u([{key:"strategy_name",fn:function(a,s){return[e("div",{staticClass:"symbol-cell"},[e("span",{staticClass:"symbol-name"},[t._v(t._s(a||"-"))]),e("span",{staticClass:"symbol-strategy"},[t._v("ID: "+t._s(s.strategy_id))])])]}},{key:"symbol",fn:function(a){return[e("span",{staticClass:"symbol-tag"},[t._v(t._s(a))])]}},{key:"signal_type",fn:function(a){return[e("span",{staticClass:"type-tag",class:t.getTypeClass(a)},[t._v(" "+t._s(t.getSignalTypeText(a))+" ")])]}},{key:"exchange",fn:function(a,s){return[s&&(s.exchange_display||s.exchange_id||a)?e("span",{staticClass:"exchange-tag",class:(s.exchange_display||s.exchange_id||a).toLowerCase()},[t._v(" "+t._s(String(s.exchange_display||s.exchange_id||a).toUpperCase())+" ")]):e("span",{staticClass:"text-muted"},[t._v("-")]),s&&s.market_type?e("div",{staticClass:"market-type"},[t._v(" "+t._s(String(s.market_type).toUpperCase())+" ")]):t._e()]}},{key:"notify",fn:function(a,s){return[e("div",{staticClass:"notify-icons"},[t._l(s&&s.notify_channels?s.notify_channels:[],function(a){return e("a-tooltip",{key:"".concat(s.id,"-").concat(a),attrs:{title:String(a)}},[e("a-icon",{staticClass:"notify-icon",attrs:{type:t.getNotifyIconType(a)}})],1)}),s&&s.notify_channels&&0!==s.notify_channels.length?t._e():e("span",{staticClass:"text-muted"},[t._v("-")])],2)]}},{key:"status",fn:function(a,s){return[e("span",{staticClass:"status-tag",class:a},[t._v(" "+t._s(t.getStatusText(a))+" ")]),"failed"===a&&s.error_message?e("div",{staticClass:"error-hint"},[e("a-tooltip",{attrs:{title:s.error_message}},[e("a-icon",{attrs:{type:"exclamation-circle"}}),e("span",[t._v(t._s(t.$t("dashboard.viewError")))])],1)],1):t._e()]}},{key:"amount",fn:function(a,s){return[e("div",[t._v(t._s(t.formatNumber(a,8)))]),s.filled_amount?e("div",{staticClass:"sub-text"},[t._v(" "+t._s(t.$t("dashboard.filled"))+": "+t._s(t.formatNumber(s.filled_amount,8))+" ")]):t._e()]}},{key:"price",fn:function(a,s){return[s.filled_price?e("div",[t._v(t._s(t.formatNumber(s.filled_price)))]):e("div",{staticClass:"text-muted"},[t._v("-")])]}},{key:"time_info",fn:function(a,s){return[e("div",{staticClass:"time-cell"},[t._v(t._s(t.formatTime(s.created_at)))]),s.executed_at?e("div",{staticClass:"sub-text"},[t._v(" "+t._s(t.formatTime(s.executed_at))+" ")]):t._e()]}}])})],1)])},mt=[],gt=a(29362),ht={summary:"/api/dashboard/summary",pendingOrders:"/api/dashboard/pendingOrders"};function _t(){return(0,y.Ay)({url:ht.summary,method:"get"})}function yt(t){return(0,y.Ay)({url:ht.pendingOrders,method:"get",params:t})}var ft=a(95353),vt={name:"Dashboard",data:function(){return{summary:{ai_strategy_count:0,indicator_strategy_count:0,total_equity:0,total_pnl:0,total_realized_pnl:0,total_unrealized_pnl:0,performance:{},strategy_stats:[],daily_pnl_chart:[],strategy_pnl_chart:[],monthly_returns:[],hourly_distribution:[],calendar_months:[],recent_trades:[],current_positions:[]},currentCalendarIndex:0,pieChart:null,drawdownChart:null,hourlyChart:null,pendingOrders:[],ordersLoading:!1,ordersPagination:{current:1,pageSize:20,total:0},orderPollTimer:null,lastOrderId:0,orderPollIntervalMs:5e3,soundEnabled:!0,beepCtx:null}},computed:(0,u.A)((0,u.A)({},(0,ft.aH)({navTheme:function(t){return t.app.theme}})),{},{isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},performance:function(){return this.summary.performance||{}},strategyStats:function(){return this.summary.strategy_stats||[]},showSetupGuide:function(){var t=Number(this.summary.indicator_strategy_count||0),e=Array.isArray(this.summary.current_positions)&&this.summary.current_positions.length>0,a=Array.isArray(this.summary.recent_trades)&&this.summary.recent_trades.length>0;return 0===t||!e&&!a},maxStrategyPnl:function(){var t=this.strategyStats;return t.length?Math.max.apply(Math,(0,c.A)(t.map(function(t){return Math.abs(t.total_pnl||0)})).concat([1])):1},avgTradesPerDay:function(){var t=this.summary.daily_pnl_chart||[],e=t.length||1,a=this.performance.total_trades||0;return(a/e).toFixed(1)},calendarMonths:function(){return this.summary.calendar_months||[]},currentCalendarMonth:function(){var t=this.calendarMonths;return t.length&&t[this.currentCalendarIndex]||null},currentMonthLabel:function(){var t=this.currentCalendarMonth;if(!t)return"-";var e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];return"".concat(e[t.month-1]," ").concat(t.year)},weekdays:function(){return["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},calendarFirstDayOffset:function(){var t=this.currentCalendarMonth;return t?t.first_weekday:0},orderStrategyFilters:function(){var t,e=Array.isArray(this.pendingOrders)?this.pendingOrders:[],a=new Map,s=(0,d.A)(e);try{for(s.s();!(t=s.n()).done;){var i=t.value,r=i&&i.strategy_id;if(void 0!==r&&null!==r&&!a.has(String(r))){var n=i&&i.strategy_name?String(i.strategy_name):"",o=n?"".concat(n," (ID: ").concat(r,")"):"ID: ".concat(r);a.set(String(r),{text:o,value:String(r)})}}}catch(l){s.e(l)}finally{s.f()}return Array.from(a.values()).sort(function(t,e){return String(t.text).localeCompare(String(e.text))})},columns:function(){var t=this;return[{title:this.$t("dashboard.table.time"),dataIndex:"created_at",scopedSlots:{customRender:"time"},width:150},{title:this.$t("dashboard.table.symbol"),dataIndex:"symbol",width:100},{title:this.$t("dashboard.table.type"),dataIndex:"type",scopedSlots:{customRender:"type"},width:90},{title:this.$t("dashboard.table.price"),dataIndex:"price",customRender:function(e){return t.formatNumber(e)},width:100},{title:this.$t("dashboard.table.profit"),dataIndex:"profit",scopedSlots:{customRender:"profit"},align:"right",width:100}]},positionColumns:function(){var t=this;return[{title:this.$t("dashboard.table.symbol"),dataIndex:"symbol",scopedSlots:{customRender:"symbol"}},{title:this.$t("dashboard.table.side"),dataIndex:"side",scopedSlots:{customRender:"side"}},{title:this.$t("dashboard.table.size"),dataIndex:"size",customRender:function(e){return t.formatNumber(e,4)}},{title:this.$t("dashboard.table.entryPrice"),dataIndex:"entry_price",customRender:function(e){return t.formatNumber(e)}},{title:this.$t("dashboard.table.pnl"),dataIndex:"unrealized_pnl",scopedSlots:{customRender:"unrealized_pnl"},align:"right"}]},orderColumns:function(){return[{title:this.$t("dashboard.orderTable.strategy"),dataIndex:"strategy_name",scopedSlots:{customRender:"strategy_name"},filters:this.orderStrategyFilters,filterMultiple:!0,onFilter:function(t,e){return String(e&&e.strategy_id)===String(t)},width:150},{title:this.$t("dashboard.orderTable.exchange"),dataIndex:"exchange_id",scopedSlots:{customRender:"exchange"},width:120},{title:this.$t("dashboard.orderTable.notify"),dataIndex:"notify_channels",scopedSlots:{customRender:"notify"},width:100},{title:this.$t("dashboard.orderTable.symbol"),dataIndex:"symbol",scopedSlots:{customRender:"symbol"},width:110},{title:this.$t("dashboard.orderTable.signalType"),dataIndex:"signal_type",scopedSlots:{customRender:"signal_type"},width:100},{title:this.$t("dashboard.orderTable.amount"),dataIndex:"amount",scopedSlots:{customRender:"amount"},width:130},{title:this.$t("dashboard.orderTable.price"),dataIndex:"filled_price",scopedSlots:{customRender:"price"},width:100},{title:this.$t("dashboard.orderTable.status"),dataIndex:"status",scopedSlots:{customRender:"status"},width:130},{title:this.$t("dashboard.orderTable.timeInfo"),dataIndex:"created_at",scopedSlots:{customRender:"time_info"},width:160}]}}),mounted:function(){this.fetchData(),this.fetchPendingOrders(),this.startOrderPolling(),window.addEventListener("resize",this.handleResize)},beforeDestroy:function(){this.stopOrderPolling(),window.removeEventListener("resize",this.handleResize),this.pieChart&&this.pieChart.dispose(),this.drawdownChart&&this.drawdownChart.dispose(),this.hourlyChart&&this.hourlyChart.dispose()},methods:{goToStrategyManagement:function(){this.$router.push("/trading-assistant?tab=strategy")},goToStrategyCreate:function(){this.$router.push("/trading-assistant?tab=strategy&mode=create")},fetchData:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,_t();case 1:a=e.v,1===a.code&&(t.summary=(0,u.A)((0,u.A)({},t.summary),a.data),t.$nextTick(function(){t.initCharts()})),e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}))()},fetchPendingOrders:function(t,e){var a=this;return(0,l.A)((0,o.A)().m(function s(){var i,r,n,l;return(0,o.A)().w(function(s){while(1)switch(s.p=s.n){case 0:return a.ordersLoading=!0,s.p=1,i=t||a.ordersPagination.current||1,r=e||a.ordersPagination.pageSize||20,s.n=2,yt({page:i,pageSize:r});case 2:n=s.v,1===n.code&&(l=n.data||{},a.pendingOrders=l.list||[],a.ordersPagination.current=Number(l.page||i||1),a.ordersPagination.pageSize=Number(l.pageSize||r||20),a.ordersPagination.total=Number(l.total||0)),s.n=4;break;case 3:s.p=3,s.v;case 4:return s.p=4,a.ordersLoading=!1,s.f(4);case 5:return s.a(2)}},s,null,[[1,3,4,5]])}))()},playOrderBeep:function(){if(this.soundEnabled)try{var t=window.AudioContext||window.webkitAudioContext;if(!t)return;this.beepCtx||(this.beepCtx=new t);var e=this.beepCtx;"suspended"===e.state&&"function"===typeof e.resume&&e.resume().catch(function(){});var a=function(t,a){var s=e.createOscillator(),i=e.createGain();s.type="sine",s.frequency.value=a,i.gain.value=.08,s.connect(i),i.connect(e.destination),s.start(t),s.stop(t+.12)},s=e.currentTime;a(s,880),a(s+.18,1100)}catch(i){}},startOrderPolling:function(){var t=this;this.stopOrderPolling(),this.initLastOrderId(),this.orderPollTimer=setInterval(function(){t.pollNewOrders()},this.orderPollIntervalMs)},stopOrderPolling:function(){this.orderPollTimer&&(clearInterval(this.orderPollTimer),this.orderPollTimer=null)},initLastOrderId:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,yt({page:1,pageSize:1});case 1:a=e.v,1===a.code&&a.data&&a.data.list&&a.data.list.length>0&&(t.lastOrderId=a.data.list[0].id||0),e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}))()},pollNewOrders:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i,r,n,l,c,u;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,yt({page:1,pageSize:10});case 1:if(a=e.v,1===a.code&&a.data&&a.data.list){e.n=2;break}return e.a(2);case 2:if(s=a.data.list||[],0!==s.length){e.n=3;break}return e.a(2);case 3:i=!1,r=t.lastOrderId,n=(0,d.A)(s);try{for(n.s();!(l=n.n()).done;)c=l.value,u=c.id||0,u>t.lastOrderId&&(i=!0,u>r&&(r=u))}catch(o){n.e(o)}finally{n.f()}i&&(t.lastOrderId=r,t.playOrderBeep(),t.fetchPendingOrders(),t.$notification.info({message:t.$t("dashboard.newOrderNotify"),description:t.$t("dashboard.newOrderDesc"),duration:4})),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2)}},e,null,[[0,4]])}))()},toggleSound:function(){this.soundEnabled=!this.soundEnabled,this.soundEnabled?this.$message.success(this.$t("dashboard.soundEnabled")):this.$message.info(this.$t("dashboard.soundDisabled"))},handleOrdersTableChange:function(t){var e=t&&t.current?t.current:1,a=t&&t.pageSize?t.pageSize:this.ordersPagination.pageSize||20;this.ordersPagination.current=e,this.ordersPagination.pageSize=a,this.fetchPendingOrders(e,a)},getTypeClass:function(t){if(!t)return"";var e=t.toLowerCase();return e.includes("open_long")||e.includes("add_long")?"long":e.includes("open_short")||e.includes("add_short")?"short":e.includes("close_long")?"close-long":e.includes("close_short")?"close-short":""},getSignalTypeColor:function(t){return t?(t=t.toLowerCase(),t.includes("open_long")||t.includes("add_long")?"green":t.includes("open_short")||t.includes("add_short")?"red":t.includes("close_long")?"orange":t.includes("close_short")?"purple":"blue"):"default"},getSignalTypeText:function(t){if(!t)return"-";var e={open_long:this.$t("dashboard.signalType.openLong"),open_short:this.$t("dashboard.signalType.openShort"),close_long:this.$t("dashboard.signalType.closeLong"),close_short:this.$t("dashboard.signalType.closeShort"),add_long:this.$t("dashboard.signalType.addLong"),add_short:this.$t("dashboard.signalType.addShort")};return e[t.toLowerCase()]||t.toUpperCase()},getStatusColor:function(t){var e={pending:"orange",processing:"blue",completed:"green",failed:"red",cancelled:"default"};return e[t]||"default"},getStatusText:function(t){if(!t)return"-";var e={pending:this.$t("dashboard.status.pending"),processing:this.$t("dashboard.status.processing"),completed:this.$t("dashboard.status.completed"),failed:this.$t("dashboard.status.failed"),cancelled:this.$t("dashboard.status.cancelled")};return e[t.toLowerCase()]||t.toUpperCase()},getNotifyIconType:function(t){var e=String(t||"").trim().toLowerCase(),a={browser:"bell",webhook:"link",discord:"comment",telegram:"message",tg:"message",tele:"message",email:"mail",phone:"phone"};return a[e]||"notification"},getExchangeTagColor:function(t){var e=String(t||"").trim().toLowerCase(),a={binance:"gold",okx:"purple",bitget:"cyan",signal:"geekblue"};return a[e]||"blue"},formatNumber:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return void 0===t||null===t?"0.00":Number(t).toLocaleString("en-US",{minimumFractionDigits:e,maximumFractionDigits:e})},formatProfitValue:function(t,e){if(null===t||void 0===t)return"--";var a=parseFloat(t),s=["open_long","open_short","add_long","add_short"];if(0===a&&e&&s.includes(e.type))return"--";if(Math.abs(a)<1e-6)return e&&s.includes(e.type)?"--":"$0.00";var i=a>=0?"+":"";return"".concat(i,"$").concat(this.formatNumber(a))},formatCompactNumber:function(t){if(void 0===t||null===t)return"0";var e=Math.abs(t);return e>=1e6?(t/1e6).toFixed(1)+"M":e>=1e3?(t/1e3).toFixed(1)+"k":e>=100?Math.round(t):t.toFixed(0)},prevMonth:function(){this.currentCalendarIndex0&&this.currentCalendarIndex--},getDayProfit:function(t){var e=this.currentCalendarMonth;if(!e||!e.days)return null;var a=String(t).padStart(2,"0");return void 0!==e.days[a]?e.days[a]:null},getDayClass:function(t){var e=this.getDayProfit(t);return null===e?"no-data":e>0?"profit":e<0?"loss":"zero"},formatTime:function(t){if(!t)return"-";try{var e;if("string"===typeof t&&t.includes("-")&&t.includes(":"))e=new Date(t);else{if(!("number"===typeof t||"string"===typeof t&&/^\d+$/.test(t)))return"-";var a="string"===typeof t?parseInt(t,10):t,s=a<1e12?1e3*a:a;e=new Date(s)}return isNaN(e.getTime())?"-":e.toLocaleString()}catch(i){return"-"}},initCharts:function(){this.initPieChart(),this.initDrawdownChart(),this.initHourlyChart()},initPieChart:function(){var t=this,e=this.$refs.pieChart;if(e){this.pieChart=gt.init(e);var a=Array.isArray(this.summary.strategy_stats)?this.summary.strategy_stats:[],s=Array.isArray(this.summary.strategy_pnl_chart)?this.summary.strategy_pnl_chart:[],i=[];i=a.length>0?a.map(function(t){var e=t&&t.strategy_name?String(t.strategy_name):"-",a=Number(t&&t.total_pnl?t.total_pnl:0),s=Number(t&&t.total_trades?t.total_trades:0),i=0!==a?Math.abs(a):s;return{name:e,value:i,signedValue:a,trades:s}}).filter(function(t){return t.value>0}):s.map(function(t){var e=t&&t.name?String(t.name):"-",a=Number(t&&t.value?t.value:0);return{name:e,value:Math.abs(a),signedValue:a}}).filter(function(t){return t.value>0});var r=this.isDarkTheme,n=r?"#9ca3af":"#6b7280",o=[new gt.graphic.LinearGradient(0,0,1,1,[{offset:0,color:"#3b82f6"},{offset:1,color:"#1d4ed8"}]),new gt.graphic.LinearGradient(0,0,1,1,[{offset:0,color:"#8b5cf6"},{offset:1,color:"#6d28d9"}]),new gt.graphic.LinearGradient(0,0,1,1,[{offset:0,color:"#10b981"},{offset:1,color:"#059669"}]),new gt.graphic.LinearGradient(0,0,1,1,[{offset:0,color:"#f59e0b"},{offset:1,color:"#d97706"}]),new gt.graphic.LinearGradient(0,0,1,1,[{offset:0,color:"#ec4899"},{offset:1,color:"#be185d"}]),new gt.graphic.LinearGradient(0,0,1,1,[{offset:0,color:"#06b6d4"},{offset:1,color:"#0891b2"}])],l={backgroundColor:"transparent",tooltip:{trigger:"item",backgroundColor:r?"rgba(17, 24, 39, 0.95)":"rgba(255, 255, 255, 0.95)",borderColor:r?"#374151":"#e5e7eb",textStyle:{color:r?"#f3f4f6":"#1f2937"},formatter:function(e){var a=e&&e.data&&"number"===typeof e.data.signedValue?e.data.signedValue:0,s=(a>=0?"+":"")+t.formatNumber(a,2),i=a>=0?"#10b981":"#ef4444";return'\n
    \n
    '.concat(e.name,'
    \n
    占比 ').concat(e.percent,'%
    \n
    PNL $').concat(s,"
    \n
    \n ")}},legend:{bottom:10,left:"center",itemWidth:12,itemHeight:12,itemGap:16,textStyle:{color:n,fontSize:11}},color:o,series:[{name:"策略分布",type:"pie",radius:["50%","75%"],center:["50%","45%"],avoidLabelOverlap:!1,itemStyle:{borderRadius:6,borderColor:r?"#1f2937":"#ffffff",borderWidth:3},label:{show:!1},emphasis:{label:{show:!0,fontSize:14,fontWeight:"bold",color:r?"#f3f4f6":"#1f2937"},scaleSize:8},labelLine:{show:!1},data:i.length>0?i:[{value:1,name:this.$t("dashboard.noData"),signedValue:0}]}]};this.pieChart.setOption(l)}},initDrawdownChart:function(){var t=this,e=this.$refs.drawdownChart;if(e){this.drawdownChart=gt.init(e);var a,s=(this.summary.daily_pnl_chart||[]).map(function(t){return t.date}),i=(this.summary.daily_pnl_chart||[]).map(function(t){return Number(t.profit||0)}),r=[],n=0,o=(0,d.A)(i);try{for(o.s();!(a=o.n()).done;){var l=a.value;n+=Number(l||0),r.push(n)}}catch(f){o.e(f)}finally{o.f()}var c=-1/0,u=0,p=0,m=r.map(function(t,e){c=Math.max(c,t);var a=Number((t-c).toFixed(2));return a\n
    ').concat(s,'
    \n
    \n \n \n ').concat(t.$t("dashboard.drawdown")||"Drawdown",'\n \n -$').concat(r,'\n
    \n
    \n
    \n
    \n \n ')}},grid:{left:55,right:20,bottom:35,top:20,containLabel:!1},xAxis:{type:"category",data:s,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:h,fontSize:10,formatter:function(t){return t.slice(5)}}},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:h,fontSize:10,formatter:function(t){return Math.abs(t)>=1e3?"-$"+(Math.abs(t)/1e3).toFixed(1)+"k":0===t?"0":"-$"+Math.abs(t)}},splitLine:{lineStyle:{color:_,type:[4,4]}},max:0},series:[{name:this.$t("dashboard.drawdown")||"Drawdown",type:"line",data:m,smooth:.3,showSymbol:!1,lineStyle:{width:2.5,color:new gt.graphic.LinearGradient(0,0,1,0,[{offset:0,color:"#ef4444"},{offset:.5,color:"#f87171"},{offset:1,color:"#fca5a5"}]),shadowColor:"rgba(239, 68, 68, 0.4)",shadowBlur:8,shadowOffsetY:4},areaStyle:{color:new gt.graphic.LinearGradient(0,0,0,1,[{offset:0,color:g?"rgba(239, 68, 68, 0.4)":"rgba(239, 68, 68, 0.25)"},{offset:.5,color:g?"rgba(248, 113, 113, 0.15)":"rgba(248, 113, 113, 0.1)"},{offset:1,color:"transparent"}])},markPoint:u<0?{symbol:"pin",symbolSize:45,itemStyle:{color:new gt.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"#f87171"},{offset:1,color:"#dc2626"}]),shadowColor:"rgba(239, 68, 68, 0.5)",shadowBlur:10},label:{show:!0,color:"#fff",fontSize:10,fontWeight:"bold",formatter:function(){return t.$t("dashboard.label.maxDrawdownPoint")||"MAX"}},data:[{name:this.$t("dashboard.maxDrawdown")||"Max Drawdown",coord:[p,u]}]}:void 0,markLine:{silent:!0,symbol:"none",lineStyle:{color:g?"#52525b":"#a1a1aa",type:"dashed",width:1},data:[{yAxis:0}],label:{show:!1}}}]};this.drawdownChart.setOption(y)}},initHourlyChart:function(){var t=this,e=this.$refs.hourlyChart;if(e){this.hourlyChart=gt.init(e);var a=this.summary.hourly_distribution||[],s=a.map(function(t){return"".concat(String(t.hour).padStart(2,"0"),":00")}),i=a.map(function(t){return t.count||0}),r=a.map(function(t){return t.profit||0}),n=this.isDarkTheme,o=n?"#9ca3af":"#6b7280",l=n?"rgba(75, 85, 99, 0.3)":"rgba(229, 231, 235, 0.8)",c={backgroundColor:"transparent",tooltip:{trigger:"axis",backgroundColor:n?"rgba(17, 24, 39, 0.95)":"rgba(255, 255, 255, 0.95)",borderColor:n?"#374151":"#e5e7eb",textStyle:{color:n?"#f3f4f6":"#1f2937"},formatter:function(e){var a,s=Array.isArray(e)?e:[],i=s[0]&&s[0].axisValue?s[0].axisValue:"",r=0,l=0,c=t.$t("dashboard.tradeCount")||"Trade Count",u=t.$t("dashboard.profit")||"Profit",p=t.$t("dashboard.unit.trades")||"",m=(0,d.A)(s);try{for(m.s();!(a=m.n()).done;){var g=a.value;g.seriesName===c&&(r=g.data||0),g.seriesName===u&&(l=g.data||0)}}catch(y){m.e(y)}finally{m.f()}var h=l>=0?"#10b981":"#ef4444",_=(l>=0?"+":"")+t.formatNumber(l,2);return'\n
    \n
    '.concat(i,'
    \n
    ').concat(c,' ').concat(r," ").concat(p,'
    \n
    ').concat(u,' $').concat(_,"
    \n
    \n ")}},grid:{left:50,right:20,bottom:30,top:10,containLabel:!1},xAxis:{type:"category",data:s,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:o,fontSize:10,interval:3}},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:o,fontSize:10},splitLine:{lineStyle:{color:l,type:"dashed"}}},series:[{name:this.$t("dashboard.tradeCount")||"Trade Count",type:"bar",data:i,barMaxWidth:16,itemStyle:{borderRadius:[3,3,0,0],color:new gt.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"#60a5fa"},{offset:1,color:"#3b82f6"}])}},{name:this.$t("dashboard.profit")||"Profit",type:"line",data:r,smooth:!0,showSymbol:!1,lineStyle:{width:2,color:"#a855f7"}}]};this.hourlyChart.setOption(c)}},handleResize:function(){this.pieChart&&this.pieChart.resize(),this.drawdownChart&&this.drawdownChart.resize(),this.hourlyChart&&this.hourlyChart.resize()}}},bt=vt,xt=(0,C.A)(bt,pt,mt,!1,null,"a3f2f566",null),Ct=xt.exports,kt=["BTC/USDT","ETH/USDT","BNB/USDT","SOL/USDT","ADA/USDT","XRP/USDT","DOGE/USDT","DOT/USDT","MATIC/USDT","AVAX/USDT","LINK/USDT","UNI/USDT","LTC/USDT","ATOM/USDT","ETC/USDT"],St=[{value:"binance",labelKey:"binance"},{value:"okx",labelKey:"okx"},{value:"bitget",labelKey:"bitget"},{value:"bybit",labelKey:"bybit"},{value:"coinbaseexchange",labelKey:"coinbaseexchange"},{value:"kraken",labelKey:"kraken"},{value:"kucoin",labelKey:"kucoin"},{value:"gate",labelKey:"gate"},{value:"bitfinex",labelKey:"bitfinex"},{value:"deepcoin",labelKey:"deepcoin"}],wt=[{value:"ibkr",labelKey:"ibkr",name:"Interactive Brokers"}],$t=[{value:"mt5",labelKey:"mt5",name:"MetaTrader 5"}],Tt={name:"TradingAssistant",mixins:[_.t],components:{TradingRecords:S,PositionRecords:M,StrategyTypeSelector:O,StrategyEditor:Z,PerformanceAnalysis:rt,StrategyLogs:ut,DashboardOverview:Ct},computed:{isAdvancedMode:function(){return"advanced"===this.creationMode},isSimpleMode:function(){return"simple"===this.creationMode},isSimpleCreateMode:function(){return this.isSimpleMode&&!this.editingStrategy},strategyFormWrapClass:function(){var t=["strategy-form-modal"];return this.isMobile&&t.push("mobile-modal"),this.isDarkTheme&&t.push("strategy-form-modal-dark"),t.join(" ")},displayCurrentStep:function(){return"script"===this.strategyMode?this.currentStep:this.isSimpleMode&&!this.editingStrategy?0===this.currentStep?0:1:this.currentStep},isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},needsPassphrase:function(){return["okx","okex","coinbaseexchange","kucoin","bitget","deepcoin"].includes(this.currentExchangeId)},isIBKRMarket:function(){return"USStock"===this.selectedMarketCategory},isMT5Market:function(){return"Forex"===this.selectedMarketCategory},isBrokerMarket:function(){return this.isIBKRMarket||this.isMT5Market},filteredExchangeCredentials:function(){var t=this;return this.exchangeCredentials&&Array.isArray(this.exchangeCredentials)?this.exchangeCredentials.filter(function(e){return t.isCredentialCompatible(e)}):[]},formattedExchangeOptions:function(){var t=this;return St.map(function(e){var a="";try{if(e.labelKey){var s="trading-assistant.exchangeNames.".concat(e.labelKey),i=t.$t(s);i!==s&&(a=i)}}catch(r){}return a||(a=e.value.charAt(0).toUpperCase()+e.value.slice(1)),(0,u.A)((0,u.A)({},e),{},{displayName:a})})},totalPnl:function(){return null!==this.currentEquity&&this.selectedStrategy&&this.selectedStrategy.initial_capital?this.currentEquity-(this.selectedStrategy.initial_capital||0):null},totalPnlPercent:function(){return null!==this.totalPnl&&this.selectedStrategy&&this.selectedStrategy.initial_capital?0===this.selectedStrategy.initial_capital?0:this.totalPnl/this.selectedStrategy.initial_capital*100:null},getEquityColorClass:function(){return null===this.totalPnl?"":this.totalPnl>=0?"text-success":"text-danger"},getPnlColorClass:function(){return null===this.totalPnl?"":this.totalPnl>=0?"text-success":"text-danger"},isCryptoMarket:function(){var t=this.selectedMarketCategory||"Crypto";return"crypto"===String(t).toLowerCase()},canUseLiveTrading:function(){var t=this.selectedMarketCategory||"Crypto";return"crypto"===String(t).toLowerCase()||("USStock"===t||"Forex"===t)},isLiveTradingAvailable:function(){var t=this.selectedMarketCategory||"Crypto",e=this.currentExchangeId||"";return"crypto"===String(t).toLowerCase()?["binance","okx","bitget","bybit","coinbaseexchange","kraken","kucoin","gate","bitfinex"].includes(e):"USStock"===t?"ibkr"===this.currentBrokerId:"Forex"===t&&"mt5"===this.currentBrokerId},showDemoTradingSwitch:function(){return this.currentExchangeId&&"binance"===this.currentExchangeId.toLowerCase()},brokerOptions:function(){var t=this;return wt.map(function(e){var a="";try{var s="trading-assistant.brokerNames.".concat(e.labelKey),i=t.$t(s);i!==s&&(a=i)}catch(r){}return a||(a=e.name||e.value.toUpperCase()),(0,u.A)((0,u.A)({},e),{},{displayName:a})})},forexBrokerOptions:function(){var t=this;return $t.map(function(e){var a="";try{var s="trading-assistant.brokerNames.".concat(e.labelKey),i=t.$t(s);i!==s&&(a=i)}catch(r){}return a||(a=e.name||e.value.toUpperCase()),(0,u.A)((0,u.A)({},e),{},{displayName:a})})},cryptoExchangeOptions:function(){var t=this;return St.map(function(e){var a="";try{if(e.labelKey){var s="trading-assistant.exchangeNames.".concat(e.labelKey),i=t.$t(s);i!==s&&(a=i)}}catch(r){}return a||(a=e.value.charAt(0).toUpperCase()+e.value.slice(1)),(0,u.A)((0,u.A)({},e),{},{displayName:a})})},groupedStrategies:function(){return"symbol"===this.groupByMode?this.groupedBySymbol:this.groupedByStrategy},groupedByStrategy:function(){var t,e={},a=[],s=(0,d.A)(this.strategies);try{for(s.s();!(t=s.n()).done;){var i=t.value,r=i.strategy_group_id;r&&r.trim()?(e[r]||(e[r]={id:r,baseName:i.group_base_name||i.strategy_name.split("-")[0],strategies:[],runningCount:0,stoppedCount:0}),e[r].strategies.push(i),"running"===i.status?e[r].runningCount++:e[r].stoppedCount++):a.push(i)}}catch(o){s.e(o)}finally{s.f()}var n=Object.values(e).sort(function(t,e){var a=Math.max.apply(Math,(0,c.A)(t.strategies.map(function(t){return t.created_at||0}))),s=Math.max.apply(Math,(0,c.A)(e.strategies.map(function(t){return t.created_at||0})));return s-a});return{groups:n,ungrouped:a}},groupedBySymbol:function(){var t,e={},a=[],s=(0,d.A)(this.strategies);try{for(s.s();!(t=s.n()).done;){var i=t.value,r=i.trading_config||{},n=r.symbol;if(n&&n.trim()){e[n]||(e[n]={id:"symbol_".concat(n),baseName:n,strategies:[],runningCount:0,stoppedCount:0});var o=(0,u.A)((0,u.A)({},i),{},{displayInfo:{strategyName:i.strategy_name||i.group_base_name||"Unnamed",timeframe:r.timeframe||"-",indicatorName:i.indicator_name||i.indicator_config&&i.indicator_config.name||"-"}});e[n].strategies.push(o),"running"===i.status?e[n].runningCount++:e[n].stoppedCount++}else a.push(i)}}catch(c){s.e(c)}finally{s.f()}var l=Object.values(e).sort(function(t,e){return t.baseName.localeCompare(e.baseName)});return{groups:l,ungrouped:a}},unconfiguredChannels:function(){var t=[];return this.notifyChannelsUi.includes("telegram")&&(this.userNotificationSettings.telegram_bot_token||this.userNotificationSettings.telegram_chat_id||t.push("Telegram")),this.notifyChannelsUi.includes("email")&&(this.userNotificationSettings.email||t.push("Email")),this.notifyChannelsUi.includes("discord")&&(this.userNotificationSettings.discord_webhook||t.push("Discord")),this.notifyChannelsUi.includes("webhook")&&(this.userNotificationSettings.webhook_url||t.push("Webhook")),t}},data:function(){return{topTab:"overview",loading:!1,loadingRecords:!1,strategies:[],selectedStrategy:null,showFormModal:!1,creationMode:"simple",showAdvancedSettings:!1,pendingRouteIndicatorId:"",lastAutoStrategyName:"",strategyMode:"",strategyCode:"",pendingScriptTemplateKey:"",showModeSelector:!1,strategyType:"indicator",selectedMarketCategory:"Crypto",currentStep:0,saving:!1,loadingIndicators:!1,availableIndicators:[],selectedIndicator:null,indicatorParams:[],indicatorParamValues:{},cryptoSymbols:kt,loadingWatchlist:!1,watchlist:[],exchangeOptions:St,currentExchangeId:"",currentBrokerId:"ibkr",connectionTestResult:null,indicatorsLoaded:!1,editingStrategy:null,currentEquity:null,equityPollingTimer:null,backtestCollapseKeys:["risk"],trailingEnabledUi:!1,entryPctMaxUi:100,aiFilterEnabledUi:!1,isEditMode:!1,supportedIPs:[],executionModeUi:"signal",liveDisclaimerAckUi:!1,notifyChannelsUi:["browser"],userNotificationSettings:{default_channels:["browser"],telegram_bot_token:"",telegram_chat_id:"",email:"",phone:"",discord_webhook:"",webhook_url:"",webhook_token:""},loadingExchangeCredentials:!1,exchangeCredentials:[],saveCredentialUi:!1,suppressApiClearOnce:!1,selectedSymbols:[],crossSectionalSymbols:[],collapsedGroups:{},groupByMode:"strategy",showAddSymbolModal:!1,addSymbolMarket:"Crypto",addSymbolMarketTypes:[{value:"Crypto",i18nKey:"dashboard.analysis.market.Crypto"},{value:"USStock",i18nKey:"dashboard.analysis.market.USStock"},{value:"Forex",i18nKey:"dashboard.analysis.market.Forex"},{value:"Futures",i18nKey:"dashboard.analysis.market.Futures"}],addSymbolKeyword:"",searchingSymbol:!1,symbolSearchResults:[],selectedAddSymbol:null,hasSearchedSymbol:!1,addingSymbol:!1,hotSymbols:[],loadingHotSymbols:!1,searchTimer:null}},beforeCreate:function(){this.form=this.$form.createForm(this)},mounted:function(){var t=this;"strategy"!==this.$route.query.tab&&"create"!==this.$route.query.mode||(this.topTab="strategy"),this.loadStrategies(),this.loadUserNotificationSettings(),"create"===this.$route.query.mode&&this.$nextTick(function(){var e=t.$route.query.indicator_id;e?(t.strategyMode="signal",t.creationMode="simple",t.pendingRouteIndicatorId=String(e),t._openCreateModal()):t.handleCreateStrategy()})},beforeDestroy:function(){this.stopEquityPolling()},methods:{goToStrategyTab:function(){this.topTab="strategy"},openCreateStrategyFromGuide:function(){var t=this;this.topTab="strategy",this.$nextTick(function(){t.handleCreateStrategy()})},loadUserNotificationSettings:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,h.vF)();case 1:a=e.v,1===a.code&&a.data&&(t.userNotificationSettings={default_channels:a.data.default_channels||["browser"],telegram_bot_token:a.data.telegram_bot_token||"",telegram_chat_id:a.data.telegram_chat_id||"",email:a.data.email||"",phone:a.data.phone||"",discord_webhook:a.data.discord_webhook||"",webhook_url:a.data.webhook_url||"",webhook_token:a.data.webhook_token||""}),e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},e,null,[[0,2]])}))()},loadWatchlist:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.loadingWatchlist=!0,e.p=1,e.n=2,(0,m.Qo)({userid:1});case 2:a=e.v,a&&1===a.code?t.watchlist=Array.isArray(a.data)?a.data:[]:t.watchlist=[],e.n=4;break;case 3:e.p=3,e.v,t.watchlist=[];case 4:return e.p=4,t.loadingWatchlist=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},handleCloseAddSymbolModal:function(){this.showAddSymbolModal=!1,this.addSymbolKeyword="",this.symbolSearchResults=[],this.selectedAddSymbol=null,this.hasSearchedSymbol=!1},handleAddSymbolMarketChange:function(t){this.addSymbolMarket=t,this.addSymbolKeyword="",this.symbolSearchResults=[],this.selectedAddSymbol=null,this.hasSearchedSymbol=!1,this.loadHotSymbols(t)},handleSymbolSearchInputChange:function(t){var e=this,a=t.target.value;if(this.addSymbolKeyword=a,this.searchTimer&&clearTimeout(this.searchTimer),!a||""===a.trim())return this.symbolSearchResults=[],this.hasSearchedSymbol=!1,void(this.selectedAddSymbol=null);this.searchTimer=setTimeout(function(){e.searchSymbolsInModal(a)},500)},handleSearchSymbol:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){return(0,o.A)().w(function(a){while(1)switch(a.n){case 0:if(t&&t.trim()){a.n=1;break}return a.a(2);case 1:if(e.addSymbolMarket){a.n=2;break}return e.$message.warning(e.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")),a.a(2);case 2:if(!(e.symbolSearchResults.length>0)){a.n=3;break}return a.a(2);case 3:e.hasSearchedSymbol&&0===e.symbolSearchResults.length?e.handleDirectAdd():e.searchSymbolsInModal(t);case 4:return a.a(2)}},a)}))()},searchSymbolsInModal:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:if(t&&""!==t.trim()){a.n=1;break}return e.symbolSearchResults=[],e.hasSearchedSymbol=!1,a.a(2);case 1:if(e.addSymbolMarket){a.n=2;break}return a.a(2);case 2:return e.searchingSymbol=!0,e.hasSearchedSymbol=!0,a.p=3,a.n=4,(0,m._3)({market:e.addSymbolMarket,keyword:t.trim()});case 4:s=a.v,s&&1===s.code&&Array.isArray(s.data)?e.symbolSearchResults=s.data:e.symbolSearchResults=[],a.n=6;break;case 5:a.p=5,a.v,e.symbolSearchResults=[];case 6:return a.p=6,e.searchingSymbol=!1,a.f(6);case 7:return a.a(2)}},a,null,[[3,5,6,7]])}))()},handleDirectAdd:function(){this.addSymbolKeyword&&this.addSymbolKeyword.trim()?this.addSymbolMarket?this.selectedAddSymbol={market:this.addSymbolMarket,symbol:this.addSymbolKeyword.trim().toUpperCase(),name:""}:this.$message.warning(this.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")):this.$message.warning(this.$t("dashboard.analysis.modal.addStock.pleaseEnterSymbol"))},handleSelectAddSymbol:function(t){this.selectedAddSymbol={market:this.addSymbolMarket,symbol:t.symbol,name:t.name||""}},loadHotSymbols:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:if(t||(t=e.addSymbolMarket||"Crypto"),t){a.n=1;break}return a.a(2);case 1:return e.loadingHotSymbols=!0,a.p=2,a.n=3,(0,m.z6)({market:t,limit:10});case 3:s=a.v,s&&1===s.code&&s.data?e.hotSymbols=s.data:e.hotSymbols=[],a.n=5;break;case 4:a.p=4,a.v,e.hotSymbols=[];case 5:return a.p=5,e.loadingHotSymbols=!1,a.f(5);case 6:return a.a(2)}},a,null,[[2,4,5,6]])}))()},handleConfirmAddSymbol:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i,r,n,l,d;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(a="",s="",!t.selectedAddSymbol){e.n=1;break}a=t.selectedAddSymbol.market,s=t.selectedAddSymbol.symbol.toUpperCase(),e.n=4;break;case 1:if(!t.addSymbolKeyword||!t.addSymbolKeyword.trim()){e.n=3;break}if(t.addSymbolMarket){e.n=2;break}return t.$message.warning(t.$t("dashboard.analysis.modal.addStock.pleaseSelectMarket")),e.a(2);case 2:a=t.addSymbolMarket,s=t.addSymbolKeyword.trim().toUpperCase(),e.n=4;break;case 3:return t.$message.warning(t.$t("dashboard.analysis.modal.addStock.pleaseSelectOrEnterSymbol")),e.a(2);case 4:return t.addingSymbol=!0,e.p=5,e.n=6,(0,m.dp)({userid:1,market:a,symbol:s});case 6:if(i=e.v,!i||1!==i.code){e.n=8;break}return t.$message.success(t.$t("dashboard.analysis.message.addStockSuccess")),e.n=7,t.loadWatchlist();case 7:r="".concat(a,":").concat(s),t.isEditMode?(t.form.setFieldsValue({symbol:r}),t.handleWatchlistSymbolChange(r)):(t.selectedSymbols.includes(r)||(t.selectedSymbols=[].concat((0,c.A)(t.selectedSymbols),[r])),t.handleMultiSymbolChange(t.selectedSymbols)),t.handleCloseAddSymbolModal(),e.n=9;break;case 8:t.$message.error((null===i||void 0===i?void 0:i.msg)||t.$t("dashboard.analysis.message.addStockFailed"));case 9:e.n=11;break;case 10:e.p=10,d=e.v,l=(null===d||void 0===d||null===(n=d.response)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.msg)||(null===d||void 0===d?void 0:d.message)||t.$t("dashboard.analysis.message.addStockFailed"),t.$message.error(l);case 11:return e.p=11,t.addingSymbol=!1,e.f(11);case 12:return e.a(2)}},e,null,[[5,10,11,12]])}))()},filterWatchlistOption:function(t,e){var a,s=(null===(a=e.componentOptions)||void 0===a||null===(a=a.propsData)||void 0===a?void 0:a.value)||"";return"__add_symbol_option__"===s||String(s).toLowerCase().includes(String(t||"").toLowerCase())},filterWatchlistOptionWithAdd:function(t,e){var a,s=(null===(a=e.componentOptions)||void 0===a||null===(a=a.propsData)||void 0===a?void 0:a.value)||"";return"__add_symbol_option__"===s||String(s).toLowerCase().includes(String(t||"").toLowerCase())},handleMultiSymbolChangeWithAdd:function(t){if(t&&t.includes("__add_symbol_option__"))return this.selectedSymbols=t.filter(function(t){return"__add_symbol_option__"!==t}),this.showAddSymbolModal=!0,void this.loadHotSymbols(this.addSymbolMarket);this.handleMultiSymbolChange(t)},handleStrategyTypeChange:function(t){var e=t.target.value;"single"===e&&(this.crossSectionalSymbols=[])},handleCrossSectionalSymbolChange:function(t){if(t&&t.includes("__add_symbol_option__"))return this.crossSectionalSymbols=t.filter(function(t){return"__add_symbol_option__"!==t}),this.showAddSymbolModal=!0,void this.loadHotSymbols(this.addSymbolMarket);if(this.crossSectionalSymbols=t||[],t&&t.length>0){var e=t[0];if("string"===typeof e&&e.includes(":")){var a=e.indexOf(":"),s=e.slice(0,a);this.selectedMarketCategory=s||"Crypto"}}},getMarketColor:function(t){var e={USStock:"green",Crypto:"purple",Forex:"gold",Futures:"cyan"};return e[t]||"default"},handleWatchlistSymbolChange:function(t){var e=this;if("__add_symbol_option__"===t)return this.$nextTick(function(){e.form.setFieldsValue({symbol:void 0})}),this.showAddSymbolModal=!0,void this.loadHotSymbols(this.addSymbolMarket);if(t&&"string"===typeof t&&t.includes(":")){var a=t.indexOf(":"),s=t.slice(0,a);if(this.selectedMarketCategory=s||"Crypto","Forex"===this.selectedMarketCategory){this.currentBrokerId="mt5";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({forex_broker_id:"mt5"})}catch(r){}}else if("USStock"===this.selectedMarketCategory){this.currentBrokerId="ibkr";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({broker_id:"ibkr"})}catch(r){}}var i=["Crypto","USStock","Forex"].includes(this.selectedMarketCategory);if(!i){this.executionModeUi="signal";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({execution_mode:"signal"})}catch(r){}}this.currentExchangeId="";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({exchange_id:void 0})}catch(r){}}},handleSimpleSymbolChange:function(t){if("__add_symbol_option__"===t)return this.showAddSymbolModal=!0,void this.loadHotSymbols(this.addSymbolMarket);var e=t?[t]:[];this.handleMultiSymbolChange(e)},handleMultiSymbolChange:function(t){if(this.selectedSymbols=t||[],t&&t.length>0){var e=t[0];if("string"===typeof e&&e.includes(":")){var a=e.indexOf(":"),s=e.slice(0,a);this.selectedMarketCategory=s||"Crypto"}}if("Forex"===this.selectedMarketCategory){this.currentBrokerId="mt5";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({forex_broker_id:"mt5"})}catch(r){}}else if("USStock"===this.selectedMarketCategory){this.currentBrokerId="ibkr";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({broker_id:"ibkr"})}catch(r){}}var i=["Crypto","USStock","Forex"].includes(this.selectedMarketCategory);if(!i){this.executionModeUi="signal";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({execution_mode:"signal"})}catch(r){}}this.currentExchangeId="";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({exchange_id:void 0})}catch(r){}},loadExchangeCredentials:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.loadingExchangeCredentials=!0,e.p=1,e.n=2,(0,g.IA)({user_id:1});case 2:a=e.v,a&&1===a.code?t.exchangeCredentials=a.data&&a.data.items||[]:(t.exchangeCredentials=[],t.$message.warning((null===a||void 0===a?void 0:a.msg)||t.$t("trading-assistant.messages.loadFailed"))),e.n=4;break;case 3:e.p=3,e.v,t.exchangeCredentials=[],t.$message.warning(t.$t("trading-assistant.exchange.testFailed"));case 4:return e.p=4,t.loadingExchangeCredentials=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},formatCredentialLabel:function(t){if(!t)return"";var e=(t.name||"").trim(),a=t.exchange_id||"",s=t.api_key_hint||"";return e?"".concat(a.toUpperCase()," - ").concat(e," (").concat(s,")"):"".concat(a.toUpperCase()," (").concat(s,")")},isCredentialCompatible:function(t){if(!t||!t.exchange_id)return!0;var e=(t.exchange_id||"").toLowerCase(),a=this.selectedMarketCategory||"Crypto";if("mt5"===e)return"Forex"===a;if("ibkr"===e)return"USStock"===a;var s=["binance","okx","bitget","bybit","coinbaseexchange","kraken","kucoin","gate","bitfinex","deepcoin"];return!s.includes(e)||"Crypto"===a},handleCredentialSelectChange:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s,i,r;return(0,o.A)().w(function(a){while(1)switch(a.n){case 0:if(t){a.n=1;break}return e.currentExchangeId="",e.connectionTestResult=null,a.a(2);case 1:if(s=e.exchangeCredentials.find(function(e){return String(e.id)===String(t)}),!s){a.n=5;break}if(i=(s.exchange_id||"").toLowerCase(),"mt5"!==i||"Forex"===e.selectedMarketCategory){a.n=2;break}e.$message.error(e.$t("trading-assistant.validation.mt5OnlyForForex"));try{e.form&&e.form.setFieldsValue&&e.form.setFieldsValue({credential_id:void 0})}catch(n){}return e.currentExchangeId="",e.connectionTestResult=null,a.a(2);case 2:if("ibkr"!==i||"USStock"===e.selectedMarketCategory){a.n=3;break}e.$message.error(e.$t("trading-assistant.validation.ibkrOnlyForUSStock"));try{e.form&&e.form.setFieldsValue&&e.form.setFieldsValue({credential_id:void 0})}catch(n){}return e.currentExchangeId="",e.connectionTestResult=null,a.a(2);case 3:if(r=["binance","okx","bitget","bybit","coinbaseexchange","kraken","kucoin","gate","bitfinex"],!r.includes(i)||"Crypto"===e.selectedMarketCategory){a.n=4;break}e.$message.error(e.$t("trading-assistant.validation.cryptoExchangeOnlyForCrypto"));try{e.form&&e.form.setFieldsValue&&e.form.setFieldsValue({credential_id:void 0})}catch(n){}return e.currentExchangeId="",e.connectionTestResult=null,a.a(2);case 4:e.currentExchangeId=s.exchange_id||"";case 5:e.connectionTestResult=null;case 6:return a.a(2)}},a)}))()},onSaveCredentialChange:function(t){var e=!!(t&&t.target&&t.target.checked);this.saveCredentialUi=e;try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({save_credential:e})}catch(a){}},onExecutionModeChange:function(t){var e=t&&t.target?t.target.value:t;if(this.executionModeUi=e||"signal",!this.canUseLiveTrading&&"signal"!==this.executionModeUi){this.executionModeUi="signal";try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({execution_mode:"signal"})}catch(a){}}},setExecutionModeUi:function(t){var e=t||"signal";this.onExecutionModeChange(e);try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({execution_mode:e})}catch(a){}},onLiveDisclaimerAckChange:function(t){var e=!!(t&&t.target&&t.target.checked);this.liveDisclaimerAckUi=e;try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({live_disclaimer_ack:e})}catch(a){}},onNotifyChannelsChange:function(t){this.notifyChannelsUi=Array.isArray(t)?t:[]},formatCurrency:function(t){return null===t||void 0===t?"-":"$"+t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},formatPnl:function(t){if(null===t||void 0===t)return"-";var e=t>=0?"+":"";return e+"$"+Math.abs(t).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},formatPnlPercent:function(t){if(null===t||void 0===t)return"-";var e=t>=0?"+":"";return e+Math.abs(t).toFixed(2)+"%"},loadStrategies:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.loading=!0,e.p=1,e.n=2,(0,p.EM)();case 2:a=e.v,1===a.code?(s=a.data.strategies||[],t.strategies=s,t.selectedStrategy&&(i=t.strategies.find(function(e){return e.id===t.selectedStrategy.id}),t.selectedStrategy=i||null)):t.$message.error(a.msg||t.$t("trading-assistant.messages.loadFailed")),e.n=4;break;case 3:e.p=3,e.v,t.$message.error(t.$t("trading-assistant.messages.loadFailed"));case 4:return e.p=4,t.loading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},handleCreateStrategy:function(){this.isEditMode=!1,this.editingStrategy=null,this.creationMode="simple",this.strategyMode="",this.strategyCode="",this.pendingScriptTemplateKey="",this.showModeSelector=!0,this.showFormModal=!1},handleModeSelect:function(t){this.strategyMode=t,this.pendingScriptTemplateKey="",this.showModeSelector=!1,this._openCreateModal()},handleUseTemplate:function(t){this.strategyMode="script",this.pendingScriptTemplateKey=t,this.showModeSelector=!1,this._openCreateModal()},_openCreateModal:function(){var t=this;this.strategyType="indicator",this.creationMode=this.editingStrategy?"advanced":"simple",this.currentStep=0,this.currentExchangeId="",this.currentBrokerId="ibkr",this.selectedIndicator=null,this.connectionTestResult=null,this.executionModeUi="signal",this.notifyChannelsUi=["browser"],this.saveCredentialUi=!1,this.backtestCollapseKeys=["risk"],this.trailingEnabledUi=!1,this.entryPctMaxUi=100,this.aiFilterEnabledUi=!1,this.selectedMarketCategory="Crypto",this.selectedSymbols=[],this.showAdvancedSettings=!1;var e=this.buildStrategyDefaultName();this.lastAutoStrategyName=e,this.form.resetFields(),this.form.setFieldsValue({strategy_name:e,execution_mode:"signal",notify_channels:["browser"],save_credential:!1,live_disclaimer_ack:!1,initial_capital:1e3,market_type:"swap",leverage:5,trade_direction:"long",timeframe:"15m",cs_strategy_type:"single"}),this.liveDisclaimerAckUi=!1,this.showFormModal=!0,this.$nextTick((0,l.A)((0,o.A)().m(function e(){return(0,o.A)().w(function(e){while(1)switch(e.n){case 0:return e.n=1,t.loadWatchlist();case 1:return e.n=2,t.loadIndicators();case 2:t.applyPendingRouteIndicatorSelection(),t.loadExchangeCredentials();case 3:return e.a(2)}},e)})))},handleEditStrategy:function(t){var e=this;"running"!==t.status?(this.strategyType="indicator",this.strategyMode=t.strategy_mode||"signal",this.creationMode="advanced",this.strategyCode=t.strategy_code||"",this.pendingScriptTemplateKey="",this.isEditMode=!0,this.editingStrategy=t,this.currentStep=0,this.currentExchangeId="",this.selectedIndicator=null,this.connectionTestResult=null,this.form.resetFields(),this.backtestCollapseKeys=["risk"],this.trailingEnabledUi=!1,this.entryPctMaxUi=100,this.aiFilterEnabledUi=!1,this.showFormModal=!0,this.$nextTick((0,l.A)((0,o.A)().m(function a(){return(0,o.A)().w(function(a){while(1)switch(a.n){case 0:return e.loadWatchlist(),e.loadIndicators(),e.loadExchangeCredentials(),a.n=1,e.loadStrategyDataToForm(t);case 1:return a.a(2)}},a)})))):this.$message.warning(this.$t("trading-assistant.messages.runningWarning"))},loadStrategyDataToForm:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s,i,r,l,c,d,u,p,m,g,h,_,y,f,v,b,x,C,k,S,w,$,T,A,P,M,F,I,N,D,V,R,z,E,L,U,q,K,O,B,H,G;return(0,o.A)().w(function(a){while(1)switch(a.n){case 0:if(e.indicatorsLoaded){a.n=1;break}return a.n=1,e.loadIndicators();case 1:return a.n=2,e.$nextTick();case 2:return e.selectedMarketCategory=t.market_category||"Crypto",d=t.execution_mode||"signal",e.executionModeUi=d,e.liveDisclaimerAckUi="live"===d,u=t.notification_config&&t.notification_config.channels||["browser"],e.notifyChannelsUi=Array.isArray(u)?u:["browser"],p=!1,m=!1,t.trading_config&&(f=t.trading_config||{},v=f.trailing&&"object"===(0,n.A)(f.trailing)?f.trailing:null,p=void 0!==f.trailing_enabled?!!f.trailing_enabled:!(!v||!v.enabled),b=f.enable_ai_filter,m=!0===b||"true"===b||1===b||"1"===b,x=f.scale&&"object"===(0,n.A)(f.scale)?f.scale:null,C=f.position&&"object"===(0,n.A)(f.position)?f.position:null,k=new Set(["risk"]),(f.trend_add_enabled||f.dca_add_enabled||x&&(null!==(g=x.trendAdd)&&void 0!==g&&g.enabled||null!==(h=x.dcaAdd)&&void 0!==h&&h.enabled))&&k.add("scale"),(f.trend_reduce_enabled||f.adverse_reduce_enabled||x&&(null!==(_=x.trendReduce)&&void 0!==_&&_.enabled||null!==(y=x.adverseReduce)&&void 0!==y&&y.enabled))&&k.add("reduce"),(void 0!==f.entry_pct||C&&void 0!==C.entryPct)&&k.add("position"),e.backtestCollapseKeys=Array.from(k)),e.trailingEnabledUi=p,e.aiFilterEnabledUi=m,a.n=3,e.$nextTick();case 3:return e.form.setFieldsValue({enable_ai_filter:m}),a.n=4,e.$nextTick();case 4:if(e.form.setFieldsValue({execution_mode:e.executionModeUi,live_disclaimer_ack:e.liveDisclaimerAckUi,notify_channels:e.notifyChannelsUi,notify_email:(null===(s=t.notification_config)||void 0===s||null===(s=s.targets)||void 0===s?void 0:s.email)||"",notify_phone:(null===(i=t.notification_config)||void 0===i||null===(i=i.targets)||void 0===i?void 0:i.phone)||"",notify_telegram:(null===(r=t.notification_config)||void 0===r||null===(r=r.targets)||void 0===r?void 0:r.telegram)||"",notify_discord:(null===(l=t.notification_config)||void 0===l||null===(l=l.targets)||void 0===l?void 0:l.discord)||"",notify_webhook:(null===(c=t.notification_config)||void 0===c||null===(c=c.targets)||void 0===c?void 0:c.webhook)||""}),!t.indicator_config||!t.indicator_config.indicator_id){a.n=7;break}if(S=t.indicator_config.indicator_id,w=e.availableIndicators.find(function(t){return String(t.id)===String(S)}),!w){a.n=6;break}return T=String(w.id),e.form.setFieldsValue({indicator_id:T}),a.n=5,e.handleIndicatorChange(T);case 5:A=null===($=t.trading_config)||void 0===$?void 0:$.indicator_params,A&&"object"===(0,n.A)(A)&&Object.keys(A).forEach(function(t){t in e.indicatorParamValues&&e.$set(e.indicatorParamValues,t,A[t])}),a.n=7;break;case 6:e.form.setFieldsValue({indicator_id:String(S)});case 7:if(!t.exchange_config){a.n=11;break}if(P=t.exchange_config.exchange_id||"",M="live"===e.executionModeUi,F=["Crypto","USStock","Forex"].includes(e.selectedMarketCategory),I="USStock"===e.selectedMarketCategory,N="Forex"===e.selectedMarketCategory,!M||!F){a.n=10;break}if(!I){a.n=8;break}e.currentBrokerId=P||"ibkr",e.form.setFieldsValue({broker_id:P||"ibkr",ibkr_host:t.exchange_config.ibkr_host||"127.0.0.1",ibkr_port:t.exchange_config.ibkr_port||7497,ibkr_client_id:t.exchange_config.ibkr_client_id||1,ibkr_account:t.exchange_config.ibkr_account||""}),a.n=10;break;case 8:if(!N){a.n=9;break}e.currentBrokerId=P||"mt5",e.form.setFieldsValue({forex_broker_id:P||"mt5",mt5_server:t.exchange_config.mt5_server||"",mt5_login:t.exchange_config.mt5_login||"",mt5_password:t.exchange_config.mt5_password||"",mt5_terminal_path:t.exchange_config.mt5_terminal_path||""}),a.n=10;break;case 9:if(e.currentExchangeId=P||t.exchange_config.exchange_id||"",D=t.exchange_config.credential_id,!D){a.n=10;break}return e.form.setFieldsValue({credential_id:D}),a.n=10,e.handleCredentialSelectChange(D);case 10:I||N?e.currentBrokerId=P||(N?"mt5":"ibkr"):e.currentExchangeId=P;case 11:if(t.trading_config){if(V=t.trading_config||{},R=V.trailing&&"object"===(0,n.A)(V.trailing)?V.trailing:null,z=V.scale&&"object"===(0,n.A)(V.scale)?V.scale:null,E=V.position&&"object"===(0,n.A)(V.position)?V.position:null,L=V.strategy_type||t.strategy_type||"single","cross_sectional"===L)if(e.form.setFieldsValue({cs_strategy_type:"cross_sectional",portfolio_size:V.portfolio_size||10,long_ratio:V.long_ratio||.5,rebalance_frequency:V.rebalance_frequency||"daily"}),V.symbol_list&&Array.isArray(V.symbol_list))e.crossSectionalSymbols=V.symbol_list;else if(t.symbol_list)try{U="string"===typeof t.symbol_list?JSON.parse(t.symbol_list):t.symbol_list,Array.isArray(U)&&(e.crossSectionalSymbols=U)}catch(o){e.crossSectionalSymbols=[]}else e.crossSectionalSymbols=[];else e.form.setFieldsValue({cs_strategy_type:"single"}),e.crossSectionalSymbols=[];q=z&&z.trendAdd?z.trendAdd:null,K=z&&z.dcaAdd?z.dcaAdd:null,O=z&&z.trendReduce?z.trendReduce:null,B=z&&z.adverseReduce?z.adverseReduce:null,H=V.symbol,G="string"===typeof H&&H.includes(":")?H:"".concat(e.selectedMarketCategory,":").concat(H),e.form.setFieldsValue({strategy_name:t.strategy_name,symbol:G,initial_capital:V.initial_capital,leverage:V.leverage,trade_direction:V.trade_direction||"long",timeframe:V.timeframe||"1H",market_type:"futures"===V.market_type?"swap":V.market_type||"swap",take_profit_pct:V.take_profit_pct||0,stop_loss_pct:V.stop_loss_pct||0,trailing_enabled:p,trailing_stop_pct:void 0!==V.trailing_stop_pct?V.trailing_stop_pct||0:R&&R.pct||0,trailing_activation_pct:void 0!==V.trailing_activation_pct?V.trailing_activation_pct||0:R&&R.activationPct||0,trend_add_enabled:void 0!==V.trend_add_enabled?!!V.trend_add_enabled:!(!q||!q.enabled),trend_add_step_pct:void 0!==V.trend_add_step_pct?V.trend_add_step_pct||0:q&&q.stepPct||0,trend_add_size_pct:void 0!==V.trend_add_size_pct?V.trend_add_size_pct||0:q&&q.sizePct||0,trend_add_max_times:void 0!==V.trend_add_max_times?V.trend_add_max_times||0:q&&q.maxTimes||0,dca_add_enabled:void 0!==V.dca_add_enabled?!!V.dca_add_enabled:!(!K||!K.enabled),dca_add_step_pct:void 0!==V.dca_add_step_pct?V.dca_add_step_pct||0:K&&K.stepPct||0,dca_add_size_pct:void 0!==V.dca_add_size_pct?V.dca_add_size_pct||0:K&&K.sizePct||0,dca_add_max_times:void 0!==V.dca_add_max_times?V.dca_add_max_times||0:K&&K.maxTimes||0,trend_reduce_enabled:void 0!==V.trend_reduce_enabled?!!V.trend_reduce_enabled:!(!O||!O.enabled),trend_reduce_step_pct:void 0!==V.trend_reduce_step_pct?V.trend_reduce_step_pct||0:O&&O.stepPct||0,trend_reduce_size_pct:void 0!==V.trend_reduce_size_pct?V.trend_reduce_size_pct||0:O&&O.sizePct||0,trend_reduce_max_times:void 0!==V.trend_reduce_max_times?V.trend_reduce_max_times||0:O&&O.maxTimes||0,adverse_reduce_enabled:void 0!==V.adverse_reduce_enabled?!!V.adverse_reduce_enabled:!(!B||!B.enabled),adverse_reduce_step_pct:void 0!==V.adverse_reduce_step_pct?V.adverse_reduce_step_pct||0:B&&B.stepPct||0,adverse_reduce_size_pct:void 0!==V.adverse_reduce_size_pct?V.adverse_reduce_size_pct||0:B&&B.sizePct||0,adverse_reduce_max_times:void 0!==V.adverse_reduce_max_times?V.adverse_reduce_max_times||0:B&&B.maxTimes||0,entry_pct:0===V.entry_pct||V.entry_pct?V.entry_pct:E&&E.entryPct?E.entryPct:100,enable_ai_filter:m}),e.$nextTick(function(){e.recalcEntryPctMaxUi(),e.normalizeEntryPct()})}case 12:return a.a(2)}},a)}))()},handleSelectStrategy:function(t){this.selectedStrategy=t,this.currentEquity=null,this.loadStrategyDetails(),this.startEquityPolling()},loadStrategyDetails:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i,n,l,c,u,m,g,h,_,y,f;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.selectedStrategy){e.n=1;break}return e.a(2,Promise.resolve());case 1:return e.p=1,e.n=2,Promise.all([(0,p.Yx)(t.selectedStrategy.id),(0,p.oK)(t.selectedStrategy.id)]);case 2:if(a=e.v,s=(0,r.A)(a,2),i=s[0],n=s[1],l=null,1===i.code&&i.data&&(Array.isArray(i.data)&&i.data.length>0?(c=i.data[i.data.length-1],l=c.equity):(m=(null===(u=t.selectedStrategy.trading_config)||void 0===u?void 0:u.initial_capital)||t.selectedStrategy.initial_capital,l=m||null)),g=0,1===n.code&&n.data){h=n.data.positions||n.data.items||[],_=(0,d.A)(h);try{for(_.s();!(y=_.n()).done;)f=y.value,g+=parseFloat(f.unrealized_pnl||f.unrealizedPnl||0)}catch(o){_.e(o)}finally{_.f()}}t.currentEquity=null!==l?l+g:null,e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[1,3]])}))()},startEquityPolling:function(){var t=this;this.stopEquityPolling(),this.selectedStrategy&&(this.loadStrategyDetails(),this.equityPollingTimer=setInterval(function(){t.loadStrategyDetails()},1e4))},stopEquityPolling:function(){this.equityPollingTimer&&(clearInterval(this.equityPollingTimer),this.equityPollingTimer=null)},handleCloseModal:function(){this.showFormModal=!1,this.editingStrategy=null,this.isEditMode=!1,this.strategyType="indicator",this.strategyMode="",this.strategyCode="",this.pendingScriptTemplateKey="",this.currentStep=0,this.currentExchangeId="",this.selectedIndicator=null,this.connectionTestResult=null,this.indicatorsLoaded=!1,this.availableIndicators=[],this.pendingRouteIndicatorId="",this.lastAutoStrategyName="",this.backtestCollapseKeys=["risk"],this.trailingEnabledUi=!1,this.entryPctMaxUi=100,this.aiFilterEnabledUi=!1,this.showAdvancedSettings=!1,this.executionModeUi="signal",this.liveDisclaimerAckUi=!1,this.form.resetFields()},handleRefresh:function(){this.loadStrategies(),this.showFormModal=!1},handleMenuClick:function(t,e){switch(t){case"start":this.handleStartStrategy(e.id);break;case"stop":this.handleStopStrategy(e.id);break;case"edit":this.handleEditStrategy(e);break;case"backtest":this.handleBacktestStrategy(e);break;case"delete":this.handleDeleteStrategy(e);break}},toggleGroup:function(t){this.$set(this.collapsedGroups,t,!this.collapsedGroups[t])},handleBacktestStrategy:function(t){t&&t.id&&this.$router.push({path:"/backtest-center",query:{tab:"strategy",strategy_id:String(t.id)}})},handleGroupMenuClick:function(t,e){var a=this;return(0,l.A)((0,o.A)().m(function s(){var i,r;return(0,o.A)().w(function(s){while(1)switch(s.n){case 0:i=e.strategies.map(function(t){return t.id}),r=t,s.n="startAll"===r?1:"stopAll"===r?3:"deleteAll"===r?5:7;break;case 1:return s.n=2,a.handleBatchStartStrategies(i,e.baseName);case 2:return s.a(3,7);case 3:return s.n=4,a.handleBatchStopStrategies(i,e.baseName);case 4:return s.a(3,7);case 5:return s.n=6,a.handleBatchDeleteStrategies(i,e.baseName);case 6:return s.a(3,7);case 7:return s.a(2)}},s)}))()},handleBatchStartStrategies:function(t,e){var a=this;return(0,l.A)((0,o.A)().m(function e(){var s,i,r;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,p.UH)({strategy_ids:t});case 1:s=e.v,1===s.code?(r=(null===(i=s.data)||void 0===i||null===(i=i.success_ids)||void 0===i?void 0:i.length)||t.length,a.$message.success(a.$t("trading-assistant.messages.batchStartSuccess",{count:r})),a.loadStrategies()):a.$message.error(s.msg||a.$t("trading-assistant.messages.batchStartFailed")),e.n=3;break;case 2:e.p=2,e.v,a.$message.error(a.$t("trading-assistant.messages.batchStartFailed"));case 3:return e.a(2)}},e,null,[[0,2]])}))()},handleBatchStopStrategies:function(t,e){var a=this;return(0,l.A)((0,o.A)().m(function e(){var s,i,r;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,p.GF)({strategy_ids:t});case 1:s=e.v,1===s.code?(r=(null===(i=s.data)||void 0===i||null===(i=i.success_ids)||void 0===i?void 0:i.length)||t.length,a.$message.success(a.$t("trading-assistant.messages.batchStopSuccess",{count:r})),a.loadStrategies()):a.$message.error(s.msg||a.$t("trading-assistant.messages.batchStopFailed")),e.n=3;break;case 2:e.p=2,e.v,a.$message.error(a.$t("trading-assistant.messages.batchStopFailed"));case 3:return e.a(2)}},e,null,[[0,2]])}))()},handleBatchDeleteStrategies:function(t,e){var a=this;return(0,l.A)((0,o.A)().m(function s(){var i;return(0,o.A)().w(function(s){while(1)switch(s.n){case 0:i=a.$t("trading-assistant.messages.batchDeleteConfirm",{count:t.length,name:e}),a.$confirm({title:a.$t("trading-assistant.deleteAll"),content:i,okText:a.$t("trading-assistant.deleteAll"),okType:"danger",cancelText:a.$t("trading-assistant.form.cancel"),onOk:function(){var e=(0,l.A)((0,o.A)().m(function e(){var s,i,r;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,(0,p.xQ)({strategy_ids:t});case 1:s=e.v,1===s.code?(r=(null===(i=s.data)||void 0===i||null===(i=i.success_ids)||void 0===i?void 0:i.length)||t.length,a.$message.success(a.$t("trading-assistant.messages.batchDeleteSuccess",{count:r})),a.selectedStrategy&&t.includes(a.selectedStrategy.id)&&(a.selectedStrategy=null,a.stopEquityPolling()),a.loadStrategies()):a.$message.error(s.msg||a.$t("trading-assistant.messages.batchDeleteFailed")),e.n=3;break;case 2:e.p=2,e.v,a.$message.error(a.$t("trading-assistant.messages.batchDeleteFailed"));case 3:return e.a(2)}},e,null,[[0,2]])}));function s(){return e.apply(this,arguments)}return s}()});case 1:return s.a(2)}},s)}))()},handleStartStrategy:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return a.p=0,a.n=1,(0,p.mV)(t);case 1:s=a.v,1===s.code?(e.$message.success(e.$t("trading-assistant.messages.startSuccess")),e.loadStrategies(),e.selectedStrategy&&e.selectedStrategy.id===t&&(e.selectedStrategy.status="running")):e.$message.error(s.msg||e.$t("trading-assistant.messages.startFailed")),a.n=3;break;case 2:a.p=2,a.v,e.$message.error(e.$t("trading-assistant.messages.startFailed"));case 3:return a.a(2)}},a,null,[[0,2]])}))()},handleStopStrategy:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return a.p=0,a.n=1,(0,p.Ke)(t);case 1:s=a.v,1===s.code?(e.$message.success(e.$t("trading-assistant.messages.stopSuccess")),e.loadStrategies(),e.selectedStrategy&&e.selectedStrategy.id===t&&(e.selectedStrategy.status="stopped")):e.$message.error(s.msg||e.$t("trading-assistant.messages.stopFailed")),a.n=3;break;case 2:a.p=2,a.v,e.$message.error(e.$t("trading-assistant.messages.stopFailed"));case 3:return a.a(2)}},a,null,[[0,2]])}))()},handleDeleteStrategy:function(t){var e=this,a=this.$t("trading-assistant.messages.deleteConfirmWithName",{name:t.strategy_name});this.$confirm({title:this.$t("trading-assistant.deleteStrategy"),content:a,okText:this.$t("trading-assistant.deleteStrategy"),okType:"danger",cancelText:this.$t("trading-assistant.form.cancel"),onOk:function(){var a=(0,l.A)((0,o.A)().m(function a(){var s;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return a.p=0,a.n=1,(0,p.v_)(t.id);case 1:s=a.v,1===s.code?(e.$message.success(e.$t("trading-assistant.messages.deleteSuccess")),e.selectedStrategy&&e.selectedStrategy.id===t.id&&(e.selectedStrategy=null,e.stopEquityPolling()),e.loadStrategies()):e.$message.error(s.msg||e.$t("trading-assistant.messages.deleteFailed")),a.n=3;break;case 2:a.p=2,a.v,e.$message.error(e.$t("trading-assistant.messages.deleteFailed"));case 3:return a.a(2)}},a,null,[[0,2]])}));function s(){return a.apply(this,arguments)}return s}()})},getStatusColor:function(t){var e={running:"green",stopped:"default",error:"red"};return e[t]||"default"},getStatusText:function(t){return this.$t("trading-assistant.status.".concat(t))||t},getStrategyTypeText:function(t){return this.$t("trading-assistant.strategyType.".concat(t))||t},getTradeDirectionText:function(t){if(!t)return"";var e={long:this.$t("trading-assistant.form.tradeDirectionLong")||"做多",short:this.$t("trading-assistant.form.tradeDirectionShort")||"做空",both:this.$t("trading-assistant.form.tradeDirectionBoth")||"双向"};return e[t]||t},handleIndicatorSelectFocus:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){return(0,o.A)().w(function(e){while(1)switch(e.n){case 0:if(t.indicatorsLoaded||t.loadingIndicators){e.n=1;break}return e.n=1,t.loadIndicators();case 1:return e.a(2)}},e)}))()},loadIndicators:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s,i,r;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(!t.loadingIndicators){e.n=1;break}return e.a(2,new Promise(function(e){var a=setInterval(function(){t.loadingIndicators||(clearInterval(a),e())},100)}));case 1:if(!t.indicatorsLoaded){e.n=2;break}return e.a(2,Promise.resolve());case 2:return a=t.$store.getters.userInfo||{},s=a.id||1,t.loadingIndicators=!0,e.p=3,e.n=4,(0,y.Ay)({url:"/api/indicator/getIndicators",method:"get",params:{userid:s}});case 4:i=e.v,1===i.code&&i.data?(r=i.data.map(function(t){return{id:t.id,name:t.name,description:t.description,type:t.indicator_type||t.indicatorType||"python",code:t.code,is_buy:t.is_buy,source:1===t.is_buy?"bought":"custom"}}),t.availableIndicators=r,t.indicatorsLoaded=!0,t.applyPendingRouteIndicatorSelection()):(t.availableIndicators=[],t.$message.warning(i.msg||t.$t("trading-assistant.messages.loadIndicatorsFailed"))),e.n=6;break;case 5:e.p=5,e.v,t.availableIndicators=[],t.$message.warning(t.$t("trading-assistant.messages.loadIndicatorsFailed"));case 6:return e.p=6,t.loadingIndicators=!1,e.f(6);case 7:return e.a(2)}},e,null,[[3,5,6,7]])}))()},handleIndicatorChange:function(t){var e=this;return(0,l.A)((0,o.A)().m(function a(){var s,i,r;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:if(s=String(t),e.selectedIndicator=e.availableIndicators.find(function(t){return String(t.id)===s}),e.applyAutoStrategyName(e.selectedIndicator),e.indicatorParams=[],e.indicatorParamValues={},!t){a.n=4;break}return a.p=1,a.n=2,e.$http.get("/api/indicator/getIndicatorParams",{params:{indicator_id:t}});case 2:i=a.v,i&&1===i.code&&Array.isArray(i.data)&&(e.indicatorParams=i.data,r={},i.data.forEach(function(t){r[t.name]=t.default}),e.indicatorParamValues=r),a.n=4;break;case 3:a.p=3,a.v;case 4:return a.a(2)}},a,null,[[1,3]])}))()},handleMarketTypeChange:function(t){var e=t.target.value;"spot"===e&&this.form.setFieldsValue({trade_direction:"long",leverage:1})},recalcEntryPctMaxUi:function(){if(this.form){var t=!!this.form.getFieldValue("trend_add_enabled"),e=!!this.form.getFieldValue("dca_add_enabled"),a=Number(this.form.getFieldValue("trend_add_max_times")||0),s=Number(this.form.getFieldValue("dca_add_max_times")||0),i=Number(this.form.getFieldValue("trend_add_size_pct")||0),r=Number(this.form.getFieldValue("dca_add_size_pct")||0),n=(t?a*i:0)+(e?s*r:0),o=Math.max(0,Math.min(100,100-n));this.entryPctMaxUi=o}else this.entryPctMaxUi=100},normalizeEntryPct:function(){if(this.form){var t=Number(this.form.getFieldValue("entry_pct")||0),e=Number(this.entryPctMaxUi||100);t>e&&this.form.setFieldsValue({entry_pct:e})}},onTrendAddToggle:function(t){var e=this;this.form&&(t&&this.form.setFieldsValue({dca_add_enabled:!1}),this.$nextTick(function(){e.recalcEntryPctMaxUi(),e.normalizeEntryPct()}))},onDcaAddToggle:function(t){var e=this;this.form&&(t&&this.form.setFieldsValue({trend_add_enabled:!1}),this.$nextTick(function(){e.recalcEntryPctMaxUi(),e.normalizeEntryPct()}))},onScaleParamsChange:function(){var t=this;this.$nextTick(function(){t.recalcEntryPctMaxUi(),t.normalizeEntryPct()})},onEntryPctChange:function(){var t=this;this.$nextTick(function(){return t.normalizeEntryPct()})},onTrailingToggle:function(t){this.form&&(this.trailingEnabledUi=!!t,t||this.form.setFieldsValue({trailing_stop_pct:0,trailing_activation_pct:0}))},onAiFilterToggle:function(t){this.aiFilterEnabledUi=!!t;try{this.form&&this.form.setFieldsValue&&this.form.setFieldsValue({enable_ai_filter:!!t})}catch(e){}},filterIndicatorOption:function(t,e){var a,s=(null===(a=e.componentOptions)||void 0===a||null===(a=a.propsData)||void 0===a?void 0:a.label)||"";return s.toLowerCase().indexOf(t.toLowerCase())>=0},getIndicatorOptionLabel:function(t){return t?t.description?"".concat(t.name," - ").concat(t.description):t.name:""},buildStrategyDefaultName:function(t){var e=t&&t.name?t.name:this.$t("trading-assistant.form.defaultStrategyName"),a=this.$t("trading-assistant.form.defaultStrategySuffix");return"".concat(e).concat(a)},applyAutoStrategyName:function(t){if(!this.editingStrategy&&this.form&&"script"!==this.strategyMode){var e=this.buildStrategyDefaultName(t),a=this.form.getFieldValue("strategy_name");a&&a!==this.lastAutoStrategyName||(this.form.setFieldsValue({strategy_name:e}),this.lastAutoStrategyName=e)}},applyPendingRouteIndicatorSelection:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){var a,s;return(0,o.A)().w(function(e){while(1)switch(e.n){case 0:if(t.pendingRouteIndicatorId&&t.form&&!t.loadingIndicators){e.n=1;break}return e.a(2);case 1:if(a=String(t.pendingRouteIndicatorId),s=t.availableIndicators.find(function(t){return String(t.id)===a}),s){e.n=2;break}return e.a(2);case 2:return t.form.setFieldsValue({indicator_id:a}),e.n=3,t.handleIndicatorChange(a);case 3:t.pendingRouteIndicatorId="";case 4:return e.a(2)}},e)}))()},filterSymbolOption:function(t,e){return e.componentOptions.children[0].text.toLowerCase().indexOf(t.toLowerCase())>=0},getIndicatorTypeColor:function(t){var e={trend:"blue",momentum:"green",volatility:"orange",volume:"purple",custom:"default"};return e[t]||"default"},getIndicatorTypeName:function(t){return this.$t("trading-assistant.indicatorType.".concat(t))||t},getExchangeName:function(t){if(t.labelKey){var e="trading-assistant.exchangeNames.".concat(t.labelKey),a=this.$t(e);return a===e?t.value.charAt(0).toUpperCase()+t.value.slice(1):a}return t.label||t.value},getExchangeDisplayName:function(t){if(!t)return"";var e=this.exchangeOptions.find(function(e){return e.value===t});return e?this.getExchangeName(e):t.charAt(0).toUpperCase()+t.slice(1)},getExchangeTagColor:function(t){var e={binance:"gold",okx:"blue",coinbaseexchange:"cyan",kraken:"purple",bitfinex:"geekblue",huobi:"orange",gate:"green",mexc:"lime",kucoin:"volcano",bybit:"red",bitget:"magenta",bitmex:"red",deribit:"blue",phemex:"cyan",bitmart:"geekblue",bitstamp:"purple",bittrex:"orange",poloniex:"green",gemini:"lime",cryptocom:"volcano",blockchaincom:"magenta",bitflyer:"red",upbit:"blue",bithumb:"cyan",coinone:"purple",zb:"geekblue",lbank:"orange",bibox:"green",bigone:"lime",bitrue:"volcano",coinex:"magenta",ftx:"red",ftxus:"blue",binanceus:"gold",binancecoinm:"gold",binanceusdm:"gold",ibkr:"green"};return e[t]||"default"},handleApiConfigChange:function(){this.connectionTestResult=null},getModalPopupContainer:function(){return window.document.body},handleBrokerSelectChange:function(t){this.currentBrokerId=t||"ibkr",this.connectionTestResult=null},handleForexBrokerSelectChange:function(t){this.currentBrokerId=t||"mt5",this.connectionTestResult=null},handleExchangeSelectChange:function(t){var e=this;this.currentExchangeId=t||"",this.connectionTestResult=null,this.suppressApiClearOnce?this.suppressApiClearOnce=!1:this.$nextTick(function(){var t={api_key:void 0,secret_key:void 0,passphrase:void 0,enable_demo_trading:!1};setTimeout(function(){e.form.setFieldsValue(t)},100)})},getPlaceholder:function(t){var e={okx:{api_key:"请输入API Key",secret_key:"请输入Secret Key",passphrase:"请输入Passphrase(创建API时设置)"},okex:{api_key:"请输入API Key",secret_key:"请输入Secret Key",passphrase:"请输入Passphrase(创建API时设置)"},binance:{api_key:"请输入API Key",secret_key:"请输入Secret Key"},coinbaseexchange:{api_key:"请输入API Key(或Key Name)",secret_key:"请输入API Secret(或Private Key)",passphrase:"请输入Passphrase(Legacy Pro API需要)"},kucoin:{api_key:"请输入API Key",secret_key:"请输入Secret Key",passphrase:"请输入Passphrase"},gate:{api_key:"请输入API Key",secret_key:"请输入Secret Key"},mexc:{api_key:"请输入Access Key",secret_key:"请输入Secret Key"},kraken:{api_key:"请输入API Key",secret_key:"请输入Secret Key"},bitfinex:{api_key:"请输入API Key",secret_key:"请输入Secret Key"},bybit:{api_key:"请输入API Key",secret_key:"请输入Secret Key"},bitget:{api_key:"请输入API Key",secret_key:"请输入Secret Key",passphrase:"请输入Passphrase(Legacy Pro API需要)"}},a=e[this.currentExchangeId]||{};if(a[t])return a[t];var s={api_key:this.$t("trading-assistant.placeholders.inputApiKey"),secret_key:this.$t("trading-assistant.placeholders.inputSecretKey"),passphrase:this.$t("trading-assistant.placeholders.inputPassphrase")};return s[t]||this.$t("trading-assistant.placeholders.inputApiKey")},handleNext:function(){var t=this;if("script"!==this.strategyMode){if(0===this.currentStep){var e=["indicator_id","strategy_name"];e.push("initial_capital","market_type","leverage","trade_direction","timeframe"),this.isEditMode&&e.push("symbol"),this.form.validateFields(e,function(e,a){if(!e){if(!t.isEditMode){var s=t.form.getFieldValue("cs_strategy_type")||"single";if("cross_sectional"===s){if(!t.crossSectionalSymbols||0===t.crossSectionalSymbols.length)return void t.$message.warning(t.$t("trading-assistant.validation.symbolsRequired"))}else if(!t.selectedSymbols||0===t.selectedSymbols.length)return void t.$message.warning(t.$t("trading-assistant.validation.symbolsRequired"))}try{var i=a&&a.market_type||t.form.getFieldValue("market_type");"spot"===i&&t.form.setFieldsValue({leverage:1,trade_direction:"long"})}catch(r){}t.backtestCollapseKeys=["risk"];try{t.trailingEnabledUi=!!t.form.getFieldValue("trailing_enabled")}catch(r){t.trailingEnabledUi=!1}t.$nextTick(function(){t.recalcEntryPctMaxUi(),t.normalizeEntryPct()}),t.isSimpleMode&&!t.editingStrategy?t.currentStep=2:t.currentStep++}})}else if(1===this.currentStep){try{var a=this.form.getFieldValue("execution_mode")||"signal";this.executionModeUi=a;var s=this.form.getFieldValue("notify_channels")||["browser"];this.notifyChannelsUi=Array.isArray(s)?s:["browser"]}catch(o){}this.currentStep++}}else if(0===this.currentStep){var i=["strategy_name","symbol","initial_capital","timeframe"];this.form.validateFields(i,function(e){e||(t.currentStep=1)})}else if(1===this.currentStep){if(!this.strategyCode||this.strategyCode.trim().length<20)return void this.$message.warning(this.$t("trading-assistant.editor.codeHint"));try{var r=this.form.getFieldValue("execution_mode")||"signal";this.executionModeUi=r;var n=this.form.getFieldValue("notify_channels")||["browser"];this.notifyChannelsUi=Array.isArray(n)?n:["browser"]}catch(o){}this.currentStep=2}},handlePrev:function(){if(this.currentStep>0){if("script"===this.strategyMode)return void this.currentStep--;this.isSimpleMode&&!this.editingStrategy&&2===this.currentStep?this.currentStep=0:this.currentStep--}},handleSubmit:function(){var t=this;return(0,l.A)((0,o.A)().m(function e(){return(0,o.A)().w(function(e){while(1)switch(e.n){case 0:t.form.validateFields(function(){var e=(0,l.A)((0,o.A)().m(function e(a,s){var i,r,n,l,c,d,u,m,g,h,_,y,f,v,b,x,C,k,S,w,$,T,A;return(0,o.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(a){e.n=15;break}if(e.p=1,t.saving=!0,"script"!==t.strategyMode||t.editingStrategy){e.n=3;break}return i={channels:s.notify_channels||["browser"],targets:{email:t.userNotificationSettings.email||"",phone:t.userNotificationSettings.phone||"",telegram:t.userNotificationSettings.telegram_chat_id||"",telegram_bot_token:t.userNotificationSettings.telegram_bot_token||"",discord:t.userNotificationSettings.discord_webhook||"",webhook:t.userNotificationSettings.webhook_url||"",webhook_token:t.userNotificationSettings.webhook_token||""}},r=s.symbol||"",n="Crypto","string"===typeof r&&r.includes(":")&&(l=r.indexOf(":"),n=r.slice(0,l)||"Crypto",r=r.slice(l+1)),c={user_id:1,strategy_name:s.strategy_name,strategy_type:"ScriptStrategy",strategy_mode:"script",strategy_code:t.strategyCode,market_category:n,execution_mode:s.execution_mode||"signal",notification_config:i,trading_config:{initial_capital:s.initial_capital||1e3,leverage:s.leverage||1,timeframe:s.timeframe||"15m",market_type:s.market_type||"swap",symbol:r}},e.n=2,(0,p.WM)(c);case 2:return d=e.v,1===d.code?(t.$message.success(t.$t("trading-assistant.messages.createSuccess")),t.handleRefresh()):t.$message.error(d.msg||t.$t("trading-assistant.messages.createFailed")),t.saving=!1,t.showFormModal=!1,e.a(2);case 3:if(u=t.canUseLiveTrading&&"live"===s.execution_mode,!u){e.n=4;break}if(m=s.credential_id,m){e.n=4;break}return t.$message.warning(t.$t("trading-assistant.validation.credentialRequired")),t.saving=!1,e.a(2);case 4:if(g={channels:s.notify_channels||[],targets:{email:t.userNotificationSettings.email||"",phone:t.userNotificationSettings.phone||"",telegram:t.userNotificationSettings.telegram_chat_id||"",telegram_bot_token:t.userNotificationSettings.telegram_bot_token||"",discord:t.userNotificationSettings.discord_webhook||"",webhook:t.userNotificationSettings.webhook_url||"",webhook_token:t.userNotificationSettings.webhook_token||""}},g.channels&&0!==g.channels.length){e.n=5;break}return t.$message.warning(t.$t("trading-assistant.validation.notifyChannelRequired")),t.saving=!1,e.a(2);case 5:if(h=String(s.indicator_id),_=t.availableIndicators.find(function(t){return String(t.id)===h}),_){e.n=6;break}return t.$message.error(t.$t("trading-assistant.validation.indicatorRequired")),t.saving=!1,e.a(2);case 6:if(y=!!t.aiFilterEnabledUi,f="futures"===s.market_type?"swap":s.market_type||"swap",v=s.leverage||1,b=s.trade_direction||"long","spot"===f?(v=1,b="long",t.$message.info(t.$t("trading-assistant.messages.spotLimitations"))):(v<1&&(v=1),v>125&&(v=125)),x={strategy_name:s.strategy_name,market_category:t.selectedMarketCategory||"Crypto",execution_mode:s.execution_mode||"signal",notification_config:g,indicator_config:{indicator_id:_.id,indicator_name:_.name,indicator_code:_.code||""},exchange_config:u?t.isIBKRMarket?{exchange_id:s.broker_id||t.currentBrokerId||"ibkr",ibkr_host:s.ibkr_host||"127.0.0.1",ibkr_port:s.ibkr_port||7497,ibkr_client_id:s.ibkr_client_id||1,ibkr_account:s.ibkr_account||""}:t.isMT5Market?{exchange_id:s.forex_broker_id||t.currentBrokerId||"mt5",mt5_server:s.mt5_server||"",mt5_login:s.mt5_login||"",mt5_password:s.mt5_password||"",mt5_terminal_path:s.mt5_terminal_path||""}:{credential_id:s.credential_id,exchange_id:t.currentExchangeId||void 0}:void 0,trading_config:{initial_capital:s.initial_capital,leverage:v,trade_direction:b,timeframe:s.timeframe,market_type:f,margin_mode:"cross",signal_mode:"confirmed",take_profit_pct:s.take_profit_pct||0,stop_loss_pct:s.stop_loss_pct||0,trailing_enabled:!!s.trailing_enabled,trailing_stop_pct:s.trailing_stop_pct||0,trailing_activation_pct:s.trailing_activation_pct||0,trend_add_enabled:!!s.trend_add_enabled,trend_add_step_pct:s.trend_add_step_pct||0,trend_add_size_pct:s.trend_add_size_pct||0,trend_add_max_times:s.trend_add_max_times||0,dca_add_enabled:!!s.dca_add_enabled,dca_add_step_pct:s.dca_add_step_pct||0,dca_add_size_pct:s.dca_add_size_pct||0,dca_add_max_times:s.dca_add_max_times||0,trend_reduce_enabled:!!s.trend_reduce_enabled,trend_reduce_step_pct:s.trend_reduce_step_pct||0,trend_reduce_size_pct:s.trend_reduce_size_pct||0,trend_reduce_max_times:s.trend_reduce_max_times||0,adverse_reduce_enabled:!!s.adverse_reduce_enabled,adverse_reduce_step_pct:s.adverse_reduce_step_pct||0,adverse_reduce_size_pct:s.adverse_reduce_size_pct||0,adverse_reduce_max_times:s.adverse_reduce_max_times||0,entry_pct:0===s.entry_pct||s.entry_pct?s.entry_pct:100,commission:s.commission||0,slippage:s.slippage||0,enable_ai_filter:y,indicator_params:t.indicatorParamValues,strategy_type:s.cs_strategy_type||"single",symbol_list:"cross_sectional"===s.cs_strategy_type?t.crossSectionalSymbols:void 0,portfolio_size:"cross_sectional"===s.cs_strategy_type?s.portfolio_size||10:void 0,long_ratio:"cross_sectional"===s.cs_strategy_type?s.long_ratio||.5:void 0,rebalance_frequency:"cross_sectional"===s.cs_strategy_type?s.rebalance_frequency||"daily":void 0}},!t.editingStrategy){e.n=8;break}return k=s.symbol,"string"===typeof k&&k.includes(":")&&(S=k.indexOf(":"),x.market_category=k.slice(0,S)||x.market_category,k=k.slice(S+1)),x.trading_config.symbol=k,e.n=7,(0,p.P7)(t.editingStrategy.id,x);case 7:C=e.v,e.n=12;break;case 8:if(x.user_id=1,x.strategy_type="IndicatorStrategy","cross_sectional"!==s.cs_strategy_type){e.n=10;break}return x.strategy_type="IndicatorStrategy",x.trading_config.symbol=null,e.n=9,(0,p.WM)(x);case 9:C=e.v,e.n=12;break;case 10:return x.symbols=t.selectedSymbols,e.n=11,(0,p.Ox)(x);case 11:C=e.v;case 12:1===C.code?(t.isEditMode?t.$message.success(t.$t("trading-assistant.messages.updateSuccess")):($=s.cs_strategy_type||"single",T="cross_sectional"===$?t.crossSectionalSymbols.length:t.selectedSymbols.length,A=(null===(w=C.data)||void 0===w?void 0:w.total_created)||T,t.$message.success(t.$t("trading-assistant.messages.batchCreateSuccess",{count:A}))),t.handleRefresh()):t.$message.error(C.msg||(t.isEditMode?t.$t("trading-assistant.messages.updateFailed"):t.$t("trading-assistant.messages.createFailed"))),e.n=14;break;case 13:e.p=13,e.v,t.$message.error(t.isEditMode?t.$t("trading-assistant.messages.updateFailed"):t.$t("trading-assistant.messages.createFailed"));case 14:return e.p=14,t.saving=!1,e.f(14);case 15:return e.a(2)}},e,null,[[1,13,14,15]])}));return function(t,a){return e.apply(this,arguments)}}());case 1:return e.a(2)}},e)}))()},getFormValues:function(){var t=this;return new Promise(function(e,a){t.form.validateFields(function(t,s){t?a(t):e(s)})})},getDropdownContainer:function(t){return document.body}}},At=Tt,Pt=(0,C.A)(At,s,i,!1,null,"bbcac474",null),Mt=Pt.exports},84841:function(t,e,a){a.d(e,{DK:function(){return v},E$:function(){return d},Gl:function(){return m},O0:function(){return c},TK:function(){return n},aU:function(){return i},cw:function(){return l},d$:function(){return x},hG:function(){return o},hl:function(){return g},kg:function(){return r},nY:function(){return f},r7:function(){return u},rx:function(){return _},v9:function(){return h},vF:function(){return p},vi:function(){return b},wq:function(){return y}});var s=a(75769);function i(t){return(0,s.Ay)({url:"/api/users/list",method:"get",params:t})}function r(t){return(0,s.Ay)({url:"/api/users/create",method:"post",data:t})}function n(t,e){return(0,s.Ay)({url:"/api/users/update",method:"put",params:{id:t},data:e})}function o(t){return(0,s.Ay)({url:"/api/users/delete",method:"delete",params:{id:t}})}function l(t){return(0,s.Ay)({url:"/api/users/reset-password",method:"post",data:t})}function c(){return(0,s.Ay)({url:"/api/users/roles",method:"get"})}function d(){return(0,s.Ay)({url:"/api/users/profile",method:"get"})}function u(t){return(0,s.Ay)({url:"/api/users/profile/update",method:"put",data:t})}function p(){return(0,s.Ay)({url:"/api/users/notification-settings",method:"get"})}function m(t){return(0,s.Ay)({url:"/api/users/notification-settings",method:"put",data:t})}function g(){return(0,s.Ay)({url:"/api/users/notification-settings/test",method:"post",data:{}})}function h(t){return(0,s.Ay)({url:"/api/users/my-credits-log",method:"get",params:t})}function _(t){return(0,s.Ay)({url:"/api/users/my-referrals",method:"get",params:t})}function y(t){return(0,s.Ay)({url:"/api/users/set-credits",method:"post",data:t})}function f(t){return(0,s.Ay)({url:"/api/users/set-vip",method:"post",data:t})}function v(t){return(0,s.Ay)({url:"/api/users/system-strategies",method:"get",params:t})}function b(t){return(0,s.Ay)({url:"/api/users/admin-orders",method:"get",params:t})}function x(t){return(0,s.Ay)({url:"/api/users/admin-ai-stats",method:"get",params:t})}}}]); \ No newline at end of file diff --git a/frontend/dist/js/878.badb4eef.js b/frontend/dist/js/878.badb4eef.js new file mode 100644 index 0000000..cced5f3 --- /dev/null +++ b/frontend/dist/js/878.badb4eef.js @@ -0,0 +1 @@ +"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[878],{68083:function(e,t,a){a.r(t),a.d(t,{default:function(){return h}});var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"profile-page",class:{"theme-dark":e.isDarkTheme}},[t("div",{staticClass:"page-header"},[t("h2",{staticClass:"page-title"},[t("a-icon",{attrs:{type:"user"}}),t("span",[e._v(e._s(e.$t("profile.title")||"My Profile"))])],1),t("p",{staticClass:"page-desc"},[e._v(e._s(e.$t("profile.description")||"Manage your account settings and preferences"))])]),t("a-row",{staticClass:"profile-cards-row",attrs:{gutter:24}},[t("a-col",{staticClass:"profile-card-col",attrs:{xs:24,md:8}},[t("a-card",{staticClass:"profile-card",attrs:{bordered:!1}},[t("div",{staticClass:"avatar-section"},[t("a-avatar",{attrs:{size:100,src:e.profile.avatar||"/avatar2.jpg"}}),t("h3",{staticClass:"username"},[e._v(e._s(e.profile.nickname||e.profile.username))]),t("p",{staticClass:"user-role"},[t("a-tag",{attrs:{color:e.getRoleColor(e.profile.role)}},[e._v(" "+e._s(e.getRoleLabel(e.profile.role))+" ")]),e.isVip?t("a-tag",{attrs:{color:"gold"}},[t("a-icon",{attrs:{type:"crown"}}),e._v(" VIP ")],1):e._e()],1)],1),t("a-divider"),t("div",{staticClass:"profile-info"},[t("div",{staticClass:"info-item"},[t("a-icon",{attrs:{type:"user"}}),t("span",{staticClass:"label"},[e._v(e._s(e.$t("profile.username")||"Username")+":")]),t("span",{staticClass:"value"},[e._v(e._s(e.profile.username))])],1),t("div",{staticClass:"info-item"},[t("a-icon",{attrs:{type:"mail"}}),t("span",{staticClass:"label"},[e._v(e._s(e.$t("profile.email")||"Email")+":")]),t("span",{staticClass:"value"},[e._v(e._s(e.profile.email||"-"))])],1),t("div",{staticClass:"info-item"},[t("a-icon",{attrs:{type:"calendar"}}),t("span",{staticClass:"label"},[e._v(e._s(e.$t("profile.lastLogin")||"Last Login")+":")]),t("span",{staticClass:"value"},[e._v(e._s(e.formatTime(e.profile.last_login_at)||"-"))])],1)])],1)],1),t("a-col",{staticClass:"right-cards-col",attrs:{xs:24,md:16}},[t("a-row",{staticClass:"right-cards-row",attrs:{gutter:16}},[t("a-col",{attrs:{xs:24,md:12}},[t("a-card",{staticClass:"credits-card",attrs:{bordered:!1}},[t("div",{staticClass:"credits-header"},[t("h3",{staticClass:"credits-title"},[t("a-icon",{attrs:{type:"wallet"}}),e._v(" "+e._s(e.$t("profile.credits.title")||"我的积分")+" ")],1)]),t("div",{staticClass:"credits-body"},[t("div",{staticClass:"credits-amount"},[t("span",{staticClass:"amount-value"},[e._v(e._s(e.formatCredits(e.billing.credits)))]),t("span",{staticClass:"amount-label"},[e._v(e._s(e.$t("profile.credits.unit")||"积分"))])]),e.billing.vip_expires_at?t("div",{staticClass:"vip-status"},[t("a-icon",{style:{color:e.isVip?"#faad14":"#999"},attrs:{type:"crown"}}),e.isVip?t("span",{staticClass:"vip-active"},[e._v(" "+e._s(e.$t("profile.credits.vipExpires")||"VIP有效期至")+": "+e._s(e.formatDate(e.billing.vip_expires_at))+" ")]):t("span",{staticClass:"vip-expired"},[e._v(" "+e._s(e.$t("profile.credits.vipExpired")||"VIP已过期")+" ")])],1):e.billing.is_vip?e._e():t("div",{staticClass:"vip-status"},[t("span",{staticClass:"no-vip"},[e._v(e._s(e.$t("profile.credits.noVip")||"非VIP用户"))])])]),t("a-divider"),t("div",{staticClass:"credits-actions"},[t("a-button",{attrs:{type:"primary",icon:"shopping"},on:{click:e.handleRecharge}},[e._v(" "+e._s(e.$t("profile.credits.recharge")||"开通/充值")+" ")])],1),e.billing.billing_enabled?t("div",{staticClass:"credits-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.credits.hint")||"使用AI分析/回测/监控等功能会消耗积分;VIP仅可免费使用VIP免费指标。"))])],1):e._e()],1)],1),t("a-col",{attrs:{xs:24,md:12}},[t("a-card",{staticClass:"referral-card",attrs:{bordered:!1}},[t("div",{staticClass:"referral-header"},[t("h3",{staticClass:"referral-title"},[t("a-icon",{attrs:{type:"team"}}),e._v(" "+e._s(e.$t("profile.referral.title")||"邀请好友")+" ")],1)]),t("div",{staticClass:"referral-body"},[t("div",{staticClass:"referral-stats"},[t("div",{staticClass:"stat-item"},[t("span",{staticClass:"stat-value"},[e._v(e._s(e.referralData.total||0))]),t("span",{staticClass:"stat-label"},[e._v(e._s(e.$t("profile.referral.totalInvited")||"已邀请"))])]),e.referralData.referral_bonus>0?t("div",{staticClass:"stat-item"},[t("span",{staticClass:"stat-value"},[e._v("+"+e._s(e.referralData.referral_bonus))]),t("span",{staticClass:"stat-label"},[e._v(e._s(e.$t("profile.referral.bonusPerInvite")||"每邀请获得"))])]):e._e()]),t("a-divider",{staticStyle:{margin:"12px 0"}}),t("div",{staticClass:"referral-link-section"},[t("div",{staticClass:"link-label"},[e._v(e._s(e.$t("profile.referral.yourLink")||"您的邀请链接"))]),t("div",{staticClass:"link-box"},[t("a-input",{attrs:{value:e.referralLink,readonly:"",size:"small"}},[t("a-tooltip",{attrs:{slot:"suffix",title:e.$t("profile.referral.copyLink")||"复制链接"},slot:"suffix"},[t("a-icon",{staticStyle:{cursor:"pointer"},attrs:{type:"copy"},on:{click:e.copyReferralLink}})],1)],1)],1)]),e.referralData.register_bonus>0?t("div",{staticClass:"referral-hint"},[t("a-icon",{attrs:{type:"gift"}}),t("span",[e._v(e._s(e.$t("profile.referral.newUserBonus")||"新用户注册获得")+" "+e._s(e.referralData.register_bonus)+" "+e._s(e.$t("profile.credits.unit")||"积分"))])],1):e._e()],1)])],1)],1)],1)],1),t("a-row",{staticStyle:{"margin-top":"24px"},attrs:{gutter:24}},[t("a-col",{attrs:{xs:24}},[t("a-card",{staticClass:"edit-card",attrs:{bordered:!1}},[t("a-tabs",{model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[t("a-tab-pane",{key:"basic",attrs:{tab:e.$t("profile.basicInfo")||"Basic Info"}},[t("a-form",{staticClass:"profile-form",attrs:{form:e.profileForm,layout:"vertical"}},[t("a-form-item",{attrs:{label:e.$t("profile.nickname")||"Nickname"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["nickname",{initialValue:e.profile.nickname}],expression:"['nickname', { initialValue: profile.nickname }]"}],attrs:{placeholder:e.$t("profile.nicknamePlaceholder")||"Enter your nickname"}},[t("a-icon",{attrs:{slot:"prefix",type:"smile"},slot:"prefix"})],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.email")||"Email"}},[t("a-input",{attrs:{value:e.profile.email||"-",disabled:""}},[t("a-icon",{attrs:{slot:"prefix",type:"mail"},slot:"prefix"}),t("a-tooltip",{attrs:{slot:"suffix",title:e.$t("profile.emailCannotChange")||"Email cannot be changed after registration"},slot:"suffix"},[t("a-icon",{staticStyle:{color:"rgba(0,0,0,.45)"},attrs:{type:"info-circle"}})],1)],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.timezone")||"时区"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["timezone",{initialValue:e.profile.timezone||""}],expression:"['timezone', { initialValue: profile.timezone || '' }]"}],attrs:{placeholder:e.$t("profile.timezonePlaceholder")||"跟随浏览器/系统","show-search":"","allow-clear":"","option-filter-prop":"children"}},[t("a-select-option",{attrs:{value:""}},[e._v(" "+e._s(e.$t("profile.timezoneBrowser")||"跟随浏览器")+" ")]),e._l(e.timezoneIanaList,function(a){return t("a-select-option",{key:a,attrs:{value:a}},[e._v(" "+e._s(a)+" ")])})],2)],1),t("a-form-item",[t("a-button",{attrs:{type:"primary",loading:e.saving},on:{click:e.handleSaveProfile}},[t("a-icon",{attrs:{type:"save"}}),e._v(" "+e._s(e.$t("common.save")||"Save")+" ")],1)],1)],1)],1),t("a-tab-pane",{key:"password",attrs:{tab:e.$t("profile.changePassword")||"Change Password"}},[t("a-form",{staticClass:"password-form",attrs:{form:e.passwordForm,layout:"vertical"}},[t("a-alert",{staticStyle:{"margin-bottom":"24px"},attrs:{message:e.$t("profile.passwordHintNew")||"For security, email verification is required to change password. Password must be at least 8 characters with uppercase, lowercase, and number.",type:"info",showIcon:""}}),t("a-form-item",{attrs:{label:e.$t("profile.verificationCode")||"Verification Code"}},[t("a-row",{attrs:{gutter:12}},[t("a-col",{attrs:{span:16}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["code",{rules:[{required:!0,message:e.$t("profile.codeRequired")||"Please enter verification code"}]}],expression:"['code', {\n rules: [{ required: true, message: $t('profile.codeRequired') || 'Please enter verification code' }]\n }]"}],attrs:{placeholder:e.$t("profile.codePlaceholder")||"Enter verification code"}},[t("a-icon",{attrs:{slot:"prefix",type:"safety-certificate"},slot:"prefix"})],1)],1),t("a-col",{attrs:{span:8}},[t("a-button",{attrs:{block:"",loading:e.sendingPwdCode,disabled:e.sendingPwdCode||e.pwdCodeCountdown>0||!e.profile.email},on:{click:e.handleSendPwdCode}},[e._v(" "+e._s(e.pwdCodeCountdown>0?"".concat(e.pwdCodeCountdown,"s"):e.$t("profile.sendCode")||"Send Code")+" ")])],1)],1),e.profile.email?t("div",{staticClass:"email-hint"},[e._v(" "+e._s(e.$t("profile.codeWillSendTo")||"Code will be sent to")+": "+e._s(e.profile.email)+" ")]):t("div",{staticClass:"email-hint email-warning"},[e._v(" "+e._s(e.$t("profile.noEmailWarning")||"Please set your email first in Basic Info tab")+" ")])],1),t("a-form-item",{attrs:{label:e.$t("profile.newPassword")||"New Password"}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["new_password",{rules:[{required:!0,message:e.$t("profile.newPasswordRequired")||"Please enter new password"},{validator:e.validateNewPassword}]}],expression:"['new_password', {\n rules: [\n { required: true, message: $t('profile.newPasswordRequired') || 'Please enter new password' },\n { validator: validateNewPassword }\n ]\n }]"}],attrs:{placeholder:e.$t("profile.newPasswordPlaceholder")||"Enter new password"}},[t("a-icon",{attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.confirmPassword")||"Confirm Password"}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["confirm_password",{rules:[{required:!0,message:e.$t("profile.confirmPasswordRequired")||"Please confirm password"},{validator:e.validateConfirmPassword}]}],expression:"['confirm_password', {\n rules: [\n { required: true, message: $t('profile.confirmPasswordRequired') || 'Please confirm password' },\n { validator: validateConfirmPassword }\n ]\n }]"}],attrs:{placeholder:e.$t("profile.confirmPasswordPlaceholder")||"Confirm new password"}},[t("a-icon",{attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),t("a-form-item",[t("a-button",{attrs:{type:"primary",loading:e.changingPassword,disabled:!e.profile.email},on:{click:e.handleChangePassword}},[t("a-icon",{attrs:{type:"key"}}),e._v(" "+e._s(e.$t("profile.changePassword")||"Change Password")+" ")],1)],1)],1)],1),t("a-tab-pane",{key:"credits",attrs:{tab:e.$t("profile.creditsLog")||"消费记录"}},[t("a-table",{attrs:{columns:e.creditsLogColumns,dataSource:e.creditsLog,loading:e.creditsLogLoading,pagination:e.creditsLogPagination,rowKey:function(e){return e.id},size:"small"},on:{change:e.handleCreditsLogChange},scopedSlots:e._u([{key:"action",fn:function(a){return[t("a-tag",{attrs:{color:e.getActionColor(a)}},[e._v(" "+e._s(e.getActionLabel(a))+" ")])]}},{key:"amount",fn:function(a){return[t("span",{class:a>=0?"amount-positive":"amount-negative"},[e._v(" "+e._s(a>=0?"+":"")+e._s(a)+" ")])]}},{key:"created_at",fn:function(t){return[e._v(" "+e._s(e.formatCreditsLogTime(t))+" ")]}}])})],1),t("a-tab-pane",{key:"notifications",attrs:{tab:e.$t("profile.notifications.title")||"通知设置"}},[t("div",{staticClass:"notification-settings-form"},[t("a-alert",{staticStyle:{"margin-bottom":"24px"},attrs:{message:e.$t("profile.notifications.hint")||"配置您的默认通知方式,在创建资产监控和预警时将自动使用这些设置",type:"info",showIcon:""}}),t("a-form",{staticStyle:{"max-width":"600px"},attrs:{form:e.notificationForm,layout:"vertical"}},[t("a-form-item",{attrs:{label:e.$t("profile.notifications.defaultChannels")||"默认通知渠道"}},[t("a-checkbox-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["default_channels",{initialValue:e.notificationSettings.default_channels||["browser"]}],expression:"['default_channels', { initialValue: notificationSettings.default_channels || ['browser'] }]"}]},[t("a-row",{attrs:{gutter:16}},[t("a-col",{attrs:{span:8}},[t("a-checkbox",{attrs:{value:"browser"}},[t("a-icon",{attrs:{type:"bell"}}),e._v(" "+e._s(e.$t("profile.notifications.browser")||"站内通知")+" ")],1)],1),t("a-col",{attrs:{span:8}},[t("a-checkbox",{attrs:{value:"telegram"}},[t("a-icon",{attrs:{type:"send"}}),e._v(" Telegram ")],1)],1),t("a-col",{attrs:{span:8}},[t("a-checkbox",{attrs:{value:"email"}},[t("a-icon",{attrs:{type:"mail"}}),e._v(" "+e._s(e.$t("profile.notifications.email")||"邮件")+" ")],1)],1)],1),t("a-row",{staticStyle:{"margin-top":"8px"},attrs:{gutter:16}},[t("a-col",{attrs:{span:8}},[t("a-checkbox",{attrs:{value:"phone"}},[t("a-icon",{attrs:{type:"phone"}}),e._v(" "+e._s(e.$t("profile.notifications.phone")||"短信")+" ")],1)],1),t("a-col",{attrs:{span:8}},[t("a-checkbox",{attrs:{value:"discord"}},[t("a-icon",{attrs:{type:"message"}}),e._v(" Discord ")],1)],1),t("a-col",{attrs:{span:8}},[t("a-checkbox",{attrs:{value:"webhook"}},[t("a-icon",{attrs:{type:"api"}}),e._v(" Webhook ")],1)],1)],1)],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.telegramBotToken")||"Telegram Bot Token"}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["telegram_bot_token",{initialValue:e.notificationSettings.telegram_bot_token}],expression:"['telegram_bot_token', { initialValue: notificationSettings.telegram_bot_token }]"}],attrs:{placeholder:e.$t("profile.notifications.telegramBotTokenPlaceholder")||"请输入您的 Telegram Bot Token"}},[t("a-icon",{attrs:{slot:"prefix",type:"robot"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(" "+e._s(e.$t("profile.notifications.telegramBotTokenHint")||"通过 @BotFather 创建机器人获取 Token")+" "),t("a",{attrs:{href:"https://t.me/BotFather",target:"_blank",rel:"noopener noreferrer"}},[e._v("@BotFather")])])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.telegramChatId")||"Telegram Chat ID"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["telegram_chat_id",{initialValue:e.notificationSettings.telegram_chat_id}],expression:"['telegram_chat_id', { initialValue: notificationSettings.telegram_chat_id }]"}],attrs:{placeholder:e.$t("profile.notifications.telegramPlaceholder")||"请输入您的 Telegram Chat ID(如 123456789)"}},[t("a-icon",{attrs:{slot:"prefix",type:"message"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.notifications.telegramHint")||"发送 /start 给 @userinfobot 可获取您的 Chat ID"))])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.notifyEmail")||"通知邮箱"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["email",{initialValue:e.notificationSettings.email||e.profile.email}],expression:"['email', { initialValue: notificationSettings.email || profile.email }]"}],attrs:{placeholder:e.$t("profile.notifications.emailPlaceholder")||"接收通知的邮箱地址"}},[t("a-icon",{attrs:{slot:"prefix",type:"mail"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.notifications.emailHint")||"默认使用账户邮箱,可设置其他邮箱接收通知"))])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.phone")||"手机号(短信通知)"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["phone",{initialValue:e.notificationSettings.phone}],expression:"['phone', { initialValue: notificationSettings.phone }]"}],attrs:{placeholder:e.$t("profile.notifications.phonePlaceholder")||"请输入手机号(如 +8613800138000)"}},[t("a-icon",{attrs:{slot:"prefix",type:"phone"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.notifications.phoneHint")||"需要管理员配置 Twilio 服务后才能使用短信通知"))])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.discordWebhook")||"Discord Webhook"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["discord_webhook",{initialValue:e.notificationSettings.discord_webhook}],expression:"['discord_webhook', { initialValue: notificationSettings.discord_webhook }]"}],attrs:{placeholder:e.$t("profile.notifications.discordPlaceholder")||"https://discord.com/api/webhooks/..."}},[t("a-icon",{attrs:{slot:"prefix",type:"message"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.notifications.discordHint")||"在 Discord 服务器设置中创建 Webhook"))])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.webhookUrl")||"Webhook URL"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["webhook_url",{initialValue:e.notificationSettings.webhook_url}],expression:"['webhook_url', { initialValue: notificationSettings.webhook_url }]"}],attrs:{placeholder:e.$t("profile.notifications.webhookPlaceholder")||"https://your-server.com/webhook"}},[t("a-icon",{attrs:{slot:"prefix",type:"api"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.notifications.webhookHint")||"自定义 Webhook 地址,将以 POST JSON 方式推送通知"))])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.webhookToken")||"Webhook Token(可选)"}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["webhook_token",{initialValue:e.notificationSettings.webhook_token}],expression:"['webhook_token', { initialValue: notificationSettings.webhook_token }]"}],attrs:{placeholder:e.$t("profile.notifications.webhookTokenPlaceholder")||"用于验证请求的 Bearer Token"}},[t("a-icon",{attrs:{slot:"prefix",type:"key"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.notifications.webhookTokenHint")||"将作为 Authorization: Bearer Token 发送到 Webhook"))])],1)],1),t("a-form-item",[t("a-button",{attrs:{type:"primary",loading:e.savingNotifications},on:{click:e.handleSaveNotifications}},[t("a-icon",{attrs:{type:"save"}}),e._v(" "+e._s(e.$t("common.save")||"保存")+" ")],1),t("a-button",{staticStyle:{"margin-left":"12px"},attrs:{loading:e.testingNotification},on:{click:e.handleTestNotification}},[t("a-icon",{attrs:{type:"experiment"}}),e._v(" "+e._s(e.$t("profile.notifications.testBtn")||"发送测试通知")+" ")],1)],1)],1)],1)]),t("a-tab-pane",{key:"exchange",attrs:{tab:e.$t("profile.exchange.title")||"交易所配置"}},[t("div",{staticClass:"exchange-config-section"},[t("a-alert",{staticStyle:{"margin-bottom":"16px"},attrs:{message:e.$t("profile.exchange.hint"),type:"info",showIcon:""}}),t("div",{staticStyle:{"margin-bottom":"16px","text-align":"right"}},[t("a-button",{staticStyle:{"margin-right":"12px"},on:{click:e.openExchangeSignupModal}},[t("a-icon",{attrs:{type:"rocket"}}),e._v(" "+e._s(e.$t("profile.exchange.openAccount"))+" ")],1),t("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:e.openAddExchangeModal}},[e._v(" "+e._s(e.$t("profile.exchange.addAccount"))+" ")])],1),t("a-table",{attrs:{columns:e.exchangeColumns,dataSource:e.exchangeCredentials,loading:e.exchangeLoading,rowKey:function(e){return e.id},locale:{emptyText:e.$t("profile.exchange.noAccounts")||"暂无交易所账户,请点击上方按钮添加"},size:"small"},scopedSlots:e._u([{key:"exchange_id",fn:function(a,i){return[t("span",{staticStyle:{"text-transform":"capitalize","font-weight":"500"}},[e._v(e._s(e.getExchangeDisplayName(a)))]),i.enable_demo_trading?t("a-tag",{staticStyle:{"margin-left":"6px"},attrs:{color:"orange",size:"small"}},[e._v(" "+e._s(e.$t("profile.exchange.demoTag"))+" ")]):e._e()]}},{key:"api_key_hint",fn:function(a,i){return[t("span",{staticClass:"credential-hint"},[e._v(e._s(a||i.name||"-"))])]}},{key:"created_at",fn:function(t){return[e._v(" "+e._s(e.formatTime(t))+" ")]}},{key:"action",fn:function(a,i){return[t("a-popconfirm",{attrs:{title:e.$t("profile.exchange.deleteConfirm"),okText:e.$t("common.confirm"),cancelText:e.$t("common.cancel")},on:{confirm:function(t){return e.handleDeleteCredential(i.id)}}},[t("a-button",{attrs:{type:"danger",size:"small",ghost:"",icon:"delete"}},[e._v(" "+e._s(e.$t("common.delete"))+" ")])],1)]}}])})],1)]),t("a-tab-pane",{key:"referrals",attrs:{tab:e.$t("profile.referral.listTab")||"邀请列表"}},[t("a-table",{attrs:{columns:e.referralColumns,dataSource:e.referralData.list||[],loading:e.referralLoading,pagination:e.referralPagination,rowKey:function(e){return e.id},locale:{emptyText:e.$t("profile.referral.noReferrals")||"暂无邀请记录"},size:"small"},on:{change:e.handleReferralChange},scopedSlots:e._u([{key:"user",fn:function(a,i){return[t("div",{staticClass:"referral-user-cell"},[t("a-avatar",{attrs:{size:32,src:i.avatar||"/avatar2.jpg"}}),t("div",{staticClass:"user-info"},[t("span",{staticClass:"nickname"},[e._v(e._s(i.nickname||i.username))]),t("span",{staticClass:"username"},[e._v("@"+e._s(i.username))])])],1)]}},{key:"created_at",fn:function(t){return[e._v(" "+e._s(e.formatTime(t))+" ")]}}])})],1)],1)],1)],1)],1),t("exchange-account-modal",{attrs:{visible:e.showAddExchangeModal},on:{"update:visible":function(t){e.showAddExchangeModal=t},success:e.loadExchangeCredentials}}),t("a-modal",{attrs:{title:e.$t("profile.exchange.openAccountTitle"),visible:e.showExchangeSignupModal,"wrap-class-name":e.exchangeModalWrapClass,footer:null,width:"860px"},on:{cancel:function(t){e.showExchangeSignupModal=!1}}},[t("div",{staticClass:"exchange-signup-modal"},[t("div",{staticClass:"exchange-signup-promo"},[e._v(e._s(e.$t("profile.exchange.openAccountPromo")))]),t("div",{staticClass:"exchange-signup-grid"},e._l(e.exchangeSignupCards,function(a){return t("div",{key:a.id,staticClass:"exchange-signup-card"},[t("div",{staticClass:"exchange-signup-card__header"},[t("div",{staticClass:"exchange-signup-logo",style:{background:a.brandBg,color:a.brandColor}},[e._v(" "+e._s(a.short)+" ")]),t("div",{staticClass:"exchange-signup-meta"},[t("div",{staticClass:"exchange-signup-name"},[e._v(e._s(a.name))])])]),t("div",{staticClass:"exchange-signup-actions"},[t("a-button",{attrs:{type:"primary",block:"",disabled:!a.signupUrl},on:{click:function(t){return e.openExchangeSignupLink(a.signupUrl)}}},[e._v(" "+e._s(e.$t("profile.exchange.openAccountButton"))+" ")])],1)])}),0)])])],1)},r=[],n=a(81127),o=a(56252),s=(a(74423),a(84841)),l=a(53003),c=a(42430),d=a(55434),f=a(40011),u={name:"Profile",components:{ExchangeAccountModal:f.A},mixins:[d.t],data:function(){return{loading:!1,saving:!1,changingPassword:!1,sendingPwdCode:!1,pwdCodeCountdown:0,pwdCodeTimer:null,activeTab:"basic",profile:{id:null,username:"",nickname:"",email:"",avatar:"",timezone:"",role:"user",last_login_at:null},timezoneIanaList:["UTC","Etc/UTC","Asia/Shanghai","Asia/Hong_Kong","Asia/Taipei","Asia/Tokyo","Asia/Seoul","Asia/Singapore","Asia/Dubai","Asia/Kolkata","Europe/London","Europe/Paris","Europe/Berlin","America/New_York","America/Chicago","America/Denver","America/Los_Angeles","America/Toronto","America/Sao_Paulo","Australia/Sydney","Pacific/Auckland"],creditsLog:[],creditsLogLoading:!1,creditsLogPagination:{current:1,pageSize:10,total:0},referralData:{list:[],total:0,referral_code:"",referral_bonus:0,register_bonus:0},referralLoading:!1,referralPagination:{current:1,pageSize:10,total:0},billing:{credits:0,is_vip:!1,vip_expires_at:null,billing_enabled:!1,feature_costs:{}},rechargeTelegramUrl:"https://t.me/your_support_bot",notificationSettings:{default_channels:["browser"],telegram_bot_token:"",telegram_chat_id:"",email:"",phone:"",discord_webhook:"",webhook_url:"",webhook_token:""},savingNotifications:!1,testingNotification:!1,exchangeCredentials:[],exchangeLoading:!1,showAddExchangeModal:!1,showExchangeSignupModal:!1,exchangeSignupCards:[{id:"binance",name:"Binance",short:"BN",brandBg:"rgba(243, 186, 47, 0.16)",brandColor:"#f0b90b",signupUrl:"https://www.bsmkweb.cc/register?ref=QUANTDINGER"},{id:"bitget",name:"Bitget",short:"BG",brandBg:"rgba(0, 193, 255, 0.14)",brandColor:"#00c1ff",signupUrl:"https://partner.hdmune.cn/bg/7r4xz8kd"},{id:"bybit",name:"Bybit",short:"BY",brandBg:"rgba(247, 166, 0, 0.14)",brandColor:"#f7a600",signupUrl:"https://partner.bybit.com/b/DINGER"},{id:"okx",name:"OKX",short:"OK",brandBg:"rgba(17, 24, 39, 0.08)",brandColor:"#111827",signupUrl:"https://www.xqmnobxky.com/join/QUANTDINGER"},{id:"gate",name:"Gate.io",short:"GT",brandBg:"rgba(42, 93, 255, 0.12)",brandColor:"#2a5dff",signupUrl:"https://www.gateport.company/share/DINGER"},{id:"htx",name:"HTX",short:"HX",brandBg:"rgba(22, 119, 255, 0.12)",brandColor:"#1677ff",signupUrl:"https://www.htx.com/invite/zh-cn/1f?invite_code=dinger"}]}},computed:{isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},exchangeModalWrapClass:function(){var e="profile-exchange-modal";return this.isDarkTheme?"".concat(e," ").concat(e,"--dark"):e},isVip:function(){if(!this.billing.vip_expires_at)return!1;var e=new Date(this.billing.vip_expires_at);return e>new Date},creditsLogColumns:function(){return[{title:this.$t("profile.creditsLog.time")||"时间",dataIndex:"created_at",width:160,scopedSlots:{customRender:"created_at"}},{title:this.$t("profile.creditsLog.action")||"类型",dataIndex:"action",width:100,scopedSlots:{customRender:"action"}},{title:this.$t("profile.creditsLog.amount")||"变动",dataIndex:"amount",width:100,scopedSlots:{customRender:"amount"}},{title:this.$t("profile.creditsLog.balance")||"余额",dataIndex:"balance_after",width:100},{title:this.$t("profile.creditsLog.remark")||"备注",dataIndex:"remark",ellipsis:!0}]},referralColumns:function(){return[{title:this.$t("profile.referral.user")||"用户",dataIndex:"username",scopedSlots:{customRender:"user"}},{title:this.$t("profile.referral.registerTime")||"注册时间",dataIndex:"created_at",width:180,scopedSlots:{customRender:"created_at"}}]},referralLink:function(){var e=window.location.origin+window.location.pathname,t=this.referralData.referral_code||this.profile.id;return"".concat(e,"#/user/login?ref=").concat(t)},exchangeColumns:function(){return[{title:this.$t("profile.exchange.colExchange")||"Exchange",dataIndex:"exchange_id",width:140,scopedSlots:{customRender:"exchange_id"}},{title:this.$t("profile.exchange.colName")||"Name",dataIndex:"name",width:140,customRender:function(e){return e||"-"}},{title:this.$t("profile.exchange.colHint")||"Connection Info",dataIndex:"api_key_hint",scopedSlots:{customRender:"api_key_hint"}},{title:this.$t("profile.exchange.colCreatedAt")||"Created At",dataIndex:"created_at",width:180,scopedSlots:{customRender:"created_at"}},{title:this.$t("profile.exchange.colActions")||"Actions",width:120,scopedSlots:{customRender:"action"}}]}},watch:{activeTab:function(e){"credits"===e&&0===this.creditsLog.length&&this.loadCreditsLog(),"referrals"!==e||this.referralData.list&&0!==this.referralData.list.length||this.loadReferrals(),"notifications"!==e||this.notificationSettings.telegram_chat_id||this.notificationSettings.discord_webhook||this.loadNotificationSettings(),"exchange"===e&&0===this.exchangeCredentials.length&&this.loadExchangeCredentials()}},beforeCreate:function(){this.profileForm=this.$form.createForm(this,{name:"profile"}),this.passwordForm=this.$form.createForm(this,{name:"password"}),this.notificationForm=this.$form.createForm(this,{name:"notification"})},mounted:function(){this.loadProfile(),this.loadReferrals()},beforeDestroy:function(){this.pwdCodeTimer&&clearInterval(this.pwdCodeTimer)},methods:{loadProfile:function(){var e=this;return(0,o.A)((0,n.A)().m(function t(){var a;return(0,n.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return e.loading=!0,t.p=1,t.n=2,(0,s.E$)();case 2:a=t.v,1===a.code?(e.profile=a.data,a.data.billing&&(e.billing=a.data.billing),a.data.notification_settings&&(e.notificationSettings={default_channels:a.data.notification_settings.default_channels||["browser"],telegram_bot_token:a.data.notification_settings.telegram_bot_token||"",telegram_chat_id:a.data.notification_settings.telegram_chat_id||"",email:a.data.notification_settings.email||a.data.email||"",phone:a.data.notification_settings.phone||"",discord_webhook:a.data.notification_settings.discord_webhook||"",webhook_url:a.data.notification_settings.webhook_url||"",webhook_token:a.data.notification_settings.webhook_token||""}),e.$nextTick(function(){e.profileForm.setFieldsValue({nickname:e.profile.nickname,email:e.profile.email,timezone:e.profile.timezone||""})})):e.$message.error(a.msg||"Failed to load profile"),t.n=4;break;case 3:t.p=3,t.v,e.$message.error("Failed to load profile");case 4:return t.p=4,e.loading=!1,t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}))()},loadRechargeUrl:function(){var e=this;return(0,o.A)((0,n.A)().m(function t(){var a;return(0,n.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if("admin"!==e.profile.role){t.n=4;break}return t.p=1,t.n=2,(0,l.YT)();case 2:a=t.v,1===a.code&&a.data&&a.data.billing&&(e.rechargeTelegramUrl=a.data.billing.RECHARGE_TELEGRAM_URL||e.rechargeTelegramUrl),t.n=4;break;case 3:t.p=3,t.v;case 4:return t.a(2)}},t,null,[[1,3]])}))()},handleRecharge:function(){this.$router.push("/billing")},formatCredits:function(e){return e||0===e?Number(e).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:2}):"0"},formatDate:function(e){if(!e)return"";var t=new Date(e);return t.toLocaleDateString()},handleSaveProfile:function(){var e=this;this.profileForm.validateFields(function(){var t=(0,o.A)((0,n.A)().m(function t(a,i){var r;return(0,n.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(!a){t.n=1;break}return t.a(2);case 1:return e.saving=!0,t.p=2,t.n=3,(0,s.r7)({nickname:i.nickname,timezone:null!=i.timezone?i.timezone:""});case 3:r=t.v,1===r.code?(e.$message.success(r.msg||"Profile updated successfully"),e.loadProfile(),e.$store.dispatch("FetchUserInfo").catch(function(){})):e.$message.error(r.msg||"Update failed"),t.n=5;break;case 4:t.p=4,t.v,e.$message.error("Update failed");case 5:return t.p=5,e.saving=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}));return function(e,a){return t.apply(this,arguments)}}())},validateConfirmPassword:function(e,t,a){var i=this.passwordForm.getFieldValue("new_password");t&&t!==i?a(this.$t("profile.passwordMismatch")||"Passwords do not match"):a()},handleSendPwdCode:function(){var e=this;return(0,o.A)((0,n.A)().m(function t(){var i,r,o,s,l;return(0,n.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e.profile.email){t.n=1;break}return e.$message.error(e.$t("profile.noEmailWarning")||"Please set your email first"),t.a(2);case 1:return e.sendingPwdCode=!0,t.p=2,t.n=3,a.e(824).then(a.bind(a,95824));case 3:return i=t.v,r=i.sendVerificationCode,t.n=4,r({email:e.profile.email,type:"change_password"});case 4:o=t.v,1===o.code?(e.$message.success(e.$t("profile.codeSent")||"Verification code sent"),e.startPwdCodeCountdown()):e.$message.error(o.msg||"Failed to send code"),t.n=6;break;case 5:t.p=5,l=t.v,e.$message.error((null===(s=l.response)||void 0===s||null===(s=s.data)||void 0===s?void 0:s.msg)||"Failed to send code");case 6:return t.p=6,e.sendingPwdCode=!1,t.f(6);case 7:return t.a(2)}},t,null,[[2,5,6,7]])}))()},startPwdCodeCountdown:function(){var e=this;this.pwdCodeCountdown=60,this.pwdCodeTimer=setInterval(function(){e.pwdCodeCountdown--,e.pwdCodeCountdown<=0&&(clearInterval(e.pwdCodeTimer),e.pwdCodeTimer=null)},1e3)},validateNewPassword:function(e,t,a){t?t.length<8?a(new Error(this.$t("user.register.pwdMinLength")||"At least 8 characters")):/[A-Z]/.test(t)?/[a-z]/.test(t)?/[0-9]/.test(t)?a():a(new Error(this.$t("user.register.pwdNumber")||"At least one number")):a(new Error(this.$t("user.register.pwdLowercase")||"At least one lowercase letter")):a(new Error(this.$t("user.register.pwdUppercase")||"At least one uppercase letter")):a()},handleChangePassword:function(){var e=this;this.passwordForm.validateFields(function(){var t=(0,o.A)((0,n.A)().m(function t(i,r){var o,s,l,c,d;return(0,n.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(!i){t.n=1;break}return t.a(2);case 1:return e.changingPassword=!0,t.p=2,t.n=3,a.e(824).then(a.bind(a,95824));case 3:return o=t.v,s=o.changePassword,t.n=4,s({code:r.code,new_password:r.new_password});case 4:l=t.v,1===l.code?(e.$message.success(l.msg||"Password changed successfully"),e.passwordForm.resetFields()):e.$message.error(l.msg||"Change password failed"),t.n=6;break;case 5:t.p=5,d=t.v,e.$message.error((null===(c=d.response)||void 0===c||null===(c=c.data)||void 0===c?void 0:c.msg)||"Change password failed");case 6:return t.p=6,e.changingPassword=!1,t.f(6);case 7:return t.a(2)}},t,null,[[2,5,6,7]])}));return function(e,a){return t.apply(this,arguments)}}())},getRoleColor:function(e){var t={admin:"red",manager:"orange",user:"blue",viewer:"default"};return t[e]||"default"},getRoleLabel:function(e){var t={admin:this.$t("userManage.roleAdmin")||"Admin",manager:this.$t("userManage.roleManager")||"Manager",user:this.$t("userManage.roleUser")||"User",viewer:this.$t("userManage.roleViewer")||"Viewer"};return t[e]||e},_profileDateTimeLocaleOptions:function(){var e=String(this.profile&&this.profile.timezone||"").trim();if(!e)return{};try{return Intl.DateTimeFormat(void 0,{timeZone:e}).format(new Date),{timeZone:e}}catch(t){return{}}},formatTime:function(e){if(!e)return"";var t=new Date("number"===typeof e?1e3*e:e);return Number.isNaN(t.getTime())?"":t.toLocaleString(void 0,this._profileDateTimeLocaleOptions())},formatCreditsLogTime:function(e){if(!e)return"";if("string"===typeof e){var t=e.trim();if(t.endsWith("Z")&&t.includes("T"))return t.replace("T"," ").replace("Z","")}return this.formatTime(e)},loadCreditsLog:function(){var e=this;return(0,o.A)((0,n.A)().m(function t(){var a;return(0,n.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return e.creditsLogLoading=!0,t.p=1,t.n=2,(0,s.v9)({page:e.creditsLogPagination.current,page_size:e.creditsLogPagination.pageSize});case 2:a=t.v,1===a.code&&(e.creditsLog=a.data.items||[],e.creditsLogPagination.total=a.data.total||0),t.n=4;break;case 3:t.p=3,t.v,e.$message.error("Failed to load credits log");case 4:return t.p=4,e.creditsLogLoading=!1,t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}))()},handleCreditsLogChange:function(e){this.creditsLogPagination.current=e.current,this.loadCreditsLog()},loadReferrals:function(){var e=this;return(0,o.A)((0,n.A)().m(function t(){var a;return(0,n.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return e.referralLoading=!0,t.p=1,t.n=2,(0,s.rx)({page:e.referralPagination.current,page_size:e.referralPagination.pageSize});case 2:a=t.v,1===a.code&&(e.referralData={list:a.data.list||[],total:a.data.total||0,referral_code:a.data.referral_code||"",referral_bonus:a.data.referral_bonus||0,register_bonus:a.data.register_bonus||0},e.referralPagination.total=a.data.total||0),t.n=4;break;case 3:t.p=3,t.v,e.$message.error("Failed to load referral data");case 4:return t.p=4,e.referralLoading=!1,t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}))()},handleReferralChange:function(e){this.referralPagination.current=e.current,this.loadReferrals()},copyReferralLink:function(){var e=this,t=this.referralLink;navigator.clipboard?navigator.clipboard.writeText(t).then(function(){e.$message.success(e.$t("profile.referral.linkCopied")||"邀请链接已复制")}).catch(function(){e.fallbackCopy(t)}):this.fallbackCopy(t)},fallbackCopy:function(e){var t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select();try{document.execCommand("copy"),this.$message.success(this.$t("profile.referral.linkCopied")||"邀请链接已复制")}catch(a){this.$message.error("Copy failed")}document.body.removeChild(t)},getActionColor:function(e){var t={consume:"red",recharge:"green",admin_adjust:"blue",refund:"orange",vip_grant:"gold",vip_revoke:"default",register_bonus:"cyan",referral_bonus:"purple",indicator_purchase:"volcano",indicator_sale:"lime"};return t[e]||"default"},getActionLabel:function(e){var t={consume:this.$t("profile.creditsLog.actionConsume")||"消费",recharge:this.$t("profile.creditsLog.actionRecharge")||"充值",admin_adjust:this.$t("profile.creditsLog.actionAdjust")||"调整",refund:this.$t("profile.creditsLog.actionRefund")||"退款",vip_grant:this.$t("profile.creditsLog.actionVipGrant")||"VIP授予",vip_revoke:this.$t("profile.creditsLog.actionVipRevoke")||"VIP取消",register_bonus:this.$t("profile.creditsLog.actionRegisterBonus")||"注册奖励",referral_bonus:this.$t("profile.creditsLog.actionReferralBonus")||"邀请奖励",indicator_purchase:this.$t("profile.creditsLog.actionIndicatorPurchase")||"购买指标",indicator_sale:this.$t("profile.creditsLog.actionIndicatorSale")||"出售指标"};return t[e]||e},loadExchangeCredentials:function(){var e=this;return(0,o.A)((0,n.A)().m(function t(){var a;return(0,n.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return e.exchangeLoading=!0,t.p=1,t.n=2,(0,c.IA)();case 2:a=t.v,1===a.code&&a.data&&(e.exchangeCredentials=a.data.items||[]),t.n=4;break;case 3:t.p=3,t.v,e.$message.error("Failed to load exchange accounts");case 4:return t.p=4,e.exchangeLoading=!1,t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}))()},openAddExchangeModal:function(){this.showAddExchangeModal=!0},openExchangeSignupModal:function(){this.showExchangeSignupModal=!0},openExternalLink:function(e){e&&window.open(e,"_blank")},openExchangeSignupLink:function(e){this.openExternalLink(e)},getExchangeDisplayName:function(e){var t={binance:"Binance",okx:"OKX",bitget:"Bitget",bybit:"Bybit",coinbaseexchange:"Coinbase",kraken:"Kraken",kucoin:"KuCoin",gate:"Gate.io",bitfinex:"Bitfinex",deepcoin:"Deepcoin",htx:"HTX",ibkr:"IBKR",mt5:"MetaTrader 5"};return t[e]||e},handleDeleteCredential:function(e){var t=this;return(0,o.A)((0,n.A)().m(function a(){var i;return(0,n.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return a.p=0,a.n=1,(0,c.kI)(e);case 1:i=a.v,1===i.code?(t.$message.success(t.$t("profile.exchange.deleteSuccess")),t.loadExchangeCredentials()):t.$message.error(i.msg||"Delete failed"),a.n=3;break;case 2:a.p=2,a.v,t.$message.error("Delete failed");case 3:return a.a(2)}},a,null,[[0,2]])}))()},loadNotificationSettings:function(){var e=this;return(0,o.A)((0,n.A)().m(function t(){var a;return(0,n.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return t.p=0,t.n=1,(0,s.vF)();case 1:a=t.v,1===a.code&&a.data&&(e.notificationSettings={default_channels:a.data.default_channels||["browser"],telegram_bot_token:a.data.telegram_bot_token||"",telegram_chat_id:a.data.telegram_chat_id||"",email:a.data.email||e.profile.email||"",phone:a.data.phone||"",discord_webhook:a.data.discord_webhook||"",webhook_url:a.data.webhook_url||"",webhook_token:a.data.webhook_token||""},e.$nextTick(function(){e.notificationForm.setFieldsValue({default_channels:e.notificationSettings.default_channels,telegram_bot_token:e.notificationSettings.telegram_bot_token,telegram_chat_id:e.notificationSettings.telegram_chat_id,email:e.notificationSettings.email,phone:e.notificationSettings.phone,discord_webhook:e.notificationSettings.discord_webhook,webhook_url:e.notificationSettings.webhook_url,webhook_token:e.notificationSettings.webhook_token})})),t.n=3;break;case 2:t.p=2,t.v;case 3:return t.a(2)}},t,null,[[0,2]])}))()},_mapNotifyTestError:function(e,t){var a=(t||"").trim();if("email"===e){if("missing_SMTP_HOST"===a)return this.$t("profile.notifications.errSmtpHost")||"email:服务器未配置发信 SMTP(管理员在「系统设置 → 邮件」或环境变量 SMTP_HOST/SMTP_USER 等)";if("missing_SMTP_FROM"===a)return this.$t("profile.notifications.errSmtpFrom")||"email:未配置发件人 SMTP_FROM(或 SMTP_USER)";if("missing_email_target"===a)return this.$t("profile.notifications.errEmailTarget")||"email:未填写通知邮箱且账号无邮箱"}return a?"".concat(e,": ").concat(a):""},handleSaveNotifications:function(){var e=this;this.notificationForm.validateFields(function(){var t=(0,o.A)((0,n.A)().m(function t(a,i){var r;return(0,n.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(!a){t.n=1;break}return t.a(2);case 1:return e.savingNotifications=!0,t.p=2,t.n=3,(0,s.Gl)({default_channels:i.default_channels||["browser"],telegram_bot_token:i.telegram_bot_token||"",telegram_chat_id:i.telegram_chat_id||"",email:i.email||"",phone:i.phone||"",discord_webhook:i.discord_webhook||"",webhook_url:i.webhook_url||"",webhook_token:i.webhook_token||""});case 3:r=t.v,1===r.code?(e.$message.success(e.$t("profile.notifications.saveSuccess")||"通知设置保存成功"),e.notificationSettings=r.data||e.notificationSettings):e.$message.error(r.msg||"保存失败"),t.n=5;break;case 4:t.p=4,t.v,e.$message.error("保存失败");case 5:return t.p=5,e.savingNotifications=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}));return function(e,a){return t.apply(this,arguments)}}())},handleTestNotification:function(){var e=this;return(0,o.A)((0,n.A)().m(function t(){var a,i,r,o,l,c,d;return(0,n.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(a=e.notificationForm.getFieldsValue(),i=a.default_channels||[],0!==i.length){t.n=1;break}return e.$message.warning(e.$t("profile.notifications.selectChannel")||"请至少选择一个通知渠道"),t.a(2);case 1:if(!i.includes("telegram")){t.n=3;break}if(a.telegram_bot_token){t.n=2;break}return e.$message.warning(e.$t("profile.notifications.fillTelegramToken")||"请填写 Telegram Bot Token"),t.a(2);case 2:if(a.telegram_chat_id){t.n=3;break}return e.$message.warning(e.$t("profile.notifications.fillTelegram")||"请填写 Telegram Chat ID"),t.a(2);case 3:if(!i.includes("email")||a.email){t.n=4;break}return e.$message.warning(e.$t("profile.notifications.fillEmail")||"请填写通知邮箱"),t.a(2);case 4:if(!i.includes("phone")||a.phone){t.n=5;break}return e.$message.warning(e.$t("profile.notifications.fillPhone")||"请填写手机号"),t.a(2);case 5:if(!i.includes("discord")||a.discord_webhook){t.n=6;break}return e.$message.warning(e.$t("profile.notifications.fillDiscord")||"请填写 Discord Webhook URL"),t.a(2);case 6:if(!i.includes("webhook")||a.webhook_url){t.n=7;break}return e.$message.warning(e.$t("profile.notifications.fillWebhook")||"请填写 Webhook URL"),t.a(2);case 7:return e.testingNotification=!0,t.p=8,t.n=9,(0,s.Gl)({default_channels:i,telegram_bot_token:a.telegram_bot_token||"",telegram_chat_id:a.telegram_chat_id||"",email:a.email||"",phone:a.phone||"",discord_webhook:a.discord_webhook||"",webhook_url:a.webhook_url||"",webhook_token:a.webhook_token||""});case 9:if(r=t.v,1===r.code){t.n=10;break}return e.$message.error(r.msg||"保存设置失败"),t.a(2);case 10:return t.n=11,(0,s.hl)();case 11:if(o=t.v,1===o.code){t.n=12;break}return e.$message.error(o.msg||e.$t("profile.notifications.testFailed")||"测试通知发送失败"),t.a(2);case 12:l=o.data&&o.data.results||{},c=Object.keys(l).filter(function(e){return!l[e].ok}),0===c.length?e.$message.success(e.$t("profile.notifications.testSent")||"测试通知已发送,请检查各渠道"):(d=c.map(function(t){var a=l[t]&&l[t].error||"",i=e._mapNotifyTestError(t,a);return i||(a?"".concat(t,": ").concat(a):t)}).join(";"),e.$message.warning((e.$t("profile.notifications.testPartial")||"部分渠道发送失败")+" — ".concat(d),8)),t.n=14;break;case 13:t.p=13,t.v,e.$message.error(e.$t("profile.notifications.testFailed")||"发送测试通知失败");case 14:return t.p=14,e.testingNotification=!1,t.f(14);case 15:return t.a(2)}},t,null,[[8,13,14,15]])}))()}}},p=u,m=a(845),g=(0,m.A)(p,i,r,!1,null,"2151383b",null),h=g.exports},53003:function(e,t,a){a.d(t,{DZ:function(){return o},YT:function(){return n},_d:function(){return s},lo:function(){return r}});var i=a(75769);function r(){return(0,i.Ay)({url:"/api/settings/schema",method:"get"})}function n(){return(0,i.Ay)({url:"/api/settings/values",method:"get"})}function o(e){return(0,i.Ay)({url:"/api/settings/save",method:"post",data:e})}function s(){return(0,i.Ay)({url:"/api/settings/openrouter-balance",method:"get"})}},84841:function(e,t,a){a.d(t,{DK:function(){return w},E$:function(){return d},Gl:function(){return p},O0:function(){return c},TK:function(){return o},aU:function(){return r},cw:function(){return l},d$:function(){return k},hG:function(){return s},hl:function(){return m},kg:function(){return n},nY:function(){return v},r7:function(){return f},rx:function(){return h},v9:function(){return g},vF:function(){return u},vi:function(){return b},wq:function(){return _}});var i=a(75769);function r(e){return(0,i.Ay)({url:"/api/users/list",method:"get",params:e})}function n(e){return(0,i.Ay)({url:"/api/users/create",method:"post",data:e})}function o(e,t){return(0,i.Ay)({url:"/api/users/update",method:"put",params:{id:e},data:t})}function s(e){return(0,i.Ay)({url:"/api/users/delete",method:"delete",params:{id:e}})}function l(e){return(0,i.Ay)({url:"/api/users/reset-password",method:"post",data:e})}function c(){return(0,i.Ay)({url:"/api/users/roles",method:"get"})}function d(){return(0,i.Ay)({url:"/api/users/profile",method:"get"})}function f(e){return(0,i.Ay)({url:"/api/users/profile/update",method:"put",data:e})}function u(){return(0,i.Ay)({url:"/api/users/notification-settings",method:"get"})}function p(e){return(0,i.Ay)({url:"/api/users/notification-settings",method:"put",data:e})}function m(){return(0,i.Ay)({url:"/api/users/notification-settings/test",method:"post",data:{}})}function g(e){return(0,i.Ay)({url:"/api/users/my-credits-log",method:"get",params:e})}function h(e){return(0,i.Ay)({url:"/api/users/my-referrals",method:"get",params:e})}function _(e){return(0,i.Ay)({url:"/api/users/set-credits",method:"post",data:e})}function v(e){return(0,i.Ay)({url:"/api/users/set-vip",method:"post",data:e})}function w(e){return(0,i.Ay)({url:"/api/users/system-strategies",method:"get",params:e})}function b(e){return(0,i.Ay)({url:"/api/users/admin-orders",method:"get",params:e})}function k(e){return(0,i.Ay)({url:"/api/users/admin-ai-stats",method:"get",params:e})}}}]); \ No newline at end of file diff --git a/frontend/dist/js/945-legacy.6efa43e3.js b/frontend/dist/js/945-legacy.6efa43e3.js new file mode 100644 index 0000000..7be10ff --- /dev/null +++ b/frontend/dist/js/945-legacy.6efa43e3.js @@ -0,0 +1 @@ +"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[945],{32945:function(t,e,a){a.d(e,{A:function(){return C}});a(62010),a(27495),a(25440);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"quick-trade-panel-root"},[e("a-drawer",{staticClass:"quick-trade-drawer",class:{"theme-dark":t.isDark},attrs:{title:null,width:400,visible:t.visible,closable:!1,bodyStyle:{padding:0},maskStyle:{background:"rgba(0,0,0,0.45)"}},on:{close:t.handleClose}},[e("div",{staticClass:"qt-header"},[e("div",{staticClass:"qt-header-left"},[e("a-icon",{staticClass:"qt-icon",attrs:{type:"thunderbolt",theme:"filled"}}),e("span",{staticClass:"qt-header-title"},[t._v(t._s(t.$t("quickTrade.title")))])],1),e("a-icon",{staticClass:"qt-close",attrs:{type:"close"},on:{click:t.handleClose}})],1),e("div",{staticClass:"qt-symbol-bar"},[e("div",{staticClass:"qt-symbol-selector"},[e("a-select",{staticStyle:{width:"100%"},attrs:{"show-search":"",placeholder:t.$t("quickTrade.selectSymbol"),"filter-option":!1,"not-found-content":t.symbolSearching?null:void 0,loading:t.symbolSearching},on:{search:t.handleSymbolSearch,change:t.handleSymbolChange,focus:t.handleSymbolFocus},model:{value:t.currentSymbol,callback:function(e){t.currentSymbol=e},expression:"currentSymbol"}},[e("a-icon",{staticStyle:{color:"#999"},attrs:{slot:"suffixIcon",type:"search"},slot:"suffixIcon"}),t._l(t.symbolSuggestions,function(a){return e("a-select-option",{key:a.value,attrs:{value:a.value}},[e("div",{staticClass:"qt-symbol-option"},[e("span",{staticClass:"qt-symbol-option-name"},[t._v(t._s(a.symbol))]),a.name?e("span",{staticClass:"qt-symbol-option-desc"},[t._v(t._s(a.name))]):t._e()])])})],2)],1),e("div",{staticClass:"qt-price-display",class:t.priceChangeClass},[e("span",{staticClass:"qt-current-price"},[t._v("$"+t._s(t.formatPrice(t.currentPrice)))])])]),e("div",{staticClass:"qt-section"},[e("div",{staticClass:"qt-label"},[t._v(t._s(t.$t("quickTrade.exchange"))+" "),e("span",{staticClass:"qt-crypto-hint"},[t._v(t._s(t.$t("quickTrade.cryptoOnly")))])]),e("a-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("quickTrade.selectExchange"),loading:t.credLoading,notFoundContent:t.$t("quickTrade.noExchange")},on:{change:t.onCredentialChange},model:{value:t.selectedCredentialId,callback:function(e){t.selectedCredentialId=e},expression:"selectedCredentialId"}},t._l(t.credentials,function(a){return e("a-select-option",{key:a.id,attrs:{value:a.id}},[e("span",{staticStyle:{"text-transform":"capitalize"}},[t._v(t._s(a.exchange_id||a.name))]),a.enable_demo_trading?e("a-tag",{staticStyle:{"margin-left":"6px"},attrs:{color:"orange",size:"small"}},[t._v(t._s(t.$t("quickTrade.testnetTag")))]):t._e(),a.market_type?e("a-tag",{staticStyle:{"margin-left":"6px"},attrs:{size:"small"}},[t._v(t._s(a.market_type))]):t._e()],1)}),1),t.credLoading||0!==t.credentials.length?t._e():e("div",{staticClass:"qt-no-cred-actions"},[e("a-button",{attrs:{type:"primary",block:"",size:"small"},on:{click:function(e){t.showAddExchangeModal=!0}}},[e("a-icon",{attrs:{type:"plus"}}),t._v(" "+t._s(t.$t("quickTrade.addAccountInline"))+" ")],1)],1),e("div",{staticClass:"qt-manage-link"},[e("a",{on:{click:function(e){e.preventDefault(),t.showAddExchangeModal=!0}}},[e("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"plus-circle"}}),t._v(t._s(t.$t("quickTrade.addAccountInline"))+" ")],1),e("span",{staticClass:"qt-manage-sep"},[t._v("·")]),e("router-link",{attrs:{to:"/profile?tab=exchange"}},[e("a-icon",{staticStyle:{"margin-right":"4px"},attrs:{type:"setting"}}),t._v(t._s(t.$t("profile.exchange.goToManage"))+" ")],1)],1),t.selectedCredentialId?e("div",{staticClass:"qt-balance"},[t.balanceLoading?[e("a-spin",{attrs:{size:"small"}}),e("span",{staticClass:"qt-balance-label qt-balance-loading-text"},[t._v(t._s(t.$t("quickTrade.available"))+"…")])]:t.balance.error?[e("span",{staticClass:"qt-balance-label"},[t._v(t._s(t.$t("quickTrade.available"))+":")]),e("span",{staticClass:"qt-balance-error",attrs:{title:t.balance.error}},[t._v("—")])]:[e("span",{staticClass:"qt-balance-label"},[t._v(t._s(t.$t("quickTrade.available"))+":")]),e("span",{staticClass:"qt-balance-value"},[t._v("$"+t._s(t.formatPrice(t.balance.available)))])]],2):t._e()],1),e("div",{staticClass:"qt-section"},[e("div",{staticClass:"qt-direction-toggle"},[e("div",{staticClass:"qt-dir-btn qt-dir-long",class:{active:"buy"===t.side},on:{click:function(e){return t.setTradeSide("buy")}}},[e("a-icon",{attrs:{type:"arrow-up"}}),t._v(" "+t._s(t.$t("quickTrade.long"))+" ")],1),e("div",{staticClass:"qt-dir-btn qt-dir-short",class:{active:"sell"===t.side,"qt-dir-disabled":!t.isSwapMode},on:{click:function(e){return t.setTradeSide("sell")}}},[e("a-icon",{attrs:{type:"arrow-down"}}),t._v(" "+t._s(t.$t("quickTrade.short"))+" ")],1)]),t.isSwapMode?t._e():e("div",{staticClass:"qt-hint-text qt-hint-inline"},[t._v(t._s(t.$t("quickTrade.shortDisabledSpot")))])]),e("div",{staticClass:"qt-section"},[e("a-radio-group",{staticStyle:{width:"100%"},attrs:{"button-style":"solid",size:"small"},model:{value:t.orderType,callback:function(e){t.orderType=e},expression:"orderType"}},[e("a-radio-button",{staticStyle:{width:"50%","text-align":"center"},attrs:{value:"market"}},[t._v(" "+t._s(t.$t("quickTrade.market"))+" ")]),e("a-radio-button",{staticStyle:{width:"50%","text-align":"center"},attrs:{value:"limit"}},[t._v(" "+t._s(t.$t("quickTrade.limit"))+" ")])],1)],1),"limit"===t.orderType?e("div",{staticClass:"qt-section"},[e("div",{staticClass:"qt-label"},[t._v(t._s(t.$t("quickTrade.limitPrice")))]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0,step:t.priceStep,precision:t.pricePrecision,placeholder:t.$t("quickTrade.enterPrice")},model:{value:t.limitPrice,callback:function(e){t.limitPrice=e},expression:"limitPrice"}})],1):t._e(),e("div",{staticClass:"qt-section"},[e("div",{staticClass:"qt-label"},[t._v(t._s(t.$t("quickTrade.amount"))+" (USDT)")]),e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:1,step:10,precision:2,placeholder:t.$t("quickTrade.enterAmount")},model:{value:t.amount,callback:function(e){t.amount=e},expression:"amount"}}),e("div",{staticClass:"qt-quick-amounts"},t._l(t.quickAmountPcts,function(a){return e("a-button",{key:a,attrs:{size:"small",disabled:t.balance.available<=0},on:{click:function(e){return t.setAmountByPercent(a)}}},[t._v(" "+t._s(a)+"% ")])}),1)],1),e("div",{staticClass:"qt-section qt-card qt-mode-card"},[t.isSwapMode?[e("div",{staticClass:"qt-section-title-row"},[e("span",{staticClass:"qt-section-title"},[t._v(t._s(t.$t("quickTrade.leverage")))]),e("span",{staticClass:"qt-badge-contract"},[t._v(t._s(t.$t("quickTrade.contractBadge")))])]),e("div",{staticClass:"qt-leverage-row"},[e("a-slider",{staticStyle:{flex:"1","margin-right":"12px"},attrs:{min:1,max:125,marks:t.leverageMarks,tipFormatter:function(t){return t+"x"}},model:{value:t.leverage,callback:function(e){t.leverage=e},expression:"leverage"}}),e("a-input-number",{staticClass:"qt-leverage-input",attrs:{min:1,max:125,formatter:function(t){return"".concat(t,"x")},parser:function(t){return String(t).replace("x","")}},model:{value:t.leverage,callback:function(e){t.leverage=e},expression:"leverage"}})],1),e("div",{staticClass:"qt-label qt-label-spaced"},[t._v(t._s(t.$t("quickTrade.marginMode")))]),e("a-radio-group",{staticClass:"qt-margin-radio",attrs:{size:"small","button-style":"solid"},model:{value:t.marginMode,callback:function(e){t.marginMode=e},expression:"marginMode"}},[e("a-radio-button",{attrs:{value:"cross"}},[t._v(t._s(t.$t("quickTrade.crossMargin")))]),e("a-radio-button",{attrs:{value:"isolated"}},[t._v(t._s(t.$t("quickTrade.isolatedMargin")))])],1),e("div",{staticClass:"qt-hint-text"},[t._v(t._s(t.$t("quickTrade.marginModeHint")))])]:e("div",{staticClass:"qt-spot-banner"},[e("a-icon",{staticClass:"qt-spot-banner-icon",attrs:{type:"wallet"}}),e("div",{staticClass:"qt-spot-banner-text"},[e("div",{staticClass:"qt-spot-banner-title"},[t._v(t._s(t.$t("quickTrade.spotModeTitle")))]),e("div",{staticClass:"qt-hint-text"},[t._v(t._s(t.$t("quickTrade.spotModeHint")))])])],1)],2),e("div",{staticClass:"qt-section qt-card qt-tpsl-card"},[e("div",{staticClass:"qt-section-title-row"},[e("span",{staticClass:"qt-section-title"},[t._v(t._s(t.$t("quickTrade.tpsl")))]),e("span",{staticClass:"qt-optional-tag"},[t._v(t._s(t.$t("quickTrade.optional")))])]),e("div",{staticClass:"qt-tpsl-row"},[e("div",{staticClass:"qt-tpsl-item"},[e("span",{staticClass:"qt-label qt-tp-label"},[t._v(t._s(t.$t("quickTrade.tp")))]),e("a-input-number",{staticClass:"qt-input-full",attrs:{min:0,step:t.priceStep,precision:t.pricePrecision,placeholder:t.$t("quickTrade.tpPlaceholder")},model:{value:t.tpPrice,callback:function(e){t.tpPrice=e},expression:"tpPrice"}})],1),e("div",{staticClass:"qt-tpsl-item"},[e("span",{staticClass:"qt-label qt-sl-label"},[t._v(t._s(t.$t("quickTrade.sl")))]),e("a-input-number",{staticClass:"qt-input-full",attrs:{min:0,step:t.priceStep,precision:t.pricePrecision,placeholder:t.$t("quickTrade.slPlaceholder")},model:{value:t.slPrice,callback:function(e){t.slPrice=e},expression:"slPrice"}})],1)])]),e("div",{staticClass:"qt-submit-section"},[e("a-button",{staticClass:"qt-submit-btn",class:["buy"===t.side?"qt-btn-long":"qt-btn-short"],attrs:{type:"buy"===t.side?"primary":"danger",size:"large",block:"",loading:t.submitting,disabled:!t.canSubmit},on:{click:t.handleSubmit}},[e("a-icon",{attrs:{type:"buy"===t.side?"arrow-up":"arrow-down"}}),t._v(" "+t._s("buy"===t.side?t.$t("quickTrade.buyLong"):t.$t("quickTrade.sellShort"))+" "+t._s(t.symbol)+" ")],1)],1),e("div",{staticClass:"qt-position-section"},[e("div",{staticClass:"qt-section-header"},[e("a-icon",{attrs:{type:"wallet"}}),t._v(" "+t._s(t.$t("quickTrade.currentPosition"))+" ")],1),t.currentPosition?e("div",{staticClass:"qt-position-card",class:t.currentPosition.side},[e("div",{staticClass:"qt-pos-row"},[e("span",[t._v(t._s(t.$t("quickTrade.side")))]),e("a-tag",{attrs:{color:"long"===t.currentPosition.side?"#52c41a":"#f5222d",size:"small"}},[t._v(" "+t._s("long"===t.currentPosition.side?t.$t("quickTrade.long"):t.$t("quickTrade.short"))+" ")])],1),e("div",{staticClass:"qt-pos-row"},[e("span",[t._v(t._s(t.$t("quickTrade.posSize")))]),e("span",[t._v(t._s(t.currentPosition.size))])]),e("div",{staticClass:"qt-pos-row"},[e("span",[t._v(t._s(t.$t("quickTrade.entryPrice")))]),e("span",[t._v("$"+t._s(t.formatPrice(t.currentPosition.entry_price)))])]),t.currentPosition.mark_price?e("div",{staticClass:"qt-pos-row"},[e("span",[t._v(t._s(t.$t("quickTrade.markPrice")))]),e("span",[t._v("$"+t._s(t.formatPrice(t.currentPosition.mark_price)))])]):t._e(),t.currentPosition.leverage&&t.currentPosition.leverage>1?e("div",{staticClass:"qt-pos-row"},[e("span",[t._v(t._s(t.$t("quickTrade.leverage")))]),e("span",[t._v(t._s(t.currentPosition.leverage)+"x")])]):t._e(),e("div",{staticClass:"qt-pos-row"},[e("span",[t._v(t._s(t.$t("quickTrade.unrealizedPnl")))]),e("span",{class:t.currentPosition.unrealized_pnl>=0?"qt-green":"qt-red"},[t._v(" $"+t._s(t.formatPrice(t.currentPosition.unrealized_pnl))+" ")])]),e("a-button",{staticStyle:{"margin-top":"8px"},attrs:{type:"danger",size:"small",block:"",ghost:"",loading:t.closingPosition},on:{click:t.handleClosePosition}},[t._v(" "+t._s(t.$t("quickTrade.closePosition"))+" ")])],1):e("div",{staticClass:"qt-position-empty"},[e("a-icon",{staticClass:"qt-empty-icon",attrs:{type:"inbox"}}),e("span",{staticClass:"qt-empty-desc"},[t._v(t._s(t.$t("quickTrade.noPositionHint")))])],1)]),t.recentTrades.length>0?e("div",{staticClass:"qt-history-section"},[e("a-collapse",{attrs:{bordered:!1,activeKey:t.historyCollapsed?[]:["history"]},on:{change:t.handleHistoryCollapse}},[e("a-collapse-panel",{key:"history",style:t.collapseStyle,attrs:{showArrow:!1}},[e("template",{slot:"header"},[e("div",{staticClass:"qt-section-header",staticStyle:{margin:"0",padding:"0"}},[e("a-icon",{attrs:{type:"history"}}),t._v(" "+t._s(t.$t("quickTrade.recentTrades"))+" "),e("span",{staticClass:"qt-history-count"},[t._v("("+t._s(t.recentTrades.length)+")")])],1)]),e("div",{staticClass:"qt-trade-list"},t._l(t.recentTrades,function(a){return e("div",{key:a.id,staticClass:"qt-trade-item"},[e("div",{staticClass:"qt-trade-main"},[e("a-tag",{attrs:{color:"buy"===a.side?"#52c41a":"#f5222d",size:"small"}},[t._v(" "+t._s("buy"===a.side?"LONG":"SHORT")+" ")]),e("span",{staticClass:"qt-trade-symbol"},[t._v(t._s(a.symbol))]),e("span",{staticClass:"qt-trade-amount"},[t._v("$"+t._s(t.formatPrice(a.amount)))])],1),e("div",{staticClass:"qt-trade-meta"},[e("a-tag",{attrs:{color:"filled"===a.status?"#52c41a":"failed"===a.status?"#f5222d":"#faad14",size:"small"}},[t._v(" "+t._s(a.status)+" ")]),e("span",{staticClass:"qt-trade-time"},[t._v(t._s(t.formatTime(a.created_at)))])],1)])}),0)],2)],1)],1):t._e()]),e("exchange-account-modal",{attrs:{visible:t.showAddExchangeModal},on:{"update:visible":function(e){t.showAddExchangeModal=e},success:t.onExchangeAccountSaved}})],1)},s=[],r=a(81127),n=a(56252),c=a(76338),l=(a(28706),a(2008),a(74423),a(62062),a(2892),a(26099),a(21699),a(68156),a(42762),a(95353)),o=a(42430),d=a(75402),u=a(75769);function p(t){return(0,u.Ay)({url:"/api/quick-trade/place-order",method:"post",data:t})}function m(t){return(0,u.Ay)({url:"/api/quick-trade/balance",method:"get",params:t})}function v(t){return(0,u.Ay)({url:"/api/quick-trade/position",method:"get",params:t})}function h(t){return(0,u.Ay)({url:"/api/quick-trade/history",method:"get",params:t})}function b(t){return(0,u.Ay)({url:"/api/quick-trade/close-position",method:"post",data:t})}var g=a(35038),f=a(505),y={name:"QuickTradePanel",components:{ExchangeAccountModal:d.A},props:{visible:{type:Boolean,default:!1},symbol:{type:String,default:""},presetSide:{type:String,default:""},presetPrice:{type:Number,default:0},source:{type:String,default:"manual"},marketType:{type:String,default:"swap"}},data:function(){return{credentials:[],selectedCredentialId:void 0,credLoading:!1,balanceLoading:!1,balance:{available:0,total:0},side:"buy",orderType:"market",limitPrice:0,amount:100,leverage:5,marginMode:"cross",tpPrice:null,slPrice:null,submitting:!1,closingPosition:!1,currentPrice:0,currentPosition:null,recentTrades:[],historyCollapsed:!1,currentSymbol:"",symbolSuggestions:[],symbolSearching:!1,symbolSearchTimer:null,userId:null,quickAmountPcts:[10,25,50,75,100],leverageMarks:{1:"1x",5:"5x",10:"10x",25:"25x",50:"50x",100:"100x",125:"125x"},pollTimer:null,showAddExchangeModal:!1}},computed:(0,c.A)((0,c.A)({},(0,l.aH)({navTheme:function(t){return t.app.theme}})),{},{isDark:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},isSwapMode:function(){return Number(this.leverage)>1},effectiveMarketType:function(){return this.isSwapMode?"swap":"spot"},priceStep:function(){return this.currentPrice>1e4?1:this.currentPrice>100?.1:this.currentPrice>1?.01:1e-4},pricePrecision:function(){return this.currentPrice>1e4?0:this.currentPrice>100?1:this.currentPrice>1?2:4},canSubmit:function(){return this.selectedCredentialId&&this.currentSymbol&&this.amount>0&&!this.submitting},priceChangeClass:function(){return""},collapseStyle:function(){return{background:"transparent",borderRadius:"4px",border:0,overflow:"hidden"}}}),watch:{visible:function(t){t?this.init():this.stopPolling()},symbol:function(t){t&&(this.currentSymbol=t)},currentSymbol:function(t){t&&(this.loadPrice(),this.selectedCredentialId&&this.loadPosition(),this.$emit("update:symbol",t))},selectedCredentialId:function(t){t&&this.currentSymbol&&this.loadPosition()},presetSide:function(t){t&&(this.side=t)},presetPrice:function(t){t>0&&(this.currentPrice=t,this.limitPrice=t)},leverage:function(){var t=this;this.isSwapMode||"sell"!==this.side||(this.side="buy"),this.$nextTick(function(){t.selectedCredentialId&&(t.loadBalance(),t.loadPosition())})}},methods:{setTradeSide:function(t){"sell"!==t||this.isSwapMode?this.side=t:this.$message.warning(this.$t("quickTrade.shortDisabledSpot"))},init:function(){var t=this;return(0,n.A)((0,r.A)().m(function e(){return(0,r.A)().w(function(e){while(1)switch(e.n){case 0:return t.currentSymbol=t.symbol||"",t.presetSide&&(t.side=t.presetSide),"spot"===t.marketType&&(t.leverage=1),t.presetPrice>0&&(t.currentPrice=t.presetPrice,t.limitPrice=t.presetPrice),e.n=1,t.loadCredentials();case 1:return e.n=2,t.loadUserInfo();case 2:return e.n=3,t.loadWatchlistSymbols();case 3:if(!t.currentSymbol){e.n=4;break}return e.n=4,t.loadPrice();case 4:if(!t.selectedCredentialId||!t.currentSymbol){e.n=5;break}return e.n=5,t.loadPosition();case 5:t.loadHistory(),t.startPolling();case 6:return e.a(2)}},e)}))()},loadUserInfo:function(){var t=this;return(0,n.A)((0,r.A)().m(function e(){var a,i,s,n;return(0,r.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(e.p=0,i=t.$store,s=(null===i||void 0===i||null===(a=i.getters)||void 0===a?void 0:a.userInfo)||{},!s||!s.id){e.n=1;break}return t.userId=s.id,e.a(2);case 1:return e.n=2,(0,f.ug)();case 2:n=e.v,n&&1===n.code&&n.data&&(t.userId=n.data.id,i&&i.commit("SET_INFO",n.data)),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[0,3]])}))()},loadWatchlistSymbols:function(){var t=this;return(0,n.A)((0,r.A)().m(function e(){var a,i;return(0,r.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.userId){e.n=2;break}return e.n=1,t.loadUserInfo();case 1:if(t.userId){e.n=2;break}return e.a(2);case 2:return e.p=2,e.n=3,(0,g.Qo)({userid:t.userId});case 3:a=e.v,a&&1===a.code&&a.data&&(i=(a.data||[]).filter(function(t){return"crypto"===(t.market||"").toLowerCase()}).map(function(t){return{value:t.symbol||"",symbol:t.symbol||"",name:t.name||""}}).filter(function(t){return t.value}),t.symbolSuggestions=i),e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2)}},e,null,[[2,4]])}))()},handleSymbolSearch:function(t){var e=this;this.symbolSearchTimer&&clearTimeout(this.symbolSearchTimer),t&&""!==t.trim()?this.symbolSearchTimer=setTimeout((0,n.A)((0,r.A)().m(function a(){var i;return(0,r.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return e.symbolSearching=!0,a.p=1,a.n=2,(0,g._3)({market:"Crypto",keyword:t.trim(),limit:20});case 2:i=a.v,i&&1===i.code&&i.data?e.symbolSuggestions=(i.data.items||i.data||[]).map(function(t){return{value:t.symbol||"",symbol:t.symbol||"",name:t.name||""}}).filter(function(t){return t.value}):e.symbolSuggestions=[],a.n=4;break;case 3:a.p=3,a.v,e.symbolSuggestions=[];case 4:return a.p=4,e.symbolSearching=!1,a.f(4);case 5:return a.a(2)}},a,null,[[1,3,4,5]])})),300):this.loadWatchlistSymbols()},handleSymbolChange:function(t){t&&t!==this.currentSymbol&&(this.currentSymbol=t,this.loadPrice(),this.selectedCredentialId&&this.loadPosition(),this.$emit("update:symbol",t))},loadPrice:function(){var t=this;return(0,n.A)((0,r.A)().m(function e(){var a,i;return(0,r.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.currentSymbol){e.n=1;break}return t.currentPrice=0,e.a(2);case 1:return e.p=1,e.n=2,(0,u.Ay)({url:"/api/market/price",method:"get",params:{market:"Crypto",symbol:t.currentSymbol}});case 2:a=e.v,a&&1===a.code&&a.data&&(i=parseFloat(a.data.price||0),i>0&&(t.currentPrice=i,0!==t.limitPrice&&t.limitPrice!==t.presetPrice||(t.limitPrice=i))),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[1,3]])}))()},handleSymbolFocus:function(){0===this.symbolSuggestions.length&&this.loadWatchlistSymbols()},loadCredentials:function(){var t=this;return(0,n.A)((0,r.A)().m(function e(){var a,i,s;return(0,r.A)().w(function(e){while(1)switch(e.p=e.n){case 0:return t.credLoading=!0,e.p=1,e.n=2,(0,o.IA)();case 2:a=e.v,1===a.code&&a.data&&(i=a.data.items||a.data||[],s=["ibkr","mt5"],t.credentials=i.filter(function(t){var e=(t.exchange_id||t.name||"").toLowerCase();return!s.includes(e)}),!t.selectedCredentialId&&t.credentials.length>0&&(t.selectedCredentialId=t.credentials[0].id,t.onCredentialChange(t.selectedCredentialId))),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.p=4,t.credLoading=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))()},onExchangeAccountSaved:function(t){var e=this;return(0,n.A)((0,r.A)().m(function a(){var i,s;return(0,r.A)().w(function(a){while(1)switch(a.n){case 0:return i=e.selectedCredentialId,a.n=1,e.loadCredentials();case 1:if(s=t&&(t.id||t.credential_id),!s){a.n=3;break}return e.selectedCredentialId=s,a.n=2,e.onCredentialChange(s);case 2:a.n=4;break;case 3:if(i||1!==e.credentials.length){a.n=4;break}return e.selectedCredentialId=e.credentials[0].id,a.n=4,e.onCredentialChange(e.selectedCredentialId);case 4:return a.a(2)}},a)}))()},onCredentialChange:function(t){var e=this;return(0,n.A)((0,r.A)().m(function a(){return(0,r.A)().w(function(a){while(1)switch(a.n){case 0:return e.selectedCredentialId=t,a.n=1,e.loadBalance();case 1:return a.n=2,e.loadPosition();case 2:return a.a(2)}},a)}))()},loadBalance:function(){var t=this;return(0,n.A)((0,r.A)().m(function e(){var a,i;return(0,r.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.selectedCredentialId){e.n=1;break}return e.a(2);case 1:return t.balanceLoading=!0,e.p=2,e.n=3,m({credential_id:t.selectedCredentialId,market_type:t.effectiveMarketType});case 3:a=e.v,1===a.code&&a.data?t.balance=(0,c.A)({available:0,total:0},a.data):t.balance={available:0,total:0},e.n=5;break;case 4:e.p=4,i=e.v,t.balance={available:0,total:0,error:String(i.message||i)};case 5:return e.p=5,t.balanceLoading=!1,e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}))()},loadPosition:function(){var t=this;return(0,n.A)((0,r.A)().m(function e(){var a;return(0,r.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.selectedCredentialId&&t.currentSymbol){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,v({credential_id:t.selectedCredentialId,symbol:t.currentSymbol,market_type:t.effectiveMarketType});case 2:if(a=e.v,!(1===a.code&&a.data&&a.data.positions&&a.data.positions.length>0)){e.n=3;break}return t.currentPosition=a.data.positions[0],e.a(2,!0);case 3:return t.currentPosition=null,e.a(2,!1);case 4:e.n=6;break;case 5:return e.p=5,e.v,t.currentPosition=null,e.a(2,!1);case 6:return e.a(2)}},e,null,[[1,5]])}))()},loadPositionWithRetry:function(){var t=arguments,e=this;return(0,n.A)((0,r.A)().m(function a(){var i,s,n,c;return(0,r.A)().w(function(a){while(1)switch(a.n){case 0:return i=t.length>0&&void 0!==t[0]?t[0]:3,s=t.length>1&&void 0!==t[1]?t[1]:2e3,a.n=1,e.loadPosition();case 1:if(n=a.v,!n){a.n=2;break}return a.a(2);case 2:c=0;case 3:if(!(c0&&(this.amount=Math.floor(this.balance.available*t/100*100)/100)},handleSubmit:function(){var t=this;return(0,n.A)((0,r.A)().m(function e(){var a,i,s;return(0,r.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.canSubmit){e.n=1;break}return e.a(2);case 1:return t.submitting=!0,e.p=2,a={credential_id:t.selectedCredentialId,symbol:t.currentSymbol,side:t.side,order_type:t.orderType,amount:t.amount,price:"limit"===t.orderType?t.limitPrice:0,leverage:t.isSwapMode?t.leverage:1,market_type:t.effectiveMarketType,margin_mode:t.isSwapMode?t.marginMode:void 0,tp_price:t.tpPrice||0,sl_price:t.slPrice||0,source:t.source},e.n=3,p(a);case 3:if(i=e.v,1!==i.code){e.n=7;break}return t.$emit("order-success",i.data),e.n=4,t.loadBalance();case 4:return e.n=5,t.loadHistory();case 5:return e.n=6,t.loadPositionWithRetry();case 6:e.n=8;break;case 7:t.$message.error(i.msg||t.$t("quickTrade.orderFailed"));case 8:e.n=10;break;case 9:e.p=9,s=e.v,t.$message.error(s.message||t.$t("quickTrade.orderFailed"));case 10:return e.p=10,t.submitting=!1,e.f(10);case 11:return e.a(2)}},e,null,[[2,9,10,11]])}))()},handleClosePosition:function(){var t=this;return(0,n.A)((0,r.A)().m(function e(){var a,i,s;return(0,r.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t.currentPosition&&t.selectedCredentialId){e.n=1;break}return e.a(2);case 1:return t.closingPosition=!0,e.p=2,a={credential_id:t.selectedCredentialId,symbol:t.currentSymbol,market_type:t.effectiveMarketType,size:0,source:"manual"},e.n=3,b(a);case 3:if(i=e.v,1!==i.code){e.n=6;break}return t.$message.success(t.$t("quickTrade.positionClosed")),e.n=4,t.loadBalance();case 4:return e.n=5,t.loadHistory();case 5:t.currentPosition=null,setTimeout((0,n.A)((0,r.A)().m(function e(){return(0,r.A)().w(function(e){while(1)switch(e.n){case 0:return e.n=1,t.loadPosition();case 1:return e.a(2)}},e)})),2e3),e.n=7;break;case 6:t.$message.error(i.msg||t.$t("quickTrade.orderFailed"));case 7:e.n=9;break;case 8:e.p=8,s=e.v,t.$message.error(s.message||t.$t("quickTrade.orderFailed"));case 9:return e.p=9,t.closingPosition=!1,e.f(9);case 10:return e.a(2)}},e,null,[[2,8,9,10]])}))()},startPolling:function(){var t=this;this.stopPolling(),this.pollTimer=setInterval(function(){t.currentSymbol&&t.loadPrice(),t.selectedCredentialId&&t.currentSymbol&&(t.loadBalance(),t.loadPosition())},1e4)},stopPolling:function(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)},handleClose:function(){this.$emit("close"),this.$emit("update:visible",!1)},handleHistoryCollapse:function(t){this.historyCollapsed=!t.includes("history")},formatPrice:function(t){var e=parseFloat(t||0);return Math.abs(e)>=1e4?e.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0}):Math.abs(e)>=100?e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):Math.abs(e)>=1?e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:4}):e.toLocaleString("en-US",{minimumFractionDigits:4,maximumFractionDigits:6})},formatTime:function(t){if(!t)return"";var e=new Date(t),a=function(t){return String(t).padStart(2,"0")};return"".concat(a(e.getMonth()+1),"-").concat(a(e.getDate())," ").concat(a(e.getHours()),":").concat(a(e.getMinutes()))}},beforeDestroy:function(){this.stopPolling()}},_=y,k=a(845),q=(0,k.A)(_,i,s,!1,null,"75b64b85",null),C=q.exports}}]); \ No newline at end of file diff --git a/frontend/dist/js/971-legacy.90a32800.js b/frontend/dist/js/971-legacy.90a32800.js deleted file mode 100644 index a8085fb..0000000 --- a/frontend/dist/js/971-legacy.90a32800.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[971],{55971:function(e,t,a){a.r(t),a.d(t,{default:function(){return v}});a(62010);var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"profile-page",class:{"theme-dark":e.isDarkTheme}},[t("div",{staticClass:"page-header"},[t("h2",{staticClass:"page-title"},[t("a-icon",{attrs:{type:"user"}}),t("span",[e._v(e._s(e.$t("profile.title")||"My Profile"))])],1),t("p",{staticClass:"page-desc"},[e._v(e._s(e.$t("profile.description")||"Manage your account settings and preferences"))])]),t("a-row",{staticClass:"profile-cards-row",attrs:{gutter:24}},[t("a-col",{staticClass:"profile-card-col",attrs:{xs:24,md:8}},[t("a-card",{staticClass:"profile-card",attrs:{bordered:!1}},[t("div",{staticClass:"avatar-section"},[t("a-avatar",{attrs:{size:100,src:e.profile.avatar||"/avatar2.jpg"}}),t("h3",{staticClass:"username"},[e._v(e._s(e.profile.nickname||e.profile.username))]),t("p",{staticClass:"user-role"},[t("a-tag",{attrs:{color:e.getRoleColor(e.profile.role)}},[e._v(" "+e._s(e.getRoleLabel(e.profile.role))+" ")]),e.isVip?t("a-tag",{attrs:{color:"gold"}},[t("a-icon",{attrs:{type:"crown"}}),e._v(" VIP ")],1):e._e()],1)],1),t("a-divider"),t("div",{staticClass:"profile-info"},[t("div",{staticClass:"info-item"},[t("a-icon",{attrs:{type:"user"}}),t("span",{staticClass:"label"},[e._v(e._s(e.$t("profile.username")||"Username")+":")]),t("span",{staticClass:"value"},[e._v(e._s(e.profile.username))])],1),t("div",{staticClass:"info-item"},[t("a-icon",{attrs:{type:"mail"}}),t("span",{staticClass:"label"},[e._v(e._s(e.$t("profile.email")||"Email")+":")]),t("span",{staticClass:"value"},[e._v(e._s(e.profile.email||"-"))])],1),t("div",{staticClass:"info-item"},[t("a-icon",{attrs:{type:"calendar"}}),t("span",{staticClass:"label"},[e._v(e._s(e.$t("profile.lastLogin")||"Last Login")+":")]),t("span",{staticClass:"value"},[e._v(e._s(e.formatTime(e.profile.last_login_at)||"-"))])],1)])],1)],1),t("a-col",{staticClass:"right-cards-col",attrs:{xs:24,md:16}},[t("a-row",{staticClass:"right-cards-row",attrs:{gutter:16}},[t("a-col",{attrs:{xs:24,md:12}},[t("a-card",{staticClass:"credits-card",attrs:{bordered:!1}},[t("div",{staticClass:"credits-header"},[t("h3",{staticClass:"credits-title"},[t("a-icon",{attrs:{type:"wallet"}}),e._v(" "+e._s(e.$t("profile.credits.title")||"我的积分")+" ")],1)]),t("div",{staticClass:"credits-body"},[t("div",{staticClass:"credits-amount"},[t("span",{staticClass:"amount-value"},[e._v(e._s(e.formatCredits(e.billing.credits)))]),t("span",{staticClass:"amount-label"},[e._v(e._s(e.$t("profile.credits.unit")||"积分"))])]),e.billing.vip_expires_at?t("div",{staticClass:"vip-status"},[t("a-icon",{style:{color:e.isVip?"#faad14":"#999"},attrs:{type:"crown"}}),e.isVip?t("span",{staticClass:"vip-active"},[e._v(" "+e._s(e.$t("profile.credits.vipExpires")||"VIP有效期至")+": "+e._s(e.formatDate(e.billing.vip_expires_at))+" ")]):t("span",{staticClass:"vip-expired"},[e._v(" "+e._s(e.$t("profile.credits.vipExpired")||"VIP已过期")+" ")])],1):e.billing.is_vip?e._e():t("div",{staticClass:"vip-status"},[t("span",{staticClass:"no-vip"},[e._v(e._s(e.$t("profile.credits.noVip")||"非VIP用户"))])])]),t("a-divider"),t("div",{staticClass:"credits-actions"},[t("a-button",{attrs:{type:"primary",icon:"shopping"},on:{click:e.handleRecharge}},[e._v(" "+e._s(e.$t("profile.credits.recharge")||"开通/充值")+" ")])],1),e.billing.billing_enabled?t("div",{staticClass:"credits-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.credits.hint")||"使用AI分析/回测/监控等功能会消耗积分;VIP仅可免费使用VIP免费指标。"))])],1):e._e()],1)],1),t("a-col",{attrs:{xs:24,md:12}},[t("a-card",{staticClass:"referral-card",attrs:{bordered:!1}},[t("div",{staticClass:"referral-header"},[t("h3",{staticClass:"referral-title"},[t("a-icon",{attrs:{type:"team"}}),e._v(" "+e._s(e.$t("profile.referral.title")||"邀请好友")+" ")],1)]),t("div",{staticClass:"referral-body"},[t("div",{staticClass:"referral-stats"},[t("div",{staticClass:"stat-item"},[t("span",{staticClass:"stat-value"},[e._v(e._s(e.referralData.total||0))]),t("span",{staticClass:"stat-label"},[e._v(e._s(e.$t("profile.referral.totalInvited")||"已邀请"))])]),e.referralData.referral_bonus>0?t("div",{staticClass:"stat-item"},[t("span",{staticClass:"stat-value"},[e._v("+"+e._s(e.referralData.referral_bonus))]),t("span",{staticClass:"stat-label"},[e._v(e._s(e.$t("profile.referral.bonusPerInvite")||"每邀请获得"))])]):e._e()]),t("a-divider",{staticStyle:{margin:"12px 0"}}),t("div",{staticClass:"referral-link-section"},[t("div",{staticClass:"link-label"},[e._v(e._s(e.$t("profile.referral.yourLink")||"您的邀请链接"))]),t("div",{staticClass:"link-box"},[t("a-input",{attrs:{value:e.referralLink,readonly:"",size:"small"}},[t("a-tooltip",{attrs:{slot:"suffix",title:e.$t("profile.referral.copyLink")||"复制链接"},slot:"suffix"},[t("a-icon",{staticStyle:{cursor:"pointer"},attrs:{type:"copy"},on:{click:e.copyReferralLink}})],1)],1)],1)]),e.referralData.register_bonus>0?t("div",{staticClass:"referral-hint"},[t("a-icon",{attrs:{type:"gift"}}),t("span",[e._v(e._s(e.$t("profile.referral.newUserBonus")||"新用户注册获得")+" "+e._s(e.referralData.register_bonus)+" "+e._s(e.$t("profile.credits.unit")||"积分"))])],1):e._e()],1)])],1)],1)],1)],1),t("a-row",{staticStyle:{"margin-top":"24px"},attrs:{gutter:24}},[t("a-col",{attrs:{xs:24}},[t("a-card",{staticClass:"edit-card",attrs:{bordered:!1}},[t("a-tabs",{model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[t("a-tab-pane",{key:"basic",attrs:{tab:e.$t("profile.basicInfo")||"Basic Info"}},[t("a-form",{staticClass:"profile-form",attrs:{form:e.profileForm,layout:"vertical"}},[t("a-form-item",{attrs:{label:e.$t("profile.nickname")||"Nickname"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["nickname",{initialValue:e.profile.nickname}],expression:"['nickname', { initialValue: profile.nickname }]"}],attrs:{placeholder:e.$t("profile.nicknamePlaceholder")||"Enter your nickname"}},[t("a-icon",{attrs:{slot:"prefix",type:"smile"},slot:"prefix"})],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.email")||"Email"}},[t("a-input",{attrs:{value:e.profile.email||"-",disabled:""}},[t("a-icon",{attrs:{slot:"prefix",type:"mail"},slot:"prefix"}),t("a-tooltip",{attrs:{slot:"suffix",title:e.$t("profile.emailCannotChange")||"Email cannot be changed after registration"},slot:"suffix"},[t("a-icon",{staticStyle:{color:"rgba(0,0,0,.45)"},attrs:{type:"info-circle"}})],1)],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.timezone")||"时区"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["timezone",{initialValue:e.profile.timezone||""}],expression:"['timezone', { initialValue: profile.timezone || '' }]"}],attrs:{placeholder:e.$t("profile.timezonePlaceholder")||"跟随浏览器/系统","show-search":"","allow-clear":"","option-filter-prop":"children"}},[t("a-select-option",{attrs:{value:""}},[e._v(" "+e._s(e.$t("profile.timezoneBrowser")||"跟随浏览器")+" ")]),e._l(e.timezoneIanaList,function(a){return t("a-select-option",{key:a,attrs:{value:a}},[e._v(" "+e._s(a)+" ")])})],2)],1),t("a-form-item",[t("a-button",{attrs:{type:"primary",loading:e.saving},on:{click:e.handleSaveProfile}},[t("a-icon",{attrs:{type:"save"}}),e._v(" "+e._s(e.$t("common.save")||"Save")+" ")],1)],1)],1)],1),t("a-tab-pane",{key:"password",attrs:{tab:e.$t("profile.changePassword")||"Change Password"}},[t("a-form",{staticClass:"password-form",attrs:{form:e.passwordForm,layout:"vertical"}},[t("a-alert",{staticStyle:{"margin-bottom":"24px"},attrs:{message:e.$t("profile.passwordHintNew")||"For security, email verification is required to change password. Password must be at least 8 characters with uppercase, lowercase, and number.",type:"info",showIcon:""}}),t("a-form-item",{attrs:{label:e.$t("profile.verificationCode")||"Verification Code"}},[t("a-row",{attrs:{gutter:12}},[t("a-col",{attrs:{span:16}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["code",{rules:[{required:!0,message:e.$t("profile.codeRequired")||"Please enter verification code"}]}],expression:"['code', {\n rules: [{ required: true, message: $t('profile.codeRequired') || 'Please enter verification code' }]\n }]"}],attrs:{placeholder:e.$t("profile.codePlaceholder")||"Enter verification code"}},[t("a-icon",{attrs:{slot:"prefix",type:"safety-certificate"},slot:"prefix"})],1)],1),t("a-col",{attrs:{span:8}},[t("a-button",{attrs:{block:"",loading:e.sendingPwdCode,disabled:e.sendingPwdCode||e.pwdCodeCountdown>0||!e.profile.email},on:{click:e.handleSendPwdCode}},[e._v(" "+e._s(e.pwdCodeCountdown>0?"".concat(e.pwdCodeCountdown,"s"):e.$t("profile.sendCode")||"Send Code")+" ")])],1)],1),e.profile.email?t("div",{staticClass:"email-hint"},[e._v(" "+e._s(e.$t("profile.codeWillSendTo")||"Code will be sent to")+": "+e._s(e.profile.email)+" ")]):t("div",{staticClass:"email-hint email-warning"},[e._v(" "+e._s(e.$t("profile.noEmailWarning")||"Please set your email first in Basic Info tab")+" ")])],1),t("a-form-item",{attrs:{label:e.$t("profile.newPassword")||"New Password"}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["new_password",{rules:[{required:!0,message:e.$t("profile.newPasswordRequired")||"Please enter new password"},{validator:e.validateNewPassword}]}],expression:"['new_password', {\n rules: [\n { required: true, message: $t('profile.newPasswordRequired') || 'Please enter new password' },\n { validator: validateNewPassword }\n ]\n }]"}],attrs:{placeholder:e.$t("profile.newPasswordPlaceholder")||"Enter new password"}},[t("a-icon",{attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.confirmPassword")||"Confirm Password"}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["confirm_password",{rules:[{required:!0,message:e.$t("profile.confirmPasswordRequired")||"Please confirm password"},{validator:e.validateConfirmPassword}]}],expression:"['confirm_password', {\n rules: [\n { required: true, message: $t('profile.confirmPasswordRequired') || 'Please confirm password' },\n { validator: validateConfirmPassword }\n ]\n }]"}],attrs:{placeholder:e.$t("profile.confirmPasswordPlaceholder")||"Confirm new password"}},[t("a-icon",{attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),t("a-form-item",[t("a-button",{attrs:{type:"primary",loading:e.changingPassword,disabled:!e.profile.email},on:{click:e.handleChangePassword}},[t("a-icon",{attrs:{type:"key"}}),e._v(" "+e._s(e.$t("profile.changePassword")||"Change Password")+" ")],1)],1)],1)],1),t("a-tab-pane",{key:"credits",attrs:{tab:e.$t("profile.creditsLog")||"消费记录"}},[t("a-table",{attrs:{columns:e.creditsLogColumns,dataSource:e.creditsLog,loading:e.creditsLogLoading,pagination:e.creditsLogPagination,rowKey:function(e){return e.id},size:"small"},on:{change:e.handleCreditsLogChange},scopedSlots:e._u([{key:"action",fn:function(a){return[t("a-tag",{attrs:{color:e.getActionColor(a)}},[e._v(" "+e._s(e.getActionLabel(a))+" ")])]}},{key:"amount",fn:function(a){return[t("span",{class:a>=0?"amount-positive":"amount-negative"},[e._v(" "+e._s(a>=0?"+":"")+e._s(a)+" ")])]}},{key:"created_at",fn:function(t){return[e._v(" "+e._s(e.formatCreditsLogTime(t))+" ")]}}])})],1),t("a-tab-pane",{key:"notifications",attrs:{tab:e.$t("profile.notifications.title")||"通知设置"}},[t("div",{staticClass:"notification-settings-form"},[t("a-alert",{staticStyle:{"margin-bottom":"24px"},attrs:{message:e.$t("profile.notifications.hint")||"配置您的默认通知方式,在创建资产监控和预警时将自动使用这些设置",type:"info",showIcon:""}}),t("a-form",{staticStyle:{"max-width":"600px"},attrs:{form:e.notificationForm,layout:"vertical"}},[t("a-form-item",{attrs:{label:e.$t("profile.notifications.defaultChannels")||"默认通知渠道"}},[t("a-checkbox-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["default_channels",{initialValue:e.notificationSettings.default_channels||["browser"]}],expression:"['default_channels', { initialValue: notificationSettings.default_channels || ['browser'] }]"}]},[t("a-row",{attrs:{gutter:16}},[t("a-col",{attrs:{span:8}},[t("a-checkbox",{attrs:{value:"browser"}},[t("a-icon",{attrs:{type:"bell"}}),e._v(" "+e._s(e.$t("profile.notifications.browser")||"站内通知")+" ")],1)],1),t("a-col",{attrs:{span:8}},[t("a-checkbox",{attrs:{value:"telegram"}},[t("a-icon",{attrs:{type:"send"}}),e._v(" Telegram ")],1)],1),t("a-col",{attrs:{span:8}},[t("a-checkbox",{attrs:{value:"email"}},[t("a-icon",{attrs:{type:"mail"}}),e._v(" "+e._s(e.$t("profile.notifications.email")||"邮件")+" ")],1)],1)],1),t("a-row",{staticStyle:{"margin-top":"8px"},attrs:{gutter:16}},[t("a-col",{attrs:{span:8}},[t("a-checkbox",{attrs:{value:"phone"}},[t("a-icon",{attrs:{type:"phone"}}),e._v(" "+e._s(e.$t("profile.notifications.phone")||"短信")+" ")],1)],1),t("a-col",{attrs:{span:8}},[t("a-checkbox",{attrs:{value:"discord"}},[t("a-icon",{attrs:{type:"message"}}),e._v(" Discord ")],1)],1),t("a-col",{attrs:{span:8}},[t("a-checkbox",{attrs:{value:"webhook"}},[t("a-icon",{attrs:{type:"api"}}),e._v(" Webhook ")],1)],1)],1)],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.telegramBotToken")||"Telegram Bot Token"}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["telegram_bot_token",{initialValue:e.notificationSettings.telegram_bot_token}],expression:"['telegram_bot_token', { initialValue: notificationSettings.telegram_bot_token }]"}],attrs:{placeholder:e.$t("profile.notifications.telegramBotTokenPlaceholder")||"请输入您的 Telegram Bot Token"}},[t("a-icon",{attrs:{slot:"prefix",type:"robot"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(" "+e._s(e.$t("profile.notifications.telegramBotTokenHint")||"通过 @BotFather 创建机器人获取 Token")+" "),t("a",{attrs:{href:"https://t.me/BotFather",target:"_blank",rel:"noopener noreferrer"}},[e._v("@BotFather")])])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.telegramChatId")||"Telegram Chat ID"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["telegram_chat_id",{initialValue:e.notificationSettings.telegram_chat_id}],expression:"['telegram_chat_id', { initialValue: notificationSettings.telegram_chat_id }]"}],attrs:{placeholder:e.$t("profile.notifications.telegramPlaceholder")||"请输入您的 Telegram Chat ID(如 123456789)"}},[t("a-icon",{attrs:{slot:"prefix",type:"message"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.notifications.telegramHint")||"发送 /start 给 @userinfobot 可获取您的 Chat ID"))])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.notifyEmail")||"通知邮箱"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["email",{initialValue:e.notificationSettings.email||e.profile.email}],expression:"['email', { initialValue: notificationSettings.email || profile.email }]"}],attrs:{placeholder:e.$t("profile.notifications.emailPlaceholder")||"接收通知的邮箱地址"}},[t("a-icon",{attrs:{slot:"prefix",type:"mail"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.notifications.emailHint")||"默认使用账户邮箱,可设置其他邮箱接收通知"))])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.phone")||"手机号(短信通知)"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["phone",{initialValue:e.notificationSettings.phone}],expression:"['phone', { initialValue: notificationSettings.phone }]"}],attrs:{placeholder:e.$t("profile.notifications.phonePlaceholder")||"请输入手机号(如 +8613800138000)"}},[t("a-icon",{attrs:{slot:"prefix",type:"phone"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.notifications.phoneHint")||"需要管理员配置 Twilio 服务后才能使用短信通知"))])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.discordWebhook")||"Discord Webhook"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["discord_webhook",{initialValue:e.notificationSettings.discord_webhook}],expression:"['discord_webhook', { initialValue: notificationSettings.discord_webhook }]"}],attrs:{placeholder:e.$t("profile.notifications.discordPlaceholder")||"https://discord.com/api/webhooks/..."}},[t("a-icon",{attrs:{slot:"prefix",type:"message"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.notifications.discordHint")||"在 Discord 服务器设置中创建 Webhook"))])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.webhookUrl")||"Webhook URL"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["webhook_url",{initialValue:e.notificationSettings.webhook_url}],expression:"['webhook_url', { initialValue: notificationSettings.webhook_url }]"}],attrs:{placeholder:e.$t("profile.notifications.webhookPlaceholder")||"https://your-server.com/webhook"}},[t("a-icon",{attrs:{slot:"prefix",type:"api"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.notifications.webhookHint")||"自定义 Webhook 地址,将以 POST JSON 方式推送通知"))])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.notifications.webhookToken")||"Webhook Token(可选)"}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["webhook_token",{initialValue:e.notificationSettings.webhook_token}],expression:"['webhook_token', { initialValue: notificationSettings.webhook_token }]"}],attrs:{placeholder:e.$t("profile.notifications.webhookTokenPlaceholder")||"用于验证请求的 Bearer Token"}},[t("a-icon",{attrs:{slot:"prefix",type:"key"},slot:"prefix"})],1),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.notifications.webhookTokenHint")||"将作为 Authorization: Bearer Token 发送到 Webhook"))])],1)],1),t("a-form-item",[t("a-button",{attrs:{type:"primary",loading:e.savingNotifications},on:{click:e.handleSaveNotifications}},[t("a-icon",{attrs:{type:"save"}}),e._v(" "+e._s(e.$t("common.save")||"保存")+" ")],1),t("a-button",{staticStyle:{"margin-left":"12px"},attrs:{loading:e.testingNotification},on:{click:e.handleTestNotification}},[t("a-icon",{attrs:{type:"experiment"}}),e._v(" "+e._s(e.$t("profile.notifications.testBtn")||"发送测试通知")+" ")],1)],1)],1)],1)]),t("a-tab-pane",{key:"exchange",attrs:{tab:e.$t("profile.exchange.title")||"交易所配置"}},[t("div",{staticClass:"exchange-config-section"},[t("a-alert",{staticStyle:{"margin-bottom":"16px"},attrs:{message:e.$t("profile.exchange.hint"),type:"info",showIcon:""}}),t("div",{staticStyle:{"margin-bottom":"16px","text-align":"right"}},[t("a-button",{staticStyle:{"margin-right":"12px"},on:{click:e.openExchangeSignupModal}},[t("a-icon",{attrs:{type:"rocket"}}),e._v(" "+e._s(e.$t("profile.exchange.openAccount"))+" ")],1),t("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:e.openAddExchangeModal}},[e._v(" "+e._s(e.$t("profile.exchange.addAccount"))+" ")])],1),t("a-table",{attrs:{columns:e.exchangeColumns,dataSource:e.exchangeCredentials,loading:e.exchangeLoading,rowKey:function(e){return e.id},locale:{emptyText:e.$t("profile.exchange.noAccounts")||"暂无交易所账户,请点击上方按钮添加"},size:"small"},scopedSlots:e._u([{key:"exchange_id",fn:function(a,i){return[t("span",{staticStyle:{"text-transform":"capitalize","font-weight":"500"}},[e._v(e._s(e.getExchangeDisplayName(a)))]),i.enable_demo_trading?t("a-tag",{staticStyle:{"margin-left":"6px"},attrs:{color:"orange",size:"small"}},[e._v(" "+e._s(e.$t("profile.exchange.demoTag"))+" ")]):e._e()]}},{key:"api_key_hint",fn:function(a,i){return[t("span",{staticClass:"credential-hint"},[e._v(e._s(a||i.name||"-"))])]}},{key:"created_at",fn:function(t){return[e._v(" "+e._s(e.formatTime(t))+" ")]}},{key:"action",fn:function(a,i){return[t("a-popconfirm",{attrs:{title:e.$t("profile.exchange.deleteConfirm"),okText:e.$t("common.confirm"),cancelText:e.$t("common.cancel")},on:{confirm:function(t){return e.handleDeleteCredential(i.id)}}},[t("a-button",{attrs:{type:"danger",size:"small",ghost:"",icon:"delete"}},[e._v(" "+e._s(e.$t("common.delete"))+" ")])],1)]}}])})],1)]),t("a-tab-pane",{key:"referrals",attrs:{tab:e.$t("profile.referral.listTab")||"邀请列表"}},[t("a-table",{attrs:{columns:e.referralColumns,dataSource:e.referralData.list||[],loading:e.referralLoading,pagination:e.referralPagination,rowKey:function(e){return e.id},locale:{emptyText:e.$t("profile.referral.noReferrals")||"暂无邀请记录"},size:"small"},on:{change:e.handleReferralChange},scopedSlots:e._u([{key:"user",fn:function(a,i){return[t("div",{staticClass:"referral-user-cell"},[t("a-avatar",{attrs:{size:32,src:i.avatar||"/avatar2.jpg"}}),t("div",{staticClass:"user-info"},[t("span",{staticClass:"nickname"},[e._v(e._s(i.nickname||i.username))]),t("span",{staticClass:"username"},[e._v("@"+e._s(i.username))])])],1)]}},{key:"created_at",fn:function(t){return[e._v(" "+e._s(e.formatTime(t))+" ")]}}])})],1)],1)],1)],1)],1),t("a-modal",{attrs:{title:e.$t("profile.exchange.addTitle"),visible:e.showAddExchangeModal,"wrap-class-name":e.exchangeModalWrapClass,confirmLoading:e.savingExchange,okText:e.$t("common.save"),cancelText:e.$t("common.cancel"),maskClosable:!1,width:"520px"},on:{ok:e.handleSaveExchange,cancel:function(t){e.showAddExchangeModal=!1}}},[t("a-form",{staticClass:"exchange-account-form",attrs:{form:e.exchangeForm,layout:"vertical"}},[t("a-form-item",{attrs:{label:e.$t("profile.exchange.selectExchange")}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["exchange_id",{rules:[{required:!0,message:e.$t("profile.exchange.selectExchange")}]}],expression:"['exchange_id', { rules: [{ required: true, message: $t('profile.exchange.selectExchange') }] }]"}],attrs:{placeholder:e.$t("profile.exchange.selectExchange"),"dropdown-class-name":e.isDarkTheme?"profile-exchange-select-dropdown-dark":"","get-popup-container":e.getExchangeSelectPopupContainer},on:{change:e.handleExchangeTypeChange}},[t("a-select-opt-group",{attrs:{label:e.$t("profile.exchange.typeCrypto")}},e._l(e.cryptoExchangeList,function(a){return t("a-select-option",{key:a.id,attrs:{value:a.id}},[e._v(" "+e._s(a.name)+" ")])}),1),t("a-select-opt-group",{attrs:{label:e.$t("profile.exchange.typeIBKR")}},[t("a-select-option",{attrs:{value:"ibkr"}},[e._v("Interactive Brokers (IBKR)")])],1),t("a-select-opt-group",{attrs:{label:e.$t("profile.exchange.typeMT5")}},[t("a-select-option",{attrs:{value:"mt5"}},[e._v("MetaTrader 5")])],1)],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.accountName")}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name"],expression:"['name']"}],attrs:{placeholder:e.$t("profile.exchange.accountNamePlaceholder")}})],1),"crypto"===e.addExchangeType?t("a-form-item",{attrs:{label:e.$t("profile.exchange.whitelistIpLabel")}},[t("div",{staticClass:"egress-ip-block"},[e.egressIpLoading?t("a-spin",{attrs:{size:"small"}}):[t("div",{staticClass:"egress-ip-line"},[t("span",{staticClass:"egress-ip-kind"},[e._v(e._s(e.$t("profile.exchange.whitelistIpv4")))]),t("code",{staticClass:"egress-ip-value"},[e._v(e._s(e.egressServerIpv4||"—"))]),t("a-button",{staticClass:"egress-ip-action",attrs:{type:"link",size:"small",disabled:!e.egressServerIpv4},on:{click:function(t){return e.copyEgressIp("v4")}}},[e._v(" "+e._s(e.$t("profile.exchange.whitelistIpCopy"))+" ")])],1),t("div",{staticClass:"egress-ip-line"},[t("span",{staticClass:"egress-ip-kind"},[e._v(e._s(e.$t("profile.exchange.whitelistIpv6")))]),t("code",{staticClass:"egress-ip-value"},[e._v(e._s(e.egressServerIpv6||"—"))]),t("a-button",{staticClass:"egress-ip-action",attrs:{type:"link",size:"small",disabled:!e.egressServerIpv6},on:{click:function(t){return e.copyEgressIp("v6")}}},[e._v(" "+e._s(e.$t("profile.exchange.whitelistIpCopy"))+" ")])],1),t("div",{staticClass:"egress-ip-row egress-ip-refresh-row"},[t("a-button",{staticClass:"egress-ip-action",attrs:{type:"link",size:"small"},on:{click:e.fetchEgressIp}},[e._v(" "+e._s(e.$t("profile.exchange.whitelistIpRefresh"))+" ")])],1)]],2),t("div",{staticClass:"field-hint egress-ip-hint"},[e._v(e._s(e.$t("profile.exchange.whitelistIpHint")))])]):e._e(),"crypto"===e.addExchangeType?[e.selectedExchangeApiDocUrl?t("div",{staticClass:"exchange-api-doc-callout"},[t("div",{staticClass:"exchange-api-doc-callout__content"},[t("div",{staticClass:"exchange-api-doc-callout__icon"},[t("a-icon",{attrs:{type:"link"}})],1),t("div",{staticClass:"exchange-api-doc-callout__text"},[t("div",{staticClass:"exchange-api-doc-callout__title"},[e._v(" "+e._s(e.selectedCryptoExchangeName)+" "+e._s(e.$t("profile.exchange.apiDocTitleSuffix"))+" ")]),t("div",{staticClass:"exchange-api-doc-callout__hint"},[e._v(" "+e._s(e.$t("profile.exchange.apiDocHint"))+" ")])])]),t("a-button",{staticClass:"exchange-api-doc-callout__action",attrs:{type:"link",size:"small"},on:{click:e.openSelectedExchangeApiDoc}},[e._v(" "+e._s(e.$t("profile.exchange.apiDocAction"))+" "),t("a-icon",{attrs:{type:"arrow-right"}})],1)],1):e._e(),t("a-form-item",{attrs:{label:e.$t("profile.exchange.apiKey")}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["api_key",{rules:[{required:!0,message:"API Key is required"}]}],expression:"['api_key', { rules: [{ required: true, message: 'API Key is required' }] }]"}],attrs:{placeholder:"API Key",autocomplete:"new-password"}})],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.secretKey")}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["secret_key",{rules:[{required:!0,message:"Secret Key is required"}]}],expression:"['secret_key', { rules: [{ required: true, message: 'Secret Key is required' }] }]"}],attrs:{placeholder:"Secret Key",autocomplete:"new-password"}})],1),e.addExchangeNeedsPassphrase?t("a-form-item",{attrs:{label:e.$t("profile.exchange.passphrase")}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["passphrase"],expression:"['passphrase']"}],attrs:{placeholder:"Passphrase",autocomplete:"new-password"}})],1):e._e(),e.addExchangeShowDemo?t("a-form-item",[t("a-checkbox",{directives:[{name:"decorator",rawName:"v-decorator",value:["enable_demo_trading",{valuePropName:"checked",initialValue:!1}],expression:"['enable_demo_trading', { valuePropName: 'checked', initialValue: false }]"}],staticClass:"exchange-demo-checkbox"},[t("span",{staticClass:"exchange-demo-checkbox-label"},[e._v(e._s(e.$t("profile.exchange.demoTrading")))])]),t("div",{staticClass:"field-hint exchange-demo-hint"},[e._v(e._s(e.$t("profile.exchange.demoTradingHint")))])],1):e._e()]:e._e(),"ibkr"===e.addExchangeType?[t("a-alert",{staticStyle:{"margin-bottom":"16px"},attrs:{type:"warning",showIcon:"",message:e.$t("profile.exchange.localDeploymentRequired"),description:e.$t("profile.exchange.localDeploymentHint")}}),t("a-form-item",{attrs:{label:e.$t("profile.exchange.ibkrHost")}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["ibkr_host",{initialValue:"127.0.0.1"}],expression:"['ibkr_host', { initialValue: '127.0.0.1' }]"}],attrs:{placeholder:"127.0.0.1"}})],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.ibkrPort")}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["ibkr_port",{initialValue:7497}],expression:"['ibkr_port', { initialValue: 7497 }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:65535}}),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.exchange.ibkrPortHint")))])],1)],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.ibkrClientId")}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["ibkr_client_id",{initialValue:1}],expression:"['ibkr_client_id', { initialValue: 1 }]"}],staticStyle:{width:"100%"},attrs:{min:1,max:999}})],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.ibkrAccount")}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["ibkr_account"],expression:"['ibkr_account']"}],attrs:{placeholder:"DU123456"}})],1)]:e._e(),"mt5"===e.addExchangeType?[t("a-alert",{staticStyle:{"margin-bottom":"16px"},attrs:{type:"warning",showIcon:"",message:e.$t("profile.exchange.localDeploymentRequired"),description:e.$t("profile.exchange.localDeploymentHint")}}),t("a-form-item",{attrs:{label:e.$t("profile.exchange.mt5Server")}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["mt5_server",{rules:[{required:!0,message:"Server is required"}]}],expression:"['mt5_server', { rules: [{ required: true, message: 'Server is required' }] }]"}],attrs:{placeholder:"MetaQuotes-Demo"}})],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.mt5Login")}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["mt5_login",{rules:[{required:!0,message:"Login is required"}]}],expression:"['mt5_login', { rules: [{ required: true, message: 'Login is required' }] }]"}],staticStyle:{width:"100%"},attrs:{min:1,placeholder:"12345678"}})],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.mt5Password")}},[t("a-input-password",{directives:[{name:"decorator",rawName:"v-decorator",value:["mt5_password",{rules:[{required:!0,message:"Password is required"}]}],expression:"['mt5_password', { rules: [{ required: true, message: 'Password is required' }] }]"}],attrs:{placeholder:"Password",autocomplete:"new-password"}})],1),t("a-form-item",{attrs:{label:e.$t("profile.exchange.mt5TerminalPath")}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["mt5_terminal_path"],expression:"['mt5_terminal_path']"}],attrs:{placeholder:"C:\\Program Files\\MetaTrader 5\\terminal64.exe"}}),t("div",{staticClass:"field-hint"},[t("a-icon",{attrs:{type:"info-circle"}}),t("span",[e._v(e._s(e.$t("profile.exchange.mt5TerminalPathHint")))])],1)],1)]:e._e(),e.addExchangeType?t("a-form-item",[t("a-button",{attrs:{block:"",loading:e.testingExchange},on:{click:e.handleTestExchangeConnection}},[t("a-icon",{attrs:{type:"api"}}),e._v(" "+e._s(e.$t("profile.exchange.testConnection"))+" ")],1),e.exchangeTestResult?t("div",{staticClass:"test-result-msg",class:e.exchangeTestResult.success?"success":"error"},[t("a-icon",{attrs:{type:e.exchangeTestResult.success?"check-circle":"close-circle"}}),e._v(" "+e._s(e.exchangeTestResult.message)+" ")],1):e._e()],1):e._e()],2)],1),t("a-modal",{attrs:{title:e.$t("profile.exchange.openAccountTitle"),visible:e.showExchangeSignupModal,"wrap-class-name":e.exchangeModalWrapClass,footer:null,width:"860px"},on:{cancel:function(t){e.showExchangeSignupModal=!1}}},[t("div",{staticClass:"exchange-signup-modal"},[t("div",{staticClass:"exchange-signup-promo"},[e._v(e._s(e.$t("profile.exchange.openAccountPromo")))]),t("div",{staticClass:"exchange-signup-grid"},e._l(e.exchangeSignupCards,function(a){return t("div",{key:a.id,staticClass:"exchange-signup-card"},[t("div",{staticClass:"exchange-signup-card__header"},[t("div",{staticClass:"exchange-signup-logo",style:{background:a.brandBg,color:a.brandColor}},[e._v(" "+e._s(a.short)+" ")]),t("div",{staticClass:"exchange-signup-meta"},[t("div",{staticClass:"exchange-signup-name"},[e._v(e._s(a.name))])])]),t("div",{staticClass:"exchange-signup-actions"},[t("a-button",{attrs:{type:"primary",block:"",disabled:!a.signupUrl},on:{click:function(t){return e.openExchangeSignupLink(a.signupUrl)}}},[e._v(" "+e._s(e.$t("profile.exchange.openAccountButton"))+" ")])],1)])}),0)])])],1)},r=[],n=a(76338),o=a(81127),s=a(56252),c=(a(28706),a(2008),a(50113),a(74423),a(48598),a(62062),a(2892),a(40150),a(79432),a(26099),a(27495),a(99449),a(21699),a(47764),a(25440),a(42762),a(62953),a(84841)),l=a(53003),d=a(42430),p=a(36911),u=a(55434),f={name:"Profile",mixins:[u.t],data:function(){return{loading:!1,saving:!1,changingPassword:!1,sendingPwdCode:!1,pwdCodeCountdown:0,pwdCodeTimer:null,activeTab:"basic",profile:{id:null,username:"",nickname:"",email:"",avatar:"",timezone:"",role:"user",last_login_at:null},timezoneIanaList:["UTC","Etc/UTC","Asia/Shanghai","Asia/Hong_Kong","Asia/Taipei","Asia/Tokyo","Asia/Seoul","Asia/Singapore","Asia/Dubai","Asia/Kolkata","Europe/London","Europe/Paris","Europe/Berlin","America/New_York","America/Chicago","America/Denver","America/Los_Angeles","America/Toronto","America/Sao_Paulo","Australia/Sydney","Pacific/Auckland"],creditsLog:[],creditsLogLoading:!1,creditsLogPagination:{current:1,pageSize:10,total:0},referralData:{list:[],total:0,referral_code:"",referral_bonus:0,register_bonus:0},referralLoading:!1,referralPagination:{current:1,pageSize:10,total:0},billing:{credits:0,is_vip:!1,vip_expires_at:null,billing_enabled:!1,feature_costs:{}},rechargeTelegramUrl:"https://t.me/your_support_bot",notificationSettings:{default_channels:["browser"],telegram_bot_token:"",telegram_chat_id:"",email:"",phone:"",discord_webhook:"",webhook_url:"",webhook_token:""},savingNotifications:!1,testingNotification:!1,exchangeCredentials:[],exchangeLoading:!1,showAddExchangeModal:!1,showExchangeSignupModal:!1,savingExchange:!1,testingExchange:!1,exchangeTestResult:null,addExchangeType:"",selectedExchangeId:"",egressServerIpv4:"",egressServerIpv6:"",egressIpLoading:!1,cryptoExchangeList:[{id:"binance",name:"Binance",docsUrl:"https://www.binance.com/en/support/faq/api-faq-360027369792"},{id:"okx",name:"OKX",docsUrl:"https://www.okx.com/help/how-do-i-create-my-api-key"},{id:"bitget",name:"Bitget",docsUrl:"https://www.bitget.com/api-doc/common/introduction"},{id:"bybit",name:"Bybit",docsUrl:"https://www.bybit.com/en/help-center/article/How-to-create-your-API-key/"},{id:"coinbaseexchange",name:"Coinbase",docsUrl:"https://docs.cdp.coinbase.com/exchange/rest-api/authentication"},{id:"kraken",name:"Kraken",docsUrl:"https://support.kraken.com/articles/360000919966-how-to-create-an-api-key"},{id:"kucoin",name:"KuCoin",docsUrl:"https://www.kucoin.com/docs-new/authentication"},{id:"gate",name:"Gate.io",docsUrl:"https://www.gate.com/docs/developers/apiv4/"},{id:"bitfinex",name:"Bitfinex",docsUrl:"https://docs.bitfinex.com/docs/create-an-api-key"},{id:"deepcoin",name:"Deepcoin",docsUrl:"https://www.deepcoin.com/docs/deepcoinApiDocs/"},{id:"htx",name:"HTX",docsUrl:"https://www.htx.com/support/en-us/detail/360000188081"}],exchangeSignupCards:[{id:"binance",name:"Binance",short:"BN",brandBg:"rgba(243, 186, 47, 0.16)",brandColor:"#f0b90b",signupUrl:"https://www.bsmkweb.cc/register?ref=QUANTDINGER"},{id:"bitget",name:"Bitget",short:"BG",brandBg:"rgba(0, 193, 255, 0.14)",brandColor:"#00c1ff",signupUrl:"https://partner.hdmune.cn/bg/7r4xz8kd"},{id:"bybit",name:"Bybit",short:"BY",brandBg:"rgba(247, 166, 0, 0.14)",brandColor:"#f7a600",signupUrl:"https://partner.bybit.com/b/DINGER"},{id:"okx",name:"OKX",short:"OK",brandBg:"rgba(17, 24, 39, 0.08)",brandColor:"#111827",signupUrl:"https://www.xqmnobxky.com/join/QUANTDINGER"},{id:"gate",name:"Gate.io",short:"GT",brandBg:"rgba(42, 93, 255, 0.12)",brandColor:"#2a5dff",signupUrl:"https://www.gateport.company/share/DINGER"},{id:"htx",name:"HTX",short:"HX",brandBg:"rgba(22, 119, 255, 0.12)",brandColor:"#1677ff",signupUrl:"https://www.htx.com/invite/zh-cn/1f?invite_code=dinger"}]}},computed:{isDarkTheme:function(){return"dark"===this.navTheme||"realdark"===this.navTheme},exchangeModalWrapClass:function(){var e="profile-exchange-modal";return this.isDarkTheme?"".concat(e," ").concat(e,"--dark"):e},isVip:function(){if(!this.billing.vip_expires_at)return!1;var e=new Date(this.billing.vip_expires_at);return e>new Date},creditsLogColumns:function(){return[{title:this.$t("profile.creditsLog.time")||"时间",dataIndex:"created_at",width:160,scopedSlots:{customRender:"created_at"}},{title:this.$t("profile.creditsLog.action")||"类型",dataIndex:"action",width:100,scopedSlots:{customRender:"action"}},{title:this.$t("profile.creditsLog.amount")||"变动",dataIndex:"amount",width:100,scopedSlots:{customRender:"amount"}},{title:this.$t("profile.creditsLog.balance")||"余额",dataIndex:"balance_after",width:100},{title:this.$t("profile.creditsLog.remark")||"备注",dataIndex:"remark",ellipsis:!0}]},referralColumns:function(){return[{title:this.$t("profile.referral.user")||"用户",dataIndex:"username",scopedSlots:{customRender:"user"}},{title:this.$t("profile.referral.registerTime")||"注册时间",dataIndex:"created_at",width:180,scopedSlots:{customRender:"created_at"}}]},referralLink:function(){var e=window.location.origin+window.location.pathname,t=this.referralData.referral_code||this.profile.id;return"".concat(e,"#/user/login?ref=").concat(t)},exchangeColumns:function(){return[{title:this.$t("profile.exchange.colExchange")||"Exchange",dataIndex:"exchange_id",width:140,scopedSlots:{customRender:"exchange_id"}},{title:this.$t("profile.exchange.colName")||"Name",dataIndex:"name",width:140,customRender:function(e){return e||"-"}},{title:this.$t("profile.exchange.colHint")||"Connection Info",dataIndex:"api_key_hint",scopedSlots:{customRender:"api_key_hint"}},{title:this.$t("profile.exchange.colCreatedAt")||"Created At",dataIndex:"created_at",width:180,scopedSlots:{customRender:"created_at"}},{title:this.$t("profile.exchange.colActions")||"Actions",width:120,scopedSlots:{customRender:"action"}}]},addExchangeNeedsPassphrase:function(){var e=["okx","bitget","kucoin"];return e.includes(this.selectedExchangeId)},addExchangeShowDemo:function(){return"crypto"===this.addExchangeType&&!!this.selectedExchangeId},selectedCryptoExchangeMeta:function(){var e=this;return this.cryptoExchangeList.find(function(t){return t.id===e.selectedExchangeId})||null},selectedCryptoExchangeName:function(){return this.selectedCryptoExchangeMeta?this.selectedCryptoExchangeMeta.name:this.getExchangeDisplayName(this.selectedExchangeId)},selectedExchangeApiDocUrl:function(){return this.selectedCryptoExchangeMeta?this.selectedCryptoExchangeMeta.docsUrl:""}},watch:{showAddExchangeModal:function(e){e&&this.fetchEgressIp()},activeTab:function(e){"credits"===e&&0===this.creditsLog.length&&this.loadCreditsLog(),"referrals"!==e||this.referralData.list&&0!==this.referralData.list.length||this.loadReferrals(),"notifications"!==e||this.notificationSettings.telegram_chat_id||this.notificationSettings.discord_webhook||this.loadNotificationSettings(),"exchange"===e&&0===this.exchangeCredentials.length&&this.loadExchangeCredentials()}},beforeCreate:function(){this.profileForm=this.$form.createForm(this,{name:"profile"}),this.passwordForm=this.$form.createForm(this,{name:"password"}),this.notificationForm=this.$form.createForm(this,{name:"notification"}),this.exchangeForm=this.$form.createForm(this,{name:"exchange"})},mounted:function(){this.loadProfile(),this.loadReferrals()},beforeDestroy:function(){this.pwdCodeTimer&&clearInterval(this.pwdCodeTimer)},methods:{loadProfile:function(){var e=this;return(0,s.A)((0,o.A)().m(function t(){var a;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return e.loading=!0,t.p=1,t.n=2,(0,c.E$)();case 2:a=t.v,1===a.code?(e.profile=a.data,a.data.billing&&(e.billing=a.data.billing),a.data.notification_settings&&(e.notificationSettings={default_channels:a.data.notification_settings.default_channels||["browser"],telegram_bot_token:a.data.notification_settings.telegram_bot_token||"",telegram_chat_id:a.data.notification_settings.telegram_chat_id||"",email:a.data.notification_settings.email||a.data.email||"",phone:a.data.notification_settings.phone||"",discord_webhook:a.data.notification_settings.discord_webhook||"",webhook_url:a.data.notification_settings.webhook_url||"",webhook_token:a.data.notification_settings.webhook_token||""}),e.$nextTick(function(){e.profileForm.setFieldsValue({nickname:e.profile.nickname,email:e.profile.email,timezone:e.profile.timezone||""})})):e.$message.error(a.msg||"Failed to load profile"),t.n=4;break;case 3:t.p=3,t.v,e.$message.error("Failed to load profile");case 4:return t.p=4,e.loading=!1,t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}))()},loadRechargeUrl:function(){var e=this;return(0,s.A)((0,o.A)().m(function t(){var a;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if("admin"!==e.profile.role){t.n=4;break}return t.p=1,t.n=2,(0,l.YT)();case 2:a=t.v,1===a.code&&a.data&&a.data.billing&&(e.rechargeTelegramUrl=a.data.billing.RECHARGE_TELEGRAM_URL||e.rechargeTelegramUrl),t.n=4;break;case 3:t.p=3,t.v;case 4:return t.a(2)}},t,null,[[1,3]])}))()},handleRecharge:function(){this.$router.push("/billing")},formatCredits:function(e){return e||0===e?Number(e).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:2}):"0"},formatDate:function(e){if(!e)return"";var t=new Date(e);return t.toLocaleDateString()},handleSaveProfile:function(){var e=this;this.profileForm.validateFields(function(){var t=(0,s.A)((0,o.A)().m(function t(a,i){var r;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(!a){t.n=1;break}return t.a(2);case 1:return e.saving=!0,t.p=2,t.n=3,(0,c.r7)({nickname:i.nickname,timezone:null!=i.timezone?i.timezone:""});case 3:r=t.v,1===r.code?(e.$message.success(r.msg||"Profile updated successfully"),e.loadProfile(),e.$store.dispatch("FetchUserInfo").catch(function(){})):e.$message.error(r.msg||"Update failed"),t.n=5;break;case 4:t.p=4,t.v,e.$message.error("Update failed");case 5:return t.p=5,e.saving=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}));return function(e,a){return t.apply(this,arguments)}}())},validateConfirmPassword:function(e,t,a){var i=this.passwordForm.getFieldValue("new_password");t&&t!==i?a(this.$t("profile.passwordMismatch")||"Passwords do not match"):a()},handleSendPwdCode:function(){var e=this;return(0,s.A)((0,o.A)().m(function t(){var i,r,n,s,c;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(e.profile.email){t.n=1;break}return e.$message.error(e.$t("profile.noEmailWarning")||"Please set your email first"),t.a(2);case 1:return e.sendingPwdCode=!0,t.p=2,t.n=3,a.e(824).then(a.bind(a,95824));case 3:return i=t.v,r=i.sendVerificationCode,t.n=4,r({email:e.profile.email,type:"change_password"});case 4:n=t.v,1===n.code?(e.$message.success(e.$t("profile.codeSent")||"Verification code sent"),e.startPwdCodeCountdown()):e.$message.error(n.msg||"Failed to send code"),t.n=6;break;case 5:t.p=5,c=t.v,e.$message.error((null===(s=c.response)||void 0===s||null===(s=s.data)||void 0===s?void 0:s.msg)||"Failed to send code");case 6:return t.p=6,e.sendingPwdCode=!1,t.f(6);case 7:return t.a(2)}},t,null,[[2,5,6,7]])}))()},startPwdCodeCountdown:function(){var e=this;this.pwdCodeCountdown=60,this.pwdCodeTimer=setInterval(function(){e.pwdCodeCountdown--,e.pwdCodeCountdown<=0&&(clearInterval(e.pwdCodeTimer),e.pwdCodeTimer=null)},1e3)},validateNewPassword:function(e,t,a){t?t.length<8?a(new Error(this.$t("user.register.pwdMinLength")||"At least 8 characters")):/[A-Z]/.test(t)?/[a-z]/.test(t)?/[0-9]/.test(t)?a():a(new Error(this.$t("user.register.pwdNumber")||"At least one number")):a(new Error(this.$t("user.register.pwdLowercase")||"At least one lowercase letter")):a(new Error(this.$t("user.register.pwdUppercase")||"At least one uppercase letter")):a()},handleChangePassword:function(){var e=this;this.passwordForm.validateFields(function(){var t=(0,s.A)((0,o.A)().m(function t(i,r){var n,s,c,l,d;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(!i){t.n=1;break}return t.a(2);case 1:return e.changingPassword=!0,t.p=2,t.n=3,a.e(824).then(a.bind(a,95824));case 3:return n=t.v,s=n.changePassword,t.n=4,s({code:r.code,new_password:r.new_password});case 4:c=t.v,1===c.code?(e.$message.success(c.msg||"Password changed successfully"),e.passwordForm.resetFields()):e.$message.error(c.msg||"Change password failed"),t.n=6;break;case 5:t.p=5,d=t.v,e.$message.error((null===(l=d.response)||void 0===l||null===(l=l.data)||void 0===l?void 0:l.msg)||"Change password failed");case 6:return t.p=6,e.changingPassword=!1,t.f(6);case 7:return t.a(2)}},t,null,[[2,5,6,7]])}));return function(e,a){return t.apply(this,arguments)}}())},getRoleColor:function(e){var t={admin:"red",manager:"orange",user:"blue",viewer:"default"};return t[e]||"default"},getRoleLabel:function(e){var t={admin:this.$t("userManage.roleAdmin")||"Admin",manager:this.$t("userManage.roleManager")||"Manager",user:this.$t("userManage.roleUser")||"User",viewer:this.$t("userManage.roleViewer")||"Viewer"};return t[e]||e},_profileDateTimeLocaleOptions:function(){var e=String(this.profile&&this.profile.timezone||"").trim();if(!e)return{};try{return Intl.DateTimeFormat(void 0,{timeZone:e}).format(new Date),{timeZone:e}}catch(t){return{}}},formatTime:function(e){if(!e)return"";var t=new Date("number"===typeof e?1e3*e:e);return Number.isNaN(t.getTime())?"":t.toLocaleString(void 0,this._profileDateTimeLocaleOptions())},formatCreditsLogTime:function(e){if(!e)return"";if("string"===typeof e){var t=e.trim();if(t.endsWith("Z")&&t.includes("T"))return t.replace("T"," ").replace("Z","")}return this.formatTime(e)},loadCreditsLog:function(){var e=this;return(0,s.A)((0,o.A)().m(function t(){var a;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return e.creditsLogLoading=!0,t.p=1,t.n=2,(0,c.v9)({page:e.creditsLogPagination.current,page_size:e.creditsLogPagination.pageSize});case 2:a=t.v,1===a.code&&(e.creditsLog=a.data.items||[],e.creditsLogPagination.total=a.data.total||0),t.n=4;break;case 3:t.p=3,t.v,e.$message.error("Failed to load credits log");case 4:return t.p=4,e.creditsLogLoading=!1,t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}))()},handleCreditsLogChange:function(e){this.creditsLogPagination.current=e.current,this.loadCreditsLog()},loadReferrals:function(){var e=this;return(0,s.A)((0,o.A)().m(function t(){var a;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return e.referralLoading=!0,t.p=1,t.n=2,(0,c.rx)({page:e.referralPagination.current,page_size:e.referralPagination.pageSize});case 2:a=t.v,1===a.code&&(e.referralData={list:a.data.list||[],total:a.data.total||0,referral_code:a.data.referral_code||"",referral_bonus:a.data.referral_bonus||0,register_bonus:a.data.register_bonus||0},e.referralPagination.total=a.data.total||0),t.n=4;break;case 3:t.p=3,t.v,e.$message.error("Failed to load referral data");case 4:return t.p=4,e.referralLoading=!1,t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}))()},handleReferralChange:function(e){this.referralPagination.current=e.current,this.loadReferrals()},copyReferralLink:function(){var e=this,t=this.referralLink;navigator.clipboard?navigator.clipboard.writeText(t).then(function(){e.$message.success(e.$t("profile.referral.linkCopied")||"邀请链接已复制")}).catch(function(){e.fallbackCopy(t)}):this.fallbackCopy(t)},fallbackCopy:function(e){var t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select();try{document.execCommand("copy"),this.$message.success(this.$t("profile.referral.linkCopied")||"邀请链接已复制")}catch(a){this.$message.error("Copy failed")}document.body.removeChild(t)},getActionColor:function(e){var t={consume:"red",recharge:"green",admin_adjust:"blue",refund:"orange",vip_grant:"gold",vip_revoke:"default",register_bonus:"cyan",referral_bonus:"purple",indicator_purchase:"volcano",indicator_sale:"lime"};return t[e]||"default"},getActionLabel:function(e){var t={consume:this.$t("profile.creditsLog.actionConsume")||"消费",recharge:this.$t("profile.creditsLog.actionRecharge")||"充值",admin_adjust:this.$t("profile.creditsLog.actionAdjust")||"调整",refund:this.$t("profile.creditsLog.actionRefund")||"退款",vip_grant:this.$t("profile.creditsLog.actionVipGrant")||"VIP授予",vip_revoke:this.$t("profile.creditsLog.actionVipRevoke")||"VIP取消",register_bonus:this.$t("profile.creditsLog.actionRegisterBonus")||"注册奖励",referral_bonus:this.$t("profile.creditsLog.actionReferralBonus")||"邀请奖励",indicator_purchase:this.$t("profile.creditsLog.actionIndicatorPurchase")||"购买指标",indicator_sale:this.$t("profile.creditsLog.actionIndicatorSale")||"出售指标"};return t[e]||e},loadExchangeCredentials:function(){var e=this;return(0,s.A)((0,o.A)().m(function t(){var a;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return e.exchangeLoading=!0,t.p=1,t.n=2,(0,d.IA)();case 2:a=t.v,1===a.code&&a.data&&(e.exchangeCredentials=a.data.items||[]),t.n=4;break;case 3:t.p=3,t.v,e.$message.error("Failed to load exchange accounts");case 4:return t.p=4,e.exchangeLoading=!1,t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}))()},getExchangeSelectPopupContainer:function(){return document.body},openAddExchangeModal:function(){this.showAddExchangeModal=!0},openExchangeSignupModal:function(){this.showExchangeSignupModal=!0},openExternalLink:function(e){e&&window.open(e,"_blank")},openExchangeSignupLink:function(e){this.openExternalLink(e)},openSelectedExchangeApiDoc:function(){this.openExternalLink(this.selectedExchangeApiDocUrl)},fetchEgressIp:function(){var e=this;return(0,s.A)((0,o.A)().m(function t(){var a,i,r,n;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return e.egressIpLoading=!0,e.egressServerIpv4="",e.egressServerIpv6="",t.p=1,t.n=2,(0,d.N6)();case 2:a=t.v,1===a.code&&a.data&&(i=null!=a.data.ipv4?String(a.data.ipv4).trim():"",r=null!=a.data.ipv6?String(a.data.ipv6).trim():"",e.egressServerIpv4=i,e.egressServerIpv6=r,i||r||!a.data.ip||(n=String(a.data.ip).trim(),n.includes(":")?e.egressServerIpv6=n:e.egressServerIpv4=n)),t.n=4;break;case 3:t.p=3,t.v,e.egressServerIpv4="",e.egressServerIpv6="";case 4:return t.p=4,e.egressIpLoading=!1,t.f(4);case 5:return t.a(2)}},t,null,[[1,3,4,5]])}))()},copyEgressIp:function(e){var t=this,a="v6"===e?this.egressServerIpv6:this.egressServerIpv4;if(a){var i=function(){return t.$message.success(t.$t("profile.exchange.whitelistIpCopied"))};navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(a).then(i).catch(function(){return t._fallbackCopyText(a,i)}):this._fallbackCopyText(a,i)}},_fallbackCopyText:function(e,t){try{var a=document.createElement("textarea");a.value=e,a.style.position="fixed",a.style.left="-9999px",document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a),t&&t()}catch(i){this.$message.error(this.$t("profile.exchange.whitelistIpCopyFail"))}},handleExchangeTypeChange:function(e){this.selectedExchangeId=e,this.exchangeTestResult=null;var t=this.cryptoExchangeList.map(function(e){return e.id});t.includes(e)?this.addExchangeType="crypto":this.addExchangeType="ibkr"===e?"ibkr":"mt5"===e?"mt5":""},getExchangeDisplayName:function(e){var t={binance:"Binance",okx:"OKX",bitget:"Bitget",bybit:"Bybit",coinbaseexchange:"Coinbase",kraken:"Kraken",kucoin:"KuCoin",gate:"Gate.io",bitfinex:"Bitfinex",deepcoin:"Deepcoin",htx:"HTX",ibkr:"IBKR",mt5:"MetaTrader 5"};return t[e]||e},handleSaveExchange:function(){var e=this;this.exchangeForm.validateFields(function(){var t=(0,s.A)((0,o.A)().m(function t(a,i){var r,s,c;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(!a){t.n=1;break}return t.a(2);case 1:return e.savingExchange=!0,t.p=2,r=(0,n.A)({},i),t.n=3,(0,d.PR)(r);case 3:s=t.v,1===s.code?(e.$message.success(e.$t("profile.exchange.saveSuccess")),e.showAddExchangeModal=!1,e.exchangeForm.resetFields(),e.addExchangeType="",e.selectedExchangeId="",e.exchangeTestResult=null,e.loadExchangeCredentials()):e.$message.error(s.msg||e.$t("profile.exchange.saveFailed")),t.n=5;break;case 4:t.p=4,c=t.v,e.$message.error(c.message||e.$t("profile.exchange.saveFailed"));case 5:return t.p=5,e.savingExchange=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}));return function(e,a){return t.apply(this,arguments)}}())},handleDeleteCredential:function(e){var t=this;return(0,s.A)((0,o.A)().m(function a(){var i;return(0,o.A)().w(function(a){while(1)switch(a.p=a.n){case 0:return a.p=0,a.n=1,(0,d.kI)(e);case 1:i=a.v,1===i.code?(t.$message.success(t.$t("profile.exchange.deleteSuccess")),t.loadExchangeCredentials()):t.$message.error(i.msg||"Delete failed"),a.n=3;break;case 2:a.p=2,a.v,t.$message.error("Delete failed");case 3:return a.a(2)}},a,null,[[0,2]])}))()},handleTestExchangeConnection:function(){var e=this;return(0,s.A)((0,o.A)().m(function t(){var a,i,r,s,c;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(a=e.exchangeForm.getFieldsValue(),i=a.exchange_id,i){t.n=1;break}return t.a(2);case 1:return e.testingExchange=!0,e.exchangeTestResult=null,t.p=2,r=(0,n.A)({},a),t.n=3,(0,p.kv)(r);case 3:s=t.v,1===s.code?e.exchangeTestResult={success:!0,message:e.$t("profile.exchange.testSuccess")}:e.exchangeTestResult={success:!1,message:"".concat(e.$t("profile.exchange.testFailed"),": ").concat(s.msg||"Unknown error")},t.n=5;break;case 4:t.p=4,c=t.v,e.exchangeTestResult={success:!1,message:"".concat(e.$t("profile.exchange.testFailed"),": ").concat(c.message||"Network error")};case 5:return t.p=5,e.testingExchange=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}))()},loadNotificationSettings:function(){var e=this;return(0,s.A)((0,o.A)().m(function t(){var a;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:return t.p=0,t.n=1,(0,c.vF)();case 1:a=t.v,1===a.code&&a.data&&(e.notificationSettings={default_channels:a.data.default_channels||["browser"],telegram_bot_token:a.data.telegram_bot_token||"",telegram_chat_id:a.data.telegram_chat_id||"",email:a.data.email||e.profile.email||"",phone:a.data.phone||"",discord_webhook:a.data.discord_webhook||"",webhook_url:a.data.webhook_url||"",webhook_token:a.data.webhook_token||""},e.$nextTick(function(){e.notificationForm.setFieldsValue({default_channels:e.notificationSettings.default_channels,telegram_bot_token:e.notificationSettings.telegram_bot_token,telegram_chat_id:e.notificationSettings.telegram_chat_id,email:e.notificationSettings.email,phone:e.notificationSettings.phone,discord_webhook:e.notificationSettings.discord_webhook,webhook_url:e.notificationSettings.webhook_url,webhook_token:e.notificationSettings.webhook_token})})),t.n=3;break;case 2:t.p=2,t.v;case 3:return t.a(2)}},t,null,[[0,2]])}))()},_mapNotifyTestError:function(e,t){var a=(t||"").trim();if("email"===e){if("missing_SMTP_HOST"===a)return this.$t("profile.notifications.errSmtpHost")||"email:服务器未配置发信 SMTP(管理员在「系统设置 → 邮件」或环境变量 SMTP_HOST/SMTP_USER 等)";if("missing_SMTP_FROM"===a)return this.$t("profile.notifications.errSmtpFrom")||"email:未配置发件人 SMTP_FROM(或 SMTP_USER)";if("missing_email_target"===a)return this.$t("profile.notifications.errEmailTarget")||"email:未填写通知邮箱且账号无邮箱"}return a?"".concat(e,": ").concat(a):""},handleSaveNotifications:function(){var e=this;this.notificationForm.validateFields(function(){var t=(0,s.A)((0,o.A)().m(function t(a,i){var r;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(!a){t.n=1;break}return t.a(2);case 1:return e.savingNotifications=!0,t.p=2,t.n=3,(0,c.Gl)({default_channels:i.default_channels||["browser"],telegram_bot_token:i.telegram_bot_token||"",telegram_chat_id:i.telegram_chat_id||"",email:i.email||"",phone:i.phone||"",discord_webhook:i.discord_webhook||"",webhook_url:i.webhook_url||"",webhook_token:i.webhook_token||""});case 3:r=t.v,1===r.code?(e.$message.success(e.$t("profile.notifications.saveSuccess")||"通知设置保存成功"),e.notificationSettings=r.data||e.notificationSettings):e.$message.error(r.msg||"保存失败"),t.n=5;break;case 4:t.p=4,t.v,e.$message.error("保存失败");case 5:return t.p=5,e.savingNotifications=!1,t.f(5);case 6:return t.a(2)}},t,null,[[2,4,5,6]])}));return function(e,a){return t.apply(this,arguments)}}())},handleTestNotification:function(){var e=this;return(0,s.A)((0,o.A)().m(function t(){var a,i,r,n,s,l,d;return(0,o.A)().w(function(t){while(1)switch(t.p=t.n){case 0:if(a=e.notificationForm.getFieldsValue(),i=a.default_channels||[],0!==i.length){t.n=1;break}return e.$message.warning(e.$t("profile.notifications.selectChannel")||"请至少选择一个通知渠道"),t.a(2);case 1:if(!i.includes("telegram")){t.n=3;break}if(a.telegram_bot_token){t.n=2;break}return e.$message.warning(e.$t("profile.notifications.fillTelegramToken")||"请填写 Telegram Bot Token"),t.a(2);case 2:if(a.telegram_chat_id){t.n=3;break}return e.$message.warning(e.$t("profile.notifications.fillTelegram")||"请填写 Telegram Chat ID"),t.a(2);case 3:if(!i.includes("email")||a.email){t.n=4;break}return e.$message.warning(e.$t("profile.notifications.fillEmail")||"请填写通知邮箱"),t.a(2);case 4:if(!i.includes("phone")||a.phone){t.n=5;break}return e.$message.warning(e.$t("profile.notifications.fillPhone")||"请填写手机号"),t.a(2);case 5:if(!i.includes("discord")||a.discord_webhook){t.n=6;break}return e.$message.warning(e.$t("profile.notifications.fillDiscord")||"请填写 Discord Webhook URL"),t.a(2);case 6:if(!i.includes("webhook")||a.webhook_url){t.n=7;break}return e.$message.warning(e.$t("profile.notifications.fillWebhook")||"请填写 Webhook URL"),t.a(2);case 7:return e.testingNotification=!0,t.p=8,t.n=9,(0,c.Gl)({default_channels:i,telegram_bot_token:a.telegram_bot_token||"",telegram_chat_id:a.telegram_chat_id||"",email:a.email||"",phone:a.phone||"",discord_webhook:a.discord_webhook||"",webhook_url:a.webhook_url||"",webhook_token:a.webhook_token||""});case 9:if(r=t.v,1===r.code){t.n=10;break}return e.$message.error(r.msg||"保存设置失败"),t.a(2);case 10:return t.n=11,(0,c.hl)();case 11:if(n=t.v,1===n.code){t.n=12;break}return e.$message.error(n.msg||e.$t("profile.notifications.testFailed")||"测试通知发送失败"),t.a(2);case 12:s=n.data&&n.data.results||{},l=Object.keys(s).filter(function(e){return!s[e].ok}),0===l.length?e.$message.success(e.$t("profile.notifications.testSent")||"测试通知已发送,请检查各渠道"):(d=l.map(function(t){var a=s[t]&&s[t].error||"",i=e._mapNotifyTestError(t,a);return i||(a?"".concat(t,": ").concat(a):t)}).join(";"),e.$message.warning((e.$t("profile.notifications.testPartial")||"部分渠道发送失败")+" — ".concat(d),8)),t.n=14;break;case 13:t.p=13,t.v,e.$message.error(e.$t("profile.notifications.testFailed")||"发送测试通知失败");case 14:return t.p=14,e.testingNotification=!1,t.f(14);case 15:return t.a(2)}},t,null,[[8,13,14,15]])}))()}}},g=f,h=a(845),m=(0,h.A)(g,i,r,!1,null,"06c79ed5",null),v=m.exports},42430:function(e,t,a){a.d(t,{IA:function(){return o},N6:function(){return l},PR:function(){return s},kI:function(){return c}});var i=a(76338),r=a(75769),n={list:"/api/credentials/list",get:"/api/credentials/get",create:"/api/credentials/create",delete:"/api/credentials/delete",egressIp:"/api/credentials/egress-ip"};function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,r.Ay)({url:n.list,method:"get",params:e})}function s(e){return(0,r.Ay)({url:n.create,method:"post",data:e})}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,r.Ay)({url:n.delete,method:"delete",params:(0,i.A)({id:e},t)})}function l(){return(0,r.Ay)({url:n.egressIp,method:"get"})}},53003:function(e,t,a){a.d(t,{DZ:function(){return o},YT:function(){return n},_d:function(){return s},lo:function(){return r}});a(76338);var i=a(75769);function r(){return(0,i.Ay)({url:"/api/settings/schema",method:"get"})}function n(){return(0,i.Ay)({url:"/api/settings/values",method:"get"})}function o(e){return(0,i.Ay)({url:"/api/settings/save",method:"post",data:e})}function s(){return(0,i.Ay)({url:"/api/settings/openrouter-balance",method:"get"})}},84841:function(e,t,a){a.d(t,{DK:function(){return w},E$:function(){return d},Gl:function(){return f},O0:function(){return l},TK:function(){return o},aU:function(){return r},cw:function(){return c},d$:function(){return x},hG:function(){return s},hl:function(){return g},kg:function(){return n},nY:function(){return _},r7:function(){return p},rx:function(){return m},v9:function(){return h},vF:function(){return u},vi:function(){return b},wq:function(){return v}});var i=a(75769);function r(e){return(0,i.Ay)({url:"/api/users/list",method:"get",params:e})}function n(e){return(0,i.Ay)({url:"/api/users/create",method:"post",data:e})}function o(e,t){return(0,i.Ay)({url:"/api/users/update",method:"put",params:{id:e},data:t})}function s(e){return(0,i.Ay)({url:"/api/users/delete",method:"delete",params:{id:e}})}function c(e){return(0,i.Ay)({url:"/api/users/reset-password",method:"post",data:e})}function l(){return(0,i.Ay)({url:"/api/users/roles",method:"get"})}function d(){return(0,i.Ay)({url:"/api/users/profile",method:"get"})}function p(e){return(0,i.Ay)({url:"/api/users/profile/update",method:"put",data:e})}function u(){return(0,i.Ay)({url:"/api/users/notification-settings",method:"get"})}function f(e){return(0,i.Ay)({url:"/api/users/notification-settings",method:"put",data:e})}function g(){return(0,i.Ay)({url:"/api/users/notification-settings/test",method:"post",data:{}})}function h(e){return(0,i.Ay)({url:"/api/users/my-credits-log",method:"get",params:e})}function m(e){return(0,i.Ay)({url:"/api/users/my-referrals",method:"get",params:e})}function v(e){return(0,i.Ay)({url:"/api/users/set-credits",method:"post",data:e})}function _(e){return(0,i.Ay)({url:"/api/users/set-vip",method:"post",data:e})}function w(e){return(0,i.Ay)({url:"/api/users/system-strategies",method:"get",params:e})}function b(e){return(0,i.Ay)({url:"/api/users/admin-orders",method:"get",params:e})}function x(e){return(0,i.Ay)({url:"/api/users/admin-ai-stats",method:"get",params:e})}}}]); \ No newline at end of file diff --git a/frontend/dist/js/app-legacy.5c46ff8f.js b/frontend/dist/js/app-legacy.5c46ff8f.js deleted file mode 100644 index ede461b..0000000 --- a/frontend/dist/js/app-legacy.5c46ff8f.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var e={35358:function(e,t,a){var i={"./af":25177,"./af.js":25177,"./ar":61509,"./ar-dz":41488,"./ar-dz.js":41488,"./ar-kw":58676,"./ar-kw.js":58676,"./ar-ly":42353,"./ar-ly.js":42353,"./ar-ma":24496,"./ar-ma.js":24496,"./ar-ps":6947,"./ar-ps.js":6947,"./ar-sa":82682,"./ar-sa.js":82682,"./ar-tn":89756,"./ar-tn.js":89756,"./ar.js":61509,"./az":95533,"./az.js":95533,"./be":28959,"./be.js":28959,"./bg":47777,"./bg.js":47777,"./bm":54903,"./bm.js":54903,"./bn":61290,"./bn-bd":17357,"./bn-bd.js":17357,"./bn.js":61290,"./bo":31545,"./bo.js":31545,"./br":11470,"./br.js":11470,"./bs":44429,"./bs.js":44429,"./ca":7306,"./ca.js":7306,"./cs":56464,"./cs.js":56464,"./cv":73635,"./cv.js":73635,"./cy":64226,"./cy.js":64226,"./da":93601,"./da.js":93601,"./de":77853,"./de-at":26111,"./de-at.js":26111,"./de-ch":54697,"./de-ch.js":54697,"./de.js":77853,"./dv":60708,"./dv.js":60708,"./el":54691,"./el.js":54691,"./en-au":53872,"./en-au.js":53872,"./en-ca":28298,"./en-ca.js":28298,"./en-gb":56195,"./en-gb.js":56195,"./en-ie":66584,"./en-ie.js":66584,"./en-il":65543,"./en-il.js":65543,"./en-in":9033,"./en-in.js":9033,"./en-nz":79402,"./en-nz.js":79402,"./en-sg":43004,"./en-sg.js":43004,"./eo":32934,"./eo.js":32934,"./es":97650,"./es-do":20838,"./es-do.js":20838,"./es-mx":17730,"./es-mx.js":17730,"./es-us":56575,"./es-us.js":56575,"./es.js":97650,"./et":3035,"./et.js":3035,"./eu":3508,"./eu.js":3508,"./fa":119,"./fa.js":119,"./fi":90527,"./fi.js":90527,"./fil":95995,"./fil.js":95995,"./fo":52477,"./fo.js":52477,"./fr":85498,"./fr-ca":26435,"./fr-ca.js":26435,"./fr-ch":37892,"./fr-ch.js":37892,"./fr.js":85498,"./fy":37071,"./fy.js":37071,"./ga":41734,"./ga.js":41734,"./gd":70217,"./gd.js":70217,"./gl":77329,"./gl.js":77329,"./gom-deva":32124,"./gom-deva.js":32124,"./gom-latn":93383,"./gom-latn.js":93383,"./gu":95050,"./gu.js":95050,"./he":11713,"./he.js":11713,"./hi":43861,"./hi.js":43861,"./hr":26308,"./hr.js":26308,"./hu":90609,"./hu.js":90609,"./hy-am":17160,"./hy-am.js":17160,"./id":74063,"./id.js":74063,"./is":89374,"./is.js":89374,"./it":88383,"./it-ch":21827,"./it-ch.js":21827,"./it.js":88383,"./ja":23827,"./ja.js":23827,"./jv":89722,"./jv.js":89722,"./ka":41794,"./ka.js":41794,"./kk":27088,"./kk.js":27088,"./km":96870,"./km.js":96870,"./kn":84451,"./kn.js":84451,"./ko":63164,"./ko.js":63164,"./ku":98174,"./ku-kmr":6181,"./ku-kmr.js":6181,"./ku.js":98174,"./ky":78474,"./ky.js":78474,"./lb":79680,"./lb.js":79680,"./lo":15867,"./lo.js":15867,"./lt":45766,"./lt.js":45766,"./lv":69532,"./lv.js":69532,"./me":58076,"./me.js":58076,"./mi":41848,"./mi.js":41848,"./mk":30306,"./mk.js":30306,"./ml":73739,"./ml.js":73739,"./mn":99053,"./mn.js":99053,"./mr":86169,"./mr.js":86169,"./ms":73386,"./ms-my":92297,"./ms-my.js":92297,"./ms.js":73386,"./mt":77075,"./mt.js":77075,"./my":72264,"./my.js":72264,"./nb":22274,"./nb.js":22274,"./ne":8235,"./ne.js":8235,"./nl":92572,"./nl-be":43784,"./nl-be.js":43784,"./nl.js":92572,"./nn":54566,"./nn.js":54566,"./oc-lnc":69330,"./oc-lnc.js":69330,"./pa-in":29849,"./pa-in.js":29849,"./pl":94418,"./pl.js":94418,"./pt":79834,"./pt-br":48303,"./pt-br.js":48303,"./pt.js":79834,"./ro":24457,"./ro.js":24457,"./ru":82271,"./ru.js":82271,"./sd":1221,"./sd.js":1221,"./se":33478,"./se.js":33478,"./si":17538,"./si.js":17538,"./sk":5784,"./sk.js":5784,"./sl":46637,"./sl.js":46637,"./sq":86794,"./sq.js":86794,"./sr":45719,"./sr-cyrl":3322,"./sr-cyrl.js":3322,"./sr.js":45719,"./ss":56e3,"./ss.js":56e3,"./sv":41011,"./sv.js":41011,"./sw":40748,"./sw.js":40748,"./ta":11025,"./ta.js":11025,"./te":11885,"./te.js":11885,"./tet":28861,"./tet.js":28861,"./tg":86571,"./tg.js":86571,"./th":55802,"./th.js":55802,"./tk":59527,"./tk.js":59527,"./tl-ph":29231,"./tl-ph.js":29231,"./tlh":31052,"./tlh.js":31052,"./tr":85096,"./tr.js":85096,"./tzl":79846,"./tzl.js":79846,"./tzm":81765,"./tzm-latn":97711,"./tzm-latn.js":97711,"./tzm.js":81765,"./ug-cn":48414,"./ug-cn.js":48414,"./uk":16618,"./uk.js":16618,"./ur":57777,"./ur.js":57777,"./uz":57609,"./uz-latn":72475,"./uz-latn.js":72475,"./uz.js":57609,"./vi":21135,"./vi.js":21135,"./x-pseudo":64051,"./x-pseudo.js":64051,"./yo":82218,"./yo.js":82218,"./zh-cn":52648,"./zh-cn.js":52648,"./zh-hk":1632,"./zh-hk.js":1632,"./zh-mo":31541,"./zh-mo.js":31541,"./zh-tw":50304,"./zh-tw.js":50304};function s(e){var t=n(e);return a(t)}function n(e){if(!a.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}s.keys=function(){return Object.keys(i)},s.resolve=n,e.exports=s,s.id=35358},505:function(e,t,a){"use strict";a.d(t,{iD:function(){return n},ri:function(){return l},ug:function(){return o}});var i=a(75769),s={Login:"/api/auth/login",Logout:"/api/auth/logout",UserInfo:"/api/auth/info",UserMenu:"/user/nav"};function n(e){return(0,i.Ay)({url:s.Login,method:"post",data:e})}function r(){return(0,i.Ay)({url:s.UserInfo,method:"get",headers:{"Content-Type":"application/json;charset=UTF-8"}})}function o(){return r()}function l(){return(0,i.Ay)({url:s.Logout,method:"post",headers:{"Content-Type":"application/json;charset=UTF-8"}})}},36911:function(e,t,a){"use strict";a.d(t,{EM:function(){return r},GF:function(){return p},KP:function(){return v},Ke:function(){return c},Ox:function(){return l},P7:function(){return d},UH:function(){return g},WM:function(){return o},YX:function(){return S},Yx:function(){return A},kv:function(){return f},mV:function(){return u},oK:function(){return b},tq:function(){return y},ul:function(){return k},v_:function(){return m},xQ:function(){return h}});var i=a(76338),s=a(75769),n={strategies:"/api/strategies",strategyDetail:"/api/strategies/detail",createStrategy:"/api/strategies/create",batchCreateStrategies:"/api/strategies/batch-create",updateStrategy:"/api/strategies/update",stopStrategy:"/api/strategies/stop",startStrategy:"/api/strategies/start",deleteStrategy:"/api/strategies/delete",batchStartStrategies:"/api/strategies/batch-start",batchStopStrategies:"/api/strategies/batch-stop",batchDeleteStrategies:"/api/strategies/batch-delete",testConnection:"/api/strategies/test-connection",trades:"/api/strategies/trades",positions:"/api/strategies/positions",equityCurve:"/api/strategies/equityCurve",notifications:"/api/strategies/notifications",unreadNotificationCount:"/api/strategies/notifications/unread-count",verifyCode:"/api/strategies/verify-code",aiGenerate:"/api/strategies/ai-generate",performance:"/api/strategies/performance",logs:"/api/strategies/logs",backtest:"/api/strategies/backtest",backtestHistory:"/api/strategies/backtest/history",backtestGet:"/api/strategies/backtest/get"};function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,s.Ay)({url:n.strategies,method:"get",params:e})}function o(e){return(0,s.Ay)({url:n.createStrategy,method:"post",data:e})}function l(e){return(0,s.Ay)({url:n.batchCreateStrategies,method:"post",data:e})}function d(e,t){return(0,s.Ay)({url:n.updateStrategy,method:"put",params:{id:e},data:t})}function c(e){return(0,s.Ay)({url:n.stopStrategy,method:"post",params:{id:e}})}function u(e){return(0,s.Ay)({url:n.startStrategy,method:"post",params:{id:e}})}function m(e){return(0,s.Ay)({url:n.deleteStrategy,method:"delete",params:{id:e}})}function g(e){return(0,s.Ay)({url:n.batchStartStrategies,method:"post",data:e})}function p(e){return(0,s.Ay)({url:n.batchStopStrategies,method:"post",data:e})}function h(e){return(0,s.Ay)({url:n.batchDeleteStrategies,method:"delete",data:e})}function f(e){return(0,s.Ay)({url:n.testConnection,method:"post",data:{exchange_config:e}})}function y(e){return(0,s.Ay)({url:n.trades,method:"get",params:{id:e}})}function b(e){return(0,s.Ay)({url:n.positions,method:"get",params:{id:e}})}function A(e){return(0,s.Ay)({url:n.equityCurve,method:"get",params:{id:e}})}function v(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,s.Ay)({url:n.notifications,method:"get",params:e})}function k(){return(0,s.Ay)({url:n.unreadNotificationCount,method:"get"})}function S(e){var t=(0,i.A)({},e||{}),a=t.timeout;return delete t.timeout,(0,s.Ay)({url:n.backtest,method:"post",data:t,timeout:a})}},45958:function(e,t,a){"use strict";var i=a(76338),s=a(1512),n=a(3508),r=a.n(n),o={antLocale:s.A,momentName:"eu",momentLocale:r()},l={"common.confirm":"Confirm","common.cancel":"Cancel","common.save":"Save","common.delete":"Delete","common.edit":"Edit","common.add":"Add","common.close":"Close","common.done":"Done","common.ok":"OK","common.loading":"Loading...","common.noData":"No data","common.yes":"Yes","common.no":"No",submit:"Submit",save:"Save","submit.ok":"Submit successfully","save.ok":"Saved successfully","menu.welcome":"Welcome","menu.home":"Home","menu.dashboard":"Dashboard","menu.dashboard.analysis":"AI Analysis","menu.dashboard.aiAssetAnalysis":"AI Asset Analysis","menu.dashboard.aiQuant":"AI Quant","menu.dashboard.indicator":"Indicator Analysis","menu.dashboard.community":"Indicator Market","menu.dashboard.tradingAssistant":"Strategy & Live","menu.dashboard.backtestCenter":"Backtest Center","menu.dashboard.portfolio":"Portfolio","menu.dashboard.globalMarket":"Global Market","menu.dashboard.polymarket":"Prediction Markets","menu.settings":"Settings","menu.dashboard.aiTradingAssistant":"AI Trading Assistant","menu.dashboard.signalRobot":"Signal Robot","menu.dashboard.monitor":"Monitor","menu.dashboard.workplace":"Workplace","aiAssetAnalysis.title":"AI Asset Analysis","aiAssetAnalysis.subtitle":"Unify portfolio monitoring, instant analysis, and scheduled tasks into one smooth workflow.","aiAssetAnalysis.actions.quickAnalysis":"Start Analysis Now","aiAssetAnalysis.actions.monitorTasks":"Manage Monitor Tasks","aiAssetAnalysis.actions.openStandalone":"Open Standalone Page","aiAssetAnalysis.quickBar.title":"Quick Analyze","aiAssetAnalysis.quickBar.placeholder":"Select a symbol from asset pool","aiAssetAnalysis.quickBar.useInQuick":"Use in Instant Analysis","aiAssetAnalysis.quickBar.runNow":"Analyze Now","aiAssetAnalysis.history.title":"Recent Analysis","aiAssetAnalysis.history.empty":"No analysis history yet","aiAssetAnalysis.actions.enterQuick":"Go to Instant Analysis","aiAssetAnalysis.actions.enterMonitor":"Go to Asset Pool & Tasks","aiAssetAnalysis.flow.poolTitle":"Build Asset Pool","aiAssetAnalysis.flow.poolDesc":"Add positions and watch targets first to build one unified analysis pool.","aiAssetAnalysis.flow.poolAction":"Manage Asset Pool","aiAssetAnalysis.flow.quickTitle":"Instant Analysis","aiAssetAnalysis.flow.quickDesc":"Run AI analysis for any symbol in one click and get suggestions quickly.","aiAssetAnalysis.flow.quickAction":"Run Analysis","aiAssetAnalysis.flow.autoTitle":"Scheduled Monitoring","aiAssetAnalysis.flow.autoDesc":"Set recurring AI analysis tasks and deliver reports through notification channels.","aiAssetAnalysis.flow.autoAction":"Configure Tasks","aiAssetAnalysis.tabs.quick":"Instant Analysis","aiAssetAnalysis.tabs.monitor":"Asset Pool & Scheduled Tasks","aiAssetAnalysis.position.quickAdd":"Quick Position","aiAssetAnalysis.position.needFirst":"Please add a position first before creating a scheduled AI task","aiAssetAnalysis.monitor.quickTask":"Create AI Scheduled Task","aiAssetAnalysis.monitor.interval":"Run Interval (minutes)","aiAssetAnalysis.monitor.tip":"A scheduled AI monitor will be created for current positions of this symbol.","aiAssetAnalysis.monitor.created":"AI scheduled task created","aiAssetAnalysis.monitor.running":"Running","aiAssetAnalysis.monitor.paused":"Paused","aiAssetAnalysis.monitor.toggle":"Toggle Task","aiAssetAnalysis.monitor.nextRun":"Next Run","aiAssetAnalysis.monitor.enabled":"Task enabled","aiAssetAnalysis.monitor.disabled":"Task paused","aiAssetAnalysis.tasks.manage":"Task Manager","aiAssetAnalysis.tasks.empty":"No scheduled tasks yet","aiAssetAnalysis.tasks.pause":"Pause","aiAssetAnalysis.tasks.resume":"Resume","aiAssetAnalysis.tasks.edit":"Edit Task","aiAssetAnalysis.tasks.delete":"Delete","aiAssetAnalysis.tasks.deleteConfirm":"Are you sure you want to delete this task? This action cannot be undone.","aiAssetAnalysis.tasks.deleted":"Task deleted","aiAssetAnalysis.tasks.paused":"Task paused","aiAssetAnalysis.tasks.resumed":"Task resumed","aiAssetAnalysis.tasks.name":"Task Name","aiAssetAnalysis.watchlist.summary":"Portfolio Summary","aiAssetAnalysis.watchlist.totalAssets":"Assets","aiAssetAnalysis.watchlist.totalPnl":"Total P&L","aiAssetAnalysis.watchlist.positionCount":"Positions","aiAssetAnalysis.watchlist.taskCount":"Tasks","aiAssetAnalysis.batch.selectAll":"Select All","aiAssetAnalysis.batch.deselectAll":"Deselect All","aiAssetAnalysis.batch.schedule":"Batch Schedule","aiAssetAnalysis.batch.scheduleTitle":"Create Batch Scheduled Analysis","aiAssetAnalysis.batch.scheduleDesc":"Will create scheduled AI analysis tasks for {count} selected symbols. Reports will be auto-generated and pushed on schedule.","aiAssetAnalysis.batch.intervalLabel":"Analysis Interval","aiAssetAnalysis.batch.interval1h":"Every 1 hour","aiAssetAnalysis.batch.interval4h":"Every 4 hours","aiAssetAnalysis.batch.interval12h":"Every 12 hours","aiAssetAnalysis.batch.interval24h":"Every 24 hours","aiAssetAnalysis.batch.notifyLabel":"Notification Channels (push after analysis)","aiAssetAnalysis.batch.scheduleTip":"Tasks start automatically once created. You can pause/resume them anytime from the watchlist.","aiAssetAnalysis.batch.done":"Batch scheduled tasks created","aiAssetAnalysis.placeholder.title":"AI Analysis Engine","aiAssetAnalysis.placeholder.subtitle":"Multi-source data driven · Institutional-grade insights · Real-time market pulse","aiAssetAnalysis.placeholder.feature1":"Multi-horizon Outlook","aiAssetAnalysis.placeholder.feature1Desc":"Blends 4 timeframe AI consensus","aiAssetAnalysis.placeholder.feature2":"Pro Indicator Matrix","aiAssetAnalysis.placeholder.feature2Desc":"Institutional-grade quant metrics","aiAssetAnalysis.placeholder.feature3":"Watchlist Synergy","aiAssetAnalysis.placeholder.feature3Desc":"1-click position & smart monitoring","aiAssetAnalysis.placeholder.quickStart":"Pick a symbol from the watchlist on the right, or quick-start below","fastAnalysis.multiPeriodTitle":"Multi-horizon Forecast","fastAnalysis.technicalIndicatorsTitle":"Pro Indicator Matrix","aiAssetAnalysis.tabLead.quick":"Best for ad-hoc decisions: select a symbol and analyze immediately.","aiAssetAnalysis.tabLead.monitor":"Best for continuous tracking: maintain positions and set monitor ranges/frequency.","aiAssetAnalysis.stats.totalAnalyses":"Total Analyses","aiAssetAnalysis.stats.accuracy":"Accuracy","aiAssetAnalysis.stats.avgReturn":"Avg Return","aiAssetAnalysis.stats.satisfaction":"Satisfaction","aiAssetAnalysis.stats.decisions":"Decision Dist.","aiAssetAnalysis.opportunities.title":"AI Opportunity Radar","aiAssetAnalysis.opportunities.empty":"No opportunities found","aiAssetAnalysis.opportunities.analyze":"Analyze","aiAssetAnalysis.opportunities.updateHint":"Updates hourly","aiAssetAnalysis.opportunities.signal.overbought":"Overbought","aiAssetAnalysis.opportunities.signal.oversold":"Oversold","aiAssetAnalysis.opportunities.signal.bullish_momentum":"Bullish","aiAssetAnalysis.opportunities.signal.bearish_momentum":"Bearish","aiAssetAnalysis.opportunities.market.Crypto":"🪙 Crypto","aiAssetAnalysis.opportunities.market.USStock":"📈 US Stock","aiAssetAnalysis.opportunities.market.Forex":"💱 Forex","aiAssetAnalysis.opportunities.market.PredictionMarket":"🎯 Prediction Market","aiAssetAnalysis.opportunities.reason.crypto.overbought":"24h +{change}%, 7d +{change7d}%, overbought risk","aiAssetAnalysis.opportunities.reason.crypto.bullish_momentum":"24h +{change}%, strong bullish momentum","aiAssetAnalysis.opportunities.reason.crypto.oversold":"24h -{change}%, possible oversold bounce","aiAssetAnalysis.opportunities.reason.crypto.bearish_momentum":"24h -{change}%, clear bearish trend","aiAssetAnalysis.opportunities.reason.usstock.overbought":"Day +{change}%, large gain, watch for pullback","aiAssetAnalysis.opportunities.reason.usstock.bullish_momentum":"Day +{change}%, strong bullish momentum","aiAssetAnalysis.opportunities.reason.usstock.oversold":"Day -{change}%, possible oversold bounce","aiAssetAnalysis.opportunities.reason.usstock.bearish_momentum":"Day -{change}%, clear bearish trend","aiAssetAnalysis.opportunities.reason.forex.overbought":"Day +{change}%, volatile, watch for reversal","aiAssetAnalysis.opportunities.reason.forex.bullish_momentum":"Day +{change}%, bullish momentum","aiAssetAnalysis.opportunities.reason.forex.oversold":"Day -{change}%, volatile, possible bounce","aiAssetAnalysis.opportunities.reason.forex.bearish_momentum":"Day -{change}%, clear bearish trend","aiAssetAnalysis.checkup.title":"Portfolio Checkup","aiAssetAnalysis.checkup.btn":"Checkup","aiAssetAnalysis.checkup.desc":"Run AI analysis on all positions in your portfolio to quickly understand the current status and get recommendations for each asset.","aiAssetAnalysis.checkup.start":"Start Checkup","aiAssetAnalysis.checkup.progress":"Analyzing {current}/{total}...","aiAssetAnalysis.checkup.noPositions":"No positions in your portfolio. Please add assets first.","aiAssetAnalysis.checkup.complete":"Checkup Complete","aiAssetAnalysis.checkup.failed":"Failed","aiAssetAnalysis.checkup.rerun":"Run Again","aiAssetAnalysis.search.hint":"Search","aiAssetAnalysis.search.placeholder":"Search any symbol... (Ctrl+K)","aiAssetAnalysis.search.noResults":"No results found. Try a different keyword.","menu.form":"Form","menu.form.basic-form":"Basic Form","menu.form.step-form":"Step Form","menu.form.step-form.info":"Step Form(write transfer information)","menu.form.step-form.confirm":"Step Form(confirm transfer information)","menu.form.step-form.result":"Step Form(finished)","menu.form.advanced-form":"Advanced Form","menu.list":"List","menu.list.table-list":"Search Table","menu.list.basic-list":"Basic List","menu.list.card-list":"Card List","menu.list.search-list":"Search List","menu.list.search-list.articles":"Search List(articles)","menu.list.search-list.projects":"Search List(projects)","menu.list.search-list.applications":"Search List(applications)","menu.profile":"Profile","menu.profile.basic":"Basic Profile","menu.profile.advanced":"Advanced Profile","menu.result":"Result","menu.result.success":"Success","menu.result.fail":"Fail","menu.exception":"Exception","menu.exception.not-permission":"403","menu.exception.not-find":"404","menu.exception.server-error":"500","menu.exception.trigger":"Trigger","menu.account":"Account","menu.account.center":"Account Center","menu.account.settings":"Account Settings","menu.account.trigger":"Trigger Error","menu.account.logout":"Logout","menu.wallet":"My Wallet","menu.docs":"Documentation","menu.docs.detail":"Doc Detail","menu.header.refreshPage":"Refresh Page","menu.invite.friends":"Invite Friends","app.setting.pagestyle":"Page Style Setting","app.setting.pagestyle.light":"Light Menu Style","app.setting.pagestyle.dark":"Dark Menu Style","app.setting.pagestyle.realdark":"RealDark style","app.setting.themecolor":"Theme Color","app.setting.navigationmode":"Navigation Mode","app.setting.sidemenu.nav":"Sidebar Navigation","app.setting.topmenu.nav":"Top Navigation","app.setting.content-width":"Content Width","app.setting.content-width.tooltip":"This setting is only effective for [Top Navigation]","app.setting.content-width.fixed":"Fixed","app.setting.content-width.fluid":"Fluid","app.setting.fixedheader":"Fixed Header","app.setting.fixedheader.tooltip":"Configurable when Header is fixed","app.setting.autoHideHeader":"Hide Header on Scroll","app.setting.fixedsidebar":"Fixed Sidebar Menu","app.setting.sidemenu":"Side Menu Layout","app.setting.topmenu":"Top Menu Layout","app.setting.othersettings":"Other Settings","app.setting.weakmode":"Weak Mode","app.setting.multitab":"Multi-Tab Mode","app.setting.copy":"Copy Setting","app.setting.loading":"Loading theme","app.setting.copyinfo":"copy success,please replace defaultSettings in src/config/defaultSettings.js","app.setting.copy.success":"Copy Success","app.setting.copy.fail":"Copy Failed","app.setting.theme.switching":"Switching theme...","app.setting.production.hint":"Setting panel shows in development environment only, please manually modify","app.setting.themecolor.daybreak":"Daybreak Blue (Default)","app.setting.themecolor.dust":"Dust Red","app.setting.themecolor.volcano":"Volcano","app.setting.themecolor.sunset":"Sunset Orange","app.setting.themecolor.cyan":"Cyan","app.setting.themecolor.green":"Polar Green","app.setting.themecolor.geekblue":"Geek Blue","app.setting.themecolor.purple":"Golden Purple","app.setting.tooltip":"Page Settings","notice.title":"Notifications","notice.empty":"No notifications","notice.markAllRead":"Mark all as read","notice.clear":"Clear all","notice.close":"Close","notice.justNow":"Just now","notice.minutesAgo":"minutes ago","notice.hoursAgo":"hours ago","notice.daysAgo":"days ago","notice.detailInfo":"Details","notice.aiDecision":"AI Decision","notice.confidence":"Confidence","notice.reasoning":"Reasoning","notice.symbol":"Symbol","notice.currentPrice":"Current Price","notice.triggerPrice":"Trigger Price","notice.action":"Action","notice.quantity":"Quantity","notice.viewPortfolio":"View Portfolio","notice.type.aiMonitor":"AI Monitor","notice.type.priceAlert":"Price Alert","notice.type.signal":"Trade Signal","notice.type.buy":"Buy Signal","notice.type.sell":"Sell Signal","notice.type.hold":"Hold Suggestion","notice.type.trade":"Trade Execution","notice.type.notification":"Notification","user.login.userName":"userName","user.login.password":"password","user.login.username.placeholder":"Account: admin","user.login.password.placeholder":"password: admin or ant.design","user.login.message-invalid-credentials":"Login failed, please check your email and verification code","user.login.message-invalid-verification-code":"Invalid verification code","user.login.tab-login-credentials":"Credentials","user.login.tab-login-email":"Email","user.login.tab-login-mobile":"Mobile number","user.login.captcha.placeholder":"Please enter captcha","user.login.mobile.placeholder":"Mobile number","user.login.mobile.verification-code.placeholder":"Verification code","user.login.email.placeholder":"Please enter your email address","user.login.email.verification-code.placeholder":"Please enter verification code","user.login.email.sending":"Sending verification code...","user.login.email.send-success-title":"Notice","user.login.email.send-success":"Verification code sent successfully, please check your email","user.login.sms.send-success":"Verification code sent successfully, please check your SMS","user.login.remember-me":"Remember me","user.login.forgot-password":"Forgot your password?","user.login.sign-in-with":"Sign in with","user.login.signup":"Sign up","user.login.login":"Login","user.register.register":"Register","user.register.email.placeholder":"Email","user.register.password.placeholder":"Password ","user.register.password.popover-message":"Please enter at least 6 characters. Please do not use passwords that are easy to guess. ","user.register.confirm-password.placeholder":"Confirm password","user.register.get-verification-code":"Get code","user.register.sign-in":"Already have an account?","user.register-result.msg":"Account:registered at {email}","user.register-result.activation-email":"The activation email has been sent to your email address and is valid for 24 hours. Please log in to the email in time and click on the link in the email to activate the account.","user.register-result.back-home":"Back to home","user.register-result.view-mailbox":"View mailbox","user.email.required":"Please enter your email!","user.email.wrong-format":"The email address is in the wrong format!","user.userName.required":"Please enter account name or email address","user.password.required":"Please enter your password!","user.password.twice.msg":"The passwords entered twice do not match!","user.password.strength.msg":"The password is not strong enough","user.password.strength.strong":"Strength: strong","user.password.strength.medium":"Strength: medium","user.password.strength.low":"Strength: low","user.password.strength.short":"Strength: too short","user.confirm-password.required":"Please confirm your password!","user.phone-number.required":"Please enter your phone number!","user.phone-number.wrong-format":"Please enter a valid phone number","user.verification-code.required":"Please enter the verification code!","user.captcha.required":"Please enter captcha!","user.login.infos":"QuantDinger is an AI multi-agent stock analysis tool that does not have securities investment consulting qualifications. All analysis results, scores, and reference opinions on the platform are automatically generated by AI based on historical data, and are only for learning, research, and technical exchanges, and do not constitute any investment advice or decision-making basis. Stock investment involves market risk, liquidity risk, policy risk and other risks, which may lead to losses of principal. Users should make independent decisions based on their risk tolerance capacity, and bear the consequences of any investment behavior and its results using this tool. Market risk, investment needs to be cautious.","user.login.tab-login-web3":"Web3 Login","user.login.web3.tip":"Sign in with your wallet via signature","user.login.web3.connect":"Connect wallet and login","user.login.web3.no-wallet":"No wallet detected","user.login.web3.no-address":"Wallet address not found","user.login.web3.nonce-failed":"Failed to get nonce","user.login.web3.verify-failed":"Signature verification failed","user.login.web3.success":"Login success","user.login.web3.failed":"Wallet login failed","nav.no_wallet":"No wallet detected","nav.copy":"Copy","nav.copy_success":"Copied","user.login.oauth.google":"Sign in with Google","user.login.oauth.github":"Sign in with GitHub","user.login.oauth.loading":"Redirecting to authorization page...","user.login.oauth.failed":"OAuth login failed","user.login.oauth.get-url-failed":"Failed to get authorization URL","user.login.subtitle":"driven quantitative insights for global markets","user.login.legal.title":"Legal Disclaimer","user.login.legal.view":"View Legal Disclaimer","user.login.legal.collapse":"Hide Legal Disclaimer","user.login.legal.agree":"I have read and agree to the Legal Disclaimer","user.login.legal.required":"Please read and check the Legal Disclaimer first","user.login.legal.content":"QuantDinger is an AI multi-agent stock analysis tool and does not provide investment advice. All analysis results, scores, and references are generated by AI based on historical data and are for learning, research, and technical exchange only. They do not constitute investment advice or a basis for decision-making. Stock investments involve market, liquidity, and policy risks, which may lead to loss of principal. Users should make independent decisions based on their risk tolerance and bear the consequences of any investment behavior and results using this tool.","user.login.privacy.title":"Privacy Policy","user.login.privacy.view":"View Privacy Policy","user.login.privacy.collapse":"Hide Privacy Policy","user.login.privacy.content":"We value your privacy and data protection. (1) Scope of collection: We only collect information necessary to provide the service (e.g., email, mobile number, country code, Web3 wallet address) and limited logs/device data. (2) Purpose of use: Account login and security verification, feature provisioning, troubleshooting, and compliance requirements. (3) Storage & security: Data is encrypted and access-controlled to prevent unauthorized access, disclosure, or loss. (4) Sharing & third parties: We do not share personal data with third parties except as required by law or to deliver the service; where third-party services are involved (e.g., wallets, SMS providers), processing is limited to the minimum scope required. (5) Cookies/local storage: Used for session and login state (e.g., tokens, PHPSESSID). You may clear or restrict them in your browser. (6) Your rights: You may exercise rights of access, correction, deletion, and consent withdrawal as permitted by law. (7) Changes & notices: We will provide prominent notice for updates. Continued use indicates that you have read and agreed to the updated terms. If you do not agree, please stop using the service and contact us.","user.login.username":"Username","user.login.usernameRequired":"Please enter username","user.login.passwordRequired":"Please enter password","user.login.tab":"Login","user.login.submit":"Login","user.login.register":"Create Account","user.login.forgotPassword":"Forgot Password?","user.login.orLoginWith":"Or login with","user.login.methodPassword":"Password","user.login.methodCode":"Email Code","user.login.email":"Email","user.login.emailRequired":"Please enter email","user.login.emailInvalid":"Invalid email format","user.login.verificationCode":"Verification Code","user.login.codeRequired":"Please enter verification code","user.login.sendCode":"Send","user.login.codeSent":"Verification code sent","user.login.codeLoginHint":"New users will be auto-registered","user.login.welcomeNew":"Welcome!","user.login.accountCreated":"Your account has been created","user.oauth.processing":"Processing login...","user.oauth.error.missing_params":"Missing required parameters","user.oauth.error.invalid_state":"Invalid state parameter","user.oauth.error.user_creation_failed":"Failed to create user","user.oauth.error.server_error":"Server error","user.register.tab":"Register","user.register.title":"Create Account","user.register.email":"Email","user.register.emailRequired":"Please enter email","user.register.emailInvalid":"Invalid email format","user.register.verificationCode":"Verification Code","user.register.codeRequired":"Please enter verification code","user.register.sendCode":"Send Code","user.register.codeSent":"Verification code sent","user.register.username":"Username","user.register.usernameRequired":"Please enter username","user.register.usernameLength":"Username must be 3-30 characters","user.register.usernamePattern":"Start with letter, letters/numbers/underscore only","user.register.password":"Password","user.register.passwordRequired":"Please enter password","user.register.confirmPassword":"Confirm Password","user.register.confirmPasswordRequired":"Please confirm password","user.register.passwordMismatch":"Passwords do not match","user.register.submit":"Create Account","user.register.haveAccount":"Already have an account?","user.register.login":"Login","user.register.success":"Registration successful","user.register.pleaseLogin":"Please login with your new account","user.register.pwdMinLength":"At least 8 characters","user.register.pwdUppercase":"At least one uppercase letter","user.register.pwdLowercase":"At least one lowercase letter","user.register.pwdNumber":"At least one number","user.resetPassword.title":"Reset Password","user.resetPassword.email":"Email","user.resetPassword.emailRequired":"Please enter email","user.resetPassword.emailInvalid":"Invalid email format","user.resetPassword.verificationCode":"Verification Code","user.resetPassword.codeRequired":"Please enter verification code","user.resetPassword.sendCode":"Send Code","user.resetPassword.codeSent":"Verification code sent","user.resetPassword.next":"Next","user.resetPassword.backToLogin":"Back to Login","user.resetPassword.resettingFor":"Resetting password for","user.resetPassword.newPassword":"New Password","user.resetPassword.passwordRequired":"Please enter new password","user.resetPassword.confirmPassword":"Confirm New Password","user.resetPassword.confirmPasswordRequired":"Please confirm password","user.resetPassword.submit":"Reset Password","user.resetPassword.back":"Back","user.resetPassword.successTitle":"Password Reset Successful","user.resetPassword.successSubtitle":"You can now login with your new password","user.resetPassword.goToLogin":"Go to Login","user.security.retry":"Retry","profile.passwordHintNew":"For security, email verification is required to change password. Password must be at least 8 characters with uppercase, lowercase, and number.","profile.verificationCode":"Verification Code","profile.codeRequired":"Please enter verification code","profile.codePlaceholder":"Enter verification code","profile.sendCode":"Send Code","profile.codeSent":"Verification code sent","profile.codeWillSendTo":"Code will be sent to","profile.noEmailWarning":"Please set your email first in Basic Info tab","account.basicInfo":"Basic Information","account.id":"User ID","account.username":"Username","account.nickname":"Nickname","account.email":"Email","account.mobile":"Mobile","account.web3address":"Wallet Address","account.pid":"Referrer ID","account.level":"Level","account.money":"Balance","account.qdtBalance":"QDT Balance","account.score":"Score","account.createtime":"Registration Time","account.inviteLink":"Invite Link","account.recharge":"Recharge","account.rechargeTip":"Please scan the QR code below with WeChat or Alipay to recharge","account.qrCodePlaceholder":"QR Code Placeholder (Mock)","account.rechargeAmount":"Recharge Amount","account.enterAmount":"Please enter recharge amount","account.rechargeHint":"Minimum recharge amount: 1 QDT","account.confirmRecharge":"Confirm Recharge","account.enterValidAmount":"Please enter a valid recharge amount","account.rechargeSuccess":"Recharge successful! Recharged {amount} QDT","account.settings.menuMap.basic":"Basic Settings","account.settings.menuMap.security":"Security Settings","account.settings.menuMap.notification":"New Message Notification","account.settings.menuMap.moneyLog":"Transaction History","account.moneyLog.empty":"No transaction history","account.moneyLog.total":"Total {total} records","account.moneyLog.type.purchase":"Purchase Indicator","account.moneyLog.type.recharge":"Recharge","account.moneyLog.type.refund":"Refund","account.moneyLog.type.reward":"Reward","account.moneyLog.type.income":"Indicator Income","account.moneyLog.type.commission":"Platform Fee","wallet.balance":"QDT Balance","wallet.recharge":"Recharge","wallet.withdraw":"Withdraw","wallet.filter":"Filter","wallet.reset":"Reset","wallet.totalRecharge":"Total Recharge","wallet.totalWithdraw":"Total Withdraw","wallet.totalIncome":"Total Income","wallet.records":"Trading Records & Transaction History","wallet.tradingRecords":"Trading Records","wallet.moneyLog":"Transaction History","wallet.rechargeTip":"Please scan the QR code below with WeChat or Alipay to recharge","wallet.qrCodePlaceholder":"QR Code Placeholder (Simulated)","wallet.rechargeAmount":"Recharge Amount","wallet.enterAmount":"Please enter recharge amount","wallet.rechargeHint":"Minimum recharge amount: 1 QDT","wallet.confirmRecharge":"Confirm Recharge","wallet.enterValidAmount":"Please enter a valid recharge amount","wallet.rechargeSuccess":"Recharge successful! Recharged {amount} QDT","wallet.rechargeFailed":"Recharge failed","wallet.withdrawTip":"Please enter withdrawal amount and address","wallet.withdrawAmount":"Withdrawal Amount","wallet.enterWithdrawAmount":"Please enter withdrawal amount","wallet.withdrawHint":"Minimum withdrawal amount: 1 QDT","wallet.withdrawAddress":"Withdrawal Address (Optional)","wallet.enterWithdrawAddress":"Please enter withdrawal address","wallet.confirmWithdraw":"Confirm Withdrawal","wallet.enterValidWithdrawAmount":"Please enter a valid withdrawal amount","wallet.insufficientBalance":"Insufficient balance","wallet.withdrawSuccess":"Withdrawal successful! Withdrew {amount} QDT","wallet.withdrawFailed":"Withdrawal failed","wallet.noTradingRecords":"No trading records","wallet.noMoneyLog":"No transaction history","wallet.loadTradingRecordsFailed":"Failed to load trading records","wallet.loadMoneyLogFailed":"Failed to load transaction history","wallet.moneyLogTotal":"Total {total} records","wallet.moneyLogTypeTitle":"Type","wallet.moneyLogType.all":"All types","wallet.table.time":"Time","wallet.table.type":"Type","wallet.table.price":"Price","wallet.table.amount":"Amount","wallet.table.money":"Amount","wallet.table.balance":"Balance","wallet.table.memo":"Memo","wallet.table.value":"Value","wallet.table.profit":"P/L","wallet.table.commission":"Commission","wallet.table.total":"Total {total} records","wallet.tradeType.buy":"Buy","wallet.tradeType.sell":"Sell","wallet.tradeType.liquidation":"Liquidation","wallet.tradeType.openLong":"Open Long","wallet.tradeType.addLong":"Add Long","wallet.tradeType.closeLong":"Close Long","wallet.tradeType.closeLongStop":"Stop Loss Close Long","wallet.tradeType.closeLongProfit":"Take Profit Close Long","wallet.tradeType.openShort":"Open Short","wallet.tradeType.addShort":"Add Short","wallet.tradeType.closeShort":"Close Short","wallet.tradeType.closeShortStop":"Stop Loss Close Short","wallet.tradeType.closeShortProfit":"Take Profit Close Short","wallet.moneyLogType.purchase":"Purchase Indicator","wallet.moneyLogType.recharge":"Recharge","wallet.moneyLogType.withdraw":"Withdraw","wallet.moneyLogType.refund":"Refund","wallet.moneyLogType.reward":"Reward","wallet.moneyLogType.income":"Income","wallet.moneyLogType.commission":"Commission","wallet.web3Address.required":"Please fill in Web3 wallet address first","wallet.web3Address.requiredDescription":"You need to bind your Web3 wallet address before recharging to receive deposits","wallet.web3Address.placeholder":"Please enter your Web3 wallet address (starts with 0x)","wallet.web3Address.save":"Save Wallet Address","wallet.web3Address.saveSuccess":"Wallet address saved successfully","wallet.web3Address.saveFailed":"Failed to save wallet address","wallet.web3Address.invalidFormat":"Please enter a valid Web3 wallet address (Ethereum format: 42 characters starting with 0x, or TRC20 format: 34 characters starting with T)","wallet.selectCoin":"Select Coin","wallet.selectChain":"Select Chain","wallet.chain.eth":"ETH(ERC20)","wallet.chain.trc20":"TRC20","wallet.chain.bsc":"BSC","wallet.targetQdtAmount":"Target QDT Amount (Optional)","wallet.targetQdtAmount.placeholder":"Enter the QDT amount you want to exchange, current QDT price: {price} USDT","wallet.targetQdtAmount.requiredUsdt":"Required USDT: {amount}","wallet.rechargeAddress":"Recharge Address","wallet.copyAddress":"Copy","wallet.copySuccess":"Copied successfully!","wallet.copyFailed":"Copy failed, please copy manually","wallet.rechargeAddressHint":"Please ensure you use {chain} chain to recharge {coin} to this address","wallet.qdtPrice.loading":"Loading...","wallet.rechargeTip.new":"Please select coin and chain, then scan the QR code below to recharge","wallet.exchangeRate":"1 QDT ≈ {rate} USDT","wallet.withdrawableAmount":"Withdrawable Amount","wallet.totalBalance":"Total Balance","wallet.insufficientWithdrawable":"Insufficient withdrawable amount, current withdrawable: {amount} QDT","wallet.withdrawAddressRequired":"Please enter withdrawal address","wallet.withdrawAddressHint":"Please ensure the address is correct, withdrawal cannot be revoked","wallet.withdrawSubmitSuccess":"Withdrawal application submitted successfully, please wait for review","menu.footer.contactUs":"Contact Us","menu.footer.getSupport":"Get Support","menu.footer.socialAccounts":"Social Accounts","menu.footer.userAgreement":"User Agreement","menu.footer.privacyPolicy":"Privacy Policy","menu.footer.support":"Support","menu.footer.featureRequest":"Feature request","menu.footer.email":"Email","menu.footer.liveChat":"24/7 live chat","dashboard.analysis.title":"Multi-Dimensional Analysis","dashboard.analysis.subtitle":"AI-Powered Comprehensive Financial Analysis Platform","dashboard.analysis.selectSymbol":"Select or enter symbol code","dashboard.analysis.selectModel":"Select Model","dashboard.analysis.startAnalysis":"Start Analysis","dashboard.analysis.history":"History","dashboard.analysis.tab.overview":"Overview","dashboard.analysis.tab.fundamental":"Fundamental","dashboard.analysis.tab.technical":"Technical","dashboard.analysis.tab.news":"News","dashboard.analysis.tab.sentiment":"Sentiment","dashboard.analysis.tab.risk":"Risk","dashboard.analysis.tab.debate":"Debate","dashboard.analysis.tab.decision":"Final Decision","dashboard.analysis.empty.selectSymbol":"Select Symbol to Start Analysis","dashboard.analysis.empty.selectSymbolDesc":"Select from watchlist or enter symbol code to get multi-dimensional AI analysis report","dashboard.analysis.empty.startAnalysis":'Click "Start Analysis" button to perform multi-dimensional analysis',"dashboard.analysis.empty.startAnalysisDesc":"We will provide comprehensive analysis from multiple dimensions including fundamental, technical, news, sentiment and risk","dashboard.analysis.empty.noData":"No {type} analysis data available, please perform comprehensive analysis first","dashboard.analysis.empty.noWatchlist":"No watchlist items","dashboard.analysis.empty.noHistory":"No history records","dashboard.analysis.empty.watchlistHint":"No watchlist, please","dashboard.analysis.empty.noDebateData":"No debate data available","dashboard.analysis.empty.noDecisionData":"No decision data available","dashboard.analysis.empty.selectAgent":"Please select an Agent to view analysis results","dashboard.analysis.loading.analyzing":"Analyzing, please wait...","dashboard.analysis.loading.fundamental":"Analyzing fundamental data...","dashboard.analysis.loading.technical":"Analyzing technical indicators...","dashboard.analysis.loading.news":"Analyzing news data...","dashboard.analysis.loading.sentiment":"Analyzing market sentiment...","dashboard.analysis.loading.risk":"Assessing risks...","dashboard.analysis.loading.debate":"Debating...","dashboard.analysis.loading.decision":"Generating final decision...","dashboard.analysis.score.overall":"Overall Score","dashboard.analysis.score.recommendation":"Recommendation","dashboard.analysis.score.confidence":"Confidence","dashboard.analysis.dimension.fundamental":"Fundamental","dashboard.analysis.dimension.technical":"Technical","dashboard.analysis.dimension.news":"News","dashboard.analysis.dimension.sentiment":"Sentiment","dashboard.analysis.dimension.risk":"Risk","dashboard.analysis.card.dimensionScores":"Dimension Scores","dashboard.analysis.card.overviewReport":"Overview Report","dashboard.analysis.card.financialMetrics":"Financial Metrics","dashboard.analysis.card.fundamentalReport":"Fundamental Analysis Report","dashboard.analysis.card.technicalIndicators":"Technical Indicators","dashboard.analysis.card.technicalReport":"Technical Analysis Report","dashboard.analysis.card.newsList":"Related News","dashboard.analysis.card.newsReport":"News Analysis Report","dashboard.analysis.card.sentimentIndicators":"Sentiment Indicators","dashboard.analysis.card.sentimentReport":"Sentiment Analysis Report","dashboard.analysis.card.riskMetrics":"Risk Metrics","dashboard.analysis.card.riskReport":"Risk Assessment Report","dashboard.analysis.card.bullView":"Bullish View (Bull)","dashboard.analysis.card.bearView":"Bearish View (Bear)","dashboard.analysis.card.researchConclusion":"Researcher Conclusion","dashboard.analysis.card.traderPlan":"Trader Plan","dashboard.analysis.card.riskDebate":"Risk Committee Debate","dashboard.analysis.card.finalDecision":"Final Decision","dashboard.analysis.card.tradePlanDetail":"Trading Plan Details","dashboard.analysis.tradingPlan.entry_price":"Entry Price","dashboard.analysis.tradingPlan.position_size":"Position Size","dashboard.analysis.tradingPlan.stop_loss":"Stop Loss","dashboard.analysis.tradingPlan.take_profit":"Take Profit","dashboard.analysis.label.confidence":"Confidence","dashboard.analysis.label.keyPoints":"Key Points","dashboard.analysis.label.riskWarning":"Risk Warning","dashboard.analysis.risk.risky":"Aggressive View (Risky)","dashboard.analysis.risk.neutral":"Neutral View (Neutral)","dashboard.analysis.risk.safe":"Conservative View (Safe)","dashboard.analysis.risk.conclusion":"Conclusion","dashboard.analysis.feature.fundamental":"Fundamental Analysis","dashboard.analysis.feature.technical":"Technical Analysis","dashboard.analysis.feature.news":"News Analysis","dashboard.analysis.feature.sentiment":"Sentiment Analysis","dashboard.analysis.feature.risk":"Risk Assessment","dashboard.analysis.watchlist.title":"My Watchlist","dashboard.analysis.watchlist.add":"Add","dashboard.analysis.watchlist.addStock":"Add Stock","dashboard.analysis.modal.addStock.title":"Add to Watchlist","dashboard.analysis.modal.addStock.confirm":"Confirm","dashboard.analysis.modal.addStock.cancel":"Cancel","dashboard.analysis.modal.addStock.market":"Market Type","dashboard.analysis.modal.addStock.marketPlaceholder":"Please select market","dashboard.analysis.modal.addStock.marketRequired":"Please select market type","dashboard.analysis.modal.addStock.symbol":"Symbol","dashboard.analysis.modal.addStock.symbolPlaceholder":"e.g.: AAPL, TSLA, GOOGL, 000001, BTC","dashboard.analysis.modal.addStock.symbolRequired":"Please enter symbol code","dashboard.analysis.modal.addStock.searchPlaceholder":"Search symbol code or name","dashboard.analysis.modal.addStock.searchOrInputPlaceholder":"Search or enter symbol code (e.g.: AAPL, BTC/USDT, EUR/USD)","dashboard.analysis.modal.addStock.searchOrInputHint":"Search in database or enter code directly (name will be fetched automatically)","dashboard.analysis.modal.addStock.search":"Search","dashboard.analysis.modal.addStock.searchResults":"Search Results","dashboard.analysis.modal.addStock.hotSymbols":"Hot Symbols","dashboard.analysis.modal.addStock.noHotSymbols":"No hot symbols available","dashboard.analysis.modal.addStock.selectedSymbol":"Selected Symbol","dashboard.analysis.modal.addStock.pleaseSelectSymbol":"Please select a symbol first","dashboard.analysis.modal.addStock.pleaseSelectOrEnterSymbol":"Please select a symbol or enter symbol code","dashboard.analysis.modal.addStock.pleaseEnterSymbol":"Please enter symbol code","dashboard.analysis.modal.addStock.pleaseSelectMarket":"Please select market type first","dashboard.analysis.modal.addStock.searchFailed":"Search failed, please try again later","dashboard.analysis.modal.addStock.noSearchResults":"No matching symbols found","dashboard.analysis.modal.addStock.willAutoFetchName":"Name will be fetched automatically","dashboard.analysis.modal.addStock.addDirectly":"Add Directly","dashboard.analysis.modal.addStock.nameWillBeFetched":"Name will be fetched automatically when adding","dashboard.analysis.market.USStock":"US Stock","dashboard.analysis.market.Crypto":"Cryptocurrency","dashboard.analysis.market.Forex":"Forex","dashboard.analysis.market.Futures":"Futures","dashboard.analysis.modal.history.title":"Analysis History","dashboard.analysis.modal.history.viewResult":"View Result","dashboard.analysis.modal.history.completeTime":"Complete Time","dashboard.analysis.modal.history.error":"Error","dashboard.analysis.status.pending":"Pending","dashboard.analysis.status.processing":"Processing","dashboard.analysis.status.completed":"Completed","dashboard.analysis.status.failed":"Failed","dashboard.analysis.message.selectSymbol":"Please select a symbol first","dashboard.analysis.message.taskCreated":"Analysis task created, executing in background...","dashboard.analysis.message.analysisComplete":"Analysis Complete","dashboard.analysis.message.analysisCompleteCache":"Analysis Complete (Using Cache)","dashboard.analysis.message.analysisFailed":"Analysis failed, please try again later","dashboard.analysis.message.addStockSuccess":"Added successfully","dashboard.analysis.message.addStockFailed":"Failed to add","dashboard.analysis.message.removeStockSuccess":"Removed successfully","dashboard.analysis.message.removeStockFailed":"Failed to remove","dashboard.analysis.message.resumingAnalysis":"Resuming analysis task...","dashboard.analysis.message.deleteSuccess":"Deleted successfully","dashboard.analysis.message.deleteFailed":"Failed to delete","dashboard.analysis.modal.history.delete":"Delete","dashboard.analysis.modal.history.deleteConfirm":"Are you sure you want to delete this analysis record?","dashboard.analysis.test":"Gongzhuan No.{no} shop","dashboard.analysis.introduce":"Introduce","dashboard.analysis.total-sales":"Total Sales","dashboard.analysis.day-sales":"Daily Sales","dashboard.analysis.visits":"Visits","dashboard.analysis.visits-trend":"Visits Trend","dashboard.analysis.visits-ranking":"Visits Ranking","dashboard.analysis.day-visits":"Daily Visits","dashboard.analysis.week":"WoW Change","dashboard.analysis.day":"DoD Change","dashboard.analysis.payments":"Payments","dashboard.analysis.conversion-rate":"Conversion Rate","dashboard.analysis.operational-effect":"Operational Effect","dashboard.analysis.sales-trend":"Stores Sales Trend","dashboard.analysis.sales-ranking":"Sales Ranking","dashboard.analysis.all-year":"All Year","dashboard.analysis.all-month":"All Month","dashboard.analysis.all-week":"All Week","dashboard.analysis.all-day":"All day","dashboard.analysis.search-users":"Search Users","dashboard.analysis.per-capita-search":"Per Capita Search","dashboard.analysis.online-top-search":"Online Top Search","dashboard.analysis.the-proportion-of-sales":"The Proportion Of Sales","dashboard.analysis.dropdown-option-one":"Operation one","dashboard.analysis.dropdown-option-two":"Operation two","dashboard.analysis.channel.all":"ALL","dashboard.analysis.channel.online":"Online","dashboard.analysis.channel.stores":"Stores","dashboard.analysis.sales":"Sales","dashboard.analysis.traffic":"Traffic","dashboard.analysis.table.rank":"Rank","dashboard.analysis.table.search-keyword":"Keyword","dashboard.analysis.table.users":"Users","dashboard.analysis.table.weekly-range":"Weekly Range","dashboard.indicator.selectSymbol":"Select or enter symbol code","dashboard.indicator.emptyWatchlistHint":"No watchlist, please add first","dashboard.indicator.hint.selectSymbol":"Please select a symbol to start analysis","dashboard.indicator.hint.selectSymbolDesc":"Select or enter stock code in the search box above to view K-line chart and technical indicators","dashboard.indicator.retry":"Retry","dashboard.indicator.panel.title":"Technical Indicators","dashboard.indicator.panel.realtimeOn":"Turn off real-time update","dashboard.indicator.panel.realtimeOff":"Turn on real-time update","dashboard.indicator.panel.themeLight":"Switch to dark theme","dashboard.indicator.panel.themeDark":"Switch to light theme","dashboard.indicator.section.enabled":"Enabled","dashboard.indicator.section.added":"My Added Indicators","dashboard.indicator.section.custom":"My Created Indicators","dashboard.indicator.section.bought":"Purchased Indicators","dashboard.indicator.section.myCreated":"My Created Indicators","dashboard.indicator.section.purchased":"Purchased Indicators","dashboard.indicator.empty":"No indicators, please add or create indicators first","dashboard.indicator.emptyPurchased":"No purchased indicators, check out the market","dashboard.indicator.buy":"Buy Indicators","dashboard.indicator.action.start":"Start","dashboard.indicator.action.stop":"Stop","dashboard.indicator.action.edit":"Edit","dashboard.indicator.action.delete":"Delete","dashboard.indicator.action.backtest":"Backtest","dashboard.indicator.action.publish":"Publish to Community","dashboard.indicator.action.unpublish":"Published (Click to Manage)","dashboard.indicator.status.normal":"Active","dashboard.indicator.status.normalPermanent":"Active (Permanent)","dashboard.indicator.status.expired":"Expired","dashboard.indicator.expiry.permanent":"Permanent","dashboard.indicator.expiry.noExpiry":"No expiration","dashboard.indicator.expiry.expired":"Expired: {date}","dashboard.indicator.expiry.expiresOn":"Expires: {date}","dashboard.indicator.delete.confirmTitle":"Confirm Deletion","dashboard.indicator.delete.confirmContent":'Are you sure you want to delete indicator "{name}"? This action cannot be undone.',"dashboard.indicator.delete.confirmOk":"Delete","dashboard.indicator.delete.confirmCancel":"Cancel","dashboard.indicator.delete.success":"Deleted successfully","dashboard.indicator.delete.failed":"Failed to delete","dashboard.indicator.save.success":"Saved successfully","dashboard.indicator.save.failed":"Failed to save","dashboard.indicator.publish.title":"Publish to Community","dashboard.indicator.publish.editTitle":"Manage Publication","dashboard.indicator.publish.hint":'After publishing, other users can view and purchase your indicator in the "Indicator Community"',"dashboard.indicator.publish.pricingType":"Pricing Type","dashboard.indicator.publish.free":"Free","dashboard.indicator.publish.paid":"Paid","dashboard.indicator.publish.price":"Price","dashboard.indicator.publish.description":"Description","dashboard.indicator.publish.descriptionPlaceholder":"Enter a detailed description to help others understand your indicator...","dashboard.indicator.publish.confirm":"Publish","dashboard.indicator.publish.update":"Update","dashboard.indicator.publish.unpublish":"Unpublish","dashboard.indicator.publish.success":"Published successfully","dashboard.indicator.publish.failed":"Failed to publish","dashboard.indicator.publish.unpublishSuccess":"Unpublished successfully","dashboard.indicator.publish.unpublishFailed":"Failed to unpublish","dashboard.indicator.error.loadWatchlistFailed":"Failed to load watchlist","dashboard.indicator.error.chartNotReady":"Chart component not initialized, please select a symbol and wait for the chart to load","dashboard.indicator.error.chartMethodNotReady":"Chart component method not ready, please try again later","dashboard.indicator.error.chartExecuteNotReady":"Chart component execute method not ready, please try again later","dashboard.indicator.error.parseFailed":"Failed to parse Python code","dashboard.indicator.error.parseFailedCheck":"Failed to parse Python code, please check the code format","dashboard.indicator.error.addIndicatorFailed":"Failed to add indicator","dashboard.indicator.error.runIndicatorFailed":"Failed to run indicator","dashboard.indicator.error.pleaseLogin":"Please login first","dashboard.indicator.error.loadDataFailed":"Failed to load data","dashboard.indicator.error.loadDataFailedDesc":"Please check network connection","dashboard.indicator.error.tiingoSubscription":"Forex 1-minute data requires Tiingo paid subscription. Please use other timeframes or upgrade your subscription.","dashboard.indicator.error.pythonEngineFailed":"Python engine failed to load, indicator functionality may be unavailable","dashboard.indicator.error.chartInitFailed":"Chart initialization failed","dashboard.indicator.warning.enterCode":"Please enter indicator code first","dashboard.indicator.warning.chartNotInitialized":"Chart not initialized, cannot use drawing tools","dashboard.indicator.warning.pyodideLoadFailed":"Python Engine Load Failed","dashboard.indicator.warning.pyodideLoadFailedDesc":"Your current region or network environment cannot use this feature","dashboard.indicator.success.runIndicator":"Indicator ran successfully","dashboard.indicator.success.clearDrawings":"All drawings cleared","dashboard.indicator.sma":"SMA (Moving Average Group)","dashboard.indicator.ema":"EMA (Exponential Moving Average Group)","dashboard.indicator.rsi":"RSI (Relative Strength Index)","dashboard.indicator.macd":"MACD","dashboard.indicator.bb":"Bollinger Bands","dashboard.indicator.atr":"ATR (Average True Range)","dashboard.indicator.cci":"CCI (Commodity Channel Index)","dashboard.indicator.williams":"Williams %R","dashboard.indicator.mfi":"MFI (Money Flow Index)","dashboard.indicator.adx":"ADX (Average Directional Index)","dashboard.indicator.obv":"OBV (On Balance Volume)","dashboard.indicator.adosc":"ADOSC (Accumulation/Distribution Oscillator)","dashboard.indicator.ad":"AD (Accumulation/Distribution Line)","dashboard.indicator.kdj":"KDJ (Stochastic Indicator)","dashboard.indicator.signal.buy":"BUY","dashboard.indicator.signal.sell":"SELL","dashboard.indicator.signal.supertrendBuy":"SuperTrend Buy","dashboard.indicator.signal.supertrendSell":"SuperTrend Sell","dashboard.indicator.chart.kline":"K-Line","dashboard.indicator.chart.volume":"Volume","dashboard.indicator.chart.uptrend":"Up Trend","dashboard.indicator.chart.downtrend":"Down Trend","dashboard.indicator.tooltip.time":"Time","dashboard.indicator.tooltip.open":"O","dashboard.indicator.tooltip.close":"C","dashboard.indicator.tooltip.high":"H","dashboard.indicator.tooltip.low":"L","dashboard.indicator.tooltip.volume":"Volume","dashboard.indicator.drawing.line":"Line","dashboard.indicator.drawing.horizontalLine":"Horizontal Line","dashboard.indicator.drawing.verticalLine":"Vertical Line","dashboard.indicator.drawing.ray":"Ray","dashboard.indicator.drawing.straightLine":"Straight Line","dashboard.indicator.drawing.parallelLine":"Parallel Line","dashboard.indicator.drawing.priceLine":"Price Line","dashboard.indicator.drawing.priceChannel":"Price Channel","dashboard.indicator.drawing.fibonacciLine":"Fibonacci Line","dashboard.indicator.drawing.measure":"Measure","dashboard.indicator.drawing.clearAll":"Clear All Drawings","dashboard.indicator.market.USStock":"US Stock","dashboard.indicator.market.Crypto":"Cryptocurrency","dashboard.indicator.market.Forex":"Forex","dashboard.indicator.market.Futures":"Futures","dashboard.indicator.create":"Create Indicator","dashboard.indicator.editor.title":"Create/Edit Indicator","dashboard.indicator.editor.name":"Indicator Name","dashboard.indicator.editor.nameRequired":"Please enter indicator name","dashboard.indicator.editor.namePlaceholder":"Enter indicator name","dashboard.indicator.editor.description":"Description","dashboard.indicator.editor.descriptionPlaceholder":"Enter description (optional)","dashboard.indicator.editor.code":"Python Code","dashboard.indicator.editor.codeRequired":"Please enter indicator code","dashboard.indicator.editor.codePlaceholder":"Enter Python code","dashboard.indicator.editor.run":"Run","dashboard.indicator.editor.runHint":"Click Run button to preview indicator on K-line chart","dashboard.indicator.editor.guide":"Development Guide","dashboard.indicator.editor.guideTitle":"Python Indicator Development Guide","dashboard.indicator.editor.save":"Save","dashboard.indicator.editor.cancel":"Cancel","dashboard.indicator.editor.unnamed":"Unnamed Indicator","dashboard.indicator.editor.publishToCommunity":"Publish to Community","dashboard.indicator.editor.publishToCommunityHint":"After publishing, other users can view and use your indicator in the community","dashboard.indicator.editor.indicatorType":"Indicator Type","dashboard.indicator.editor.indicatorTypeRequired":"Please select indicator type","dashboard.indicator.editor.indicatorTypePlaceholder":"Please select indicator type","dashboard.indicator.editor.previewImage":"Preview Image","dashboard.indicator.editor.uploadImage":"Upload Image","dashboard.indicator.editor.previewImageHint":"Recommended size: 800x400, max 2MB","dashboard.indicator.editor.pricing":"Pricing (QDT)","dashboard.indicator.editor.pricingType.free":"Free","dashboard.indicator.editor.pricingType.permanent":"Permanent","dashboard.indicator.editor.pricingType.monthly":"Monthly","dashboard.indicator.editor.price":"Price","dashboard.indicator.editor.priceRequired":"Please enter price","dashboard.indicator.editor.pricePlaceholder":"Please enter price","dashboard.indicator.editor.pricingHint":"Free indicators (price 0) will still receive platform rewards based on usage and ratings (QDT)","dashboard.indicator.editor.aiGenerate":"AI Generate","dashboard.indicator.editor.aiPromptPlaceholder":"Describe your signal logic (buy/sell only) and plots. Position sizing, risk, scaling, fees/slippage are configured in backtest.","dashboard.indicator.boundary.message":"Note: The indicator script only computes plots + buy/sell signals. Position sizing, risk, scaling, fees/slippage belong to execution config.","dashboard.indicator.boundary.indicatorRule":"Keep the script to buy/sell only (and set df['buy']/df['sell']). Do NOT implement position management, TP/SL, scaling in the script.","dashboard.indicator.boundary.backtestRule":"Rule: If a bar has a main signal (buy/sell → open/close/reverse), scaling in/out is skipped on the same bar.","dashboard.indicator.editor.aiGenerateBtn":"AI Generate Code","dashboard.indicator.editor.aiPromptRequired":"Please enter your idea","dashboard.indicator.editor.aiGenerateSuccess":"Code generated successfully","dashboard.indicator.editor.aiGenerateError":"Code generation failed, please try again later","dashboard.indicator.editor.verifyCode":"Verify Code","dashboard.indicator.editor.verifyCodeSuccess":"Verification Passed","dashboard.indicator.editor.verifyCodeFailed":"Verification Failed","dashboard.indicator.editor.verifyCodeEmpty":"Code cannot be empty","dashboard.indicator.guide.title":"Python Indicator & Strategy Development Guide","dashboard.indicator.guide.intro":"This platform supports writing custom technical indicators and trading signals using Python. The system includes built-in pandas and numpy data analysis libraries. You can use standard DataFrame operations to process K-line data and draw charts or mark buy/sell signals.","dashboard.indicator.guide.section1.title":"1. Runtime Environment & Predefined Variables","dashboard.indicator.guide.section1.env":"Your code runs in a browser-based Python environment (Pyodide).","dashboard.indicator.guide.section1.libs":"Pre-installed Libraries","dashboard.indicator.guide.section1.libsDesc":"The following libraries are imported by default, no need to import again:","dashboard.indicator.guide.section1.libsList":"pandas (pd), numpy (np), math, json","dashboard.indicator.guide.section1.data":"Input Data: df","dashboard.indicator.guide.section1.dataDesc":"The system automatically converts current K-line data into a Pandas DataFrame object, variable name is df.","dashboard.indicator.guide.section1.dataColumns":"df contains the following columns (all float type):","dashboard.indicator.guide.section1.dataColumnsList":"time (timestamp, seconds), open, high, low, close, volume","dashboard.indicator.guide.section1.dataNote":"Data index is arranged from old to new (0 is the earliest data, last row is the latest data).","dashboard.indicator.guide.section1.dataIndex":"Important: df index is timestamp (DatetimeIndex), please preserve the index, avoid using .values which loses the index.","dashboard.indicator.guide.section2.title":"2. Parameter Definition","dashboard.indicator.guide.section2.desc":"You can define variables as parameters at the beginning of your code. The system will try to parse statements like variable = value as adjustable parameters.","dashboard.indicator.guide.section2.example":"Parameter Example","dashboard.indicator.guide.section2.exampleCode":"span = 20 or multiplier = 2.0","dashboard.indicator.guide.section3.title":"3. Backtest Signal Setup (Important!)","dashboard.indicator.guide.section3.desc":"If you want your indicator to support backtesting, you must set the following two columns in your code:","dashboard.indicator.guide.section3.backtestRequired":"Required for Backtesting:","dashboard.indicator.guide.section3.backtestBuySignal":"df['buy_signal'] - Boolean Series, True indicates buy signal","dashboard.indicator.guide.section3.backtestSellSignal":"df['sell_signal'] - Boolean Series, True indicates sell signal","dashboard.indicator.guide.section3.backtestExample":"Example:","dashboard.indicator.guide.section3.backtestExampleCode":"df['buy_signal'] = condition_buy
    df['sell_signal'] = condition_sell","dashboard.indicator.guide.section3.backtestNote":"Note: Even if you only set output.signals for chart display, you must set these two columns to enable backtesting.","dashboard.indicator.guide.section4.title":"4. Output Requirements: output","dashboard.indicator.guide.section4.desc":"At the end of code execution, you must define a dictionary named output to tell the chart how to display results.","dashboard.indicator.guide.section4.fields":"The output dictionary contains the following fields:","dashboard.indicator.guide.section4.plots":"plots - For drawing lines (e.g., moving averages, RSI)","dashboard.indicator.guide.section4.signals":"signals - For marking buy/sell signals (e.g., arrows, labels)","dashboard.indicator.guide.section4.name":"name - Indicator name (optional)","dashboard.indicator.guide.section4.calculatedVars":"calculatedVars - Calculated variables (optional, for displaying additional information)","dashboard.indicator.guide.section5.title":"5. Plot Configuration (Plots)","dashboard.indicator.guide.section5.desc":"Each object in the plots list represents a line.","dashboard.indicator.guide.section5.table.field":"Field","dashboard.indicator.guide.section5.table.type":"Type","dashboard.indicator.guide.section5.table.required":"Required","dashboard.indicator.guide.section5.table.requiredYes":"Yes","dashboard.indicator.guide.section5.table.requiredNo":"No","dashboard.indicator.guide.section5.table.desc":"Description","dashboard.indicator.guide.section5.table.name":"The name of the indicator line, displayed in the legend","dashboard.indicator.guide.section5.table.data":"Data list, length must match the number of rows in df. Recommended to use series.tolist()","dashboard.indicator.guide.section5.table.color":"Line color (Hex format, e.g. '#ff0000'). If not filled, the system will automatically assign","dashboard.indicator.guide.section5.table.typeDesc":"Chart type, default is 'line'","dashboard.indicator.guide.section5.table.overlay":"Important. True means display on main chart (with K-line), False means display on sub-chart (independent area)","dashboard.indicator.guide.section5.example":"Example: Draw Simple Moving Average (SMA)","dashboard.indicator.guide.section5.exampleCalc":"Calculate SMA","dashboard.indicator.guide.section5.exampleOutput":"Construct Output","dashboard.indicator.guide.section5.exampleOverlay":"Display on main chart","dashboard.indicator.guide.section6.title":"6. Signal Markers (Signals)","dashboard.indicator.guide.section6.desc":"signals are used to mark buy/sell points on specific K-lines through icons or text. Note: This is only for chart display. The backtest system uses df['buy_signal'] and df['sell_signal'].","dashboard.indicator.guide.section6.table.type":"Signal type: 'buy' (buy, marked below K-line) or 'sell' (sell, marked above K-line)","dashboard.indicator.guide.section6.table.data":"Signal data list. Fill price value at signal positions, fill None (or np.nan) at non-signal positions","dashboard.indicator.guide.section6.table.text":'Text displayed on the label (e.g. "B", "S", "Buy", "Sell")',"dashboard.indicator.guide.section6.table.color":"Marker color","dashboard.indicator.guide.section6.hint":"The system automatically handles positioning.","dashboard.indicator.guide.section6.buy":"Markers will be automatically positioned below the Low of the current K-line","dashboard.indicator.guide.section6.sell":"Markers will be automatically positioned above the High of the current K-line","dashboard.indicator.guide.section6.example":"Example: Draw Buy/Sell Signals","dashboard.indicator.guide.section6.exampleInit":"Initialize signal list, fill all with None","dashboard.indicator.guide.section6.exampleLogic":"Simple logic: mark buy when close price is greater than open price","dashboard.indicator.guide.section6.exampleNote":"In actual logic, please use loops or vectorized operations","dashboard.indicator.guide.section6.examplePrice":"Record price","dashboard.indicator.guide.section6.exampleText":"Buy","dashboard.indicator.guide.section7.title":"7. Complete Code Examples","dashboard.indicator.guide.section7.exampleA":"Example A: Dual EMA Strategy (Supports Backtesting)","dashboard.indicator.guide.section7.exampleACode":'# 1. Calculate indicators
    df[\'ema_fast\'] = df[\'close\'].ewm(span=5, adjust=False).mean()
    df[\'ema_slow\'] = df[\'close\'].ewm(span=13, adjust=False).mean()

    # 2. Calculate crossover signals
    cross_up = (df[\'ema_fast\'] > df[\'ema_slow\']) & (df[\'ema_fast\'].shift(1) <= df[\'ema_slow\'].shift(1))
    cross_down = (df[\'ema_fast\'] < df[\'ema_slow\']) & (df[\'ema_fast\'].shift(1) >= df[\'ema_slow\'].shift(1))

    # 3. 【Important】Set NEW backtest signal columns (bool)
    df[\'open_long\'] = cross_up
    df[\'close_long\'] = cross_down
    df[\'open_short\'] = cross_down
    df[\'close_short\'] = cross_up

    # 4. Generate signal data for chart display
    buy_signals = [df[\'low\'].iloc[i] * 0.995 if cross_up.iloc[i] else None for i in range(len(df))]
    sell_signals = [df[\'high\'].iloc[i] * 1.005 if cross_down.iloc[i] else None for i in range(len(df))]

    # 5. Build output
    output = {
    "name": "Dual EMA Strategy",
    "plots": [
    {"name": "EMA 5", "data": df[\'ema_fast\'].tolist(), "color": "#FF6B6B", "overlay": True},
    {"name": "EMA 13", "data": df[\'ema_slow\'].tolist(), "color": "#4ECDC4", "overlay": True}
    ],
    "signals": [
    {"type": "buy", "text": "BUY", "data": buy_signals, "color": "#00E676"},
    {"type": "sell", "text": "SELL", "data": sell_signals, "color": "#FF5252"}
    ]
    }',"dashboard.indicator.guide.section7.exampleB":"Example B: Bollinger Bands - Chart Display Only","dashboard.indicator.guide.section7.exampleBCode":'# Calculate Bollinger Bands (chart display only, no backtesting)
    length = 20
    mult = 2.0
    df[\'sma\'] = df[\'close\'].rolling(length).mean()
    df[\'std\'] = df[\'close\'].rolling(length).std()
    df[\'upper\'] = df[\'sma\'] + mult * df[\'std\']
    df[\'lower\'] = df[\'sma\'] - mult * df[\'std\']

    output = {
    "name": "Bollinger Bands",
    "plots": [
    {"name": "Upper", "data": df[\'upper\'].tolist(), "color": "#FF5252", "overlay": True},
    {"name": "Middle", "data": df[\'sma\'].tolist(), "color": "#2196F3", "overlay": True},
    {"name": "Lower", "data": df[\'lower\'].tolist(), "color": "#00E676", "overlay": True}
    ]
    }',"dashboard.indicator.guide.section7.exampleC":"Example C: RSI Strategy (Supports Backtesting)","dashboard.indicator.guide.section7.exampleCCode":'# Calculate RSI
    delta = df[\'close\'].diff()
    up = delta.clip(lower=0)
    down = -1 * delta.clip(upper=0)
    ema_up = up.ewm(com=13, adjust=False).mean()
    ema_down = down.ewm(com=13, adjust=False).mean()
    rs = ema_up / ema_down
    df[\'rsi\'] = 100 - (100 / (1 + rs))

    # Generate trading signals
    buy_condition = df[\'rsi\'] < 30 # Oversold buy
    sell_condition = df[\'rsi\'] > 70 # Overbought sell

    # 【Important】Set NEW backtest signal columns (bool)
    df[\'open_long\'] = buy_condition
    df[\'close_long\'] = sell_condition
    df[\'open_short\'] = sell_condition
    df[\'close_short\'] = buy_condition

    # Generate chart signals
    buy_signals = [df[\'low\'].iloc[i] * 0.995 if buy_condition.iloc[i] else None for i in range(len(df))]
    sell_signals = [df[\'high\'].iloc[i] * 1.005 if sell_condition.iloc[i] else None for i in range(len(df))]

    output = {
    "name": "RSI Strategy",
    "plots": [
    {"name": "RSI", "data": df[\'rsi\'].tolist(), "color": "#9C27B0", "overlay": False},
    {"name": "Overbought", "data": [70] * len(df), "color": "#FF5252", "style": "dashed", "overlay": False},
    {"name": "Oversold", "data": [30] * len(df), "color": "#00E676", "style": "dashed", "overlay": False}
    ],
    "signals": [
    {"type": "buy", "text": "BUY", "data": buy_signals, "color": "#00E676"},
    {"type": "sell", "text": "SELL", "data": sell_signals, "color": "#FF5252"}
    ]
    }',"dashboard.indicator.guide.section6.param":"Parameters","dashboard.indicator.guide.section6.calc":"Calculate","dashboard.indicator.guide.section6.output":"Output","dashboard.indicator.guide.section6.generate":"Generate signal data (initialize with None)","dashboard.indicator.guide.section6.subchart":"Display on sub-chart","dashboard.indicator.guide.section8.title":"8. Frequently Asked Questions (FAQ)","dashboard.indicator.guide.section8.q1":"Q: Why can't my indicator be backtested?","dashboard.indicator.guide.section8.a1":"A: The backtest system requires NEW signal columns: df['open_long'], df['close_long'], df['open_short'], df['close_short'] (boolean). Even if you set output.signals for chart display, you must set these columns to enable backtesting.","dashboard.indicator.guide.section8.q2":"Q: Data length mismatch?","dashboard.indicator.guide.section8.a2":"A: The data list in plots and signals must have exactly the same length as the K-line data. If you use df['xxx'].tolist(), there is usually no problem.","dashboard.indicator.guide.section8.q3":"Q: How to handle NaN (empty values)?","dashboard.indicator.guide.section8.a3":"A: Pandas calculations (such as rolling mean) will produce NaN at the beginning. The system will automatically convert NaN to null for chart rendering. You don't need to manually clean it, but if you need specific logic, you can use df.fillna(0) or other methods.","dashboard.indicator.guide.section8.q4":"Q: Index mismatch causing all signals to be NaN?","dashboard.indicator.guide.section8.a4":"A: Please ensure you preserve the original df index (timestamp). Avoid using .values to create new Series. Use columns directly like df['close'] for operations.","dashboard.indicator.guide.section8.q5":"Q: Can I use third-party network libraries?","dashboard.indicator.guide.section8.a5":"A: No. The runtime environment is a browser sandbox and cannot use libraries like requests to request external APIs, nor can it install additional pip packages. Limited to built-in libraries such as pandas, numpy, math, json.","dashboard.indicator.guide.section8.q6":"Q: How to debug code?","dashboard.indicator.guide.section8.a6":"A: If the chart does not display indicators, it is usually because the Python code has an error. Please check for syntax errors or array index out of bounds. It is recommended to debug the algorithm logic in a local Python environment first, then copy it in.","dashboard.indicator.guide.section8.q7":"Q: Backtest shows 0 signals?","dashboard.indicator.guide.section8.a7":"A: Please check the data type of df['open_long']/df['close_long']/df['open_short']/df['close_short']. They should be boolean (True/False), not numeric. Use condition.fillna(False).astype(bool) to ensure correct type.","dashboard.indicator.paramsConfig.title":"Indicator Parameters","dashboard.indicator.paramsConfig.noParams":"No configurable parameters for this indicator","dashboard.indicator.paramsConfig.hint":"Configure parameters and click OK to run the indicator","dashboard.indicator.backtest.title":"Indicator Backtest","dashboard.indicator.backtest.config":"Backtest Parameters","dashboard.indicator.backtest.startDate":"Start Date","dashboard.indicator.backtest.endDate":"End Date","dashboard.indicator.backtest.selectStartDate":"Select start date","dashboard.indicator.backtest.selectEndDate":"Select end date","dashboard.indicator.backtest.startDateRequired":"Please select start date","dashboard.indicator.backtest.endDateRequired":"Please select end date","dashboard.indicator.backtest.initialCapital":"Initial Capital","dashboard.indicator.backtest.initialCapitalRequired":"Please enter initial capital","dashboard.indicator.backtest.commission":"Commission Rate (%)","dashboard.indicator.backtest.commissionHint":"Charged on notional value (incl. leverage) per trade; both entry & exit are deducted from balance.","dashboard.indicator.backtest.leverage":"Leverage","dashboard.indicator.backtest.timeframe":"Timeframe","dashboard.indicator.backtest.tradeDirection":"Trade Direction","dashboard.indicator.backtest.longOnly":"Long Only","dashboard.indicator.backtest.shortOnly":"Short Only","dashboard.indicator.backtest.both":"Both","dashboard.indicator.backtest.run":"Run Backtest","dashboard.indicator.backtest.rerun":"Run Again","dashboard.indicator.backtest.close":"Close","dashboard.indicator.backtest.running":"Running indicator backtest...","dashboard.indicator.backtest.loadingTip1":"Fetching historical K-line data...","dashboard.indicator.backtest.loadingTip2":"Executing strategy signal calculation...","dashboard.indicator.backtest.loadingTip3":"Simulating trade execution...","dashboard.indicator.backtest.loadingTip4":"Calculating backtest metrics...","dashboard.indicator.backtest.loadingTip5":"Almost done, please wait...","dashboard.indicator.backtest.results":"Backtest Results","dashboard.indicator.backtest.totalReturn":"Total Return","dashboard.indicator.backtest.annualReturn":"Annual Return","dashboard.indicator.backtest.maxDrawdown":"Max Drawdown","dashboard.indicator.backtest.sharpeRatio":"Sharpe Ratio","dashboard.indicator.backtest.winRate":"Win Rate","dashboard.indicator.backtest.profitFactor":"Profit Factor","dashboard.indicator.backtest.totalTrades":"Total Trades","dashboard.indicator.totalReturn":"Total Return","dashboard.indicator.annualReturn":"Annual Return","dashboard.indicator.maxDrawdown":"Max Drawdown","dashboard.indicator.sharpeRatio":"Sharpe Ratio","dashboard.indicator.winRate":"Win Rate","dashboard.indicator.profitFactor":"Profit Factor","dashboard.indicator.totalTrades":"Total Trades","dashboard.indicator.backtest.totalCommission":"Total Commission","dashboard.indicator.backtest.equityCurve":"Equity Curve","dashboard.indicator.backtest.strategy":"Indicator","dashboard.indicator.backtest.benchmark":"Benchmark","dashboard.indicator.backtest.tradeHistory":"Trade History","dashboard.indicator.backtest.tradeTime":"Time","dashboard.indicator.backtest.tradeType":"Type","dashboard.indicator.backtest.buy":"Buy","dashboard.indicator.backtest.sell":"Sell","dashboard.indicator.backtest.liquidation":"Liquidation","dashboard.indicator.backtest.openLong":"Open Long","dashboard.indicator.backtest.closeLong":"Close Long","dashboard.indicator.backtest.closeLongStop":"Close Long (Stop Loss)","dashboard.indicator.backtest.closeLongProfit":"Close Long (Take Profit)","dashboard.indicator.backtest.addLong":"Add Long","dashboard.indicator.backtest.openShort":"Open Short","dashboard.indicator.backtest.closeShort":"Close Short","dashboard.indicator.backtest.closeShortStop":"Close Short (Stop Loss)","dashboard.indicator.backtest.closeShortProfit":"Close Short (Take Profit)","dashboard.indicator.backtest.addShort":"Add Short","dashboard.indicator.backtest.closeLongTrailing":"Close Long (Trailing)","dashboard.indicator.backtest.reduceLong":"Reduce Long","dashboard.indicator.backtest.closeShortTrailing":"Close Short (Trailing)","dashboard.indicator.backtest.reduceShort":"Reduce Short","dashboard.indicator.backtest.price":"Price","dashboard.indicator.backtest.amount":"Amount","dashboard.indicator.backtest.balance":"Balance","dashboard.indicator.backtest.profit":"P&L","dashboard.indicator.backtest.success":"Backtest completed","dashboard.indicator.backtest.failed":"Backtest failed, please try again later","dashboard.indicator.backtest.quickSelect":"Quick Select","dashboard.indicator.backtest.precisionMode":"Backtest Precision Mode","dashboard.indicator.backtest.estimatedCandles":"Est. {count} candles to process","dashboard.indicator.backtest.highPrecisionDesc":"Using 1-minute candles for high-precision backtest, stop-loss/take-profit triggers are more accurate","dashboard.indicator.backtest.mediumPrecisionDesc":"Range exceeds 30 days, using 5-minute candles to balance precision and performance","dashboard.indicator.backtest.standardModeWarning":"Using Standard Backtest Mode","dashboard.indicator.backtest.standardModeDesc":"Current config does not support high-precision backtest, using strategy timeframe","dashboard.indicator.backtest.onlyCryptoSupported":"High-precision backtest only supports cryptocurrency market","dashboard.indicator.backtest.noIndicatorCode":"This indicator has no backtestable code","dashboard.indicator.backtest.noSymbol":"Please select a trading symbol first","dashboard.indicator.backtest.dateRangeExceeded":"Backtest date range exceeded: {timeframe} timeframe allows max {maxRange}","dashboard.indicator.backtest.dateRangeExceededDays":"Backtest range exceeds limit: {timeframe} max {maxRange} ({maxDays} days)","dashboard.indicator.backtest.metaLine":"Symbol: {symbol} | Market: {market} | Timeframe: {timeframe}","dashboard.indicator.backtest.savedRunId":"Backtest saved. Run ID: {id}","dashboard.indicator.backtest.historyTitle":"Backtest History","dashboard.indicator.backtest.historyRefresh":"Refresh","dashboard.indicator.backtest.historyView":"View","dashboard.indicator.backtest.historyNoData":"No backtest history","dashboard.indicator.backtest.historyUseCurrent":"Only current symbol/timeframe","dashboard.indicator.backtest.historyFilterSymbol":"Symbol","dashboard.indicator.backtest.historyFilterTimeframe":"Timeframe","dashboard.indicator.backtest.historyApply":"Apply filters","dashboard.indicator.backtest.historyAIAnalyze":"AI Analyze","dashboard.indicator.backtest.historyAIAnalyzeTitle":"AI Suggestions","dashboard.indicator.backtest.historyAISuggest":"AI Backtest Suggestions","dashboard.indicator.backtest.historyAISuggestShort":"AI Suggest","dashboard.indicator.backtest.historyAISuggestTitle":"AI Backtest Correction Suggestions","dashboard.indicator.backtest.historyAISuggestLoading":"Analyzing backtest data, generating parameter suggestions...","dashboard.indicator.backtest.historyNoAIResult":"No AI analysis result","dashboard.indicator.backtest.historyAISelectPrompt":"Please select at least one backtest run, or click the row-level AI suggestion action","dashboard.indicator.backtest.historyAIFailed":"Failed to generate AI backtest suggestions. Please try again later.","dashboard.indicator.backtest.historySelectedCount":"{count} selected","dashboard.indicator.backtest.historyAICopy":"Copy","dashboard.indicator.backtest.historyAIRetry":"Regenerate","dashboard.indicator.backtest.historyAIHint":"AI only provides parameter tuning suggestions based on backtest results. It does not rewrite indicator logic directly. Validate suggestions with A/B backtests.","dashboard.indicator.backtest.historyAIModeLLM":"AI Model","dashboard.indicator.backtest.historyAIModeRule":"Rule-Based","dashboard.indicator.backtest.historyAIModeUnknown":"Suggestion","dashboard.indicator.backtest.historyAICopySuccess":"AI suggestion copied","dashboard.indicator.backtest.historyAICopyFailed":"Copy failed. Please copy manually.","dashboard.indicator.backtest.historySymbol":"Symbol","dashboard.indicator.backtest.historyRunId":"Run ID","dashboard.indicator.backtest.historyCreatedAt":"Time","dashboard.indicator.backtest.historyRange":"Range","dashboard.indicator.backtest.historyStatus":"Status","dashboard.indicator.backtest.historyStatusSuccess":"Success","dashboard.indicator.backtest.historyStatusFailed":"Failed","dashboard.indicator.backtest.historyActions":"Actions","dashboard.indicator.backtest.prev":"Previous","dashboard.indicator.backtest.next":"Next","dashboard.indicator.backtest.steps.strategy.title":"Execution Config","dashboard.indicator.backtest.steps.strategy.desc":"Position, risk, scaling","dashboard.indicator.backtest.steps.trading.title":"Backtest Setup","dashboard.indicator.backtest.steps.trading.desc":"Time, capital, fees, leverage, slippage","dashboard.indicator.backtest.steps.results.title":"Results","dashboard.indicator.backtest.steps.results.desc":"Summary & trades","dashboard.indicator.backtest.panel.risk":"Execution: Risk (SL / trailing)","dashboard.indicator.backtest.panel.scale":"Execution: Scale-in (Trend / DCA)","dashboard.indicator.backtest.panel.reduce":"Execution: Scale-out (Trend / Adverse)","dashboard.indicator.backtest.panel.position":"Execution: Entry sizing","dashboard.indicator.backtest.field.stopLossPct":"Stop Loss (%)","dashboard.indicator.backtest.field.takeProfitPct":"Take Profit (%)","dashboard.indicator.backtest.field.trailingEnabled":"Trailing stop / take profit","dashboard.indicator.backtest.field.trailingStopPct":"Trailing drawdown (%)","dashboard.indicator.backtest.field.trailingActivationPct":"Trailing activation (%)","dashboard.indicator.backtest.field.slippage":"Slippage (%)","dashboard.indicator.backtest.field.trendAddEnabled":"Trend-following scale-in","dashboard.indicator.backtest.field.dcaAddEnabled":"Mean-reversion DCA","dashboard.indicator.backtest.field.trendAddStepPct":"Scale-in trigger (%)","dashboard.indicator.backtest.field.dcaAddStepPct":"DCA trigger (%)","dashboard.indicator.backtest.field.trendAddSizePct":"Scale-in size (% of capital)","dashboard.indicator.backtest.field.dcaAddSizePct":"DCA size (% of capital)","dashboard.indicator.backtest.field.trendAddMaxTimes":"Max scale-in times","dashboard.indicator.backtest.field.dcaAddMaxTimes":"Max DCA times","dashboard.indicator.backtest.field.trendReduceEnabled":"Trend reduce","dashboard.indicator.backtest.field.adverseReduceEnabled":"Adverse reduce","dashboard.indicator.backtest.field.trendReduceStepPct":"Trend trigger (%)","dashboard.indicator.backtest.field.adverseReduceStepPct":"Adverse trigger (%)","dashboard.indicator.backtest.field.trendReduceSizePct":"Reduce size (% of position)","dashboard.indicator.backtest.field.adverseReduceSizePct":"Adverse reduce size (% of position)","dashboard.indicator.backtest.field.trendReduceMaxTimes":"Max trend reduce times","dashboard.indicator.backtest.field.adverseReduceMaxTimes":"Max adverse reduce times","dashboard.indicator.backtest.field.entryPct":"Entry size (% of capital)","dashboard.indicator.backtest.field.minOrderPct":"Min order size (% of capital) (optional)","dashboard.indicator.backtest.hint.entryPctMax":"Max entry: {maxPct}% (reserve budget for future scale-ins)","backtest-center.title":"Backtest Center","backtest-center.subtitle":"Run indicator and strategy backtests in one place, review history and analyze results","backtest-center.tabs.indicator":"Indicator Backtest","backtest-center.tabs.strategy":"Strategy Backtest","backtest-center.indicator.selectIndicator":"Select Indicator","backtest-center.indicator.selectIndicatorPlaceholder":"Choose an indicator to backtest","backtest-center.indicator.noIndicators":"No custom indicators yet. Create one in Indicator Analysis first.","backtest-center.indicator.runBacktest":"Run Backtest","backtest-center.indicator.history":"History","backtest-center.indicator.goToIndicator":"Go to Indicator Analysis","backtest-center.strategy.selectStrategy":"Select Strategy","backtest-center.strategy.selectStrategyPlaceholder":"Choose a strategy to backtest","backtest-center.strategy.noStrategies":"No strategies yet. Create one in Trading Assistant first.","backtest-center.strategy.runBacktest":"Run Backtest","backtest-center.strategy.history":"History","backtest-center.strategy.goToAssistant":"Go to Trading Assistant","backtest-center.strategy.backtestConfig":"Backtest Parameters","backtest-center.strategy.running":"Running strategy backtest...","backtest-center.strategy.result":"Strategy Backtest Result","backtest-center.strategy.noResult":"No backtest result yet. Run a backtest first.","backtest-center.strategy.noIndicator":"This strategy has no linked indicator and cannot be backtested","backtest-center.empty":"Select an indicator or strategy from the left to start backtesting","backtest-center.running":"Running backtest...","backtest-center.emptyTitle":"Configure and Run Backtest","backtest-center.emptyDesc":"Select an indicator and symbol on the left, configure parameters, then click Run to see results","backtest-center.config.symbol":"Symbol","backtest-center.config.marketPlaceholder":"Select market","backtest-center.config.watchlistPlaceholder":"Select from watchlist","backtest-center.config.addSymbol":"Add Symbol","backtest-center.config.addSuccess":"Added successfully","backtest-center.config.noSearchResult":"No match found. The entered code will be used directly.","backtest-center.config.symbolPlaceholder":"Search symbol, e.g. BTC/USDT, AAPL","backtest-center.config.symbolRequired":"Please enter a trading symbol","backtest-center.config.monthUnit":" mo","backtest-center.config.yearUnit":" yr","backtest-center.config.timeframe":"Timeframe","backtest-center.config.dateRange":"Date Range","backtest-center.config.startDate":"Start date","backtest-center.config.endDate":"End date","backtest-center.config.capital":"Capital Settings","backtest-center.config.initialCapital":"Initial Capital","backtest-center.config.leverage":"Leverage","backtest-center.config.commission":"Commission","backtest-center.config.slippage":"Slippage","backtest-center.config.direction":"Trade Direction","backtest-center.config.long":"Long Only","backtest-center.config.short":"Short Only","backtest-center.config.both":"Both","backtest-center.config.riskPanel":"Risk Parameters","backtest-center.config.stopLoss":"Stop Loss","backtest-center.config.takeProfit":"Take Profit","backtest-center.config.entryPct":"Position Size","backtest-center.config.trailing":"Enable Trailing Stop","backtest-center.config.trailingPct":"Trailing Stop","backtest-center.config.trailingActivation":"Activation Threshold","backtest-center.tip.fetching":"Fetching candlestick data...","backtest-center.tip.computing":"Computing strategy signals...","backtest-center.tip.analyzing":"Analyzing trade results...","backtest-center.result.success":"Backtest completed!","backtest-center.result.failed":"Backtest failed. Please check parameters and try again.","backtest-center.result.totalReturn":"Total Return","backtest-center.result.annualReturn":"Annual Return","backtest-center.result.maxDrawdown":"Max Drawdown","backtest-center.result.sharpe":"Sharpe Ratio","backtest-center.result.winRate":"Win Rate","backtest-center.result.profitFactor":"Profit Factor","backtest-center.result.trades":"Total Trades","backtest-center.result.commission":"Total Commission","backtest-center.result.equityCurve":"Equity Curve","backtest-center.result.tradeHistory":"Trade History","backtest-center.result.colType":"Direction","backtest-center.result.colOpenAction":"Open","backtest-center.result.colCloseReason":"Close Reason","backtest-center.result.colEntry":"Entry Time","backtest-center.result.colExit":"Exit Time","backtest-center.result.colEntryPrice":"Entry Price","backtest-center.result.colExitPrice":"Exit Price","backtest-center.result.colProfit":"Profit","backtest-center.result.colBalance":"Equity Left","backtest-center.result.openLong":"Open Long","backtest-center.result.openShort":"Open Short","backtest-center.result.stopLoss":"Stop Loss","backtest-center.result.takeProfit":"Take Profit","backtest-center.result.trailingStop":"Trailing Stop","backtest-center.result.reverse":"Reverse Close","backtest-center.result.signal":"Signal Close","backtest-center.result.liquidation":"Liquidation","dashboard.docs.title":"Documentation","dashboard.docs.search.placeholder":"Search documents...","dashboard.docs.category.all":"All","dashboard.docs.category.guide":"Guides","dashboard.docs.category.api":"API Reference","dashboard.docs.category.tutorial":"Tutorials","dashboard.docs.category.faq":"FAQ","dashboard.docs.featured.title":"Featured Documents","dashboard.docs.featured.tag":"Featured","dashboard.docs.list.views":"views","dashboard.docs.list.author":"Author","dashboard.docs.list.empty":"No documents","dashboard.docs.list.backToAll":"Back to All Documents","dashboard.docs.list.total":"Total {count} documents","dashboard.docs.detail.back":"Back to List","dashboard.docs.detail.updatedAt":"Updated at","dashboard.docs.detail.related":"Related Documents","dashboard.docs.detail.notFound":"Document Not Found","dashboard.docs.detail.error":"Document does not exist or has been deleted","dashboard.docs.search.result":"Search Results","dashboard.docs.search.keyword":"Keyword","dashboard.totalEquity":"Total Equity","dashboard.totalPnL":"Total P&L","dashboard.aiStrategies":"AI Strategies","dashboard.indicatorStrategies":"Indicator Strategies","dashboard.running":"Running","dashboard.enabled":"Enabled","dashboard.pnlHistory":"P&L History","dashboard.strategyPerformance":"Strategy Performance","dashboard.strategyRanking":"Strategy Ranking","dashboard.winRate":"Win Rate","dashboard.profitFactor":"Profit Factor","dashboard.maxDrawdown":"Max Drawdown","dashboard.totalTrades":"Total Trades","dashboard.runningStrategies":"Running Strategies","dashboard.equityCurve":"Equity Curve","dashboard.strategyAllocation":"Strategy Allocation","dashboard.drawdownCurve":"Drawdown Curve","dashboard.drawdown":"Drawdown","dashboard.hourlyDistribution":"Hourly Distribution","dashboard.dailyPnl":"Daily P&L","dashboard.cumulativePnl":"Cumulative P&L","dashboard.tradeCount":"Trade Count","dashboard.profit":"Profit","dashboard.noData":"No Data","dashboard.noStrategyData":"No strategy data","dashboard.setupGuide.title":"No live strategy is running yet","dashboard.setupGuide.desc":'Go to "Strategy Management" first, create a strategy, and switch its execution mode to "Live Trading". Positions, trades, and performance will show up here afterwards.',"dashboard.setupGuide.path":"Path: Strategy Management -> Create Strategy -> Choose execution mode (Signal Only / Live Trading)","dashboard.setupGuide.primary":"Create Strategy","dashboard.setupGuide.secondary":"Open Strategy Management","dashboard.ranking.totalProfit":"Total Profit","dashboard.ranking.roi":"ROI","dashboard.ranking.trades":"Trades","dashboard.unit.trades":"","dashboard.unit.strategies":"","dashboard.label.avgDaily":"Avg Daily","dashboard.label.avgProfit":"Avg Profit","dashboard.label.win":"W","dashboard.label.lose":"L","dashboard.label.trade":"Trades","dashboard.label.indicator":"Indicator","dashboard.label.totalPnl":"Total P&L","dashboard.label.maxDrawdownPoint":"Max DD","dashboard.profitCalendar":"Profit Calendar","dashboard.recentTrades":"Recent Trades","dashboard.currentPositions":"Current Positions","dashboard.table.time":"Time","dashboard.table.strategy":"Strategy","dashboard.table.symbol":"Symbol","dashboard.table.type":"Type","dashboard.table.side":"Side","dashboard.table.size":"Size","dashboard.table.entryPrice":"Entry Price","dashboard.table.price":"Price","dashboard.table.amount":"Amount","dashboard.table.profit":"Profit","dashboard.pendingOrders":"Order Execution Records","dashboard.totalOrders":"Total {total} orders","dashboard.viewError":"View Error","dashboard.filled":"Filled","dashboard.orderTable.time":"Created Time","dashboard.orderTable.strategy":"Strategy","dashboard.orderTable.symbol":"Symbol","dashboard.orderTable.signalType":"Signal Type","dashboard.orderTable.amount":"Amount","dashboard.orderTable.price":"Filled Price","dashboard.orderTable.status":"Status","dashboard.orderTable.timeInfo":"Time","dashboard.orderTable.executedAt":"Executed Time","dashboard.orderTable.exchange":"Exchange","dashboard.orderTable.notify":"Notify","dashboard.orderTable.actions":"Actions","dashboard.orderTable.delete":"Delete","dashboard.orderTable.deleteConfirm":"Delete this record?","dashboard.orderTable.deleteSuccess":"Deleted","dashboard.orderTable.deleteFailed":"Delete failed","dashboard.newOrderNotify":"New Order Alert","dashboard.newOrderDesc":"New order execution record","dashboard.soundEnabled":"Sound notification enabled","dashboard.soundDisabled":"Sound notification disabled","dashboard.clickToMute":"Click to mute","dashboard.clickToUnmute":"Click to unmute","dashboard.signalType.openLong":"Open Long","dashboard.signalType.openShort":"Open Short","dashboard.signalType.closeLong":"Close Long","dashboard.signalType.closeShort":"Close Short","dashboard.signalType.addLong":"Add Long","dashboard.signalType.addShort":"Add Short","dashboard.status.pending":"Pending","dashboard.status.processing":"Processing","dashboard.status.completed":"Completed","dashboard.status.failed":"Failed","dashboard.status.cancelled":"Cancelled","dashboard.table.pnl":"Unrealized P&L","form.basic-form.basic.title":"Basic form","form.basic-form.basic.description":"Form pages are used to collect or verify information to users, and basic forms are common in scenarios where there are fewer data items.","form.basic-form.title.label":"Title","form.basic-form.title.placeholder":"Give the target a name","form.basic-form.title.required":"Please enter a title","form.basic-form.date.label":"Start and end date","form.basic-form.placeholder.start":"Start date","form.basic-form.placeholder.end":"End date","form.basic-form.date.required":"Please select the start and end date","form.basic-form.goal.label":"Goal description","form.basic-form.goal.placeholder":"Please enter your work goals","form.basic-form.goal.required":"Please enter a description of the goal","form.basic-form.standard.label":"Metrics","form.basic-form.standard.placeholder":"Please enter a metric","form.basic-form.standard.required":"Please enter a metric","form.basic-form.client.label":"Client","form.basic-form.label.tooltip":"Target service object","form.basic-form.client.placeholder":"Please describe your customer service, internal customers directly @ Name / job number","form.basic-form.client.required":"Please describe the customers you serve","form.basic-form.invites.label":"Inviting critics","form.basic-form.invites.placeholder":"Please direct @ Name / job number, you can invite up to 5 people","form.basic-form.weight.label":"Weight","form.basic-form.weight.placeholder":"Please enter weight","form.basic-form.public.label":"Target disclosure","form.basic-form.label.help":"Customers and invitees are shared by default","form.basic-form.radio.public":"Public","form.basic-form.radio.partially-public":"Partially public","form.basic-form.radio.private":"Private","form.basic-form.publicUsers.placeholder":"Open to","form.basic-form.option.A":"Colleague A","form.basic-form.option.B":"Colleague B","form.basic-form.option.C":"Colleague C","form.basic-form.email.required":"Please enter your email!","form.basic-form.email.wrong-format":"The email address is in the wrong format!","form.basic-form.userName.required":"Please enter your userName!","form.basic-form.password.required":"Please enter your password!","form.basic-form.password.twice":"The passwords entered twice do not match!","form.basic-form.strength.msg":"Please enter at least 6 characters and don't use passwords that are easy to guess.","form.basic-form.strength.strong":"Strength: strong","form.basic-form.strength.medium":"Strength: medium","form.basic-form.strength.short":"Strength: too short","form.basic-form.confirm-password.required":"Please confirm your password!","form.basic-form.phone-number.required":"Please enter your phone number!","form.basic-form.phone-number.wrong-format":"Malformed phone number!","form.basic-form.verification-code.required":"Please enter the verification code!","form.basic-form.form.get-captcha":"Get Captcha","form.basic-form.captcha.second":"sec","form.basic-form.form.optional":" (optional) ","form.basic-form.form.submit":"Submit","form.basic-form.form.save":"Save","form.basic-form.email.placeholder":"Email","form.basic-form.password.placeholder":"Password","form.basic-form.confirm-password.placeholder":"Confirm password","form.basic-form.phone-number.placeholder":"Phone number","form.basic-form.verification-code.placeholder":"Verification code","result.success.title":"Submission Success","result.success.description":"The submission results page is used to feed back the results of a series of operational tasks. If it is a simple operation, use the Message global prompt feedback. This text area can show a simple supplementary explanation. If there is a similar requirement for displaying “documents”, the following gray area can present more complicated content.","result.success.operate-title":"Project Name","result.success.operate-id":"Project ID","result.success.principal":"Principal","result.success.operate-time":"Effective time","result.success.step1-title":"Create project","result.success.step1-operator":"Qu Lili","result.success.step2-title":"Departmental preliminary review","result.success.step2-operator":"Zhou Maomao","result.success.step2-extra":"Urge","result.success.step3-title":"Financial review","result.success.step4-title":"Finish","result.success.btn-return":"Back List","result.success.btn-project":"View Project","result.success.btn-print":"Print","result.fail.error.title":"Submission Failed","result.fail.error.description":"Please check and modify the following information before resubmitting.","result.fail.error.hint-title":"The content you submitted has the following error:","result.fail.error.hint-text1":"Your account has been frozen","result.fail.error.hint-btn1":"Thaw immediately","result.fail.error.hint-text2":"Your account is not yet eligible to apply","result.fail.error.hint-btn2":"Upgrade immediately","result.fail.error.btn-text":"Return to modify","account.settings.menuMap.custom":"Custom Settings","account.settings.menuMap.binding":"Account Binding","account.settings.basic.avatar":"Avatar","account.settings.basic.change-avatar":"Change avatar","account.settings.basic.email":"Email","account.settings.basic.email-message":"Please input your email!","account.settings.basic.nickname":"Nickname","account.settings.basic.nickname-message":"Please input your Nickname!","account.settings.basic.profile":"Personal profile","account.settings.basic.profile-message":"Please input your personal profile!","account.settings.basic.profile-placeholder":"Brief introduction to yourself","account.settings.basic.country":"Country/Region","account.settings.basic.country-message":"Please input your country!","account.settings.basic.geographic":"Province or city","account.settings.basic.geographic-message":"Please input your geographic info!","account.settings.basic.address":"Street Address","account.settings.basic.address-message":"Please input your address!","account.settings.basic.phone":"Phone Number","account.settings.basic.phone-message":"Please input your phone!","account.settings.basic.update":"Update Information","account.settings.basic.update.success":"Update basic information successfully","account.settings.security.strong":"Strong","account.settings.security.medium":"Medium","account.settings.security.weak":"Weak","account.settings.security.password":"Account Password","account.settings.security.password-description":"Current password strength:","account.settings.security.phone":"Security Phone","account.settings.security.phone-description":"Bound phone:","account.settings.security.question":"Security Question","account.settings.security.question-description":"The security question is not set, and the security policy can effectively protect the account security","account.settings.security.email":"Bound Email","account.settings.security.email-description":"Bound Email:","account.settings.security.mfa":"MFA Device","account.settings.security.mfa-description":"Unbound MFA device, after binding, can be confirmed twice","account.settings.security.modify":"Modify","account.settings.security.set":"Set","account.settings.security.bind":"Bind","account.settings.binding.taobao":"Binding Taobao","account.settings.binding.taobao-description":"Currently unbound Taobao account","account.settings.binding.alipay":"Binding Alipay","account.settings.binding.alipay-description":"Currently unbound Alipay account","account.settings.binding.dingding":"Binding DingTalk","account.settings.binding.dingding-description":"Currently unbound DingTalk account","account.settings.binding.bind":"Bind","account.settings.notification.password":"Account Password","account.settings.notification.password-description":"Messages from other users will be notified in the form of a station letter","account.settings.notification.messages":"System Messages","account.settings.notification.messages-description":"System messages will be notified in the form of a station letter","account.settings.notification.todo":"To-do Notification","account.settings.notification.todo-description":"The to-do list will be notified in the form of a letter from the station","account.settings.settings.open":"Open","account.settings.settings.close":"Close","trading-assistant.title":"Trading Assistant","trading-assistant.strategyList":"Strategy List","trading-assistant.createStrategy":"Create Strategy","trading-assistant.noStrategy":"No strategies","trading-assistant.selectStrategy":"Please select a strategy from the left to view details","trading-assistant.guide.title":"Start live trading from here","trading-assistant.guide.desc":'To enable automated live trading, go to "Strategy Management", create a strategy, then switch its execution mode to "Live Trading".',"trading-assistant.guide.eyebrow":"Quick Start","trading-assistant.guide.path":"Path: Strategy Management -> Create Strategy -> Choose execution mode (Signal Only / Live Trading)","trading-assistant.guide.step1Title":"Create a strategy","trading-assistant.guide.step1Desc":"Open Strategy Management and create your first strategy.","trading-assistant.guide.step2Title":"Switch to live mode","trading-assistant.guide.step2Desc":'Choose "Live Trading" as the execution mode.',"trading-assistant.guide.step3Title":"Monitor it here","trading-assistant.guide.step3Desc":"Come back to Live Overview to see positions, trades, and performance.","trading-assistant.guide.primary":"New Strategy / Create Live Setup","trading-assistant.guide.secondary":"Open Strategy Management","trading-assistant.empty.title":"No strategy yet","trading-assistant.empty.desc":'Create your first strategy, then choose its execution mode. If you select "Live Trading", it will appear in the Live Overview tab.',"trading-assistant.empty.path":"Recommended first step: create one strategy, then add exchange connection and notification settings.","trading-assistant.empty.primary":"Create First Strategy","trading-assistant.startStrategy":"Start Strategy","trading-assistant.stopStrategy":"Stop Strategy","trading-assistant.editStrategy":"Edit Strategy","trading-assistant.deleteStrategy":"Delete Strategy","trading-assistant.startAll":"Start All","trading-assistant.stopAll":"Stop All","trading-assistant.deleteAll":"Delete All","trading-assistant.symbolCount":"symbols","trading-assistant.strategyCount":"strategies","trading-assistant.groupBy":"Group By","trading-assistant.groupByStrategy":"Strategy","trading-assistant.groupBySymbol":"Symbol","trading-assistant.timeframe":"Timeframe","trading-assistant.indicator":"Indicator","trading-assistant.status.running":"Running","trading-assistant.status.stopped":"Stopped","trading-assistant.status.error":"Error","trading-assistant.strategyType.IndicatorStrategy":"Indicator Strategy","trading-assistant.strategyType.PromptBasedStrategy":"Prompt Strategy","trading-assistant.strategyType.GridStrategy":"Grid Strategy","trading-assistant.tabs.tradingRecords":"Trading Records","trading-assistant.tabs.positions":"Positions","trading-assistant.tabs.equityCurve":"Equity Curve","trading-assistant.form.step1":"Select Indicator","trading-assistant.form.step2":"Exchange Configuration","trading-assistant.form.step3":"Strategy Parameters","trading-assistant.form.step2Params":"Parameters","trading-assistant.form.step3Signal":"Signal Delivery","trading-assistant.form.simpleMode":"Simple","trading-assistant.form.advancedMode":"Advanced","trading-assistant.form.simpleModeHint":"Keep only the essentials and finish setup in about a minute","trading-assistant.form.advancedModeHint":"Best for TP/SL, position sizing and AI filter configuration","trading-assistant.form.defaultStrategyName":"Auto","trading-assistant.form.defaultStrategySuffix":" Strategy","trading-assistant.form.strategyNameHint":"A default name has been generated for you, but you can change it anytime","trading-assistant.form.simpleModePreset":"Recommended defaults","trading-assistant.form.simpleModePresetValue":"Starts with 15m / Futures / 5x. You can add TP/SL and position management later in Advanced mode.","trading-assistant.form.simpleModeSectionCore":"Core trading setup","trading-assistant.form.simpleModeSectionCoreDesc":"Finish pair and capital settings first, then decide whether to enable live trading or add advanced risk controls.","trading-assistant.form.step2HeroTitle":"Final execution setup","trading-assistant.form.step2HeroDesc":"Choose whether this strategy should only send signals or connect to live trading, then configure notification channels so you never miss an alert.","trading-assistant.form.executionSectionTitle":"Execution mode","trading-assistant.form.executionSectionDesc":"Pick how the strategy should run. If the market supports it, you can switch directly to automated live trading.","trading-assistant.form.notificationSectionTitle":"Signal notifications","trading-assistant.form.notificationSectionDesc":"Keep at least one instant notification channel enabled so you can react quickly to entries and exits.","trading-assistant.form.riskSectionTitle":"Risk notice","trading-assistant.form.riskSectionDesc":"Before enabling live trading, double-check the trading risk and your account permission scope.","trading-assistant.form.liveConnectionSectionTitle":"Live connection","trading-assistant.form.liveConnectionSectionDesc":"Select a saved exchange credential. The strategy will use this account for real order execution.","trading-assistant.form.simpleStep1":"Select Indicator & Pair","trading-assistant.form.simpleStep2":"Launch Mode","trading-assistant.form.simpleDefaultsHint":"Defaults (expand to customize)","trading-assistant.form.showAdvancedSettings":"Show Advanced Settings","trading-assistant.form.hideAdvancedSettings":"Hide Advanced Settings","trading-assistant.form.marketCategory":"Market Category","trading-assistant.form.marketCategoryHint":"Select a market first. Only Crypto can enable live trading; other markets are signal-only.","trading-assistant.market.USStock":"US Stock","trading-assistant.market.Crypto":"Crypto","trading-assistant.market.Forex":"Forex","trading-assistant.form.indicator":"Select Indicator","trading-assistant.form.indicatorHint":"You can only select indicators you have purchased or created","trading-assistant.form.qdtCostHints":"Using strategies will consume QDT, please ensure your account has sufficient QDT balance","trading-assistant.form.indicatorDescription":"Indicator Description","trading-assistant.form.noDescription":"No description","trading-assistant.form.indicatorParams":"Indicator Parameters","trading-assistant.form.indicatorParamsHint":"These parameters will be passed to the indicator code. Different strategies can use different parameter values.","trading-assistant.form.exchange":"Select Exchange","trading-assistant.form.apiKey":"API Key","trading-assistant.form.secretKey":"Secret Key","trading-assistant.form.passphrase":"Passphrase","trading-assistant.form.testConnection":"Test Connection","trading-assistant.form.strategyName":"Strategy Name","trading-assistant.form.symbol":"Trading Pair","trading-assistant.form.symbols":"Trading Pairs (Multi-select)","trading-assistant.form.symbolHint":"Symbol format depends on the selected market","trading-assistant.form.symbolsHint":"Select multiple pairs to create strategies for each","trading-assistant.form.strategyType":"Strategy Type","trading-assistant.form.strategyTypeSingle":"Single Symbol Strategy","trading-assistant.form.strategyTypeCrossSectional":"Cross-Sectional Strategy","trading-assistant.form.strategyTypeHint":"Single Symbol: Trade a single symbol; Cross-Sectional: Manage a portfolio of multiple symbols","trading-assistant.form.symbolList":"Symbol List","trading-assistant.form.symbolListHint":"Select multiple symbols, strategy will rank and rebalance based on indicator scores","trading-assistant.form.portfolioSize":"Portfolio Size","trading-assistant.form.portfolioSizeHint":"Number of symbols to hold simultaneously","trading-assistant.form.longRatio":"Long Ratio","trading-assistant.form.longRatioHint":"Proportion of long positions (0-1), e.g. 0.5 means 50% long, 50% short","trading-assistant.form.rebalanceFrequency":"Rebalance Frequency","trading-assistant.form.rebalanceDaily":"Daily","trading-assistant.form.rebalanceWeekly":"Weekly","trading-assistant.form.rebalanceMonthly":"Monthly","trading-assistant.form.rebalanceFrequencyHint":"Frequency of portfolio rebalancing","trading-assistant.form.addSymbol":"Add Symbol","trading-assistant.form.addSymbolTitle":"Add Symbol to Watchlist","trading-assistant.form.searchSymbolPlaceholder":"Search by code, e.g. BTC, AAPL","trading-assistant.form.noSymbolFound":"No matching symbol found","trading-assistant.form.canDirectAdd":"You can directly add the code","trading-assistant.form.searchSymbolHint":"Enter code to search symbols","trading-assistant.form.confirmAdd":"Confirm Add","trading-assistant.form.addSymbolSuccess":"Symbol added successfully","trading-assistant.form.addSymbolFailed":"Failed to add, please try again","trading-assistant.form.pleaseSelectSymbol":"Please select or enter a symbol","trading-assistant.form.symbolHintCrypto":"Crypto: use trading pairs like BTC/USDT","trading-assistant.form.symbolHintGeneral":"Enter the symbol for the selected market (e.g. 600519, AAPL, EURUSD).","trading-assistant.form.initialCapital":"Initial Capital","trading-assistant.form.marketType":"Market Type","trading-assistant.form.marketTypeFutures":"Futures","trading-assistant.form.marketTypeSpot":"Spot","trading-assistant.form.marketTypeHint":"Futures support bidirectional trading and leverage, spot only supports long positions with fixed 1x leverage","trading-assistant.form.leverage":"Leverage","trading-assistant.form.leverageHint":"Futures: 1-125x, Spot: Fixed 1x","trading-assistant.form.spotLeverageFixed":"Spot trading leverage is fixed at 1x","trading-assistant.form.spotOnlyLongHint":"Spot trading only supports long positions","trading-assistant.form.tradeDirection":"Trade Direction","trading-assistant.form.tradeDirectionLong":"Long Only","trading-assistant.form.tradeDirectionShort":"Short Only","trading-assistant.form.tradeDirectionBoth":"Both","trading-assistant.form.timeframe":"Timeframe","trading-assistant.form.klinePeriod":"K-Line Period","trading-assistant.form.timeframe1m":"1 Minute","trading-assistant.form.timeframe5m":"5 Minutes","trading-assistant.form.timeframe15m":"15 Minutes","trading-assistant.form.timeframe30m":"30 Minutes","trading-assistant.form.timeframe1H":"1 Hour","trading-assistant.form.timeframe4H":"4 Hours","trading-assistant.form.timeframe1D":"1 Day","trading-assistant.form.selectStrategyType":"Select Strategy Type","trading-assistant.form.indicatorStrategy":"Indicator Strategy","trading-assistant.form.indicatorStrategyDesc":"Automated trading strategy based on technical indicators","trading-assistant.form.aiStrategy":"AI Strategy","trading-assistant.form.aiStrategyDesc":"Automated trading strategy based on AI intelligent decision-making","trading-assistant.form.enableAiFilter":"Enable AI Intelligent Decision Filter","trading-assistant.form.enableAiFilterHint":"When enabled, indicator signals will be filtered by AI to improve trading quality","trading-assistant.form.aiFilterPrompt":"Custom Prompt","trading-assistant.form.aiFilterPromptHint":"Provide custom instructions for AI filtering, leave blank to use system default","trading-assistant.validation.strategyTypeRequired":"Please select a strategy type","trading-assistant.validation.marketCategoryRequired":"Please select a market category","trading-assistant.form.advancedSettings":"Advanced Settings","trading-assistant.form.orderMode":"Order Mode","trading-assistant.form.orderModeMaker":"Maker (Limit)","trading-assistant.form.orderModeTaker":"Taker (Market)","trading-assistant.form.orderModeHint":"Maker mode uses limit orders with lower fees; Taker mode executes immediately with higher fees","trading-assistant.form.makerWaitSec":"Maker Wait Time (seconds)","trading-assistant.form.makerWaitSecHint":"Time to wait for order fill before canceling and retrying","trading-assistant.form.makerRetries":"Maker Retries","trading-assistant.form.makerRetriesHint":"Maximum number of retries when maker order is not filled","trading-assistant.form.fallbackToMarket":"Fallback to Market on failure","trading-assistant.form.fallbackToMarketHint":"If limit order (open/close) is not filled, downgrade to market order to ensure execution","trading-assistant.form.marginMode":"Margin Mode","trading-assistant.form.marginModeCross":"Cross Margin","trading-assistant.form.marginModeIsolated":"Isolated Margin","trading-assistant.form.stopLossPct":"Stop Loss (%)","trading-assistant.form.stopLossPctHint":"Set stop loss percentage, 0 means disabled","trading-assistant.form.takeProfitPct":"Take Profit (%)","trading-assistant.form.takeProfitPctHint":"Set take profit percentage, 0 means disabled","trading-assistant.form.commission":"Commission (%)","trading-assistant.form.commissionHint":"Trading fee percentage (optional)","trading-assistant.form.slippage":"Slippage (%)","trading-assistant.form.slippageHint":"Estimated slippage percentage (optional)","trading-assistant.form.executionMode":"Execution","trading-assistant.form.executionModeSignal":"Signal only (push notifications)","trading-assistant.form.executionModeLive":"Live trading","trading-assistant.form.executionModeSignalDesc":"The system only sends strategy alerts and signals. You decide whether to place the order manually.","trading-assistant.form.executionModeLiveDesc":"The strategy connects to your trading account and places real orders automatically after you confirm the risk setup.","trading-assistant.form.liveTradingCryptoOnlyHint":"Live trading is available for Crypto only. Other markets can only push signals.","trading-assistant.form.liveTradingNotSupportedHint":"Live trading is not available for this market","trading-assistant.form.broker":"Broker","trading-assistant.form.localDeploymentRequired":"⚠️ Local Deployment Required","trading-assistant.form.localDeploymentHint":"IBKR and MT5 are external trading interfaces that require local deployment of QuantDinger. Cloud SaaS mode is not supported. Please ensure you have installed and configured the trading software (TWS/IB Gateway or MT5 terminal) on your local machine.","trading-assistant.form.ibkrConnectionTitle":"Interactive Brokers Connection","trading-assistant.form.ibkrConnectionHint":"Make sure TWS or IB Gateway is running with API enabled","trading-assistant.validation.brokerRequired":"Please select a broker","trading-assistant.placeholders.selectBroker":"Select broker","trading-assistant.brokerNames":{ibkr:"Interactive Brokers (IBKR)",mt5:"MetaTrader 5 (MT5)",mt4:"MetaTrader 4 (MT4)",futu:"Futu Securities",tiger:"Tiger Brokers",td:"TD Ameritrade",schwab:"Charles Schwab"},"trading-assistant.form.ibkrHost":"Host","trading-assistant.form.ibkrPort":"Port","trading-assistant.form.ibkrPortHint":"TWS Live:7497, TWS Paper:7496, Gateway Live:4001, Gateway Paper:4002","trading-assistant.form.ibkrClientId":"Client ID","trading-assistant.form.ibkrAccount":"Account","trading-assistant.form.ibkrAccountHint":"Leave empty to auto-select first account. Specify for multi-account users.","trading-assistant.placeholders.ibkrAccount":"Optional, e.g. U1234567","trading-assistant.exchange.ibkrConnectionSuccess":"IBKR connected successfully","trading-assistant.exchange.ibkrConnectionFailed":"IBKR connection failed. Please check if TWS/Gateway is running.","trading-assistant.exchange.checkLocalDeployment":"Please ensure you are running locally. Cloud SaaS does not support external trading interfaces.","trading-assistant.form.forexBroker":"Forex Broker","trading-assistant.form.mt5ConnectionTitle":"MetaTrader 5 Connection","trading-assistant.form.mt5ConnectionHint":"Make sure MT5 terminal is running and logged in (Windows only)","trading-assistant.form.mt5Server":"Server","trading-assistant.form.mt5ServerHint":"Broker server name (e.g., ICMarkets-Demo)","trading-assistant.form.mt5Login":"Account Number","trading-assistant.form.mt5Password":"Password","trading-assistant.form.mt5TerminalPath":"MT5 Terminal Path (Optional)","trading-assistant.form.mt5TerminalPathHint":"If MT5 terminal is not installed in the default location, specify the full path to terminal64.exe (e.g., C:\\Program Files\\MetaTrader 5\\terminal64.exe)","trading-assistant.placeholders.mt5Server":"e.g., ICMarkets-Demo","trading-assistant.placeholders.mt5Login":"e.g., 12345678","trading-assistant.placeholders.mt5Password":"Your MT5 password","trading-assistant.placeholders.mt5TerminalPath":"e.g., C:\\Program Files\\MetaTrader 5\\terminal64.exe","trading-assistant.validation.mt5ServerRequired":"Please enter MT5 server","trading-assistant.validation.mt5LoginRequired":"Please enter MT5 account number","trading-assistant.validation.mt5PasswordRequired":"Please enter MT5 password","trading-assistant.validation.portfolioSizeRequired":"Please enter portfolio size","trading-assistant.validation.longRatioRequired":"Please enter long ratio","trading-assistant.exchange.mt5ConnectionSuccess":"MT5 connected successfully","trading-assistant.exchange.mt5ConnectionFailed":"MT5 connection failed. Please check if terminal is running.","trading-assistant.form.notifyChannels":"Notification Channels","trading-assistant.form.notifyChannelsHint":"Choose how you want to receive buy/sell and risk-management signals.","trading-assistant.notify.browser":"Browser","trading-assistant.notify.email":"Email","trading-assistant.notify.phone":"Phone","trading-assistant.notify.telegram":"Telegram","trading-assistant.notify.discord":"Discord","trading-assistant.notify.webhook":"Webhook","trading-assistant.form.notifyEmail":"Email","trading-assistant.form.notifyPhone":"Phone number","trading-assistant.form.notifyTelegram":"Telegram (chat id / username)","trading-assistant.form.notifyDiscord":"Discord (webhook url)","trading-assistant.form.notifyWebhook":"Webhook URL","trading-assistant.form.liveTradingConfigTitle":"Exchange Credentials","trading-assistant.form.liveTradingConfigHint":"Provide your exchange API credentials. You can test the connection before saving.","trading-assistant.form.savedCredential":"Saved credential","trading-assistant.form.savedCredentialHint":"Select a saved credential to auto-fill API keys (optional).","trading-assistant.form.saveCredential":"Save this credential for future use","trading-assistant.form.credentialName":"Credential name (optional)","trading-assistant.form.signalMode":"Signal Mode","trading-assistant.form.signalModeConfirmed":"Confirmed","trading-assistant.form.signalModeAggressive":"Aggressive","trading-assistant.form.signalModeHint":"Confirmed: only check completed candles; Aggressive: also check forming candles","trading-assistant.form.cancel":"Cancel","trading-assistant.form.prev":"Previous","trading-assistant.form.next":"Next","trading-assistant.form.confirmCreate":"Confirm Create","trading-assistant.form.confirmEdit":"Confirm Edit","trading-assistant.messages.createSuccess":"Strategy created successfully","trading-assistant.messages.createFailed":"Failed to create strategy","trading-assistant.messages.updateSuccess":"Strategy updated successfully","trading-assistant.messages.updateFailed":"Failed to update strategy","trading-assistant.messages.deleteSuccess":"Strategy deleted successfully","trading-assistant.messages.deleteFailed":"Failed to delete strategy","trading-assistant.messages.startSuccess":"Strategy started successfully","trading-assistant.messages.startFailed":"Failed to start strategy","trading-assistant.messages.stopSuccess":"Strategy stopped successfully","trading-assistant.messages.stopFailed":"Failed to stop strategy","trading-assistant.messages.loadFailed":"Failed to load strategy list","trading-assistant.messages.runningWarning":"Strategy is running, please stop it before editing","trading-assistant.messages.deleteConfirmWithName":'Are you sure you want to delete strategy "{name}"? This action cannot be undone.',"trading-assistant.messages.deleteConfirm":"Are you sure you want to delete this strategy? This action cannot be undone.","trading-assistant.messages.loadTradesFailed":"Failed to load trading records","trading-assistant.messages.loadPositionsFailed":"Failed to load position records","trading-assistant.messages.loadEquityFailed":"Failed to load equity curve","trading-assistant.messages.loadIndicatorsFailed":"Failed to load indicator list, please try again later","trading-assistant.messages.spotLimitations":"Spot trading has been automatically set to long only with 1x leverage","trading-assistant.messages.autoFillApiConfig":"Auto-filled API configuration for this exchange from history","trading-assistant.messages.batchCreateSuccess":"Successfully created {count} strategies","trading-assistant.messages.batchStartSuccess":"Successfully started {count} strategies","trading-assistant.messages.batchStartFailed":"Failed to start strategies","trading-assistant.messages.batchStopSuccess":"Successfully stopped {count} strategies","trading-assistant.messages.batchStopFailed":"Failed to stop strategies","trading-assistant.messages.batchDeleteSuccess":"Successfully deleted {count} strategies","trading-assistant.messages.batchDeleteFailed":"Failed to delete strategies","trading-assistant.messages.batchDeleteConfirm":'Are you sure you want to delete {count} strategies in group "{name}"? This action cannot be undone.',"trading-assistant.placeholders.selectIndicator":"Please select an indicator","trading-assistant.placeholders.selectExchange":"Please select an exchange","trading-assistant.placeholders.selectMarketCategory":"Please select market category","trading-assistant.placeholders.inputApiKey":"Please enter API Key","trading-assistant.placeholders.inputSecretKey":"Please enter Secret Key","trading-assistant.placeholders.inputPassphrase":"Please enter Passphrase","trading-assistant.placeholders.inputStrategyName":"Please enter strategy name","trading-assistant.placeholders.selectSymbol":"Please select trading pair","trading-assistant.placeholders.selectSymbols":"Please select trading pairs (multi-select)","trading-assistant.placeholders.inputSymbol":"Please enter symbol","trading-assistant.placeholders.selectTimeframe":"Please select timeframe","trading-assistant.placeholders.selectKlinePeriod":"Please select K-line period","trading-assistant.placeholders.inputAiFilterPrompt":"Please enter custom prompt (optional)","trading-assistant.placeholders.inputEmail":"Please enter email","trading-assistant.placeholders.inputPhone":"Please enter phone number","trading-assistant.placeholders.inputTelegram":"Please enter Telegram chat id / username","trading-assistant.placeholders.inputDiscord":"Please enter Discord webhook url","trading-assistant.placeholders.inputWebhook":"Please enter webhook url","trading-assistant.placeholders.selectSavedCredential":"Select saved credential","trading-assistant.placeholders.inputCredentialName":"For example: Binance main key","trading-assistant.validation.indicatorRequired":"Please select an indicator","trading-assistant.validation.exchangeRequired":"Please select an exchange","trading-assistant.validation.apiKeyRequired":"Please enter API Key","trading-assistant.validation.secretKeyRequired":"Please enter Secret Key","trading-assistant.validation.passphraseRequired":"Please enter Passphrase","trading-assistant.validation.exchangeConfigIncomplete":"Please fill in complete exchange configuration information","trading-assistant.validation.testConnectionRequired":'Please click "Test Connection" button and ensure the connection is successful',"trading-assistant.validation.testConnectionFailed":"Connection test failed, please check the configuration and test again","trading-assistant.validation.credentialRequired":"Please add and test exchange credentials in Personal Center first","trading-assistant.validation.strategyNameRequired":"Please enter strategy name","trading-assistant.validation.symbolRequired":"Please select trading pair","trading-assistant.validation.symbolsRequired":"Please select at least one trading pair","trading-assistant.validation.initialCapitalRequired":"Please enter initial capital","trading-assistant.validation.leverageRequired":"Please enter leverage","trading-assistant.validation.emailInvalid":"Invalid email address","trading-assistant.validation.notifyChannelRequired":"Please select at least one notification channel","trading-assistant.table.time":"Time","trading-assistant.table.type":"Type","trading-assistant.table.price":"Price","trading-assistant.table.amount":"Amount","trading-assistant.table.value":"Value","trading-assistant.table.commission":"Commission","trading-assistant.table.symbol":"Trading Pair","trading-assistant.table.side":"Side","trading-assistant.table.size":"Position Size","trading-assistant.table.entryPrice":"Entry Price","trading-assistant.table.currentPrice":"Current Price","trading-assistant.table.unrealizedPnl":"Unrealized P&L","trading-assistant.table.pnlPercent":"P&L %","trading-assistant.table.buy":"Buy","trading-assistant.table.sell":"Sell","trading-assistant.table.long":"Long","trading-assistant.table.short":"Short","trading-assistant.table.noPositions":"No positions","trading-assistant.detail.title":"Strategy Details","trading-assistant.detail.strategyName":"Strategy Name","trading-assistant.detail.strategyType":"Strategy Type","trading-assistant.detail.status":"Status","trading-assistant.detail.tradingMode":"Trading Mode","trading-assistant.detail.exchange":"Exchange","trading-assistant.detail.initialCapital":"Initial Capital","trading-assistant.detail.totalInvestment":"Total Investment","trading-assistant.detail.currentEquity":"Current Equity","trading-assistant.detail.totalPnl":"Total P&L","trading-assistant.detail.indicatorName":"Indicator Name","trading-assistant.detail.maxLeverage":"Max Leverage","trading-assistant.detail.decideInterval":"Decision Interval","trading-assistant.detail.symbols":"Trading Symbols","trading-assistant.detail.createdAt":"Created At","trading-assistant.detail.updatedAt":"Updated At","trading-assistant.detail.llmConfig":"AI Model Configuration","trading-assistant.detail.exchangeConfig":"Exchange Configuration","trading-assistant.detail.provider":"Provider","trading-assistant.detail.modelId":"Model ID","trading-assistant.detail.close":"Close","trading-assistant.detail.loadFailed":"Failed to load strategy details","trading-assistant.equity.noData":"No equity data","trading-assistant.equity.equity":"Equity","trading-assistant.exchange.tradingMode":"Trading Mode","trading-assistant.exchange.virtual":"Virtual Trading","trading-assistant.exchange.live":"Live Trading","trading-assistant.exchange.selectExchange":"Select Exchange","trading-assistant.exchange.walletAddress":"Wallet Address","trading-assistant.exchange.walletAddressPlaceholder":"Please enter wallet address (starts with 0x)","trading-assistant.exchange.privateKey":"Private Key","trading-assistant.exchange.privateKeyPlaceholder":"Please enter private key (64 characters)","trading-assistant.exchange.testConnection":"Test Connection","trading-assistant.exchange.connectionSuccess":"Connection successful","trading-assistant.exchange.connectionFailed":"Connection failed","trading-assistant.exchange.testFailed":"Connection test failed","trading-assistant.exchange.fillComplete":"Please fill in complete exchange configuration information","trading-assistant.exchange.ipWhitelistTip":"Please add the following IPs to the whitelist in your exchange API settings:","trading-assistant.strategyTypeOptions.ai":"AI-Driven Strategy","trading-assistant.strategyTypeOptions.indicator":"Indicator Strategy","trading-assistant.strategyTypeOptions.aiDeveloping":"AI-Driven Strategy feature is under development, stay tuned","trading-assistant.strategyTypeOptions.aiDevelopingWarning":"AI-Driven Strategy feature is under development","trading-assistant.indicatorType.trend":"Trend","trading-assistant.indicatorType.momentum":"Momentum","trading-assistant.indicatorType.volatility":"Volatility","trading-assistant.indicatorType.volume":"Volume","trading-assistant.indicatorType.custom":"Custom","trading-assistant.exchangeNames":{okx:"OKX",binance:"Binance",hyperliquid:"Hyperliquid",blockchaincom:"Blockchain.com",coinbaseexchange:"Coinbase",gate:"Gate.io",mexc:"MEXC",kraken:"Kraken",bitfinex:"Bitfinex",bybit:"Bybit",kucoin:"KuCoin",huobi:"Huobi",bitget:"Bitget",bitmex:"BitMEX",deribit:"Deribit",phemex:"Phemex",bitmart:"BitMart",bitstamp:"Bitstamp",bittrex:"Bittrex",poloniex:"Poloniex",gemini:"Gemini",cryptocom:"Crypto.com",bitflyer:"bitFlyer",upbit:"Upbit",bithumb:"Bithumb",coinone:"Coinone",zb:"ZB",lbank:"LBank",bibox:"Bibox",bigone:"BigONE",bitrue:"Bitrue",coinex:"CoinEx",digifinex:"DigiFinex",ftx:"FTX",ftxus:"FTX US",binanceus:"Binance US",binancecoinm:"Binance COIN-M",binanceusdm:"Binance USDⓈ-M",ibkr:"Interactive Brokers (IBKR)",deepcoin:"Deepcoin"},"ai-trading-assistant.title":"AI Trading Assistant","ai-trading-assistant.strategyList":"Strategy List","ai-trading-assistant.createStrategy":"Create Strategy","ai-trading-assistant.noStrategy":"No strategies","ai-trading-assistant.selectStrategy":"Please select a strategy from the left to view details","ai-trading-assistant.startStrategy":"Start Strategy","ai-trading-assistant.stopStrategy":"Stop Strategy","ai-trading-assistant.editStrategy":"Edit Strategy","ai-trading-assistant.deleteStrategy":"Delete Strategy","ai-trading-assistant.status.running":"Running","ai-trading-assistant.status.stopped":"Stopped","ai-trading-assistant.status.error":"Error","ai-trading-assistant.tabs.tradingRecords":"Trading Records","ai-trading-assistant.tabs.positions":"Positions","ai-trading-assistant.tabs.aiDecisions":"AI Decisions","ai-trading-assistant.tabs.equityCurve":"Equity Curve","ai-trading-assistant.form.createTitle":"Create AI Trading Strategy","ai-trading-assistant.form.editTitle":"Edit AI Trading Strategy","ai-trading-assistant.form.strategyName":"Strategy Name","ai-trading-assistant.form.modelId":"AI Model","ai-trading-assistant.form.modelIdHint":"Using system OpenRouter service, no API Key configuration needed","ai-trading-assistant.form.decideInterval":"Decision Interval","ai-trading-assistant.form.decideInterval5m":"5 Minutes","ai-trading-assistant.form.decideInterval10m":"10 Minutes","ai-trading-assistant.form.decideInterval30m":"30 Minutes","ai-trading-assistant.form.decideInterval1h":"1 Hour","ai-trading-assistant.form.decideInterval4h":"4 Hours","ai-trading-assistant.form.decideInterval1d":"1 Day","ai-trading-assistant.form.decideInterval1w":"1 Week","ai-trading-assistant.form.decideIntervalHint":"Time interval for AI decision making","ai-trading-assistant.form.runPeriod":"Run Period","ai-trading-assistant.form.runPeriodHint":"Start and end time for strategy execution","ai-trading-assistant.form.startDate":"Start Date","ai-trading-assistant.form.endDate":"End Date","ai-trading-assistant.form.qdtCostTitle":"QDT Cost Notice","ai-trading-assistant.form.qdtCostHint":"Each AI decision will cost {cost} QDT. Please ensure your account has sufficient QDT balance. During strategy execution, each decision will be charged in real-time.","ai-trading-assistant.form.apiKey":"API Key","ai-trading-assistant.form.exchange":"Select Exchange","ai-trading-assistant.form.secretKey":"Secret Key","ai-trading-assistant.form.passphrase":"Passphrase","ai-trading-assistant.form.testConnection":"Test Connection","ai-trading-assistant.form.symbol":"Trading Pair","ai-trading-assistant.form.symbolHint":"Select the trading pair to trade","ai-trading-assistant.form.initialCapital":"Initial Capital (Margin)","ai-trading-assistant.form.leverage":"Leverage","ai-trading-assistant.form.timeframe":"Timeframe","ai-trading-assistant.form.timeframe1m":"1 Minute","ai-trading-assistant.form.timeframe5m":"5 Minutes","ai-trading-assistant.form.timeframe15m":"15 Minutes","ai-trading-assistant.form.timeframe30m":"30 Minutes","ai-trading-assistant.form.timeframe1H":"1 Hour","ai-trading-assistant.form.timeframe4H":"4 Hours","ai-trading-assistant.form.timeframe1D":"1 Day","ai-trading-assistant.form.marketType":"Market Type","ai-trading-assistant.form.marketTypeFutures":"Futures","ai-trading-assistant.form.marketTypeSpot":"Spot","ai-trading-assistant.form.totalPnl":"Total PnL","ai-trading-assistant.form.customPrompt":"Custom Prompt","ai-trading-assistant.form.customPromptHint":"Optional, used to customize AI trading strategy and decision logic","ai-trading-assistant.form.cancel":"Cancel","ai-trading-assistant.form.prev":"Previous","ai-trading-assistant.form.next":"Next","ai-trading-assistant.form.confirmCreate":"Confirm Create","ai-trading-assistant.form.confirmEdit":"Confirm Edit","ai-trading-assistant.messages.createSuccess":"Strategy created successfully","ai-trading-assistant.messages.createFailed":"Failed to create strategy","ai-trading-assistant.messages.updateSuccess":"Strategy updated successfully","ai-trading-assistant.messages.updateFailed":"Failed to update strategy","ai-trading-assistant.messages.deleteSuccess":"Strategy deleted successfully","ai-trading-assistant.messages.deleteFailed":"Failed to delete strategy","ai-trading-assistant.messages.startSuccess":"Strategy started successfully","ai-trading-assistant.messages.startFailed":"Failed to start strategy","ai-trading-assistant.messages.stopSuccess":"Strategy stopped successfully","ai-trading-assistant.messages.stopFailed":"Failed to stop strategy","ai-trading-assistant.messages.loadFailed":"Failed to load strategy list","ai-trading-assistant.messages.loadDecisionsFailed":"Failed to load AI decision records","ai-trading-assistant.messages.deleteConfirm":"Are you sure you want to delete this strategy? This action cannot be undone.","ai-trading-assistant.placeholders.inputStrategyName":"Please enter strategy name","ai-trading-assistant.placeholders.selectModelId":"Please select AI model","ai-trading-assistant.placeholders.selectDecideInterval":"Please select decision interval","ai-trading-assistant.placeholders.startTime":"Start Time","ai-trading-assistant.placeholders.endTime":"End Time","ai-trading-assistant.placeholders.inputApiKey":"Please enter API Key","ai-trading-assistant.placeholders.selectExchange":"Please select an exchange","ai-trading-assistant.placeholders.inputSecretKey":"Please enter Secret Key","ai-trading-assistant.placeholders.inputPassphrase":"Please enter Passphrase","ai-trading-assistant.placeholders.selectSymbol":"Please select trading pair, e.g.: BTC/USDT","ai-trading-assistant.placeholders.selectTimeframe":"Please select timeframe","ai-trading-assistant.placeholders.inputCustomPrompt":"Please enter custom prompt (optional)","ai-trading-assistant.validation.strategyNameRequired":"Please enter strategy name","ai-trading-assistant.validation.modelIdRequired":"Please select AI model","ai-trading-assistant.validation.runPeriodRequired":"Please select run period","ai-trading-assistant.validation.apiKeyRequired":"Please enter API Key","ai-trading-assistant.validation.exchangeRequired":"Please select an exchange","ai-trading-assistant.validation.secretKeyRequired":"Please enter Secret Key","ai-trading-assistant.validation.symbolRequired":"Please select trading pair","ai-trading-assistant.validation.initialCapitalRequired":"Please enter initial capital","ai-trading-assistant.table.time":"Time","ai-trading-assistant.table.type":"Type","ai-trading-assistant.table.price":"Price","ai-trading-assistant.table.amount":"Amount","ai-trading-assistant.table.value":"Value","ai-trading-assistant.table.symbol":"Trading Pair","ai-trading-assistant.table.side":"Side","ai-trading-assistant.table.size":"Position Size","ai-trading-assistant.table.entryPrice":"Entry Price","ai-trading-assistant.table.currentPrice":"Current Price","ai-trading-assistant.table.unrealizedPnl":"Unrealized P&L","ai-trading-assistant.table.profit":"Profit","ai-trading-assistant.table.openLong":"Open Long","ai-trading-assistant.table.closeLong":"Close Long","ai-trading-assistant.table.openShort":"Open Short","ai-trading-assistant.table.closeShort":"Close Short","ai-trading-assistant.table.addLong":"Add Long","ai-trading-assistant.table.addShort":"Add Short","ai-trading-assistant.table.closeShortProfit":"Close Short (TP)","ai-trading-assistant.table.closeShortStop":"Close Short (SL)","ai-trading-assistant.table.closeLongProfit":"Close Long (TP)","ai-trading-assistant.table.closeLongStop":"Close Long (SL)","ai-trading-assistant.table.buy":"Buy","ai-trading-assistant.table.sell":"Sell","ai-trading-assistant.table.long":"Long","ai-trading-assistant.table.short":"Short","ai-trading-assistant.table.hold":"Hold","ai-trading-assistant.table.reasoning":"Analysis Reasoning","ai-trading-assistant.table.decisions":"Decisions","ai-trading-assistant.table.riskAssessment":"Risk","ai-trading-assistant.table.confidence":"Confidence","ai-trading-assistant.table.totalRecords":"Total {total} records","ai-trading-assistant.table.noPositions":"No positions","ai-trading-assistant.detail.title":"Strategy Details","ai-trading-assistant.equity.noData":"No equity data","ai-trading-assistant.equity.equity":"Equity","ai-trading-assistant.exchange.testFailed":"Connection test failed","ai-trading-assistant.exchange.connectionSuccess":"Connection successful","ai-trading-assistant.exchange.connectionFailed":"Connection failed","ai-trading-assistant.form.advancedSettings":"Advanced Settings","ai-trading-assistant.form.orderMode":"Order Mode","ai-trading-assistant.form.orderModeMaker":"Maker (Limit)","ai-trading-assistant.form.orderModeTaker":"Taker (Market)","ai-trading-assistant.form.orderModeHint":"Maker mode uses limit orders with lower fees; Taker mode executes immediately with higher fees","ai-trading-assistant.form.makerWaitSec":"Maker Wait Time (seconds)","ai-trading-assistant.form.makerWaitSecHint":"Time to wait for order fill before canceling and retrying","ai-trading-assistant.form.makerRetries":"Maker Retries","ai-trading-assistant.form.makerRetriesHint":"Maximum number of retries when maker order is not filled","ai-trading-assistant.form.fallbackToMarket":"Fallback to Market on failure","ai-trading-assistant.form.fallbackToMarketHint":"If limit order (open/close) is not filled, downgrade to market order to ensure execution","ai-trading-assistant.form.marginMode":"Margin Mode","ai-trading-assistant.form.marginModeCross":"Cross Margin","ai-trading-assistant.form.marginModeIsolated":"Isolated Margin","ai-analysis.title":"Quantum Trading Engine","ai-analysis.system.online":"ONLINE","ai-analysis.system.agents":"AGENTS","ai-analysis.system.active":"ACTIVE","ai-analysis.system.stage":"STAGE","ai-analysis.panel.roster":"AGENTS ROSTER","ai-analysis.panel.thinking":"Thinking...","ai-analysis.panel.done":"Done","ai-analysis.panel.standby":"Standby","ai-analysis.input.title":"QUANTUM TRADING ENGINE","ai-analysis.input.placeholder":"SELECT TARGET ASSET (e.g. BTC/USDT)","ai-analysis.input.watchlist":"Watchlist","ai-analysis.input.start":"START ANALYSIS","ai-analysis.input.recent":"RECENT MISSIONS:","ai-analysis.vis.stage":"STAGE","ai-analysis.vis.processing":"PROCESSING","ai-analysis.result.complete":"ANALYSIS COMPLETE","ai-analysis.result.signal":"FINAL SIGNAL","ai-analysis.result.confidence":"CONFIDENCE:","ai-analysis.result.new":"NEW ANALYSIS","ai-analysis.result.full":"VIEW FULL DOSSIER","ai-analysis.logs.title":"SYSTEM LOGS","ai-analysis.modal.title":"CLASSIFIED REPORT","ai-analysis.modal.fundamental":"FUNDAMENTAL ANALYSIS","ai-analysis.modal.technical":"TECHNICAL ANALYSIS","ai-analysis.modal.sentiment":"SENTIMENT ANALYSIS","ai-analysis.modal.risk":"RISK ASSESSMENT","ai-analysis.stage.idle":"IDLE","ai-analysis.stage.1":"PHASE 1: MULTI-DIMENSIONAL ANALYSIS","ai-analysis.stage.2":"PHASE 2: BULL/BEAR DEBATE","ai-analysis.stage.3":"PHASE 3: STRATEGIC PLANNING","ai-analysis.stage.4":"PHASE 4: RISK COMMITTEE REVIEW","ai-analysis.stage.complete":"COMPLETE","ai-analysis.agent.investment_director":"Investment Director","ai-analysis.agent.role.investment_director":"Comprehensive Analysis & Final Conclusion","ai-analysis.agent.market":"Market Analyst","ai-analysis.agent.role.market":"Technical & Market Data","ai-analysis.agent.fundamental":"Fundamental Analyst","ai-analysis.agent.role.fundamental":"Financials & Valuation","ai-analysis.agent.technical":"Technical Analyst","ai-analysis.agent.role.technical":"Technical Indicators & Charts","ai-analysis.agent.news":"News Analyst","ai-analysis.agent.role.news":"Global News Filter","ai-analysis.agent.sentiment":"Sentiment Analyst","ai-analysis.agent.role.sentiment":"Social & Emotional","ai-analysis.agent.risk":"Risk Analyst","ai-analysis.agent.role.risk":"Basic Risk Check","ai-analysis.agent.bull":"Bull Researcher","ai-analysis.agent.role.bull":"Growth Catalyst Hunter","ai-analysis.agent.bear":"Bear Researcher","ai-analysis.agent.role.bear":"Risk & Flaw Hunter","ai-analysis.agent.manager":"Research Manager","ai-analysis.agent.role.manager":"Debate Moderator","ai-analysis.agent.trader":"Trader Agent","ai-analysis.agent.role.trader":"Execution Strategist","ai-analysis.agent.risky":"Risky Analyst","ai-analysis.agent.role.risky":"Aggressive Strategy","ai-analysis.agent.neutral":"Neutral Analyst","ai-analysis.agent.role.neutral":"Balanced Strategy","ai-analysis.agent.safe":"Safe Analyst","ai-analysis.agent.role.safe":"Conservative Strategy","ai-analysis.agent.cro":"Risk Manager (CRO)","ai-analysis.agent.role.cro":"Final Decision Authority","ai-analysis.script.market":"Fetching OHLCV data from major exchanges...","ai-analysis.script.fundamental":"Retrieving quarterly financial reports...","ai-analysis.script.technical":"Analyzing technical indicators and chart patterns...","ai-analysis.script.news":"Scanning global financial news feeds...","ai-analysis.script.sentiment":"Analyzing social media trends...","ai-analysis.script.risk":"Calculating historical volatility...","invite.inviteLink":"Invite Link","invite.copy":"Copy Link","invite.copySuccess":"Copied successfully!","invite.copyFailed":"Copy failed, please copy manually","invite.noInviteLink":"Invite link not generated","invite.totalInvites":"Total Invites","invite.totalReward":"Total Reward","invite.rules":"Invite Rules","invite.rule1":"You will receive a reward for each friend you successfully invite to register","invite.rule2":"When your invited friend completes their first transaction, you will receive an additional reward","invite.rule3":"Invite rewards will be directly credited to your account","invite.inviteList":"Invite List","invite.tasks":"Task Center","invite.inviteeName":"Invitee","invite.inviteTime":"Invite Time","invite.status":"Status","invite.reward":"Reward","invite.active":"Active","invite.inactive":"Inactive","invite.completed":"Completed","invite.claimed":"Claimed","invite.pending":"Pending","invite.goToTask":"Go to Task","invite.claimReward":"Claim Reward","invite.verify":"Verify","invite.verifySuccess":"Verification successful! Task completed","invite.verifyNotCompleted":"Task not completed yet, please complete the task first","invite.verifyFailed":"Verification failed, please try again later","invite.claimSuccess":"Successfully claimed {reward} QDT!","invite.claimFailed":"Claim failed, please try again later","invite.totalRecords":"Total {total} records","invite.task.twitter.title":"Share Tweet on X (Twitter)","invite.task.twitter.desc":"Share our official tweet to your X (Twitter) account","invite.task.youtube.title":"Follow our YouTube Channel","invite.task.youtube.desc":"Subscribe and follow our official YouTube channel","invite.task.telegram.title":"Join Telegram Group","invite.task.telegram.desc":"Join our official Telegram community group","invite.task.discord.title":"Join Discord Server","invite.task.discord.desc":"Join our Discord community server",message:"-","layouts.usermenu.dialog.title":"Message","layouts.usermenu.dialog.content":"Are you sure you would like to logout?","layouts.userLayout.title":"Clarity from Uncertainty","signal-robot.title":"Signal Robot Console","signal-robot.createBot":"Create New Bot","signal-robot.search.nameOrSymbol":"Name/Symbol","signal-robot.search.placeholder":"Search bot name or symbol","signal-robot.search.status":"Status","signal-robot.search.statusAll":"All","signal-robot.search.statusRunning":"Running","signal-robot.search.statusPaused":"Paused","signal-robot.search.query":"Query","signal-robot.search.reset":"Reset","signal-robot.table.botName":"Bot Name","signal-robot.table.symbolTimeframe":"Symbol/Timeframe","signal-robot.table.triggerStrategy":"Trigger Strategy","signal-robot.table.notificationChannels":"Notification Channels","signal-robot.table.status":"Status","signal-robot.table.action":"Action","signal-robot.table.triggerConditions":"{count} trigger conditions","signal-robot.table.monitoring":"Monitoring","signal-robot.table.paused":"Paused","signal-robot.table.edit":"Edit","signal-robot.table.pause":"Pause","signal-robot.table.start":"Start","signal-robot.table.delete":"Delete","signal-robot.table.deleteConfirm":"Are you sure you want to delete this bot?","signal-robot.table.deleteSuccess":"Deleted successfully","signal-robot.table.startSuccess":"Bot started","signal-robot.table.pauseSuccess":"Bot paused","signal-robot.channel.telegram":"Telegram","signal-robot.channel.discord":"Discord","signal-robot.channel.email":"Email","signal-robot.channel.webhook":"Webhook","signal-robot.channel.browser":"Browser Push","signal-robot.modal.createTitle":"Create New Signal Robot","signal-robot.modal.editTitle":"Edit Signal Robot","signal-robot.modal.step.basic":"Basic Settings","signal-robot.modal.step.entry":"Entry Strategy","signal-robot.modal.step.position":"Position Management","signal-robot.modal.step.risk":"Risk Control","signal-robot.modal.step.notify":"Notification Config","signal-robot.modal.prev":"Previous","signal-robot.modal.next":"Next","signal-robot.modal.preview":"Preview Backtest","signal-robot.modal.complete":"Complete & Run","signal-robot.modal.saveSuccess":"Saved successfully","signal-robot.modal.previewDeveloping":"Preview feature is under development...","signal-robot.modal.basicInfoRequired":"Please complete basic information","signal-robot.basic.alert":"Set basic information for the bot","signal-robot.basic.title":"Basic Information","signal-robot.basic.botName":"Bot Name","signal-robot.basic.botNamePlaceholder":"e.g.: BTC SuperTrend Strategy","signal-robot.basic.symbol":"Trading Pair","signal-robot.basic.symbolPlaceholder":"Select from watchlist","signal-robot.basic.noWatchlist":"No watchlist items, please add in market page first","signal-robot.basic.timeframe":"K-Line Period","signal-robot.basic.timeframe15m":"15 Minutes","signal-robot.basic.timeframe30m":"30 Minutes","signal-robot.basic.timeframe1h":"1 Hour","signal-robot.basic.timeframe4h":"4 Hours","signal-robot.basic.timeframe1d":"1 Day","signal-robot.basic.autoNameSuggestion":"{symbol} Signal Robot","signal-robot.entry.alert":"Trigger entry signal when all conditions below are met","signal-robot.entry.condition":"Condition {index}","signal-robot.entry.indicator":"Indicator","signal-robot.entry.indicatorSupertrend":"SuperTrend","signal-robot.entry.indicatorEma":"EMA (Exponential Moving Average)","signal-robot.entry.indicatorRsi":"RSI (Relative Strength Index)","signal-robot.entry.indicatorMacd":"MACD","signal-robot.entry.indicatorBollinger":"Bollinger Bands","signal-robot.entry.atrPeriod":"ATR Period","signal-robot.entry.multiplier":"Multiplier","signal-robot.entry.triggerSignal":"Trigger Signal","signal-robot.entry.signalTrendBullish":"Trend Bullish","signal-robot.entry.signalTrendBearish":"Trend Bearish","signal-robot.entry.signalIsUptrend":"Is Uptrend","signal-robot.entry.signalIsDowntrend":"Is Downtrend","signal-robot.entry.period":"Period","signal-robot.entry.compareCondition":"Compare Condition","signal-robot.entry.priceAbove":"Price > EMA (Price Above)","signal-robot.entry.priceBelow":"Price < EMA (Price Below)","signal-robot.entry.crossUp":"Price Crosses Above EMA (Golden Cross)","signal-robot.entry.crossDown":"Price Crosses Below EMA (Death Cross)","signal-robot.entry.compare":"Compare","signal-robot.entry.greaterThan":"Greater Than","signal-robot.entry.lessThan":"Less Than","signal-robot.entry.crossUpShort":"Cross Up","signal-robot.entry.crossDownShort":"Cross Down","signal-robot.entry.threshold":"Threshold","signal-robot.entry.selectIndicator":"Please select an indicator to configure parameters","signal-robot.entry.addCondition":"Add Condition","signal-robot.position.alert":"Configure initial position size, leverage and pyramiding rules","signal-robot.position.basicTitle":"Basic Position Management","signal-robot.position.initialSize":"Initial Size (Capital %)","signal-robot.position.initialSizeHint":"Recommended 5% - 20%","signal-robot.position.leverage":"Leverage","signal-robot.position.leverageHint":"Please ensure your exchange account supports this leverage","signal-robot.position.maxPyramiding":"Max Pyramiding Times","signal-robot.position.maxPyramidingHint":"0 means no pyramiding","signal-robot.position.pyramidingTitle":"Pyramiding Rules","signal-robot.position.pyramidingEnabled":"Enabled","signal-robot.position.pyramidingDisabled":"Disabled","signal-robot.position.pyramidingCondition":"Pyramiding Trigger Condition","signal-robot.position.priceRisePct":"Price Rises (Long) / Falls (Short)","signal-robot.position.profitPct":"Profit Reaches","signal-robot.position.triggerThreshold":"Trigger Threshold (%)","signal-robot.position.triggerThresholdHint":"e.g. 3%: add position once every 3% rise","signal-robot.position.addSize":"Single Add Size (Capital %)","signal-robot.position.pyramidingDisabledHint":"Pyramiding disabled, only initial position will be executed","signal-robot.risk.alert":"Configure take profit, stop loss and exit rules","signal-robot.risk.stopLossTitle":"Stop Loss","signal-robot.risk.stopLossEnabled":"Enabled","signal-robot.risk.stopLossDisabled":"Disabled","signal-robot.risk.stopLossType":"Stop Loss Type","signal-robot.risk.stopLossFixedPct":"Fixed Percentage","signal-robot.risk.stopLossAtrMultiplier":"ATR Multiplier","signal-robot.risk.stopLossValue":"Value","signal-robot.risk.stopLossFixedHint":"e.g. 2%: stop loss when loss reaches 2%","signal-robot.risk.stopLossAtrHint":"e.g. 2.0: stop loss when price touches ATR*2.0","signal-robot.risk.stopLossDisabledHint":"Stop loss disabled (high risk)","signal-robot.risk.trailingStopTitle":"Trailing Stop","signal-robot.risk.activationProfit":"Activation Profit (%)","signal-robot.risk.activationProfitHint":"Start trailing when profit reaches this level","signal-robot.risk.callbackPct":"Callback (%)","signal-robot.risk.callbackPctHint":"Trigger take profit when price falls from peak by this percentage","signal-robot.risk.trailingStopDisabledHint":"Trailing stop disabled","signal-robot.risk.otherExitTitle":"Other Exit Rules","signal-robot.risk.signalExit":"Allow Signal Exit","signal-robot.risk.signalExitHint":"Close position immediately when reverse signal appears (e.g. close long when short signal appears)","signal-robot.notify.alert":"Configure notification methods when signal is triggered","signal-robot.notify.channelTitle":"Notification Channels","signal-robot.notify.discordWebhook":"Discord Webhook","signal-robot.notify.genericWebhook":"Generic Webhook","signal-robot.notify.webhookUrl":"Webhook URL","signal-robot.notify.webhookUrlPlaceholder":"https://example.com/webhook","signal-robot.notify.discordUrl":"Discord URL","signal-robot.notify.discordUrlPlaceholder":"https://discord.com/api/webhooks/...","signal-robot.operator.greaterThan":"Greater Than","signal-robot.operator.lessThan":"Less Than","signal-robot.operator.equal":"Equal","signal-robot.operator.goldenCross":"Golden Cross","signal-robot.operator.deathCross":"Death Cross","signal-robot.operator.increaseBy":"Increase By","signal-robot.operator.decreaseBy":"Decrease By","signal-robot.indicator.price":"Price","signal-robot.indicator.rsi":"RSI","signal-robot.indicator.kdjK":"KDJ(K)","signal-robot.indicator.kdjJ":"KDJ(J)","signal-robot.indicator.macd":"MACD","signal-robot.indicator.macdHist":"MACD Histogram","signal-robot.indicator.bollingerUp":"Bollinger Upper","signal-robot.indicator.bollingerLow":"Bollinger Lower","signal-robot.indicator.volume":"Volume","signal-robot.indicator.changePct1h":"1H Change %","signal-robot.indicator.changePct24h":"24H Change %","signal-robot.indicator.signalLine":"Signal Line","settings.title":"System Settings","settings.description":"Configure application settings, API keys, and system preferences","settings.save":"Save Settings","settings.reset":"Reset","settings.saveSuccess":"Settings saved successfully","settings.saveFailed":"Failed to save settings","settings.loadFailed":"Failed to load settings","settings.openrouterBalance":"OpenRouter Account Balance","settings.queryBalance":"Query Balance","settings.balanceUsage":"Used","settings.balanceRemaining":"Remaining","settings.balanceLimit":"Total Limit","settings.balanceQuerySuccess":"Balance query successful","settings.balanceQueryFailed":"Failed to query balance","settings.balanceNotQueried":'Click "Query Balance" to get account info',"settings.freeTier":"Free Tier","settings.default":"Default","settings.pleaseSelect":"Please select","settings.inputApiKey":"Enter key","settings.getApi":"Get API","settings.link.getApi":"Get API","settings.link.getApiKey":"Get API Key","settings.link.getToken":"Get Token","settings.link.createBot":"Create Bot","settings.link.viewModels":"View Models","settings.link.freeRegister":"Free Register","settings.link.supportedExchanges":"Supported Exchanges","settings.link.applyApi":"Apply API","settings.link.createSearchEngine":"Create Search Engine","settings.link.getTurnstileKey":"Get Turnstile Key","settings.link.getGoogleCredentials":"Get Google Credentials","settings.link.getGithubCredentials":"Get GitHub Credentials","settings.restartRequired":"Settings saved","settings.copyRestartCmd":"Copy restart command","settings.copySuccess":"Copied","settings.copyFailed":"Copy failed","settings.option.LLM_PROVIDER.openrouter":"OpenRouter (Multi-model gateway)","settings.option.LLM_PROVIDER.openai":"OpenAI Direct","settings.option.LLM_PROVIDER.google":"Google Gemini","settings.option.LLM_PROVIDER.deepseek":"DeepSeek","settings.option.LLM_PROVIDER.grok":"xAI Grok","settings.option.SEARCH_PROVIDER.tavily":"Tavily","settings.option.SEARCH_PROVIDER.google":"Google","settings.option.SEARCH_PROVIDER.bing":"Bing","settings.option.SEARCH_PROVIDER.none":"None","settings.option.ORDER_MODE.maker":"Maker (limit-first)","settings.option.ORDER_MODE.market":"Market (immediate fill)","settings.option.USDT_PAY_CHAIN.TRC20":"TRC20 (TRON)","settings.group.server":"Server Configuration","settings.group.auth":"Security & Authentication","settings.group.ai":"AI / LLM Configuration","settings.group.trading":"Live Trading","settings.group.strategy":"Strategy Execution","settings.group.data_source":"Data Sources","settings.group.notification":"Notifications","settings.group.email":"Email (SMTP)","settings.group.sms":"SMS (Twilio)","settings.group.agent":"AI Agent","settings.group.network":"Network & Proxy","settings.group.search":"Web Search","settings.group.security":"Registration & Security","settings.group.app":"Application","settings.field.SECRET_KEY":"Secret Key","settings.field.ADMIN_USER":"Admin Username","settings.field.ADMIN_PASSWORD":"Admin Password","settings.field.ADMIN_EMAIL":"Admin Email","settings.field.ENABLE_REGISTRATION":"Enable Registration","settings.field.TURNSTILE_SITE_KEY":"Turnstile Site Key","settings.field.TURNSTILE_SECRET_KEY":"Turnstile Secret Key","settings.field.FRONTEND_URL":"Frontend URL","settings.field.GOOGLE_CLIENT_ID":"Google Client ID","settings.field.GOOGLE_CLIENT_SECRET":"Google Client Secret","settings.field.GOOGLE_REDIRECT_URI":"Google Redirect URI","settings.field.GITHUB_CLIENT_ID":"GitHub Client ID","settings.field.GITHUB_CLIENT_SECRET":"GitHub Client Secret","settings.field.GITHUB_REDIRECT_URI":"GitHub Redirect URI","settings.field.SECURITY_IP_MAX_ATTEMPTS":"IP Max Failed Attempts","settings.field.SECURITY_IP_WINDOW_MINUTES":"IP Window (minutes)","settings.field.SECURITY_IP_BLOCK_MINUTES":"IP Block Duration (minutes)","settings.field.SECURITY_ACCOUNT_MAX_ATTEMPTS":"Account Max Failed Attempts","settings.field.SECURITY_ACCOUNT_WINDOW_MINUTES":"Account Window (minutes)","settings.field.SECURITY_ACCOUNT_BLOCK_MINUTES":"Account Block Duration (minutes)","settings.field.VERIFICATION_CODE_EXPIRE_MINUTES":"Verification Code Expiry (minutes)","settings.field.VERIFICATION_CODE_RATE_LIMIT":"Code Rate Limit (seconds)","settings.field.VERIFICATION_CODE_IP_HOURLY_LIMIT":"Code Hourly Limit per IP","settings.field.VERIFICATION_CODE_MAX_ATTEMPTS":"Code Max Attempts","settings.field.VERIFICATION_CODE_LOCK_MINUTES":"Code Lock Minutes","settings.field.PYTHON_API_HOST":"Listen Address","settings.field.PYTHON_API_PORT":"Port","settings.field.PYTHON_API_DEBUG":"Debug Mode","settings.field.ENABLE_PENDING_ORDER_WORKER":"Enable Order Worker","settings.field.PENDING_ORDER_STALE_SEC":"Order Stale Timeout (sec)","settings.field.ORDER_MODE":"Order Mode","settings.field.MAKER_WAIT_SEC":"Limit Order Wait Time (sec)","settings.field.MAKER_OFFSET_BPS":"Limit Order Price Offset (bps)","settings.field.SIGNAL_WEBHOOK_URL":"Webhook URL","settings.field.SIGNAL_WEBHOOK_TOKEN":"Webhook Token","settings.field.SIGNAL_NOTIFY_TIMEOUT_SEC":"Notify Timeout (sec)","settings.field.TELEGRAM_BOT_TOKEN":"Telegram Bot Token","settings.field.SMTP_HOST":"SMTP Host","settings.field.SMTP_PORT":"SMTP Port","settings.field.SMTP_USER":"SMTP Username","settings.field.SMTP_PASSWORD":"SMTP Password","settings.field.SMTP_FROM":"From Address","settings.field.SMTP_USE_TLS":"Use TLS","settings.field.SMTP_USE_SSL":"Use SSL","settings.field.TWILIO_ACCOUNT_SID":"Account SID","settings.field.TWILIO_AUTH_TOKEN":"Auth Token","settings.field.TWILIO_FROM_NUMBER":"From Number","settings.field.DISABLE_RESTORE_RUNNING_STRATEGIES":"Disable Auto Restore","settings.field.STRATEGY_TICK_INTERVAL_SEC":"Tick Interval (sec)","settings.field.PRICE_CACHE_TTL_SEC":"Price Cache TTL (sec)","settings.field.PROXY_URL":"Full Proxy URL","settings.field.RATE_LIMIT":"Rate Limit (per min)","settings.field.ENABLE_CACHE":"Enable Cache","settings.field.ENABLE_REQUEST_LOG":"Enable Request Log","settings.field.ENABLE_AGENT_MEMORY":"Enable Agent Memory","settings.field.AGENT_MEMORY_ENABLE_VECTOR":"Enable Vector Retrieval (Local)","settings.field.AGENT_MEMORY_EMBEDDING_DIM":"Embedding Dimension","settings.field.AGENT_MEMORY_TOP_K":"Top-K Retrieval Count","settings.field.AGENT_MEMORY_CANDIDATE_LIMIT":"Candidate Window Size","settings.field.AGENT_MEMORY_HALF_LIFE_DAYS":"Time Decay Half-life (days)","settings.field.AGENT_MEMORY_W_SIM":"Similarity Weight","settings.field.AGENT_MEMORY_W_RECENCY":"Recency Weight","settings.field.AGENT_MEMORY_W_RETURNS":"Returns Weight","settings.field.ENABLE_REFLECTION_WORKER":"Enable Auto Verification","settings.field.REFLECTION_WORKER_INTERVAL_SEC":"Verification Interval (sec)","settings.field.REFLECTION_MIN_AGE_DAYS":"Min Age for Validation (days)","settings.field.REFLECTION_VALIDATE_LIMIT":"Validation Batch Limit","settings.field.ENABLE_CONFIDENCE_CALIBRATION":"Enable Confidence Calibration","settings.field.ENABLE_AI_ENSEMBLE":"Enable Multi-Model Voting","settings.field.AI_ENSEMBLE_MODELS":"Ensemble Models","settings.field.AI_CALIBRATION_MARKETS":"Calibration Markets","settings.field.AI_CALIBRATION_LOOKBACK_DAYS":"Calibration Lookback (days)","settings.field.AI_CALIBRATION_MIN_SAMPLES":"Calibration Min Samples","settings.field.LLM_PROVIDER":"LLM Provider","settings.field.AI_CODE_GEN_MODEL":"Code Generation Model","settings.field.OPENAI_API_KEY":"OpenAI API Key","settings.field.OPENAI_MODEL":"OpenAI Model","settings.field.OPENAI_BASE_URL":"OpenAI Base URL","settings.field.GOOGLE_API_KEY":"Google API Key (Gemini)","settings.field.GOOGLE_MODEL":"Gemini Model","settings.field.DEEPSEEK_API_KEY":"DeepSeek API Key","settings.field.DEEPSEEK_MODEL":"DeepSeek Model","settings.field.DEEPSEEK_BASE_URL":"DeepSeek Base URL","settings.field.GROK_API_KEY":"Grok API Key","settings.field.GROK_MODEL":"Grok Model","settings.field.GROK_BASE_URL":"Grok Base URL","settings.field.OPENROUTER_API_KEY":"OpenRouter API Key","settings.field.OPENROUTER_API_URL":"OpenRouter API URL","settings.field.OPENROUTER_MODEL":"Default Model","settings.field.AI_ANALYSIS_CONSENSUS_TIMEFRAMES":"Consensus Timeframes","settings.field.OPENROUTER_TEMPERATURE":"Temperature","settings.field.OPENROUTER_MAX_TOKENS":"Max Tokens","settings.field.OPENROUTER_TIMEOUT":"Timeout (sec)","settings.field.OPENROUTER_CONNECT_TIMEOUT":"Connect Timeout (sec)","settings.field.MARKET_TYPES_JSON":"Market Types JSON","settings.field.TRADING_SUPPORTED_SYMBOLS_JSON":"Supported Symbols JSON","settings.field.DATA_SOURCE_TIMEOUT":"Timeout (sec)","settings.field.DATA_SOURCE_RETRY":"Retry Count","settings.field.DATA_SOURCE_RETRY_BACKOFF":"Retry Backoff (sec)","settings.field.FINNHUB_API_KEY":"Finnhub API Key","settings.field.FINNHUB_TIMEOUT":"Finnhub Timeout (sec)","settings.field.FINNHUB_RATE_LIMIT":"Finnhub Rate Limit","settings.field.CCXT_DEFAULT_EXCHANGE":"CCXT Default Exchange","settings.field.CCXT_TIMEOUT":"CCXT Timeout (ms)","settings.field.CCXT_PROXY":"CCXT Proxy","settings.field.YFINANCE_TIMEOUT":"YFinance Timeout (sec)","settings.field.TIINGO_API_KEY":"Tiingo API Key","settings.field.TIINGO_TIMEOUT":"Tiingo Timeout (sec)","settings.field.SEARCH_PROVIDER":"Search Provider","settings.field.SEARCH_MAX_RESULTS":"Max Results","settings.field.TAVILY_API_KEYS":"Tavily API Keys","settings.field.SERPAPI_KEYS":"SerpAPI Keys","settings.field.SEARCH_GOOGLE_API_KEY":"Google API Key","settings.field.SEARCH_GOOGLE_CX":"Google CX","settings.field.SEARCH_BING_API_KEY":"Bing API Key","settings.field.INTERNAL_API_KEY":"Internal API Key","settings.desc.LLM_PROVIDER":"Select your preferred LLM provider for chat and analysis","settings.desc.AI_CODE_GEN_MODEL":"Optional model ID for AI code generation. Leave empty to use the provider default model","settings.desc.OPENAI_API_KEY":"OpenAI official API key","settings.desc.OPENAI_MODEL":"Model name: gpt-4o, gpt-4o-mini, gpt-4-turbo, etc.","settings.desc.OPENAI_BASE_URL":"Custom API endpoint (for proxies or Azure OpenAI)","settings.desc.GOOGLE_API_KEY":"Google AI Studio API key for Gemini","settings.desc.GOOGLE_MODEL":"Gemini model: gemini-1.5-flash, gemini-1.5-pro, etc.","settings.desc.DEEPSEEK_API_KEY":"DeepSeek API key","settings.desc.DEEPSEEK_MODEL":"Model: deepseek-chat, deepseek-coder","settings.desc.DEEPSEEK_BASE_URL":"DeepSeek API endpoint URL","settings.desc.GROK_API_KEY":"xAI Grok API key","settings.desc.GROK_MODEL":"Model: grok-beta, grok-2, etc.","settings.desc.GROK_BASE_URL":"xAI Grok API endpoint URL","settings.desc.AI_ANALYSIS_CONSENSUS_TIMEFRAMES":"Multi-timeframe consensus for fast AI analysis. Comma-separated, e.g. 1D,4H","settings.desc.ENABLE_REFLECTION_WORKER":"Enable background worker for automatic trade reflection and calibration","settings.desc.REFLECTION_WORKER_INTERVAL_SEC":"Reflection worker run interval in seconds (86400 = 1 day)","settings.desc.REFLECTION_MIN_AGE_DAYS":"Only validate analyses older than N days","settings.desc.REFLECTION_VALIDATE_LIMIT":"Max records to validate per reflection cycle","settings.desc.ENABLE_CONFIDENCE_CALIBRATION":"Adjust confidence by historical accuracy in each bucket","settings.desc.ENABLE_AI_ENSEMBLE":"Use multiple models and majority vote for more stable decisions","settings.desc.AI_ENSEMBLE_MODELS":"Comma-separated model IDs for ensemble voting","settings.desc.AI_CALIBRATION_MARKETS":"Comma-separated markets to run threshold calibration","settings.desc.AI_CALIBRATION_LOOKBACK_DAYS":"Days of validated data used for calibration","settings.desc.AI_CALIBRATION_MIN_SAMPLES":"Minimum validated samples required before calibration applies","settings.desc.SEARCH_PROVIDER":"Web search provider for AI research","settings.desc.TAVILY_API_KEYS":"Tavily Search API keys, comma-separated for rotation. Free 1000 requests/month","settings.desc.SERPAPI_KEYS":"SerpAPI keys for Google/Bing search, comma-separated for rotation","settings.desc.ORDER_MODE":"maker: Limit order first (lower fees), market: Market order (instant fill)","settings.desc.MAKER_WAIT_SEC":"Wait time for limit order fill before switching to market order","settings.desc.MAKER_OFFSET_BPS":"Price offset in basis points. Buy: price*(1-offset), Sell: price*(1+offset)","settings.desc.TIINGO_API_KEY":"Tiingo API key for Forex/Metals data (free tier does not support 1-minute data)","settings.desc.TIINGO_TIMEOUT":"Tiingo API request timeout","portfolio.summary.totalValue":"Total Value","portfolio.summary.totalCost":"Total Cost","portfolio.summary.totalPnl":"Total P&L","portfolio.summary.positionCount":"Positions","portfolio.summary.profitLossRatio":"Profit/Loss","portfolio.summary.today":"Today","portfolio.summary.todayPnl":"Today P&L","portfolio.summary.bestPerformer":"Best Performer","portfolio.summary.worstPerformer":"Worst Performer","portfolio.summary.priceSync":"Price Sync","portfolio.summary.syncInterval":"Refresh","portfolio.summary.justNow":"Just now","portfolio.summary.ago":" ago","portfolio.positions.title":"My Positions","portfolio.positions.add":"Add Position","portfolio.positions.addFirst":"Add Your First Position","portfolio.positions.empty":"No positions yet","portfolio.positions.deleteConfirm":"Are you sure to delete this position?","portfolio.positions.currentPrice":"Current","portfolio.positions.entryPrice":"Entry","portfolio.positions.quantity":"Quantity","portfolio.positions.side":"Side","portfolio.positions.long":"Long","portfolio.positions.short":"Short","portfolio.positions.marketValue":"Value","portfolio.positions.pnl":"P&L","portfolio.positions.items":"positions","portfolio.monitors.title":"AI Monitors","portfolio.monitors.add":"Add Monitor","portfolio.monitors.addFirst":"Add AI Monitor","portfolio.monitors.empty":"No monitors yet","portfolio.monitors.deleteConfirm":"Are you sure to delete this monitor?","portfolio.monitors.interval":"Interval","portfolio.monitors.lastRun":"Last Run","portfolio.monitors.nextRun":"Next Run","portfolio.monitors.channels":"Channels","portfolio.monitors.runNow":"Run Now","portfolio.monitors.analysisResult":"AI Analysis Result","portfolio.monitors.runningTitle":"AI Analysis Started","portfolio.monitors.runningDesc":"Analysis is running in background. Results will be pushed via notification. Analyzing multiple positions may take a few minutes.","portfolio.monitors.timeoutTitle":"Request Timeout","portfolio.monitors.timeoutDesc":"Analysis may still be running in background. Please check notifications for results later. If no notification is received, please try again.","portfolio.modal.addPosition":"Add Position","portfolio.modal.editPosition":"Edit Position","portfolio.modal.addMonitor":"Add Monitor","portfolio.modal.editMonitor":"Edit Monitor","portfolio.form.market":"Market","portfolio.form.marketRequired":"Please select a market","portfolio.form.selectMarket":"Select Market","portfolio.form.symbol":"Symbol","portfolio.form.symbolRequired":"Please enter symbol","portfolio.form.searchSymbol":"Search or enter symbol","portfolio.form.useAsSymbol":"Use","portfolio.form.asSymbolCode":"as symbol code","portfolio.form.symbolHint":"Search symbols or enter any code directly","portfolio.form.side":"Side","portfolio.form.quantity":"Quantity","portfolio.form.quantityRequired":"Please enter quantity","portfolio.form.enterQuantity":"Enter quantity","portfolio.form.entryPrice":"Entry Price","portfolio.form.entryPriceRequired":"Please enter entry price","portfolio.form.enterEntryPrice":"Enter entry price","portfolio.form.notes":"Notes","portfolio.form.enterNotes":"Optional: Add notes","portfolio.form.monitorName":"Monitor Name","portfolio.form.monitorNameRequired":"Please enter monitor name","portfolio.form.enterMonitorName":"e.g. Daily Portfolio Analysis","portfolio.form.interval":"Interval","portfolio.form.minutes":"minutes","portfolio.form.hour":"hour","portfolio.form.hours":"hours","portfolio.form.notifyChannels":"Notify Channels","portfolio.form.browser":"Browser","portfolio.form.email":"Email","portfolio.form.telegramChatId":"Telegram Chat ID","portfolio.form.enterTelegramChatId":"Enter Telegram Chat ID","portfolio.form.telegramRequired":"Please enter Telegram Chat ID","portfolio.form.emailAddress":"Email Address","portfolio.form.enterEmail":"Enter email address","portfolio.form.emailRequired":"Please enter email address","portfolio.form.emailInvalid":"Please enter a valid email address","portfolio.form.customPrompt":"Custom Prompt","portfolio.form.customPromptPlaceholder":'Optional: Add focus areas, e.g. "Focus on tech stock risks"',"portfolio.form.monitorScope":"Monitor Scope","portfolio.form.allPositions":"All Positions","portfolio.form.selectedPositions":"Selected Positions","portfolio.form.selectPositions":"Select Positions","portfolio.form.selectAll":"Select All","portfolio.form.deselectAll":"Deselect All","portfolio.form.selectedCount":"{count} of {total} selected","portfolio.form.pleaseSelectPositions":"Please select at least one position to monitor","portfolio.form.notificationFromProfile":"Notifications will be sent to addresses configured in your profile","portfolio.form.goToProfile":"Go to settings","portfolio.message.loadFailed":"Failed to load data","portfolio.message.saveSuccess":"Saved successfully","portfolio.message.saveFailed":"Failed to save","portfolio.message.deleteSuccess":"Deleted successfully","portfolio.message.deleteFailed":"Failed to delete","portfolio.message.updateFailed":"Failed to update","portfolio.message.monitorEnabled":"Monitor enabled","portfolio.message.monitorDisabled":"Monitor paused","portfolio.message.monitorRunSuccess":"Analysis completed","portfolio.message.monitorRunFailed":"Analysis failed","portfolio.message.monitorRunning":"AI analysis started, please wait for notification","portfolio.groups.all":"All Positions","portfolio.groups.ungrouped":"Ungrouped","portfolio.form.group":"Group","portfolio.form.enterGroup":"Enter or select group","portfolio.alerts.title":"Price/PnL Alerts","portfolio.alerts.addAlert":"Add Alert","portfolio.alerts.editAlert":"Edit Alert","portfolio.alerts.alertType":"Alert Type","portfolio.alerts.priceAbove":"Price Above","portfolio.alerts.priceBelow":"Price Below","portfolio.alerts.pnlAbove":"Profit Above (%)","portfolio.alerts.pnlBelow":"Loss Below (%)","portfolio.alerts.threshold":"Threshold","portfolio.alerts.thresholdRequired":"Please enter threshold","portfolio.alerts.enterPrice":"Enter price","portfolio.alerts.enterPercent":"Enter percentage","portfolio.alerts.currentPrice":"Current Price","portfolio.alerts.currentPriceHint":"Current price","portfolio.alerts.repeatInterval":"Repeat Alert","portfolio.alerts.noRepeat":"No repeat (trigger once)","portfolio.alerts.every5min":"Every 5 minutes","portfolio.alerts.every15min":"Every 15 minutes","portfolio.alerts.every30min":"Every 30 minutes","portfolio.alerts.every1hour":"Every 1 hour","portfolio.alerts.every4hours":"Every 4 hours","portfolio.alerts.onceDaily":"Once daily","portfolio.alerts.enabled":"Enable Alert","portfolio.alerts.enabledDesc":"Auto-monitor and trigger notifications","portfolio.alerts.delete":"Delete","portfolio.alerts.deleteConfirm":"Are you sure you want to delete this alert?","portfolio.modal.addAlert":"Add Alert","portfolio.modal.editAlert":"Edit Alert","menu.userManage":"User Management","menu.myProfile":"My Profile","common.actions":"Actions","common.refresh":"Refresh","userManage.title":"User Management","userManage.searchPlaceholder":"Search by username/email/nickname","userManage.description":"Manage system users, roles and permissions","userManage.createUser":"Create User","userManage.editUser":"Edit User","userManage.username":"Username","userManage.password":"Password","userManage.nickname":"Nickname","userManage.email":"Email","userManage.role":"Role","userManage.status":"Status","userManage.lastLogin":"Last Login","userManage.active":"Active","userManage.disabled":"Disabled","userManage.neverLogin":"Never","userManage.usernameRequired":"Please enter username","userManage.usernamePlaceholder":"Enter username","userManage.passwordRequired":"Please enter password","userManage.passwordPlaceholder":"Enter password (min 6 chars)","userManage.passwordMin":"Password must be at least 6 characters","userManage.nicknamePlaceholder":"Enter nickname","userManage.emailPlaceholder":"Enter email","userManage.emailInvalid":"Invalid email format","userManage.rolePlaceholder":"Select role","userManage.statusPlaceholder":"Select status","userManage.resetPassword":"Reset Password","userManage.resetPasswordWarning":"This will reset the user's password","userManage.newPassword":"New Password","userManage.newPasswordPlaceholder":"Enter new password","userManage.confirmDelete":"Are you sure to delete this user?","userManage.roleAdmin":"Admin","userManage.roleManager":"Manager","userManage.roleUser":"User","userManage.roleViewer":"Viewer","profile.title":"My Profile","profile.description":"Manage your account settings and preferences","profile.basicInfo":"Basic Info","profile.changePassword":"Change Password","profile.username":"Username","profile.nickname":"Nickname","profile.email":"Email","profile.lastLogin":"Last Login","profile.nicknamePlaceholder":"Enter your nickname","profile.emailPlaceholder":"Enter your email","profile.emailInvalid":"Invalid email format","profile.emailCannotChange":"Email cannot be changed after registration","profile.timezone":"Time zone","profile.timezonePlaceholder":"Follow browser / system","profile.timezoneBrowser":"Same as browser","profile.passwordHint":"Password must be at least 6 characters","profile.oldPassword":"Current Password","profile.newPassword":"New Password","profile.confirmPassword":"Confirm Password","profile.oldPasswordRequired":"Please enter current password","profile.oldPasswordPlaceholder":"Enter current password","profile.newPasswordRequired":"Please enter new password","profile.newPasswordPlaceholder":"Enter new password","profile.confirmPasswordRequired":"Please confirm password","profile.confirmPasswordPlaceholder":"Confirm new password","profile.passwordMin":"Password must be at least 6 characters","profile.passwordMismatch":"Passwords do not match","profile.credits.title":"My Credits","profile.credits.unit":"Credits","profile.credits.recharge":"Top Up","profile.credits.vipExpires":"VIP expires on","profile.credits.vipExpired":"VIP expired","profile.credits.noVip":"Not a VIP","profile.credits.hint":"AI analysis/backtest/monitoring will consume credits; VIP only makes VIP-free indicators free to use.","profile.creditsLog":"Credits History","profile.creditsLog.time":"Time","profile.creditsLog.action":"Type","profile.creditsLog.amount":"Change","profile.creditsLog.balance":"Balance","profile.creditsLog.remark":"Remark","profile.creditsLog.actionConsume":"Consume","profile.creditsLog.actionRecharge":"Recharge","profile.creditsLog.actionAdjust":"Adjust","profile.creditsLog.actionRefund":"Refund","profile.creditsLog.actionVipGrant":"VIP Grant","profile.creditsLog.actionVipRevoke":"VIP Revoke","profile.creditsLog.actionRegisterBonus":"Register Bonus","profile.creditsLog.actionReferralBonus":"Referral Bonus","profile.creditsLog.actionIndicatorPurchase":"Indicator Purchase","profile.creditsLog.actionIndicatorSale":"Indicator Sale","profile.referral.title":"Invite Friends","profile.referral.listTab":"Referrals","profile.referral.totalInvited":"Invited","profile.referral.bonusPerInvite":"Per Invite","profile.referral.yourLink":"Your Referral Link","profile.referral.copyLink":"Copy Link","profile.referral.linkCopied":"Referral link copied","profile.referral.newUserBonus":"New users get","profile.referral.user":"User","profile.referral.registerTime":"Registered","profile.referral.noReferrals":"No referrals yet","profile.referral.shareNow":"Share Now","profile.notifications.title":"Notification Settings","profile.notifications.hint":"Configure your default notification methods, which will be used automatically when creating asset monitors and alerts","profile.notifications.defaultChannels":"Default Notification Channels","profile.notifications.browser":"In-App Notification","profile.notifications.email":"Email","profile.notifications.phone":"SMS","profile.notifications.telegramBotToken":"Telegram Bot Token","profile.notifications.telegramBotTokenPlaceholder":"Enter your Telegram Bot Token","profile.notifications.telegramBotTokenHint":"Get Token by creating a bot via @BotFather","profile.notifications.telegramChatId":"Telegram Chat ID","profile.notifications.telegramPlaceholder":"Enter your Telegram Chat ID (e.g. 123456789)","profile.notifications.telegramHint":"Send /start to @userinfobot to get your Chat ID","profile.notifications.notifyEmail":"Notification Email","profile.notifications.emailPlaceholder":"Email address to receive notifications","profile.notifications.emailHint":"Uses your account email by default, or set a different one","profile.notifications.phonePlaceholder":"Enter phone number (e.g. +1234567890)","profile.notifications.phoneHint":"Requires admin to configure Twilio service","profile.notifications.discordWebhook":"Discord Webhook","profile.notifications.discordPlaceholder":"https://discord.com/api/webhooks/...","profile.notifications.discordHint":"Create Webhook in Discord server settings","profile.notifications.webhookUrl":"Webhook URL","profile.notifications.webhookPlaceholder":"https://your-server.com/webhook","profile.notifications.webhookHint":"Custom Webhook URL, notifications sent via POST JSON","profile.notifications.webhookToken":"Webhook Token (Optional)","profile.notifications.webhookTokenPlaceholder":"Bearer Token for request authentication","profile.notifications.webhookTokenHint":"Sent as Authorization: Bearer Token to Webhook","profile.notifications.testBtn":"Send Test Notification","profile.notifications.saveSuccess":"Notification settings saved successfully","profile.notifications.selectChannel":"Please select at least one notification channel","profile.notifications.fillTelegramToken":"Please fill in Telegram Bot Token","profile.notifications.fillTelegram":"Please fill in Telegram Chat ID","profile.notifications.fillEmail":"Please fill in notification email","profile.notifications.fillPhone":"Please fill in phone number for SMS","profile.notifications.fillDiscord":"Please fill in Discord Webhook URL","profile.notifications.fillWebhook":"Please fill in Webhook URL","profile.notifications.testSent":"Test notification sent, please check your notification channels","profile.notifications.testFailed":"Failed to send test notification","profile.notifications.testPartial":"Some channels failed","profile.notifications.errSmtpHost":"Email: server SMTP not configured (admin: set SMTP_HOST, SMTP_USER, SMTP_PASSWORD in system settings)","profile.notifications.errSmtpFrom":"Email: SMTP_FROM is not set","profile.notifications.errEmailTarget":"Email: no notification address and account has no email","userManage.credits":"Credits","userManage.adjustCredits":"Adjust Credits","userManage.setVip":"Set VIP","userManage.currentCredits":"Current Credits","userManage.newCredits":"New Credits","userManage.enterCredits":"Enter new credits amount","userManage.creditsNonNegative":"Credits cannot be negative","userManage.currentVip":"Current VIP Status","userManage.vipActive":"Active","userManage.vipExpired":"Expired","userManage.vipDays":"VIP Days","userManage.vipExpiresAt":"VIP Expires At","userManage.cancelVip":"Cancel VIP","userManage.days":"days","userManage.customDate":"Custom Date","userManage.selectDate":"Please select a date","userManage.remark":"Remark","userManage.remarkPlaceholder":"Optional remark","userManage.tabUsers":"User Management","systemOverview.tabTitle":"System Overview","systemOverview.totalStrategies":"Total Strategies","systemOverview.runningStrategies":"Running","systemOverview.totalCapital":"Total Capital","systemOverview.totalPnl":"Total PnL","systemOverview.filterAll":"All Status","systemOverview.filterExecAll":"All modes","systemOverview.filterRunning":"Running","systemOverview.filterStopped":"Stopped","systemOverview.searchPlaceholder":"Search strategy/symbol/user","systemOverview.running":"Running","systemOverview.stopped":"Stopped","systemOverview.colUser":"User","systemOverview.colStrategy":"Strategy","systemOverview.colStatus":"Status","systemOverview.colExecutionMode":"Mode","systemOverview.colSymbol":"Symbol","systemOverview.colCapital":"Capital","systemOverview.colPositionEquity":"Position equity","systemOverview.colPnl":"PnL / ROI","systemOverview.colPositions":"Pos","systemOverview.colTrades":"Trades","systemOverview.colIndicator":"Indicator","systemOverview.colExchange":"Exchange","systemOverview.colTimeframe":"TF","systemOverview.colLeverage":"Lev","systemOverview.colCreatedAt":"Created","systemOverview.colUpdatedAt":"Updated","systemOverview.realized":"Real","systemOverview.unrealized":"Unreal","systemOverview.symbols":"symbols","systemOverview.live":"Live","systemOverview.signal":"Signal Only","settings.group.billing":"Billing & Credits","settings.field.BILLING_ENABLED":"Enable Billing","settings.field.BILLING_COST_AI_ANALYSIS":"AI Analysis Cost","settings.field.BILLING_COST_STRATEGY_RUN":"Strategy Run Cost","settings.field.BILLING_COST_BACKTEST":"Backtest Cost","settings.field.BILLING_COST_PORTFOLIO_MONITOR":"Portfolio Monitor Cost","settings.field.BILLING_COST_AI_CODE_GEN":"AI Code Generation Cost","settings.field.CREDITS_REGISTER_BONUS":"Register Bonus","settings.field.CREDITS_REFERRAL_BONUS":"Referral Bonus","settings.field.RECHARGE_TELEGRAM_URL":"Recharge Telegram URL","settings.field.MEMBERSHIP_MONTHLY_PRICE_USD":"Monthly Membership Price (USD)","settings.field.MEMBERSHIP_MONTHLY_CREDITS":"Monthly Membership Bonus Credits","settings.field.MEMBERSHIP_YEARLY_PRICE_USD":"Yearly Membership Price (USD)","settings.field.MEMBERSHIP_YEARLY_CREDITS":"Yearly Membership Bonus Credits","settings.field.MEMBERSHIP_LIFETIME_PRICE_USD":"Lifetime Membership Price (USD)","settings.field.MEMBERSHIP_LIFETIME_MONTHLY_CREDITS":"Lifetime Monthly Credits","settings.field.USDT_PAY_ENABLED":"Enable USDT Pay","settings.field.USDT_PAY_CHAIN":"USDT Chain","settings.field.USDT_TRC20_XPUB":"TRC20 XPUB (Watch-only)","settings.field.USDT_TRC20_CONTRACT":"USDT TRC20 Contract","settings.field.TRONGRID_BASE_URL":"TronGrid Base URL","settings.field.TRONGRID_API_KEY":"TronGrid API Key","settings.field.USDT_PAY_CONFIRM_SECONDS":"Confirm Delay (sec)","settings.field.USDT_PAY_EXPIRE_MINUTES":"Order Expire (min)","settings.desc.BILLING_ENABLED":"Enable billing system. Users need credits to use certain features when enabled","settings.desc.BILLING_COST_AI_ANALYSIS":"Credits consumed per AI analysis request","settings.desc.BILLING_COST_STRATEGY_RUN":"Credits consumed when starting a strategy","settings.desc.BILLING_COST_BACKTEST":"Credits consumed per backtest run","settings.desc.BILLING_COST_PORTFOLIO_MONITOR":"Credits consumed per portfolio AI monitoring run","settings.desc.BILLING_COST_AI_CODE_GEN":"Credits consumed per AI strategy or indicator code generation (higher token usage)","settings.desc.CREDITS_REGISTER_BONUS":"Credits awarded to new users on registration","settings.desc.CREDITS_REFERRAL_BONUS":"Credits awarded to referrer when someone signs up with their referral code","settings.desc.VERIFICATION_CODE_MAX_ATTEMPTS":"Maximum attempts to verify a code before lockout","settings.desc.VERIFICATION_CODE_LOCK_MINUTES":"Lockout duration after exceeding max attempts","settings.desc.RECHARGE_TELEGRAM_URL":"Telegram customer service URL for recharge inquiries","settings.desc.MEMBERSHIP_MONTHLY_PRICE_USD":"Monthly membership price in USD (mock payment in current version).","settings.desc.MEMBERSHIP_MONTHLY_CREDITS":"Credits granted immediately after purchasing monthly membership.","settings.desc.MEMBERSHIP_YEARLY_PRICE_USD":"Yearly membership price in USD (mock payment in current version).","settings.desc.MEMBERSHIP_YEARLY_CREDITS":"Credits granted immediately after purchasing yearly membership.","settings.desc.MEMBERSHIP_LIFETIME_PRICE_USD":"Lifetime membership price in USD (mock payment in current version).","settings.desc.MEMBERSHIP_LIFETIME_MONTHLY_CREDITS":"Credits granted every 30 days for lifetime members (first grant happens immediately on purchase).","settings.desc.USDT_PAY_ENABLED":"Enable USDT scan-to-pay flow (per-order unique address + auto reconciliation).","settings.desc.USDT_PAY_CHAIN":"Currently only TRC20 is supported.","settings.desc.USDT_TRC20_XPUB":"Watch-only xpub used to derive per-order deposit addresses. Do NOT paste private key/seed.","settings.desc.USDT_TRC20_CONTRACT":"USDT contract address on TRON (default prefilled).","settings.desc.TRONGRID_BASE_URL":"TronGrid API base URL (default is fine).","settings.desc.TRONGRID_API_KEY":"Optional. For higher TronGrid rate limits and stability.","settings.desc.USDT_PAY_CONFIRM_SECONDS":"After a payment is detected, wait N seconds before marking it confirmed.","settings.desc.USDT_PAY_EXPIRE_MINUTES":"Order expiration time; users need to regenerate an order after it expires.","globalMarket.title":"Global Market Dashboard","globalMarket.fearGreedShort":"F&G","globalMarket.calendar":"Calendar","globalMarket.lastUpdate":"Last Update","globalMarket.refresh":"Refresh","globalMarket.name":"Name","globalMarket.price":"Price","globalMarket.change":"Change","globalMarket.trend":"Trend","globalMarket.pair":"Pair","globalMarket.unit":"Unit","globalMarket.refreshSuccess":"Data refreshed successfully","globalMarket.refreshError":"Failed to refresh data","globalMarket.fetchError":"Failed to fetch data","globalMarket.loading":"Loading...","globalMarket.fearGreedIndex":"Fear & Greed Index","globalMarket.fearGreedTip":"Fear & Greed Index measures market sentiment, 0 = Extreme Fear, 100 = Extreme Greed","globalMarket.volatilityIndex":"Volatility Index","globalMarket.dollarIndex":"Dollar Index","globalMarket.majorIndices":"Major Indices","globalMarket.vixTitle":"VIX Volatility Index","globalMarket.vixTip":"VIX measures expected market volatility, higher values indicate more market fear","globalMarket.extremeFear":"Extreme Fear","globalMarket.fear":"Fear","globalMarket.neutral":"Neutral","globalMarket.greed":"Greed","globalMarket.extremeGreed":"Extreme Greed","globalMarket.marketOverview":"Market Overview","globalMarket.indices":"Indices","globalMarket.forex":"Forex","globalMarket.crypto":"Crypto","globalMarket.commodities":"Commodities","globalMarket.heatmap":"Market Heatmap","globalMarket.cryptoHeatmap":"Crypto","globalMarket.commoditiesHeatmap":"Commodities","globalMarket.sectorHeatmap":"Sectors","globalMarket.forexHeatmap":"Forex","globalMarket.opportunities":"Trading Opportunities","globalMarket.noOpportunities":"No significant opportunities detected","globalMarket.financialNews":"Financial News","globalMarket.noNews":"No news available","globalMarket.economicCalendar":"Economic Calendar","globalMarket.noEvents":"No events scheduled","globalMarket.actual":"Actual","globalMarket.forecast":"Forecast","globalMarket.previous":"Previous","globalMarket.signal.bullish":"Bullish Momentum","globalMarket.signal.bearish":"Bearish Momentum","globalMarket.signal.overbought":"Overbought Warning","globalMarket.signal.oversold":"Oversold Opportunity","globalMarket.worldMap":"Global Markets Map","globalMarket.rising":"Rising","globalMarket.falling":"Falling","globalMarket.bullish":"Bullish","globalMarket.bearish":"Bearish","globalMarket.expectedImpact":"Expected Impact","globalMarket.aboveForecast":"Above Forecast","globalMarket.belowForecast":"Below Forecast","globalMarket.upcomingEvents":"Upcoming Events","globalMarket.releasedEvents":"Released Data","trading-assistant.form.notificationFromProfile":"Notifications will be sent to the address configured in your profile.","trading-assistant.form.notificationConfigMissing":"You have not configured parameters for selected channels ({channels}). Please go to your profile to configure them.","trading-assistant.form.goToProfile":"Go to Profile","community.title":"Indicator Market","community.searchPlaceholder":"Search indicators...","community.all":"All","community.freeOnly":"Free","community.paidOnly":"Paid","community.sortNewest":"Newest","community.sortHot":"Popular","community.sortRating":"Top Rated","community.sortPriceLow":"Price: Low to High","community.sortPriceHigh":"Price: High to Low","community.myPurchases":"My Purchases","community.noIndicators":"No indicators yet","community.createFirst":"Create Your First Indicator","community.total":"Total","community.items":"items","community.free":"Free","community.credits":"Credits","community.myIndicator":"My Indicator","community.purchased":"Purchased","community.noDescription":"No description","community.loadFailed":"Failed to load","community.publishedAt":"Published","community.downloads":"Downloads","community.rating":"Rating","community.views":"Views","community.description":"Description","community.performance":"Live Performance","community.strategyCount":"Strategies","community.tradeCount":"Trades","community.winRate":"Win Rate","community.totalProfit":"Total Profit","community.reviews":"Reviews","community.useNow":"Use Now","community.getFree":"Get Free","community.buyNow":"Buy Now","community.purchaseSuccess":"Purchase successful! Indicator added to your list","community.purchaseFailed":"Purchase failed","community.indicator_not_found":"Indicator not found or unavailable","community.cannot_buy_own":"Cannot buy your own indicator","community.already_purchased":"You have already purchased this indicator","community.insufficient_credits":"Insufficient credits","community.commentSuccess":"Comment submitted","community.commentFailed":"Failed to submit comment","community.commentUpdateSuccess":"Comment updated successfully","community.commentUpdateFailed":"Failed to update comment","community.editComment":"Edit Comment","community.cancelEdit":"Cancel","community.updateComment":"Update Comment","community.alreadyCommented":"You have already reviewed this indicator","community.editMyComment":"Edit Review","community.me":"Me","community.edited":"edited","community.not_purchased":"Please purchase/get the indicator first to leave a review","community.cannot_comment_own":"Cannot review your own indicator","community.already_commented":"You have already reviewed this indicator","community.noComments":"No reviews yet","community.yourRating":"Your Rating","community.commentPlaceholder":"Share your experience...","community.submitComment":"Submit Review","community.pleaseRate":"Please select a rating","community.loadMore":"Load More","community.justNow":"Just now","community.minutesAgo":"minutes ago","community.hoursAgo":"hours ago","community.daysAgo":"days ago","community.noPurchases":"No purchases yet","community.purchasedFrom":"Seller","community.purchaseTime":"Purchase Time","community.admin.reviewTab":"Review","community.admin.pending":"Pending","community.admin.approved":"Approved","community.admin.rejected":"Rejected","community.admin.noItems":"No items","community.admin.noDescription":"No description","community.admin.viewCode":"View Code","community.admin.note":"Note","community.admin.approve":"Approve","community.admin.reject":"Reject","community.admin.unpublish":"Unpublish","community.admin.delete":"Delete","community.admin.deleteConfirm":"Are you sure to delete this indicator? This cannot be undone.","community.admin.unpublishConfirm":"Are you sure to unpublish this indicator?","community.admin.unpublishHint":"This indicator will be hidden from the market","community.admin.confirm":"Confirm","community.admin.cancel":"Cancel","community.admin.approveTitle":"Approve Indicator","community.admin.rejectTitle":"Reject Indicator","community.admin.noteLabel":"Note (optional)","community.admin.notePlaceholder":"Enter review note...","community.admin.loadFailed":"Failed to load","community.admin.reviewSuccess":"Review submitted","community.admin.reviewFailed":"Review failed","community.admin.unpublishSuccess":"Unpublished successfully","community.admin.unpublishFailed":"Failed to unpublish","community.admin.deleteSuccess":"Deleted successfully","community.admin.deleteFailed":"Failed to delete","fastAnalysis.aiAnalysis":"AI Analysis","fastAnalysis.analyzing":"AI is analyzing...","fastAnalysis.pleaseWait":"Please wait, fetching real-time data and generating professional report","fastAnalysis.error":"Analysis Failed","fastAnalysis.retry":"Retry","fastAnalysis.selectSymbol":"Select a symbol to start","fastAnalysis.selectHint":"Choose from your watchlist or add a new symbol","fastAnalysis.confidence":"Confidence","fastAnalysis.currentPrice":"Current Price","fastAnalysis.entryPrice":"Entry Price","fastAnalysis.stopLoss":"Stop Loss","fastAnalysis.takeProfit":"Take Profit","fastAnalysis.stopLossHint":"Based on 2x ATR & support","fastAnalysis.takeProfitHint":"Based on 3x ATR & resistance","fastAnalysis.atrBased":"ATR-based","fastAnalysis.riskReward":"Risk/Reward","fastAnalysis.technical":"Technical","fastAnalysis.fundamental":"Fundamental","fastAnalysis.sentiment":"Sentiment","fastAnalysis.overall":"Overall","fastAnalysis.keyReasons":"Key Reasons","fastAnalysis.risks":"Risks","fastAnalysis.indicators":"Technical Indicators","fastAnalysis.maTrend":"MA Trend","fastAnalysis.support":"Support","fastAnalysis.resistance":"Resistance","fastAnalysis.volatility":"Volatility","fastAnalysis.wasHelpful":"Was this analysis helpful?","fastAnalysis.helpful":"Helpful","fastAnalysis.notHelpful":"Not Helpful","fastAnalysis.feedbackThanks":"Thanks for your feedback!","fastAnalysis.feedbackFailed":"Failed to submit feedback","fastAnalysis.feedbackUnavailable":"Feedback unavailable, please re-analyze","fastAnalysis.analysisTime":"Analysis time","fastAnalysis.startAnalysis":"Analyze","fastAnalysis.history":"History","fastAnalysis.systemTitle":"QUANTDINGER AI","fastAnalysis.systemOnline":"Online","fastAnalysis.version":"Fast","fastAnalysis.preparing":"Preparing...","fastAnalysis.step1":"Fetching real-time data","fastAnalysis.step2":"Calculating indicators","fastAnalysis.step3":"AI deep analysis","fastAnalysis.step4":"Generating report","fastAnalysis.technicalAnalysis":"Technical Analysis","fastAnalysis.fundamentalAnalysis":"Fundamental Analysis","fastAnalysis.sentimentAnalysis":"Market Sentiment","fastAnalysis.signal.bullish":"Bullish","fastAnalysis.signal.bearish":"Bearish","fastAnalysis.signal.neutral":"Neutral","fastAnalysis.signal.overbought":"Overbought","fastAnalysis.signal.oversold":"Oversold","fastAnalysis.signal.strong_bullish":"Strong Bullish","fastAnalysis.signal.strong_bearish":"Strong Bearish","fastAnalysis.trend.uptrend":"Uptrend","fastAnalysis.trend.downtrend":"Downtrend","fastAnalysis.trend.sideways":"Sideways","fastAnalysis.trend.consolidating":"Consolidating","fastAnalysis.trend.golden_cross":"Golden Cross","fastAnalysis.trend.death_cross":"Death Cross","fastAnalysis.trend.strong_uptrend":"Strong Uptrend","fastAnalysis.trend.strong_downtrend":"Strong Downtrend","fastAnalysis.volatilityLevel.high":"High","fastAnalysis.volatilityLevel.medium":"Medium","fastAnalysis.volatilityLevel.low":"Low","fastAnalysis.volatilityLevel.unknown":"Unknown","fastAnalysis.marketOverview":"Market Overview","fastAnalysis.selectTip":"Select a symbol from your watchlist to start AI analysis","fastAnalysis.analysisInProgress":"An analysis is already running for this symbol. Please wait and try again.","fastAnalysis.analysisInProgressTitle":"Analysis in progress","fastAnalysis.insufficientCredits":"Insufficient credits","fastAnalysis.insufficientCreditsDetail":"Insufficient credits: need {required}, you have {current}, short by {shortage}.","fastAnalysis.analysisCompleteWithCredits":"Analysis complete. Remaining credits: {remaining}","fastAnalysis.analysisSubmitted":"Analysis task submitted. You can check progress in History.","fastAnalysis.analysisSubmittedWithCredits":"Task submitted. Remaining credits: {remaining}","fastAnalysis.analysisStillProcessing":"This task is still processing. Please refresh history shortly.","fastAnalysis.consensusTitle":"Multi-timeframe consensus","fastAnalysis.consensusDecision":"Consensus","fastAnalysis.consensusScore":"Composite score","fastAnalysis.consensusAgreement":"Timeframe agreement","fastAnalysis.trendOutlookTitle":"Multi-horizon outlook","fastAnalysis.outlook24h":"~24 hours","fastAnalysis.outlook3d":"~3 days","fastAnalysis.outlook1w":"~1 week","fastAnalysis.outlook1m":"~1 month","fastAnalysis.outlookBull":"Bullish","fastAnalysis.outlookBear":"Bearish","fastAnalysis.outlookNeutral":"Neutral / range","fastAnalysis.stopLossHintShort":"Short stop-loss: above current price (loss if price rises). Values from backend trading_plan.","fastAnalysis.takeProfitHintShort":"Short take-profit: below current price (profit if price falls). Values from backend trading_plan.","fastAnalysis.indicatorsProBadge":"PRO","fastAnalysis.indicatorsProSubtitle":"Aligned with backend `MarketDataCollector._calculate_indicators` (mainstream-style): RSI(14) is Wilder-smoothed. MACD(12,26,9) uses SMA-seeded EMAs on closes; DIF from bar 26 onward; DEA = EMA9 of the DIF series (~34+ bars for a full signal line). MAs are SMAs. Pivot uses previous bar H/L/C. Swing = 20-bar high/low extremes. Bollinger = SMA(20) ± 2×population σ; aggregated levels use BB_upper/BB_lower. ATR(14) is Wilder, chained to the latest bar. See docs/INDICATOR_DEFINITIONS_CN.md for volume ratio and range position.","fastAnalysis.indicatorsProTableTitle":"Quant parameters (institutional-style)","fastAnalysis.macdDif":"MACD DIF","fastAnalysis.macdDea":"MACD DEA (signal)","fastAnalysis.macdHist":"MACD histogram","fastAnalysis.ma5Label":"MA(5)","fastAnalysis.ma10Label":"MA(10)","fastAnalysis.ma20Label":"MA(20)","fastAnalysis.bbUpper":"Bollinger upper","fastAnalysis.bbMiddle":"Bollinger middle","fastAnalysis.bbLower":"Bollinger lower","fastAnalysis.bbWidthPct":"Bollinger width %","fastAnalysis.bbWidth":"Width %","fastAnalysis.bbWidthHint":"squeeze / expand","fastAnalysis.pivotStd":"Classic pivot","fastAnalysis.levelS1":"Support S1","fastAnalysis.levelR1":"Resistance R1","fastAnalysis.levelS2":"Support S2","fastAnalysis.levelR2":"Resistance R2","fastAnalysis.swingHigh20":"20-bar swing high","fastAnalysis.swingLow20":"20-bar swing low","fastAnalysis.atr14Label":"ATR(14) absolute","fastAnalysis.atrTrueRange":"avg true range","fastAnalysis.rangePct20":"20-bar range position","fastAnalysis.rangePct20Hint":"0–100% of range","fastAnalysis.volumeRatio":"Volume ratio","fastAnalysis.volumeRatioHint":"vs 20-bar avg vol","fastAnalysis.rrLongRef":"Risk/reward (long ref.)","fastAnalysis.refClose":"Ref. close (calc.)","aiQuant.title":"AI Quant","aiQuant.strategyList":"Strategies","aiQuant.create":"Create","aiQuant.edit":"Edit","aiQuant.delete":"Delete","aiQuant.start":"Start","aiQuant.stop":"Stop","aiQuant.analyze":"Analyze Now","aiQuant.noStrategy":"No strategies yet, click to create","aiQuant.selectStrategy":"Select a strategy from the left","aiQuant.createFirst":"Create Your First Strategy","aiQuant.createStrategy":"Create Strategy","aiQuant.editStrategy":"Edit Strategy","aiQuant.confirmDelete":"Are you sure you want to delete this strategy?","aiQuant.latestAnalysis":"Latest Analysis","aiQuant.analysisHistory":"Analysis History","aiQuant.decision":"Decision","aiQuant.confidence":"Confidence","aiQuant.currentPrice":"Current Price","aiQuant.entryPrice":"Entry Price","aiQuant.stopLoss":"Stop Loss","aiQuant.takeProfit":"Take Profit","aiQuant.reason":"Reason","aiQuant.analyzedAt":"Analyzed At","aiQuant.tradeSettings":"Trade Settings","aiQuant.minutes":"min","aiQuant.hour":"hour","aiQuant.hours":"hours","aiQuant.stats.totalStrategies":"Total Strategies","aiQuant.stats.runningStrategies":"Running","aiQuant.stats.totalAnalyses":"Analyses","aiQuant.stats.totalPnl":"Total PnL","aiQuant.status.running":"Running","aiQuant.status.stopped":"Stopped","aiQuant.status.paused":"Paused","aiQuant.executionMode.signal":"Signal Only","aiQuant.executionMode.live":"Live Trading","aiQuant.marketType.spot":"Spot","aiQuant.marketType.futures":"Futures","aiQuant.field.strategyName":"Strategy Name","aiQuant.field.market":"Market","aiQuant.field.symbol":"Symbol","aiQuant.field.marketType":"Market Type","aiQuant.field.aiModel":"AI Model","aiQuant.field.interval":"Analysis Interval","aiQuant.field.aiPrompt":"AI Prompt","aiQuant.field.executionMode":"Execution Mode","aiQuant.field.positionSize":"Position Size","aiQuant.field.stopLoss":"Stop Loss %","aiQuant.field.takeProfit":"Take Profit %","aiQuant.field.totalAnalyses":"Total Analyses","aiQuant.field.totalTrades":"Total Trades","aiQuant.field.totalPnl":"Total PnL","aiQuant.placeholder.strategyName":"Enter strategy name","aiQuant.placeholder.market":"Select market","aiQuant.placeholder.symbol":"e.g., BTC/USDT","aiQuant.placeholder.aiModel":"Use system default","aiQuant.placeholder.aiPrompt":"Enter your trading strategy prompt, e.g., Buy when RSI is below 30...","aiQuant.validation.strategyName":"Please enter strategy name","aiQuant.validation.market":"Please select market","aiQuant.validation.symbol":"Please enter symbol","aiQuant.table.decision":"Decision","aiQuant.table.confidence":"Confidence","aiQuant.table.entryPrice":"Entry","aiQuant.table.stopLoss":"Stop Loss","aiQuant.table.takeProfit":"Take Profit","aiQuant.table.time":"Time","aiQuant.msg.createSuccess":"Strategy created successfully","aiQuant.msg.updateSuccess":"Strategy updated successfully","aiQuant.msg.deleteSuccess":"Strategy deleted successfully","aiQuant.msg.startSuccess":"Strategy started","aiQuant.msg.stopSuccess":"Strategy stopped","aiQuant.msg.analyzeSuccess":"Analysis completed","aiQuant.field.initialCapital":"Initial Capital","aiQuant.field.leverage":"Leverage","aiQuant.field.tradeDirection":"Trade Direction","aiQuant.field.trailingStop":"Trailing Stop","aiQuant.field.trailingStopPct":"Trailing Stop %","aiQuant.direction.long":"Long Only","aiQuant.direction.short":"Short Only","aiQuant.direction.both":"Both","aiQuant.riskControl":"Risk Control","aiQuant.aiSettings":"AI Settings","aiQuant.systemDefault":"System Default","aiQuant.placeholder.selectSymbol":"Select from watchlist","aiQuant.hint.symbolFromWatchlist":"Select from your watchlist, market type is auto-detected","aiQuant.hint.spotLeverageFixed":"Spot market leverage is fixed at 1x","aiQuant.hint.stopLossEnforced":"Enforced stop loss, AI cannot modify","aiQuant.hint.takeProfitEnforced":"Enforced take profit, AI cannot modify","aiQuant.hint.aiPromptOnly":"AI only determines direction based on prompt, will not modify your risk settings","aiQuant.aiLimitWarning":"AI Permission Restricted","aiQuant.aiLimitDescription":"AI can ONLY determine trade direction (BUY/SELL/HOLD). Leverage, position size, stop loss/take profit are fully controlled by you and CANNOT be modified by AI.","aiQuant.userStopLoss":"Your Stop Loss","aiQuant.userTakeProfit":"Your Take Profit","aiQuant.userLeverage":"Your Leverage","aiQuant.validation.initialCapital":"Please enter initial capital","aiQuant.table.currentPrice":"Current Price","aiQuant.field.promptTemplate":"Strategy Template","aiQuant.placeholder.selectTemplate":"Select a preset template","aiQuant.template.default":"📊 Comprehensive Analysis (Recommended)","aiQuant.template.trend":"📈 Trend Following","aiQuant.template.swing":"🔄 Swing Trading","aiQuant.template.news":"📰 News Driven","aiQuant.template.custom":"✏️ Custom","aiQuant.hint.dataProvided":"System auto-provides: real-time price, indicators (RSI/MACD/MA), recent news, macro data. AI analyzes these with your prompt to determine direction.","aiQuant.hint.liveWarning":"Live mode will trade with REAL money! Make sure you have configured exchange API and understand the risks!","trading-assistant.liveDisclaimer.title":"Live Trading Disclaimer","trading-assistant.liveDisclaimer.content":"Live trading involves significant risk and may result in partial or total loss of funds. The platform does not guarantee returns or profits. You are responsible for your own decisions and outcomes.","trading-assistant.liveDisclaimer.agree":"I have read and understood the disclaimer and still want to enable live trading","trading-assistant.liveDisclaimer.required":"Please accept the disclaimer before enabling live trading","trading-assistant.liveDisclaimer.blockTitle":"Please accept the disclaimer first","trading-assistant.liveDisclaimer.blockDesc":"You must accept the disclaimer to configure live trading connection and order settings.","trading-assistant.strategyMode.signal":"Indicator Signal Strategy","trading-assistant.strategyMode.script":"Python Script Strategy","trading-assistant.strategyMode.signalBadge":"Best for quick start","trading-assistant.strategyMode.scriptBadge":"Best for complex logic","trading-assistant.strategyMode.signalDesc":"Build a strategy from existing indicators and visual risk settings. No coding required, ideal for getting your first strategy online quickly.","trading-assistant.strategyMode.scriptDesc":"Write the full strategy in Python. Best for grid, martingale, DCA, breakout, and other advanced automated trading logic.","trading-assistant.strategyMode.signalFeature1":"No coding: select indicators and configure rules","trading-assistant.strategyMode.signalFeature2":"Visual TP/SL, execution mode, and risk settings","trading-assistant.strategyMode.signalFeature3":"Great for trend, timing, and signal-alert strategies","trading-assistant.strategyMode.scriptFeature1":"Full Python strategy code with custom logic","trading-assistant.strategyMode.scriptFeature2":"Built-in templates for Grid / Martingale / DCA and more","trading-assistant.strategyMode.scriptFeature3":"Best for parameterized strategies and complex position control","trading-assistant.selectMode":"Choose How to Create","trading-assistant.selectModeHint":"If you want the fastest setup, choose Indicator Signal Strategy. If you need grid, martingale, or custom trading logic, choose Python Script Strategy.","trading-assistant.fromTemplate":"Or quick-start from a template","trading-assistant.useThisMode":"Use This Mode","trading-assistant.template.title":"Strategy Templates","trading-assistant.template.trendFollowing":"Trend Following","trading-assistant.template.trendFollowingDesc":"Moving average crossover + dynamic stop-loss, captures mid-to-long trends","trading-assistant.template.martingale":"Martingale","trading-assistant.template.martingaleDesc":"Double down on losses with max-layer control, counter-trend averaging","trading-assistant.template.grid":"Grid Trading","trading-assistant.template.gridDesc":"Place equidistant buy/sell orders within a price range, ideal for ranging markets","trading-assistant.template.dca":"DCA","trading-assistant.template.dcaDesc":"Time/condition-based batch entries, dollar-cost averaging","trading-assistant.template.meanReversion":"Mean Reversion","trading-assistant.template.meanReversionDesc":"Bollinger/RSI-based reversion trades, fits range-bound assets","trading-assistant.template.breakout":"Breakout","trading-assistant.template.breakoutDesc":"Enter on key level breakouts confirmed by volume","trading-assistant.template.useTemplate":"Use Template","trading-assistant.editor.title":"Strategy Code","trading-assistant.editor.verify":"Verify Code","trading-assistant.editor.verifySuccess":"Code verification passed","trading-assistant.editor.verifyFailed":"Code verification failed","trading-assistant.editor.aiGenerate":"AI Generate Strategy","trading-assistant.editor.aiGenerateBtn":"Generate","trading-assistant.editor.aiPromptPlaceholder":"Describe the strategy you want, e.g.: Write a BTC grid strategy with price range 60000-70000, 10 grid levels...","trading-assistant.editor.apiDocs":"API Docs","trading-assistant.editor.templates":"Templates","trading-assistant.editor.aiTab":"AI Assistant","trading-assistant.editor.docsTab":"API Docs","trading-assistant.editor.templateTab":"Templates","trading-assistant.editor.paramsTab":"Template Params","trading-assistant.editor.codeHint":"Write strategy code using the ctx object for trading API","trading-assistant.editor.generating":"Generating strategy code...","trading-assistant.editor.templateIntroTitle":"Pick a template with editable parameters","trading-assistant.editor.templateIntroDesc":"After selecting a template, adjust its range, layers, TP/SL, and other parameters on the right before applying them into the code.","trading-assistant.editor.paramsHint":'After changing parameters, click "Apply to Code" to regenerate the template defaults in code.',"trading-assistant.editor.resetTemplateParams":"Reset Defaults","trading-assistant.editor.applyTemplateParams":"Apply to Code","trading-assistant.editor.paramsEmpty":"Select a script template first from the Templates tab","trading-assistant.editor.templateApplied":"Template parameters applied to code","trading-assistant.editor.aiHint":"This assistant can generate new code or revise the current strategy. A good workflow is: start from a template, then ask AI to refine it.","trading-assistant.editor.docsIntroTitle":"Built-in API Reference","trading-assistant.editor.docsIntroDesc":"These are the commonly used QuantDinger script strategy APIs and lifecycle hooks, so you can code and look up usage side by side.","trading-assistant.editor.aiPromptRequired":"Please describe what you want AI to generate or revise first","trading-assistant.editor.aiGenerateSuccess":"AI generated strategy code","trading-assistant.editor.aiGenerateFailed":"AI generation failed","trading-assistant.editor.aiSuggestionImprove":"Improve current template","trading-assistant.editor.aiSuggestionImprovePrompt":"Please improve the current template, clean up the structure, add better logs, and make it easier to maintain.","trading-assistant.editor.aiSuggestionRisk":"Add better risk control","trading-assistant.editor.aiSuggestionRiskPrompt":"Please add more complete take-profit, stop-loss, position sizing, and exception protection to the current strategy.","trading-assistant.editor.aiSuggestionExplain":"Explain this code","trading-assistant.editor.aiSuggestionExplainPrompt":"Please explain this strategy code section by section, including parameters, trading logic, and risks.","trading-assistant.editor.aiPromptTemplateHint":"Please continue optimizing this template:","trading-assistant.editor.paramType.number":"Number","trading-assistant.editor.paramType.integer":"Integer","trading-assistant.editor.paramType.percent":"Percent","trading-assistant.editor.paramType.select":"Select","trading-assistant.editor.paramType.boolean":"Toggle","trading-assistant.editor.paramType.text":"Text","trading-assistant.templateParam.fast_period.label":"Fast period","trading-assistant.templateParam.fast_period.desc":"Short EMA length used to detect short-term momentum.","trading-assistant.templateParam.slow_period.label":"Slow period","trading-assistant.templateParam.slow_period.desc":"Long EMA length used to confirm the main trend.","trading-assistant.templateParam.position_pct.label":"Position allocation","trading-assistant.templateParam.position_pct.desc":"Maximum portion of account equity used for one entry.","trading-assistant.templateParam.stop_pct.label":"Stop-loss percent","trading-assistant.templateParam.stop_pct.desc":"Exit when price moves against the position by this percentage.","trading-assistant.templateParam.take_profit_pct.label":"Take-profit percent","trading-assistant.templateParam.take_profit_pct.desc":"Take profit when the target return percentage is reached.","trading-assistant.templateParam.base_amount.label":"Base order amount","trading-assistant.templateParam.base_amount.desc":"Initial order amount for the first martingale layer.","trading-assistant.templateParam.max_layers.label":"Max layers","trading-assistant.templateParam.max_layers.desc":"Maximum number of averaging layers allowed.","trading-assistant.templateParam.multiplier.label":"Multiplier","trading-assistant.templateParam.multiplier.desc":"How much the next order size increases after a loss.","trading-assistant.templateParam.stop_loss_pct.label":"Risk stop-loss percent","trading-assistant.templateParam.stop_loss_pct.desc":"Force close when loss reaches this threshold to limit risk.","trading-assistant.templateParam.cooldown_bars.label":"Cooldown bars","trading-assistant.templateParam.cooldown_bars.desc":"Wait this many candles after an exit before re-entering.","trading-assistant.templateParam.grid_upper.label":"Grid upper price","trading-assistant.templateParam.grid_upper.desc":"Upper bound of the price range where the grid will work.","trading-assistant.templateParam.grid_lower.label":"Grid lower price","trading-assistant.templateParam.grid_lower.desc":"Lower bound of the price range where the grid will work.","trading-assistant.templateParam.grid_levels.label":"Grid levels","trading-assistant.templateParam.grid_levels.desc":"How many grid slices to divide the range into.","trading-assistant.templateParam.order_amount.label":"Order amount per grid","trading-assistant.templateParam.order_amount.desc":"Capital used each time a grid buy or sell is triggered.","trading-assistant.templateParam.buy_amount.label":"DCA amount","trading-assistant.templateParam.buy_amount.desc":"Base amount used for each DCA purchase.","trading-assistant.templateParam.dip_threshold.label":"Dip threshold","trading-assistant.templateParam.dip_threshold.desc":"Trigger an extra buy when price drops this much from the previous buy.","trading-assistant.templateParam.dip_multiplier.label":"Dip multiplier","trading-assistant.templateParam.dip_multiplier.desc":"Multiplier applied to the base amount during dip buys.","trading-assistant.templateParam.buy_interval.label":"Buy interval","trading-assistant.templateParam.buy_interval.desc":"How many candles to wait between regular DCA buys.","trading-assistant.templateParam.max_orders.label":"Max buy count","trading-assistant.templateParam.max_orders.desc":"Maximum total number of DCA entries allowed.","trading-assistant.templateParam.period.label":"Calculation period","trading-assistant.templateParam.period.desc":"Window length used to calculate mean and volatility.","trading-assistant.templateParam.std_mult.label":"Std-dev multiplier","trading-assistant.templateParam.std_mult.desc":"Multiplier used to build the upper and lower volatility bands.","trading-assistant.templateParam.lookback.label":"Breakout lookback","trading-assistant.templateParam.lookback.desc":"Number of historical candles used to detect key highs and lows.","trading-assistant.templateParam.volume_mult.label":"Volume multiplier","trading-assistant.templateParam.volume_mult.desc":"Required multiple of average volume to confirm a breakout.","trading-assistant.tabs.performance":"Performance","trading-assistant.tabs.backtestHistory":"Backtest History","trading-assistant.tabs.logs":"Strategy Logs","trading-assistant.tabs.overview":"Live Overview","trading-assistant.tabs.strategyManage":"Strategy Management","trading-assistant.performance.title":"Strategy Performance","trading-assistant.performance.totalReturn":"Total Return","trading-assistant.performance.annualReturn":"Annual Return","trading-assistant.performance.maxDrawdown":"Max Drawdown","trading-assistant.performance.sharpe":"Sharpe Ratio","trading-assistant.performance.winRate":"Win Rate","trading-assistant.performance.profitFactor":"Profit Factor","trading-assistant.performance.totalTrades":"Total Trades","trading-assistant.performance.runningDays":"Running Days","trading-assistant.performance.equityCurve":"Equity Curve","trading-assistant.performance.dailyReturns":"Daily Returns","trading-assistant.performance.monthlyHeatmap":"Monthly Returns Heatmap","trading-assistant.performance.noData":"No performance data yet, please start the strategy first","trading-assistant.performance.loadFailed":"Failed to load performance data","trading-assistant.logs.title":"Running Logs","trading-assistant.logs.noLogs":"No log records yet","trading-assistant.logs.level.info":"Info","trading-assistant.logs.level.warn":"Warning","trading-assistant.logs.level.error":"Error","trading-assistant.logs.level.trade":"Trade","trading-assistant.logs.level.signal":"Signal","trading-assistant.logs.autoRefresh":"Auto Refresh","trading-assistant.logs.clear":"Clear Logs","trading-assistant.logs.export":"Export Logs","dashboard.indicator.action.createStrategy":"Create Strategy from This Indicator","dashboard.indicator.backtest.advancedHint":"Full strategy configuration available in Trading Assistant","menu.billing":"Membership","billing.title":"Membership / Credits","billing.desc":"Choose a plan to activate VIP and receive bonus credits.","billing.snapshot.credits":"Current Credits","billing.snapshot.vip":"VIP Status","billing.snapshot.notVip":"Not VIP","billing.snapshot.expires":"Expires","billing.vipRule.title":"VIP Benefit","billing.vipRule.desc":"VIP has only one special permission: VIP-free indicators can be used without credits deduction. Other paid features/indicators still consume credits.","billing.plan.monthly":"Monthly","billing.plan.yearly":"Yearly","billing.plan.lifetime":"Lifetime","billing.perMonth":"month","billing.perYear":"year","billing.once":"one-time","billing.credits":"Credits","billing.lifetimeMonthly":"Monthly bonus","billing.buyNow":"Buy Now","billing.purchaseSuccess":"Purchase successful","billing.purchaseFailed":"Purchase failed","billing.usdt.title":"USDT Scan to Pay","billing.usdt.hintTitle":"Scan with your wallet and send USDT","billing.usdt.hintDesc":"Make sure the network and amount are correct (TRC20 only for now). Membership will be activated automatically after payment is confirmed.","billing.usdt.chain":"Chain","billing.usdt.amount":"Amount","billing.usdt.address":"Deposit Address","billing.usdt.copyAddress":"Copy Address","billing.usdt.copyAmount":"Copy Amount","billing.usdt.refresh":"Refresh","billing.usdt.expires":"Expires","billing.usdt.paidSuccess":"Payment confirmed. Membership activated.","billing.usdt.status.pending":"Waiting for payment","billing.usdt.status.paid":"Payment detected","billing.usdt.status.confirmed":"Confirmed","billing.usdt.status.expired":"Expired","billing.usdt.status.cancelled":"Cancelled","billing.usdt.status.failed":"Failed","billing.usdt.expiredHint":"Order expired. If you already paid, please contact support with your TxHash and payment screenshot.","billing.usdt.confirmedHint":"Payment confirmed, membership activated! Thank you for your purchase.","community.vipFree":"VIP Free","dashboard.indicator.publish.vipFree":"VIP Free","dashboard.indicator.publish.vipFreeHint":"When enabled: VIP users can use this indicator for free (non-VIP still need to purchase).","quickTrade.title":"Quick Trade","quickTrade.selectSymbol":"Select Trading Pair","quickTrade.exchange":"Exchange","quickTrade.selectExchange":"Select exchange account","quickTrade.testnetTag":"Testnet","quickTrade.cryptoOnly":"Crypto only","quickTrade.noExchange":"No crypto exchange accounts yet. Add one in Profile → Exchange Config.","quickTrade.available":"Available","quickTrade.long":"Long","quickTrade.short":"Short","quickTrade.market":"Market","quickTrade.limit":"Limit","quickTrade.limitPrice":"Limit Price","quickTrade.enterPrice":"Enter price","quickTrade.amount":"Amount","quickTrade.enterAmount":"Enter amount","quickTrade.leverage":"Leverage","quickTrade.tpsl":"TP/SL Price (Optional)","quickTrade.tp":"Take Profit Price","quickTrade.sl":"Stop Loss Price","quickTrade.tpPlaceholder":"Enter TP price","quickTrade.slPlaceholder":"Enter SL price","quickTrade.optional":"Optional","quickTrade.buyLong":"Buy / Long","quickTrade.sellShort":"Sell / Short","quickTrade.currentPosition":"Current Position","quickTrade.side":"Side","quickTrade.posSize":"Size","quickTrade.entryPrice":"Entry Price","quickTrade.markPrice":"Mark Price","quickTrade.unrealizedPnl":"Unrealized PnL","quickTrade.closePosition":"Close Position","quickTrade.noPosition":"No Position","quickTrade.noPositionHint":"No position for current trading pair","quickTrade.recentTrades":"Recent Trades","quickTrade.orderSuccess":"Order placed successfully!","quickTrade.orderFailed":"Order failed","quickTrade.positionClosed":"Position closed!","quickTrade.openPanel":"Quick Trade","quickTrade.tradeNow":"Trade Now","profile.exchange.title":"Exchange Config","profile.exchange.hint":"Manage your exchange API keys and broker connections. They can be used in Trading Assistant and Quick Trade.","profile.exchange.addAccount":"Add Exchange Account","profile.exchange.noAccounts":"No exchange accounts yet. Click the button above to add one.","profile.exchange.colExchange":"Exchange","profile.exchange.colName":"Name","profile.exchange.colHint":"Connection Info","profile.exchange.colCreatedAt":"Created At","profile.exchange.colActions":"Actions","profile.exchange.deleteConfirm":"Are you sure you want to delete this exchange account? This cannot be undone.","profile.exchange.deleteSuccess":"Exchange account deleted","profile.exchange.addTitle":"Add Exchange Account","profile.exchange.openAccount":"Open Account","profile.exchange.openAccountTitle":"Choose Exchange to Sign Up","profile.exchange.openAccountPromo":"QuantDinger exclusive signup — up to 20% commission rebate","profile.exchange.openAccountButton":"Open Account","profile.exchange.openAccountHint":"Pick a supported referral link and jump to the exchange registration page.","profile.exchange.openAccountGo":"Register Now","profile.exchange.openAccountUnavailable":"Referral link pending","profile.exchange.openAccountInviteCode":"Invite Code","profile.exchange.openAccountBrokerInfo":"Broker Info","profile.exchange.openAccountExtraLink":"Learn More","profile.exchange.selectExchange":"Select Exchange","profile.exchange.accountName":"Account Name (Optional)","profile.exchange.accountNamePlaceholder":"e.g. Main Account, Test Account","profile.exchange.apiKey":"API Key","profile.exchange.secretKey":"Secret Key","profile.exchange.passphrase":"Passphrase","profile.exchange.demoTrading":"Demo / testnet trading","profile.exchange.demoTag":"Testnet","profile.exchange.demoTradingHint":"Uses each exchange demo/test endpoints where available (e.g. Binance demo hosts, Bybit testnet, OKX simulated-trading header). Bitget, Kraken spot, Bitfinex share the same REST host as live—create paper/demo API keys on the exchange and keep this checked to tag the credential.","profile.exchange.whitelistIpLabel":"API whitelist IP (server egress)","profile.exchange.whitelistIpv4":"IPv4","profile.exchange.whitelistIpv6":"IPv6","profile.exchange.whitelistIpHint":"Add IPv4 and/or IPv6 to your exchange API whitelist as required (you may add both). These are backend egress addresses, not your browser’s IP. A dash means this environment has no egress for that protocol.","profile.exchange.whitelistIpCopy":"Copy","profile.exchange.whitelistIpRefresh":"Refresh","profile.exchange.whitelistIpCopied":"Copied to clipboard","profile.exchange.whitelistIpCopyFail":"Copy failed","profile.exchange.apiDocTitleSuffix":"API Docs","profile.exchange.apiDocHint":"Review the exchange official API guide first, then come back here to fill in your API Key, Secret, and whitelist IP.","profile.exchange.apiDocAction":"Open Official Docs","profile.exchange.ibkrHost":"TWS/Gateway Host","profile.exchange.ibkrPort":"TWS/Gateway Port","profile.exchange.ibkrPortHint":"TWS Paper:7497 | TWS Live:7496 | Gateway Paper:4002 | Gateway Live:4001","profile.exchange.ibkrClientId":"Client ID","profile.exchange.ibkrAccount":"Account (Optional)","profile.exchange.mt5Server":"Server","profile.exchange.mt5Login":"Login","profile.exchange.mt5Password":"Password","profile.exchange.mt5TerminalPath":"Terminal Path (Optional)","profile.exchange.mt5TerminalPathHint":"Path to MT5 terminal, e.g. C:\\Program Files\\MetaTrader 5\\terminal64.exe","profile.exchange.testConnection":"Test Connection","profile.exchange.testSuccess":"Connection successful!","profile.exchange.testFailed":"Connection failed","profile.exchange.saveSuccess":"Exchange account added successfully","profile.exchange.saveFailed":"Failed to add account","profile.exchange.typeCrypto":"Crypto Exchange","profile.exchange.typeIBKR":"US Stocks (IBKR)","profile.exchange.typeMT5":"Forex (MetaTrader 5)","profile.exchange.localDeploymentRequired":"Local deployment required","profile.exchange.localDeploymentHint":"This broker requires local deployment of QuantDinger to use.","profile.exchange.goToManage":"Go to Profile → Exchange Config to manage","profile.exchange.noCredentialHint":"Please add an exchange account in Profile first","adminOrders.tabTitle":"Order List","adminOrders.totalOrders":"Total Orders","adminOrders.paidOrders":"Paid","adminOrders.pendingOrders":"Pending","adminOrders.totalRevenue":"Total Revenue","adminOrders.filterAll":"All Status","adminOrders.filterPending":"Pending","adminOrders.filterPaid":"Paid","adminOrders.filterConfirmed":"Confirmed","adminOrders.filterExpired":"Expired","adminOrders.searchPlaceholder":"Search by username/email","adminOrders.colUser":"User","adminOrders.colType":"Type","adminOrders.colPlan":"Plan","adminOrders.colAmount":"Amount","adminOrders.colStatus":"Status","adminOrders.colChain":"Chain","adminOrders.colAddress":"Address","adminOrders.colTxHash":"Tx Hash","adminOrders.colCreatedAt":"Created","adminOrders.lifetime":"Lifetime","adminOrders.yearly":"Yearly","adminOrders.monthly":"Monthly","adminOrders.statusPaid":"Paid","adminOrders.statusConfirmed":"Confirmed","adminOrders.statusPending":"Pending","adminOrders.statusExpired":"Expired","adminOrders.statusCancelled":"Cancelled","adminOrders.statusFailed":"Failed","adminAiStats.tabTitle":"AI Analysis","adminAiStats.totalAnalyses":"Total Analyses","adminAiStats.activeUsers":"Active Users","adminAiStats.uniqueSymbols":"Symbols Analyzed","adminAiStats.accuracy":"Correct / Verified","adminAiStats.userStatsTitle":"Per-User Statistics","adminAiStats.recentTitle":"Recent Analysis Records","adminAiStats.searchPlaceholder":"Search by username","adminAiStats.colUser":"User","adminAiStats.colAnalysisCount":"Analyses","adminAiStats.colSymbols":"Symbols","adminAiStats.colMarkets":"Markets","adminAiStats.colAccuracy":"Correct / Wrong","adminAiStats.colFeedback":"Feedback","adminAiStats.colLastAnalysis":"Last Analysis","adminAiStats.colMarket":"Market","adminAiStats.colSymbol":"Symbol","adminAiStats.colModel":"Model","adminAiStats.colStatus":"Status","adminAiStats.colCreatedAt":"Time","adminAiStats.helpful":"Helpful","adminAiStats.notHelpful":"Not Helpful","polymarket.title":"Prediction Markets","polymarket.subtitle":"AI analysis and trading opportunity recommendations based on Polymarket prediction market data","polymarket.filter.category":"Select Category","polymarket.filter.sortBy":"Sort By","polymarket.sort.volume":"24h Volume","polymarket.sort.aiScore":"AI Opportunity Score","polymarket.sort.highProbability":"High Probability","polymarket.sort.highReturn":"High Return Ratio","polymarket.search.placeholder":"Search prediction markets...","polymarket.category.all":"All","polymarket.category.crypto":"Cryptocurrency","polymarket.category.politics":"Politics","polymarket.category.economics":"Economics","polymarket.category.sports":"Sports","polymarket.category.tech":"Tech","polymarket.category.finance":"Finance","polymarket.category.geopolitics":"Geopolitics","polymarket.category.culture":"Culture","polymarket.category.climate":"Climate","polymarket.category.entertainment":"Entertainment","polymarket.market.currentProbability":"Current Probability","polymarket.ai.predicted":"AI Predicted Probability","polymarket.ai.marketProbability":"Market Probability","polymarket.ai.recommendation":"AI Recommendation","polymarket.ai.confidence":"Confidence","polymarket.ai.opportunityScore":"Opportunity Score","polymarket.ai.reasoning":"Analysis Reasoning","polymarket.ai.keyFactors":"Key Factors","polymarket.recommendation.YES":"YES (Bullish)","polymarket.recommendation.NO":"NO (Bearish)","polymarket.recommendation.HOLD":"HOLD (Neutral)","polymarket.status.active":"Active","polymarket.status.closed":"Closed","polymarket.status.resolved":"Resolved","polymarket.action.viewDetail":"View Details","polymarket.action.viewOnPolymarket":"View on Polymarket","polymarket.detail.title":"Prediction Market Details","polymarket.detail.currentProbability":"Current Probability","polymarket.detail.volume24h":"24h Volume","polymarket.detail.liquidity":"Liquidity","polymarket.detail.aiAnalysis":"AI Analysis Results","polymarket.detail.assetOpportunities":"Related Asset Trading Opportunities","polymarket.opportunity.confidence":"Confidence","polymarket.opportunity.analyze":"Analyze Asset","polymarket.signal.BUY":"BUY","polymarket.signal.SELL":"SELL","polymarket.signal.HOLD":"HOLD","polymarket.error.loadFailed":"Failed to load markets","polymarket.error.searchFailed":"Search failed","polymarket.error.notFound":"Market not found","polymarket.error.loadDetailFailed":"Failed to load details","polymarket.viewOnPolymarket":"View on Polymarket","polymarket.filter.explanation.title":"Filter Explanation","polymarket.filter.explanation.volume":"Sorted by 24h trading volume, showing the most active prediction markets.","polymarket.filter.explanation.aiScore":"Sorted by AI opportunity score, considering AI-market divergence, confidence, and other factors. High-value opportunities are prioritized.","polymarket.filter.explanation.highProbability":"Sorted by AI predicted probability, prioritizing events with high AI probability (AI prediction > market probability + 10%).","polymarket.filter.explanation.highReturn":"Sorted by high return ratio, prioritizing opportunities with large AI-market divergence and high confidence (divergence × confidence). Suitable for finding undervalued predictions.","polymarket.deepAnalysis.prompt":"Currently showing rule-based simple analysis. Click the button below for AI deep analysis to get more accurate predictions and recommendations.","polymarket.deepAnalysis.button":"Deep Analysis","polymarket.deepAnalysis.success":"Deep analysis completed! Credits charged: {credits}, Remaining: {remaining}","polymarket.deepAnalysis.successFree":"Deep analysis completed!","polymarket.deepAnalysis.failed":"Deep analysis failed, please try again later","polymarket.deepAnalysis.insufficientCredits":"Insufficient credits! Required: {required}, Current: {current}, Shortage: {shortage}","polymarket.error.invalidMarketId":"Invalid market ID","polymarket.analysis.title":"Polymarket Prediction Market Analysis","polymarket.analysis.description":"Enter a Polymarket link or market title, and AI will analyze trading opportunities for you","polymarket.analysis.startAnalysis":"Start Analysis","polymarket.analysis.inputHint":"Please enter a Polymarket market link or market title","polymarket.analysis.inputPlaceholder":'e.g., https://polymarket.com/event/xxx or "Bitcoin price above $100k in 2025?"',"polymarket.analysis.inputRequired":"Please enter a Polymarket link or market title","polymarket.analysis.analyzeButton":"Start Analysis","polymarket.analysis.analyzing":"Analyzing, please wait...","polymarket.analysis.success":"Analysis completed!","polymarket.analysis.failed":"Analysis failed, please try again later","polymarket.analysis.insufficientCredits":"Insufficient credits, please recharge first","polymarket.analysis.viewOnPolymarket":"View on Polymarket","polymarket.analysis.aiAnalysis":"AI Analysis Results","polymarket.analysis.marketProbability":"Market Probability","polymarket.analysis.aiPredictedProbability":"AI Predicted Probability","polymarket.analysis.divergence":"Divergence","polymarket.analysis.recommendation":"Recommendation","polymarket.analysis.recommendationYes":"YES (Bullish)","polymarket.analysis.recommendationNo":"NO (Bearish)","polymarket.analysis.recommendationHold":"HOLD (Neutral)","polymarket.analysis.confidenceScore":"Confidence Score","polymarket.analysis.opportunityScore":"Opportunity Score","polymarket.analysis.reasoning":"Analysis Reasoning","polymarket.analysis.keyFactors":"Key Factors","polymarket.analysis.creditsCharged":"Credits charged for this analysis: {credits}","polymarket.analysis.remainingCredits":"Remaining credits: {credits}","polymarket.analysis.newAnalysis":"New Analysis","polymarket.analysis.tabAnalyze":"Analyze","polymarket.analysis.tabHistory":"History","polymarket.analysis.historyMarket":"Market","polymarket.analysis.historyRecommendation":"Recommendation","polymarket.analysis.historyOpportunityScore":"Opportunity Score","polymarket.analysis.historyCreatedAt":"Analysis Time","polymarket.analysis.historyTotal":"Total {total} records","polymarket.analysis.loadHistoryFailed":"Failed to load history","aiAssetAnalysis.tabs.polymarket":"Prediction Markets"};t["default"]=(0,i.A)((0,i.A)({},o),l)},45703:function(e,t,a){"use strict";a(23792),a(3362),a(69085),a(9391),a(74423),a(21699),a(52675),a(89463),a(66412),a(60193),a(92168),a(2259),a(86964),a(83237),a(61833),a(67947),a(31073),a(45700),a(78125),a(20326),a(28706),a(26835),a(33771),a(2008),a(50113),a(48980),a(46449),a(78350),a(23418),a(48598),a(62062),a(31051),a(34782),a(26910),a(87478),a(54554),a(93514),a(30237),a(54743),a(46761),a(11745),a(89572),a(48957),a(62010),a(4731),a(36033),a(93153),a(82326),a(36389),a(64444),a(8085),a(77762),a(65070),a(60605),a(39469),a(72152),a(75376),a(56624),a(11367),a(5914),a(78553),a(98690),a(60479),a(70761),a(2892),a(45374),a(25428),a(32637),a(40150),a(59149),a(64601),a(44435),a(87220),a(25843),a(9868),a(17427),a(87607),a(5506),a(52811),a(53921),a(83851),a(81278),a(1480),a(40875),a(29908),a(94052),a(94003),a(221),a(79432),a(9220),a(7904),a(93967),a(93941),a(10287),a(26099),a(16034),a(39796),a(60825),a(87411),a(21211),a(40888),a(9065),a(86565),a(32812),a(84634),a(71137),a(30985),a(34268),a(34873),a(84864),a(27495),a(69479),a(38781),a(31415),a(23860),a(99449),a(27337),a(47764),a(71761),a(35701),a(68156),a(85906),a(42781),a(25440),a(5746),a(90744),a(11392),a(42762),a(39202),a(43359),a(89907),a(11898),a(35490),a(5745),a(94298),a(60268),a(69546),a(20781),a(50778),a(89195),a(46276),a(48718),a(16308),a(34594),a(29833),a(46594),a(72107),a(95477),a(21489),a(22134),a(3690),a(61740),a(81630),a(72170),a(75044),a(69539),a(31694),a(89955),a(33206),a(48345),a(44496),a(66651),a(12887),a(19369),a(66812),a(8995),a(52568),a(31575),a(36072),a(88747),a(28845),a(29423),a(57301),a(373),a(86614),a(41405),a(33684),a(73772),a(30958),a(23500),a(62953),a(59848),a(122),a(3296),a(27208),a(48408),a(7452);var i=a(85471),s=function(){var e=this,t=e._self._c;return t("a-config-provider",{attrs:{locale:e.locale,direction:e.direction}},[t("div",{attrs:{id:"app"}},[t("router-view")],1)])},n=[],r={appVersion:"3.0.1",navTheme:"light",primaryColor:"#13C2C2",layout:"sidemenu",contentWidth:"Fluid",fixedHeader:!0,fixSiderbar:!0,colorWeak:!1,menu:{locale:!0},title:"QuantDinger",pwa:!1,iconfontUrl:"",production:!0},o=function(e){document.title=e;var t=navigator.userAgent,a=/\bMicroMessenger\/([\d\.]+)/;if(a.test(t)&&/ip(hone|od|ad)/i.test(t)){var i=document.createElement("iframe");i.src="/favicon.ico",i.style.display="none",i.onload=function(){setTimeout(function(){i.remove()},9)},document.body.appendChild(i)}},l=r.title,d=a(76338),c=a(64765),u=a(74053),m=a.n(u),g=a(95093),p=a.n(g),h=a(45958);i.Ay.use(c.A);var f="en-US",y={"en-US":(0,d.A)({},h["default"])},b=new c.A({silentTranslationWarn:!0,locale:f,fallbackLocale:f,messages:y}),A=[f];function v(e){b.locale=e;var t=document.documentElement,a=/^ar/i.test(e);return t&&(t.setAttribute("lang",e),t.setAttribute("dir",a?"rtl":"ltr")),document.body&&(document.body.setAttribute("dir",a?"rtl":"ltr"),document.body.classList.toggle("rtl",a)),e}function k(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f;return new Promise(function(t){return m().set("lang",e),b.locale!==e?A.includes(e)?t(v(e)):a(2162)("./".concat(e)).then(function(t){var a=t.default;return b.setLocaleMessage(e,a),A.push(e),p().updateLocale(a.momentName,a.momentLocale),v(e)}):t(e)})}function S(e){return b.t("".concat(e))}var P,w,T=b,C={data:function(){return{}},computed:{locale:function(){var e=this.$route.meta.title;return e&&o("".concat(S(e)," - ").concat(l)),this.$i18n.getLocaleMessage(this.$store.getters.lang).antLocale},direction:function(){var e=this.$store.getters.lang;return e&&/^ar/i.test(e)?"rtl":"ltr"},theme:function(){return this.$store.state.app.theme}},watch:{theme:{handler:function(e){"dark"===e||"realdark"===e?(document.body.classList.add("dark"),document.body.classList.remove("light")):(document.body.classList.remove("dark"),document.body.classList.add("light"))},immediate:!0}}},E=C,R=a(845),I=(0,R.A)(E,s,n,!1,null,null,null),_=I.exports,M=a(40173),L=function(){var e=this,t=e._self._c;return t("div",{class:["user-layout-wrapper",e.isMobile&&"mobile"],attrs:{id:"userLayout"}},[t("div",{staticClass:"container"},[e._m(0),t("div",{staticClass:"user-layout-lang"},[t("select-lang",{staticClass:"select-lang-trigger"})],1),t("div",{staticClass:"user-layout-content"},[e._m(1),t("div",{staticClass:"main-content"},[t("router-view")],1),t("div",{staticClass:"footer"},[t("div",{staticClass:"copyright"},[e._v(" Copyright © 2025-2026 Quantdinger.com "),t("div",{staticStyle:{width:"70%","text-align":"center","margin-left":"15%","margin-top":"10px"}},[t("a",{staticStyle:{color:"#1890ff",cursor:"pointer"},on:{click:e.toggleRisk}},[e._v(" "+e._s(e.showRisk?e.$t("user.login.privacy.collapse"):e.$t("user.login.privacy.view"))+" ")]),e.showRisk?t("div",{staticStyle:{"margin-top":"10px","font-size":"12px",color:"rgba(0,0,0,0.65)","line-height":"1.6","text-align":"left"}},[t("div",{staticStyle:{"font-weight":"600","margin-bottom":"6px"}},[e._v(e._s(e.$t("user.login.privacy.title")))]),e._v(" "+e._s(e.$t("user.login.privacy.content"))+" ")]):e._e()])])])])])])},x=[function(){var e=this,t=e._self._c;return t("div",{staticClass:"fx-layer",attrs:{"aria-hidden":"true"}},[t("div",{staticClass:"fx-gradient"}),t("div",{staticClass:"fx-grid"})])},function(){var e=this,t=e._self._c;return t("div",{staticClass:"top"},[t("div",{staticClass:"header"},[t("a",{attrs:{href:"/"}},[t("img",{staticClass:"logo",attrs:{src:a(33153),alt:"logo"}})])])])}],D=a(95353),N={computed:(0,d.A)({},(0,D.aH)({isMobile:function(e){return e.app.isMobile}}))},O=(a(63713),a(77197)),F=(a(78269),a(40255)),B=(a(1747),a(36457)),H={computed:(0,d.A)({},(0,D.aH)({currentLang:function(e){return e.app.lang}})),methods:{setLang:function(e){this.$store.dispatch("setLang",e)}}},U=H,q=["en-US","ja-JP","ko-KR","vi-VN","th-TH","ar-SA","fr-FR","de-DE","zh-TW","zh-CN"],G={"zh-CN":"简体中文","zh-TW":"繁體中文","en-US":"English","ja-JP":"日本語","ko-KR":"한국어","vi-VN":"Tiếng Việt","th-TH":"ไทย","ar-SA":"العربية","fr-FR":"Français","de-DE":"Deutsch"},j={"zh-CN":"🇨🇳","zh-TW":"sg","en-US":"🇺🇸","ja-JP":"🇯🇵","ko-KR":"🇰🇷","vi-VN":"🇻🇳","th-TH":"🇹🇭","ar-SA":"🇸🇦","fr-FR":"🇫🇷","de-DE":"🇩🇪"},W={props:{prefixCls:{type:String,default:"ant-pro-drop-down"}},name:"SelectLang",mixins:[U],render:function(){var e=this,t=arguments[0],a=this.prefixCls,i=function(t){var a=t.key;e.setLang(a)},s=t(B.Ay,{class:["menu","ant-pro-header-menu"],attrs:{selectedKeys:[this.currentLang]},on:{click:i}},[q.map(function(e){return t(B.Ay.Item,{key:e},[t("span",{attrs:{role:"img","aria-label":G[e]}},[j[e]])," ",G[e]])})]);return t(O.Ay,{attrs:{overlay:s,placement:"bottomRight"}},[t("span",{class:a},[t(F.A,{attrs:{type:"global",title:S("navBar.lang")}})])])}},K=W,$={name:"UserLayout",components:{SelectLang:K},mixins:[N],data:function(){return{showRisk:!1}},methods:{toggleRisk:function(){this.showRisk=!this.showRisk}},mounted:function(){document.body.classList.add("userLayout")},beforeDestroy:function(){document.body.classList.remove("userLayout")}},V=$,z=(0,R.A)(V,L,x,!1,null,"7ae30672",null),Q=z.exports,Y=function(){var e=this,t=e._self._c;return t("div",[t("router-view")],1)},X=[],J={name:"BlankLayout"},Z=J,ee=(0,R.A)(Z,Y,X,!1,null,"7f25f9eb",null),te=(ee.exports,function(){var e=this,t=e._self._c;return t("div",{class:["basic-layout-wrapper",e.settings.theme]},[t("pro-layout",e._b({attrs:{menus:e.menus,collapsed:e.collapsed,mediaQuery:e.query,isMobile:e.isMobile,handleMediaQuery:e.handleMediaQuery,handleCollapse:e.handleCollapse,i18nRender:e.i18nRender},scopedSlots:e._u([{key:"menuHeaderRender",fn:function(){return[t("div",[t("img",{attrs:{src:a(2304)}}),t("h1",[e._v(e._s(e.title))])])]},proxy:!0},{key:"headerContentRender",fn:function(){return[t("div",[t("a-tooltip",{attrs:{title:e.$t("menu.header.refreshPage")}},[t("a-icon",{staticStyle:{"font-size":"18px",cursor:"pointer"},attrs:{type:"reload"},on:{click:e.handleRefresh}})],1)],1)]},proxy:!0},{key:"rightContentRender",fn:function(){return[t("right-content",{attrs:{"top-menu":"topmenu"===e.settings.layout,"is-mobile":e.isMobile,theme:e.settings.theme}})]},proxy:!0},{key:"footerRender",fn:function(){return[t("div",{staticStyle:{display:"none"}})]},proxy:!0}])},"pro-layout",e.settings,!1),[t("a-modal",{attrs:{visible:e.showLegalModal,footer:null,title:e.$t("menu.footer.userAgreement"),width:800},on:{cancel:function(t){e.showLegalModal=!1}}},[t("div",{staticStyle:{"max-height":"60vh",overflow:"auto","white-space":"pre-wrap","line-height":"1.8",padding:"16px"}},[e._v(" "+e._s(e.menuFooterConfig.legal.user_agreement||e.$t("user.login.legal.content"))+" ")]),t("div",{staticStyle:{"margin-top":"12px","text-align":"right"}},[t("a-button",{attrs:{type:"primary"},on:{click:function(t){e.showLegalModal=!1}}},[e._v("OK")])],1)]),t("a-modal",{attrs:{visible:e.showPrivacyModal,footer:null,title:e.$t("menu.footer.privacyPolicy"),width:800},on:{cancel:function(t){e.showPrivacyModal=!1}}},[t("div",{staticStyle:{"max-height":"60vh",overflow:"auto","white-space":"pre-wrap","line-height":"1.8",padding:"16px"}},[e._v(" "+e._s(e.menuFooterConfig.legal.privacy_policy||e.$t("user.login.privacy.content"))+" ")]),t("div",{staticStyle:{"margin-top":"12px","text-align":"right"}},[t("a-button",{attrs:{type:"primary"},on:{click:function(t){e.showPrivacyModal=!1}}},[e._v("OK")])],1)]),t("setting-drawer",{ref:"settingDrawer",attrs:{settings:e.settings},on:{change:e.handleSettingChange}},[t("div",{staticStyle:{margin:"12px 0"}},[e._v(" This is SettingDrawer custom footer content. ")])]),t("router-view",{key:e.refreshKey})],1),t("div",{staticClass:"custom-menu-footer",class:{collapsed:e.collapsed,"drawer-open":e.isMobile&&e.isDrawerOpen,"drawer-animating":e.isMobile&&e.isDrawerAnimating}},[e.collapsed?e._e():t("div",{staticClass:"menu-footer-content"},[t("div",{staticClass:"footer-section"},[t("div",{staticClass:"section-title"},[e._v(e._s(e.$t("menu.footer.contactUs")))]),t("div",{staticClass:"section-links"},[t("a",{attrs:{href:e.menuFooterConfig.contact.support_url,target:"_blank"}},[e._v(e._s(e.$t("menu.footer.support")))]),t("span",{staticClass:"separator"},[e._v("|")]),t("a",{attrs:{href:e.menuFooterConfig.contact.feature_request_url,target:"_blank"}},[e._v(e._s(e.$t("menu.footer.featureRequest")))])])]),t("div",{staticClass:"footer-section"},[t("div",{staticClass:"section-title"},[e._v(e._s(e.$t("menu.footer.getSupport")))]),t("div",{staticClass:"section-links"},[t("a",{attrs:{href:"mailto:"+e.menuFooterConfig.contact.email}},[e._v(e._s(e.$t("menu.footer.email")))]),t("span",{staticClass:"separator"},[e._v("|")]),t("a",{attrs:{href:e.menuFooterConfig.contact.live_chat_url,target:"_blank"}},[e._v(e._s(e.$t("menu.footer.liveChat")))])])]),e.menuFooterConfig.social_accounts&&e.menuFooterConfig.social_accounts.length>0?t("div",{staticClass:"footer-section"},[t("div",{staticClass:"section-title"},[e._v(e._s(e.$t("menu.footer.socialAccounts")))]),t("div",{staticClass:"social-icons"},e._l(e.menuFooterConfig.social_accounts,function(e,a){return t("a",{key:a,staticClass:"social-icon",attrs:{href:e.url,target:"_blank",rel:"noopener noreferrer",title:e.name}},[t("Icon",{staticClass:"social-icon-svg",attrs:{icon:"simple-icons:".concat(e.icon)}})],1)}),0)]):e._e(),t("div",{staticClass:"footer-section"},[t("div",{staticClass:"section-links"},[t("a",{on:{click:function(t){e.showLegalModal=!0}}},[e._v(e._s(e.$t("menu.footer.userAgreement")))]),t("span",{staticClass:"separator"},[e._v("&")]),t("a",{on:{click:function(t){e.showPrivacyModal=!0}}},[e._v(e._s(e.$t("menu.footer.privacyPolicy")))])])]),t("div",{staticClass:"footer-section copyright"},[e._v(" "+e._s(e.menuFooterConfig.copyright)+" ")]),t("div",{staticClass:"footer-section version"},[e._v(" V"+e._s(e.appVersion)+" ")])])])],1)}),ae=[],ie=a(18787),se=a(69511),ne=a.n(se),re=a(58391),oe=a.n(re),le={getAntdSerials:function(e){var t=new Array(9).fill().map(function(t,a){return ne().varyColor.lighten(e,a/10)}),a=oe()(e),i=ne().varyColor.toNum3(e.replace("#","")).join(",");return t.concat(a).concat(i)},changeColor:function(e){if(!ne()||!ne().changer||"function"!==typeof ne().changer.changeColor)return Promise.resolve();var t={newColors:this.getAntdSerials(e),changeUrl:function(e){return"/".concat(e)}};try{return ne().changer.changeColor(t,Promise)}catch(a){return Promise.resolve()}}},de=function(){return[{key:T.t("app.setting.themecolor.dust"),color:"#F5222D"},{key:T.t("app.setting.themecolor.volcano"),color:"#FA541C"},{key:T.t("app.setting.themecolor.sunset"),color:"#FAAD14"},{key:T.t("app.setting.themecolor.cyan"),color:"#13C2C2"},{key:T.t("app.setting.themecolor.green"),color:"#52C41A"},{key:T.t("app.setting.themecolor.daybreak"),color:"#1890FF"},{key:T.t("app.setting.themecolor.geekblue"),color:"#2F54EB"},{key:T.t("app.setting.themecolor.purple"),color:"#722ED1"}]},ce=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=t?null:ie.A.loading(T.t("app.setting.theme.switching"),0);le.changeColor(e).finally(function(){a&&setTimeout(function(){a()},10)})},ue=function(e){var t=document.body.querySelector("#app");e?t.classList.add("colorWeak"):t.classList.remove("colorWeak")},me=a(75314),ge=function(){var e=this,t=e._self._c;return t("div",{class:e.wrpCls},[t("avatar-dropdown",{class:e.prefixCls,attrs:{menu:!0,"current-user":e.currentUser}}),t("notice-icon",{class:e.prefixCls}),t("select-lang",{class:e.prefixCls}),t("a-tooltip",{attrs:{title:e.$t("app.setting.tooltip")}},[t("span",{class:e.prefixCls,on:{click:e.handleSettingClick}},[t("a-icon",{staticStyle:{"font-size":"16px"},attrs:{type:"setting"}})],1)])],1)},pe=[],he=a(26297),fe=function(){var e=this,t=e._self._c;return e.currentUser&&e.currentUser.name?t("a-dropdown",{attrs:{placement:"bottomRight"},scopedSlots:e._u([{key:"overlay",fn:function(){return[t("a-menu",{staticClass:"ant-pro-drop-down menu",attrs:{"selected-keys":[]}},[t("a-menu-item",{key:"profile",on:{click:e.handleProfile}},[t("a-icon",{attrs:{type:"user"}}),e._v(" "+e._s(e.$t("menu.profile")||"My Profile")+" ")],1),t("a-menu-divider"),t("a-menu-item",{key:"logout",on:{click:e.handleLogout}},[t("a-icon",{attrs:{type:"logout"}}),e._v(" "+e._s(e.$t("menu.account.logout"))+" ")],1)],1)]},proxy:!0}],null,!1,2847446919)},[t("span",{staticClass:"ant-pro-account-avatar"},[t("a-avatar",{staticClass:"antd-pro-global-header-index-avatar",attrs:{size:"small",src:e.currentUser.avatar}}),t("span",[e._v(e._s(e.currentUser.name))])],1)]):t("span",[t("a-spin",{style:{marginLeft:8,marginRight:8},attrs:{size:"small"}})],1)},ye=[],be=(a(62621),a(43898)),Ae={name:"AvatarDropdown",props:{currentUser:{type:Object,default:function(){return null}},menu:{type:Boolean,default:!0}},methods:{handleProfile:function(){this.$router.push({name:"Profile"})},handleLogout:function(e){var t=this;be.A.confirm({title:this.$t("layouts.usermenu.dialog.title"),content:this.$t("layouts.usermenu.dialog.content"),onOk:function(){return t.$store.dispatch("Logout").then(function(){t.$router.push({name:"login"})})},onCancel:function(){}})}}},ve=Ae,ke=(0,R.A)(ve,fe,ye,!1,null,null,null),Se=ke.exports,Pe=function(){var e=this,t=e._self._c;return t("div",{staticClass:"notice-icon-wrapper"},[t("a-popover",{attrs:{trigger:"click",placement:"bottomRight",overlayClassName:"header-notice-wrapper",getPopupContainer:function(){return e.$refs.noticeRef.parentElement},autoAdjustOverflow:!0,arrowPointAtCenter:!0,overlayStyle:{width:"380px",top:"50px"}},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[t("template",{slot:"content"},[t("div",{staticClass:"notice-header"},[t("span",{staticClass:"notice-title"},[e._v(e._s(e.$t("notice.title")))]),e.notifications.length>0?t("a",{staticClass:"notice-action",on:{click:e.markAllRead}},[e._v(" "+e._s(e.$t("notice.markAllRead"))+" ")]):e._e()]),t("a-spin",{attrs:{spinning:e.loading}},[e.notifications.length>0?t("div",{staticClass:"notice-list"},e._l(e.notifications,function(a){return t("div",{key:a.id,staticClass:"notice-item",class:{unread:!a.is_read},on:{click:function(t){return e.handleNoticeClick(a)}}},[t("div",{staticClass:"notice-item-icon"},[t("a-icon",{style:{color:e.getNoticeColor(a.signal_type)},attrs:{type:e.getNoticeIcon(a.signal_type)}})],1),t("div",{staticClass:"notice-item-content"},[t("div",{staticClass:"notice-item-title"},[e._v(e._s(a.title))]),t("div",{staticClass:"notice-item-desc"},[e._v(e._s(e.truncateMessage(a.message)))]),t("div",{staticClass:"notice-item-time"},[e._v(e._s(e.formatTime(a.created_at)))])])])}),0):t("div",{staticClass:"notice-empty"},[t("a-empty",{attrs:{description:e.$t("notice.empty")}})],1)]),e.notifications.length>0?t("div",{staticClass:"notice-footer"},[t("a",{on:{click:e.clearNotifications}},[e._v(e._s(e.$t("notice.clear")))])]):e._e()],1),t("span",{ref:"noticeRef",staticClass:"header-notice",on:{click:e.fetchNotice}},[t("a-badge",{attrs:{count:e.unreadCount,overflowCount:99}},[t("a-icon",{staticStyle:{"font-size":"16px",padding:"4px"},attrs:{type:"bell"}})],1)],1)],2),t("a-modal",{attrs:{title:e.detailNotice?e.detailNotice.title:"",footer:null,width:e.isHtmlReport?900:600,wrapClassName:e.isHtmlReport?"notice-detail-modal html-report-modal":"notice-detail-modal",centered:""},model:{value:e.detailVisible,callback:function(t){e.detailVisible=t},expression:"detailVisible"}},[e.detailNotice?t("div",{staticClass:"notice-detail"},[t("div",{staticClass:"notice-detail-meta"},[t("div",{staticClass:"notice-detail-type"},[t("a-icon",{style:{color:e.getNoticeColor(e.detailNotice.signal_type)},attrs:{type:e.getNoticeIcon(e.detailNotice.signal_type)}}),t("span",{staticClass:"type-label"},[e._v(e._s(e.getNoticeTypeLabel(e.detailNotice.signal_type)))])],1),t("div",{staticClass:"notice-detail-time"},[t("a-icon",{attrs:{type:"clock-circle"}}),t("span",[e._v(e._s(e.formatFullTime(e.detailNotice.created_at)))])],1)]),t("a-divider"),t("div",{staticClass:"notice-detail-content",class:{"html-report":e.isHtmlReport}},[t("div",{staticClass:"message-body",domProps:{innerHTML:e._s(e.formatMessageHtml(e.detailNotice.message))}})]),!e.isHtmlReport&&e.detailNotice.payload&&Object.keys(e.detailNotice.payload).length>0?[t("a-divider"),t("div",{staticClass:"notice-detail-extra"},[t("div",{staticClass:"extra-title"},[e._v(e._s(e.$t("notice.detailInfo")))]),"ai_monitor"===e.detailNotice.signal_type?[e.detailNotice.payload.final_decision?t("div",{staticClass:"extra-item decision"},[t("span",{staticClass:"label"},[e._v(e._s(e.$t("notice.aiDecision"))+":")]),t("a-tag",{attrs:{color:e.getDecisionColor(e.detailNotice.payload.final_decision)}},[e._v(" "+e._s(e.detailNotice.payload.final_decision)+" ")]),e.detailNotice.payload.confidence?t("span",{staticClass:"confidence"},[e._v(" ("+e._s(e.$t("notice.confidence"))+": "+e._s(e.detailNotice.payload.confidence)+"%) ")]):e._e()],1):e._e(),e.detailNotice.payload.reasoning?t("div",{staticClass:"extra-item"},[t("span",{staticClass:"label"},[e._v(e._s(e.$t("notice.reasoning"))+":")]),t("span",{staticClass:"value"},[e._v(e._s(e.detailNotice.payload.reasoning))])]):e._e()]:e._e(),"price_alert"===e.detailNotice.signal_type?[e.detailNotice.payload.symbol?t("div",{staticClass:"extra-item"},[t("span",{staticClass:"label"},[e._v(e._s(e.$t("notice.symbol"))+":")]),t("span",{staticClass:"value"},[e._v(e._s(e.detailNotice.payload.symbol))])]):e._e(),e.detailNotice.payload.price?t("div",{staticClass:"extra-item"},[t("span",{staticClass:"label"},[e._v(e._s(e.$t("notice.currentPrice"))+":")]),t("span",{staticClass:"value"},[e._v("$"+e._s(e.detailNotice.payload.price))])]):e._e(),e.detailNotice.payload.trigger_price?t("div",{staticClass:"extra-item"},[t("span",{staticClass:"label"},[e._v(e._s(e.$t("notice.triggerPrice"))+":")]),t("span",{staticClass:"value"},[e._v("$"+e._s(e.detailNotice.payload.trigger_price))])]):e._e()]:e._e(),"signal"===e.detailNotice.signal_type||"trade"===e.detailNotice.signal_type?[e.detailNotice.payload.symbol?t("div",{staticClass:"extra-item"},[t("span",{staticClass:"label"},[e._v(e._s(e.$t("notice.symbol"))+":")]),t("span",{staticClass:"value"},[e._v(e._s(e.detailNotice.payload.symbol))])]):e._e(),e.detailNotice.payload.action?t("div",{staticClass:"extra-item"},[t("span",{staticClass:"label"},[e._v(e._s(e.$t("notice.action"))+":")]),t("a-tag",{attrs:{color:"BUY"===e.detailNotice.payload.action?"green":"red"}},[e._v(" "+e._s(e.detailNotice.payload.action)+" ")])],1):e._e(),e.detailNotice.payload.quantity?t("div",{staticClass:"extra-item"},[t("span",{staticClass:"label"},[e._v(e._s(e.$t("notice.quantity"))+":")]),t("span",{staticClass:"value"},[e._v(e._s(e.detailNotice.payload.quantity))])]):e._e()]:e._e()],2)]:e._e(),t("div",{staticClass:"notice-detail-actions"},[e.detailNotice.payload&&e.detailNotice.payload.monitor_id?t("a-button",{attrs:{type:"primary"},on:{click:e.goToPortfolio}},[t("a-icon",{attrs:{type:"fund"}}),e._v(" "+e._s(e.$t("notice.viewPortfolio"))+" ")],1):e._e(),t("a-button",{on:{click:function(t){e.detailVisible=!1}}},[e._v(" "+e._s(e.$t("notice.close"))+" ")])],1)],2):e._e()])],1)},we=[],Te=a(2403),Ce=a(81127),Ee=a(56252),Re=a(36911),Ie=a(75769),_e={name:"HeaderNotice",data:function(){return{loading:!1,visible:!1,detailVisible:!1,detailNotice:null,notifications:[],unreadTotal:0,lastFetchId:0,pollingTimer:null}},computed:{unreadCount:function(){return Number(this.unreadTotal||0)},isHtmlReport:function(){return!(!this.detailNotice||!this.detailNotice.message)&&(this.detailNotice.message.includes('
    ')||this.detailNotice.message.includes("